
yuhano/pentestgpt-mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
Автоматизированный тестирующий агент, который думает с LLM и действует с MCP.
Обзор
Этот проект является передовым инструментом тестирования на проникновение на основе оригинальной бумаги «PentestGPT». Он расширяет основные возможности путем интеграции с серверами протокола Model Context Protocol (MCP) для выполнения автоматизированных оценок безопасности на основе LLM. Он основан на проекте PentestGPT. * Оригинальный репозиторий GitHub: https://github.com/GreyDGL/PentestGPT * Оригинальный исследовательский документ (USENIX Security '24): https://www.usenix.org/conference/usenixsecurity24/presentation/deng Подключается к различным серверам инструментов, работающим локально или удаленно, через гибкий файл конфигурации mcp servers.json. Автоматически выполняет задачи, предлагаемые LLM, используя инструменты, предоставляемые подключенным MCP-сервером. Поддерживает подтверждение пользователя перед каждым выполнением инструмента, повышая безопасность и контроль во время автоматизированного сканирования. Работает с широким спектром поставщиков LLM, включая OpenAI (серия GPT) и Google (серия Gemini). Установите необходимые пакеты Python из requirements.txt.
Обзор (машинный перевод)
Этот проект является передовым инструментом тестирования на проникновение на основе оригинальной бумаги «PentestGPT». Он расширяет основные возможности путем интеграции с серверами протокола Model Context Protocol (MCP) для выполнения автоматизированных оценок безопасности на основе LLM.
Он основан на проекте PentestGPT. Репозиторий GitHub: https://github.com/GreyDGL/PentestGPT Оригинальная исследовательская работа (USENIX Security '24): https://www.usenix.org/conference/usenixsecurity24/presentation/deng
Читайте это на корейском
Особенности
Dynamic MCP Server Integration: подключается к различным серверам инструментов, работающим локально или удаленно через гибкий файл конфигурации mcp_servers.json.
Автоматизированное выполнение задач (auto): Автоматически выполняет задачи, предлагаемые LLM, используя инструменты, предоставляемые подключенным MCP-сервером.
Интерактивный режим «Человек в петле»: Поддерживает подтверждение пользователя перед каждым выполнением инструмента, повышая безопасность и контроль во время автоматизированного сканирования.
** Гибкая поддержка моделей**: работает с широким спектром LLM-провайдеров, включая OpenAI (серия GPT) и Google (серия Gemini).
##Установка
###1.Клонируйте хранилище и создайте виртуальную среду
###2 Установите зависимость
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
PentestGPT-MCP
This project is an advanced penetration testing tool based on the original “PentestGPT” paper. It extends the core capabilities by integrating with Model Context Protocol servers (MCPs) to perform automated, LLM-driven security assessments.
It is based on the PentestGPT project.
- Original GitHub Repository: https://github.com/GreyDGL/PentestGPT
- Original Research Paper (USENIX Security '24): https://www.usenix.org/conference/usenixsecurity24/presentation/deng
Features
- Dynamic MCP Server Integration: Connects to various tool servers running locally or remotely via a flexible
mcp_servers.jsonconfiguration file. - Automated Task Execution (
automode): Automatically executes LLM-suggested tasks using tools provided by a connected MCP server. - Interactive “Human-in-the-Loop” Mode: Supports user confirmation before each tool execution, enhancing safety and control during automated scans.
- Flexible Model Support: Works with a wide range of LLM providers, including OpenAI (GPT series) and Google (Gemini series).
Installation
1. Clone the Repository and Set Up a Virtual Environment
git clone https://github.com/your-username/PentestGPT-MCP.git
cd PentestGPT-MCP
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
2. Install Dependencies
Install the required Python packages from requirements.txt.
pip install -r requirements.txt
3. Configure API Keys
PentestGPT-MCP requires API keys to interact with Large Language Models. Set the appropriate environment variables for the model you wish to use.
For OpenAI (e.g., gpt-4o):
export OPENAI_API_KEY="your-openai-api-key"
For Google (e.g., Gemini):
export GOOGLE_API_KEY="your-google-api-key"
4. Set Up MCP Servers
The tool manages connections to MCP servers through a central JSON configuration file.
1. Copy the Example Configuration
Copy the example file from the config/ directory to the project root.
cp config/mcp_servers.json.example ./mcp_servers.json
2. Edit the Configuration File
Open mcp_servers.json and customize it to match your environment.
Configuration Example:
{
"mcpServers": {
"pentest-tools": {
"command": "python",
"args": [
"mcp_servers/pentest_tools_server.py"
]
},
"kali_mcp": {
"command": "python3",
"args": [
"/absolute/path/to/mcp_server.py",
"http://LINUX_IP:5000/"
]
}
}
}
Configuration Structure:
mcpServers: The root object containing all server configurations."server-name": A unique, user-defined name for each server (e.g.,"pentest-tools").command: The command to execute the server (e.g.,python,python3,node).
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →Конфигурация
{
"mcpServers": {
"pentest-tools": {
"command": "python",
"args": [
"mcp_servers/pentest_tools_server.py"
]
},
"kali_mcp": {
"command": "python3",
"args": [
"/absolute/path/to/mcp_server.py",
"http://LINUX_IP:5000/"
]
}
}
}