Saltar al contenido

YARA · Costin Raiu yararules

CRAIU_Exploit_CVE_2024_6387

Strings from CVE-2024-6387 exploit PoC by zgzhang.

ExploitCostin Raiu yararulesGNU General Public License v3.0Compila con YARA-X
Autor
Costin G. Raiu, TLPBLACK, craiu@noh.ro
Fecha
2024-07-02
Modificada
2024-07-03
Puntuación / Calidad
75 / 85

Qué detecta esta regla

Strings from CVE-2024-6387 exploit PoC by zgzhang.

Objetivos: ELF de Linux.

Define 15 patrones (15 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

exploit-cve-2024-6387.yarGNU General Public License v3.0
rule CRAIU_Exploit_CVE_2024_6387 : CVE_2024_6387 FILE
{
	meta:
		description = "Strings from CVE-2024-6387 exploit PoC by zgzhang."
		author = "Costin G. Raiu, TLPBLACK, craiu@noh.ro"
		id = "6ac63016-864d-57af-bb36-3115a0a91021"
		date = "2024-07-02"
		modified = "2024-07-03"
		reference = "https://github.com/zgzhang/cve-2024-6387-poc/tree/main"
		source_url = "https://github.com/craiu/yararules/blob/23cf0ca22021fa3684e180a18416b9ae1b695243/files/exploit_cve_2024_6387.yara#L2-L38"
		license_url = "https://github.com/craiu/yararules/blob/23cf0ca22021fa3684e180a18416b9ae1b695243/LICENSE"
		hash = "62b06a6c30a0c891c2246ff87c0ad9ae03d2123601ba5331d6348c43b38d185e"
		logic_hash = "d43a77c2690b5e01639590bc31fa64fa36b1da5efd3cc0761be7369ce80e4253"
		score = 75
		quality = 85
		tags = "CVE-2024-6387, FILE"
		version = "1.0"

	strings:
		$a0 = "Attempting exploitation with glibc base: 0x%lx" ascii wide fullword
		$a1 = "Attempt %d of 20000" ascii wide fullword
		$a2 = "Failed to establish connection, attempt %d" ascii wide fullword
		$a3 = "SSH handshake failed, attempt %d" ascii wide fullword
		$a4 = "Possible exploitation success on attempt %d with glibc base 0x%lx!" ascii wide fullword
		$a5 = "Received SSH version: %s" ascii wide fullword
		$a6 = "Connection closed while receiving SSH version" ascii wide fullword
		$a7 = "Received KEX_INIT (%zd bytes)" ascii wide fullword
		$a8 = "Connection closed while receiving KEX_INIT" ascii wide fullword
		$a9 = "Estimated parsing time: %.6f seconds" ascii wide fullword
		$a10 = "Received response after exploit attempt (%zd bytes)" ascii wide fullword
		$a11 = "Possible hit on 'large' race window" ascii wide fullword
		$a12 = "Connection closed by server - possible successful exploitation" ascii wide fullword
		$a13 = "No immediate response from server - possible successful exploitation" ascii wide fullword
		$a14 = "Attempt %d of 10000" ascii wide fullword

	condition:
		( filesize < 5MB ) and ( uint32be( 0 ) == 0x7F454C46 ) and ( 4 of ( $a* ) )
}

Cadenas (15 patrones)

IdentificadorTipoValorModificadores
$a0texto"Attempting exploitation with glibc base: 0x%lx"ascii wide fullword
$a1texto"Attempt %d of 20000"ascii wide fullword
$a2texto"Failed to establish connection, attempt %d"ascii wide fullword
$a3texto"SSH handshake failed, attempt %d"ascii wide fullword
$a4texto"Possible exploitation success on attempt %d with glibc base 0x%lx!"ascii wide fullword
$a5texto"Received SSH version: %s"ascii wide fullword
$a6texto"Connection closed while receiving SSH version"ascii wide fullword
$a7texto"Received KEX_INIT (%zd bytes)"ascii wide fullword
$a8texto"Connection closed while receiving KEX_INIT"ascii wide fullword
$a9texto"Estimated parsing time: %.6f seconds"ascii wide fullword
$a10texto"Received response after exploit attempt (%zd bytes)"ascii wide fullword
$a11texto"Possible hit on 'large' race window"ascii wide fullword
$a12texto"Connection closed by server - possible successful exploitation"ascii wide fullword
$a13texto"No immediate response from server - possible successful exploitation"ascii wide fullword
$a14texto"Attempt %d of 10000"ascii wide fullword

Condición

( filesize < 5MB ) and ( uint32be( 0 ) == 0x7F454C46 ) and ( 4 of ( $a* ) )

En palabras sencillas (Heurística)

  • El archivo debe empezar por la cabecera ELF: un ejecutable de Linux/Unix.
  • El archivo debe ocupar menos de 5MB (un límite barato que descarta archivos grandes).
  • Deben coincidir al menos 4 patrones de ( $a* ).

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).

  • 62b06a6c30a0c891c2246ff87c0ad9ae03d2123601ba5331d6348c43b38d185e

Licencia y atribución

Autor: Costin G. Raiu, TLPBLACK, craiu@noh.ro

Repositorio de origen: Costin Raiu yararules @ 23cf0ca220

Licencia: GNU General Public License v3.0 (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: 6ac63016-864d-57af-bb36-3115a0a91021

Metadatos

version1.0

Etiquetas:CVE_2024_6387FILE