/init
Overview
The /init command launches the session initialization wizard, guiding you through configuring and starting a new penetration test. This is the primary way to begin security testing in Apex.
Usage
How It Works
When you run /init, Apex presents a streamlined wizard that walks you through:
Target Configuration
Enter your session name and target URL. The session name is auto-generated but can be customized.
Target Step
The first step collects basic information:
Session Name
An auto-generated name like swift-falcon that identifies your session. Edit this if you prefer a custom name.
Target URL
The primary URL to test, e.g., https://example.com. This is required to start the test.
Quick Start: Enter your target URL and press [Enter] to begin testing immediately with default settings.
Optional Configuration
Press [Tab] from the target step to access advanced configuration options:
Authentication
Configure credentials for authenticated testing:
Login URL
The URL of the login page, e.g., https://example.com/login
Username & Password
Credentials for authenticating to the target application. These are used to test authenticated functionality.
Auth Instructions
Custom authentication instructions for complex login flows, e.g., “Use OAuth flow, extract bearer token…”
Scope Constraints
Define boundaries for the penetration test:
Specific hostnames the agent is allowed to test. Add multiple hosts by pressing Enter after each.
Specific ports to include in testing scope (e.g., 443, 8080).
Strict Scope: When enabled, the agent will only test explicitly allowed hosts and ports. Use ↑/↓ to toggle.
Request Headers
Configure how the agent identifies itself:
For custom headers, you can add multiple key-value pairs.
Keyboard Navigation
Example Workflow
Session Configuration Options
The init wizard creates a session with the following configurable options:
Authentication Config
- Login URL: Where to authenticate
- Username/Password: Credentials for testing
- Instructions: Custom auth flow instructions
Scope Constraints
- Allowed Hosts: Hostnames in scope
- Allowed Ports: Ports in scope
- Strict Scope: Only test explicitly allowed targets
Header Config
- None: No offensive headers
- Default: Standard pensar-apex User-Agent
- Custom: Your own headers
Best Practices
Tips for Effective Testing:
- Use descriptive session names to easily identify tests later
- Configure authentication for testing protected endpoints
- Define scope constraints to stay within authorized boundaries
- Use custom headers if the target requires specific identification
Security Reminder: Only test systems you own or have explicit authorization to test. Unauthorized testing is illegal.
After Starting
Once you start a session:
- The AI agent begins reconnaissance on your target
- Real-time progress is displayed in the terminal
- Vulnerabilities are reported as they’re discovered
- The session is automatically saved for later review