File size: 3,300 Bytes
5bb0c05 469397a 5bb0c05 469397a 5bb0c05 469397a 5bb0c05 f8bc565 469397a 6d573ae f8bc565 6d573ae f8bc565 6d573ae f8bc565 6d573ae f8bc565 6d573ae f8bc565 6d573ae f8bc565 6d573ae f8bc565 6d573ae f8bc565 6d573ae f8bc565 6d573ae f8bc565 6d573ae f8bc565 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | ---
license: apache-2.0
language: en
pipeline_tag: text-generation
tags:
- mcp
- security
- autonomous-agent
- ai-agent
- cybersecurity
- local-llm
---
## Autonomous Security Agent
A self-contained security agent built with Qwen 2.5-7B running locally via LM Studio on Kali Linux. The agent can autonomously execute security tools, analyze results, and take action through an MCP (Model Context Protocol) server. Built for local offensive security automation with real-time tool execution and autonomous decision loops.
## System Overview
This agent operates as a fully local autonomous security system that reasons, plans, and executes security tooling through a structured MCP execution layer.
It continuously cycles between:
- interpreting objectives
- selecting tools
- executing system-level security commands
- analyzing results locally via an embedded LLM
## Features
A modular autonomous security system built around a local reasoning engine with executable tool orchestration via MCP.
- **Local LLM Backend** — Qwen 2.5-7B served via LM Studio at `192.168.0.39:1234`
- **Autonomous Tool Execution** — Runs security tools (nmap, masscan) through MCP
- **Agent Loop** — Continuous reasoning and decision-making
- **MCP Server** — Tool chain execution with `run_masscan`, `run_nmap`, `write_file`, `read_file`
## Components
## System Architecture
The system is composed of four interacting layers:
### 1. Reasoning Layer
- `agent_loop.py` — Core autonomous decision engine
- Handles planning, evaluation, and iterative reasoning cycles
### 2. Execution Layer
- `mcp_server.py` — Model Context Protocol execution backend
- Routes structured tool calls into system commands
### 3. Tooling Layer
- `tools_manifest.json` — Defines available actions and capabilities
- `run_nmap`, `run_masscan`, `read_file`, `write_file`
### 4. Interface Layer
- `request.json` — Input schema for agent initiation
- Defines structured prompts and task definitions
## Security Setup
### Firewall Configuration
- Default policy enforces outbound allow / inbound deny isolation
- Suricata deployed for behavioral intrusion detection and alerting
- System operates in execution-restricted network mode during agent runtime
### Network Security Model
- TOR routing available for privacy-preserving traffic paths
- All LLM inference remains fully local (no external API dependency)
- MCP server restricted to localhost-bound execution only
## Installation & Setup
1. Prepare a Kali Linux environment with network security tooling (Suricata enabled)
2. Load Qwen 2.5-7B into LM Studio and expose local endpoint
3. Configure system firewall rules for isolated execution mode
4. Clone this repository
5. Install Python dependencies
6. Run the agent: `python agent_loop.py`
## Documentation
See the `docs/` folder for:
- Detailed setup instructions
- Firewall rule examples
- Suricata configuration
- MCP server setup
## System Behavior Loop
At runtime, the agent follows a continuous operational cycle:
1. Receive objective via structured input
2. Interpret intent using local LLM reasoning layer
3. Select appropriate tool(s) from MCP registry
4. Execute actions through MCP server
5. Collect and normalize results
6. Re-evaluate state and iterate until completion
## License
MIT
|