YARA · Mandiant red team tool countermeasures
FIREEYE_RT_Hacktool_PY_Impacketobfuscation_2
wmiexec
- Author
- FireEye
- Date
- 2020-12-01
- Modified
- 2020-12-09
- Score / Quality
- 75 / 75
What this rule detects
wmiexec
It defines 5 patterns (3 text, 0 hex, 2 regex).
Summary generated from the rule's metadata and condition.
Rule source
hacktool-py-impacketobfuscation-2.yarBSD 2-Clause License
rule FIREEYE_RT_Hacktool_PY_Impacketobfuscation_2
{
meta:
= "wmiexec"
= "FireEye"
= "f1059f66-eaff-5866-bafb-c94236cf96a0"
= "2020-12-01"
= "2020-12-01"
= "2020-12-09"
= "https://github.com/mandiant/red_team_tool_countermeasures/"
= "https://github.com/mandiant/red_team_tool_countermeasures//blob/3561b71724dbfa3e2bb78106aaa2d7f8b892c43b/rules/IMPACKETOBF (Wmiexec)/production/yara/HackTool_PY_ImpacketObfuscation_2.yar#L4-L21"
= "https://github.com/mandiant/red_team_tool_countermeasures//blob/3561b71724dbfa3e2bb78106aaa2d7f8b892c43b/LICENSE.txt"
= "f3dd8aa567a01098a8a610529d892485"
= "ccbbe507798f16c7acf0780770fdb81b2e7dc333ab8bc51e6216816276c3f14b"
= 75
= 75
= ""
= 2
strings:
$s1 = "import random"
$s2 = "class WMIEXEC" nocase
$s3 = "class RemoteShell" nocase
$s4 = /=[\x09\x20]{0,32}str\(int\(time\.time\(\)\)[\x09\x20]{0,32}-[\x09\x20]{0,32}random\.randint\(\d{1,10}[\x09\x20]{0,32},[\x09\x20]{0,32}\d{1,10}\)\)[\x09\x20]{0,32}\+[\x09\x20]{0,32}str\(uuid\.uuid4\(\)\)\.split\([\x22\x27]\-[\x22\x27]\)\[0\]/
$s5 = /self\.__shell[\x09\x20]{0,32}=[\x09\x20]{0,32}[\x22\x27]cmd.exe[\x09\x20]{1,32}\/q[\x09\x20]{1,32}\/K [\x22\x27]/ nocase
condition:
all of them
}
Strings (5 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "import random" | |
| $s2 | text | "class WMIEXEC" | nocase |
| $s3 | text | "class RemoteShell" | nocase |
| $s4 | regex | /=[\x09\x20]{0,32}str\(int\(time\.time\(\)\)[\x09\x20]{0,32}-[\x09\x20]{0,32}random\.randint\(\d{1,10}[\x09\x20]{0,32},[\x09\x20]{0,32}\d{1,10}\)\)[\x09\x20]{0, … | |
| $s5 | regex | /self\.__shell[\x09\x20]{0,32}=[\x09\x20]{0,32}[\x22\x27]cmd.exe[\x09\x20]{1,32}\/q[\x09\x20]{1,32}\/K [\x22\x27]/ | nocase |
Condition
all of themIn plain words (Heuristic)
- All 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.
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- f3dd8aa567a01098a8a610529d892485
Licence & attribution
Author: FireEye
Source repository: Mandiant red team tool countermeasures @ 3561b71724
Licence: BSD 2-Clause License (repository licence)
Copyright notice: Copyright (c) 2023, MANDIANT
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: f1059f66-eaff-5866-bafb-c94236cf96a0
Metadata
| rev | 2 |
|---|
Related rules
- Hack toolMandiant red team tool countermeasures· FireEye· 2020-12-08
- Hack toolMandiant red team tool countermeasures· FireEye· 2020-12-08
- Hack toolMandiant red team tool countermeasures· FireEye· 2020-11-25
- Hack toolMandiant red team tool countermeasures· FireEye· 2020-12-08
- Hack toolMandiant red team tool countermeasures· FireEye· 2020-12-01
- Hack toolMandiant red team tool countermeasures· FireEye· 2020-11-25
- Hack toolMandiant red team tool countermeasures· FireEye· 2020-11-25
- Hack toolMandiant red team tool countermeasures· FireEye· 2020-12-08