Strumento di risposta agli incidenti per host Linux che rileva reverse shell, web shell, Meterpreter e implant fileless, quindi congela i processi, blocca gli IP degli attaccanti e mette in quarantena i binari.
██╗ ██╗██╗██████╗ ██╗███████╗
██║ ██║██║██╔══██╗██║██╔════╝
███████║██║██████╔╝██║███████╗
██╔══██║██║██╔══██╗██║╚════██║
██║ ██║██║██║ ██║██║███████║
╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚═╝╚══════╝
HIRIS (Host Incident Response & Isolation System) è uno strumento di incident response per Linux che scova gli attaccanti sulla macchina e li congela sul posto. Reverse shell, web shell, Meterpreter, implant fileless, intrusioni brute-force: HIRIS li intercetta, ferma il processo con SIGSTOP, blocca l'IP dell'attaccante, mette in quarantena il binario e registra tutto in un journal così da poter essere annullato.
❗ Nota: HIRIS è progettato per non intralciarti. Non tocca mai il proprio albero di processi, la tua sessione SSH, il tuo IP di origine o servizi essenziali come
sshd,systemdeauditd.
La maggior parte degli strumenti ti dice che un attaccante è entrato. HIRIS li ferma mentre sono ancora dentro.
Analizza ogni processo in esecuzione all'avvio, così anche una shell già presente prima che HIRIS partisse viene intercettata, poi continua a sorvegliare i nuovi. Quando qualcosa corrisponde, il piano di risposta viene eseguito in ordine:
HIRIS e le connessioni attive vengono terminate con ss -K.SIGSTOP (o con il freezer di cgroup v2). Per impostazione predefinita nulla viene ucciso, così le prove restano in memoria.hiris thaw può invertire.I congelamenti si sbloccano da soli dopo freeze_timeout (1 ora per impostazione predefinita), nel caso una euristica produca un falso positivo.
nc, socat o python 🐚.nginx, apache, php-fpm e simili, o in esecuzione come www-data 🌐./tmp o /dev/shm, sessioni ssh_login senza terminale, sessioni superuser postgres_login 🎯.memfd_create, codice mappato da memfd e grandi aree di memoria eseguibile anonima con una connessione remota 👻.postgres o mysqld (COPY ... FROM PROGRAM, esecuzione UDF) 🗄️./root/.ssh 📌.execve, senza ritardo di polling ⚡.hiris thaw annulla congelamenti e regole iptables a partire dal journal ↩️./proc/proc/*/fd)iptables e ss per l'isolamentoauditd per hiris ipsClona il repository:
git clone https://github.com/K3ysTr0K3R/HIRIS.git
cd HIRIS
Installalo:
sudo pip install -e .
Oppure eseguilo direttamente dalla cartella senza installarlo:
sudo python3 -m hiris --help
Supporto YARA opzionale:
sudo pip install -e ".[yara]"
Usage: hiris [-h] [--version] [-v] {scan,respond,watch,ips,thaw} ...
Commands:
scan One-shot scan, print findings and the response plan
respond Scan and build the plan; --force applies it
watch Continuously monitor and respond
ips Inline IPS on the auditd execve stream
thaw Reverse a response journal
Global:
-v, --verbose -v for INFO logs, -vv for DEBUG
--version Show version and exit
watch:
--auto-respond Execute the response plan automatically (default: alert only)
--i-understand-the-risk
Required with --auto-respond
--kill After freezing, kill the process (irreversible)
--break-glass Strip unsafe actions instead of refusing the plan
--interval SECONDS Seconds between /proc polls (default: 2.0)
--sweep-interval SECONDS
Seconds between full-system sweeps (default: 60, 0 = startup only)
--network Also capture and inspect network traffic
--rules FILE Suricata-style rules file for --network
--interface IFACE Capture interface (default: any)
--config FILE Config file (default: /etc/hiris/config.yaml)
scan / respond:
--force (respond) Apply the plan: isolate, freeze, quarantine
--kill (respond) Kill after freezing (irreversible)
--json FILE Write the full report as JSON
--yara RULES YARA rules to scan executables with
--since-days N Persistence lookback window
--fail-on SEVERITY Exit non-zero if a finding is this severe or worse
Solo avvisi, nulla viene toccato:
sudo hiris watch
Blocca automaticamente gli attaccanti:
sudo hiris watch --auto-respond --i-understand-the-risk
HIRIS mostra una riga di stato in tempo reale mentre è in ascolto e stampa un riquadro di avviso nel momento in cui qualcosa viene rilevato:
╭─ ◆ CRITICAL ──────────────────────────────────────────── shell_socket_stdio 16:26:11 ─╮
│ Reverse shell: bash (pid 516) has stdio on a network socket │
│ │
│ bash pid 516 has its standard input/output connected to 10.10.14.7. Interactive │
│ shells should never read from a TCP socket. │
│ │
│ → 10.10.14.7 │
│ ⊘ pid 516 │
╰────────────────────────────────────────────────────────────────────────────────────────╯
⚡ froze 516 · isolated 10.10.14.7 · journal-1795814771.jsonl
[*] Monitoring system ⠹ 237 procs · 1 findings · 1 frozen · sweep in 42s · up 00:05:12
sudo hiris scan
sudo hiris respond --force
sudo hiris scan --json report.json --fail-on high
Congela i processi nel momento in cui auditd registra il loro execve, invece di attendere il successivo polling di /proc:
sudo hiris ips --auto-respond --i-understand-the-risk
Ogni risposta scrive un journal in /var/lib/hiris/reports/. Visualizza in anteprima il rollback, poi applicalo:
sudo hiris thaw /var/lib/hiris/reports/journal-1795814771.jsonl
sudo hiris thaw /var/lib/hiris/reports/journal-1795814771.jsonl --force