Skip to content
Threats Guide

02

Web Application Security

Web application security focuses on securing websites, web applications, and web services from various cyber threats. This section covers common web vulnerabilities, their detection methods, and prevention strategies.

6 topics, 14 scripts

Read the full category guide

Back to Main

Overview

Web application security focuses on securing websites, web applications, and web services from various cyber threats. This section covers common web vulnerabilities, their detection methods, and prevention strategies.

Categories Covered

  1. SQL Injection
  2. Cross-Site Scripting (XSS)
  3. Cross-Site Request Forgery (CSRF) (planned)
  4. Session Hijacking (planned)
  5. File Inclusion Vulnerabilities (planned)
  6. Security Misconfiguration (planned)

OWASP Top 10:2025

The current list, published by OWASP in late 2025. Categories that map to a topic in this repository are linked.

RankCategoryWhat it covers
A01Broken Access ControlUsers act outside their permissions; now also includes server-side request forgery (SSRF)
A02Security MisconfigurationInsecure defaults, unnecessary features, exposed admin interfaces
A03Software Supply Chain FailuresCompromised dependencies, build systems and distribution channels
A04Cryptographic FailuresWeak or missing encryption, exposed sensitive data
A05InjectionSQL, NoSQL, OS command injection and cross-site scripting
A06Insecure DesignMissing security controls at the design stage
A07Authentication FailuresWeak login, session and credential handling
A08Software or Data Integrity FailuresUnverified updates, plugins and CI/CD pipeline changes
A09Security Logging and Alerting FailuresMissing logs and alerts, so attacks go unnoticed
A10Mishandling of Exceptional ConditionsErrors and failures handled in ways that expose data or break security checks

Source: owasp.org/Top10/2025. Last reviewed 2026-10-10. Earlier versions of this page showed the 2021 list.

Quick Start

# Navigate to specific vulnerability directory
cd sql-injection/detection/

# Run vulnerability scanner
python3 sql_injection_detector.py -u http://testphp.vulnweb.com/artists.php

# Check prevention examples
cd ../prevention/
python3 parameterized_queries.py

Web Security Testing Tools

Automated Scanners

  • OWASP ZAP – Open source web application security scanner
  • Burp Suite – Web vulnerability scanner and testing platform
  • Nuclei – Fast template-based vulnerability scanner
  • Arachni – Feature-rich web application security scanner

Manual Testing Tools

  • cURL – Command-line tool for making HTTP requests
  • Postman – API development and testing platform
  • Wireshark – Network protocol analyzer and traffic analysis tool
  • Browser DevTools – Built-in browser tools for client-side debugging (Chrome, Firefox, Edge)

Security Testing Methodology

Reconnaissance → Scanning → Vulnerability Assessment → Exploitation (Ethical) → Reporting → Remediation

Best Practices

Development Phase

  • Secure Coding – Follow OWASP secure coding guidelines
  • Input Validation – Validate all user inputs
  • Output Encoding – Prevent XSS attacks
  • Parameterized Queries – Prevent SQL injection
  • CSRF Tokens – Protect state-changing operations

Deployment Phase

  • Security Headers – Implement CSP, HSTS, X-Frame-Options
  • HTTPS Everywhere – Encrypt all traffic
  • Least Privilege – Grant minimal required permissions
  • Regular Updates – Apply patches and updates consistently
  • Web Application Firewall (WAF) – Deploy WAF protection

Maintenance Phase

  • Regular Scanning – Perform automated vulnerability scans
  • Penetration Testing – Conduct manual security testing
  • Bug Bounty Program – Enable crowdsourced security testing
  • Security Training – Provide ongoing developer education
  • Incident Response – Prepare and test breach response plans

Important Notes

  • Always obtain proper authorization before testing
  • Use isolated testing environments
  • Document all findings responsibly
  • Follow responsible disclosure practices
  • Some tools may trigger security alerts

Additional Resources


Learning Platforms

Source folder: 02-web-application-security