YARA · ditekSHen detection
DITEKSHEN_INDICATOR_TOOL_ENUM_Sharpshares
Detects SharpShares multithreaded C# .NET Assembly to enumerate accessible network shares in a domain
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-09-25
- Score / Quality
- 75 / 75
What this rule detects
Detects SharpShares multithreaded C# .NET Assembly to enumerate accessible network shares in a domain
Targets: Windows PE.
It defines 8 patterns (7 text, 0 hex, 1 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule DITEKSHEN_INDICATOR_TOOL_ENUM_Sharpshares : FILE
{
meta:
= "Detects SharpShares multithreaded C# .NET Assembly to enumerate accessible network shares in a domain"
= "ditekSHen"
= "1da53e34-21a3-5b3c-885e-dcc8814ac3c8"
= "2020-11-06"
= "2024-09-25"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_tools.yar#L1290-L1305"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "8b35d6a692814e1b27ffc1db4ab124bf621c156aaf57f24796c422ec95a85715"
= 75
= 75
= "FILE"
strings:
$s1 = "SharpShares." ascii wide
$s2 = "GetComputerShares" fullword ascii
$s3 = "userAccountControl:1.2.840.113556.1.4.803:=2))(operatingSystem=*server*)(!(userAccountControl:1.2" wide
$s4 = "GetAllShares" fullword ascii
$s5 = "stealth:" wide
$s6 = "(&(objectCategory=computer)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(operatingSystem=*server*))" fullword wide
$s7 = /\/targets|ldap|threads/ wide
$s8 = "entriesread" fullword ascii
condition:
uint16( 0 ) == 0x5a4d and 4 of them
}
Strings (8 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "SharpShares." | ascii wide |
| $s2 | text | "GetComputerShares" | fullword ascii |
| $s3 | text | "userAccountControl:1.2.840.113556.1.4.803:=2))(operatingSystem=*server*)(!(userAccountControl:1.2" | wide |
| $s4 | text | "GetAllShares" | fullword ascii |
| $s5 | text | "stealth:" | wide |
| $s6 | text | "(&(objectCategory=computer)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(operatingSystem=*server*))" | fullword wide |
| $s7 | regex | /\/targets|ldap|threads/ | wide |
| $s8 | text | "entriesread" | fullword ascii |
Condition
uint16( 0 ) == 0x5a4d and 4 of themIn plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 4 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.
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: 1da53e34-21a3-5b3c-885e-dcc8814ac3c8
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