Intelligent Network Intrusion Detection and Prevention System
🚀 Live Demo • 📖 Documentation • 🛠️ Installation • 🤝 Contributing
NetHawk is a sophisticated web-based simulation of a Network Intrusion Detection and Prevention System (NIDPS) that demonstrates real-time network security monitoring, AI-powered threat detection, and automated response mechanisms. Built with modern web technologies, it provides an interactive cybersecurity dashboard perfect for educational purposes, proof-of-concept demonstrations, and portfolio showcases.
- Real-time Network Monitoring with live packet analysis
- AI-Powered Threat Detection using machine learning algorithms
- Automated IP Blocking with intelligent response systems
- Professional SOC Dashboard with comprehensive analytics
- Advanced Threat Intelligence with pattern recognition
- Comprehensive Logging and forensic capabilities
| Feature | Description | Status |
|---|---|---|
| Real-time Packet Monitoring | Live network traffic analysis with protocol detection | ✅ Active |
| AI Threat Detection | Machine learning-based intrusion classification | ✅ Active |
| Automated IP Blocking | Instant response to malicious activity | ✅ Active |
| Threat Intelligence | Advanced pattern recognition and attack classification | ✅ Active |
| Auto-Unblock System | Time-based automatic IP unblocking | ✅ Active |
| Whitelist Protection | Critical IP protection mechanisms | ✅ Active |
- Real-time network statistics
- Threat detection metrics
- System health monitoring
- Recent activity timeline
- Live traffic visualization
- Protocol-based filtering
- Packet size analysis
- Export capabilities (CSV)
- Attack pattern recognition
- Severity classification (High/Medium/Low)
- Source IP analysis
- Attack type distribution
- Active blocks monitoring
- Auto-unblock countdown
- Manual unblock controls
- Block reason tracking
- Comprehensive event logging
- Packet-level forensics
- Severity-based filtering
- Export functionality
- Model performance metrics
- Feature importance analysis
- Training history
- Accuracy monitoring
- Dark Theme: Optimized for SOC environments
- Responsive Design: Works on desktop, tablet, and mobile
- Real-time Updates: Live data streaming and updates
- Interactive Charts: Dynamic visualizations and analytics
- Professional Aesthetics: Enterprise-grade security dashboard design
- React 18.3.1 - Modern component-based UI library
- TypeScript 5.5.3 - Type-safe JavaScript development
- Vite 5.4.2 - Fast build tool and development server
- Tailwind CSS 3.4.1 - Utility-first CSS framework
- Lucide React 0.344.0 - Beautiful, customizable icons
- PostCSS 8.4.35 - CSS processing and optimization
- ESLint 9.9.1 - Code linting and quality assurance
- TypeScript ESLint 8.3.0 - TypeScript-specific linting rules
- Autoprefixer 10.4.18 - CSS vendor prefixing
- Component-based Architecture - Modular, reusable components
- TypeScript Interfaces - Strong typing for data models
- Real-time State Management - Live data updates and synchronization
- Mock Data Generation - Sophisticated network traffic simulation
nethawk/
├── 📁 src/
│ ├── 📁 components/ # React components
│ │ ├── Dashboard.tsx # Main dashboard component
│ │ ├── PacketMonitor.tsx # Live packet monitoring
│ │ ├── ThreatAnalysis.tsx # Threat detection analysis
│ │ ├── BlockedIPs.tsx # IP blocking management
│ │ ├── SystemLogs.tsx # Logging and forensics
│ │ └── ModelTraining.tsx # ML model interface
│ ├── 📁 types/ # TypeScript type definitions
│ │ └── nidps.ts # Core data models
│ ├── 📁 utils/ # Utility functions
│ │ └── mockData.ts # Network simulation logic
│ ├── App.tsx # Main application component
│ ├── main.tsx # Application entry point
│ └── index.css # Global styles
├── 📁 public/ # Static assets
├── 📄 package.json # Dependencies and scripts
├── 📄 tailwind.config.js # Tailwind CSS configuration
├── 📄 tsconfig.json # TypeScript configuration
├── 📄 vite.config.ts # Vite build configuration
└── 📄 README.md # Project documentation
- Node.js (v18.0.0 or higher)
- npm or yarn package manager
- Modern web browser (Chrome, Firefox, Safari, Edge)
-
Clone the repository
git clone https://github.com/yourusername/nethawk.git cd nethawk -
Install dependencies
npm install # or yarn install -
Start development server
npm run dev # or yarn dev -
Open in browser
http://localhost:5173
# Build optimized production bundle
npm run build
# Preview production build
npm run preview- Launch NetHawk - Open the application in your browser
- Monitor Dashboard - View real-time network statistics
- Explore Tabs - Navigate through different monitoring sections
- Control Monitoring - Use start/stop controls for packet capture
- Analyze Threats - Review detected threats and blocked IPs
| Tab | Purpose | Key Features |
|---|---|---|
| 🏠 Dashboard | Overview and statistics | Real-time metrics, recent activity |
| 👁️ Packet Monitor | Live traffic analysis | Filtering, search, export |
| Security insights | Attack patterns, severity levels | |
| 🚫 Blocked IPs | IP management | Block status, auto-unblock timers |
| 📋 System Logs | Event logging | Comprehensive audit trail |
| 🧠 ML Training | Model management | Performance metrics, training |
- Start/Stop Monitoring: Control packet capture simulation
- Clear Logs: Reset all monitoring data
- Export Data: Download logs and packet data as CSV
- Filter Options: Customize data views and analysis
- Manual Unblock: Override automatic IP blocking
NetHawk simulates sophisticated ML-based threat detection using:
- Random Forest Classification - Ensemble learning for accurate predictions
- Feature Engineering - Multi-dimensional packet analysis
- Confidence Scoring - Probabilistic threat assessment
- Pattern Recognition - Advanced attack signature detection
| Attack Type | Description | Severity |
|---|---|---|
| Port Scan | Network reconnaissance attempts | Medium |
| DDoS Attack | Distributed denial of service | High |
| Brute Force | Authentication attacks | High |
| Botnet Communication | Command & control traffic | High |
| Data Exfiltration | Unauthorized data transfer | High |
| SQL Injection | Database attack attempts | Medium |
| Network Reconnaissance | Information gathering | Low |
- Source/Destination IPs - Geographic and reputation analysis
- Port Numbers - Service identification and anomaly detection
- Packet Sizes - Statistical analysis for anomalies
- Protocol Types - TCP/UDP/ICMP behavior analysis
- TTL Values - OS fingerprinting and spoofing detection
- Timing Patterns - Traffic flow analysis
Create a .env file in the root directory:
# Application Configuration
VITE_APP_NAME=NetHawk
VITE_APP_VERSION=1.0.0
# Simulation Settings
VITE_PACKET_RATE=1000
VITE_THREAT_RATE=0.12
VITE_AUTO_UNBLOCK_TIME=600000
# Dashboard Settings
VITE_REFRESH_INTERVAL=1000
VITE_MAX_PACKETS_DISPLAY=1000- Threat Detection Sensitivity - Adjust ML confidence thresholds
- Traffic Simulation Rate - Control packet generation frequency
- Auto-unblock Timing - Configure automatic IP release
- Dashboard Refresh Rate - Set real-time update intervals
- Color Themes - Customize dashboard appearance
# Run all tests
npm run test
# Run tests in watch mode
npm run test:watch
# Generate coverage report
npm run test:coverage- Component Testing - React component functionality
- Utility Testing - Mock data generation and algorithms
- Integration Testing - Component interaction and data flow
- Performance Testing - Real-time update efficiency
-
Build the project
npm run build
-
Deploy to Netlify
# Install Netlify CLI npm install -g netlify-cli # Deploy netlify deploy --prod --dir=dist
-
Install Vercel CLI
npm install -g vercel
-
Deploy
vercel --prod
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "run", "preview"]We welcome contributions to NetHawk! Here's how you can help:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Run tests
npm run test npm run lint - Commit your changes
git commit -m 'Add amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Code Style: Follow TypeScript and React best practices
- Testing: Add tests for new features
- Documentation: Update README and code comments
- Commits: Use conventional commit messages
- Issues: Use issue templates for bug reports and feature requests
- 🎨 UI/UX Improvements - Enhanced dashboard design
- 🧠 ML Algorithms - Advanced threat detection logic
- 📊 Data Visualization - New charts and analytics
- 🔧 Performance - Optimization and efficiency improvements
- 📚 Documentation - Tutorials and guides
- 🧪 Testing - Increased test coverage
- API Documentation - Component interfaces and props
- Architecture Guide - System design and patterns
- Deployment Guide - Production deployment instructions
- Contributing Guide - Detailed contribution guidelines
For building a production NIDPS with actual packet capture:
- Python Implementation Guide - Complete Linux-based system
- Setup Instructions - Step-by-step deployment
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2024 NetHawk Project
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
- Network Security Research - Academic papers on intrusion detection
- Open Source NIDS - Snort, Suricata, and Zeek projects
- Machine Learning - Scikit-learn and cybersecurity ML research
- UI/UX Design - Modern SOC dashboard designs and cybersecurity tools
- React Team - For the amazing React framework
- Tailwind CSS - For the utility-first CSS framework
- Lucide - For beautiful, consistent icons
- Vite - For fast development and building
- TypeScript - For type-safe development
- 🐛 Bug Reports: GitHub Issues
- 💡 Feature Requests: GitHub Discussions
- 📧 Email: support@nethawk-project.com
- 💬 Discord: NetHawk Community
- @yourusername - Project Lead & Core Developer
- @contributor1 - Frontend Specialist
- @contributor2 - Security Expert
⭐ Star this repository if you find it helpful!
🦅 NetHawk - Protecting Networks with AI-Powered Intelligence
Made with ❤️ by the NetHawk Team