How hustinfseclabs/pentestassistant works
Project type and purpose
• PentestAssistant is an open-source, LLM-driven automation framework for web penetration testing.
• It uses a multi-agent workflow (planner, executor, refiner) plus function-call techniques to orchestrate pentest tools (nmap, sqlmap, etc.).
• It’s not a classic full-stack web app, but rather a CLI/daemon tool that integrates LLM APIs, local models, retrieval/reranking, and plugins.
File structure
• app.py: the CLI entrypoint and main orchestration bootstrap.
• config/: configuration loader (config.ini, config.py).
• log/: centralized logging module.
• agent/: definitions of the three LLM agents (Planner, Executor, Refiner, plus Analyst and Checker helpers).
• model/: adapters for ChatGPT, Qwen, Deepseek, Wenxin plus base classes.
• retrieval/: embedding and reranking modules (bge embedding, reranker, large multi reranker).
• planner/: internal planners and capability checkers, tool suggestion/shortening logic.
• plugin/: JSONL metadata for each pentest tool plus a plugin loader and executor interface.
• requirements.txt & LICENSE: dependencies and licensing.
Key README insights
• Multi-agent workflow:
• Planner proposes a plan and tool sequence.
• Executor invokes tools/plugins and processes results.
• Refiner iteratively improves or verifies results.
• Supports multiple LLM backends configured in config.ini.
• Uses a retriever/reranker model to pick the best API calls.
• Invokes external binaries (nmap, sqlmap, etc.) via plugin adapters.
Final recommendations
• Trace every interaction path: planner’s tool selection → executor’s tool invocation → refiner’s feedback loop.