Performing a Basic and Quick Web Application Penetration Testing

Step 1: Information Gathering (Reconnaissance)

The first thing to do is to collect as much information as possible about the target site without interacting with it directly. This helps us to understand the structure of the web application.

 

Tools & Techniques:

 

WHOIS: Get the domain-specific information for the web.

Google Dorking: Helps find sensitive files using advanced search operators like site: example.com filetype:env.

Subdomain Enumeration: Sublist3r, Subfinder, and Amass are widely used to find hidden subdomains.

Identify Tech stack: WhatWeb and Wappalyzer are used to find the tech stack on which the particular website is built.

 

 

Step 2: Scanning and Enumeration

Once you have gained the initial background intel, move to active scanning to discover open services and files.

 

Tools:

 

Nmap: Scan for open ports and services.

nmap –sV –sC —top-ports 1000 example.com

Nikto: Check for outdated software, misconfigured headers, and dangerous files.

nikto –h http://example.com

Gobuster: Brute-force hidden directories and files.

gobuster dir -u http://example.com -w /usr/share/wordlists/dirb/common.txt

–   These steps reveal possible entry points for exploitation.

 

 

Step 3: Vulnerability Identification

Now, inspect the application for actual weakness.

 

What to look for:

 

  1. SQL Injection (SQLi)
  2. Cross-Site Scripting (XSS)
  3. Insecure Direct Object References (IDOR)
  4. Broken Authentication
  5. Exposed Sensitive Files or Endpoints
  6. Sensitive Data Exposure
  7. Cross-Site Request Forgery (CSRF)
  8. Server-Side Request Forgery (SSRF)

 

Tools:

 

  1. OWASP ZAP / Burp Suite: Intercept HTTP requests, tamper with parameters, and test for issues like insecure cookies or improper validation.
  2. sqlmap: Automate SQLi testing.
  3. Manually test inputs: Enter special characters (‘, <script>, ../) to check input validation.

–   Combining automated tools with manual testing is crucial for thorough results.

 

 

Step 4: Exploitation (Proof of Concept)

If a vulnerability is found, showcase its potential impact.

 

Examples:

 

  1. For SQLi: Dump one table of user data (e.g., usernames).
  2. For XSS: Trigger a harmless alert box.
  3. For IDOR: Access another user’s profile by changing the user ID in the URL.

–   Always avoid disrupting service or accessing unauthorized data. The goal is to show the risk, not cause damage.

 

 

Step 5: Post Exploitation

 

If access is gained:

 

  1. Check for privilege escalation, escalating user privilege  to admin privilege.
  2. Search for sensitive files like .env, config.php, and backup.zip.
  3. Test access to internal APIs or admin panels.

–   Only take this step if permission is given.

 

 

Step 6: Reporting

A good pen test is useless without a clear report.

 

Your report should include:

 

  • Vulnerability name and description
  • Steps to reproduce
  • Proof of concept
  • Impact/risk level
  • Remediation advice

 

Use understandable language, proofs, and overall risk ratings (e.g., Low/Medium/High or CVSS scores) so the development team can act quickly.