The Open Worldwide Application Security Project (OWASP) is an online community that produces freely available articles, methodologies, documentation, tools, and technologies in the fields of IoT, system software and web application security (Wikipedia). In this post, I want to share the top 10 security threats published by OWASP. The list is regularly updated by OWASP, the following list is based on 2021 publication.
Broken Access Control
This security issue can be caused by many things such as violation of the least privilege principle, unprotected API endpoints, use of unique identifiers without permission checking, and so on. There are several threats related to broken access control.
- Insecure Direct Object Reference. It happens when an application provides direct access to objects based on user-supplied input. For example, after submitting a form, the endpoint returns an ID of the object being submitted while with that ID, a user can access the information of the object directly.
- Insecure Session Management. It happens when an application fails to properly secure and manage user sessions. This can be caused by weak session token generation, improper session storage or transmission mechanism, and lack of session timeouts or termination mechanisms. This can result in a data breach, unauthorized access, or other malicious activities utilizing the compromised session.
- Cross-Site Request Forgery (CSRF). In a CSRF attack, the attacker tricks the user into performing actions on a site they are already authenticated on, without the user’s knowledge or consent. The attack is executed by exploiting the web application’s failure to properly validate the source of incoming requests. It typically involves crafting malicious links, embedding them in seemingly innocuous content such as emails or web pages, and then enticing the user to click on those links.
- Security Misconfiguration. This can happen on any layer of the application stack. For example, some tools or platforms do not provide built-in authentication by default, leaving the responsibility of implementation to developers. Such a case allows unrestricted access by default, making sensitive information vulnerable to unauthorized access by attackers.
Cryptographic Failure
This issue can be caused by a lot of factors such as outdated algorithms, insufficient key length, improper key management, or weak random number generation. There are a few common issues related to cryptographic failure.
- Insecure Randomness. It is related to a weak random number generator that is used in generating any kind of token or key that results in a predictable token or key.
- Deprecated Hash Function. It is considered an outdated or insecure cryptographic algorithm due to advances in technology or the discovery of vulnerabilities.
Injection
Injection attacks are a type of cyber-attack where an attacker submits malicious data to a web application, which in turn gets executed or processed by the application. Vulnerability of this attack can exist when the system accepts input from the user without proper sanitization or accepts dynamic queries without valid escaping. Common types of injection are as follows.
- SQL Injection. This can be prevented by input validation and the use of parameterized queries.
- OS Command Injection. It is an attack in which the goal is the execution of arbitrary commands on the host operating system via a vulnerable application. Some web applications may execute or call OS commands or tools in the backend service for certain purposes like editing images, converting videos, gathering certain metrics, etc.
- LDAP Injection. LDAP is commonly used for authentication, authorization, and user management purposes. This injection is a type of security vulnerability that occurs when an attacker can manipulate LDAP queries sent by a web application.
Insecure Design
It is different from implementation defects where a secure design may have insecure implementation. One of the factors that contribute to insecure design is the lack of business risk profiling inherent in the software or system being developed. A few examples of insecure design are as follows.
- Insufficient input validation
- Insecure data storage
- Weak authentication and session management
- Insecure communication
- Misconfigured security settings
To help us create a secure design, threat modelling becomes necessary. The approach for threat modelling can be based on asset, system design, attacker perspective, or list (assessment checklist). In general, there are several steps we can run.
- Identify all assets in the system
- Create a model that explains the architecture, components, and data flow.
- Identify possible threats to the identified assets
- Define the risks based on the likelihood and impacts of the threats
- Define the mitigation plan
Related to threat modeling, the list-centric approach can have some benefits such as simplicity, standardized procedures, or coverage. But, it may lack at some point to handle context-related issues of the system. So, it is good to use a list-centric approach along with other approaches.
There is a standard developed by OWASP to help us assess our system which is named ASVS (Application Security Verification Standard). We can see the details and download the document HERE.
Moreover, suppose we want to be better at mapping the threats and mitigation actions. In that case, we can design an RTM (Requirement Traceability Matrix) that lists all functions in the system, possible threats and attack scenarios, and mitigation. For defining threats, we can use the STRIDE methodology that categorizes threats into common types which are spoofing, tampering, repudiation, information disclosure, denial of service, and elevation of privilege.
Security Misconfiguration
Any framework or tool used in our web application may be shipped with some security-related configuration. This configuration, if it is not managed well, can pose certain vulnerabilities in our web application. Some factors lead to security misconfiguration.
- Default Configuration. In most software or tools, the default configuration is provided to ease the usage of the tools at the starting point or to keep the process lightweight in the first place. The default configuration issue can be in the form of default credentials, insecure communication protocol, unprotected resources, insecure or outdated encryption algorithms, unused features or services, etc.
- Insecure Settings. An application can have some security-related settings such as access control settings, information visibility, authentication methods, etc. Improper settings can pose risks to the user or the system itself like unauthorized access, data breaches, data tampering, and so on.
- Outdated Software & Libraries. Using outdated software can pose some risks like security vulnerabilities, incompatibility issues, limited support, and compliance issues.
Vulnerable and Outdated Components
Component is anything that is part of the application. It can be a module, library, API, etc. If we don't monitor and regularly verify the security of components in our application, the application might have vulnerabilities and pose some threats. OWASP provides tools to help us identify all components in our application and analyse the risks.
- CycloneDX. This tool is used to generate Software Bill of Materials (SBOM) or details of components that construct our application. It supports a variety of programming platforms like Java, Node.js, PHP, etc. To get the tool, we can visit the CycloneDX GitHub page.
- OWASP Dependency Track. This tool is used to analyse the risks of your application based on details in the BOM. So, typically we should generate BOM using tools like CyclonDX first then provide the result to this tool to be analysed. Installation and usage guides are available on its website.
Identification and Authentication Failure
This condition can be caused by many factors such as allowing user to use a weak password, no rate limiting feature in the login endpoint, insecure credentials storage, etc. There are some threats related to identification and authentication failure.
- Brute Force. In this attack, all combinations of username and password are checked. But, it becomes impractical when the number of characters in the credentials is quite long.
- Dictionary Attack. It is a kind of brute force attack that leverages a list of common credentials used by people.
Another reason for this failure is the use of insecure comments. Comments in a program source code should be regularly reviewed to prevent accidental sensitive data exposure like login details or information about the system that can be leveraged by adversaries to craft the attack.
Software and Data Integrity Failure
This happens when the application developer doesn't well monitor the integrity of the software like allowing insecure software patches, use of unverified third-party libraries, or applying insecure CI/CD pipelines.
- Insecure Object Deserialization. Serialization is commonly used to stream an object from one machine to another or to store the object in storage for later use. When performing deserialization to retrieve the object back, it is important to perform validation before executing anything contained in the object. This can lead to types of attacks like remote code execution, injection, or denial of service by making the system crash.
- Rogue CDN or Untrusted Sources. It is discouraged to utilize tools or libraries provided by untrusted sources in our application. It can be like self-XSS. This can lead to issues related to privacy, availability, or data integrity.
Security Logging And Monitoring Failure
The indications of this failure are such as no log for failed login, no error log generated by the errors that happen in the application, no log for suspicious activities, no alert generated from a security incident, and so on. There are disadvantages if we don't implement a proper logging and monitoring system.
- Ineffective incident response
- Failed to maintain regulatory compliance
- Undetected security breach
- Lack of early-warning and preventive mechanism
Server-Side Request Forgery (SSRF)
It allows an attacker to induce the server-side application to make HTTP requests to an arbitrary domain of the attacker’s choosing. This is typically used by the attacker to access URLs that normally shouldn't be allowed for public but are accessible from the exploited server because the server is already behind the firewall or inside a private network. This risk can occur when the server application accepts URL input from the client and makes a call based on the URL without proper sanitisation.
Comments
Post a Comment