Injection attacks remain one of the most common application attack vectors. To help prevent these attacks, organizations can leverage runtime security to easily and effectively prevent exploitable vulnerabilities and safeguard applications in production.
Injection vulnerabilities allow attackers to insert malicious inputs into an application or relay malicious code through an application to another system. During an injection attack, untrusted inputs or unauthorized code are “injected” into a program and interpreted as part of a query or command. The result: An attacker can alter the program, redirecting it so as to gain unauthorized command execution or unauthorized data access.
Injection attacks can include calls to the operating system via system calls, the use of external programs via shell commands or calls to backend databases using SQL. Whenever an application uses an interpreter, it risks introducing an injection vulnerability. Scripts written in Perl, Python and other languages can be injected into a poorly designed application and then executed, giving the attacker control over its behavior.
By identifying a critical vulnerability, attackers can insert malicious code in an application, gaining functionality and ultimately executing specific commands that infect the targeted user and system networks. As OWASP has noted, “[a]n attacker can use these techniques to obtain, corrupt, or destroy the contents of your database, compromise backend systems, or attack other users. Successful injection attacks may completely compromise or destroy a system. It is important to test for and protect against these types of attacks.”
Frequently, organizations rely on web application firewalls (WAFs) and Application Security Testing (AST) tools such as Static Application Security Testing (SAST) and Dynamic Application Security Testing (DAST) solutions to safeguard their applications against injection attacks and other potential issues.
A WAF is a network defense that filters, monitors and blocks HTTP traffic to and from a web application. Unlike a regular firewall that serves as a safety gate between servers, a WAF is able to watch application-level traffic and decide to allow or disallow based on the data that is visible over the network.
DAST tools generate thousands of requests and bombard your application with them to see if they can get anything through. DAST tools can find issues that show up in web pages but can't see anything internal to your application and don't exercise much of your code.
SAST tools, on the other hand, try to model the entire application by guessing how all the source code, libraries, frameworks, and components fit together and will operate when run. But they make a lot of mistakes and typically don't even attempt to model the whole application.
Since both of these approaches are difficult to set up and don't get very good results, Contrast Security is leading the way with the next generation of application security tools known as Interactive Application Security Testing (IAST).
Contrast takes the innovative approach of tagging and tracking untrusted data wherever it goes within the application. Contrast also tracks all the validation and escaping that happens to that data along the way.
A WAF can’t tell you the line of code that is being attacked, but Contrast Application Detection and Response (ADR) can. Unlike WAFs or external scanners, Contrast analyzes and protects applications from within by integrating security safeguards into the running application.