YARA · ditekSHen detection
DITEKSHEN_INDICATOR_TOOL_EXP_Eternalblue
Detects Windows executables containing EternalBlue explitation artifacts
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-09-25
- Score / Quality
- 75 / 75
What this rule detects
Detects Windows executables containing EternalBlue explitation artifacts
Targets: Windows PE.
It defines 11 patterns (10 text, 0 hex, 1 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule DITEKSHEN_INDICATOR_TOOL_EXP_Eternalblue : FILE
{
meta:
= "Detects Windows executables containing EternalBlue explitation artifacts"
= "ditekSHen"
= "08173a1e-2e32-5add-864a-d92ffa0a3e44"
= "2020-11-06"
= "2024-09-25"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_tools.yar#L322-L342"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "63e56637118accb8c32c20e52465c027df2dbf83b3b663d316b453ce879572c8"
= 75
= 75
= "FILE"
strings:
$ci1 = "CNEFileIO_" ascii wide
$ci2 = "coli_" ascii wide
$ci3 = "mainWrapper" ascii wide
$dp1 = "EXPLOIT_SHELLCODE" ascii wide
$dp2 = "ETERNALBLUE_VALIDATE_BACKDOOR" ascii wide
$dp3 = "ETERNALBLUE_DOUBLEPULSAR_PRESENT" ascii wide
$dp4 = "//service[name='smb']/port" ascii wide
$dp5 = /DOUBLEPULSAR_(PROTOCOL_|ARCHITECTURE_|FUNCTION_|DLL_|PROCESS_|COMMAND_|IS_64_BIT)/
$cm1 = "--DllOrdinal 1 ProcessName lsass.exe --ProcessCommandLine --Protocol SMB --Architecture x64 --Function Rundll" ascii wide
$cm2 = "--DllOrdinal 1 ProcessName lsass.exe --ProcessCommandLine --Protocol SMB --Architecture x86 --Function Rundll" ascii wide
$cm3 = "--DaveProxyPort=0 --NetworkTimeout 30 --TargetPort 445 --VerifyTarget True --VerifyBackdoor True --MaxExploitAttempts 3 --GroomAllocations 12 --OutConfig" ascii wide
condition:
uint16( 0 ) == 0x5a4d and ( 2 of ( $ci* ) ) or ( 2 of ( $dp* ) ) or ( 1 of ( $dp* ) and 1 of ( $ci* ) ) or ( 1 of ( $cm* ) )
}
Strings (11 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $ci1 | text | "CNEFileIO_" | ascii wide |
| $ci2 | text | "coli_" | ascii wide |
| $ci3 | text | "mainWrapper" | ascii wide |
| $dp1 | text | "EXPLOIT_SHELLCODE" | ascii wide |
| $dp2 | text | "ETERNALBLUE_VALIDATE_BACKDOOR" | ascii wide |
| $dp3 | text | "ETERNALBLUE_DOUBLEPULSAR_PRESENT" | ascii wide |
| $dp4 | text | "//service[name='smb']/port" | ascii wide |
| $dp5 | regex | /DOUBLEPULSAR_(PROTOCOL_|ARCHITECTURE_|FUNCTION_|DLL_|PROCESS_|COMMAND_|IS_64_BIT)/ | |
| $cm1 | text | "--DllOrdinal 1 ProcessName lsass.exe --ProcessCommandLine --Protocol SMB --Architecture x64 --Function Rundll" | ascii wide |
| $cm2 | text | "--DllOrdinal 1 ProcessName lsass.exe --ProcessCommandLine --Protocol SMB --Architecture x86 --Function Rundll" | ascii wide |
| $cm3 | text | "--DaveProxyPort=0 --NetworkTimeout 30 --TargetPort 445 --VerifyTarget True --VerifyBackdoor True --MaxExploitAttempts 3 --GroomAllocations 12 --OutConfig" | ascii wide |
Condition
uint16( 0 ) == 0x5a4d and ( 2 of ( $ci* ) ) or ( 2 of ( $dp* ) ) or ( 1 of ( $dp* ) and 1 of ( $ci* ) ) or ( 1 of ( $cm* ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 2 patterns in ( $ci* ) must match.
- At least 2 patterns in ( $dp* ) must match.
- At least 1 patterns in ( $dp* ) must match.
- At least 1 patterns in ( $ci* ) must match.
- At least 1 patterns in ( $cm* ) 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: 08173a1e-2e32-5add-864a-d92ffa0a3e44
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