The product/program does not validate or validate poorly or input that can disrupt a program's control flow or data flow.
1/N 🧵
2/N
When software fails to properly validate input, an attacker can construct it in a way that the rest of the application does not expect. As a result, components of the system may receive unwanted input, resulting in a change in control flow or even arbitrary code execution.
3/N The flaw appears during the Architecture and Design, as well as the implementation stages.
It allows to:
- Cause the Program to Stop
- Set Arbitrary Command Execution
- Cause Excessive Expenditure of Resources
- Read and Compromise Personal Information
4/N
Input validation can be applied to - 1. Raw Data - Strings, Numbers, Parameters, File Contents, etc. 2. Metadata - Information about the raw data, such as headers or size
Upon entering the code, many properties of raw data or metadata may need to be checked, such as:
5/N
- Size, length, frequency, price, rate, number of operations, duration, and so on (all defined quantities).
- Incorporate symbolic keys or other items into hash tables, associative arrays, etc.
6/N - Individual data items, raw data and metadata, references, and so on must all be consistent.
- Implied or derived quantities, such as the real file size rather than defined file size.
- More complicated data structures like indices, offsets, or placements.
7/N It's important to keep in mind that "input validation" might have a variety of meanings depending upon whether you ask or whatever classification scheme you use. When referring or mapping to this CWE entry, take caution.
8/N Possible attacks –
+ SQL Injection
+ Cross-Site Scripting (XSS)
+ Command Injection
+ Arbitrary Code Execution
+ Application-Level DOS Attack
+ and other similar attacks
9/N
Mitigations – 1. Use a framework like Struts or the OWASP ESAPI Validation API to validate input. It's important to remember that adopting a framework doesn't solve all input validation issues; be aware of any flaws in the framework itself.
10/N
2. Parameters or arguments, cookies, anything read from the network, environment variables, reverse DNS lookups, query results, request headers, URL components, e-mail, files, filenames, databases, and.........
N/N
.....any external systems that provide data to the application are all potential areas where untrusted inputs can enter your software. Keep in mind that API calls can be used to obtain such inputs.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
The Out-of-bounds Write is a software security vulnerability that occurs when the data is written beyond the boundaries (i.e. past the end, before the beginning) of the intended buffer.
1/n
2/n This weakness is also listed in the CWE TOP 25 (2021). This has been given the CWE ID as CWE-787
- This vulnerability could result in buffer overflows, memory corruption, the crash of the software or even a code execution.
3/n As per the cwe.mitre.org, The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
2/n It serves as a common language, a measuring stick for security tools, and as a line for weakness identification, mitigation, and prevention efforts. The list includes more than 924 Common Weaknesses in Software & Hardware.
3/n There are multiple options available to look for a CWE such as:
- By Software Development
- By Hardware Design
- By Research Concepts
- External Mappings such as (CWE TOP 25, OWASP TOP 10, Software Fault Pattern Cluster and more)
Server-Side Template Injection (SSTI) vulnerabilities occur when user-supplied data is inserted into a template and insecurely evaluated as an expression by the template engine.
This may allow an attacker to trick the template engine into evaluating an expression that could allow an attacker to execute system commands or get a shell
To look for template injection vulnerability, it is essential to enumerate and know if the template engine is in use.
2/n
3/n If the application uses a template engine, the next thing is to know what language-based template injection is used and what all classes and methods are accessible that could be chained together to perform the desired action.
[2/n]
An account takeover usually refers to gaining persistent access to the victim user's account and performing all the authentication actions as a victim would be able to do. The severity of account takeover issues is usually considered between High to Critical.
[3/n]
However, it also depends upon the complexity and likelihood of the attack.
In general, the account takeover is not a "vulnerability class" itself but an impact result of a vulnerability.