Web Attacks

Cross-Site Scripting

  • Test every entry point (URL path, GET parameters, POST parameters, User-Agent, Cookies).

  • Submit random alphanumeric values (42424242).

  • Determine the reflection context:

    • HTML content

      • original code: <p> hello 42424242 </p>

      • payload: <img src=x onerror=alert(1)>

      • malicious code: <p> hello <img src=x onerror=alert(1)> </p>

    • Tag attribute

      • original code: <input name="test" value="42424242">

      • payload: "> <img src=x onerror=alert(1)>

      • malicious code: <input name="test" value=""> <img src=x onerror=alert(1)> ">

    • Existing JS code

      • original code: <script> user="42424242"; </scirpt>

      • payload: "; alert(1); /*

      • malicious code: <script> user=""; alert(1); /* "; </script>

  • Test a candidate payload for example <img src=x onerror=alert(1)>

  • Test alternative payloads to bypass the filters (Cheat sheet).

  • Test the attack in the browser.

SQL Injection

Blind SQL Injection

For all types of SQL databases see: SQL injection cheat sheet

SQLMAP

Command Injection

File Inclusion

Open Redirection & SSRF

Cross-Origin Resource Sharing

XML External Entity Injection

File Upload

CSRF

Click-Jacking

Authentication & Session Vulnerabilities

  1. Testing for Credentials Transported over an Encrypted Channel

  2. Testing for Default Credentials

  3. Testing for Weak Lock Out Mechanism

  4. Testing for Bypassing Authentication Schema

  5. Testing for Vulnerable Remember Password

  6. Testing for Browser Cache Weaknesses

  7. Testing for Weak Password Policy

  8. Testing for Weak Security Question Answer

  9. Testing for Weak Password Change or Reset Functionalities

  10. Testing for Weaker Authentication in Alternative Channel

  11. Testing for Session ID Predictability and Randomness

  12. Testing for Secure Cookies Attributes

  13. Testing for Exposed Session Variables

Access Control Vulnerabilities

Vertical privilege escalation

If a user can gain access to functionality that they are not permitted to access then this is vertical privilege escalation. For example, if a non-administrative user can in fact gain access to an admin page where they can delete user accounts, then this is vertical privilege escalation.

Horizontal privilege escalation (IDOR)

Horizontal privilege escalation arises when a user is able to gain access to resources belonging to another user, instead of their own resources of that type. For example, if an employee should only be able to access their own employment and payroll records, but can in fact also access the records of other employees, then this is horizontal privilege escalation.

Last updated