← Back to list
Security & Privacy
#RASP#런타임보안#애플리케이션보안#오염추적#IAST
Last updated · 2026-10-12

RASP (Runtime Application Self-Protection)

1. Overview

A. Definition and Background

RASP is a security technology that embeds security instrumentation inside the application's execution environment (runtime) and observes the data flow and execution context at the moment the actual code runs to detect and block attacks. Whereas a firewall or WAF sits "outside" the application and infers whether a network request is an attack, RASP sits "inside" the application and judges directly by watching what SQL query that request actually builds, which file it opens, and which OS command it tries to execute.

The fundamental reason RASP emerged is the structural limitation of perimeter defense: "you cannot conclusively determine whether something is an attack by looking only at the request from outside." A WAF infers malicious patterns such as ' OR 1=1-- in the HTTP payload, but whether that request actually becomes a dangerous SQL statement depends on how the application assembles its parameters. The same string may be harmless when properly escaped, or fatal when concatenated straight into a query. In other words, the "truth" of whether an attack succeeds exists only at the point where the code executes, and perimeter devices can only infer from patterns without seeing that truth. RASP was born precisely to observe this "truth at the execution point" directly.

Another driver is the ubiquity of encryption and evasion. Today most traffic is encrypted with HTTPS, so perimeter devices need separate decryption to inspect the payload, and attackers endlessly evade signatures through encoding, obfuscation, and split transmission. Because RASP operates inside the application after TLS decryption, it is unaffected by encryption, and no matter how the payload is disguised it catches the moment a dangerous operation (a call to a risky function) is finally reached. Since Gartner introduced the RASP concept in the early 2010s, this technology has established itself as a layer that fills the blind spots of perimeter defense with the idea that "the application defends itself."

B. Necessity

Modern applications are tangled with hundreds of open-source libraries and frameworks, making it hard to remove every vulnerability at the source level, and as microservice- and API-centric architectures have become common, the attack surface has spread deep inside. A perimeter WAF alone struggles to block east-west internal service calls or attacks that are hard to judge from the request string alone, such as deserialization and SSRF. Because RASP intervenes at the very execution moment when a vulnerability is actually exploited, even when the flaw remains in the code, it can turn the application itself into a line of defense until a root-cause patch is deployed. This aligns with the DevSecOps and Zero Trust demand to "bring defense close to the asset (the application)."

RASP's necessity stands out especially amid successive supply-chain vulnerabilities. When a zero-day in a widely used library such as Log4Shell is disclosed, an organization cannot immediately replace the vulnerable versions scattered across hundreds of applications. Here RASP blocks the "dangerous behavior" the vulnerability triggers at the execution point, acting as a runtime line of defense that fills the gap until patching is complete. In short, RASP is not a technology that "removes vulnerabilities" but a complement that "stops exploitation while vulnerabilities remain," taking charge of execution-time control in supply-chain security alongside SBOM and vulnerability-management systems.

C. Core Characteristics of RASP

RASP's characteristics condense into three. First is context-awareness: it judges not by the outward appearance of the network request but by the actual query, file access, and command execution the request triggers, so false positives are fundamentally fewer. Second is self-protection: without relying on an external device, the application itself recognizes and responds to attacks that reach it. Third is encryption-agnosticism and evasion-resistance: because it operates internally after TLS decryption, it is unaffected by traffic encryption or payload obfuscation. These three combined make RASP an application-hugging last line of defense that "protects inevitably vulnerable code at execution time."

These three characteristics ultimately stem from RASP "moving the location of defense as close to the asset as possible." Traditional security concentrated defense at the perimeter, but in cloud and microservice environments the perimeter has blurred and the attack surface has fragmented inward. RASP places the defense point not at the network boundary but at the very asset (the application) to be protected, intervening—wherever the request came from—"at the moment that request tries to do something dangerous inside the asset." This is the same line of thinking as Zero Trust's "trust no access and verify tightly at the resource," showing that RASP is not a mere WAF substitute but a technology reflecting a shift in the center of gravity of security architecture.

2. Overall Structure and Instrumentation Methods of RASP

RASP should be understood not as a particular appliance but as an instrumentation architecture that embeds a sensor inside the application runtime (JVM, .NET CLR, Node.js, etc.) to hook sensitive function calls. Below is an overall structural diagram of how RASP intervenes as a request flows through the application internals.

