YARA · SEKOIA.IO Community
SEKOIA_Bot_Lin_Enemybot_April22
Detect enemybot based on command line observed in strings
- Author
- Sekoia.io
- Date
- 2022-04-14
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detect enemybot based on command line observed in strings
Targets: Linux ELF, macOS Mach-O.
It defines 9 patterns (9 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
bot-lin-enemybot-april22.yarDetection Rule License 1.1
rule SEKOIA_Bot_Lin_Enemybot_April22 : FILE
{
meta:
= "Detect enemybot based on command line observed in strings"
= "Sekoia.io"
= "5778c653-39ce-4f5d-b10b-1503b74e5041"
= "2022-04-14"
= "2024-12-19"
= "https://twitter.com/3xp0rtblog/status/137520616938452173://www.fortinet.com/blog/threat-research/enemybot-a-look-into-keksecs-latest-ddos-botnet"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/bot_lin_enemybot_april22.yar#L1-L26"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "18ea06e60259f8d7d639b0e4659f0f5e166e9589d617f5766c06968af5e56aa6"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$cmd0 = "wget http://%s/update.sh" ascii
$cmd1 = "busybox wget http://%s/update.sh" ascii
$cmd2 = "curl http://%s/update.sh" ascii
$cmd3 = "chmod 777 update.sh" ascii
$cmd4 = "rm -rf update.sh" ascii
$str0 = "ENEMEYBOT" ascii xor
$str1 = "KEKSEC" ascii xor
$str2 = "/tmp/.pwned" ascii xor
$str3 = "echo -e \"\x65\x6e\x65\x6d\x79"
condition:
( uint32( 0 ) == 0x464c457f or uint32( 0 ) == 0xfeedfacf ) and ( 4 of ( $cmd* ) or 2 of ( $str* ) )
}
Strings (9 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $cmd0 | text | "wget http://%s/update.sh" | ascii |
| $cmd1 | text | "busybox wget http://%s/update.sh" | ascii |
| $cmd2 | text | "curl http://%s/update.sh" | ascii |
| $cmd3 | text | "chmod 777 update.sh" | ascii |
| $cmd4 | text | "rm -rf update.sh" | ascii |
| $str0 | text | "ENEMEYBOT" | ascii xor |
| $str1 | text | "KEKSEC" | ascii xor |
| $str2 | text | "/tmp/.pwned" | ascii xor |
| $str3 | text | "echo -e \"\x65\x6e\x65\x6d\x79" |
Condition
( uint32( 0 ) == 0x464c457f or uint32( 0 ) == 0xfeedfacf ) and ( 4 of ( $cmd* ) or 2 of ( $str* ) )In plain words (Heuristic)
- The file must start with the ELF header — a Linux/Unix executable.
- The file must start with a Mach-O / fat binary magic — a macOS executable.
- At least 4 patterns in ( $cmd* ) must match.
- At least 2 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.
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: 5778c653-39ce-4f5d-b10b-1503b74e5041
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-10
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-27
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-27
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-23
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-06-11
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-03-06