YARA · Cod3nym detection-rules
COD3NYM_SUSP_NET_Shellcode_Loader_Indicators_Jan24
Detects indicators of shellcode loaders in .NET binaries
- Author
- Jonathan Peters
- Date
- 2024-01-11
- Modified
- 2024-01-12
- Score / Quality
- 65 / 80
What this rule detects
Detects indicators of shellcode loaders in .NET binaries
Targets: Windows PE.
It defines 7 patterns (7 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule COD3NYM_SUSP_NET_Shellcode_Loader_Indicators_Jan24 : FILE
{
meta:
= "Detects indicators of shellcode loaders in .NET binaries"
= "Jonathan Peters"
= "606a444a-b894-5076-8d5e-1716bbfa588e"
= "2024-01-11"
= "2024-01-12"
= "https://github.com/Workingdaturah/Payload-Generator/tree/main"
= "https://github.com/cod3nym/detection-rules//blob/86a04c4594cb48895192aad4af164f21f568c136/yara/dotnet/suspicious_indicators.yar#L1-L22"
= "https://github.com/cod3nym/detection-rules//blob/86a04c4594cb48895192aad4af164f21f568c136/LICENSE.md"
= "c48752a5b07b58596564f13301276dd5b700bd648a04af2e27d3f78512a06408"
= "28267eb54a4108924df57512bbae9f47f51fd4860b3cf93c014d73b0d4b2dec2"
= 65
= 80
= "FILE"
strings:
$sa1 = "VirtualProtect" ascii
$sa2 = "VirtualAlloc" ascii
$sa3 = "WriteProcessMemory" ascii
$sa4 = "CreateRemoteThread" ascii
$sa5 = "CreateThread" ascii
$sa6 = "WaitForSingleObject" ascii
$x = "__StaticArrayInitTypeSize=" ascii
condition:
uint16( 0 ) == 0x5a4d and 3 of ( $sa* ) and #x == 1
}
Strings (7 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $sa1 | text | "VirtualProtect" | ascii |
| $sa2 | text | "VirtualAlloc" | ascii |
| $sa3 | text | "WriteProcessMemory" | ascii |
| $sa4 | text | "CreateRemoteThread" | ascii |
| $sa5 | text | "CreateThread" | ascii |
| $sa6 | text | "WaitForSingleObject" | ascii |
| $x | text | "__StaticArrayInitTypeSize=" | ascii |
Condition
uint16( 0 ) == 0x5a4d and 3 of ( $sa* ) and #x == 1In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 3 patterns in ( $sa* ) must match.
- Pattern $x must occur == 1 times.
Test this rule in your browser
Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- c48752a5b07b58596564f13301276dd5b700bd648a04af2e27d3f78512a06408
Licence & attribution
Author: Jonathan Peters
Source repository: Cod3nym detection-rules @ 86a04c4594
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: 606a444a-b894-5076-8d5e-1716bbfa588e
Tags:FILE
Related rules
- Suspicious / huntingCod3nym detection-rules· Jonathan Peters· 2024-01-09
- Suspicious / huntingCod3nym detection-rules· Jonathan Peters· 2024-01-14
- Suspicious / huntingCod3nym detection-rules· Jonathan Peters· 2024-01-09
- Suspicious / huntingCod3nym detection-rules· Jonathan Peters· 2024-01-05
- MalwareCod3nym detection-rules· Jonathan Peters· 2024-01-16
- MalwareCod3nym detection-rules· Jonathan Peters· 2024-01-12
- GenericCod3nym detection-rules· Jonathan Peters· 2024-01-02