Tool-CyberSec-Forensic-Noctua-C
Framework profesional de Reverse Engineering y Análisis Forense de Malware
Noctua-C es un framework profesional de Reverse Engineering y Análisis Forense de Malware escrito en C con Clean Architecture. Incluye 80 módulos de análisis, sandbox multicapa, ejecutor en RAM, decompilador IL propio, detección de evasión, threat intelligence, generación de reportes profesionales y una GUI nativa GTK4.
Multi-plataforma: Linux · macOS · BSD · Windows
🛡️ SandBox + RAM → 6 módulos
🔬 Análisis Forense → 30 módulos
📊 Análisis Estático → 15 módulos
📱 Móvil/Multimedia → 12 módulos
🧠 Decompilador + IL → 4 módulos
🔧 Profesional/Threat → 13 módulos
| Capa | Descripción |
|---|---|
| Filesystem | Aislamiento tmpfs + bind mounts |
| Network | Network namespace + CLOEXEC |
| Seccomp | Filtro BPF de syscalls |
| Memory | Guardia mprotect |
| Process | Fork + ptrace child isolation |
| Watchdog | Timeout + límite de memoria |
| Módulo | Comando | Descripción |
|---|---|---|
| Anti-Debug/Anti-VM | evasion |
CPUID, strings VM, MAC, DMI, TracerPid |
| Anti-VM Pro | antivm-pro |
SIDT/SGDT/SLDT/STR, I/O backdoors, timing |
| Process Injection | injection |
Remote thread, APC, hollowing, reflective DLL |
| MITRE ATT&CK | mitre |
44 técnicas, 14 tácticas |
| Persistence | persistence |
Servicios, systemd, cron, bootkits |
| Memory Forensics | memforensic |
Árbol procesos, conexiones, hidden PIDs |
| Network | network |
C2 indicators, conexiones activas |
| PCAP | pcap |
Parseo Ethernet/IP/TCP/UDP/DNS/HTTP/TLS |
| Storage | storage |
MBR/GPT, ATA IDENTIFY, NVMe, SMART |
| Anti-Forensics | anti-forensics |
Timestomping, wiping, evidence elimination |
| Debug | debug |
Debug sections, compilation flags |
| Ransomware | ransomware |
Notas, familias, backup deletion |
| Obfuscation | obfuscation |
XOR/RC4/base64, junk code, anti-disassembly |
| Anti-Sandbox | anti-sandbox |
Sleep, user interaction, RDTSC timing |
| Registry | registry |
Registry paths, APIs, persistence, IFEO |
| Decrypt | decrypt |
XOR/RC4/base64/AES, config extractor, shellcode |
| Escalation | escalation |
UAC bypass, token theft, Linux SUID, CVEs |
| Autopack | autopack |
Auto-analysis: find/decrypt/decompress/unpack |
| File Carving | carving |
JPEG/PNG/PDF/ZIP/ELF/AVI/MP3/GZIP/BMP/GIF/PE |
| Firmware | firmware |
Squashfs, JFFS2, UBI/UBIFS |
| Steganography | stego |
LSB chi-square, file append, WAV PCM |
| YARA Scanner | yara_scanner |
24 reglas built-in, escaneo de directorios |
| Fuzzing | fuzz |
Fuzzing harness generator (AFL/libFuzzer) |
| Módulo | Comando | Descripción |
|---|---|---|
| Threat Intel | intel |
IOC extraction, hashes, 33 familias, YARA rules |
| Classification | classify |
10 tipos, CVSS v3 scoring, confidence |
| IOC Database | ioc |
DB local con 123+ entradas, CSV loading |
| Behavioral | behavior |
API tracing vía ptrace, timeline |
| Position | position |
ASLR, PIE, offsets, address space |
| Side-Channel | sidechannel |
Cache-timing, Spectre gadgets |
| Módulo | Comando | Descripción |
|---|---|---|
| Virtualización | virt |
Detección de hypervisor/VM (CPUID hypervisor bit, firmas) |
| SCA General | sca-general |
Fingerprint de cifrados en cualquier chip/firmware + offsets HEX |
| TPM 2.0 | tpm |
Análisis de firmware TPM (crypto, claves, canal lateral) |
| SCA Dinámico | sca-dynamic |
Ejecuta el binario y mide jitter de timing real |
| SCA Harness | sca-harness |
Harness intra-proceso: DR0 en S-box AES + rdtsc por lookup |
| SCA HSAQ | sca-hsaq |
Poda adaptativa HSAQ (mediana kthvalue + correlación) |
| SCA Ataque | sca-attack |
Recuperación de subclave AES (cache-timing + HSAQ) |
| Power Analysis | power-analysis |
CPA/DPA (AES) + SPA (RSA) sobre traces de osciloscopio |
| EM Analysis | em-analysis |
Localiza la fuga en el die (heatmap) + recupera clave sin contacto |
El pipeline SCA auto-adapta el método de medición: ptrace → perf → baseline según los sysctls del host (ptrace_scope, perf_event_paranoid). La poda HSAQ (Hyper Sparse Adaptive Quantization) descarta muestras de ruido por umbral de mediana antes de correlacionar, recuperando la clave con señales débiles.
| Módulo | Comando | Descripción |
|---|---|---|
| Report | report |
Reporte agregado con risk scoring |
| Professional Report | report-pro |
HTML, MITRE heatmap, executive summary |
| Export | export |
JSON/CSV estructurado |
| Batch | batch |
Escaneo de directorios + scoring |
| Herramienta | Descripción |
|---|---|
| File Recovery | recover — decompress + decrypt (sca fallback) + decompile → archivos originales legibles |
| Self-Healing | make remedy — lint + fork audit + ASan + auto-fix + issue/PR pasivo |
| GUI nativa GTK4 | make gtk → noctua_gtk — abrir binario, secciones, funciones (disasm capstone), strings, hex |
| Pipeline | ./noctua pipeline [quick|network|full|list] |
| REST API | tools/noctua_rest_api — Servidor HTTP loopback puerto 8080 |
| Web GUI | tools/noctua_web/run.sh — Dashboard HTML |
| TUI | ./noctua tui — Terminal interactiva |
| Updater | ./noctua updater — Auto-updater + systemd service |
ASM (AArch64/x86) → [Lifter] → IL (Noctua IR) → [Decompiler] → Pseudocode C
- IR propio con 20+ expresiones y 8 instrucciones
- Decompilador mejorado: variable renaming, xref table, DOT call graph
- Il2Cpp analysis / dumper v2 / key extractor / strings extractor
- APK analyzer / manifest parser / JNI analyzer
- iOS ObjC runtime / Swift demangler / entitlements parser
┌────────────────────────────────────────────────────────┐
│ Interface Layer CLI · REST API · Web GUI · TUI │
├────────────────────────────────────────────────────────┤
│ Application Layer Pipeline · Decompiler · Modules │
├────────────────────────────────────────────────────────┤
│ Domain Layer Config · Result · IL · Type System │
├────────────────────────────────────────────────────────┤
│ Infrastructure Loaders · Lifter · Signal · Sandbox │
└────────────────────────────────────────────────────────┘
Multi-plataforma: Windows (WinSock/Toolhelp), Linux (ptrace/seccomp), macOS (Mach API), BSD (sysctl)
git clone https://github.com/MethodWhite/Noctua-C.git
cd Noctua-C
makeDependencias (todas opcionales): capstone · fftw3 · libcurl · yara · gtk4 (GUI)
| Comando | Resultado |
|---|---|
make |
noctua + lib/libnoctua.a + lib/libnoctua.so |
make gtk |
noctua_gtk (GUI nativa GTK4, requiere libgtk-4-dev) |
make asan |
Build con ASAN/UBSAN + tests (fuzzing/hostile input) |
make CC=clang |
Compilar con Clang |
make test |
Tests |
make clean |
Limpia build |
make updater |
Check de actualizaciones |
make updater-service |
Instalar systemd service |
Binarios nativos precompilados para las tres plataformas en la página de releases:
| Plataforma | Archivo |
|---|---|
| Linux | noctua-c-<ver>-x86_64.AppImage (+ noctua, noctua_gtk, libs) |
| Windows | noctua-c-<ver>-windows-x86_64.exe |
| macOS | noctua-c-<ver>-macos |
Cada release incluye checksums.sha256 / checksums.md5 para verificar la integridad de las descargas. La GUI GTK4 (noctua_gtk) está disponible en Linux; en Windows/macOS se distribuye el binario CLI.
# Análisis completo
./noctua /bin/ls
# SandBox
./noctua sandbox isolate # Activar sandbox
./noctua sandbox exec /bin/ls # Ejecutar en sandbox
./noctua ramexec malware.exe # Ejecutar en RAM
# Forense
./noctua /bin/ls evasion # Anti-Debug/Anti-VM
./noctua /bin/ls injection # Process injection
./noctua /bin/ls mitre # MITRE ATT&CK
./noctua /bin/ls ransomware # Ransomware
./noctua /bin/ls decrypt # Decryption engine
./noctua /bin/ls intel # Threat intelligence
./noctua /bin/ls classify # Classification + CVSS
./noctua /bin/ls behavior # Behavioral analysis
./noctua memforensic # Memory forensics
./noctua network # Network analysis
./noctua storage # NVMe/SATA/disk RE
./noctua pcap capture.pcap # PCAP analysis
./noctua carving disk.img # File carving
./noctua firmware firmware.bin # Firmware analysis
./noctua /tmp yara_scanner # YARA directorio recursivo
# Threat Intelligence
./noctua /bin/ls intel # IOCs, hashes, YARA, families
./noctua /bin/ls classify # Classification + CVSS
./noctua ioc /bin/ls # IOC database lookup
# Side-Channel Analysis (SCA) + Hardware
./noctua virt /bin/ls # Detección de hypervisor/VM
./noctua sca-general firmware.bin # Cifrados en cualquier chip/firmware + offsets
./noctua tpm tpm_firmware.bin # Análisis de firmware TPM 2.0
./noctua sca-dynamic /bin/openssl # Timing dinámico real (jit ter)
./noctua sca-harness /bin/openssl # Harness intra-proceso: DR0 S-box AES + rdtsc
./noctua sca-hsaq /bin/openssl # Poda adaptativa HSAQ (mediana + correlación)
./noctua sca-attack /bin/openssl # Recuperación de subclave AES (cache-timing)
./noctua power-analysis traces.csv # CPA/DPA (AES) + SPA (RSA) sobre traces
./noctua em-analysis em_traces.csv # EM: localiza la fuga + recupera la clave
./noctua recover bundle.gz # Recupera archivos originales (decompress+decrypt+decompile)
# → ~/.local/share/noctua/recovered/
# decrypt fallback: sca-attack recupera la clave
# Self-healing
make remedy # lint + fork audit + ASan + leak scan + auto-fix
# → remedy-report.md + issue/PR pasivo (silencioso)
# Automatización
./noctua pipeline quick # Pipeline rápido
./noctua batch /bin # Batch analysis
./noctua tui # Terminal interactiva
./noctua auto <input> # Análisis automático: detecta bin/dir/apk/zip/imagen/pcap
# y ejecuta el pipeline adecuado solo
./noctua apk-decompile <file.apk> # Decompila APK/DEX a source code (jadx o parser DEX nativo)
./noctua vuln <bin> # Escaneo de vulnerabilidades (self-hosted Noctua-C)
# y el PDF notarial se auto-verifica (hash+PGP)
# GUI (GTK4) — "Auto Analyze…" detecta el tipo y ejecuta el pipeline
make gtk && ./noctua_gtk
# Web GUI — endpoint /auto?file=<path> + botón "Auto Analyze"
tools/noctua_rest_api & # REST API (puerto 8080)
bash tools/noctua_web/run.sh # Dashboard HTML
curl 'localhost:8080/auto?file=/tmp/muestra'
# YARA
NOCTUA_YARA_RULES=myrules ./noctua /bin/ls yara_scannerSandBox + RAM (6): sandbox, ramexec, ramanalyze, position, sidechannel, autopack
Forense (30): evasion, antivm-pro, injection, mitre, persistence,
memforensic, network, pcap, storage, report, export,
debug, anti-forensics, batch, carving, firmware, stego,
ransomware, obfuscation, anti-sandbox, registry, decrypt,
decompile, intel, report-pro, pipeline, classify, behavior,
escalation, fuzz
Threat Intel (4): intel, classify, ioc, behavior
Estáticos (15): binary_analysis, packer_detector, yara_scanner, entropy_map,
dataflow, xref_analyzer, cfg, diff, cs_disassembler,
branch_timing, sca_timing, aes_sca, aes_key_extract,
aes_key_tracer, aes_emulator
SCA + Hardware (9): virt, sca-general, tpm, sca-dynamic, sca-harness,
sca-hsaq, sca-attack, power-analysis, em-analysis
Recuperación (1): recover
Móvil (12): apk_analyzer, manifest_parser, jni_analyzer,
il2cpp_analysis, il2cpp_dumper, il2cpp_dumper_v2,
il2cpp_strings_extractor, il2cpp_key_extractor,
objc_runtime, swift_demangler, audio_extractor,
unity_data_extractor
Profesional (13): report-pro, intel, classify, behavior, pipeline,
decrypt, decompile, autopack, tui, updater, plugin,
script, debugger
- SandBox multicapa (6 capas: FS/NET/SECCOMP/MEM/PROC/TIME)
- RAM executor + analyzer
- 72 módulos de análisis forense
- Anti-Debug & Anti-VM (técnicas conocidas y oscuras)
- Process injection, MITRE ATT&CK, persistence
- Memory forensics, network C2, PCAP parser
- Storage RE (MBR/GPT/ATA/NVMe/SMART)
- Anti-forensics, ransomware, obfuscation
- Decryption engine (XOR/RC4/base64/AES)
- Threat intelligence, IOC database, YARA scanner
- Classification (CVSS v3, 10 familias)
- Behavioral analysis (ptrace API tracing)
- Professional HTML reports + JSON/CSV export
- Configurable pipeline + batch analysis
- REST API + Web GUI dashboard
- TUI interactiva
- Auto-updater (systemd, cron, background daemon)
- Fuzzing harness generator
- Escalación de privilegios y movimiento lateral
- YARA: 24 reglas built-in, escaneo de directorios
- File carving (11 formatos)
- Firmware analysis (squashfs/jffs2/ubi)
- Steganography detection
- Multi-plataforma: Windows, Linux, macOS, BSD
- GUI nativa GTK4 (
make gtk→noctua_gtk) - CI/CD: CodeQL, Secrets, auto-merge, labeler, security gates
- Hardening de compilación (stack protector, FORTIFY, PIE, RELRO/NOW)
- Target ASAN/UBSAN reproducible (
make asan) - Deuda pendiente: ~144 diagnósticos de scan-build (dead stores / falsos positivos de stream) y 32 warnings de compilación
Hecho con ❤️ por MethodWhite