WebApp PenTest

Penetration Testing. Vulnerability Assessment. Security Auditing.

Complete reference guide for web application penetration testing. From enumeration and fingerprinting to injection testing and vulnerability discovery. Essential tools and techniques for ethical security assessment.

🎯 Web Application Security Testing

Comprehensive toolkit for identifying vulnerabilities, misconfigurations, and security weaknesses in web applications through systematic enumeration and targeted exploitation techniques.

15+
Tools
8
Categories
Expert
Level

⚠️ Legal and Ethical Guidelines

πŸ”„ Testing Methodology

Follow this systematic approach for comprehensive web application security assessment:

1
Reconnaissance & Enumeration (whatweb, feroxbuster)
2
Directory & File Discovery (feroxbuster, dirb)
3
Vulnerability Scanning (nikto, wapiti, nmap NSE)
4
Authentication Testing (hydra, cewl)
5
Injection Testing (sqlmap, XSStrike)
6
Configuration Analysis (davtest, SSL testing)
πŸ”

Web App Enumeration

Fingerprint technologies, frameworks, and plugins

whatweb
Fingerprint frameworks & plugins
whatweb http://192.168.1.XX/
Identifies web technologies, CMS, frameworks, JavaScript libraries, and server information
πŸ’‘ Pro Tips:
β€’ Use -v for verbose output
β€’ Try --aggression 3 for more thorough detection
β€’ Use --log-brief for clean output
wapiti
Automated web vulnerability scanner
wapiti -u http://192.168.1.XX/ -f txt -o wapiti_report.txt
Similar to Nikto but broader coverage - scans for XSS, SQL injection, file disclosure, etc.
πŸ’‘ Advanced Options:
β€’ -m "all,-backup" - exclude backup file detection
β€’ --scope domain - limit to specific domain
β€’ -v 2 - increase verbosity
πŸšͺ

Authentication / Login Tests

Brute force attacks and credential testing

hydra
Brute-force login forms
hydra -l admin -P /usr/share/wordlists/rockyou.txt 192.168.1.XX http-post-form "/login.php:username=^USER^&password=^PASS^:Invalid login"
Customize the form parameters and failure message based on the target application
πŸ’‘ Common Variations:
β€’ http-get for basic auth
β€’ -L userlist.txt for multiple users
β€’ -t 10 to control thread count
β€’ -f to stop after first valid credential
cewl
Custom wordlist from target site
cewl http://192.168.1.XX/ -w webnode_words.txt
Creates targeted wordlists based on content found on the website
πŸ’‘ Advanced Usage:
β€’ -d 2 - spider depth
β€’ -m 5 - minimum word length
β€’ -e - include email addresses
β€’ --lowercase - convert to lowercase
πŸ’‰

Injection Testing

SQL injection and XSS vulnerability detection

sqlmap
Automated SQL injection testing
sqlmap -u "http://192.168.1.XX/workflow/search.php?q=test" --batch
Requires real query parameters - look in /workflow, /survey, or other dynamic pages
πŸ’‘ Advanced Options:
β€’ --dbs - enumerate databases
β€’ --tables -D database_name - enumerate tables
β€’ --dump -T table_name -D database_name - dump data
β€’ --risk 3 --level 5 - aggressive testing
XSStrike
Advanced XSS detection tool
xsstrike -u "http://192.168.1.XX/workflow/search.php?q=test"
Finds XSS payload spots with context-aware testing
πŸ’‘ Usage Tips:
β€’ --crawl - automatically crawl for parameters
β€’ --blind - test for blind XSS
β€’ --fuzzer - use built-in fuzzer
β€’ Test forms with --data "param=value"
πŸ“‚

File & Directory Discovery

Enumerate hidden files, directories, and endpoints

feroxbuster
Fast, recursive directory brute-forcer
feroxbuster -u http://192.168.1.XX/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -o ferox.txt
Faster than Gobuster with recursive scanning capabilities
πŸ’‘ Useful Flags:
β€’ -x php,html,txt - specify extensions
β€’ -t 50 - increase threads
β€’ -d 2 - recursion depth
β€’ --filter-status 404 - filter responses
πŸ›‘οΈ

Config & Server Checks

Server configuration and security analysis

nikto
Web server vulnerability scanner
nikto -h http://192.168.1.XX -Plugins apache,cookies,headers,vuln
Enhanced Nikto scan with specific plugins for detailed analysis
πŸ’‘ Plugin Options:
β€’ -Plugins auth - authentication bypasses
β€’ -Plugins paths - interesting paths
β€’ -o report.txt - save output
β€’ -Format txt - specify output format
davtest
WebDAV vulnerability testing
davtest -url http://192.168.1.XX/
Checks if WebDAV is enabled and tests file upload vulnerabilities
πŸ’‘ Advanced Testing:
β€’ -directory /webdav - specify WebDAV path
β€’ -sendbd auto - auto detect file upload
β€’ Look for PUT/MOVE/COPY methods in HTTP responses
⚑

Network / Protocol Testing

Network-level analysis and protocol testing

nmap NSE
HTTP-specific Nmap scripts
nmap -p80,443 --script=http-enum,http-vuln*,http-headers 192.168.1.XX
Enumerates paths, headers, and CVEs using Nmap's scripting engine
πŸ’‘ Useful HTTP Scripts:
β€’ http-methods - enumerate HTTP methods
β€’ http-robots.txt - check robots.txt
β€’ http-title - extract page titles
β€’ http-backup-finder - find backup files
testssl.sh
Comprehensive SSL/TLS testing
testssl.sh https://192.168.1.XX
More detailed SSL analysis than sslscan - checks protocols, ciphers, vulnerabilities
πŸ’‘ Specific Checks:
β€’ -U - check for vulnerabilities only
β€’ -p - check protocols only
β€’ -S - check server defaults
β€’ --htmlfile report.html - HTML output
πŸ“‹

Posture Auditing

System hardening and configuration assessment

lynis
System security auditing
sudo lynis audit system
Run on the target system (if owned) for hardening advice and security misconfigurations
πŸ’‘ Audit Options:
β€’ --check-all - run all available tests
β€’ --report-file /tmp/report.dat - custom report location
β€’ --verbose - detailed output
β€’ Review suggestions in /var/log/lynis-report.dat
πŸ•ΈοΈ

Spidering & Advanced Scanning

Comprehensive application crawling and analysis

arachni
Advanced web application scanner
arachni http://192.168.1.XX/ --output-only-positives
More advanced scanner than basic tools - includes smart crawling and vulnerability detection
πŸ’‘ Advanced Features:
β€’ --scope-include-pattern - limit scope
β€’ --report-save-path=/tmp/report - save report
β€’ --checks=xss,sql_injection - specific checks
β€’ --browser-cluster-pool-size=2 - performance tuning

πŸ“‹ Example Target Formats

Single Host
192.168.1.XX
With Protocol
http://192.168.1.XX/
With Port
http://192.168.1.XX:8080/
Specific Path
http://192.168.1.XX/app/