Aller au contenu

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Netwire

Detects NetWire RAT

MalwareNetwireditekSHen detectionBSD 2-Clause LicenseCompile avec YARA-X
Auteur
ditekSHen
Date
2020-11-06
Modifiée
2024-11-01
Score / Qualité
75 / 75

Ce que détecte cette règle

Detects NetWire RAT

Famille de malware associée : Netwire.

Cibles : PE Windows.

Elle définit 15 motifs (14 texte, 1 hex, 0 regex).

Résumé généré à partir des métadonnées et de la condition de la règle.

Source de la règle

malware-win-netwire.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Netwire : FILE
{
	meta:
		description = "Detects NetWire RAT"
		author = "ditekSHen"
		id = "c215f449-c725-51da-8f5b-2619bc282b22"
		date = "2020-11-06"
		modified = "2024-11-01"
		reference = "https://github.com/ditekshen/detection"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L4783-L4805"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "bae4f0cd7a431336bd784ba95f6ba3396e6f0f12c081e62482ad37ff859c1f1c"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$x1 = "SOFTWARE\\NetWire" fullword ascii
		$x2 = { 4e 65 74 57 69 72 65 00 53 4f 46 54 57 41 52 45 5c 00 }
		$s1 = "User-Agent: Mozilla/4.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko" fullword ascii
		$s2 = "filenames.txt" fullword ascii
		$s3 = "GET %s HTTP/1.1" fullword ascii
		$s4 = "[%.2d/%.2d/%d %.2d:%.2d:%.2d]" fullword ascii
		$s5 = "Host.exe" fullword ascii
		$s6 = "-m \"%s\"" fullword ascii
		$g1 = "HostId" fullword ascii
		$g2 = "History" fullword ascii
		$g3 = "encrypted_key" fullword ascii
		$g4 = "Install Date" fullword ascii
		$g5 = "hostname" fullword ascii
		$g6 = "encryptedUsername" fullword ascii
		$g7 = "encryptedPassword" fullword ascii

	condition:
		uint16( 0 ) == 0x5a4d and ( all of ( $s* ) or all of ( $x* ) or ( 1 of ( $x* ) and 2 of ( $s* ) ) or ( all of ( $g* ) and ( 2 of ( $s* ) or 1 of ( $x* ) ) ) )
}

Chaînes (15 motifs)

IdentifiantTypeValeurModificateurs
$x1texte"SOFTWARE\\NetWire"fullword ascii
$x2hex{ 4e 65 74 57 69 72 65 00 53 4f 46 54 57 41 52 45 5c 00 }
$s1texte"User-Agent: Mozilla/4.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"fullword ascii
$s2texte"filenames.txt"fullword ascii
$s3texte"GET %s HTTP/1.1"fullword ascii
$s4texte"[%.2d/%.2d/%d %.2d:%.2d:%.2d]"fullword ascii
$s5texte"Host.exe"fullword ascii
$s6texte"-m \"%s\""fullword ascii
$g1texte"HostId"fullword ascii
$g2texte"History"fullword ascii
$g3texte"encrypted_key"fullword ascii
$g4texte"Install Date"fullword ascii
$g5texte"hostname"fullword ascii
$g6texte"encryptedUsername"fullword ascii
$g7texte"encryptedPassword"fullword ascii

Condition

uint16( 0 ) == 0x5a4d and ( all of ( $s* ) or all of ( $x* ) or ( 1 of ( $x* ) and 2 of ( $s* ) ) or ( all of ( $g* ) and ( 2 of ( $s* ) or 1 of ( $x* ) ) ) )

En clair (Heuristique)

  • Le fichier doit commencer par « MZ » — un exécutable Windows (PE).
  • Tous les motifs de ( $s* ) doivent être trouvés.
  • Tous les motifs de ( $x* ) doivent être trouvés.
  • Tous les motifs de ( $g* ) doivent être trouvés.
  • Au moins 1 motifs de ( $x* ) doivent être trouvés.
  • Au moins 2 motifs de ( $s* ) doivent être trouvés.

Tester cette règle dans votre navigateur

Déposez un fichier pour le scanner avec cette règle grâce à YARA-X compilé en WebAssembly. Rien n’est envoyé.

Déposez un fichier ici ou cliquez pour choisirScanné localement avec YARA-X. Fichiers jusqu’à 200 Mo.

Ouvrir dans l’éditeur

Références

Licence et attribution

Auteur : ditekSHen

Dépôt source : ditekSHen detection @ e76c93dcde

Licence : BSD 2-Clause License (licence du dépôt)

Mention de copyright : Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).

Règle d’origine

Reprise via YARA Forge 20260927, qui préfixe les noms de règles par la source et ajoute des champs meta normalisés.

Identifiant de règle: c215f449-c725-51da-8f5b-2619bc282b22

Tags:FILE