YARA · ditekSHen detection
DITEKSHEN_MALWARE_Linux_Getshell
Detect GetShell Linux backdoor
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
Detect GetShell Linux backdoor
Associated malware family: Getshell.
It defines 12 patterns (12 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
malware-linux-getshell.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Linux_Getshell : FILE
{
meta:
= "Detect GetShell Linux backdoor"
= "ditekSHen"
= "cccad93d-cd49-5237-96ac-66c9ac6ef532"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L10705-L10725"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "9d44ad2a3c270eed0e905402e8c32dcca54da90f4229d9d59874ee09b3b47277"
= 75
= 75
= "FILE"
= "MALWARE.Linux.Trojan.GetShell"
strings:
$x1 = "cat <(echo '@reboot echo socks5_backconnect" ascii
$x2 = "(cd && )') <(sed '/socks5_backconnect" ascii
$s1 = "cat <(echo '@" ascii
$s2 = "(cd && )') <(sed '" ascii
$s3 = "PORT1:" ascii
$s4 = "HOST1:" ascii
$s5 = "queryheader" ascii
$s6 = "qsectionpost" ascii
$s7 = "packedip" ascii
$s8 = "copydata" ascii
$s9 = "synsend" ascii
$s10 = "bc_connect" ascii
condition:
uint16( 0 ) == 0x457f and ( ( all of ( $x* ) and 1 of ( $s* ) ) or 5 of ( $s* ) )
}
Strings (12 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $x1 | text | "cat <(echo '@reboot echo socks5_backconnect" | ascii |
| $x2 | text | "(cd && )') <(sed '/socks5_backconnect" | ascii |
| $s1 | text | "cat <(echo '@" | ascii |
| $s2 | text | "(cd && )') <(sed '" | ascii |
| $s3 | text | "PORT1:" | ascii |
| $s4 | text | "HOST1:" | ascii |
| $s5 | text | "queryheader" | ascii |
| $s6 | text | "qsectionpost" | ascii |
| $s7 | text | "packedip" | ascii |
| $s8 | text | "copydata" | ascii |
| $s9 | text | "synsend" | ascii |
| $s10 | text | "bc_connect" | ascii |
Condition
uint16( 0 ) == 0x457f and ( ( all of ( $x* ) and 1 of ( $s* ) ) or 5 of ( $s* ) )In plain words (Heuristic)
- All patterns in ( $x* ) must match.
- At least 1 patterns in ( $s* ) must match.
- At least 5 patterns in ( $s* ) 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.
References
Licence & attribution
Author: ditekSHen
Source repository: ditekSHen detection @ e76c93dcde
Licence: BSD 2-Clause License (repository licence)
Copyright notice: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: cccad93d-cd49-5237-96ac-66c9ac6ef532
Metadata
| clamav1 | MALWARE.Linux.Trojan.GetShell |
|---|
Tags:FILE
Related rules
- RUSSIANPANDA_GetshellpluginMetadata onlyMalwareRussianPanda· RussianPanda· 2025-12-31
- MalwareditekSHen detection· ditekSHen· 2034-02-17
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06