CyberKit

Return-Oriented Programming

Also called ROP.

Chaining existing code snippets ending in returns to run logic.

What it is

An exploitation technique that strings together short instruction sequences (gadgets) already present in a program, each ending in a return. By controlling the stack, an attacker chains gadgets into arbitrary computation without injecting new code.

Why it matters

ROP is the standard answer to non-executable memory, reusing legitimate code to bypass DEP/NX. Recognizing ROP chains in memory or crash dumps is a key skill for exploit analysis.

In practice

An attacker pivots the stack to a crafted chain of libc gadgets that calls a function to mark memory executable, then jumps to their payload.

What to look for

  • Stack pivots and long chains of return addresses.
  • Calls to VirtualProtect or mprotect from odd places.
  • EDR exploit prevention alerts on ROP.

Common mistake

Relying only on DEP. ROP was built to get around it.

Practice it nearby

CyberKit has no tool for this term itself. These are the closest places to practice it.

In the field

Well-known tools where this shows up on the job. They are listed to show the landscape, not as a recommendation.

  • CrowdStrike Falcon Commercial

    An EDR agent that records process, file and network activity on each host and flags this kind of behavior.

  • Microsoft Defender for Endpoint Commercial

    Microsoft's EDR, with advanced hunting tables you can query for this activity across Windows, macOS and Linux.

  • Velociraptor Open source

    Collects and hunts for artifacts across many hosts at once, often during live response. Our notes.

  • Sysmon Free

    Free Windows logging of process starts, network connections and more, which many detections rely on. Our notes.

Read next

Sources