Wapiti: The Web Application Auditor
Wapiti stands as a robust, open-source tool dedicated to web application security auditing. It operates as a "black-box" scanner, meaning it interacts with the application from the outside-in, just like an attacker, without needing access to the source code. Wapiti intelligently crawls web applications, discovering endpoints, forms, and parameters, then launches targeted attacks (module-based) to identify a wide spectrum of vulnerabilities.
Wapiti simulates real-world attacker behavior by interacting with web applications externally, making it ideal for security assessments where source code access isn't available. This approach helps identify vulnerabilities that would be exploitable by external attackers.
WARNING: Web vulnerability scanners like Wapiti actively probe and inject potentially harmful payloads. NEVER run Wapiti against any website or web application without explicit, written authorization from the owner. Unauthorized scanning is illegal and can cause disruptions or damage. Confine all usage to authorized tests or personal lab environments.
Injection Detection
SQL Injection, Command Execution, XPath Injection, XXE, and SSRF vulnerabilities
XSS Detection
Reflected and Stored Cross-Site Scripting vulnerability identification
File Inclusion
Local and Remote File Inclusion (LFI/RFI) and Directory Traversal detection
Configuration Testing
Backup file detection, HTTP security headers, and insecure configurations
Installation & Setup
Prerequisites
Wapiti relies on Python 3. Ensure you have Python 3 and `pip` installed on your system.
sudo apt update
sudo apt install python3 python3-pip git -yIt's highly recommended to install Python packages within a virtual environment to avoid system-wide dependency conflicts.
python3 -m venv wapiti-env
source wapiti-env/bin/activateInstallation Methods
pip install wapiti3wapiti --versionwapiti --helpCore Capabilities and Detected Vulnerabilities
Comprehensive Vulnerability Detection
Wapiti's strength lies in its modular design and comprehensive vulnerability checks across multiple security domains.
Primary Vulnerability Categories
| Category | Specific Vulnerabilities | Impact Level |
|---|---|---|
| Injection Flaws | SQL Injection, Command Execution, XPath Injection, XXE, SSRF | Critical |
| Cross-Site Scripting | Reflected XSS, Stored XSS, DOM-based XSS | High |
| File Inclusion | Local File Inclusion (LFI), Remote File Inclusion (RFI) | High |
| Configuration Issues | Backup files, HTTP security headers, insecure methods | Medium |
| Session Security | CSRF detection, cookie security, authentication issues | Medium |
| Information Disclosure | Application fingerprinting, CMS detection, subdomain takeover | Low-Medium |
Wapiti directly supports the Hacking Web Applications domain of the CEH curriculum. Its ability to detect vulnerabilities like SQL Injection, XSS, Command Injection, File Inclusion, and others aligns perfectly with the practical skills expected of a Certified Ethical Hacker.
Core Usage and Workflow
Basic Scan
The most straightforward scan targets a URL and uses default modules and scope:
wapiti -u http://target-domain.com/Wapiti will start crawling from the base URL and launch default attack modules against discovered endpoints.
General Workflow
Understanding Wapiti's workflow helps in planning effective security assessments:
- Target Definition: Specify the target URL (
-u) or API definition (--swagger) - Scope Control: Define how far Wapiti should crawl (
--scope) and exclude paths (-x) - Authentication: Provide credentials via cookies, HTTP Auth, or form parameters
- Module Selection: Choose specific modules (
-m) or exclude modules (-xm) - Crawling & Attack Tuning: Adjust depth, timeouts, concurrency, and headers
- Reporting: Specify output format (
-f) and file (-o) - Execution & Analysis: Run the scan and analyze generated reports
Advanced Command-Line Options
Targeting & Scope Control
wapiti -u http://target.com/ --scope {page|folder|domain|subdomain|url|punk}wapiti -u http://target.com/ -x /logout|/adminwapiti -u http://target.com/ -m sqli,xss,xxewapiti --list-modulesAuthentication Mechanisms
wapiti -u http://target.com/ -c session_cookies.txtwapiti -u http://target.com/ --form-target /login.php --form-user username --form-password password --form-cred admin:password123Network & Performance Tuning
wapiti -u http://target.com/ -p http://127.0.0.1:8080wapiti -u http://target.com/ --torwapiti -u http://target.com/ --tasks 15 -t 30Practical Examples & CEH Scenarios
wapiti -u http://vulnerable-app.lab/ -m sqli,xss,xxe,exec,ssrf -f html -o owasp_scan.html -v 1This command scans the target URL, running only modules related to SQL Injection, XSS, XXE, Command Execution, and SSRF. Outputs an HTML report with verbosity level 1 for detailed logging.
Directly tests for several vulnerabilities listed in the OWASP Top 10, a critical knowledge area for CEH focusing on web application security risks.
wapiti -u http://secure-portal.lab/dashboard/ -c session_cookies.txt --scope folder -f json -o dashboard_scan.jsonScans only within the `/dashboard/` directory using authentication cookies provided in the file. This approach is essential for testing application functionality behind login forms.
wapiti -u https://modern-webapp.lab/ -d 5 --headless hidden -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" -H "X-Requested-With: XMLHttpRequest" -o deep_scan.html -f htmlCrawls up to depth 5, uses a headless browser for JavaScript rendering, sets a specific User-Agent and custom header to simulate real browser behavior.
Hands-On Activities
- Set up a test environment with a vulnerable web application (DVWA, bWAPP, etc.)
- Run a basic Wapiti scan to discover the application structure
- Analyze initial findings and identify high-priority vulnerabilities
- Run targeted scans using specific modules for critical vulnerabilities
- Generate comprehensive reports in multiple formats
- Document findings with evidence and severity ratings
wapiti -u http://test-app.local/ -m all -f html,json -o comprehensive_scan -v 2- Configure Wapiti for form-based authentication against a test application
- Test various authentication endpoints and parameters
- Identify potential authentication bypass vulnerabilities
- Test session management and cookie security
- Document authentication-related security issues
wapiti -u http://auth-test.local/ --form-target /login --form-user email --form-password password --form-cred test@test.com:password123 -m auth,csrf -o auth_scan- Identify API endpoints using Swagger/OpenAPI documentation
- Configure Wapiti to target API-specific endpoints
- Test for API-specific vulnerabilities (injection, authentication issues)
- Validate input validation and error handling
- Generate API-specific security reports
wapiti --swagger http://api.test.local/swagger.json -H "Authorization: Bearer token123" -f json -o api_scan.json -m sqli,xxe,exec --tasks 5- Prioritize by Severity: Focus on high-impact findings like SQL Injection, Command Execution, XXE first
- Verify Findings: Always manually verify reported vulnerabilities to eliminate false positives
- Understand Context: Analyze where vulnerabilities were found to determine exploitability
- Leverage Detailed Info: Use request/response pairs in reports for verification
- Combine with Manual Testing: Use Wapiti as a starting point for deeper manual security testing
Conclusion: Wapiti as Part of Your Toolkit
Wapiti is a versatile and powerful automated web application scanner that serves as an excellent addition to any ethical hacker's arsenal. Its strength lies in its wide range of vulnerability modules, flexible configuration options, and clear reporting. By mastering its command-line interface and understanding how to tailor scans effectively, you can significantly speed up the process of identifying common web security weaknesses.
- Wapiti provides comprehensive black-box web application security testing
- Modular design allows targeted vulnerability scanning
- Flexible authentication options enable testing of protected areas
- Multiple output formats support integration with other tools
- Regular updates ensure coverage of latest vulnerabilities
- Always verify findings manually and operate within authorized scopes
Automated web application scanners like Wapiti are powerful tools that must be used responsibly. Always ensure you have explicit, written permission before scanning any systems. Unauthorized scanning is not only unethical but also illegal in many jurisdictions. Use these skills to improve security posture, not to compromise systems. Document your findings responsibly and follow proper disclosure procedures.