YARA · Signature Base (Florian Roth / Nextron)
SIGNATURE_BASE_EXT_HKTL_MAL_Tinyshell_Backdoor
Detects Tiny Shell - an open-source UNIX backdoor
- Author
- Mandiant
- Date
- 2022-03-17
- Modified
- 2026-05-15
- Score / Quality
- 80 / 85
What this rule detects
Detects Tiny Shell - an open-source UNIX backdoor
Targets: Linux ELF.
It defines 16 patterns (14 text, 2 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule SIGNATURE_BASE_EXT_HKTL_MAL_Tinyshell_Backdoor : FILE
{
meta:
= "Detects Tiny Shell - an open-source UNIX backdoor"
= "Mandiant"
= "4ad5d334-98e4-577f-89c9-86626e8feb58"
= "2022-03-17"
= "2026-05-15"
= "https://www.mandiant.com/resources/blog/unc2891-overview"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_unc2891_tinyshell_slapstick.yar#L1-L29"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
= "1f889871263bd6cdad8f3d4d5fc58b4a32669b944d3ed0860730374bb87d730a"
= "1fe9def11dced638ad38236652877427b61d7138fc8c6ce3fe7f1403c367468f"
= 80
= 85
= "FILE"
strings:
$sb1 = { C6 00 48 C6 4? ?? 49 C6 4? ?? 49 C6 4? ?? 4C C6 4? ?? 53 C6 4? ?? 45 C6 4? ?? 54 C6 4? ?? 3D C6 4? ?? 46 C6 4? ?? 00 }
$sb2 = { C6 00 54 C6 4? ?? 4D C6 4? ?? 45 C6 4? ?? 3D C6 4? ?? 52 }
$ss1 = "fork" ascii fullword wide
$ss2 = "socket" ascii fullword wide
$ss3 = "bind" ascii fullword wide
$ss4 = "listen" ascii fullword wide
$ss5 = "accept" ascii fullword wide
$ss6 = "alarm" ascii fullword wide
$ss7 = "shutdown" ascii fullword wide
$ss8 = "creat" ascii fullword wide
$ss9 = "write" ascii fullword wide
$ss10 = "open" ascii fullword wide
$ss11 = "read" ascii fullword wide
$ss12 = "execl" ascii fullword wide
$ss13 = "gethostbyname" ascii fullword wide
$ss14 = "connect" ascii fullword wide
condition:
uint32( 0 ) == 0x464c457f and 1 of ( $sb* ) and 10 of ( $ss* )
}
Strings (16 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $sb1 | hex | { C6 00 48 C6 4? ?? 49 C6 4? ?? 49 C6 4? ?? 4C C6 4? ?? 53 C6 4? ?? 45 C6 4? ?? 54 C6 4? ?? 3D C6 4? ?? 46 C6 4? ?? 00 } | |
| $sb2 | hex | { C6 00 54 C6 4? ?? 4D C6 4? ?? 45 C6 4? ?? 3D C6 4? ?? 52 } | |
| $ss1 | text | "fork" | ascii fullword wide |
| $ss2 | text | "socket" | ascii fullword wide |
| $ss3 | text | "bind" | ascii fullword wide |
| $ss4 | text | "listen" | ascii fullword wide |
| $ss5 | text | "accept" | ascii fullword wide |
| $ss6 | text | "alarm" | ascii fullword wide |
| $ss7 | text | "shutdown" | ascii fullword wide |
| $ss8 | text | "creat" | ascii fullword wide |
| $ss9 | text | "write" | ascii fullword wide |
| $ss10 | text | "open" | ascii fullword wide |
| $ss11 | text | "read" | ascii fullword wide |
| $ss12 | text | "execl" | ascii fullword wide |
| $ss13 | text | "gethostbyname" | ascii fullword wide |
| $ss14 | text | "connect" | ascii fullword wide |
Condition
uint32( 0 ) == 0x464c457f and 1 of ( $sb* ) and 10 of ( $ss* )In plain words (Heuristic)
- The file must start with the ELF header — a Linux/Unix executable.
- At least 1 patterns in ( $sb* ) must match.
- At least 10 patterns in ( $ss* ) 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).
- 1f889871263bd6cdad8f3d4d5fc58b4a32669b944d3ed0860730374bb87d730a
Licence & attribution
Author: Mandiant
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: 4ad5d334-98e4-577f-89c9-86626e8feb58
Tags:FILE
Related rules
- Hack toolSignature Base (Florian Roth / Nextron)· Mandiant· 2022-03-17
- APT / threat actorSignature Base (Florian Roth / Nextron)· Mandiant· 2022-04-28
- APT / threat actorSignature Base (Florian Roth / Nextron)· Mandiant· 2023-04-20
- APT / threat actorSignature Base (Florian Roth / Nextron)· Mandiant· 2023-04-20
- APT / threat actorSignature Base (Florian Roth / Nextron)· Mandiant· 2023-04-20
- APT / threat actorSignature Base (Florian Roth / Nextron)· Mandiant· 2023-04-20
- APT / threat actorSignature Base (Florian Roth / Nextron)· Mandiant· 2023-04-20
- APT / threat actorSignature Base (Florian Roth / Nextron)· Mandiant· 2023-04-20