Input threats Flashcards
Major challenges of input threats
- Much of this data might be unknown, untrusted or insecure
- Inputting/ injecting malicious data into a system/ application is the primary attack method
- It an be difficult to detect a malicious user who is trying to attack your system.
- Improper handling or not checking inputted data is a leading contributor of contributing of critical vulnerabilities existing in todays systems
Injection attack method
- An attacker supplies untrusted or bad input into an application
- The input gets processed and can alter the execution of an application in a negative way
What can injection attacks lead to
- Data theft
- Data loss
- Loss of data integrity
- Denial of service
- Full system compromise
More on Injection attacks
- They are the number one web application security risk
- They are not only very dangerous but also widespread, especially in legacy applications
- Attack surfaces are often very large - lots of attack points
- These attacks are very well understood.
Cross Site Scripting (XSS)
They are a type of injection, in which malicious script is injected into otherwise harmless and trusted applications
How does XSS work
- The perpetrator discovers a website having a vulnerability that enables a script injection
- Perpetrator injects the website with a malicious script that steals each visitors session cookies
- For each visit to the website, the malicious script is activated
- Visitors session cookies are sent to the perpetrator.
SQL injection
This consists of insertion or injection of an SQL query into the input data provided by a user to an application
What does a successful SQL injection exploit do?
- Read Sensitive data from db
- modify data in db
- execute administration ops on the db such as shut down the DBMS
- recover content of a given file present on DBMS
- Issue commands to the os
Out of bounds read
This occurs when a program reads past the end or before the beginning, of an intended buffer.
What can occur from an out of bounds read?
This an allow attackers to read sensitive info from other memory locations or cause it all to crash.
The crash occurs when a program reads variable amounts of data and assumes that a termination character exists at the end of the data to stop the read operation.
Out of bounds write
- This occurs when a program tries or does write data past the end or before the beginning of the intended buffer.
- The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of a buffer.
- A subsequent write operation then produces undefined or unexpected results such as corruption of data, a crash, or code execution
Which languages have no bounds checking
C & C++
Buffer overflow
- This condition exists when a program attempts to put more data in a buffer that it can hold or when
a program attempts to put data in a memory area past a buffer.
Integer overflow
An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation
Format String
Format strings can be exploited to execute arbitrary code, perform buffer overflow attacks, and extract sensitive information from the web application.