YARA · Costin Raiu yararules
CRAIU_Exploit_CVE_2024_6387
Strings from CVE-2024-6387 exploit PoC by zgzhang.
- 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
rule CRAIU_Exploit_CVE_2024_6387 : CVE_2024_6387 FILE
{
meta:
= "Strings from CVE-2024-6387 exploit PoC by zgzhang."
= "Costin G. Raiu, TLPBLACK, craiu@noh.ro"
= "6ac63016-864d-57af-bb36-3115a0a91021"
= "2024-07-02"
= "2024-07-03"
= "https://github.com/zgzhang/cve-2024-6387-poc/tree/main"
= "https://github.com/craiu/yararules/blob/23cf0ca22021fa3684e180a18416b9ae1b695243/files/exploit_cve_2024_6387.yara#L2-L38"
= "https://github.com/craiu/yararules/blob/23cf0ca22021fa3684e180a18416b9ae1b695243/LICENSE"
= "62b06a6c30a0c891c2246ff87c0ad9ae03d2123601ba5331d6348c43b38d185e"
= "d43a77c2690b5e01639590bc31fa64fa36b1da5efd3cc0761be7369ce80e4253"
= 75
= 85
= "CVE-2024-6387, FILE"
= "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)
| Identificador | Tipo | Valor | Modificadores |
|---|---|---|---|
| $a0 | texto | "Attempting exploitation with glibc base: 0x%lx" | ascii wide fullword |
| $a1 | texto | "Attempt %d of 20000" | ascii wide fullword |
| $a2 | texto | "Failed to establish connection, attempt %d" | ascii wide fullword |
| $a3 | texto | "SSH handshake failed, attempt %d" | ascii wide fullword |
| $a4 | texto | "Possible exploitation success on attempt %d with glibc base 0x%lx!" | ascii wide fullword |
| $a5 | texto | "Received SSH version: %s" | ascii wide fullword |
| $a6 | texto | "Connection closed while receiving SSH version" | ascii wide fullword |
| $a7 | texto | "Received KEX_INIT (%zd bytes)" | ascii wide fullword |
| $a8 | texto | "Connection closed while receiving KEX_INIT" | ascii wide fullword |
| $a9 | texto | "Estimated parsing time: %.6f seconds" | ascii wide fullword |
| $a10 | texto | "Received response after exploit attempt (%zd bytes)" | ascii wide fullword |
| $a11 | texto | "Possible hit on 'large' race window" | ascii wide fullword |
| $a12 | texto | "Connection closed by server - possible successful exploitation" | ascii wide fullword |
| $a13 | texto | "No immediate response from server - possible successful exploitation" | ascii wide fullword |
| $a14 | texto | "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.
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)
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
| version | 1.0 |
|---|
Etiquetas:CVE_2024_6387FILE
Reglas relacionadas
- MalwareCostin Raiu yararules· Costin G. Raiu, TLPBLACK, craiu@noh.ro· 2024-07-03