flowchart LR
  C["Client (user / attacker)"] --> WAF["WAF (perimeter inference defense)"]
  WAF --> APP
  subgraph APP["Application runtime (JVM / CLR, etc.)"]
    REQ["Request-handling logic"] --> SENS["RASP sensor (function hooking)"]
    SENS --> SINK["Danger points (SQL / file / command / deserialization)"]
  end
  SENS -->|Normal| SINK
  SENS -->|Attack verdict| BLK["Block (raise exception / abort request)"]
  SENS --> LOG["Logs / SIEM / dashboard"]

What stands out in the structure above is that RASP operates "after" the WAF—that is, on requests that have passed perimeter defense and reached inside the application. RASP performs the final verification inside the asset, covering the "looks normal but is actually dangerous" requests that remain even after the WAF's broad net, as well as traffic that never passed the perimeter in the first place, such as internal service-to-service calls. Thus RASP and WAF should be understood not as wastefully blocking the same attack twice, but as a serial arrangement in which each fills the other's blind spots at a different layer.

The starting point of RASP processing is "instrumentation." Security sensors are embedded at the entry of the application's risky functions (JDBC query execution, Runtime.exec, file I/O, deserialization, etc.), and at the moment such a function is called, the arguments and the call stack are inspected. The key is to know "which input value of the request flowed into the argument of this risky function (taint tracking)." If user input flows into the SQL query string without any sanitization and changes the grammatical structure, RASP confirms it as injection and blocks it just before execution. Unlike a perimeter device inferring "this string is suspicious," RASP judges by the fact that "this input actually changed the query structure," so its accuracy is high.

A. Instrumentation Methods — Agent, Library, Hybrid

The first design decision running through RASP is "how to embed the sensor inside the application." The agent method uses Java's -javaagent option or JVMTI, or .NET's profiling API, to rewrite (instrument) the bytecode at startup and automatically insert hooking code into risky functions. It applies without modifying the application source at all and offers broad coverage, forming the mainstream of commercial RASP. However, it is sensitive to runtime and framework versions, and bytecode manipulation can rarely cause compatibility problems.

The library/SDK method has developers add a security library to the dependencies and either call it explicitly in the code or wire it in via filters/interceptors. Because developers control the intervention points, it is predictable, but its scope is limited to the points developers wire in, and it requires code changes. The hybrid method instruments broadly and automatically with an agent while precisely reinforcing core transactions with an SDK, combining the strengths of both. In practice, the more an environment has legacy and third-party code that is hard to modify at the source, the more it leans toward the agent method, and the higher the security requirements—such as a bank's core transaction paths—the more it chooses hybrid.

The choice of instrumentation method is not a mere matter of technical taste but a decision that divides the operating organization's boundary of responsibility and deployment model. The agent method applies when the operations/security team merely changes the application's startup options, so it can be rolled out "security-team-led" without the development team changing code; however, if bytecode rewriting causes behavior the development team did not intend, responsibility becomes ambiguous. The library method suits a "development-team-led" DevSecOps culture because the development team directly manages the dependency and call points, but applying it consistently across hundreds of microservices presupposes version governance of a common security library. Therefore an organization must establish its instrumentation strategy considering both the technical diversity of its application portfolio and its team structure.

B. Interception Points and Taint Tracking

The second core principle is "where to intercept and on what basis to judge." RASP intensively instruments the "sinks" where the application touches external resources—DB query execution, OS command execution, file-system access, URL connection (related to SSRF), object deserialization, script evaluation (eval), and so on. And it uses taint tracking to follow whether untrusted input that came in from a "source" such as HTTP parameters, headers, and cookies reached a sink without intermediate sanitization.

For example, in judging SQL injection, RASP does not simply look at whether the query string contains OR 1=1. Instead it checks, via query parsing, whether the user input changed the "structure (grammar)" region of the query rather than its "data" region. Input properly bound to a prepared statement cannot change the structure no matter how malicious the string, so it is passed; only when string concatenation changed the structure is it blocked. Because this method judges by "contextual role" rather than the "value" itself, it greatly reduces the false positives a WAF inevitably suffers for "input that looks malicious but is actually normal."

