rainit2006 / CISSP

0 stars 0 forks source link

OWSAP Top 10 #14

Open rainit2006 opened 1 month ago

rainit2006 commented 1 month ago

OWASP Top10

AWS WAF -- Addressing OWASP Top 10 risks

https://aws.amazon.com/developer/application-security-performance/articles/addressing-owasp-top-10-risks/?nc1=h_ls

In addition to the custom rules that you configure in AWS WAF, it's recommended to use Amazon Managed Rules (AMR). (AMRs) is a set of rules inspired by OWASP top 10 and maintained by the AWS Threat Research Team. It's designed to to protect applications from the most common and high-severity threats while keeping a very low false positive rate across all customers. https://aws.amazon.com/jp/developer/application-security-performance/articles/addressing-owasp-top-10-risks/

rainit2006 commented 1 month ago

The OWASP Top 10 (2021): What They Are and How to Test Them

https://www.bleepingcomputer.com/news/security/the-owasp-top-10-what-they-are-and-how-to-test-them/amp/

  1. Broken Access Control Broken access control refers to placing insufficient restrictions on what authenticated users are allowed to do in an app. These flaws in the implementation of user permissions and rights allow users to perform actions or access data beyond their intended privileges. An example of broken access control is where a standard user simply manipulates a URL to access admin functionalities in the app without proper privileges.

To test a web app for broken access control security risks, consider the following strategies:

The most important preventative measure is to design and implement a robust role-based access control (RBAC) system. Ensure that each user role has the minimum necessary permissions (least privilege principle). Enforce these roles consistently throughout the application, both on the front end and back end.

  1. Cryptographic Failures This security risk relates to the problem of the improper implementation or usage of cryptography, such as using outdated algorithms or incorrect key management configurations. Skilled hackers can trivially bypass weak or misconfigured cryptography to tamper with a web app or access sensitive data.

To test for this risk:

  1. Injection Injection flaws in web applications allow attackers to craft malicious inputs that can trick an app into executing unintended commands. The most well-known type is SQL injection, where hackers manipulate a web app's database queries.

To test your web app for injection risks:

  1. Insecure Design Insecure design in web applications means architectural and foundational choices that inherently lack security considerations. These risky choices may render an app vulnerable to attack, regardless of individual code-level security measures.

The testing strategies for insecure design are more nuanced and include:

  1. Security Misconfiguration Security misconfiguration in web applications occurs when security settings and controls are improperly implemented, left at default values, or overlooked entirely. The risks of misconfigurations include unprotected files, directories, or databases that facilitate unintended access to valuable data or system capabilities.

Hurried deployments and a lack of security awareness are the primary causes of these risks.

To test your web applications for security misconfigurations:

  1. Vulnerable and Outdated Components Vulnerable and outdated components in web applications refer to third-party libraries, plugins, frameworks, and other software modules that have known security vulnerabilities but have not been updated or patched by the developers.

Web applications that rely on vulnerable components inherit their weaknesses, which provides a potential path for threat actors to exploit.

To test web applications for vulnerable/outdated components:

  1. Identification and Authentication Failures Flawed authentication mechanisms, such as weak password policies, lack of multi-factor authentication, or improperly implemented session management enable attackers to impersonate legitimate users or bypass authentication checks altogether. These failures pave the way for unauthorized data access, identity theft, and potential takeover of user accounts.

To test for this OWASP Top 10 risk:

  1. Software and Data Integrity Failures Software and data integrity failures occur when an application has an inability to ensure the authenticity and trustworthiness of data and application code. Integrity is about ensuring that data and code remain unaltered and genuine from their original state. Failures in software and data integrity introduce the risk of unauthorized modifications that lead to fraudulent transactions or malicious code being inserted into the application.

To test for these failures, consider:

  1. Security Logging and Monitoring Failure This risk relates to the insufficient recording of activities in an app or the inability to proactively detect and respond to malicious actions in real time.

A lack of detailed logs or the absence of monitoring creates blind spots that prevent timely detection of unauthorized access, data breaches, or other malicious activities.

