YARA · Signature Base (Florian Roth / Nextron)
SIGNATURE_BASE_EXT_HKTL_Nighthawk_RAT
Detects Nighthawk RAT
- Autor
- Frank Boldewin (@r3c0nst)
- Fecha
- 2022-11-22
- Modificada
- 2025-07-01
- Puntuación / Calidad
- 75 / 85
Qué detecta esta regla
Detects Nighthawk RAT
Familia de malware asociada: Nighthawk.
Objetivos: PE de Windows.
Define 6 patrones (0 de texto, 6 hex, 0 regex). Módulos YARA usados: pe.
Resumen generado a partir de los metadatos y la condición de la regla.
Código de la regla
Incluye los imports necesarios para compilarla por sí sola.
import "pe"
rule SIGNATURE_BASE_EXT_HKTL_Nighthawk_RAT : FILE
{
meta:
= "Detects Nighthawk RAT"
= "Frank Boldewin (@r3c0nst)"
= "7a58b8bf-fb14-5758-bc2a-ad2c6fff1216"
= "2022-11-22"
= "2025-07-01"
= "https://www.proofpoint.com/us/blog/threat-insight/nighthawk-and-coming-pentest-tool-likely-gain-threat-actor-notice"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/gen_nighthawk_c2.yar#L3-L30"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
= "0551ca07f05c2a8278229c1dc651a2b1273a39914857231b075733753cb2b988"
= "9a57919cc5c194e28acd62719487c563a8f0ef1205b65adbe535386e34e418b8"
= "38881b87826f184cc91559555a3456ecf00128e01986a9df36a72d60fb179ccf"
= "f3bba2bfd4ed48b5426e36eba3b7613973226983a784d24d7a20fcf9df0de74e"
= "b775a8f7629966592cc7727e2081924a7d7cf83edd7447aa60627a2b67d87c94"
= "46404445e1fee89b598b0d42888f793dd602533cff2f72524800597af5b61197"
= 75
= 85
= "FILE"
strings:
$pattern1 = { 48 8d 0d ?? ?? ?? ?? 51 5a 48 81 c1 ?? ?? ?? ?? 48 81 c2 ?? ?? ?? ?? ff e2 }
$pattern2 = { 66 03 D2 66 33 D1 66 C1 E2 02 66 33 D1 66 23 D0 0F B7 C1 }
$pattern3 = { FF 7F 48 3B F0 48 0F 47 F0 48 8D }
$pattern4 = { 65 48 8B 04 25 30 00 00 00 8B 40 68 49 89 CA 0F 05 C3 }
$pattern5 = { 48 B8 AA AA AA AA AA AA AA 02 48 ?? ?? ?? ?? 0F 84 }
$pattern6 = { 65 48 8B 04 25 30 00 00 00 48 8B 80 }
condition:
uint16( 0 ) == 0x5A4D and filesize < 2MB and ( 3 of ( $pattern* ) or ( pe.section_index ( ".profile" ) >= 0 and pe.section_index ( ".detourc" ) >= 0 and pe.section_index ( ".detourd" ) >= 0 ) )
}
Cadenas (6 patrones)
| Identificador | Tipo | Valor | Modificadores |
|---|---|---|---|
| $pattern1 | hex | { 48 8d 0d ?? ?? ?? ?? 51 5a 48 81 c1 ?? ?? ?? ?? 48 81 c2 ?? ?? ?? ?? ff e2 } | |
| $pattern2 | hex | { 66 03 D2 66 33 D1 66 C1 E2 02 66 33 D1 66 23 D0 0F B7 C1 } | |
| $pattern3 | hex | { FF 7F 48 3B F0 48 0F 47 F0 48 8D } | |
| $pattern4 | hex | { 65 48 8B 04 25 30 00 00 00 8B 40 68 49 89 CA 0F 05 C3 } | |
| $pattern5 | hex | { 48 B8 AA AA AA AA AA AA AA 02 48 ?? ?? ?? ?? 0F 84 } | |
| $pattern6 | hex | { 65 48 8B 04 25 30 00 00 00 48 8B 80 } |
Condición
uint16( 0 ) == 0x5A4D and filesize < 2MB and ( 3 of ( $pattern* ) or ( pe.section_index ( ".profile" ) >= 0 and pe.section_index ( ".detourc" ) >= 0 and pe.section_index ( ".detourd" ) >= 0 ) )En palabras sencillas (Heurística)
- El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
- El archivo debe ocupar menos de 2MB (un límite barato que descarta archivos grandes).
- Deben coincidir al menos 3 patrones de ( $pattern* ).
- Usa el módulo pe.
- Comprueba secciones PE (nombres, número o propiedades).
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).
- 0551ca07f05c2a8278229c1dc651a2b1273a39914857231b075733753cb2b988
- 9a57919cc5c194e28acd62719487c563a8f0ef1205b65adbe535386e34e418b8
- 38881b87826f184cc91559555a3456ecf00128e01986a9df36a72d60fb179ccf
- f3bba2bfd4ed48b5426e36eba3b7613973226983a784d24d7a20fcf9df0de74e
- b775a8f7629966592cc7727e2081924a7d7cf83edd7447aa60627a2b67d87c94
Licencia y atribución
Autor: Frank Boldewin (@r3c0nst)
Repositorio de origen: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a
Licencia: Detection Rule License 1.1 (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: 7a58b8bf-fb14-5758-bc2a-ad2c6fff1216
Etiquetas:FILE
Reglas relacionadas
- Herramienta ofensivaSignature Base (Florian Roth / Nextron)· Arkbird_SOLG· 2022-11-22
- R3C0NST_Nighthawk_RATSolo metadatosHerramienta ofensivaFrank Boldewin (R3c0nst)· Frank Boldewin (@r3c0nst)· 2022-11-30
- Herramienta ofensivaMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04
- Herramienta ofensivaCAPE Sandbox (CAPEv2)· Nikhil Ashok Hegde <@ka1do9>· 2022-12-03
- MalwareSEKOIA.IO Community· Sekoia.io· 2022-11-23
- MalwareSignature Base (Florian Roth / Nextron)· Frank Boldewin (@r3c0nst)· 2020-08-17
- MalwareSignature Base (Florian Roth / Nextron)· Frank Boldewin (@r3c0nst)· 2020-05-17
- GenéricaSignature Base (Florian Roth / Nextron)· Frank Boldewin (@r3c0nst)· 2021-03-16