# HIDS (Host-based Intrusion Detection System)
## Prerequisites
Ensure that you have the following installed on your local machine:
- Python 3.x
- pip
- virtualenv
- Root access on your machine
## Setting Up
Follow these steps to get a local copy of the code:
1. Clone the repository:
```bash
git clone https://github.com/hima-23-bit/HIDS.git
- Navigate to the project directory:
cd HIDS
- Create a virtual environment:
python3 -m venv venv
- Activate the virtual environment:
source venv/bin/activate
- Install the required dependencies:
pip install -r requirements.txt
Follow these steps to run the application:
- Open two terminals with root access:
sudo su
- In both terminals, navigate to the project directory and activate the virtual environment:
source venv/bin/activate
- In the first terminal, run the main application:
python3 app.py
- In the second terminal, set up the
iptables
rules to redirect packets to a Netfilter queue (NFQUEUE):
iptables -I INPUT -j NFQUEUE --queue-num 0
iptables -I OUTPUT -j NFQUEUE --queue-num 0
- Still in the second terminal, run the packet capture script:
python3 packet_capture.py
- After running the application, clear the
iptables
rules to restore normal network activity:
iptables --flush