YARA · Cod3nym detection-rules
COD3NYM_DOTNET_Singlefilehost_Bundled_App
Detects single file host .NET bundled apps.
- Author
- Jonathan Peters
- Date
- 2024-01-02
- Modified
- 2024-01-05
- Score / Quality
- 75 / 80
What this rule detects
Detects single file host .NET bundled apps.
Targets: Windows PE.
It defines 2 patterns (2 text, 0 hex, 0 regex). YARA modules used: pe.
Summary generated from the rule's metadata and condition.
Rule source
Includes the imports needed to compile it on its own.
dotnet-singlefilehost-bundled-app.yarDetection Rule License 1.1
import "pe"
rule COD3NYM_DOTNET_Singlefilehost_Bundled_App : FILE
{
meta:
= "Detects single file host .NET bundled apps."
= "Jonathan Peters"
= "061bd294-58d6-57be-b8b5-b8a8f31ce316"
= "2024-01-02"
= "2024-01-05"
= "https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file"
= "https://github.com/cod3nym/detection-rules//blob/86a04c4594cb48895192aad4af164f21f568c136/yara/dotnet/framework_identiciation.yar#L3-L17"
= "https://github.com/cod3nym/detection-rules//blob/86a04c4594cb48895192aad4af164f21f568c136/LICENSE.md"
= "12075b07a9feb951898ac8eba303471d9253ed9535db927244e5562f4fad33d6"
= 75
= 80
= "FILE"
strings:
$ = "singlefilehost.exe" ascii
$ = "singlefilehost.pdb" ascii
condition:
uint16( 0 ) == 0x5a4d and 1 of them and pe.exports ( "DotNetRuntimeInfo" ) and pe.exports ( "CLRJitAttachState" )
}
Strings (2 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $ | text | "singlefilehost.exe" | ascii |
| $ | text | "singlefilehost.pdb" | ascii |
Condition
uint16( 0 ) == 0x5a4d and 1 of them and pe.exports ( "DotNetRuntimeInfo" ) and pe.exports ( "CLRJitAttachState" )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 1 patterns in the rule must match.
- Uses the pe module.
- Checks exported functions or the DLL name.
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.
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: 061bd294-58d6-57be-b8b5-b8a8f31ce316
Tags:FILE
Related rules
- MalwareCod3nym detection-rules· Jonathan Peters· 2024-01-16
- MalwareCod3nym detection-rules· Jonathan Peters· 2024-01-12
- 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-11
- Suspicious / huntingCod3nym detection-rules· Jonathan Peters· 2024-01-09
- Suspicious / huntingCod3nym detection-rules· Jonathan Peters· 2024-01-05