YARA · Signature Base (Florian Roth / Nextron)
SIGNATURE_BASE_MAL_UNC2891_Slapstick
Detects UNC2891 Slapstick pam backdoor
- Author
- Frank Boldewin (@r3c0nst), slightly modifier by Florian Roth
- Date
- 2022-03-30
- Modified
- 2023-01-05
- Score / Quality
- 75 / 85
What this rule detects
Detects UNC2891 Slapstick pam backdoor
Targets: Linux ELF.
It defines 6 patterns (4 text, 2 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule SIGNATURE_BASE_MAL_UNC2891_Slapstick : FILE
{
meta:
= "Detects UNC2891 Slapstick pam backdoor"
= "Frank Boldewin (@r3c0nst), slightly modifier by Florian Roth"
= "eb5db507-ac12-5c11-9dd9-ec34b9a80e1c"
= "2022-03-30"
= "2023-01-05"
= "https://github.com/fboldewin/YARA-rules/tree/master"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_unc2891_mal_jan23.yar#L19-L39"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
= "9d0165e0484c31bd4ea467650b2ae2f359f67ae1016af49326bb374cead5f789"
= "4bc51a47a1b620c3bb950c287c38a37e528e79f9720fb4d9fa9ebecbeca82036"
= 75
= 85
= "FILE"
strings:
$code1 = {F6 50 04 48 FF C0 48 39 D0 75 F5}
$code2 = {88 01 48 FF C1 8A 11 89 C8 29 F8 84 D2 0F 85}
$str1 = "/proc/self/exe" fullword ascii
$str2 = "%-23s %-23s %-23s %-23s %-23s %s" fullword ascii
$str3 = "pam_sm_authenticate" ascii
$str_fr1 = "HISTFILE=/dev/null"
condition:
uint32( 0 ) == 0x464c457f and filesize < 100KB and ( all of ( $code* ) or all of ( $str* ) )
}
Strings (6 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $code1 | hex | {F6 50 04 48 FF C0 48 39 D0 75 F5} | |
| $code2 | hex | {88 01 48 FF C1 8A 11 89 C8 29 F8 84 D2 0F 85} | |
| $str1 | text | "/proc/self/exe" | fullword ascii |
| $str2 | text | "%-23s %-23s %-23s %-23s %-23s %s" | fullword ascii |
| $str3 | text | "pam_sm_authenticate" | ascii |
| $str_fr1 | text | "HISTFILE=/dev/null" |
Condition
uint32( 0 ) == 0x464c457f and filesize < 100KB and ( all of ( $code* ) or all of ( $str* ) )In plain words (Heuristic)
- The file must start with the ELF header — a Linux/Unix executable.
- The file must be smaller than 100KB (a cheap guard that skips large files).
- All patterns in ( $code* ) must match.
- All patterns in ( $str* ) 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.
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- 9d0165e0484c31bd4ea467650b2ae2f359f67ae1016af49326bb374cead5f789
Licence & attribution
Author: Frank Boldewin (@r3c0nst), slightly modifier by Florian Roth
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: eb5db507-ac12-5c11-9dd9-ec34b9a80e1c
Tags:FILE