> For the complete documentation index, see [llms.txt](https://security.andreasbreum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://security.andreasbreum.com/red-team/web-hacking.md).

# Web Hacking

Web hacking is a vast and complex topic, so this section is split into multiple sections.

However, we cannot talk about web hacking without mention OWASP Top 10.

*"The* [*OWASP Top 10*](https://owasp.org/www-project-top-ten/) *is a standard awareness document for developers and web application security. It represents a broad consensus about the most critical security risks to web applications."*

I have a [section](/capture-the-flag/owasp-juice-shop.md) on under "Capture The Flag" on the OWASP Juice Shop, showcasing various common web vulnerabilities found in the OWASP Top 10.

| Vulnerability                                  | Description                                                                                                                                           | Example                                                                                                                                                               |
| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Broken Access Control**                      | Failure to enforce proper access restrictions, allowing unauthorized users to access certain functionality or data in a web application.              | In a banking application, an unauthorized regular customer can access the admin panel, potentially compromising sensitive financial data.                             |
| **Cryptographic Failures**                     | Weaknesses in encryption and hashing mechanisms used to protect sensitive data in a web application, potentially leading to data leakage.             | An e-commerce website employs outdated encryption algorithms, enabling attackers to intercept and decrypt payment data during transmission.                           |
| **Injection**                                  | Exploitation of untrusted data that is improperly processed and executed as code within a web application, such as SQL or script injection.           | A poorly secured web application allows an attacker to submit malicious SQL code in an input field, leading to unauthorized access and data breaches.                 |
| **Insecure Design**                            | Vulnerabilities in the fundamental architecture and design of a web application that can lead to security breaches.                                   | A social media platform's flawed design allows users to manipulate URLs and access each other's private content, violating user privacy.                              |
| **Security Misconfiguration**                  | Vulnerabilities arising from improper configuration of web applications, servers, or databases, exposing weaknesses.                                  | An incorrectly configured web server displays detailed error messages, revealing system information and making it susceptible to targeted attacks.                    |
| **Vulnerable and Outdated Components**         | Vulnerabilities resulting from outdated components like libraries or plugins in web applications.                                                     | An outdated plugin in a content management system (CMS) allows attackers to gain unauthorized access to the CMS, risking the entire website's security.               |
| **Identification and Authentication Failures** | Vulnerabilities arising from inadequately verifying user identities and managing authentication, potentially leading to unauthorized access.          | Weak or missing authentication controls in a web application enable unauthorized users to access sensitive data and perform actions reserved for authenticated users. |
| **Software and Data Integrity Failures**       | Vulnerabilities resulting from failures to ensure the integrity of software and data, which may lead to malicious alterations or unauthorized access. | Lack of data integrity checks allows attackers to alter sensitive data in a web application, potentially leading to data tampering or breaches.                       |
| **Security Logging and Monitoring Failures**   | Vulnerabilities linked to inadequate security logging and monitoring, making it difficult to detect and respond to security incidents.                | Failing to log and monitor security events in a web system may result in missed critical alerts and security breaches, leading to delayed responses.                  |
| **Server-Side Request Forgery**                | A vulnerability where an attacker tricks a web application into making unintended and unauthorized requests to internal resources.                    | Forcing a web application to access internal resources can lead to data exposure, service disruption, and potentially compromise sensitive information.               |
