YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Bandook
Detects Bandook backdoor
- Author
- ditekshen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
Detects Bandook backdoor
Associated malware family: Bandook.
Targets: Windows PE.
It defines 19 patterns (19 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
malware-win-bandook.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Bandook : FILE
{
meta:
= "Detects Bandook backdoor"
= "ditekshen"
= "c74bd688-c79e-5939-93a8-c2cd9f2cd60e"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L2676-L2705"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "bff09f769aae890d81efe9926cc8ce85c1caa4eeeb6bc7d2321d2d906ac8d6cf"
= 75
= 75
= "FILE"
= "MALWARE.Win.Trojan.Bandook"
strings:
$s1 = "\"%sLib\\dpx.pyc\" \"%ws\" \"%ws\" \"%ws\" \"%ws\" \"%ws\"" fullword wide
$s2 = "%s\\usd\\dv-%s.dat" fullword ascii
$s3 = "%sprd.dat" fullword ascii
$s4 = "%sfile\\shell\\open\\command" fullword ascii
$s5 = "explorer.exe , %s" fullword ascii
$f1 = "CaptureScreen" fullword ascii
$f2 = "StartShell" fullword ascii
$f3 = "ClearCred" fullword ascii
$f4 = "GrabFileFromDevice" fullword ascii
$f5 = "PutFileOnDevice" fullword ascii
$f6 = "ChromeInject" fullword ascii
$f7 = "StartFileMonitor" fullword ascii
$f8 = "DisableMouseCapture" fullword ascii
$f9 = "StealUSB" fullword ascii
$f10 = "DDOSON" fullword ascii
$f11 = "InstallMac" fullword ascii
$f12 = "SendCam" fullword ascii
$x1 = "RTC-TGUBP" fullword ascii
$x2 = "AVE_MARIA" fullword ascii
condition:
uint16( 0 ) == 0x5a4d and ( all of ( $s* ) or 6 of ( $f* ) or ( 2 of ( $s* ) and 3 of ( $f* ) ) or ( all of ( $x* ) and ( 2 of ( $f* ) or 3 of ( $s* ) ) ) )
}
Strings (19 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "\"%sLib\\dpx.pyc\" \"%ws\" \"%ws\" \"%ws\" \"%ws\" \"%ws\"" | fullword wide |
| $s2 | text | "%s\\usd\\dv-%s.dat" | fullword ascii |
| $s3 | text | "%sprd.dat" | fullword ascii |
| $s4 | text | "%sfile\\shell\\open\\command" | fullword ascii |
| $s5 | text | "explorer.exe , %s" | fullword ascii |
| $f1 | text | "CaptureScreen" | fullword ascii |
| $f2 | text | "StartShell" | fullword ascii |
| $f3 | text | "ClearCred" | fullword ascii |
| $f4 | text | "GrabFileFromDevice" | fullword ascii |
| $f5 | text | "PutFileOnDevice" | fullword ascii |
| $f6 | text | "ChromeInject" | fullword ascii |
| $f7 | text | "StartFileMonitor" | fullword ascii |
| $f8 | text | "DisableMouseCapture" | fullword ascii |
| $f9 | text | "StealUSB" | fullword ascii |
| $f10 | text | "DDOSON" | fullword ascii |
| $f11 | text | "InstallMac" | fullword ascii |
| $f12 | text | "SendCam" | fullword ascii |
| $x1 | text | "RTC-TGUBP" | fullword ascii |
| $x2 | text | "AVE_MARIA" | fullword ascii |
Condition
uint16( 0 ) == 0x5a4d and ( all of ( $s* ) or 6 of ( $f* ) or ( 2 of ( $s* ) and 3 of ( $f* ) ) or ( all of ( $x* ) and ( 2 of ( $f* ) or 3 of ( $s* ) ) ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- All patterns in ( $s* ) must match.
- All patterns in ( $x* ) must match.
- At least 6 patterns in ( $f* ) must match.
- At least 2 patterns in ( $s* ) must match.
- At least 3 patterns in ( $f* ) must match.
- At least 2 patterns in ( $f* ) must match.
- At least 3 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: c74bd688-c79e-5939-93a8-c2cd9f2cd60e
Metadata
| clamav_sig | MALWARE.Win.Trojan.Bandook |
|---|
Tags:FILE
Related rules
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04
- 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
- MalwareditekSHen detection· ditekshen· 2020-11-06