Performing web application penetration test

From xalgorix/xalgorix · View interactive version

Performing web application penetration test is an AI agent skill from the GitHub repository xalgorix/xalgorix. Performs systematic security testing of web applications following the OWASP Web Security Testing Guide (WSTG) methodology to identify vulnerabilities in authentication, authorization, input validation, session management, and business logic. The tester uses Burp Suite as the primary interception pr

How to use this skill

Skill file

Performing Web Application Penetration Test

When to Use

Do not use against web applications without written authorization, against production systems during peak traffic hours without explicit approval, or for denial-of-service testing of web infrastructure.

Most Often Missed & How to Confirm

Prerequisites

Workflow

Step 1: Reconnaissance and Application Mapping

Map the entire attack surface of the web application:

Step 2: Authentication Testing

Test authentication mechanisms for weaknesses:

Step 3: Authorization Testing

Verify that access controls are properly enforced:

Step 4: Input Validation and Injection Testing

Test all input points for injection vulnerabilities:

Step 5: Session Management Testing

Evaluate the security of session handling:

Step 6: Business Logic Testing

Test application-specific logic flaws that automated scanners cannot detect:

Step 7: Report and Remediation Guidance

Compile all findings into a structured report:

Key Concepts

| Term | Definition |

|------|------------|

| OWASP WSTG | The Web Security Testing Guide; a comprehensive open-source guide to testing web application security organized by test category (authentication, authorization, input validation, etc.) |

| IDOR | Insecure Direct Object Reference; a vulnerability where the application exposes internal object identifiers and fails to verify the requesting user is authorized to access that object |

| CSRF | Cross-Site Request Forgery; an attack that forces an authenticated user's browser to send a forged request to a vulnerable web application |

| Session Fixation | An attack where the attacker sets a user's session ID to a known value before the user authenticates, then hijacks the session after login |

| Forced Browsing | Attempting to access application resources by directly requesting URLs not linked from the visible application, bypassing intended access controls |

| SSTI | Server-Side Template Injection; injecting template directives into server-side template engines to achieve remote code execution |

Tools & Systems

Common Scenarios

Scenario: E-Commerce Application Pre-Launch Security Assessment

Context: A retail company is launching a new e-commerce platform built on Node.js with a React frontend and PostgreSQL database. The application handles credit card payments through Stripe integration and stores customer PII. Testing scope includes the staging environment with full API access.

Approach:

  1. Map the application through manual browsing and API documentation review, identifying 47 unique endpoints
  2. Test authentication flows including social login (OAuth), standard login, and password reset
  3. Discover IDOR vulnerability in the order retrieval API (/api/orders/{orderId}) where any authenticated user can view any order by iterating order IDs
  4. Identify stored XSS in the product review feature that executes when administrators view the admin dashboard
  5. Find SSRF in the product image import function that allows reading AWS EC2 instance metadata
  6. Test payment logic by manipulating price values in the client-side cart before checkout submission
  7. Report all findings with specific Node.js code-level remediation (parameterized queries, input sanitization with DOMPurify, authorization middleware)

Pitfalls:

Output Format

## Finding: Insecure Direct Object Reference in Order API

**ID**: WEB-003
**Severity**: High (CVSS 7.5)
**Affected URL**: GET /api/v1/orders/{orderId}
**Parameter**: orderId (path parameter)

**Description**:
The order retrieval endpoint does not verify that the authenticated user owns
the requested order. Any authenticated user can access any order's details
including customer name, shipping address, email, phone number, and order
items by incrementing the orderId path parameter.

**Reproduction Steps**:
1. Authenticate as user A (testuser@example.com)
2. Note user A's order ID: 10451
3. Send GET /api/v1/orders/10452 with user A's session token
4. Observe that user B's order details are returned with full PII

**HTTP Request**:
GET /api/v1/orders/10452 HTTP/1.1
Host: staging.example.com
Authorization: Bearer eyJhbGc....[User A's token]

**HTTP Response** (truncated):
HTTP/1.1 200 OK
{"orderId":10452,"customerName":"Jane Smith","email":"jane@...","address":"123 Main St"}

**Impact**:
An attacker can enumerate all customer orders and extract PII (names, emails,
addresses, phone numbers) for an estimated 25,000 customers.

**Remediation**:
Add authorization middleware that verifies the authenticated user's ID matches
the order's userId field before returning order data. Implement UUIDs instead
of sequential integers for order identifiers to prevent enumeration.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.