rule SUSP_PS1_Msdt_Execution_May22 { meta: description = "Detects suspicious calls of msdt.exe as seen in CVE-2022-30190 / Follina exploitation" author = "Nasreddine Bencherchali, Christian Burkard" date = "2022-05-31" modified = "2022-07-08" reference = "https://doublepulsar.com/follina-a-microsoft-office-code-execution-vulnerability-1a47fce5629e" score = 75 id = "caa8a042-ffd4-52b2-a9f0-86e6c83a0aa3" strings: $a = "PCWDiagnostic" ascii wide fullword $sa1 = "msdt.exe" ascii wide $sa2 = "msdt " ascii wide $sa3 = "ms-msdt" ascii wide $sb1 = "/af " ascii wide $sb2 = "-af " ascii wide $sb3 = "IT_BrowseForFile=" ascii wide /* OriginalFilename pcwrun.exe */ $fp1 = { 4F 00 72 00 69 00 67 00 69 00 6E 00 61 00 6C 00 46 00 69 00 6C 00 65 00 6E 00 61 00 6D 00 65 00 00 00 70 00 63 00 77 00 72 00 75 00 6E 00 2E 00 65 00 78 00 65 00 } $fp2 = "FilesFullTrust" wide condition: filesize < 10MB and $a and 1 of ($sa*) and 1 of ($sb*) and not 1 of ($fp*) } rule SUSP_Doc_WordXMLRels_May22 { meta: description = "Detects a suspicious pattern in docx document.xml.rels file as seen in CVE-2022-30190 / Follina exploitation" author = "Tobias Michalski, Christian Burkard, Wojciech Cieslak" date = "2022-05-30" modified = "2022-06-20" reference = "https://doublepulsar.com/follina-a-microsoft-office-code-execution-vulnerability-1a47fce5629e" hash = "62f262d180a5a48f89be19369a8425bec596bc6a02ed23100424930791ae3df0" score = 70 id = "304c4816-b2f6-5319-9fe9-8f74bdb82ad0" strings: $a1 = " 3KB and filesize < 100KB and 1 of them } rule SUSP_Doc_RTF_OLE2Link_Jun22 { meta: description = "Detects a suspicious pattern in RTF files which downloads external resources" author = "Christian Burkard" date = "2022-06-01" reference = "Internal Research" hash = "4abc20e5130b59639e20bd6b8ad759af18eb284f46e99a5cc6b4f16f09456a68" score = 75 id = "e9c83d58-6214-51d5-882a-4bd2ed6acc9a" strings: $sa = "\\objdata" ascii nocase $sb1 = "4f4c45324c696e6b" ascii /* OLE2Link */ $sb2 = "4F4C45324C696E6B" ascii $sc1 = "d0cf11e0a1b11ae1" ascii /* docfile magic - doc file albilae */ $sc2 = "D0CF11E0A1B11AE1" ascii $x1 = "68007400740070003a002f002f00" ascii /* http:// */ $x2 = "68007400740070003A002F002F00" ascii $x3 = "680074007400700073003a002f002f00" ascii /* https:// */ $x4 = "680074007400700073003A002F002F00" ascii $x5 = "6600740070003a002f002f00" ascii /* ftp:// */ $x6 = "6600740070003A002F002F00" ascii /* TODO: more protocols */ condition: ( uint32be(0) == 0x7B5C7274 or uint32be(0) == 0x7B5C2A5C ) /* RTF */ and $sa and 1 of ($sb*) and 1 of ($sc*) and 1 of ($x*) } rule SUSP_Doc_RTF_OLE2Link_EMAIL_Jun22 { meta: description = "Detects a suspicious pattern in RTF files which downloads external resources inside e-mail attachments" author = "Christian Burkard" date = "2022-06-01" reference = "Internal Research" hash = "4abc20e5130b59639e20bd6b8ad759af18eb284f46e99a5cc6b4f16f09456a68" score = 75 id = "48cde505-3ce4-52ef-b338-0c08ac4f63de" strings: /* \objdata" */ $sa1 = "XG9iamRhdG" ascii $sa2 = "xvYmpkYXRh" ascii $sa3 = "cb2JqZGF0Y" ascii /* OLE2Link */ $sb1 = "NGY0YzQ1MzI0YzY5NmU2Y" ascii $sb2 = "RmNGM0NTMyNGM2OTZlNm" ascii $sb3 = "0ZjRjNDUzMjRjNjk2ZTZi" ascii $sb4 = "NEY0QzQ1MzI0QzY5NkU2Q" ascii $sb5 = "RGNEM0NTMyNEM2OTZFNk" ascii $sb6 = "0RjRDNDUzMjRDNjk2RTZC" ascii /* docfile magic - doc file albilae */ $sc1 = "ZDBjZjExZTBhMWIxMWFlM" ascii $sc2 = "QwY2YxMWUwYTFiMTFhZT" ascii $sc3 = "kMGNmMTFlMGExYjExYWUx" ascii $sc4 = "RDBDRjExRTBBMUIxMUFFM" ascii $sc5 = "QwQ0YxMUUwQTFCMTFBRT" ascii $sc6 = "EMENGMTFFMEExQjExQUUx" ascii /* http:// */ $x1 = "NjgwMDc0MDA3NDAwNzAwMDNhMDAyZjAwMmYwM" ascii $x2 = "Y4MDA3NDAwNzQwMDcwMDAzYTAwMmYwMDJmMD" ascii $x3 = "2ODAwNzQwMDc0MDA3MDAwM2EwMDJmMDAyZjAw" ascii $x4 = "NjgwMDc0MDA3NDAwNzAwMDNBMDAyRjAwMkYwM" ascii $x5 = "Y4MDA3NDAwNzQwMDcwMDAzQTAwMkYwMDJGMD" ascii $x6 = "2ODAwNzQwMDc0MDA3MDAwM0EwMDJGMDAyRjAw" ascii /* https:// */ $x7 = "NjgwMDc0MDA3NDAwNzAwMDczMDAzYTAwMmYwMDJmMD" ascii $x8 = "Y4MDA3NDAwNzQwMDcwMDA3MzAwM2EwMDJmMDAyZjAw" ascii $x9 = "2ODAwNzQwMDc0MDA3MDAwNzMwMDNhMDAyZjAwMmYwM" ascii $x10 = "NjgwMDc0MDA3NDAwNzAwMDczMDAzQTAwMkYwMDJGMD" ascii $x11 = "Y4MDA3NDAwNzQwMDcwMDA3MzAwM0EwMDJGMDAyRjAw" ascii $x12 = "2ODAwNzQwMDc0MDA3MDAwNzMwMDNBMDAyRjAwMkYwM" ascii /* ftp:// */ $x13 = "NjYwMDc0MDA3MDAwM2EwMDJmMDAyZjAw" ascii $x14 = "Y2MDA3NDAwNzAwMDNhMDAyZjAwMmYwM" ascii $x15 = "2NjAwNzQwMDcwMDAzYTAwMmYwMDJmMD" ascii $x16 = "NjYwMDc0MDA3MDAwM0EwMDJGMDAyRjAw" ascii $x17 = "Y2MDA3NDAwNzAwMDNBMDAyRjAwMkYwM" ascii $x18 = "2NjAwNzQwMDcwMDAzQTAwMkYwMDJGMD" ascii /* TODO: more protocols */ condition: filesize < 10MB and 1 of ($sa*) and 1 of ($sb*) and 1 of ($sc*) and 1 of ($x*) } rule SUSP_DOC_RTF_ExternalResource_EMAIL_Jun22 { meta: description = "Detects a suspicious pattern in RTF files which downloads external resources as seen in CVE-2022-30190 / Follina exploitation inside e-mail attachment" author = "Christian Burkard" date = "2022-06-01" reference = "https://doublepulsar.com/follina-a-microsoft-office-code-execution-vulnerability-1a47fce5629e" score = 70 id = "3ddc838c-8520-5572-9652-8cb823f83e27" strings: /* TS_ProgramCompatibilityWizard.ps1" ascii $x1 = "/../../" ascii $x2 = "$(Invoke-Expression" ascii $x3 = "$(IEX(" ascii nocase condition: uint32(0) == 0x6D783F3C /*