Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

171 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SecOpsAI

AI-Powered Behavioral Threat Detection and Adversarially Robust Security Operations Platform

SecOpsAI is an AI-powered Security Operations platform designed to detect, analyze, and respond to malicious activities in network environments.

The platform processes network traffic, converts it into structured security telemetry, extracts relevant features, and applies machine learning techniques to identify suspicious behaviors.

SecOpsAI combines network analysis, machine learning, event streaming, automated alert processing, and security monitoring to provide an end-to-end threat detection workflow.


Overview

Modern security environments generate large volumes of network events that require automated analysis and prioritization.

SecOpsAI addresses this challenge by integrating:

  • Network traffic analysis
  • Behavioral threat detection
  • Machine learning-based classification
  • Real-time event processing
  • Automated alert enrichment
  • Security monitoring dashboards

The platform follows a modular architecture where components can be independently developed, tested, and deployed.


Architecture

The SecOpsAI platform consists of the following components:

API Service

Responsible for:

  • Threat analysis requests
  • Model inference communication
  • Security event processing
  • Health monitoring

Data Pipeline

Responsible for:

  • Network telemetry collection
  • Data normalization
  • Feature extraction
  • Event preparation

Alert Pipeline

Responsible for:

  • Security event consumption
  • Alert enrichment
  • Threat prioritization
  • Notification workflows

Machine Learning Engine

Responsible for:

  • Feature processing
  • Behavioral analysis
  • Threat classification
  • Model inference

Monitoring Services

Provides:

  • Metrics collection
  • Infrastructure monitoring
  • Security visibility

Dashboards

Provides visualization of:

  • Threat detection activity
  • Alert severity
  • Detection trends
  • System performance metrics

Data Flow

PCAP Files
  ↓
Zeek Processing
  ↓
Structured JSON Logs
  ↓
Kafka Topics
  ↓
Feature Engineering
  ↓
Machine Learning Models
  ↓
Threat Detection Alerts
  ↓
Monitoring Dashboard

Security Design

SecOpsAI follows a defense-in-depth security approach.

Security principles include:

  • Network telemetry is treated as untrusted input.
  • Zeek runs with only required analyzers enabled.
  • Security alerts are separated from raw telemetry.
  • Kafka communication is designed to support message integrity validation.
  • API services implement security controls.
  • Threat detection focuses on behavioral indicators rather than only signatures.

Current detection objectives include:

  • Command-and-control activity
  • DNS tunneling
  • Lateral movement attempts
  • Suspicious network behaviors

Security Features

Implemented security capabilities include:

  • Secure API endpoints
  • Input validation
  • Authentication and authorization controls
  • Rate limiting
  • Audit logging
  • Secure event processing pipeline
  • Automated threat scoring
  • Real-time monitoring
  • ML-based threat classification

Installation

Clone the Repository

git clone https://github.com/Adnanmardini/SecOpsAI.git
cd SecOpsAI

Dependency Installation

Core Application

Install the main runtime dependencies:

pip install -r requirements.txt

Development Environment

Install development dependencies:

pip install -r requirements-dev.txt

Machine Learning Environment

Install ML-related dependencies:

pip install -r requirements-ml.txt

Environment Variables

SecOpsAI uses environment variables for configuration.

Create a .env file in the project root:

touch .env

Example configuration:

# API Configuration
API_HOST=0.0.0.0
API_PORT=8000

# Kafka Configuration
KAFKA_BOOTSTRAP_SERVERS=localhost:9092

# Database Configuration
DATABASE_URL=

# Machine Learning Configuration
MODEL_PATH=

Important: Do not commit sensitive information. Do not upload API keys, credentials, or private configuration files. Large ML model files should be stored separately.


Running the Platform

Start Infrastructure Services

Start required services using Docker:

docker compose up -d

Main infrastructure components include:

  • Kafka
  • PostgreSQL
  • Redis
  • Prometheus
  • Grafana

Start API Service

python app.py

Start Alert Pipeline

python alert_pipeline/alert_consumer.py

Generate Test Traffic

python scripts/generate_demo_traffic.py

Machine Learning Pipeline

The machine learning engine performs behavioral threat detection through:

  • Feature engineering
  • Data preprocessing
  • Model inference
  • Threat scoring

Example model artifacts:

models/
├── xgboost_hardened.json
├── scaler.joblib
└── label_encoder.joblib

Model files should not be pushed to GitHub if they contain sensitive or large binary artifacts.


Monitoring Dashboard

SecOpsAI provides real-time monitoring dashboards displaying:

  • Threat Detection Rate
  • Average Threat Score
  • Active Alerts by Severity
  • Detection Timeline
  • API Inference Latency
  • Model Performance Metrics

Monitoring stack:

  • Prometheus
  • Grafana

Project Structure

SecOpsAI/
├── api/
├── alert_pipeline/
├── ml_engine/
├── data_pipeline/
├── monitoring/
├── scripts/
├── models/
├── docker-compose.yml
├── requirements.txt
├── requirements-dev.txt
├── requirements-ml.txt
└── README.md

Team Structure

The project was organized into specialized security and engineering teams.

Security & Architecture

Responsibilities:

  • Security design
  • Architecture decisions
  • Threat modeling

Data Engineering & Infrastructure

Responsibilities:

  • Data pipelines
  • Kafka infrastructure
  • Container deployment

Detection & Machine Learning

Responsibilities:

  • Feature engineering
  • ML model development
  • Threat classification

Red Team & Automated Response

Responsibilities:

  • Security testing
  • Attack simulation
  • Automated response workflows

Development Workflow

The project follows a Git-based workflow:

main
  ↓
dev
  ↓
feature branches

Development changes should be tested and reviewed before merging into the main branch.


License

This project is provided for educational and research purposes.

About

AI-Powered Behavioral Threat Detection and Adversarially Robust Security Operations Platform

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages