YARA · ditekSHen detection
DITEKSHEN_INDICATOR_TOOL_Sharpsqlpwn
Detects SharpSQLPwn
- Author
- ditekshen
- Date
- 2020-11-06
- Modified
- 2024-09-25
- Score / Quality
- 75 / 75
What this rule detects
Detects SharpSQLPwn
Targets: Windows PE.
It defines 10 patterns (10 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
indicator-tool-sharpsqlpwn.yarBSD 2-Clause License
rule DITEKSHEN_INDICATOR_TOOL_Sharpsqlpwn : FILE
{
meta:
= "Detects SharpSQLPwn"
= "ditekshen"
= "f99c0ddb-a073-5c15-9a7c-60f6766cd0a2"
= "2020-11-06"
= "2024-09-25"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_tools.yar#L1874-L1891"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "c811d4926c433c6521f4bbe03a1abf4a5b27b56931a18a8bb672f37fe4fccfb8"
= 75
= 75
= "FILE"
strings:
$s1 = "smb_ip" fullword ascii
$s2 = "Recon" fullword ascii
$s3 = "UNCPathInjection" fullword ascii
$s4 = "from sys.server_principals" wide
$s5 = "EXEC sp_configure '" wide
$s6 = "EXEC ('sp_configure" wide
$s7 = "CREATE ASSEMBLY" wide
$s8 = "DROP ASSEMBLY" wide
$s9 = "FROM 0x" wide
$s10 = "EXEC master..xp_dirtree \"\\\\" wide
condition:
uint16( 0 ) == 0x5a4d and 7 of them
}
Strings (10 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "smb_ip" | fullword ascii |
| $s2 | text | "Recon" | fullword ascii |
| $s3 | text | "UNCPathInjection" | fullword ascii |
| $s4 | text | "from sys.server_principals" | wide |
| $s5 | text | "EXEC sp_configure '" | wide |
| $s6 | text | "EXEC ('sp_configure" | wide |
| $s7 | text | "CREATE ASSEMBLY" | wide |
| $s8 | text | "DROP ASSEMBLY" | wide |
| $s9 | text | "FROM 0x" | wide |
| $s10 | text | "EXEC master..xp_dirtree \"\\\\" | wide |
Condition
uint16( 0 ) == 0x5a4d and 7 of themIn plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 7 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: f99c0ddb-a073-5c15-9a7c-60f6766cd0a2
Tags:FILE
Related rules
- Suspicious / huntingditekSHen detection· ditekshen· 2020-11-06
- Suspicious / huntingditekSHen detection· ditekshen· 2020-11-06
- Suspicious / huntingditekSHen detection· ditekshen· 2020-11-06
- Suspicious / huntingditekSHen detection· ditekshen· 2020-11-06
- MalwareditekSHen detection· ditekshen· 2020-11-06
- MalwareditekSHen detection· ditekshen· 2020-11-06
- MalwareditekSHen detection· ditekshen· 2020-11-06
- MalwareditekSHen detection· ditekshen· 2020-11-06