YARA · Signature Base (Florian Roth / Nextron)
SIGNATURE_BASE_APT_APT41_CN_ELF_Speculoos_Backdoor
Detects Speculoos Backdoor used by APT41
- Author
- Florian Roth (Nextron Systems)
- Date
- 2020-04-14
- Modified
- 2023-12-05
- Score / Quality
- 90 / 85
What this rule detects
Detects Speculoos Backdoor used by APT41
It defines 10 patterns (8 text, 2 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule SIGNATURE_BASE_APT_APT41_CN_ELF_Speculoos_Backdoor : FILE
{
meta:
= "Detects Speculoos Backdoor used by APT41"
= "Florian Roth (Nextron Systems)"
= "efe2b368-33af-5382-a5f0-0e7dd7f4dea4"
= "2020-04-14"
= "2023-12-05"
= "https://unit42.paloaltonetworks.com/apt41-using-new-speculoos-backdoor-to-target-organizations-globally/"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_apt41.yar#L233-L267"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
= "6943fbb194317d344ca9911b7abb11b684d3dca4c29adcbcff39291822902167"
= "99c5dbeb545af3ef1f0f9643449015988c4e02bf8a7164b5d6c86f67e6dc2d28"
= "ee4cbbc5fc51fb24cbf6017dfb4763ac72a0b23a3b6e794b909e678ebfbabc03"
= 90
= 85
= "FILE"
strings:
$xc1 = { 2F 70 72 69 76 61 74 65 2F 76 61 72 00 68 77 2E
70 68 79 73 6D 65 6D 00 68 77 2E 75 73 65 72 6D
65 6D 00 4E 41 2D 4E 41 2D 4E 41 2D 4E 41 2D 4E
41 2D 4E 41 00 6C 6F 30 00 00 00 00 25 30 32 78
2D 25 30 32 78 2D 25 30 32 78 2D 25 30 32 78 2D
25 30 32 78 2D 25 30 32 78 0A 00 72 00 4E 41 00
75 6E 61 6D 65 20 2D 76 }
$s1 = "badshell" ascii fullword
$s2 = "hw.physmem" ascii fullword
$s3 = "uname -v" ascii fullword
$s4 = "uname -s" ascii fullword
$s5 = "machdep.tsc_freq" ascii fullword
$s6 = "/usr/sbin/config.bak" ascii fullword
$s7 = "enter MessageLoop..." ascii fullword
$s8 = "exit StartCBProcess..." ascii fullword
$sc1 = { 72 6D 20 2D 72 66 20 22 25 73 22 00 2F 70 72 6F
63 2F }
condition:
uint16( 0 ) == 0x457f and filesize < 600KB and 1 of ( $x* ) or 4 of them
}
Strings (10 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $xc1 | hex | { 2F 70 72 69 76 61 74 65 2F 76 61 72 00 68 77 2E 70 68 79 73 6D 65 6D 00 68 77 2E 75 73 65 72 6D 65 6D 00 4E 41 2D 4E 41 2D 4E 41 … | |
| $s1 | text | "badshell" | ascii fullword |
| $s2 | text | "hw.physmem" | ascii fullword |
| $s3 | text | "uname -v" | ascii fullword |
| $s4 | text | "uname -s" | ascii fullword |
| $s5 | text | "machdep.tsc_freq" | ascii fullword |
| $s6 | text | "/usr/sbin/config.bak" | ascii fullword |
| $s7 | text | "enter MessageLoop..." | ascii fullword |
| $s8 | text | "exit StartCBProcess..." | ascii fullword |
| $sc1 | hex | { 72 6D 20 2D 72 66 20 22 25 73 22 00 2F 70 72 6F 63 2F } |
Condition
uint16( 0 ) == 0x457f and filesize < 600KB and 1 of ( $x* ) or 4 of themIn plain words (Heuristic)
- The file must be smaller than 600KB (a cheap guard that skips large files).
- At least 1 patterns in ( $x* ) must match.
- At least 4 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.
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- 6943fbb194317d344ca9911b7abb11b684d3dca4c29adcbcff39291822902167
- 99c5dbeb545af3ef1f0f9643449015988c4e02bf8a7164b5d6c86f67e6dc2d28
Licence & attribution
Author: 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: efe2b368-33af-5382-a5f0-0e7dd7f4dea4
Tags:FILE
Related rules
- APT / threat actorSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-01-16
- APT / threat actorSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-01-16
- APT / threat actorSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-02-25
- APT / threat actorSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2023-03-31
- APT / threat actorSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-10-25
- APT / threat actorSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-01-16
- APT / threat actorSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-02-25
- APT / threat actorSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-02-24