MAL_QBot_HTML_Smuggling_Indicators_Oct22_1
Description
Detects double encoded PKZIP headers as seen in HTML files used by QBot
Query · yara
strings:
/* Double base64 encoded - as seen in HTML */
$sd1 = "VUVzREJCUUFBUUFJQ"
$sd2 = "VFc0RCQlFBQVFBSU"
$sd3 = "VRXNEQkJRQUFRQUlB"
/* reversed */
$sdr1 = "QJFUUBFUUCJERzVUV"
$sdr2 = "USBFVQBFlQCR0cFV"
$sdr3 = "BlUQRFUQRJkQENXRV"
/* Triple base64 encoded - to detect the double encoded versions in email attachments */
$st1 = "VlVWelJFSkNVVUZCVVVGSl"
$st2 = "ZVVnpSRUpDVVVGQlVVRkpR"
$st3 = "WVVZ6UkVKQ1VVRkJVVUZKU"
$st4 = "VkZjMFJDUWxGQlFWRkJTV"
$st5 = "ZGYzBSQ1FsRkJRVkZCU1"
$st6 = "WRmMwUkNRbEZCUVZGQlNV"
$st7 = "VlJYTkVRa0pSUVVGUlFVbE"
$st8 = "ZSWE5FUWtKUlFVRlJRVWxC"
$st9 = "WUlhORVFrSlJRVUZSUVVsQ"
/* reversed */
$str1 = "UUpGVVVCRlVVQ0pFUnpWVV"
$str2 = "FKRlVVQkZVVUNKRVJ6VlVW"
$str3 = "RSkZVVUJGVVVDSkVSelZVV"
$str4 = "VVNCRlZRQkZsUUNSMGNGV"
$str5 = "VTQkZWUUJGbFFDUjBjRl"
$str6 = "VU0JGVlFCRmxRQ1IwY0ZW"
$str7 = "QmxVUVJGVVFSSmtRRU5YUl"
$str8 = "JsVVFSRlVRUkprUUVOWFJW"
$str9 = "CbFVRUkZVUVJKa1FFTlhSV"
/* HTML */
$htm = "<html" ascii
/* avoid matches in emails with double encoding - because email attachments get base64 encoded */
$eml = "Content-Transfer-Encoding:" ascii
condition:
filesize < 10MB and (
( 1 of ($sd*) and $htm and not $eml ) /* double encoded in HTML */
or ( 1 of ($st*) and $eml ) /* triple encoded in EML */
)