Zum Inhalt springen

YARA · Cod3nym detection-rules

COD3NYM_DOTNET_Singlefilehost_Bundled_App

Detects single file host .NET bundled apps.

GenerischCod3nym detection-rulesDetection Rule License 1.1Kompiliert mit YARA-X
Autor
Jonathan Peters
Datum
2024-01-02
Geändert
2024-01-05
Score / Qualität
75 / 80

Was diese Regel erkennt

Detects single file host .NET bundled apps.

Ziele: Windows-PE.

Sie definiert 2 Muster (2 Text, 0 Hex, 0 Regex). Verwendete YARA-Module: pe.

Zusammenfassung aus den Metadaten und der Bedingung der Regel erzeugt.

Regelquelltext

Enthält die Imports, die zum eigenständigen Kompilieren nötig sind.

dotnet-singlefilehost-bundled-app.yarDetection Rule License 1.1
import "pe"

rule COD3NYM_DOTNET_Singlefilehost_Bundled_App : FILE
{
	meta:
		description = "Detects single file host .NET bundled apps."
		author = "Jonathan Peters"
		id = "061bd294-58d6-57be-b8b5-b8a8f31ce316"
		date = "2024-01-02"
		modified = "2024-01-05"
		reference = "https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file"
		source_url = "https://github.com/cod3nym/detection-rules//blob/86a04c4594cb48895192aad4af164f21f568c136/yara/dotnet/framework_identiciation.yar#L3-L17"
		license_url = "https://github.com/cod3nym/detection-rules//blob/86a04c4594cb48895192aad4af164f21f568c136/LICENSE.md"
		logic_hash = "12075b07a9feb951898ac8eba303471d9253ed9535db927244e5562f4fad33d6"
		score = 75
		quality = 80
		tags = "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 Muster)

BezeichnerTypWertModifikatoren
$Text"singlefilehost.exe"ascii
$Text"singlefilehost.pdb"ascii

Bedingung

uint16( 0 ) == 0x5a4d and 1 of them and pe.exports ( "DotNetRuntimeInfo" ) and pe.exports ( "CLRJitAttachState" )

In Worten (Heuristik)

  • Die Datei muss mit „MZ“ beginnen — eine Windows-Programmdatei (PE).
  • Mindestens 1 Muster aus der Regel müssen treffen.
  • Nutzt das Modul pe.
  • Prüft exportierte Funktionen oder den DLL-Namen.

Diese Regel im Browser testen

Legen Sie eine Datei ab, um sie mit dieser Regel und YARA-X als WebAssembly zu scannen. Nichts wird hochgeladen.

Datei hier ablegen oder klicken zum AuswählenLokal mit YARA-X gescannt. Dateien bis 200 MB.

Im Editor öffnen

Referenzen

Lizenz & Namensnennung

Autor: Jonathan Peters

Quell-Repository: Cod3nym detection-rules @ 86a04c4594

Lizenz: Detection Rule License 1.1 (Repository-Lizenz)

Originalregel

Gespiegelt über YARA Forge 20260927, das Regelnamen mit der Quelle präfixiert und normalisierte Meta-Felder ergänzt.

Regel-ID: 061bd294-58d6-57be-b8b5-b8a8f31ce316

Tags:FILE