An Advanced Military-Grade Network Security System for Army & Defense - Powered by Machine Learning & Large Language Models
MIL SHIELD is an intelligent cybersecurity platform designed specifically for Army and Defense operations, combining traditional machine learning models with cutting-edge Large Language Model (LLM) reasoning to provide real-time network threat detection and automated response capabilities. Developed for the NexTech Hackathon at NMIET (Narsee Monjee Institute of Engineering and Technology), this system represents the next generation of military-grade network security tailored for defense infrastructure protection.
- Military-Grade Security: Multi-layered AI defense combining Random Forest, Autoencoder, and LLM models
- Real-time Threat Detection: Live network monitoring with instant alerts for defense operations
- Intelligent Decision Making: AI-powered response recommendations for military scenarios
- Visual Attack Simulation: Interactive camera-based attack scenarios for training purposes
- Command & Control Dashboard: Military-style Streamlit interface for monitoring operations
- Comprehensive Analytics: Detailed visualization and threat intelligence reporting
- Field-Ready Deployment: Optimized for edge computing in defense environments
- Secure Communication: Built for classified network environments
- Threat Intelligence: Advanced pattern recognition for emerging cyber threats
๐ฆ NexTechHackathon-TeamEdgeHackers/
โโโ ๐ค modelTraining/ # Core ML model development
โ โโโ models/ # Model architectures
โ โโโ preprocessing/ # Data preprocessing pipeline
โ โโโ training_scripts/ # Training workflows
โ โโโ data/ # Datasets and processed data
โ โโโ exports/ # Trained models and scalers
โ โโโ visualization/ # Model performance visualizations
โ โโโ gui-streamlit.py # Interactive dashboard
โ
โโโ ๐ฏ attack/ # Attack simulation environment
โ โโโ index4.py # Advanced PyQt5 attack simulator
โ โโโ stream.py # Webcam streaming server
โ โโโ attack_data_exporter.py # Attack data generation
โ โโโ data/ # Attack scenario datasets
โ
โโโ ๐ง modelPlusLLMPrediction/ # LLM-enhanced decision system
โ โโโ src/ # Core system modules
โ โ โโโ core/ # Decision making engines
โ โ โโโ network_io/ # Network event handling
โ โ โโโ utils/ # Utility functions
โ โโโ configs/ # Configuration files
โ โโโ models/ # Pre-trained model storage
โ โโโ scripts/ # Deployment scripts
โ โโโ final_demo.py # Complete system demonstration
โ
โโโ ๐ Configuration Files
โโโ .gitignore # Git ignore patterns
โโโ README.md # This file
- Python 3.8+ with pip
- NVIDIA GPU with CUDA support (for LLM inference)
- Webcam (for attack simulation)
- Windows 10/11 or Linux
# Clone the repository
git clone https://github.com/mohitksahu/NexTechHackathon-TeamEdgeHackers.git
cd NexTechHackathon-TeamEdgeHackers
# Create virtual environment
python -m venv .venv
# Activate environment (Windows)
.venv\Scripts\activate
# Or on Linux/Mac
source .venv/bin/activate# Install model training dependencies
cd modelTraining
pip install -r requirements.txt
# Install LLM prediction system
cd ../modelPlusLLMPrediction
pip install -r requirements.txt
# Install attack simulation tools
cd ../attack
pip install -r req.txtcd modelTraining
streamlit run gui-streamlit.pycd modelPlusLLMPrediction
python final_demo.pycd attack
python index4.py # Launch PyQt5 simulator
# Or
python stream.py # Start webcam streamingThe interactive dashboard provides real-time monitoring capabilities:
- Download Network Logs: CSV files with network traffic data
- Real-time Analysis: Live threat detection with ML models
- Visualization: Interactive charts and attack pattern analysis
- Alert System: Immediate notifications for detected threats
The AI-powered decision system offers intelligent threat response:
# Example: Process a network event
from src.core.decision_maker import DecisionMaker
decision_maker = DecisionMaker()
result = decision_maker.process_event({
"src_ip": "192.168.1.100",
"dst_ip": "10.0.0.50",
"protocol": "TCP",
"threat_score": 0.85
})
print(f"Decision: {result['action']}")
print(f"Confidence: {result['confidence']}")
print(f"Reasoning: {result['explanation']}")Interactive attack scenarios for testing:
- Camera-based Simulation: Visual attack pattern recognition
- Network Traffic Generation: Synthetic attack data creation
- Real-time Response Testing: Validate system responses
| Model | Accuracy | Precision | Recall | F1-Score |
|---|---|---|---|---|
| Random Forest | 94.2% | 93.8% | 94.1% | 93.9% |
| Autoencoder | 91.7% | 90.5% | 92.3% | 91.4% |
| Hybrid System | 96.8% | 96.2% | 96.5% | 96.3% |
# modelTraining/config.yaml
random_forest:
n_estimators: 100
max_depth: 20
random_state: 42
autoencoder:
hidden_layers: [64, 32, 16, 32, 64]
epochs: 100
batch_size: 32# modelPlusLLMPrediction/configs/llm_config.yaml
mode: local
model_name: microsoft/DialoGPT-medium
quantization: q4_0
context_window: 2048- Create model class in
modelTraining/models/ - Implement training script in
training_scripts/ - Update preprocessing pipeline if needed
- Add visualization in
visualization/
- Modify
modelPlusLLMPrediction/src/core/llm_agent.py - Update configuration in
configs/llm_config.yaml - Add new decision logic in
decision_maker.py
- Extend
attack/index4.pywith new scenarios - Add data generation in
attack_data_exporter.py - Update visualization components
- CUDA Acceleration: GPU-optimized inference
- Model Quantization: 4-bit quantization for efficiency
- Batch Processing: Optimized data pipeline
- Memory Management: Efficient resource utilization
We welcome contributions! Please see our contributing guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
tensorflow>=2.17.0scikit-learn>=1.5.1pandas>=2.2.2numpy>=1.26.4streamlitPyQt5opencv-python
torchtransformersacceleratebitsandbytes
- Team Lead: Mohit K Sahu
- Team Memvers: Lokesh Jena Subham Mohapatra RudraBhuyan
- ML Engineers: Specialized in deep learning and cybersecurity
- Full-Stack Developers: Dashboard and system integration
- Security Analysts: Threat modeling and validation
This project is licensed under the MIT License - see the LICENSE file for details.
- NexTech Hackathon @ NMIET organizers for this incredible opportunity to innovate for defense
- NMIET Faculty & Staff for supporting defense technology development
- Indian Army & Defense Forces for inspiring this security solution
- CIC-IDS2017 dataset for comprehensive cybersecurity training data
- Hugging Face for transformer models enabling advanced AI capabilities
- Streamlit for providing an intuitive dashboard framework
- Defense Research Community for continuous cybersecurity innovation
- References: (https://www.unb.ca/cic/datasets/index.html) (https://share.google/sU2mFIb9Vg6AZn8cT) (https://huggingface.co/collections/TinyLlama/tinyllama-11b-v11-660bb405bf46efd55c2094fc)
For questions and support:
- ๐ง Email: [email protected]
- ๐ฌ Issues: GitHub Issues
