YARA · ditekSHen detection
DITEKSHEN_INDICATOR_TOOL_PET_Sharpwmi
Detects SharpWMI
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-09-25
- Score / Quality
- 75 / 73
What this rule detects
Detects SharpWMI
Targets: Windows PE.
It defines 8 patterns (8 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
indicator-tool-pet-sharpwmi.yarBSD 2-Clause License
rule DITEKSHEN_INDICATOR_TOOL_PET_Sharpwmi : FILE
{
meta:
= "Detects SharpWMI"
= "ditekSHen"
= "9c58d9fa-04b8-5a9c-8ae9-ff2e7530772f"
= "2020-11-06"
= "2024-09-25"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_tools.yar#L604-L619"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "e6c5764d0883e2882e06f07e4729362011a4d65614259b85978e1c6ef5cfadb7"
= 75
= 73
= "FILE"
strings:
$s1 = "scriptKillTimeout" fullword ascii
$s2 = "RemoteWMIExecuteWithOutput" fullword ascii
$s3 = "RemoteWMIFirewall" fullword ascii
$s4 = "iex([char[]](@({0})|%{{$_-bxor{1}}}) -join '')" fullword wide
$s5 = "\\\\{0}\\root\\subscription" fullword wide
$s6 = "_Context##RANDOM##" fullword wide
$s7 = "executevbs" fullword wide
$s8 = "scriptb64" fullword wide
condition:
uint16( 0 ) == 0x5a4d and 4 of them
}
Strings (8 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "scriptKillTimeout" | fullword ascii |
| $s2 | text | "RemoteWMIExecuteWithOutput" | fullword ascii |
| $s3 | text | "RemoteWMIFirewall" | fullword ascii |
| $s4 | text | "iex([char[]](@({0})|%{{$_-bxor{1}}}) -join '')" | fullword wide |
| $s5 | text | "\\\\{0}\\root\\subscription" | fullword wide |
| $s6 | text | "_Context##RANDOM##" | fullword wide |
| $s7 | text | "executevbs" | fullword wide |
| $s8 | text | "scriptb64" | fullword wide |
Condition
uint16( 0 ) == 0x5a4d and 4 of themIn plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- 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: 9c58d9fa-04b8-5a9c-8ae9-ff2e7530772f
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