Skip to main content

Quickstart Guide

Get started with Pensar Apex and run your first automated penetration test in minutes. This guide walks you through launching the tool, configuring it, and running both interactive and command-line pentests.
Before starting, ensure you have:
  • Installed Pensar Apex (Installation Guide)
  • Configured an AI provider API key
  • Run pensar doctor to verify your setup

Launch the Interactive TUI

The easiest way to get started is using the interactive Terminal User Interface (TUI):

First Launch Experience

1

Accept Responsible Use Disclosure

On first launch, you’ll see the Responsible Use Disclosure screen:
Press Enter to accept and continue.
2

Configure AI Provider (if needed)

If no API key is detected, you’ll be routed to the Provider Manager screen:
  • Select your AI provider (Anthropic, OpenAI, etc.)
  • Enter your API key
  • Choose a default AI model
The TUI will guide you through this configuration. Your settings are saved to ~/.pensar/config.json.
3

Start Testing

Once configured, you’ll see the main Pensar Apex interface with options to:
  • Start a new pentest session
  • Resume previous sessions
  • Configure settings
  • View keyboard shortcuts

TUI Navigation

Use these keyboard shortcuts to navigate the TUI:
  • Ctrl+P: Open command palette (access all features)
  • Ctrl+C: Cancel current operation (press twice to exit)
  • Tab: Switch between input fields
  • ↑/↓: Navigate through lists and history
  • Enter: Select/confirm
  • Esc: Go back/cancel
  • Ctrl+S: View and manage sessions
  • Ctrl+N: Start new pentest session
  • Ctrl+R: Resume previous session
  • Ctrl+L: Clear screen
  • Ctrl+H: Show help dialog
  • Ctrl+K: Show keyboard shortcuts
  • Ctrl+Q: Quick exit

Run Your First Pentest

Let’s run a penetration test against a target. We’ll demonstrate both interactive and command-line approaches.

Interactive Mode (TUI)

1

Launch Pensar

2

Start New Pentest

  • Press Ctrl+P to open the command palette
  • Select “Start Pentest” or press Ctrl+N
  • Choose pentest type:
    • Blackbox: Test a live target without source code
    • Whitebox: Test with source code access
    • Targeted: Focus on specific objectives
3

Configure Target

Enter your target details:
  • Target URL/IP: https://example.com
  • Source path (whitebox only): /path/to/source
  • AI Model: Select from available models
4

Watch the Agent Work

The AI agent will begin testing, showing real-time progress:
  • Attack surface discovery
  • Endpoint enumeration
  • Vulnerability testing
  • Exploitation attempts
  • PoC generation
5

Review Results

When complete, view:
  • Discovered vulnerabilities
  • Severity ratings
  • Proof-of-concept code
  • Detailed findings report

Command-Line Mode

For automation and scripting, use the CLI directly:

Blackbox Penetration Test

Test a live target without source code access:

Whitebox Penetration Test

Test with source code access for deeper analysis:

Targeted Penetration Test

Focus on specific vulnerabilities or objectives:

CLI Options

string
required
Target URL, domain, or IP address to test
string
Path to source code for whitebox testing
string
Pentest mode: exfil enables pivoting and flag extraction
string
AI model to use (default: claude-sonnet-4-5)
string
Testing objective for targeted pentests (can be used multiple times)

Understanding the Output

Findings File

Vulnerabilities are saved in structured JSON format at:

Proof-of-Concept Files

Exploits are saved in the pocs/ directory:

Report File

A human-readable markdown report is generated at:

Advanced Usage

Using Different AI Models

Specify a custom AI model for your pentest:
Available models depend on your configured provider. Common options:
  • claude-sonnet-4-5 (Anthropic, recommended)
  • claude-opus-4 (Anthropic, most capable)
  • gpt-4o (OpenAI)
  • gpt-4-turbo (OpenAI)

Exfil Mode for Red Teams

Enable pivoting and flag extraction for CTF or red team exercises:
Exfil mode enables more aggressive testing techniques including pivoting, lateral movement, and data exfiltration. Only use on systems you have explicit permission to test.

Resume Previous Sessions

View and resume previous pentest sessions:
Or access session files directly:

Using Local Models (vLLM)

For air-gapped environments or local model deployment:
1

Start vLLM Server

2

Configure Pensar

3

Select Custom Model

In the TUI Models screen, enter your model name in the “Custom local model (vLLM)” input:

Best Practices

When testing a new application, start with targeted pentests focused on specific objectives. This helps you understand the agent’s capabilities and provides faster, more focused results.
Monitor the agent’s actions in real-time to:
  • Understand its testing methodology
  • Learn new attack techniques
  • Catch false positives early
  • Stop tests that are going off-track
Always manually validate vulnerabilities before reporting:
  • Run the provided PoC scripts
  • Verify the impact and exploitability
  • Test remediation recommendations
  • Document additional context
If you have access to source code, use whitebox testing for:
  • More comprehensive vulnerability coverage
  • Logic flaw detection
  • Configuration issue identification
  • Faster and more accurate results
Use descriptive names for sessions and organize findings:

Troubleshooting

Symptoms: Agent repeats the same actions or doesn’t discover anythingSolutions:
  • Press Ctrl+C to cancel the current operation
  • Try a different AI model (Anthropic models work best)
  • Use targeted pentest with specific objectives
  • Verify the target is accessible and responding
Symptoms: Pentest completes but reports 0 findingsSolutions:
  • The target may be well-secured (this is good!)
  • Try whitebox testing with source code access
  • Use targeted testing with specific vulnerability types
  • Ensure nmap is installed for network scanning
  • Check that the target is reachable and responding
Symptoms: Agent stops with API errorsSolutions:
  • Check your AI provider’s rate limits and quotas
  • Wait a few minutes and resume the session
  • Switch to a different AI provider
  • Consider using a local vLLM model for unlimited usage
Symptoms: Generated exploit code fails to runSolutions:
  • Verify the target is still vulnerable (may have been patched)
  • Check for missing dependencies in the PoC script
  • Manually adjust the script based on error messages
  • The vulnerability may be a false positive—validate manually

Next Steps

CLI Reference

Complete command-line reference for all pensar commands

TUI Guide

Learn advanced TUI features and keyboard shortcuts

Configuration

Customize Pensar Apex settings and preferences

Environment Variables

Configure Pensar Apex for CI/CD and automation

Get Help

Documentation

Browse the full documentation

Discord Community

Ask questions and share experiences

GitHub Issues

Report bugs or request features