Overview
Blackbox testing with Pensar Apex simulates an external attacker’s perspective—you only have access to the live target URL and must discover the attack surface through probing, reconnaissance, and testing from the outside. This approach is ideal for:- Testing deployed production or staging environments
- Simulating real-world attack scenarios
- Validating external security posture
- Discovering publicly exposed vulnerabilities
Quick Start
Command Line Usage
For automated workflows or CI/CD integration, use the CLI directly:CLI Options
| Flag | Description | Example |
|---|---|---|
--target | Target URL, domain, or IP (required) | --target https://app.example.com |
--model | AI model to use | --model claude-sonnet-4-5 |
--mode | Pentest mode (e.g., exfil for pivoting & flag extraction) | --mode exfil |
How Blackbox Testing Works
Phase 1: Attack Surface Discovery
Apex uses the BlackboxAttackSurfaceAgent to systematically map your target’s attack surface:Initial Reconnaissance
- DNS enumeration and subdomain discovery
- Port scanning with nmap (if available)
- Technology stack fingerprinting
- HTTP header analysis
Endpoint Discovery
- Web crawling to discover pages and forms
- API endpoint enumeration
- Hidden directory discovery with gobuster
- Sitemap and robots.txt parsing
Phase 2: Vulnerability Testing
After discovering the attack surface, Apex launches targeted pentests against identified endpoints:- SQL injection
- Cross-site scripting (XSS)
- Authentication bypasses
- Authorization flaws
- Business logic vulnerabilities
- API security issues
- Configuration weaknesses
Best Practices
1. Use Proper Scoping
2. Run in the Kali Container
For best results, use the included Kali Linux container with pre-installed pentest tools:The Kali container includes nmap, gobuster, sqlmap, nikto, hydra, and other essential tools that Apex uses during blackbox testing.
3. Review Output Carefully
Apex saves all findings to your session directory:4. Test with Authentication
For authenticated testing, provide credentials during setup:Common Scenarios
Testing a Web Application
- Crawl the site to find all pages and forms
- Test each form for injection vulnerabilities
- Check for XSS in all input fields
- Test authentication and session management
- Probe API endpoints
- Generate a comprehensive report
Testing an API
- Enumerate endpoints from common paths
- Test authentication mechanisms
- Fuzz parameters for injection flaws
- Check for broken object level authorization (BOLA)
- Test rate limiting and DoS resistance
- Validate input validation
Testing with Subdomain Discovery
For comprehensive reconnaissance:- Enumerate subdomains (www, api, admin, dev, staging, etc.)
- Test each discovered subdomain
- Map relationships between services
- Identify the most critical attack paths
Comparing Blackbox vs Whitebox
| Aspect | Blackbox | Whitebox |
|---|---|---|
| Source Code | No access | Full access via --cwd |
| Discovery | External probing | Static analysis |
| Speed | Slower (network-based) | Faster (filesystem access) |
| Coverage | What’s exposed externally | Complete codebase |
| Use Case | Production testing | Pre-deployment security review |
For source code analysis, see the Whitebox Testing guide.
Troubleshooting
”Target is unreachable”
- Check network connectivity:
curl -I https://target.com - Verify the target URL is correct
- Check if a VPN or firewall is blocking access
- If using Docker, ensure proper network mode (see Docker Setup)
“No endpoints discovered”
- The target may require authentication—provide credentials
- The site may be blocking automated tools—use browser-based testing
- Increase timeout values if the site is slow
- Check that the target is not a single-page app requiring JavaScript rendering
”Rate limited”
Apex automatically handles rate limiting by:- Detecting 429 responses
- Sleeping for 120 seconds
- Retrying the request
- Repeating until successful or max retries exceeded
Rate limiting is expected behavior for security testing. Apex will persist through temporary rate limits automatically.
Next Steps
Whitebox Testing
Learn how to test with source code access
Authentication
Configure authentication for protected targets
Docker Setup
Set up the recommended Kali container environment
vLLM Setup
Run Apex with local models for offline testing

