Saltar al contenido

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_HKTL_Nishang_PS1_Invoke_Powershelltcponeline

Detects PowerShell Oneliner in Nishang's repository

Herramienta ofensivaSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compila con YARA-X
Autor
Florian Roth (Nextron Systems)
Fecha
2021-03-03
Modificada
2023-12-05
Puntuación / Calidad
75 / 85

Qué detecta esta regla

Detects PowerShell Oneliner in Nishang's repository

Define 3 patrones (3 de texto, 0 hex, 0 regex).

Resumen generado a partir de los metadatos y la condición de la regla.

Código de la regla

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
}

Cadenas (3 patrones)

IdentificadorTipoValorModificadores
$s1texto"=([text.encoding]::ASCII).GetBytes((iex $"ascii wide
$s2texto".GetStream();[byte[]]$"ascii wide
$s3texto"New-Object Net.Sockets.TCPClient('"ascii wide

Condición

all of them

En palabras sencillas (Heurística)

  • Deben coincidir todos los patrones de la regla.

Prueba esta regla en tu navegador

Arrastra un archivo para escanearlo con esta regla usando YARA-X compilado a WebAssembly. No se sube nada.

Arrastra un archivo aquí o haz clic para elegirSe escanea en local con YARA-X. Archivos de hasta 200 MB.

Abrir en el editor

Referencias

Hashes de muestras

Hashes de las muestras que el autor lista en los metadatos de la regla (búscalos en tu plataforma de threat intelligence).

  • 2f4c948974da341412ab742e14d8cdd33c1efa22b90135fcfae891f08494ac32

Licencia y atribución

Autor: Florian Roth (Nextron Systems)

Repositorio de origen: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

Licencia: Detection Rule License 1.1 (licencia del repositorio)

Regla original

Obtenida a través de YARA Forge 20260927, que añade a los nombres el prefijo de la fuente y campos meta normalizados.

Id de la regla: 0218ebbd-2dbe-5838-ab53-1e78e3f97b9e