Aller au contenu

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_HKTL_Nishang_PS1_Invoke_Powershelltcponeline

Detects PowerShell Oneliner in Nishang's repository

Outil offensifSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compile avec YARA-X
Auteur
Florian Roth (Nextron Systems)
Date
2021-03-03
Modifiée
2023-12-05
Score / Qualité
75 / 85

Ce que détecte cette règle

Detects PowerShell Oneliner in Nishang's repository

Elle définit 3 motifs (3 texte, 0 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

hktl-nishang-ps1-invoke-powershelltcponeline.yarDetection Rule License 1.1
rule SIGNATURE_BASE_HKTL_Nishang_PS1_Invoke_Powershelltcponeline
{
	meta:
		description = "Detects PowerShell Oneliner in Nishang's repository"
		author = "Florian Roth (Nextron Systems)"
		id = "0218ebbd-2dbe-5838-ab53-1e78e3f97b9e"
		date = "2021-03-03"
		modified = "2023-12-05"
		reference = "https://github.com/samratashok/nishang/blob/master/Shells/Invoke-PowerShellTcpOneLine.ps1"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_hafnium.yar#L105-L119"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		hash = "2f4c948974da341412ab742e14d8cdd33c1efa22b90135fcfae891f08494ac32"
		logic_hash = "59622bff95de1077d26ee4547f37cd1045c0c1fc6817df40ff2564b33a962a07"
		score = 75
		quality = 85
		tags = ""

	strings:
		$s1 = "=([text.encoding]::ASCII).GetBytes((iex $" ascii wide
		$s2 = ".GetStream();[byte[]]$" ascii wide
		$s3 = "New-Object Net.Sockets.TCPClient('" ascii wide

	condition:
		all of them
}

Chaînes (3 motifs)

IdentifiantTypeValeurModificateurs
$s1texte"=([text.encoding]::ASCII).GetBytes((iex $"ascii wide
$s2texte".GetStream();[byte[]]$"ascii wide
$s3texte"New-Object Net.Sockets.TCPClient('"ascii wide

Condition

all of them

En clair (Heuristique)

  • Tous les motifs de la règle 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

Hashes d’échantillons

Hashes des échantillons listés par l’auteur dans les métadonnées de la règle (à rechercher dans votre plateforme de threat intelligence).

  • 2f4c948974da341412ab742e14d8cdd33c1efa22b90135fcfae891f08494ac32

Licence et attribution

Auteur : Florian Roth (Nextron Systems)

Dépôt source : Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

Licence : Detection Rule License 1.1 (licence du dépôt)

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: 0218ebbd-2dbe-5838-ab53-1e78e3f97b9e