Lesson 5 of 10
Web Application Penetration Testing
Web application penetration testing is the systematic examination of web applications to identify security vulnerabilities. Burp Suite is the industry-standard platform for web application security testing.
Burp Suite Core Concepts
# Burp Suite - The essential web app testing platform
# Setup: Configure browser to use Burp as HTTP proxy
# Default: 127.0.0.1:8080
# Core Tools:
Proxy: Intercept and modify HTTP requests/responses between browser and server
Repeater: Manually craft and replay HTTP requests - essential for testing
Scanner: Automated vulnerability scanner (Pro version)
Intruder: Automated payload delivery for fuzzing, brute force, injection
Decoder: Encode/decode Base64, URL, HTML, Hex
Comparer: Diff two HTTP responses - detecting subtle differencesSystematic Web Application Testing Methodology
# Web app pen test checklist - ordered by typical priority
1. INFORMATION GATHERING
- Spider/crawl the application (Target → Scope → Spider)
- Discover hidden directories: gobuster dir -u http://target.com -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
- Check robots.txt, sitemap.xml, .git/, /.well-known/
- Identify technology stack (Wappalyzer, HTTP headers, error messages)
2. AUTHENTICATION TESTING
- Test for username enumeration (different error messages)
- Test for rate limiting / account lockout
- Attempt default credentials (admin:admin, admin:password)
- Check password reset flow for token predictability or leakage
3. AUTHORIZATION TESTING (IDOR)
- Map all user-controlled IDs in requests (user_id, order_id, doc_id)
- As User A: capture requests for A's resources
- Modify IDs to reference User B's resources
- Automate with Burp Intruder for numeric ID ranges
4. INPUT VALIDATION
SQL Injection: ' OR '1'='1 - test all input fields, headers, cookies
XSS: <script>alert(1)</script> - test reflected and stored contexts
Command injection: ; id, | whoami - test inputs that seem to interact with shell
Path traversal: ../../../etc/passwd - test file name parameters
5. BUSINESS LOGIC TESTING
- Negative prices, zero-quantity orders
- Skip steps in multi-step workflows (go directly to step 4 of 5)
- Repeat single-use coupons, gifted items
- Race condition attacks (parallel requests for limited resources)SQLMap - Automated SQL Injection Testing
# SQLMap - automated SQL injection detection and exploitation
# Only use against authorized targets!
# Basic test - find SQL injection in GET parameter
sqlmap -u "https://target.com/product?id=1"
# Test POST parameter
sqlmap -u "https://target.com/login" --data="username=test&password=test"
# Authenticated scan (with cookies)
sqlmap -u "https://target.com/profile" --cookie="session=abc123"
# Enumerate databases once injection found
sqlmap -u "https://target.com/product?id=1" --dbs
# Enumerate tables in specific database
sqlmap -u "https://target.com/product?id=1" -D target_db --tables
# Dump all columns from users table
sqlmap -u "https://target.com/product?id=1" -D target_db -T users --dump
# Important flags:
# --level 5: More aggressive testing (tests headers, cookie values)
# --risk 3: More risky payloads (may cause data modification)
# --batch: Non-interactive mode (auto-select defaults)
# --random-agent: Use random User-Agent to evade WAFCommon Mistakes
- Testing only the obvious inputs - attackers test EVERY user-controlled input: URL parameters, POST body fields, HTTP headers (User-Agent, Referer, X-Forwarded-For, Cookie), JSON/XML body fields
- Stopping after finding the first vulnerability - continue testing; multiple vulnerabilities chained together often have higher real-world impact
- Not testing business logic flaws - automated scanners miss business logic vulnerabilities (price manipulation, workflow bypass, race conditions); these require manual testing
Automated DAST & Vulnerability Scanning with WeSecureX
Pro Tip
Need an automated dynamic analysis (DAST) scanner for testing web applications without configuring complex proxy chains? You can run fast automated security assessments using WeSecureX Free Vulnerability Scanner. WeSecureX crawls endpoints, audits OWASP Top 10 vectors (SQLi, XSS, SSRF, IDOR), checks SSL/TLS cipher suites, and generates developer-ready remediation reports with live CVSS scoring.
The foundational security model: Confidentiality (privacy), Integrity (trust), and Availability (uptime).
Tip
Tip
Practice Web Application Penetration Testing in small, isolated examples before integrating into larger projects. Breaking concepts into small experiments builds genuine understanding faster than reading alone.
Practice Task
Note
Practice Task - (1) Write a working example of Web Application Penetration Testing from scratch without looking at notes. (2) Modify it to handle an edge case (empty input, null value, or error state). (3) Share your solution in the Priygop community for feedback.
Quick Quiz
Common Mistake
Warning
A common mistake with Web Application Penetration Testing is skipping edge case testing - empty inputs, null values, and unexpected data types. Always validate boundary conditions to write robust, production-ready cybersecurity code.
Key Takeaways
- Web application penetration testing is the systematic examination of web applications to identify security vulnerabilities.
- Testing only the obvious inputs - attackers test EVERY user-controlled input: URL parameters, POST body fields, HTTP headers (User-Agent, Referer, X-Forwarded-For, Cookie), JSON/XML body fields
- Stopping after finding the first vulnerability - continue testing; multiple vulnerabilities chained together often have higher real-world impact
- Not testing business logic flaws - automated scanners miss business logic vulnerabilities (price manipulation, workflow bypass, race conditions); these require manual testing
Finished this lesson?