Packet-level network intrusion detection. No agents. No cloud.
You plug it in. It watches. It tells you what's wrong.
NetSentinel captures live traffic and runs it through 7 detection rules β port scanning, ARP spoofing, DNS tunneling, SYN floods, unusual payloads, lateral movement, and C2 beaconing. When something matches, you get an alert with the packet context and a suggested response.
No root? No problem. Run --demo and it simulates a real attack scenario.
| Requirement | Details |
|---|---|
| Python | 3.8 or higher |
| OS | Linux, macOS (Windows: limited, no raw sockets) |
| Root/Admin | Required for live capture only. Demo mode needs nothing. |
| scapy | For live packet capture |
python3 --version # must be 3.8+
pip install scapy # for live capturegit clone https://github.com/SRINIVASAN55/NetSentinel.git
cd NetSentinel
pip install -r requirements.txtpython3 netsentinel.py --demoSimulates a realistic attack (port scan β SYN flood β C2 beacon) and shows exactly what NetSentinel would alert on. Best way to evaluate it before deployment.
# Find your interface name first
ip link show # Linux
ifconfig # macOS
# Start capturing (needs root)
sudo python3 netsentinel.py --interface eth0
sudo python3 netsentinel.py --interface wlan0
sudo python3 netsentinel.py -i eth0# Capture for 60 seconds then exit
sudo python3 netsentinel.py --interface eth0 --duration 60
sudo python3 netsentinel.py -i eth0 -d 60
# Run indefinitely (default is 30s, use 0 for infinite)
sudo python3 netsentinel.py -i eth0 --duration 0sudo python3 netsentinel.py --interface eth0 --output alerts.json
sudo python3 netsentinel.py -i eth0 -d 120 -o /tmp/netsentinel_report.json| Flag | Short | Description | Default | Example |
|---|---|---|---|---|
--interface |
-i |
Network interface to capture on | β | -i eth0 |
--duration |
-d |
Capture duration in seconds (0 = infinite) | 30 |
-d 120 |
--output |
-o |
Save JSON report to this path | β | -o report.json |
--demo |
Run demo mode, no root needed | β | --demo |
[14:23:01] β PORT SCAN src=192.168.1.105 ports=22,23,80,443,3389,8080β¦(+11)
[14:23:04] π΄ SYN FLOOD src=10.0.0.44 pps=8,400 target=10.0.0.1:80
[14:24:17] β DNS TUNNEL src=10.0.0.12 query=aGVsbG8=.evil.io (high entropy)
[14:25:33] π΄ C2 BEACON dst=185.220.101.45 interval=240sΒ±2s (99.1% periodic)
RULES = [
"port_scan", # >15 unique ports from single source in 60s
"arp_spoof", # ARP reply without prior request
"dns_tunnel", # high-entropy subdomain or oversized DNS payload
"syn_flood", # SYN:ACK ratio > 10:1 from single IP
"payload_anomaly", # known-bad byte signatures in stream
"lateral_movement",# internal SMB/RDP to multiple hosts
"c2_beacon", # periodic outbound at fixed intervals
]Operation not permitted when starting capture
β You need root: sudo python3 netsentinel.py -i eth0
No module named 'scapy'
β Run pip install scapy or pip3 install scapy
Not sure which interface to use?
β Run ip link show (Linux) or ifconfig (macOS). Look for the interface with your IP.
Want to test without real traffic?
β Use --demo mode β it works with zero permissions and zero traffic.
Made by S. Srinivasan