YARA · Mandiant red team tool countermeasures
FIREEYE_RT_Hacktool_PY_Impacketobfuscation_1
smbexec
- Author
- FireEye
- Date
- 2020-12-01
- Modified
- 2020-12-09
- Score / Quality
- 75 / 75
What this rule detects
smbexec
It defines 6 patterns (4 text, 0 hex, 2 regex).
Summary generated from the rule's metadata and condition.
Rule source
hacktool-py-impacketobfuscation-1.yarBSD 2-Clause License
rule FIREEYE_RT_Hacktool_PY_Impacketobfuscation_1
{
meta:
= "smbexec"
= "FireEye"
= "992d1132-3136-5e1b-a1ef-dcdf36ebf0f5"
= "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 (Smbexec)/production/yara/HackTool_PY_ImpacketObfuscation_1.yar#L4-L22"
= "https://github.com/mandiant/red_team_tool_countermeasures//blob/3561b71724dbfa3e2bb78106aaa2d7f8b892c43b/LICENSE.txt"
= "0b1e512afe24c31531d6db6b47bac8ee"
= "45a4c0426b29b8c8bede9c4e8292131da7e756d48fc3ac4a07d08fd52383d21e"
= 75
= 75
= ""
= 1
strings:
$s1 = "class CMDEXEC" nocase
$s2 = "class RemoteShell" nocase
$s3 = "self.services_names"
$s4 = "import random"
$s6 = /self\.__shell[\x09\x20]{0,32}=[\x09\x20]{0,32}[\x22\x27]%CoMSpEC%[\x09\x20]{1,32}\/q[\x09\x20]{1,32}\/K [\x22\x27]/ nocase
$s7 = /self\.__serviceName[\x09\x20]{0,32}=[\x09\x20]{0,32}self\.services_names\[random\.randint\([\x09\x20]{0,32}0[\x09\x20]{0,32},[\x09\x20]{0,32}len\(self\.services_names\)[\x09\x20]{0,32}-[\x09\x20]{0,32}1\)\]/
condition:
all of them
}
Strings (6 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "class CMDEXEC" | nocase |
| $s2 | text | "class RemoteShell" | nocase |
| $s3 | text | "self.services_names" | |
| $s4 | text | "import random" | |
| $s6 | regex | /self\.__shell[\x09\x20]{0,32}=[\x09\x20]{0,32}[\x22\x27]%CoMSpEC%[\x09\x20]{1,32}\/q[\x09\x20]{1,32}\/K [\x22\x27]/ | nocase |
| $s7 | regex | /self\.__serviceName[\x09\x20]{0,32}=[\x09\x20]{0,32}self\.services_names\[random\.randint\([\x09\x20]{0,32}0[\x09\x20]{0,32},[\x09\x20]{0,32}len\(self\.service … |
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).
- 0b1e512afe24c31531d6db6b47bac8ee
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: 992d1132-3136-5e1b-a1ef-dcdf36ebf0f5
Metadata
| rev | 1 |
|---|
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