Here’s a clear, step by step breakdown of commands, tools, and objectives for each section in your Web Security Testing Guide (WSTG). Each test includes easy to follow commands, explanations, and examples where applicable.
Here’s a clear, step-by-step breakdown of commands, tools, and objectives for each section in your Web Security Testing Guide (WSTG). Each test includes easy-to-follow commands, explanations, and examples where applicable.
🛡️ Information Gathering
WSTG-INFO-01: Conduct Search Engine Discovery Reconnaissance for Information Leakage
Objective: Find sensitive design/configuration information on public-facing search engines.
Commands:
Tool:
Google Dorks
Explanation: These commands search for exposed PDFs, admin panels, or directory listings.
WSTG-INFO-02: Fingerprint Web Server
Objective: Identify the web server type/version.
Commands:
Tools:
curl
,WhatWeb
,nmap
Explanation:
curl
shows server headers,WhatWeb
fingerprints technologies, andnmap
probes server details.
WSTG-INFO-03: Review Webserver Metafiles for Information Leakage
Objective: Look for hidden paths, metadata files.
Commands:
Tools:
curl
,dirb
,gobuster
Explanation:
robots.txt
andsitemap.xml
may reveal sensitive paths.
WSTG-INFO-04: Enumerate Applications on Webserver
Objective: Identify applications running on the server.
Commands:
Tools:
nmap
Explanation: Scans for common web applications.
WSTG-INFO-05: Review Web Page Content for Information Leakage
Objective: Analyze page comments, metadata, and JavaScript.
Commands:
Tools:
wget
, browserInspect Element
Explanation: Review source code and comments.
WSTG-INFO-06: Identify Application Entry Points
Objective: Map potential entry points.
Commands: Use Burp Suite or OWASP ZAP
Tools:
Burp Suite
,ZAP
Explanation: Analyze requests and responses.
🛠️ Configuration and Deployment Management Testing
WSTG-CONF-01: Test Network Infrastructure Configuration
Objective: Validate secure configurations.
Commands:
Tools:
nmap
Explanation: Scans all open ports and services.
WSTG-CONF-02: Test Application Platform Configuration
Objective: Ensure default files and debug code are removed.
Commands:
Tools:
dirb
,gobuster
Explanation: Looks for common default files and debug endpoints.
WSTG-CONF-03: Test File Extensions Handling for Sensitive Information
Objective: Look for exposed sensitive files.
Commands:
Tools:
curl
,ffuf
Explanation: Check sensitive file extensions.
🔑 Identity Management Testing
WSTG-IDNT-01: Test Role Definitions
Objective: Assess role-based access controls.
Commands: Use Burp Suite for manual testing.
Tools:
Burp Suite
Explanation: Try role switching via intercepted requests.
WSTG-IDNT-04: Testing for Account Enumeration and Guessable User Account
Objective: Detect account enumeration vulnerabilities.
Commands:
Tools:
hydra
Explanation: Test account enumeration via brute-force techniques.
🔐 Authentication Testing
WSTG-ATHN-02: Testing for Default Credentials
Objective: Test if default passwords exist.
Commands:
Tools:
hydra
Explanation: Test common admin credentials.
WSTG-ATHN-03: Testing for Weak Lock Out Mechanism
Objective: Test account lockout after failed attempts.
Tools:
Burp Suite Intruder
Explanation: Simulate brute-force attacks and monitor lockout behavior.
🧾 Session Management Testing
WSTG-SESS-01: Testing for Session Management Schema
Objective: Check session token randomness and security.
Tools:
Burp Suite
,OWASP ZAP
Explanation: Analyze session cookies and tokens for predictability.
WSTG-SESS-05: Testing for Cross Site Request Forgery (CSRF)
Objective: Check if CSRF protection is enabled.
Tools:
Burp Suite
Explanation: Remove CSRF token in intercepted requests and test.
🧠 Business Logic Testing
WSTG-BUSL-01: Test Business Logic Data Validation
Objective: Identify bypassable validation points.
Tools:
Burp Suite
,Postman
Explanation: Modify payloads manually and observe application behavior.
📦 API Testing
WSTG-APIT-01: API Reconnaissance
Objective: Identify API endpoints and parameters.
Commands:
Tools:
gau
,httpx
Explanation: Gather URLs and validate them.
WSTG-APIT-99: Testing GraphQL
Objective: Identify GraphQL vulnerabilities.
Commands:
Tools:
GraphQLmap
Explanation: Probe for introspection queries.
🚀 Common Tools for All Tests
Recon:
nmap
,WhatWeb
,dirb
,gobuster
Scanning:
Nikto
,OWASP ZAP
,Burp Suite
Exploitation:
SQLMap
,Metasploit
API Testing:
Postman
,GraphQLmap
Validation:
httpx
,ffuf
Custom Script 1
Here's a one-of-a-kind Bash script tailored for bug hunters. It automates reconnaissance, scanning, and enumeration tasks from the WSTG list, validates tools, and provides a menu-driven interface to let you choose the specific test you want to run.
🐚 BugHunterPro.sh – The Ultimate Bug Hunting Toolkit
🚀 Key Features:
Interactive Menu: Choose specific WSTG tasks easily.
Target Input Validation: Ensures user provides a valid target.
Tool Auto-Installer: Checks and installs missing tools.
Automation Ready: Executes tailored commands for each task.
Easy Setup: Supports one-time setup.
📜 The Script
Copy this script into a file named BugHunterPro.sh
:
🛠️ Setup Instructions
Save the file:
nano BugHunterPro.sh
Make it executable:
chmod +x BugHunterPro.sh ```
Run the script:
sudo ./BugHunterPro.sh ```
🚀 Features Overview
Target Validation: Ensures proper input.
Tool Validation: Installs missing tools.
Automation: Executes commands from WSTG efficiently.
Expandable: Easily add new tasks or tools.