YARA · SEKOIA.IO Community
SEKOIA_Backdoor_Lin_Bpfdoor
Detect the BPFDoor backdoor used by the Chinese TA Red Menshen
- Author
- Sekoia.io
- Date
- 2022-05-05
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detect the BPFDoor backdoor used by the Chinese TA Red Menshen
Targets: Linux ELF.
It defines 4 patterns (0 text, 4 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
backdoor-lin-bpfdoor.yarDetection Rule License 1.1
rule SEKOIA_Backdoor_Lin_Bpfdoor : FILE
{
meta:
= "Detect the BPFDoor backdoor used by the Chinese TA Red Menshen"
= "Sekoia.io"
= "1776ff6f-6fbb-4a81-bcad-c43b5117c67c"
= "2022-05-05"
= "2024-12-19"
= "https://github.com/Neo23x0/signature-base/blob/master/yara/mal_lnx_implant_may22.yar"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/backdoor_lin_bpfdoor.yar#L1-L22"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "c917bd12731d761645adea72bc68c50927a0c2b0c31b2109f7065a992d338329"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$op1 = { e8 ?? ff ff ff 80 45 ee 01 0f b6 45 ee 3b 45 d4 7c 04 c6 45 ee 00 80 45 ff 01 80 7d ff 00 }
$op2 = { 55 48 89 e5 48 83 ec 30 89 7d ec 48 89 75 e0 89 55 dc 83 7d dc 00 75 0? }
$op3 = { e8 a? fe ff ff 0f b6 45 f6 48 03 45 e8 0f b6 10 0f b6 45 f7 48 03 45 e8 0f b6 00 8d 04 02 }
$op4 = { c6 80 01 01 00 00 00 48 8b 45 c8 0f b6 90 01 01 00 00 48 8b 45 c8 88 90 00 01 00 00 c6 45 ef 00 0f b6 45 ef 88 45 ee }
condition:
uint32( 0 ) == 0x464c457f and filesize > 10KB and filesize < 50KB and ( all of ( $op* ) )
}
Strings (4 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $op1 | hex | { e8 ?? ff ff ff 80 45 ee 01 0f b6 45 ee 3b 45 d4 7c 04 c6 45 ee 00 80 45 ff 01 80 7d ff 00 } | |
| $op2 | hex | { 55 48 89 e5 48 83 ec 30 89 7d ec 48 89 75 e0 89 55 dc 83 7d dc 00 75 0? } | |
| $op3 | hex | { e8 a? fe ff ff 0f b6 45 f6 48 03 45 e8 0f b6 10 0f b6 45 f7 48 03 45 e8 0f b6 00 8d 04 02 } | |
| $op4 | hex | { c6 80 01 01 00 00 00 48 8b 45 c8 0f b6 90 01 01 00 00 48 8b 45 c8 88 90 00 01 00 00 c6 45 ef 00 0f b6 45 ef 88 45 ee } |
Condition
uint32( 0 ) == 0x464c457f and filesize > 10KB and filesize < 50KB and ( all of ( $op* ) )In plain words (Heuristic)
- The file must start with the ELF header — a Linux/Unix executable.
- The file must be smaller than 50KB (a cheap guard that skips large files).
- The file must be larger than 10KB.
- All patterns in ( $op* ) 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.
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: 1776ff6f-6fbb-4a81-bcad-c43b5117c67c
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-07-16
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-08-23
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-04-22
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-07-23
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-10-20
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-03-20
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-03-20
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-03-20