YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Wshratplugin
WSHRAT keylogger plugin payload
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
WSHRAT keylogger plugin payload
Associated malware family: Wshratplugin.
Targets: Windows PE.
It defines 8 patterns (8 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
malware-win-wshratplugin.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Wshratplugin : FILE
{
meta:
= "WSHRAT keylogger plugin payload"
= "ditekSHen"
= "45c4fc87-6c45-5cd7-9fc4-7d3ea664a740"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L1668-L1685"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "3feeab43b58b533b7d2d41a71f2107e6f05b9c54ff805607843d253cadbe9384"
= 75
= 75
= "FILE"
= "920010-920012"
= "MALWARE.Win.Trojan.WSHRAT-KLG"
strings:
$s1 = "GET /open-keylogger HTTP/1.1" fullword wide
$s2 = "KeyboardChange: nCode={0}, wParam={1}, vkCode={2}, scanCode={3}, flags={4}, dwExtraInfo={6}" wide
$s3 = "MouseChange: nCode={0}, wParam={1}, x={2}, y={3}, mouseData={4}, flags={5}, dwExtraInfo={7}" wide
$s4 = "sendKeyLog" fullword ascii
$s5 = "saveKeyLog" fullword ascii
$s6 = "get_TotalKeyboardClick" fullword ascii
$s7 = "get_SessionMouseClick" fullword ascii
$pdb = "\\Android\\documents\\visual studio 2010\\Projects\\Keylogger\\Keylogger\\obj\\x86\\Debug\\Keylogger.pdb" ascii
condition:
uint16( 0 ) == 0x5a4d and filesize < 100KB and 4 of them
}
Strings (8 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "GET /open-keylogger HTTP/1.1" | fullword wide |
| $s2 | text | "KeyboardChange: nCode={0}, wParam={1}, vkCode={2}, scanCode={3}, flags={4}, dwExtraInfo={6}" | wide |
| $s3 | text | "MouseChange: nCode={0}, wParam={1}, x={2}, y={3}, mouseData={4}, flags={5}, dwExtraInfo={7}" | wide |
| $s4 | text | "sendKeyLog" | fullword ascii |
| $s5 | text | "saveKeyLog" | fullword ascii |
| $s6 | text | "get_TotalKeyboardClick" | fullword ascii |
| $s7 | text | "get_SessionMouseClick" | fullword ascii |
| $pdb | text | "\\Android\\documents\\visual studio 2010\\Projects\\Keylogger\\Keylogger\\obj\\x86\\Debug\\Keylogger.pdb" | ascii |
Condition
uint16( 0 ) == 0x5a4d and filesize < 100KB and 4 of themIn plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- The file must be smaller than 100KB (a cheap guard that skips large files).
- At least 4 patterns in the rule 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: 45c4fc87-6c45-5cd7-9fc4-7d3ea664a740
Metadata
| snort_sid | 920010-920012 |
|---|---|
| clamav_sig | MALWARE.Win.Trojan.WSHRAT-KLG |
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