The precision of taint tracking directly governs RASP's detection quality. The runtime attaches a "taint" mark to data arriving from an untrusted source and tracks the mark's propagation through variable copies, string concatenation, and function passing until the data reaches a sink. If the data passes through an appropriate validation, escaping, or encoding function in between, the mark is cleared (sanitized) and it is no longer seen as dangerous. Because how finely these propagation and clearing rules are modeled determines false positives and negatives, commercial RASP pre-embeds and continuously updates lists of sanitization functions for major frameworks and libraries. However, custom sanitization logic or non-standard data flows can break the tracking, so tuning that reinforces an organization's own sanitization patterns with rules is needed.

C. Operating Modes — Monitoring and Blocking

The third axis is "how to handle a detected attack." Monitoring/detection mode detects attacks and leaves only logs and alerts while letting the request through. In the early adoption phase, running in this mode for a period to avoid incidents where false positives block legitimate transactions is the standard practice. Blocking/protection mode actually prevents damage by raising an exception on the risky function call or aborting request processing when an attack is judged. The blocking method can also be subdivided into "reject only that operation" or "terminate the entire session/request," and virtual-patch-style operations that immediately deploy a pinpoint rule for a specific CVE are possible. In practice, as with a WAF, it follows a gradual maturation process of first tuning sufficiently in detection mode and then switching to blocking starting with rules in which confidence has been established.

Design judgment also enters the blocking method. If you raise an exception on the risky function call to fail "only that operation," the application can treat it like a normal error and keep the service running, but it leaves room for an attacker to probe other paths through repeated attempts. Conversely, if you immediately terminate the whole request/session, the defense is strong but a false positive cuts off a legitimate user's transaction entirely. Therefore mature operation differentiates the blocking strength by risk level. For example, deserialization or command injection that could lead to remote code execution is met strongly with session termination, while a relatively limited-impact path-traversal attempt rejects only that operation and strengthens logging. In this way, RASP is a matter of policy that, beyond "being able to detect," designs "how to respond" to fit the service's characteristics.

D. RASP Adoption and Operation Lifecycle

RASP resembles the WAF in that operation after adoption, rather than the moment of adoption, decides success or failure, and the practical settling procedure generally follows this flow.

  1. Target selection and instrumentation application: Select high-protection-value applications and apply the sensor to the startup environment via the agent/library method. At this point, verify runtime and framework version compatibility first.
  2. Performance baseline measurement: Measure response time, CPU, and memory before and after sensor application via load testing to confirm the overhead is within an acceptable range, and exclude overloaded paths from the instrumentation scope.
  3. Detection-only mode operation: Run the rules with logging only, not blocking, for a period to observe which normal behaviors in real traffic trip the rules (false-positive candidates).
  4. False-positive tuning and switch to blocking: Analyze the observed false positives to adjust sanitization rules and exceptions, and sequentially switch to a blocking strength matched to risk, starting with rules in which confidence has been established.
  5. Continuous update and integration: Update rules to match new CVEs and attack trends, integrate logs with SIEM/SOAR to automate from detection to response, and track sensor versions via configuration management.

The key in this cycle, as with a WAF, is "not to rush blocking." If you start with full blocking without verification, legitimate transactions get blocked, service trust collapses, and the operations team is driven to the worst choice of turning the sensor off entirely. RASP, too, must be treated not as "install and done" but as an operational control that presupposes continuous tuning and performance observation.

3. RASP's Detection and Response Flow and Defense Targets

Let us look at a detailed process diagram of how RASP actually catches an attack and how a single request is judged internally.

sequenceDiagram
  participant U as User / attacker
  participant A as Application logic
  participant R as RASP sensor
  participant D as Danger point (DB / OS / file)
  U->>A: HTTP request (with input value)
  A->>A: Execute business logic
  A->>R: Intercept risky function call (hook)
  R->>R: "Taint tracking / context analysis (input -> structure changed?)"
  alt Judged as attack
    R-->>A: "Raise exception / block call"
    R->>R: Logs / alerts (SIEM)
  else Normal
    R->>D: Perform original operation
    D-->>A: Return result
  end

A. Main Defense-Target Attacks

