YARA · SEKOIA.IO Community
SEKOIA_Merlin_Crossplatform
Detects Merlin agent cross platform
- Author
- Sekoia.io
- Date
- 2022-01-03
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detects Merlin agent cross platform
Targets: Windows PE.
It defines 6 patterns (6 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
merlin-crossplatform.yarDetection Rule License 1.1
rule SEKOIA_Merlin_Crossplatform : FILE
{
meta:
= "Detects Merlin agent cross platform"
= "Sekoia.io"
= "c9c57f5e-26c3-43be-b2cf-10f5129d3be6"
= "2022-01-03"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/merlin_crossplatform.yar#L1-L23"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "975cc4fe0d89383188f9fd3c516d1e853dd6070d7703c0b5b5874dc1e7e6f32a"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$s1 = ".CRT" ascii
$s2 = ".tls" ascii
$s3 = "github.com/Ne0nd0g/merlin" ascii
$s4 = "github.com/refraction-networking" ascii
$s5 = "SendMerlinMessage" ascii
$s6 = "ifconfigH9" ascii
condition:
( uint16( 0 ) == 0x5a4d or uint16( 0 ) == 0x457f ) and all of them and filesize > 5MB and filesize < 15MB
}
Strings (6 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | ".CRT" | ascii |
| $s2 | text | ".tls" | ascii |
| $s3 | text | "github.com/Ne0nd0g/merlin" | ascii |
| $s4 | text | "github.com/refraction-networking" | ascii |
| $s5 | text | "SendMerlinMessage" | ascii |
| $s6 | text | "ifconfigH9" | ascii |
Condition
( uint16( 0 ) == 0x5a4d or uint16( 0 ) == 0x457f ) and all of them and filesize > 5MB and filesize < 15MBIn plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- The file must be smaller than 15MB (a cheap guard that skips large files).
- The file must be larger than 5MB.
- All patterns in the rule must match.
Test this rule in your browser
Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.
Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.
References
Licence & attribution
Author: Sekoia.io
Source repository: SEKOIA.IO Community @ a438a5901a
Licence: Detection Rule License 1.1 (repository licence)
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: c9c57f5e-26c3-43be-b2cf-10f5129d3be6
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-10
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-27
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-27
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-23
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-06-11
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-03-06