This project aims to create an AI-powered pentesting assistant that leverages a Large Language Model (LLM) like Llama to generate, validate, and execute commands for security assessments. The assistant acts as an orchestrator, receiving user input, consulting the LLM for strategic guidance and command suggestions, executing those commands safely, and providing feedback.
- LLM Integration: Seamlessly communicates with a Llama/Ollama model for intelligent decision-making and command generation.
- Safe Command Execution: Implements a robust command execution mechanism with validation and potential sandboxing to prevent malicious or accidental system compromise.
- Orchestration: Manages the flow of interaction, from user input to LLM processing, command execution, and result feedback.
- Modular Design: Structured into clear modules for LLM interaction, command handling, and core assistant logic.
- Python 3.8+
requestslibrary (for API communication)- An LLM server (e.g., Ollama running a Llama model, or a locally hosted Llama instance) accessible via HTTP.
- Clone the repository:
git clone https://github.com/your-username/johnny-pentest-assistant.git cd johnny-pentest-assistant - Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate - Install dependencies:
pip install -r requirements.txt
Copy config.py.example to config.py and adjust the settings:
cp config.py.example config.py
# Open config.py and editEnsure LLM_API_URL points to your running Llama/Ollama instance.
python assistant.py [your_initial_command_or_query].
├── assistant.py # Main orchestration logic
├── config.py # Configuration settings (LLM API, safety, etc.)
├── llm_interface.py # Handles communication with the LLM
├── command_executor.py # Manages safe execution of system commands
├── requirements.txt # Python dependencies
├── README.md # Project documentation
└── .gitignore # Files/directories to ignore in Git
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License.