
Linux होस्ट घटना प्रतिक्रिया उपकरण जो रिवर्स शेल, वेब शेल, Meterpreter और फाइललेस इम्प्लांट का पता लगाता है, फिर प्रक्रियाओं को फ्रीज़ करता है, हमलावर IPs को ब्लॉक करता है और बाइनरीज़ को क्वारंटीन करता है।
██╗ ██╗██╗██████╗ ██╗███████╗
██║ ██║██║██╔══██╗██║██╔════╝
███████║██║██████╔╝██║███████╗
██╔══██║██║██╔══██╗██║╚════██║
██║ ██║██║██║ ██║██║███████║
╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚═╝╚══════╝
HIRIS (Host Incident Response & Isolation System) एक Linux इंसिडेंट रिस्पॉन्स टूल है जो बॉक्स पर हमलावरों की तलाश करता है और उन्हें वहीं फ़्रीज़ कर देता है। रिवर्स शेल, वेब शेल, Meterpreter, फ़ाइललेस इम्प्लांट, ब्रूट-फ़ोर्स घुसपैठ: HIRIS इन्हें पकड़ता है, SIGSTOP से प्रोसेस को रोकता है, हमलावर का IP काटता है, बाइनरी को क्वारंटीन करता है और सब कुछ जर्नल करता है ताकि इसे रोलबैक किया जा सके।
❗ नोट: HIRIS आपके रास्ते से हटकर रहने के लिए बनाया गया है। यह कभी अपने स्वयं के प्रोसेस ट्री, आपके SSH सत्र, आपके स्रोत IP या
sshd,systemdऔरauditdजैसी कोर सेवाओं को नहीं छूता।
अधिकांश टूल आपको बताते हैं कि कोई हमलावर अंदर आ गया है। HIRIS उन्हें तब रोकता है जब वे अभी भी अंदर ही होते हैं।
यह स्टार्टअप पर हर चल रही प्रोसेस को स्कैन करता है, ताकि HIRIS शुरू होने से पहले से मौजूद कोई शेल भी पकड़ा जा सके, फिर नई प्रोसेस पर नज़र रखता है। जब कुछ मेल खाता है, तो रिस्पॉन्स प्लान क्रम से चलता है:
HIRIS iptables चेन में डाला जाता है और लाइव कनेक्शन ss -K से मार दिए जाते हैं।SIGSTOP (या cgroup v2 फ़्रीज़र) से रोका जाता है। डिफ़ॉल्ट रूप से कुछ भी नहीं मारा जाता, ताकि साक्ष्य मेमोरी में बना रहे।hiris thaw उलट सकता है।फ़्रीज़ freeze_timeout (डिफ़ॉल्ट रूप से 1 घंटा) के बाद स्वयं पिघल जाते हैं, ताकि किसी ह्यूरिस्टिक के गलत लगने की स्थिति में सुरक्षा रहे।
nc, socat या python के पीछे pty-अपग्रेड किए गए शेल 🐚।nginx, apache, php-fpm और उनके जैसे द्वारा स्पॉन किए गए शेल, या www-data के रूप में चल रहे शेल 🌐।/tmp या /dev/shm में Meterpreter और msfvenom पेलोड, बिना टर्मिनल वाले ssh_login सत्र, postgres_login सुपरयूज़र सत्र 🎯।memfd_create से चल रही प्रोसेस, memfd से मैप किया गया कोड, और रिमोट कनेक्शन के साथ बड़ी अनाम निष्पादन-योग्य मेमोरी 👻।postgres या mysqld (COPY ... FROM PROGRAM, UDF exec) द्वारा स्पॉन किए गए शेल 🗄️।/root/.ssh पर inotify 📌।execve को लॉग करता है, प्रोसेस को उसी क्षण फ़्रीज़ कर देता है, कोई पोलिंग देरी नहीं ⚡।hiris thaw जर्नल से फ़्रीज़ और iptables नियमों को पूर्ववत करता है ↩️।/proc वाला Linux/proc/*/fd पढ़ने के लिए आवश्यक)iptables और sshiris ips के लिए auditdरिपॉज़िटरी क्लोन करें:
git clone https://github.com/K3ysTr0K3R/HIRIS.git
cd HIRIS
इसे इंस्टॉल करें:
sudo pip install -e .
या इसे बिना इंस्टॉल किए सीधे फ़ोल्डर से चलाएँ:
sudo python3 -m hiris --help
वैकल्पिक YARA समर्थन:
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
केवल अलर्ट, कुछ भी नहीं छेड़ा जाता:
sudo hiris watch
हमलावरों को स्वचालित रूप से फ़्रीज़ करें:
sudo hiris watch --auto-respond --i-understand-the-risk
HIRIS निगरानी करते समय एक लाइव स्टेटस लाइन दिखाता है और जैसे ही कुछ पकड़ा जाता है, उसी क्षण एक अलर्ट बॉक्स प्रिंट करता है:
╭─ ◆ 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
जैसे ही auditd उनके execve को लॉग करता है, प्रक्रियाओं को तुरंत फ़्रीज़ कर देता है, अगले /proc पोल की प्रतीक्षा करने के बजाय:
sudo hiris ips --auto-respond --i-understand-the-risk
प्रत्येक प्रतिक्रिया /var/lib/hiris/reports/ में एक जर्नल लिखती है। रोलबैक का पूर्वावलोकन करें, फिर उसे लागू करें:
sudo hiris thaw /var/lib/hiris/reports/journal-1795814771.jsonl
sudo hiris thaw /var/lib/hiris/reports/journal-1795814771.jsonl --force
क्वारंटीन की गई बाइनरीज़ को जानबूझकर डिस्क पर छोड़ा जाता है: वे साक्ष्य हैं।
HIRIS /etc/hiris/config.yaml को पढ़ता है। प्रत्येक कुंजी वैकल्पिक है: