Share
## https://sploitus.com/exploit?id=1935CCF1-DCD7-5588-B91B-6049139A1A77
# πŸ›‘οΈ AI-POCStudio

### Intelligent Vulnerability Reproduction and POC Automation Debugging Terminal

**Data never goes online; the internal network is fully controllable.**

[![Python](https://img.shields.io/badge/Python-3.10+-blue?logo=python&logoColor=white)](https://www.python.org/)  
[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)  
[![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20Linux%20%7C%20Mac-lightgrey)]()

A desktop terminal powered by AI for vulnerability reproduction and POC automation debugging, designed for **Red Teams, Security Researchers, and Cybersecurity Professionals**. Paste vulnerability information β†’ AI generates POCs in real-time β†’ Run in a sandbox with one click β†’ Automatic error fixingβ€”a fully closed-loop process.

---

## ✨ Key Features

| Feature | Description |
|--------|------------|
| 🧠 **AI-generated POCs** | Interfaces with OpenAI-compatible models like DeepSeek, GPT, and Ollama, generating code in real-time |
| πŸ”’ **100% Privacy** | Seamlessly compatible with local Ollama offline models; data never goes online |
| πŸ“‘ **CVE Intelligence Monitoring** | Real-time tracking of the latest global CVE announcements; displays them in card format for easy reproduction |
| πŸ” **Long Text Intelligent Dehydration** | Uses trafilatura and regular expressions to extract core elements like CVE IDs, attack paths, and payloads |
| ⚑ **Asynchronous Sandbox Execution** | Runs subprocesses independently, with real-time stdout/stderr output |
| πŸ”§ **AI-Automatic Fixing** | Automatically sends error tracebacks to AI for code repairs in one click |
| 🌐 **Flexible Proxy Configuration** | For CVE alerts from overseas, UI input is synchronized in real-time without restarting the system |

---

## πŸ“Έ Workflow Demonstration

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  πŸ“‘ CVE Intelligence Monitoring  β”‚
β”‚   Cards-style Display       β”‚
β”‚   One-Click Reproduction  β”‚
β”‚  🧠 AI-generated POCs       β”‚
β”‚  ⚑ Sandbox Testing        β”‚
β”‚  Real-time Console Display   β”‚
β”‚  Parameter Injection        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                ↑
                                β”‚  πŸ”§ AI-Correcting in One Click
                                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                      Automatic Error Fixing
```

---

## πŸš€ Quick Start

### 1. Clone the Project

```bash
git clone https://github.com/lehi520/AI-POCStudio.git
cd AI-POCStudio
```

### 2. Install Dependencies

```bash
pip install -r requirements.txt
```

### 3. Configure the API

Edit `config/settings.json` and fill in your API configuration:

```json
{
  "ai": {
    "base_url": "https://api.deepseek.com/v1",
    "api_key": "sk-xxxxxxxxxxxxxxxx",
    "model": "deepseek-chat"
  },
  "proxy": {
    "enabled": true,
    "http": "http://127.0.0.1:7890",
    "https": "http://127.0.0.1:7890"
  }
}
```

#### Supported AI Backends

| Backend | Base URL | Description |
|--------|----------|------------|
| **DeepSeek** | `https://api.deepseek.com/v1` | Affordable domestic code model |
| **GPT-4o** | `https://api.openai.com/v1` | Official OpenAI interface |
| **Ollama Local** | `http://localhost:11434/v1` | Fully offline, no data leakage |

> πŸ’‘ **Internal Network/Internet Outage Scenarios**: Use Ollama local model; all data stays on this machine, ensuring enterprise security compliance. ### 4. Start

```bash
python main.py
```

## πŸ“‚ Project Structure

```
AI-POCStudio/
β”‚
β”œβ”€β”€ core/                        # Core business logic layer (pure Python, no UI dependencies)
β”‚   β”œβ”€β”€ ai_client.py              # Unified AI API adapter (streaming Prompt + automatic repair)
β”‚   β”œβ”€β”€ crawler.py                # CVE updates extraction (CVE 5.0 self-healing parsing)
β”‚   β”œβ”€β”€ parser.py                 # Web text extraction + long text dehydration (CVE/Payload/path extraction)
β”‚   └── executor.py             # Subprocess sandbox (asynchronous execution + real-time output capture)
β”‚
β”œβ”€β”€ gui/                         # GUI layer (CustomTkinter dark tech style)
β”‚   β”œβ”€β”€ components.py           # Custom components (cards, console, code editor, status bar)
β”‚   └── main_window.py            # Three-panel main window + full workflow integration
β”‚
β”œβ”€β”€ config/
β”‚   └── settings.json            # Dynamic configuration (API keys, proxies, model selection)
β”‚
β”œβ”€β”€ assets/
β”‚   └── dark_theme.json          # Dark theme color scheme
β”‚
β”œβ”€β”€ main.py                    # Main program entry point (disclaimer, environment check, GUI startup)
└── requirements.txt             # Third-party dependency list
```

---

## βš™οΈ Technical Architecture

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    GUI Layer (CustomTkinter)              β”‚
β”‚ Three-panel layout β”‚ Card components β”‚ Streaming console β”‚ Code editor β”‚ Status bar    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                   Core business logic layer (pure Python) β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ ai_clientβ”‚ β”‚ crawler  β”‚ β”‚ parser   β”‚ β”‚ executor β”‚  β”‚
β”‚  β”‚ OpenAI   β”‚ CVE extraction  β”‚ β”‚ trafilat β”‚ β”‚ subprocessβ”‚ β”‚
β”‚  β”‚ Streaming API  β”‚ Self-healing parsing β”‚ β”‚ regex dehydration  β”‚ β”‚ Sandbox isolation  β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    External services (optional)     β”‚
β”‚  DeepSeek API β”‚ Ollama local β”‚ CVE.circl.lu β”‚ Target websites    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

---

## πŸ”‘ Key Design Features

### Harmless Security Constraints

System Prompt hardcodes the following rules:

- βœ… Only generates **verifiable** code (DNSLog / Echo display / reading harmless files)
- ❌ **Strictly prohibited**: shell reverse shells, webshells, backdoor implants, DoS attacks
- βœ… Must use `argparse` parameter specifications (`--target`, `--proxy`, `--timeout`)
- βœ… Must include complete `try-except` exception handling

### CVE 5.0 Self-Healing Parser

To address the issue of inconsistent JSON structures returned by the `cve.circl.lu` API, a three-layer degradation parsing mechanism is built-in:

1. Standard path lookup (`cveMetadata.cveId`)
2. Traversal of root node keys (`id`, `cve`, `summary`)
3. Final recursive scan (traversing the entire tree to find the longest technical description)

---

## πŸ“‹ Dependencies

| Library | Purpose |
|----|------|
| `customtkinter` | GUI framework |
| `openai` | Unified AI API calls (compatible with DeepSeek/Ollama) |
| `requests` | HTTP requests |
| `trafilatura` | Intelligent web text extraction |

---

## ⚠️ Disclaimer

This tool is intended only for **legal network security self-checks and educational research**. Users must strictly comply with local laws and regulations. Any legal liabilities arising from improper use are the responsibility of the user.

---

**If this project was helpful to you, please give a ⭐ Star of support!**