Cloud & app security

What Is RASP? Runtime Application Self-Protection Explained

RASP puts protection inside the application itself, so it can spot tampering, injection and abuse while the app is running — and stop the attack before it succeeds.

Cysoro Security TeamPublished · 10 min read
CLOUD & APP SECURITYWhat isRASP?Protection inside the running app.app.run() — protected✓Input checkedbefore it reaches code✕Injection blockedattack stopped in placeRUNTIME SHIELD: ACTIVE
Quick answer

RASP, or runtime application self-protection, is security technology that runs inside a live application, watches what the application actually does with incoming data, and blocks attacks as they happen. Unlike a firewall, which filters traffic outside the app, RASP sees code execution from the inside, so it can stop injection, tampering and abuse that perimeter controls miss.

Key takeaways

  • RASP runs inside the application and blocks attacks in real time, using what the code actually does rather than what traffic looks like.
  • It is strongest for mobile apps and web apps that face untrusted devices, injection attacks and tampering.
  • RASP is one layer of defense in depth, not a replacement for secure code, patching or a web application firewall.

A firewall watches traffic outside your app. RASP watches the app itself. When a request tries to turn a database query into an attack, RASP is in the room, sees it happen, and can stop it before any data leaves.

What is RASP?

RASP is security built into a running application. It monitors calls to sensitive operations, such as database queries, command execution, file access and deserialization, and blocks them when untrusted input changes their intended behavior.

The acronym stands for runtime application self-protection, a term popularized in the early 2010s for agents that moved protection from the perimeter into the runtime, as ByteHide explains. The word "runtime" matters: RASP does not scan source code before release or test a finished build. It protects the application while it is live, in production, handling real users and real attackers.

OWASP describes RASP in mobile apps as a technology embedded in the app to detect and prevent real-time attacks, as explained in its RASP guidance. Because it integrates directly into the runtime environment, the app can monitor its own execution and respond to threats from within the device, rather than relying only on a server or a network device.

Think of it this way: a web application firewall is a guard at the door who checks IDs. RASP is a guard inside the building who watches what visitors actually do once they are in.

How does RASP work?

RASP works by instrumenting the application, which means adding hooks or an agent that observes sensitive operations as they run. When an operation looks like an attack, RASP can log it, block it, or shut down the session.

For a web application, the agent sits inside the application process or runtime, for example in a Java, .NET, Node.js or Python runtime. It watches the flow of data from untrusted input, such as a form field or an API parameter, into a sensitive sink, such as a SQL query or a system command.

If the input stays as ordinary data, the operation proceeds. If the input changes the meaning of the operation, for example by closing a quoted string and adding a new SQL clause, RASP recognizes the exploit and blocks that call. The rest of the application keeps running.

For a mobile app, RASP checks run inside the app on the device. They look for a rooted or jailbroken device, an emulator, an attached debugger, a hooking framework, or signs that the app binary or its resources have been modified. The response can be to refuse to run, to limit features, to wipe sensitive data, or to alert a backend server.

How RASP stops an attack inside the appUntrusted inputform field, APIparameter, fileRASP agentwatches data flowto sensitive callsSensitive callSQL query, fileaccess, commandBlock or allowexploit stopped,normal use passesThe agent sees what the code does with the input, not just what the request looks like.That context is what separates a real exploit from harmless data.
How a RASP agent checks data as it flows to a sensitive operation. Illustration by Cysoro.

RASP vs WAF: what is the difference?

A WAF and RASP protect the same application from different places. A WAF sits in front of the app and inspects network traffic. RASP sits inside the app and inspects execution. They complement each other rather than replacing each other.

FeatureRASPWAFSAST / DAST
Where it runsInside the app processIn front of the app, at the edgeBefore release, in testing
When it actsLive, in productionLive, in productionDuring development or QA
What it seesData flow and code executionHTTP requests and responsesSource code or running app behavior
Main strengthContext: knows what input doesBlocks known patterns earlyFinds flaws to fix
Main limitAdds runtime overheadCan miss attacks that look normalFinds flaws but does not block live attacks

A WAF can block a request that matches a known attack signature before it reaches your server. But an attacker can often disguise a payload so it looks harmless to the WAF, yet still works when the application processes it. RASP catches that case, because it watches the result, not the disguise.

Conversely, RASP cannot protect an app it is not installed in, and it does not help with network-level abuse such as volumetric DDoS. A WAF, rate limiting and secure coding still matter. For a fuller picture of the layers around a website, see our guide to website security.

What does RASP detect and block?

