Web:
E-Mail:
$path = "C:\Users\redguard\Downloads"
$logfile = "checker_web.out.yaml"
If(!(Test-path -PathType container $path))
{
Write-Output "[!] Working directory does not exist. Please make sure it exists and try again."
Exit
}
function Write-Log($event) {
if (-Not (Test-Path "$path\$logfile")) {
Add-Content -Path "$path\$logfile" -Value "web:"
}
$timestamp = [int](Get-Date -UFormat %s -Millisecond 0)
Add-Content -Path "$path\$logfile" -Value " - id: $orig_hash"
Add-Content -Path "$path\$logfile" -Value " type: $ext"
Add-Content -Path "$path\$logfile" -Value " timestamp: $timestamp"
Add-Content -Path "$path\$logfile" -Value " event: $event"
Add-Content -Path "$path\$logfile" -Value ""
}
$files = Get-ChildItem -Path $path | Where { $_.Name.Split(".")[0].Length -eq 64 } | Select Name
foreach ($file in $files)
{
$file = $file.Name
$orig_hash = $file.Split(".")[0]
$ext = $file.Split(".")[1]
$calc_hash = $(Get-FileHash -Algorithm SHA256 "$path\$file").Hash.ToLower()
if ($orig_hash -eq $calc_hash) {
Write-Log("web_download_unchanged")
} else {
Write-Log("web_download_changed")
}
}
$work_dir = "C:\Users\redguard\Desktop\rome"
$logfile = "checker_mail.out.yaml"
If(!(Test-path -PathType container $work_dir))
{
Write-Output "[!] Working directory does not exist. Please make sure it exists and try again."
Exit
}
function Write-Log($event){
if (-Not (Test-Path "$work_dir\$logfile")) {
Add-Content -Path "$work_dir\$logfile" -Value "mail:"
}
$timestamp = [int](Get-Date -UFormat %s -Millisecond 0)
Add-Content -Path "$work_dir\$logfile" -Value " - id: $OriginalFileHash"
Add-Content -Path "$work_dir\$logfile" -Value " type: $FileExtension"
Add-Content -Path "$work_dir\$logfile" -Value " timestamp: $timestamp"
Add-Content -Path "$work_dir\$logfile" -Value " event: $event"
Add-Content -Path "$work_dir\$logfile" -Value ""
}
$outlook = new-object -com outlook.application;
$mapi = $outlook.GetNameSpace("MAPI");
$olFolderInbox = 6
$inbox = $mapi.GetDefaultFolder($olFolderInbox)
Write-Host "[*] Scanning inbox for ROME mails. This may take a while..."
$inbox.Items |
?{$_.subject -match "ROME Payload:" } |
%{
## TODO: case when the proxy adds files is not covered yet (e.g. PF)
if($_.attachments.count -eq 1){
# Mail contains the one expected attachment
$attachment = $_.attachments[1]
$attachmentPath = (Join-Path $work_dir $attachment.FileName)
$attachment.saveasfile($attachmentPath)
# test if the mail has been changed
$CalculatedFileHash = Get-FileHash $attachmentPath
$OriginalFileHash = $attachment.FileName.Split(".")[0]
$FileExtension = $attachment.FileName.Split(".")[1]
if ($CalculatedFileHash.Hash.ToLower() -eq $OriginalFileHash){
# file not changed, log event 'mail_attachment_unchanged'
$FileExtension = $attachment.FileName.Split(".")[1]
Write-Log('mail_attachment_unchanged')
} else {
# file changed, log event 'mail_attachment_changed'
$FileExtension = $attachment.FileName.Split(".")[1]
Write-Log('mail_attachment_changed')
}
} elseif ($_.attachments.count -eq 0) {
# Mail contains 0 attachments -> attachment has been removed
$OriginalFileHash = $_.Body.Split("*")[1].Split("*")[0]
$FileExtension = $_.Body.Split("*")[3].Split("*")[0]
Write-Log('mail_attachment_removed')
}
}
$path = "C:\Users\redguard\Downloads"
$logfile = "executor.out.yaml"
If(!(Test-path -PathType container $path))
{
Write-Output "[!] Working directory does not exist. Please make sure it exists and try again."
Exit
}
$manually_testable = @("reg", "bgi", "lnk", "application", "appref-ms", "appx", "msix", "appxbundle", "eml", "xltm", "xlt", "MAM", "csproj", "one", "iso", "zip", "tar", "rar", "7z", "tgz", "tar.gz")
function Write-Log($event) {
if (-Not (Test-Path "$path\$logfile")) {
Add-Content -Path "$path\$logfile" -Value "local:"
}
$timestamp = [int](Get-Date -UFormat %s -Millisecond 0)
Add-Content -Path "$path\$logfile" -Value " - id: $orig_hash"
Add-Content -Path "$path\$logfile" -Value " type: $ext"
Add-Content -Path "$path\$logfile" -Value " timestamp: $timestamp"
Add-Content -Path "$path\$logfile" -Value " event: $event"
Add-Content -Path "$path\$logfile" -Value ""
}
$files = Get-ChildItem -Path $path | Where { $_.Name.Split(".")[0].Length -eq 64 } | Select Name
foreach ($file in $files)
{
$file = $file.Name
$orig_hash = $file.Split(".")[0]
$ext = $file.Split(".")[1]
if ($manually_testable.Contains($ext)) {
Write-Host "[!] Found only manual testable extension for $orig_hash.$ext"
Write-Log("sample_manually_testable")
} else {
Invoke-Item -Path "$path\$file";
Write-Host "[*] Executed sample $file"
}
}
Start-Sleep -Seconds 5
$files = Get-ChildItem -Path $path | Where { ($_.Name.Split(".")[0].Length -eq 64) -AND ($_.Name.Split(".")[2] -eq "proof" )} | Select Name
foreach ($file in $files)
{
$file = $file.Name
$orig_hash = $file.Split(".")[0]
$ext = $file.Split(".")[1]
Write-Host "[+] Found proof for $orig_hash.$ext"
Write-Log("sample_executed")
}
Upload the generated client-side YAML files to create a final report. The server-side logs are processed automatically.
Client-side Files (Upload)
Server-side Files (Informational)
| SHA256 | Type | Send | Reporting |
|---|---|---|---|
6e25136b16e8a288bcf27353b442b3d8ecaea6bab6d06f0fd3bb2d1c690c7c9b |
appx |
Download | |
6e25136b16e8a288bcf27353b442b3d8ecaea6bab6d06f0fd3bb2d1c690c7c9b |
appxbundle |
Download | |
300daff80f23a8a8af8c94e126fbc4581adeddc04d4aafa4dd2419866c5c5293 |
one |
Download | |
b27e67b7f6365b94d4f8f863a76383946e7a3adda10f12843088f6d096152491 |
bgi |
Download | |
3d4f91bcbfd59439c99ea5a85fd406775c5887dbd745f0054eda51916dd77624 |
tar |
Download | |
a5f393890ffad591c8e223287677eed5e7085cecab38a679f64070d5d4a22aae |
application |
Download | |
3bfdd8d722be5c14b2f73fe34aa2871ff8a06adf2cac4348ffbbf46fd92ca495 |
xlt |
Download | |
edb1c84980ad88af808a97d0a83a9d62cf81ce587df6b0a60fabdd0cb9621199 |
rar |
Download | |
ea98f489d63755a1c4e14692c804232a3e41aff5628ea982457cf32260171238 |
csproj |
Download | |
5500b00bdb7757966c651990f6f5bdc70990090f389181c4166432a78b92b4e9 |
encrypted.7z |
Download | |
bba35e418cf1622198e1fda67307f6fd0fffed1f4f8eb4931072be80362b8145 |
zip |
Download | |
a50bdd58a96d2eca3be4995f17e7109f184a7d213ef996980b24d0bfb589065c |
tgz |
Download | |
9bfeed320e3440e21a9e22a66d43336beda1519843549dd6b1bf11fdc2318acd |
lnk |
Download | |
83a0ff3ffc3666619971bc2c72579d301f9b78f0ee730aaa1e01aee3ec9aacc6 |
eml |
Download | |
e1f89c6c5f795862663b30784fe0be228a3724b59c2264fdaf8d6168d0aa31b0 |
xltm |
Download | |
6e25136b16e8a288bcf27353b442b3d8ecaea6bab6d06f0fd3bb2d1c690c7c9b |
msix |
Download | |
f2bd95c6fb79835a7ccbab25c71bb2688b87461196276c01a4cda84de46809fd |
MAM |
Download | |
ea2c1a2c6e8cc533cbcdbd32143097072a26b0ac75978f0bb31305eb3a2d247e |
one |
Download | |
a50bdd58a96d2eca3be4995f17e7109f184a7d213ef996980b24d0bfb589065c |
tar.gz |
Download | |
199605297c4034e04f5a6f7049c62effb1ecf8b84c254cdc5bab2f7411a06ab6 |
reg |
Download | |
222edaddc722ffe188686d71cde86438648b93117707713a9cf143d6534dcf06 |
iso |
Download | |
86df5cea9f99a69a7fc6b3e2d00de09b8b74d5c3258964e2184fa35d07f51a3f |
encrypted.zip |
Download | |
edb1c84980ad88af808a97d0a83a9d62cf81ce587df6b0a60fabdd0cb9621199 |
7z |
Download | |
a5f393890ffad591c8e223287677eed5e7085cecab38a679f64070d5d4a22aae |
appref-ms |
Download |
| SHA256 | Type | Send | Reporting |
|---|---|---|---|
09393f677c99ab8efed5ec512383874142cdb91506b8ba4da96be9d1207143a1 |
docm |
Download | |
0c1b49cf0300103a371c8f547f718139d1edd103b52cd6780394f1722c8cdb3a |
wbk |
Download | |
5d856bd37b3dea0bea6dadefecdf17bccb22d1b144e5c86b86964f765465b79f |
exe |
Download | |
177797b52ea69a68b84484326d37f1b040e01964bec66b36f78077134b903728 |
htm |
Download | |
ce18e4a422422fba8e67ddaa32a45c8600c9b5fc1b1f415e9a05f46691acefa4 |
jse |
Download | |
500c24c707989a1279c5473c0aa272e5a7c7052086570215b6123cb29f997d46 |
docm |
Download | |
b31310bd2e0fdebb45795738024d02f5b513e5d252fb70281dfe283c508a334e |
doc |
Download | |
8dc01ac3af0d11184dbb4044147d41b2de1f218b902370a1538f524b0502880e |
cmd |
Download | |
5d856bd37b3dea0bea6dadefecdf17bccb22d1b144e5c86b86964f765465b79f |
scr |
Download | |
9ca485f14b0cf7e5eeeeb6822607172798bdb5cb1d827d2aeaf7c19d7ade059b |
doc |
Download | |
8dc01ac3af0d11184dbb4044147d41b2de1f218b902370a1538f524b0502880e |
bat |
Download | |
5e508432a479e8f21293c638b30fec782e16aef8d473dcdcb00c671672fbc8c3 |
xll |
Download | |
c5ef9f19689873bb7148057b6f9ae0e63a612cec07714ad37adaaf43245ff828 |
accde |
Download | |
5d856bd37b3dea0bea6dadefecdf17bccb22d1b144e5c86b86964f765465b79f |
pif |
Download | |
b85c281bfd2645e798be291d5efbce8c07650f06d7c9f703b7478519a095281d |
accdb |
Download | |
60bdf71fe43aec46a541c4976fbc1931fdc56e7a3c0d4af52194be48e3c452a9 |
vbe |
Download | |
5e508432a479e8f21293c638b30fec782e16aef8d473dcdcb00c671672fbc8c3 |
cpl |
Download | |
c6d36e3854eba57a9bcf4a494d482d5fb8987165a782126dfdacb3660cefbe03 |
xlsm |
Download | |
3e8f5476074c2d39ed23828e8a02e09a5a5dcc7a35b4ca37dcf0ee453a6a5bed |
SettingContent-ms |
Download | |
3e534accb8bf94ebe9433866efe53015b2b7c8281fc5a15598fa224fe897a4a3 |
jar |
Download | |
177797b52ea69a68b84484326d37f1b040e01964bec66b36f78077134b903728 |
html |
Download | |
1d5e2413b0855940e0482806c6ffbe1bea32742da7ab4cd1d0f1f9588e22225f |
xls |
Download | |
0c1b49cf0300103a371c8f547f718139d1edd103b52cd6780394f1722c8cdb3a |
doc |
Download | |
9fdd744c2b33e36b4af842781428f02de8bba4a70e08b2e7d08b5f3644a8ffe6 |
msi |
Download | |
1e7efbcf04b4058d411a247bf0c206b54ecbe01be03916e30bbe7639e4052d14 |
dot |
Download | |
ce18e4a422422fba8e67ddaa32a45c8600c9b5fc1b1f415e9a05f46691acefa4 |
js |
Download | |
c408897d6c77fd1236ad4126265b65d1ff480ab5d9cafa036f157b8963066420 |
wsf |
Download | |
ed94be0e79c4816c9047228c326f90893e6e96c32222e69c753cba72166e350c |
exe |
Download | |
5d2c68e27cfa3b5642f9f01e5b1652d83904203aeba34dfe623026679d9410f1 |
pptm |
Download | |
e09465dcd19db9fb3979586c8120dafc2ad83069d74b66829ee3e8ea452c14b1 |
docm |
Download | |
0c1b49cf0300103a371c8f547f718139d1edd103b52cd6780394f1722c8cdb3a |
asd |
Download | |
b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 |
txt |
Download | |
90ae935c99a0d21e69cc56a1610b3a9be0c627be362e7e5d71aa645bbaabad05 |
dotm |
Download | |
7dcfd0061722cc3ecbdf55cd6106429ae42c996d25e7ccccb3f22459d6ff65a9 |
ps1 |
Download | |
60bdf71fe43aec46a541c4976fbc1931fdc56e7a3c0d4af52194be48e3c452a9 |
vbs |
Download | |
60aab8cf665110e07ae957150d12e5c542233ca8a5374fc5c237d8c139daed90 |
xlam |
Download | |
e71de848d203f71f50445835eb745ce89bbd178aacd90d897986939fdf02ae3c |
hta |
Download | |
5d856bd37b3dea0bea6dadefecdf17bccb22d1b144e5c86b86964f765465b79f |
com |
Download | |
2ae4ffc7e81a64997e229bea32f3af7e3cdb7494dd362687357d6bfb5b4adae9 |
svg |
Download | |
cc22e94cda680af56b42e39a3e842ee506f9c55958a6adc4b519e28322b369ab |
svg |
Download |