YARA · SEKOIA.IO Community
SEKOIA_Hacktool_Impacket_Compiled_Binary
Detects generic PE embbeding impacket
- Author
- Sekoia.io
- Date
- 2022-02-28
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detects generic PE embbeding impacket
Targets: Windows PE.
It defines 20 patterns (20 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
hacktool-impacket-compiled-binary.yarDetection Rule License 1.1
rule SEKOIA_Hacktool_Impacket_Compiled_Binary : FILE
{
meta:
= "Detects generic PE embbeding impacket"
= "Sekoia.io"
= "43936dcc-0d74-43dd-996a-c27a28cef283"
= "2022-02-28"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/hacktool_impacket_compiled_binary.yar#L1-L36"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "133f9d0103774701894ea884bc2c52840b405fa21acb9ebab615816ec411b0bf"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$i1 = "impacket.crypto" fullword
$i2 = "impacket.dcerpc" fullword
$i3 = "impacket.ese" fullword
$i4 = "impacket.hresult_errors" fullword
$i5 = "impacket.krb5" fullword
$i6 = "impacket.nmb" fullword
$i7 = "impacket.nt_errors" fullword
$i8 = "impacket.ntlm" fullword
$i9 = "impacket.smb" fullword
$i10 = "impacket.smb3" fullword
$i11 = "impacket.smb3structs" fullword
$i12 = "impacket.smbconnection" fullword
$i13 = "impacket.spnego" fullword
$i14 = "impacket.structure" fullword
$i15 = "impacket.system_errors" fullword
$i16 = "impacket.tds" fullword
$i17 = "impacket.uuid" fullword
$i18 = "impacket.version" fullword
$i19 = "impacket.winregistry" fullword
$py = "PYZ-00.pyz"
condition:
uint16be( 0 ) == 0x4d5a and filesize > 1MB and 3 of ( $i* ) and $py
}
Strings (20 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $i1 | text | "impacket.crypto" | fullword |
| $i2 | text | "impacket.dcerpc" | fullword |
| $i3 | text | "impacket.ese" | fullword |
| $i4 | text | "impacket.hresult_errors" | fullword |
| $i5 | text | "impacket.krb5" | fullword |
| $i6 | text | "impacket.nmb" | fullword |
| $i7 | text | "impacket.nt_errors" | fullword |
| $i8 | text | "impacket.ntlm" | fullword |
| $i9 | text | "impacket.smb" | fullword |
| $i10 | text | "impacket.smb3" | fullword |
| $i11 | text | "impacket.smb3structs" | fullword |
| $i12 | text | "impacket.smbconnection" | fullword |
| $i13 | text | "impacket.spnego" | fullword |
| $i14 | text | "impacket.structure" | fullword |
| $i15 | text | "impacket.system_errors" | fullword |
| $i16 | text | "impacket.tds" | fullword |
| $i17 | text | "impacket.uuid" | fullword |
| $i18 | text | "impacket.version" | fullword |
| $i19 | text | "impacket.winregistry" | fullword |
| $py | text | "PYZ-00.pyz" |
Condition
uint16be( 0 ) == 0x4d5a and filesize > 1MB and 3 of ( $i* ) and $pyIn plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- The file must be larger than 1MB.
- At least 3 patterns in ( $i* ) must match.
- Pattern $py must be present.
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: Sekoia.io
Source repository: SEKOIA.IO Community @ a438a5901a
Licence: Detection Rule License 1.1 (repository licence)
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: 43936dcc-0d74-43dd-996a-c27a28cef283
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- Hack toolSEKOIA.IO Community· Sekoia.io· 2024-09-06
- Hack toolSEKOIA.IO Community· Sekoia.io· 2024-02-29
- Hack toolSEKOIA.IO Community· Sekoia.io· 2023-12-05
- Hack toolSEKOIA.IO Community· Sekoia.io· 2023-11-15
- Hack toolSEKOIA.IO Community· Sekoia.io· 2023-08-23
- Hack toolSEKOIA.IO Community· Sekoia.io· 2022-02-08
- Hack toolSEKOIA.IO Community· Sekoia.io· 2022-07-22
- Hack toolSEKOIA.IO Community· Sekoia.io· 2022-09-09