Aegis AI is an automated, local Security Information and Event Management (SIEM) and Security Operations Center (SOC) analytics platform. It parses raw cybersecurity logs, executes SQL-based detection queries for known attacks, runs unsupervised machine learning (Isolation Forest) models to catch anomalous behavioral patterns (UEBA), and displays all alerts in an interactive dashboard for forensic analysis and report generation.
- Enterprise Log Simulation: Simulates realistic authentication, web server, and firewall logs complete with normal traffic fluctuations and injected cyberattacks (Brute Force, SQL Injection, Data Exfiltration, and Insider Threats).
- Hybrid Detection Engine:
- Static Rules (SQL): Analyzes database logs with advanced SQL queries to flag immediate indicators of compromise (IOCs).
- AI/ML Analytics (Scikit-Learn): Uses an unsupervised
IsolationForestmodel to detect high-entropy anomalies (e.g., data exfiltration volumes, off-hours access, or unusual external IP activities).
- Streamlit SOC Dashboard:
- Overview Tab: Ingestion speed lines, alert severity donuts, and network traffic port breakdown charts.
- Triage Center Tab: Investigate active alerts, check matching log segments, update status, and generate detailed Markdown Forensic Reports.
- Threat Hunting Tab: Live SQL Query Editor allowing analysts to run custom database queries.
generator.py: Simulated security log generator. Injects attack scenarios (brute force, SQLi scanning, data exfil, and time anomalies).database.py: SQLite database interface. Parses JSON logs, structures tables (auth_logs,web_logs,firewall_logs,alerts), and runs SQL detection queries.detector.py: The Machine Learning anomaly detection engine. Extracts features and scales them using Scikit-Learn to fit unsupervised threat classifiers.app.py: Streamlit visualization frontend, SQL playground, and forensic report downloader.requirements.txt: Package dependencies (Streamlit, Pandas, Scikit-learn, Plotly, NumPy).
Ensure you have Python 3.9+ installed. Run the following command in your terminal:
pip install -r requirements.txtRun the backend pipeline to generate test logs and ingest them into the SIEM database:
# Step A: Simulate 7 days of logs
python generator.py --days 7
# Step B: Parse logs, initialize SQLite database, and run detection rules
python database.py
# Step C: Execute ML Anomaly Detection model (Isolation Forest)
python detector.pyNote: All logs will be stored in a local ./logs/ folder and the structured database will be created as siem.db in the root folder.
Run the following command to start the web-based visualization server:
streamlit run app.pyOnce launched, open your web browser and navigate to http://localhost:8501.
The generator script automatically injects the following scenarios to test the platform:
- Brute Force Attempt: Attacker IP
198.51.100.45initiates 45 failed login attempts followed by a single successful compromise within a 5-minute window. - SQL Injection Scanning: Web scanner from IP
203.0.113.88requesting URL patterns with' OR '1'='1andUNION SELECTpayloads. - Data Exfiltration: Internal host
192.168.1.105uploading ~5 GB of data to a foreign IP on port 443. - Insider Threat (Time Anomaly): Employee account
siddharthlogging in at 3:14 AM from an external IP and executing network transfers over SSH.