RASP detects attacks that only become visible when input reaches sensitive code. The exact list depends on the product and the platform, but the common categories are consistent across vendors and OWASP guidance.

  • Injection attacks: SQL injection, NoSQL injection, command injection and cross-site scripting, where untrusted input changes the meaning of a query, command or page.
  • Deserialization attacks: malicious serialized objects that execute code or alter application state when the app unpacks them.
  • File and path abuse: path traversal, unauthorized file reads and writes, and attempts to include local or remote files.
  • Server-side request forgery: requests that trick the server into calling internal services or metadata endpoints.
  • Mobile tampering: modified app binaries, hooked methods, repackaged apps and altered resources.
  • Hostile environments: rooted or jailbroken devices, emulators, attached debuggers and hooking frameworks such as Frida.
  • Credential and session abuse: in some products, brute-force login attempts and session manipulation detected from inside the app.

OWASP lists the mobile capabilities as environment detection, code integrity verification, anti-tampering and anti-debugging, plus a response mechanism. The response is part of the protection: detecting a threat without acting on it is only monitoring.

What is RASP in mobile apps?

In mobile apps, RASP is a set of runtime checks inside the app that detect a compromised device or a modified app and react while the app is running. It is the mobile form of the same idea, adapted to a device the developer does not control.

OWASP groups these controls under MASVS-RESILIENCE, resilience against reverse engineering and tampering. The standard describes defense-in-depth measures such as code obfuscation, anti-debugging, anti-tampering and RASP as ways to increase an app's resilience against reverse engineering and specific client-side attacks.

Typical mobile RASP checks include root and jailbreak detection, emulator detection, debugger detection, detection of hooking frameworks, and verification that the app binary and its resources have not been changed. Some products also add server-side attestation, where the app proves its integrity to a backend before sensitive features are unlocked.

For Android apps distributed through Google Play, the Play Integrity API provides device and app attestation. It can verify that the app binary is the original, unmodified version from Google Play, that it is running on a genuine Android device, and that the device passes basic integrity checks. OWASP presents it as a complement to in-app RASP checks, not a replacement for them.

What happens when RASP detects an attack?

The response depends on the policy the team configures. Most products offer a spectrum from observe to block, so teams can roll out RASP without breaking legitimate users on day one.

  • Monitor only: log the event and alert the security team, without blocking anything. This is the usual starting mode.
  • Block the single operation: stop the malicious query or call, return an error, and let the rest of the session continue.
  • End the session: terminate the app, log the user out, or clear sensitive data from memory.
  • Degrade gracefully: disable a sensitive feature, such as payments, while leaving the rest of the app usable.
  • Alert the backend: send a signal to the server so the account or device can be flagged, rate-limited or investigated.

Start in monitor mode. That gives you a baseline of what normal traffic looks like and how many false positives the policy produces, before you let the tool block real users. Move to blocking for the highest-confidence rules first, such as clear SQL injection, and keep reviewing the logs.

What are the benefits and limits of RASP?

RASP's main benefit is context. Because it runs inside the application, it knows which data is trusted, which query is being built, and what the code intends to do. That reduces the false positives that plague signature-based tools, and it catches attacks that look harmless from outside.

It also protects apps that cannot be patched quickly. If a vulnerability is found in a third-party library and no fix exists yet, RASP can block exploitation of that flaw in production while the team waits for a patch or a workaround. That virtual-patching role is one of the most practical reasons teams buy it.

The limits are real and OWASP states them plainly. RASP is bypassable by determined attackers with enough time and resources, especially on rooted devices where they have full control. Detection methods and bypass techniques evolve continuously, so RASP needs ongoing updates. Extensive checks can degrade performance and battery life, and overly aggressive detection can flag legitimate environments, such as custom ROMs or accessibility tools.

RASP: strengths and limits at a glanceStrengthsSees real data flow inside the appBlocks live exploits, including zero-daysVirtual patching while a fix is pendingFewer false positives than signaturesWorks on devices you do not controlLimitsBypassable by determined attackersAdds runtime overhead and battery useNeeds regular updates to stay effectiveCan flag legitimate custom devicesDoes not fix the underlying flaw
RASP is a strong runtime layer, not a complete security program. Illustration by Cysoro.

RASP should be considered one layer in a defense-in-depth strategy, not a complete security solution. OWASP is explicit on this point: critical security logic should also be protected server-side, where possible, because anything running on a device an attacker controls can eventually be tampered with.

Who needs RASP?

RASP makes the most sense where the application faces untrusted input or untrusted devices, and where a successful attack would be costly. That covers more teams than it first appears.

  • Mobile banking, payment and health apps: the app runs on a device the user controls, so tampering and root detection matter.
  • Web apps with legacy code: older applications that cannot be rewritten quickly benefit from runtime blocking while fixes are scheduled.
  • Apps using vulnerable third-party libraries: RASP can block exploitation of a known library flaw before a patch is available.
  • High-value APIs: payment, identity and data APIs that accept input from many clients and partners.
  • Regulated industries: finance and healthcare teams that need extra evidence of runtime protection for compliance reviews.

