A penetration testing agent powered by local LLMs via Ollama
Project description
pen-tester-agent
A penetration testing agent powered by local LLMs via Ollama.
pen-tester-agent gives a locally-running language model the ability to propose and execute shell commands on your machine — with your approval on every step. It's designed for structured penetration testing workflows across six key domains.
Penetration Testing Domains
- OSINT — Open source intelligence gathering (WHOIS, DNS, subdomain enumeration, email harvesting)
- Enumeration — Service enumeration, directory brute-forcing, SMB/LDAP/SNMP enumeration
- OS/Application Identification — Version detection, OS fingerprinting, web technology fingerprinting
- CVE/Vulnerability Search — Looking up known CVEs, searching exploit databases
- Vulnerability Testing — Active testing for SQL injection, XSS, misconfigurations, default credentials
- Documentation — Writing penetration test reports, documenting findings, saving evidence
Installation
# From PyPI
pip install pen-tester-agent
# Or with pipx (isolated install)
pipx install pen-tester-agent
# Or directly from GitHub
pip install git+https://github.com/fdsimoes-git/pen-tester-agent.git
Prerequisites
- Ollama installed and running
- A model pulled (default:
qwen2.5-coder:3b):ollama pull qwen2.5-coder:3b
Usage
# Interactive mode — prompts you for a task
pen-tester-agent
# Pass a task directly
pen-tester-agent "scan open ports on 192.168.1.1"
# Use a different model
pen-tester-agent --model llama3.1:8b "review nginx access.log for suspicious requests"
# Limit iterations
pen-tester-agent --max-iterations 5 "enumerate subdomains of example.com"
# Running from source (development)
uv run pen-tester-agent
Interactive CLI
When launched without a task, the agent presents an interactive menu (navigate with arrow keys):
- New penetration test task — describe a task and the agent works through it step by step
- Quit
During a session, every tool call is shown for approval via an arrow-key menu (approve / reject / edit args). Bash command output streams in real-time. A spinner indicates when the LLM is thinking or a non-bash tool is running.
At any interaction point during a session you can choose to generate a report from the session history or quit.
How it works
- You describe a task in natural language.
- The agent (running locally via Ollama) reasons about the task and proposes a tool call (shell command, CVE lookup, file read/write, etc.).
- You review and approve/edit/reject the action via arrow-key menu.
- Bash output streams live to the terminal; the full output is fed back to the agent.
- Repeat until the task is complete or you stop.
- Generate a structured pentest report from the session at any time.
Disclaimer
This tool executes shell commands on your machine. Always review proposed commands before approving them. Use responsibly and only on systems you own or have explicit written authorization to test. The authors are not responsible for any misuse or damage.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pen_tester_agent-1.0.0.tar.gz.
File metadata
- Download URL: pen_tester_agent-1.0.0.tar.gz
- Upload date:
- Size: 29.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
520f2da54b294a13f8dd0623f7ba2b1cd2c4b0d4792680ba39424134dfc8d517
|
|
| MD5 |
1c3e12f161b3569a9263ab78875b6eb6
|
|
| BLAKE2b-256 |
6140d59de9805540ee4a5d3a5e3bc50f5cf3d9b0615fa35a18629e7621b0879a
|
Provenance
The following attestation bundles were made for pen_tester_agent-1.0.0.tar.gz:
Publisher:
publish.yml on fdsimoes-git/pen-tester-agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pen_tester_agent-1.0.0.tar.gz -
Subject digest:
520f2da54b294a13f8dd0623f7ba2b1cd2c4b0d4792680ba39424134dfc8d517 - Sigstore transparency entry: 1259513127
- Sigstore integration time:
-
Permalink:
fdsimoes-git/pen-tester-agent@cc075edc4abfd11a7d6b04b8f0d50c82ead47dcf -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/fdsimoes-git
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cc075edc4abfd11a7d6b04b8f0d50c82ead47dcf -
Trigger Event:
release
-
Statement type:
File details
Details for the file pen_tester_agent-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pen_tester_agent-1.0.0-py3-none-any.whl
- Upload date:
- Size: 39.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7e69576c01b57ec2e224458ee650abec1b0c101acf175b7524c608d6d8d0d0b
|
|
| MD5 |
ca45478db28060e12d22c5fb7016f4f7
|
|
| BLAKE2b-256 |
3b5d76800d0ea3ab49c008c5b65c6fbdd8fa0df7ce6103b91668baeb78e5ebcd
|
Provenance
The following attestation bundles were made for pen_tester_agent-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on fdsimoes-git/pen-tester-agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pen_tester_agent-1.0.0-py3-none-any.whl -
Subject digest:
f7e69576c01b57ec2e224458ee650abec1b0c101acf175b7524c608d6d8d0d0b - Sigstore transparency entry: 1259513194
- Sigstore integration time:
-
Permalink:
fdsimoes-git/pen-tester-agent@cc075edc4abfd11a7d6b04b8f0d50c82ead47dcf -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/fdsimoes-git
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cc075edc4abfd11a7d6b04b8f0d50c82ead47dcf -
Trigger Event:
release
-
Statement type: