YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Pcrat
Detects PCRat / Gh0st
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
Detects PCRat / Gh0st
Associated malware family: Pcrat.
Targets: Windows PE.
It defines 20 patterns (20 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
malware-win-pcrat.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Pcrat : FILE
{
meta:
= "Detects PCRat / Gh0st"
= "ditekSHen"
= "de5b3e08-16da-56e2-a0a4-d8bed5840804"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L8534-L8561"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "ad56d7d6a2bb6d09bc4530c31b51456b6bbca5def1810449fd2a31973cce18f8"
= 75
= 75
= "FILE"
strings:
$s1 = "ClearEventLogA" fullword ascii
$s2 = "NetUserAdd" fullword ascii
$s3 = "<H1>403 Forbidden</H1>" fullword ascii
$s4 = ":]%d-%d-%d %d:%d:%d" fullword ascii
$s5 = "Mozilla/4.0 (compatible)" fullword ascii
$s6 = "<Enter>" fullword ascii
$s7 = "\\cmd.exe" fullword ascii
$s8 = "Program Files\\Internet Explorer\\IEXPLORE.EXE" fullword ascii
$s9 = "Collegesoft ScenicPlayer" fullword wide
$a1 = "360tray.exe" fullword ascii
$a2 = "avp.exe" fullword ascii
$a3 = "RavMonD.exe" fullword ascii
$a4 = "360sd.exe" fullword ascii
$a5 = "Mcshield.exe" fullword ascii
$a6 = "egui.exe" fullword ascii
$a7 = "kxetray.exe" fullword ascii
$a8 = "knsdtray.exe" fullword ascii
$a9 = "TMBMSRV.exe" fullword ascii
$a10 = "avcenter.exe" fullword ascii
$a11 = "ashDisp.exe" fullword ascii
condition:
uint16( 0 ) == 0x5a4d and 5 of ( $s* ) and 6 of ( $a* )
}
Strings (20 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "ClearEventLogA" | fullword ascii |
| $s2 | text | "NetUserAdd" | fullword ascii |
| $s3 | text | "<H1>403 Forbidden</H1>" | fullword ascii |
| $s4 | text | ":]%d-%d-%d %d:%d:%d" | fullword ascii |
| $s5 | text | "Mozilla/4.0 (compatible)" | fullword ascii |
| $s6 | text | "<Enter>" | fullword ascii |
| $s7 | text | "\\cmd.exe" | fullword ascii |
| $s8 | text | "Program Files\\Internet Explorer\\IEXPLORE.EXE" | fullword ascii |
| $s9 | text | "Collegesoft ScenicPlayer" | fullword wide |
| $a1 | text | "360tray.exe" | fullword ascii |
| $a2 | text | "avp.exe" | fullword ascii |
| $a3 | text | "RavMonD.exe" | fullword ascii |
| $a4 | text | "360sd.exe" | fullword ascii |
| $a5 | text | "Mcshield.exe" | fullword ascii |
| $a6 | text | "egui.exe" | fullword ascii |
| $a7 | text | "kxetray.exe" | fullword ascii |
| $a8 | text | "knsdtray.exe" | fullword ascii |
| $a9 | text | "TMBMSRV.exe" | fullword ascii |
| $a10 | text | "avcenter.exe" | fullword ascii |
| $a11 | text | "ashDisp.exe" | fullword ascii |
Condition
uint16( 0 ) == 0x5a4d and 5 of ( $s* ) and 6 of ( $a* )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 5 patterns in ( $s* ) must match.
- At least 6 patterns in ( $a* ) 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: de5b3e08-16da-56e2-a0a4-d8bed5840804
Tags:FILE
Related rules
- 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
- MalwareditekSHen detection· ditekSHen· 2020-11-06