RASP: An Immune System for Your Application
Think of RASP as an application's immune system, using runtime instrumentation to block attacks from within. It provides real-time protection against threats that static analysis or network firewalls miss.
Why it exists
Static Application Security Testing (SAST) and network perimeter controls like firewalls have blind spots. Static analysis can't predict runtime behavior, and firewalls lack the application context to understand if a request is malicious or just unusual. RASP was created to close this gap by providing security from inside the running application itself.
The mental model
Think of RASP as an application's immune system. A firewall is like a guard at the gate checking IDs; it can only stop obvious threats based on surface-level information. RASP works like white blood cells inside the body, identifying and neutralizing threats that have already gotten inside by observing their behavior and how they interact with the application's internal functions.
How it works
RASP instruments an application at runtime, hooking into its code as it executes. It monitors data flows, system calls, and library usage from within the process. When it detects a sequence of actions that matches a known attack pattern (like a SQL injection payload about to be sent to the database), it intervenes immediately. Possible actions include blocking the malicious operation, terminating the user's session, shutting down the application, or alerting security personnel.
When to use it
Use RASP as a final layer of defense in high-security applications, especially against zero-day exploits that were unknown during development. It's also valuable for protecting legacy systems where the source code is difficult or risky to modify. It acts as a safety net for vulnerabilities that slip through code review and automated testing.
When not to use it
Do not use RASP as a substitute for writing secure code. It is a last line of defense, not a license to ship vulnerable applications. Because it runs inside the application and inspects operations, it introduces performance overhead, which may be unacceptable for latency-sensitive services. It can also add complexity to debugging and troubleshooting.
One canonical example
An attacker submits a cleverly disguised SQL injection payload through a web form. A Web Application Firewall (WAF) misses it. The vulnerable application code begins to construct the malicious query. RASP, which has instrumented the database driver calls, sees the dangerous SQL command forming. Before the query is executed against the database, RASP blocks the operation, preventing the attack and logging the attempt.
Interview question
What is the primary distinction of Runtime Application Self-Protection (RASP) compared to a Web Application Firewall (WAF)?
- a.RASP provides a secure sandbox for applications, isolating them from the operating system, which WAFs cannot do.
- b.RASP is designed to prevent all forms of denial-of-service attacks, a capability not typically found in WAFs.
- c.RASP identifies security flaws in the application's source code during development, unlike WAFs which operate post-deployment.
- d.RASP operates by monitoring and intervening within the application's own runtime process, whereas a WAF inspects external network requests.Correct
Why? this is the answer
RASP's unique strength lies in its ability to instrument and protect the application from within its runtime environment, observing internal execution. In contrast, a WAF operates externally, inspecting network traffic at the perimeter. Option C describes Static Application Security Testing (SAST), not RASP.
Just read this? Test yourself on what you have been reading.
Read the original → en.wikipedia.org
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on security — each one lists the topics its interview covers.
See open roles