YARA · ditekSHen detection
DITEKSHEN_INDICATOR_TOOL_PWS_Credstealer
Detects Python executable for stealing credentials including domain environments. Observed in MuddyWater.
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-09-25
- Score / Quality
- 75 / 75
What this rule detects
Detects Python executable for stealing credentials including domain environments. Observed in MuddyWater.
Targets: Windows PE.
It defines 12 patterns (12 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule DITEKSHEN_INDICATOR_TOOL_PWS_Credstealer : FILE
{
meta:
= "Detects Python executable for stealing credentials including domain environments. Observed in MuddyWater."
= "ditekSHen"
= "ab587b12-f3e1-5f08-b27c-03ee9752e513"
= "2020-11-06"
= "2024-09-25"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_tools.yar#L22-L41"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "e729c8b0b1db642acabbc4590833c05ce81447bb89e5f40aea5f0b8ebdee4438"
= 75
= 75
= "FILE"
strings:
$s1 = "PYTHON27.DLL" fullword wide
$s2 = "C:\\Python27\\lib\\site-packages\\py2exe\\boot_common.pyR" fullword ascii
$s3 = "C:\\Python27\\lib\\site-packages\\py2exe\\boot_common.pyt" fullword ascii
$s4 = "subprocess.pyc" fullword ascii
$s5 = "MyGetProcAddress(%p, %p(%s)) -> %p" fullword ascii
$p1 = "Dump SAM hashes from target systemss" fullword ascii
$p2 = "Dump LSA secrets from target systemss" fullword ascii
$p3 = "Dump the NTDS.dit from target DCs using the specifed method" fullword ascii
$p4 = "Dump NTDS.dit password historys" fullword ascii
$p5 = "Use Kerberos authentication. Grabs credentials from ccache file (KRB5CCNAME) based on target parameterss" fullword ascii
$p6 = "Retrieve plaintext passwords and other information for accounts pushed through Group Policy Preferencess" fullword ascii
$p7 = "Combo file containing a list of domain\\username:password or username:password entriess" fullword ascii
condition:
uint16( 0 ) == 0x5a4d and ( 3 of ( $s* ) and 1 of ( $p* ) )
}
Strings (12 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "PYTHON27.DLL" | fullword wide |
| $s2 | text | "C:\\Python27\\lib\\site-packages\\py2exe\\boot_common.pyR" | fullword ascii |
| $s3 | text | "C:\\Python27\\lib\\site-packages\\py2exe\\boot_common.pyt" | fullword ascii |
| $s4 | text | "subprocess.pyc" | fullword ascii |
| $s5 | text | "MyGetProcAddress(%p, %p(%s)) -> %p" | fullword ascii |
| $p1 | text | "Dump SAM hashes from target systemss" | fullword ascii |
| $p2 | text | "Dump LSA secrets from target systemss" | fullword ascii |
| $p3 | text | "Dump the NTDS.dit from target DCs using the specifed method" | fullword ascii |
| $p4 | text | "Dump NTDS.dit password historys" | fullword ascii |
| $p5 | text | "Use Kerberos authentication. Grabs credentials from ccache file (KRB5CCNAME) based on target parameterss" | fullword ascii |
| $p6 | text | "Retrieve plaintext passwords and other information for accounts pushed through Group Policy Preferencess" | fullword ascii |
| $p7 | text | "Combo file containing a list of domain\\username:password or username:password entriess" | fullword ascii |
Condition
uint16( 0 ) == 0x5a4d and ( 3 of ( $s* ) and 1 of ( $p* ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 3 patterns in ( $s* ) must match.
- At least 1 patterns in ( $p* ) 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.
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: ab587b12-f3e1-5f08-b27c-03ee9752e513
Tags:FILE
Related rules
- Suspicious / huntingditekSHen detection· ditekSHen· 2023-08-22
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21