To assess if a web application has these risks:

  1. Server-Side Request Forgery (SSRF) Server-Side Request Forgery (SSRF) is a security vulnerability in which an attacker manipulates a web application into making unwanted requests to internal resources or third-party systems on behalf of the server.

This risk facilitates lateral movements in network infrastructures and enables attackers to interface with backend services or exfiltrate data.

To test for SSRF:

rainit2006 commented 1 month ago

Using Burp to Test for the OWASP Top Ten (2017)

https://portswigger.net/support/using-burp-to-test-for-the-owasp-top-ten

1. Injection

Using Burp to Test For Injection Flaws

Injection Attack: Bypassing Authentication

Using Burp to Detect SQL-specific Parameter Manipulation Flaws image image Using Burp to Exploit SQL Injection Vulnerabilities: The UNION Operator Using Burp to Detect Blind SQL Injection Bugs Using Burp to Exploit Bind SQL Injection Bugs

2. Broken Authentication and Session Management

Using Burp to Brute Force a Login Page Using Burp to Test for Sensitive Data Exposure Issues

Injection Attack: Bypassing Authentication image

Using Burp to Hack Cookies and Manipulate Sessions

Using Burp to Test Token Generation

  1. Using Burp Decoder to decode Session Tokens
  2. Using Burp Sequencer to Test Session Tokens. Burp Sequencer will repeatedly issue the request and extract the relevant token from the application's responses.
  3. Using Burp Intruder to Test Session Tokens. On "Payloads" tab, under the "Payload Sets" header, use the drop down menu to select either the "Character frobber" or "Bit flipper" payload type.

Using Burp to Test Session Token Handling

Forced Browsing

Using Burp to Test for Insecure Direct Object References

3. Cross-Site Scripting (XSS)

Using Burp to Find Cross-Site Scripting Issues Using Burp to Manually Test for Reflected XSS image

Using Burp to Exploit XSS - Injecting in to Scriptable Contexts

4. Insecure Direct Object References

Using Burp to Test for Insecure Direct Object References

5. Security Misconfiguration

Using Burp to Test for Security Misconfiguration Issues

6. Sensitive Data Exposure

Using Burp to Test for Sensitive Data Exposure Issues

7. Missing Function Level Access Control

Using Burp to test for Missing Function Level Access Control Using Burp's "Request in Browser" Function to Test for Access Control Issues

8. Cross-Site Request Forgery (CSRF)

Using Burp to Test for Cross-Site Request Forgery (CSRF)

video: https://www.youtube.com/watch?v=NtggatbBetU

9. Using Burp to Test for Components with Known Vulnerabilities

Using Burp to Test for Components with Known Vulnerabilities

10. Unvalidated Redirects and Forwards

Using Burp to Test for Open Redirections

rainit2006 commented 1 month ago

XML external entity (XXE) injection

https://portswigger.net/web-security/xxe image

SSRF

Server-side request forgery is a web security vulnerability that allows an attacker to cause the server-side application to make requests to an unintended location.

In a typical SSRF attack, the attacker might cause the server to make a connection to internal-only services within the organization's infrastructure. In other cases, they may be able to force the server to connect to arbitrary external systems. This could leak sensitive data, such as authorization credentials.

Example When a user views the stock status for an item, their browser makes the following request:

POST /product/stock HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 118

stockApi=http://stock.weliketoshop.net:8080/product/stock/check%3FproductId%3D6%26storeId%3D1

This causes the server to make a request to the specified URL, retrieve the stock status, and return this to the user.

In this example, an attacker can modify the request to specify a URL local to the server:


POST /product/stock HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 118

stockApi=http://localhost/admin

The server fetches the contents of the /admin URL and returns it to the user.

Instead of localhost, attacker can try to use other IP address: In the previous example, imagine there is an administrative interface at the back-end URL https://192.168.0.68/admin. An attacker can submit the following request to exploit the SSRF vulnerability, and access the administrative interface:

POST /product/stock HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 118

stockApi=http://192.168.0.68/admin
rainit2006 commented 1 month ago

Web cache deception

Burp Scanner automatically detects web cache deception vulnerabilities that are caused by path mapping discrepancies during audits. You can also use the Web Cache Deception Scanner BApp to detect misconfigured web caches.