Skip to main content

A penetration testing agent powered by local LLMs via Ollama

Project description

Pen-Tester Agent

pen-tester-agent

License: MIT

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

  1. OSINT — Open source intelligence gathering (WHOIS, DNS, subdomain enumeration, email harvesting)
  2. Enumeration — Service enumeration, directory brute-forcing, SMB/LDAP/SNMP enumeration
  3. OS/Application Identification — Version detection, OS fingerprinting, web technology fingerprinting
  4. CVE/Vulnerability Search — Looking up known CVEs, searching exploit databases
  5. Vulnerability Testing — Active testing for SQL injection, XSS, misconfigurations, default credentials
  6. 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

  1. You describe a task in natural language.
  2. The agent (running locally via Ollama) reasons about the task and proposes a tool call (shell command, CVE lookup, file read/write, etc.).
  3. You review and approve/edit/reject the action via arrow-key menu.
  4. Bash output streams live to the terminal; the full output is fed back to the agent.
  5. Repeat until the task is complete or you stop.
  6. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pen_tester_agent-1.0.0.tar.gz (29.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pen_tester_agent-1.0.0-py3-none-any.whl (39.1 kB view details)

Uploaded Python 3

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

Hashes for pen_tester_agent-1.0.0.tar.gz
Algorithm Hash digest
SHA256 520f2da54b294a13f8dd0623f7ba2b1cd2c4b0d4792680ba39424134dfc8d517
MD5 1c3e12f161b3569a9263ab78875b6eb6
BLAKE2b-256 6140d59de9805540ee4a5d3a5e3bc50f5cf3d9b0615fa35a18629e7621b0879a

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pen_tester_agent-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pen_tester_agent-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7e69576c01b57ec2e224458ee650abec1b0c101acf175b7524c608d6d8d0d0b
MD5 ca45478db28060e12d22c5fb7016f4f7
BLAKE2b-256 3b5d76800d0ea3ab49c008c5b65c6fbdd8fa0df7ce6103b91668baeb78e5ebcd

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page