
I recently attended a Secure Code Training course hosted by PrivSec Consulting. The course broadly followed the OWASP Top Ten, representing the most critical security risks to web applications.
The course highlighted how easy it is to miss small issues with significant security implications and the importance of understanding and mitigating these vulnerabilities. The course goes much more in-depth about each vulnerability, known exploits, and hands-on exercises to exploit them yourself which were particularly helpful in understanding each vulnerability's anatomy. I highly recommend this course to anyone interested in application security or penetration testing.
This article summarizes the key takeaways and mitigations discussed in the course.
The list is in the same order as the OWASP Top 10, which is sorted from most to least impactful. This isn't to say that number 10 on the list can't be just as devastating as number 1; it just outlines the broader risk as identified by OWASP.
If you want to learn more, hit us up at Abletech!
Being able to access things you shouldn't be able to can result in users being able to edit another user's account data, access restricted pages, perform actions while unauthenticated, or read arbitrary files via path traversal.
Exploit example: If relying purely on client-side validation, a malicious user might change information in the payload sent to the server, such as making changes to another user's data by changing the user ID in the request body.
Mitigations:
A breakdown in encryption/security that leads to exposing sensitive data.
Examples include:
Exploit example: A malicious user could find a secret key hard-coded into JavaScript and use it to impersonate other users.
Mitigations:
When a client is providing data, there is a possibility of injection where the user can cause some unexpected behavior with their input.
Examples include:
Exploit example: If an application is sorting items on a page using query params with keywords like DESC or ASC, they might be feeding these user inputs straight into the SQL query. We can send another malicious query instead and potentially get information about the structure of the database or users' password hashes.
Mitigations:
This refers to design flaws in application development that expose security risks and may be consequences of application architecture.
Examples include:
.git in the web root.Exploit example: If your application returns an error saying this user doesn't have an account on the login or reset flow for provided email addresses, a malicious user can use this to determine which accounts exist and use this information in further vulnerabilities.
Mitigations:
This refers to security settings or configurations that may be implemented or set improperly.
Examples include:
Exploit example: A default admin account exists for some applications. If the password for this account hasn't been changed, malicious users may be able to access the application's admin functionality with a known default username/password.
Mitigations:
Components are constantly being updated and improved as new vulnerabilities are discovered. It is important to keep them up to date as older versions may be susceptible to other vulnerabilities on this list.
Exploit example: A malicious user is able to use a known flaw in a dependency to compromise your application.
Mitigations:
Security weaknesses in the application's identification and authentication processes that lead to unauthorized access.
Exploit example: If you aren't prompting for the current password when changing a user's password, a malicious user can leverage this to use cross-site scripting to take over another user's account.
Mitigations:
Code and infrastructure that doesn't protect against integrity violations can lead to unauthorized software modification and malicious code execution.
Exploit example: If a malicious user is able to replace a package your application depends on, or if you are using an untrusted package in the first place, they might be able to compromise your application without you knowing.
Mitigations:
This occurs when there is insufficient logging or monitoring which might leave you unaware of suspicious activities or when security breaches may have occurred.
Exploit example: If a malicious user is attempting to brute force a bunch of different path combinations in the hopes of gaining some information about the system and you aren't being alerted, this may go unnoticed and you won't have the chance to stop them.
Mitigations:
This is a vulnerability that allows an attacker to cause the server-side application to make requests to an unintended location, often bypassing security controls.
Exploit example: A malicious user may upload an SVG image that contains a URL to some domain they control. If this is executed, it may be used to gain information from the server.
Mitigations: