Year: 2026
Type: article
Abstract: We built AI-NIDS, a prototype intrusion detection system that connects a trained classifier to live packet capture and a web-based security dashboard.The classifier is trained on the NSL-KDD benchmark.After cleaning and encoding the data, we kept 20 features and trained a Random Forest (RF) and a Decision Tree (DT).On the 22,544record test set, the Random Forest scored 78.00% accuracy, 96.68% precision, 63.53% recall and a 76.68% F1-score; the Decision Tree scored 75.96%, 96.13%, 60.19% and 74.03%.The backend uses FastAPI with SQLAlchemy, the front end uses React and TypeScript, and they communicate over REST and WebSockets.For live capture, Scapy and Npcap (on Windows) sniff IPv4 and IPv6 packets from the chosen Wi-Fi or Ethernet interface, which are grouped into bidirectional five-tuple flows and converted into the model's feature vector.When the user switches interfaces, the old capture stops, a new one starts, and session counters and network details are refreshed.Simulated test-bench traffic is kept apart from real traffic.Results: Random Forest beat the Decision Tree on every metric, reaching 78.00% accuracy, but its recall was only 63.53%, so many attacks went undetected.A single host also sees only part of its network's traffic.
Source: IJARCCE
Language: English
Subfield: Computer Networks and Communications
Field: Computer Science
Domain: Physical Sciences
Open Access status: diamond
OpenAlex ID: W7238793428
