Back to Projects

ai-threat-intel-platform

AI-powered threat intelligence platform for automated IOC collection, malware campaign detection, and relationship mapping.

0
Stars
0
Forks
0
Watchers
0
Open Issues

README.md

# ๐Ÿ›ก๏ธ AI Threat Intelligence Platform

![Version](https://img.shields.io/badge/version-1.0.0-blue.svg)
![Python](https://img.shields.io/badge/python-3.8%2B-brightgreen.svg)
![License](https://img.shields.io/badge/license-MIT-green.svg)
![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey.svg)
![Status](https://img.shields.io/badge/status-stable-success.svg)

An **AI-powered threat intelligence platform** that automatically collects, analyzes, and correlates Indicators of Compromise (IOCs) from multiple open-source threat intelligence feeds. The platform uses artificial intelligence to identify malware campaigns, map relationships between threats, and generate comprehensive threat reports.

## ๐Ÿ‘จโ€๐Ÿ’ป Author

**Abdul Muqeet Tabraiz**

[![LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue?style=flat&logo=linkedin)](https://www.linkedin.com/in/abdul-muqeet-tabraiz/)
[![GitHub](https://img.shields.io/badge/GitHub-Follow-black?style=flat&logo=github)](https://github.com/JuttSahib1999)

## โœจ Features

- ๐Ÿ” **Automated IOC Collection**: Gathers threat data from AlienVault OTX, URLhaus, MalwareBazaar, and ThreatFox
- ๐Ÿง  **AI-Powered Analysis**: Natural language processing for threat intelligence analysis
- ๐Ÿ”— **Relationship Mapping**: Graph-based analysis to identify connections between IOCs
- ๐ŸŽฏ **Campaign Detection**: Automatic identification of malware campaigns and attack patterns
- ๐Ÿ“Š **Comprehensive Reports**: Generate detailed HTML, JSON, and text reports
- ๐Ÿ’พ **Persistent Storage**: SQLite database for storing and querying threat data
- ๐Ÿ“ˆ **Threat Scoring**: Automatic risk scoring based on multiple factors
- ๐ŸŒ **Cross-Platform**: Works on Windows, Linux, and macOS

## ๐Ÿ“‹ Prerequisites

- **Python 3.8 or higher**
- **Windows 10/11**, Linux, or macOS
- **Internet connection** (for collecting threat feeds)
- **4GB RAM minimum** (8GB recommended)
- **1GB free disk space**

## ๐Ÿš€ Quick Start (Windows 10/11)

### Method 1: Using run.bat (Easiest)

1. **Download and extract the project**
2. **Double-click `run.bat`**
3. The script will automatically:
   - Create a virtual environment
   - Install all dependencies
   - Set up directory structure
   - Run the threat intelligence platform
4. **Check `data/reports/` for generated reports**

### Method 2: Manual Installation

1. Open Command Prompt or PowerShell
2. Navigate to the project directory:
   ```bash
   cd ai-threat-intel-platform

   ```

3. Create virtual environment:
```bash
python -m venv venv

```


4. Activate virtual environment:
```bash
venv\Scripts\activate

```


5. Install dependencies:
```bash
pip install -r requirements.txt

```


6. Run the platform:
```bash
python -m src.main

```



## ๐Ÿ“ Project Structure

```text
ai-threat-intel-platform/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ collectors/          # Threat feed collectors
โ”‚   โ”‚   โ”œโ”€โ”€ alienvault_collector.py
โ”‚   โ”‚   โ”œโ”€โ”€ urlhaus_collector.py
โ”‚   โ”‚   โ”œโ”€โ”€ malwarebazaar_collector.py
โ”‚   โ”‚   โ””โ”€โ”€ threatfox_collector.py
โ”‚   โ”œโ”€โ”€ analyzers/           # AI analysis engines
โ”‚   โ”‚   โ”œโ”€โ”€ ai_analyzer.py
โ”‚   โ”‚   โ”œโ”€โ”€ relationship_mapper.py
โ”‚   โ”‚   โ””โ”€โ”€ campaign_detector.py
โ”‚   โ”œโ”€โ”€ reporters/           # Report generation
โ”‚   โ”‚   โ””โ”€โ”€ report_generator.py
โ”‚   โ”œโ”€โ”€ database/            # Data persistence
โ”‚   โ”‚   โ””โ”€โ”€ db_manager.py
โ”‚   โ”œโ”€โ”€ utils/               # Utilities
โ”‚   โ”‚   โ”œโ”€โ”€ config.py
โ”‚   โ”‚   โ””โ”€โ”€ helpers.py
โ”‚   โ””โ”€โ”€ main.py              # Main entry point
โ”œโ”€โ”€ data/                    # Output directory
โ”‚   โ”œโ”€โ”€ iocs/                # Raw IOC data
โ”‚   โ”œโ”€โ”€ reports/             # Generated reports
โ”‚   โ””โ”€โ”€ database/            # SQLite database
โ”œโ”€โ”€ tests/                   # Unit tests
โ”œโ”€โ”€ templates/               # Report templates
โ”œโ”€โ”€ requirements.txt         # Python dependencies
โ”œโ”€โ”€ setup.py                 # Package setup
โ”œโ”€โ”€ run.bat                  # Windows launcher
โ””โ”€โ”€ README.md                # Documentation

```

## ๐Ÿ”ง Usage

### Basic Usage

Run with default settings:

```bash
python -m src.main

```

### Programmatic Usage

```python
from src.main import ThreatIntelligencePlatform

# Initialize platform
platform = ThreatIntelligencePlatform()

# Run analysis
platform.run()

```

### Custom Integration

```python
from src.collectors.alienvault_collector import AlienVaultCollector
from src.analyzers.ai_analyzer import AIThreatAnalyzer

# Collect IOCs
collector = AlienVaultCollector()
iocs = collector.collect()

# Analyze threats
analyzer = AIThreatAnalyzer()
analysis = analyzer.analyze_ioc_correlations(iocs)

print(f"Analysis complete: {analysis}")

```

## ๐Ÿ“Š Sample Output

```text
โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘      AI THREAT INTELLIGENCE PLATFORM v1.0.0              โ•‘
โ•‘      Author: Abdul Muqeet Tabraiz                        โ•‘
โ•‘      Date: July 20, 2026                                 โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

[1/5] Collecting IOCs from free sources...
[+] Total IOCs collected: 847

[2/5] Storing IOCs in database...
[+] IOCs stored successfully

[3/5] Analyzing IOCs with AI...
[+] Analysis complete
    - Malware families identified: 23
    - IOC types: {'ip': 312, 'domain': 245, 'url': 190, 'hash': 100}
    - Average threat score: 6.8/10

[4/5] Detecting threat campaigns...
[+] Campaigns detected: 7
    - EMOTET_2026-07-04: emotet (89 IOCs)
    - TRICKBOT_2026-07-03: trickbot (67 IOCs)

[5/5] Generating threat reports...
[+] Reports generated:
    - HTML: data/reports/threat_report_20260720_120000.html
    - JSON: data/reports/threat_report_20260720_120000.json
    - TEXT: data/reports/threat_report_20260720_120000.txt

```

## ๐Ÿงช Running Tests

```bash
# Run all tests
python -m pytest tests/

# Run specific test file
python -m pytest tests/test_collectors.py

# Run with verbose output
python -m pytest tests/ -v

```

## ๐Ÿ› ๏ธ Configuration

### API Keys (Optional but Recommended)

For real threat intelligence data, sign up for free API keys:

* AlienVault OTX: https://otx.alienvault.com/api/
* Abuse.ch: https://bazaar.abuse.ch/api/

Copy and edit the API keys file:

```bash
cp src/utils/api_keys.example.py src/utils/api_keys.py

```

Add your keys:

```python
ALIENVAULT_API_KEY = "your-64-character-key-here"
ABUSE_CH_API_KEY = "your-48-character-key-here"

```

Without API keys, the platform works with realistic sample data for demonstration.

## ๐Ÿค Contributing

Contributions are welcome! This is version 1.0.0 and is considered complete for its initial release. However, you can:

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Submit a pull request

## ๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

## โš ๏ธ Disclaimer

This platform is for educational and defensive purposes only. Always ensure you have proper authorization before monitoring or analyzing any networks or systems. The author is not responsible for any misuse of this software.

## ๐ŸŽฏ Key Features in Detail

### AI Analysis Capabilities

1. Natural language processing of threat descriptions
2. Automatic malware family identification
3. Industry sector targeting analysis
4. Attack vector classification
5. Threat sentiment analysis

### Relationship Mapping

1. Graph-based IOC correlation
2. Community detection for campaign identification
3. Central node analysis
4. Path finding between related threats

### Report Generation

1. **HTML Reports:** Interactive, styled reports with tables and statistics
2. **JSON Reports:** Machine-readable format for integration
3. **Text Reports:** Plain text summaries for quick review

## ๐Ÿ“ˆ Performance

1. Processes 1000+ IOCs per run
2. Average execution time: 2-5 minutes
3. Database supports millions of records
4. Memory efficient design

## ๐Ÿ”’ Security Notes

1. All API requests are rate-limited
2. No sensitive data is transmitted externally
3. Local database storage only
4. Input validation on all collected data

## ๐ŸŒŸ Support

**For issues, questions, or suggestions:**

* GitHub Issues: [Create an issue](https://github.com/JuttSahib1999/ai-threat-intel-platform/issues)
* LinkedIn: [Connect with the author](https://www.linkedin.com/in/abdul-muqeet-tabraiz/)

## ๐Ÿ“ Changelog

### Version 1.0.0 (July 20, 2026)

* Initial release
* Four threat intelligence sources integrated
* AI-powered analysis engine
* Campaign detection system
* Multiple report formats
* Cross-platform support

---

**Built with โค๏ธ by Abdul Muqeet Tabraiz**

Last Updated: July 20, 2026

```

```