YARA · Trellix Advanced Research Center
TRELLIX_ARC_Megacortex_Signed
Rule to detect MegaCortex samples digitally signed
- Author
- Marc Rivero | McAfee ATR Team
- Date
- 2026-09-01
- Modified
- 2020-08-14
- Score / Quality
- 75 / 70
What this rule detects
Rule to detect MegaCortex samples digitally signed
Associated malware family: MegaCortex.
Targets: Windows PE.
It has no patterns: the condition alone decides (modules, file properties or other rules). YARA modules used: pe.
YARA-X says: warning[deprecated_field]: field `number_of_signatures` is deprecated
Summary generated from the rule's metadata and condition.
Rule source
Includes the imports needed to compile it on its own.
import "pe"
rule TRELLIX_ARC_Megacortex_Signed : RANSOMWARE FILE
{
meta:
= "Rule to detect MegaCortex samples digitally signed"
= "Marc Rivero | McAfee ATR Team"
= "78a74e30-4de0-5e63-8ca5-31251c296f98"
= "2026-09-01"
= "2020-08-14"
= "https://blog.malwarebytes.com/detections/ransom-megacortex/"
= "https://github.com/advanced-threat-research/Yara-Rules//blob/1919562a59f190bda60c982424f6a24c542ee3e0/ransomware/RANSOM_MegaCortex.yar#L3-L26"
= "https://github.com/advanced-threat-research/Yara-Rules//blob/1919562a59f190bda60c982424f6a24c542ee3e0/LICENSE"
= "8ffced3aca837682fbd7ee68f559f73b8299cbfbe198f48124c4857680735249"
= 75
= 70
= "RANSOMWARE, FILE"
= "ransomware"
= "Ransom:W32/MegaCortex"
= "Cybercrime"
= "Unknown"
condition:
uint16( 0 ) == 0x5a4d and for any i in ( 0 .. pe.number_of_signatures ) : ( pe.signatures [ i ] . subject contains "/C=GB/L=ROMFORD/O=3AN LIMITED/CN=3AN LIMITED" and pe.signatures [ i ] . serial == "04:c7:cd:cc:16:98:e2:5b:49:3e:b4:33:8d:5e:2f:8b" or pe.signatures [ i ] . subject contains "/C=GB/postalCode=RM6 4DE/ST=ROMFORD/L=ROMFORD/street=8 Quarles Park Road/O=3AN LIMITED/CN=3AN LIMITED" and pe.signatures [ i ] . serial == "53:cc:4c:69:e5:6a:7d:bc:36:67:d5:ff:d5:24:aa:4b" or pe.signatures [ i ] . subject contains "/C=GB/postalCode=RM6 4DE/ST=ROMFORD/L=ROMFORD/street=8 Quarles Park Road/O=3AN LIMITED/CN=3AN LIMITED" or pe.signatures [ i ] . serial == "00:ad:72:9a:65:f1:78:47:ac:b8:f8:49:6a:76:80:ff:1e" )
}
Condition
uint16( 0 ) == 0x5a4d and for any i in ( 0 .. pe.number_of_signatures ) : ( pe.signatures [ i ] . subject contains "/C=GB/L=ROMFORD/O=3AN LIMITED/CN=3AN LIMITED" and pe.signatures [ i ] . serial == "04:c7:cd:cc:16:98:e2:5b:49:3e:b4:33:8d:5e:2f:8b" or pe.signatures [ i ] . subject contains "/C=GB/postalCode=RM6 4DE/ST=ROMFORD/L=ROMFORD/street=8 Quarles Park Road/O=3AN LIMITED/CN=3AN LIMITED" and pe.signatures [ i ] . serial == "53:cc:4c:69:e5:6a:7d:bc:36:67:d5:ff:d5:24:aa:4b" or pe.signatures [ i ] . subject contains "/C=GB/postalCode=RM6 4DE/ST=ROMFORD/L=ROMFORD/street=8 Quarles Park Road/O=3AN LIMITED/CN=3AN LIMITED" or pe.signatures [ i ] . serial == "00:ad:72:9a:65:f1:78:47:ac:b8:f8:49:6a:76:80:ff:1e" )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- A for-loop checks a property over several matches or items.
- Uses the pe module.
- Checks the Authenticode signature.
Test this rule in your browser
Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.
Licence & attribution
Author: Marc Rivero | McAfee ATR Team
Source repository: Trellix Advanced Research Center @ 1919562a59
Licence: Apache License 2.0 (repository licence)
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: 78a74e30-4de0-5e63-8ca5-31251c296f98
Metadata
| malware_type | ransomware |
|---|---|
| malware_family | Ransom:W32/MegaCortex |
| actor_type | Cybercrime |
| actor_group | Unknown |
Tags:RANSOMWAREFILE
Related rules
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04
- MalwareTrellix Advanced Research Center· Marc Rivero | McAfee ATR Team· 2026-09-01
- MalwareTrellix Advanced Research Center· Marc Rivero | McAfee ATR Team· 2026-09-01
- MalwareTrellix Advanced Research Center· Marc Rivero | McAfee ATR Team· 2020-03-17
- MalwareTrellix Advanced Research Center· Marc Rivero | McAfee ATR Team· 2020-02-23
- MalwareTrellix Advanced Research Center· Marc Rivero | McAfee ATR Team· 2020-04-06
- MalwareTrellix Advanced Research Center· Marc Rivero | McAfee ATR Team· 2020-08-11
- MalwareTrellix Advanced Research Center· Marc Rivero | McAfee ATR Team· 2020-07-19