YARA · Signature Base (Florian Roth / Nextron)
SIGNATURE_BASE_MAL_APT_NK_Andariel_Lilithrat_Variant
Detects a variant of the Lilith RAT malware family
- Author
- CISA.gov (modified by Florian Roth, Nextron Systems)
- Date
- 2024-07-25
- Modified
- 2024-07-26
- Score / Quality
- 80 / 85
What this rule detects
Detects a variant of the Lilith RAT malware family
Associated malware family: Lilithrat.
Targets: Windows PE.
It defines 10 patterns (10 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule SIGNATURE_BASE_MAL_APT_NK_Andariel_Lilithrat_Variant : FILE
{
meta:
= "Detects a variant of the Lilith RAT malware family"
= "CISA.gov (modified by Florian Roth, Nextron Systems)"
= "916a289b-db7b-5f09-9d3e-589c3f09101d"
= "2024-07-25"
= "2024-07-26"
= "https://www.cisa.gov/news-events/cybersecurity-advisories/aa24-207a"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_nk_andariel_jul24.yar#L143-L178"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
= "3ce68908468ff85683b081842fa4faa579fbf6f7dc1a7fab5dcf7eac63d90aea"
= 80
= 85
= "FILE"
strings:
$lilith_1 = "Initiate a CMD session first." ascii
$lilith_2 = "CMD is not open" ascii
$lilith_3 = "Couldn't write command" ascii
$lilith_4 = "Couldn't write to CMD: CMD not open" ascii
$unique_1 = "Upload Error!" ascii
$unique_2 = "ERROR: Downloading is already running!" ascii
$unique_3 = "ERROR: Unable to open file:" ascii
$unique_4 = "General error" ascii
$unique_5 = "CMD error" ascii
$unique_6 = "killing self" ascii
condition:
uint16( 0 ) == 0x5a4d and filesize < 150KB and ( all of ( $lilith_* ) or 4 of ( $unique_* ) or 1 of ( $lilith_4 , $unique_2 ) )
}
Strings (10 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $lilith_1 | text | "Initiate a CMD session first." | ascii |
| $lilith_2 | text | "CMD is not open" | ascii |
| $lilith_3 | text | "Couldn't write command" | ascii |
| $lilith_4 | text | "Couldn't write to CMD: CMD not open" | ascii |
| $unique_1 | text | "Upload Error!" | ascii |
| $unique_2 | text | "ERROR: Downloading is already running!" | ascii |
| $unique_3 | text | "ERROR: Unable to open file:" | ascii |
| $unique_4 | text | "General error" | ascii |
| $unique_5 | text | "CMD error" | ascii |
| $unique_6 | text | "killing self" | ascii |
Condition
uint16( 0 ) == 0x5a4d and filesize < 150KB and ( all of ( $lilith_* ) or 4 of ( $unique_* ) or 1 of ( $lilith_4 , $unique_2 ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- The file must be smaller than 150KB (a cheap guard that skips large files).
- All patterns in ( $lilith_* ) must match.
- At least 4 patterns in ( $unique_* ) must match.
- At least 1 patterns in ( $lilith_4 , $unique_2 ) 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.
Licence & attribution
Author: CISA.gov (modified by Florian Roth, Nextron Systems)
Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a
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: 916a289b-db7b-5f09-9d3e-589c3f09101d
Tags:FILE
Related rules
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareSignature Base (Florian Roth / Nextron)· CISA.gov (modified by Florian Roth, Nextron Systems)· 2024-07-25
- MalwareSignature Base (Florian Roth / Nextron)· CISA.gov (modified by Florian Roth, Nextron Systems)· 2024-07-25
- MalwareSignature Base (Florian Roth / Nextron)· CISA.gov (modified by Florian Roth, Nextron Systems)· 2024-07-25
- MalwareSignature Base (Florian Roth / Nextron)· CISA.gov (modified by Florian Roth, Nextron Systems)· 2024-07-25