Small teams with a simple website and a well-maintained framework may get more value from keeping dependencies patched, enabling a WAF, and checking security headers. You can check the header side of that in seconds with the free security headers checker.

How do you evaluate a RASP product?

Evaluate RASP the way you would any runtime control: on coverage, accuracy, performance and operations. Ask for evidence, not marketing claims, and test it against your own application.

  1. Check platform coverage. Does it support your language and runtime, and your mobile platforms, without a rewrite?
  2. Test against real attacks. Run known payloads for SQL injection, command injection and deserialization in a staging environment and confirm what is blocked and what is logged.
  3. Measure performance. Compare response times and, for mobile, battery use with the agent on and off under realistic load.
  4. Review false positives. Run it in monitor mode for at least two weeks and count how many legitimate requests it would have blocked.
  5. Check the response options. Can you block one operation, end a session, or degrade a feature, or is it all or nothing?
  6. Ask about updates. How often are detection rules updated, and how are they delivered to the agent or SDK?
  7. Confirm visibility. Does it integrate with your SIEM or alerting, and does it give enough detail to investigate an event?

Also confirm how the product is deployed. Some RASP tools are agents added to the runtime, some are SDKs the app calls, and some are compiler toolchains that inject checks between user code and obfuscate the result at each build.

OWASP notes that SDKs sit alongside the app and must be called out to, while compiler toolchains inject detections directly. That difference affects how easy the tool is to bypass and how much work integration takes.

A practical RASP rollout checklist

A careful rollout avoids the two common failures: blocking legitimate users, and installing a tool nobody ever looks at. Use this sequence.

  • Pick one application, ideally a high-value app with a staging environment that mirrors production.
  • Deploy in monitor-only mode and collect at least two weeks of baseline data.
  • Tune the policy: allowlist legitimate patterns, fix the false positives, and document each exception.
  • Enable blocking for high-confidence rules first, then expand to the rest.
  • Wire alerts into the same place your team already watches, and assign an owner for RASP events.
  • Re-test after every major release, because code changes can change what the agent sees.
  • Keep patching and code review going. RASP buys time; it does not remove the need to fix flaws.

Pair RASP with the basics that protect the same app from other angles: keep the TLS certificate valid and monitored, and check the site with the free SSL checker after each deployment.

The bottom line

RASP adds a guard inside the application, where attacks actually succeed. It sees data flow, blocks live exploits, and protects apps on devices you do not control, which is something a perimeter firewall cannot do on its own.

It is not a cure-all. Determined attackers can bypass it, it adds overhead, and it never fixes the underlying vulnerability. Treat it as one layer alongside secure coding, patching, a WAF and server-side checks, and it earns its place. Start in monitor mode, measure the impact, and block only when you trust what you see.

Frequently asked questions

What does RASP stand for?

RASP stands for runtime application self-protection. It describes security controls that are built into or linked to a running application and can observe and control its execution while it runs.

How is RASP different from a WAF?

A web application firewall filters HTTP traffic before it reaches the application, based on patterns in requests. RASP runs inside the application and sees how that input is actually used, so it can tell a harmless-looking request from a real exploit with more context.

Does RASP replace secure coding?

No. RASP blocks exploitation in production, but it does not fix the underlying vulnerability. Teams should still fix the code, patch dependencies and test before release, and use RASP as a safety net while fixes are in progress.

What attacks can RASP detect?

Common examples include SQL injection, cross-site scripting, command injection, deserialization attacks, tampering with app code, rooted or jailbroken devices, attached debuggers, emulators and hooking frameworks in mobile apps.

Is RASP only for mobile apps?

No. The term covers both server-side web applications, where an agent watches database queries and file access, and mobile apps, where checks watch the device, the app binary and the runtime environment.

Can RASP be bypassed?

Yes. OWASP notes that determined attackers with enough time and resources can typically bypass RASP, especially on rooted devices where they have full control. That is why it should be one layer among several, with critical checks also enforced on the server.

Does RASP slow an app down?

It can. Extensive runtime checks add overhead and can affect performance and battery life on mobile devices. Teams usually tune which checks run, and where, to balance protection against speed.

Sources

  1. OWASP — MASTG-KNOW-0118: Runtime Application Self-Protection (RASP)
  2. ByteHide — What Is RASP? Runtime Application Self-Protection
  3. Guardsquare — Protecting Mobile Apps Against OWASP MT10 and MASVS
  4. Ariel Softwares — Security Testing: 6 Types and When Your App Needs Each
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against OWASP MASVS resilience guidance on RASP and OWASP mobile application security material.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free