The area where RASP shows particular strength is execution-time attacks hard to judge from the request string alone. SQL injection is judged by the query-structure change described earlier, and OS command injection by whether user input flowed into the arguments of Runtime.exec/ProcessBuilder calls. Path traversal looks at whether user input containing ../ reached a file-access function, and SSRF at whether the external connection target URL is determined by user input. In particular, insecure deserialization is very hard for a WAF to detect when the payload is encrypted or obfuscated, but RASP can directly catch the moment a dangerous class (gadget) is loaded and executed during deserialization.

The representative case that proved RASP's value in the field is Log4Shell (CVE-2021-44228). When Apache Log4j's JNDI-lookup vulnerability was disclosed in late 2021, attackers rapidly evaded WAF signatures by chopping the ${jndi:ldap://...} string into pieces like ${${lower:j}ndi:. However, RASP could block, at the execution point, the "behavior" itself of the application actually attempting a JNDI lookup to an external LDAP/RMI server or trying to load a remote class—rather than the outward appearance of the string—so it responded identically regardless of obfuscation variants. This is often cited as an event that symbolically showed RASP's essence of "blocking by behavior, not by pattern" (though coverage is limited to instrumented paths, so one cannot assert that RASP automatically blocks every variant).

Concretizing the processing of a single request makes it clearer. Suppose a user enters productName'); DROP TABLE users;-- into a bulletin-board search box. If the application concatenates this value into the query string without binding, just before JDBC execution the RASP sensor intercepts the call and compares the grammatical structure (token tree) of the original query with the structure after the user input is inserted. On confirming that the input produced a new statement structure, DROP TABLE, RASP confirms it as injection, raises an exception on query execution to halt it before it reaches the DB, and then leaves the original input, call stack, and matched rule in the logs. The decisive difference is that, unlike a perimeter WAF inferring a "suspicious string," RASP judges by the fact that "the query structure actually changed."

B. Comparison of RASP with Similar and Complementary Technologies

RASP is not complete on its own, and distinguishing its role from adjacent technologies matters. The table below is a comparative summary, but one must also understand the reasons the differences arise.

Category Location/timing Basis of judgment Main purpose Relationship to RASP
WAF Outside app, request time Request payload pattern Block perimeter attacks Broad first-line defense, complementary
RASP Inside app, execution time Actual execution context, taint tracking Block execution-time attacks Precise last-line defense
SAST Development stage, static Source-code analysis Find vulnerabilities before deploy Prior removal (prevention)
DAST Testing stage, dynamic External simulated-attack response Find vulnerabilities before deploy Prior discovery (prevention)
IAST Testing stage, instrumented Internal instrumentation (same kind as RASP) Find vulnerabilities during testing Shares instrumentation tech, different purpose

The most confused relationship is with IAST (Interactive Application Security Testing). IAST uses the same instrumentation and taint-tracking technology as RASP, but its purpose differs. IAST is used to "find and report" vulnerabilities during the QA/testing stage, while RASP is used to "block" attacks during the operation stage. In other words, the same engine becomes IAST when used in testing and RASP when used for operational defense. This is why many commercial products provide both IAST and RASP with a single instrumentation engine.

The decisive difference between WAF and RASP is "whether it infers from outside or confirms from inside." A WAF filters all requests broadly as a first line but, not knowing the application's internal logic, inevitably has false positives and negatives. RASP judges narrowly but deeply, by the actual execution result, so its accuracy is high. The two are not competitors but a Defense in Depth relationship: block the perimeter broadly with a WAF and precisely reinforce core transactions with RASP, and when development-stage controls such as SAST/DAST/IAST are added on top, application security is completed.

4. Deep Dive — Standards, Market Trends, and Expansion into ADR

In the recent application-security market, RASP is being reorganized from a standalone product into a runtime security platform combined with observability. Gartner extends RASP's execution-point-visibility concept to propose ADR (Application Detection and Response) as an emerging category, a trend that links the attack and behavior data collected at the application runtime with EDR/XDR to automate from detection to response. In other words, beyond "blocking," RASP is evolving toward tracking the before-and-after context of an attack and connecting to security operations (SOC).

In the market, commercial solutions such as Contrast Security, Imperva (formerly Prevoty), Dynatrace, and Waratek, along with open-source implementations such as OpenRASP, have broadened the base by supporting diverse runtimes including Java, .NET, and PHP. In particular, many products provide both testing-stage IAST and operation-stage RASP with a single instrumentation engine, which shows the market's direction of connecting "Shift-Left (find during development)" and "Shift-Right (defend during operation)" on a single technology axis. However, as polyglot microservices have become common, governance that consistently operates per-language sensors has emerged as a new challenge.

RASP's standing is also rising on the standards and regulation side. OWASP introduces RASP as an application-defense technology and mentions it as a runtime mitigation for OWASP Top 10 threats such as deserialization and injection. In addition, PCI DSS v4.0 was revised in a direction that strengthens payment-page tamper detection and execution-time protection, so RASP-type runtime protection is being revisited as a compliance measure. In cloud-native environments, attempts to embed a lightweight sensor inside container/serverless runtimes and combine it with workload protection (CWPP) are increasing, and as an alternative to bytecode instrumentation, approaches that use eBPF-based runtime visibility to observe application behavior at the kernel level are also rising.

Likely exam directions include: ▲explain the difference in operating principle and basis of judgment between WAF and RASP and present a Defense-in-Depth design; ▲discuss the trade-offs of RASP's instrumentation methods (agent vs. library); ▲discuss RASP's strengths and limits using cases such as Log4Shell; ▲compare IAST/DAST/SAST/RASP from an SDLC perspective and present a DevSecOps integration plan.

5. Considerations and Implications (Professional Engineer Perspective)

To settle RASP successfully, one must approach it not as "product adoption" but from the balanced perspective of "performance, stability, and operational process." A professional-engineer answer should discuss the following trade-offs and strategies together.

  • Balancing performance overhead and stability: Because RASP performs an inspection at each function call inside the application, latency and CPU burden arise. It is generally known to incur single-digit-percent overhead, but the variance is large depending on traffic characteristics and instrumentation scope, so a strategy of measuring with load testing and selectively instrumenting only core paths is essential. Because bytecode manipulation can affect application stability, whether to prioritize availability over security on failure (fail-open) or security over availability (fail-close) must be clearly defined to fit the service's characteristics.

  • Recognizing coverage limits: Because RASP defends only the instrumented runtimes and functions, native code, non-instrumented frameworks, and external calls remain blind spots. Therefore one must not mistake RASP for an all-purpose defense but position it as one layer of Defense in Depth combined with a WAF (perimeter), secure coding, and SAST/DAST (prior removal). Neglecting code security because RASP exists only accumulates risk.

  • Language/framework dependency and operational burden: Because RASP is strongly coupled to a specific runtime such as the JVM or .NET, in a polyglot (multilingual) microservice environment there is the burden of managing per-language sensors separately. Sensor compatibility must be continuously verified on runtime/framework upgrades, and sensor versions and rules must be kept trackable within a configuration-management (Policy as Code) system for audit and change management to hold.

  • Integration with DevSecOps and observability: Because RASP shares an instrumentation engine with development-stage IAST, it becomes the junction connecting "Shift-Left (prior discovery)" and "Shift-Right (operational defense)" on a single technology axis. Integrating RASP logs with SIEM/SOAR/XDR enables automation from detection to response (playbooks), and combined with the ADR trend it can track an attack's before-and-after context. Automating sensor deployment and rule verification in the CI/CD pipeline is the key to operational maturity.

  • Gradual application and false-positive-minimization strategy: RASP has fewer false positives than a WAF, but not zero. New rules/sensors must be observed sufficiently in detection-only mode to confirm they do not block legitimate work before switching to blocking, and the blocking scope (that operation only / the whole session) must be applied differentially by risk level. Full blocking without verification can block legitimate transactions and drive the operations team to the worst choice of turning the sensor off.

  • Related technologies and outlook: RASP aligns with Zero Trust's "asset-hugging defense" principle and is converging into a runtime security platform while fusing with CWPP, eBPF, and ADR. The more that generative-AI-driven automatic attack mutation increases, the more RASP's value of judging by "behavior" rather than appearance is expected to grow. However, designing explainability and a logging system together so that operators can understand and audit the basis of instrumentation-based verdicts remains a future task.

References


In one line: RASP is a self-protection technology that embeds a sensor inside the application runtime and uses taint tracking to catch and block the moment user input changes the execution structure of a risky function; judging by "behavior" at the execution point regardless of encryption or obfuscation, it has few false positives but carries performance overhead, language dependency, and coverage limits, so it should be operated as the precise layer of a Defense-in-Depth strategy combined with WAF and SAST/DAST.