YARA · ditekSHen detection
DITEKSHEN_INDICATOR_TOOL_LTM_Sharpexec
Detects SharpExec lateral movement tool
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-09-25
- Score / Quality
- 75 / 73
What this rule detects
Detects SharpExec lateral movement tool
Targets: Windows PE.
It defines 12 patterns (8 text, 0 hex, 4 regex).
Summary generated from the rule's metadata and condition.
Rule source
indicator-tool-ltm-sharpexec.yarBSD 2-Clause License
rule DITEKSHEN_INDICATOR_TOOL_LTM_Sharpexec : FILE
{
meta:
= "Detects SharpExec lateral movement tool"
= "ditekSHen"
= "4373a052-9525-5b24-81a4-65cd68afcb6c"
= "2020-11-06"
= "2024-09-25"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_tools.yar#L256-L275"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "17ae5c9f0b22e8ecbbbcbe052e466d00cb7b62cff423688b5138209c52f0698d"
= 75
= 73
= "FILE"
strings:
$s1 = "fileUploaded" fullword ascii
$s2 = "$7fbad126-e21c-4c4e-a9f0-613fcf585a71" fullword ascii
$s3 = "DESKTOP_HOOKCONTROL" fullword ascii
$s4 = /WINSTA_(ACCESSCLIPBOARD|WINSTA_ALL_ACCESS)/ fullword ascii
$s5 = /NETBIND(ADD|DISABLE|ENABLE|REMOVE)/ fullword ascii
$s6 = /SERVICE_(ALL_ACCESS|WIN32_OWN_PROCESS|INTERROGATE)/ fullword ascii
$s7 = /(Sharp|PS|smb)Exec/ fullword ascii
$s8 = "lpszPassword" fullword ascii
$s9 = "lpszDomain" fullword ascii
$s10 = "wmiexec" fullword ascii
$s11 = "\\C$\\__LegitFile" wide
$s12 = "LOGON32_LOGON_NEW_CREDENTIALS" fullword ascii
condition:
( uint16( 0 ) == 0x5a4d and 9 of them ) or ( all of them )
}
Strings (12 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "fileUploaded" | fullword ascii |
| $s2 | text | "$7fbad126-e21c-4c4e-a9f0-613fcf585a71" | fullword ascii |
| $s3 | text | "DESKTOP_HOOKCONTROL" | fullword ascii |
| $s4 | regex | /WINSTA_(ACCESSCLIPBOARD|WINSTA_ALL_ACCESS)/ | fullword ascii |
| $s5 | regex | /NETBIND(ADD|DISABLE|ENABLE|REMOVE)/ | fullword ascii |
| $s6 | regex | /SERVICE_(ALL_ACCESS|WIN32_OWN_PROCESS|INTERROGATE)/ | fullword ascii |
| $s7 | regex | /(Sharp|PS|smb)Exec/ | fullword ascii |
| $s8 | text | "lpszPassword" | fullword ascii |
| $s9 | text | "lpszDomain" | fullword ascii |
| $s10 | text | "wmiexec" | fullword ascii |
| $s11 | text | "\\C$\\__LegitFile" | wide |
| $s12 | text | "LOGON32_LOGON_NEW_CREDENTIALS" | fullword ascii |
Condition
( uint16( 0 ) == 0x5a4d and 9 of them ) or ( all of them )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- All patterns in the rule must match.
- At least 9 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: 4373a052-9525-5b24-81a4-65cd68afcb6c
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