Join our Newsletter — 33% off our NHI Course

How does Call Oriented Programming work?

Call Oriented Programming is a code-reuse attack that chains existing call instructions and legitimate code paths to steer control flow without injecting new code. Attackers use it to bypass defences that focus on blocking returns or direct jumps. Defenders look for abnormal call chains, stack and control-flow integrity violations, and unexpected transitions into library code.

How call-oriented exploits steer control flow

call oriented programming, or COP, is a code-reuse technique that abuses existing call sites instead of injecting new instructions. The attacker builds a chain of legitimate calls so execution still appears to stay inside ordinary code paths. That makes COP useful when classic return-oriented defences are strong, because the payload is assembled from code that is already present in the process.

COP works by finding call instructions that can be reached in sequence and by shaping register or stack state so each call does useful work. The attacker is not inventing new code, only reusing the program’s own control transfers. The practical effect is that the process can be redirected while preserving enough legitimacy to evade simple “no injected shellcode” assumptions.

Because the technique relies on existing control transfers, the key security question is not whether the binary contains malicious bytes, but whether the observed sequence of calls makes sense for the program state. Defenders therefore care about control-flow integrity, call graph expectations, and transitions into library routines that do not fit normal execution paths.

Why COP bypasses return-focused defences

COP is attractive when a target has hardened return behaviour, because it shifts the attack surface away from returns and toward call instructions that are still available in compiled code. The attacker uses those legitimate calls to keep control flowing through code that defenders may trust more than a direct jump or injected routine. That makes the attack harder to spot if monitoring only looks for shellcode or obviously corrupted return addresses.

In practice, the bypass depends on abuse of trusted program structure. If a defender only validates returns, the attacker may still be able to build useful execution out of calls, especially in codebases with rich libraries and many reusable routines. The more complex the application and dependency set, the more opportunities exist for a chain of legitimate calls to produce an unintended outcome.

There is a close relationship between COP and broader code-reuse attacks such as return-oriented programming, but COP’s emphasis on call sequences changes the detection problem. The interesting signal becomes abnormal call order, unexpected argument setup, and library transitions that do not fit the application’s normal behaviour profile. For a general control baseline, NIST SP 800-53 Rev 5 Security and Privacy Controls is useful because it anchors integrity, access control, and audit expectations that make this kind of abuse easier to investigate.

What defenders should look for in practice

The most useful detections are behavioural rather than signature-based. COP often leaves a trail of odd call chains, unusual stack state, and control transfers into functions that are individually valid but collectively suspicious. If a process begins invoking library code in a sequence that does not match normal application logic, that is a stronger signal than whether a payload “looks like malware.”

Defenders should also pay attention to the preconditions that make code-reuse attacks possible in the first place, especially memory corruption and weak enforcement around indirect control flow. In environments where application hardening matters, OWASP API Security Top 10 is a useful adjacent reference for understanding how broken authorization and unsafe consumption patterns become abuse paths, even though COP itself is a lower-level binary exploit pattern. For broader attack-chain mapping, MITRE ATT&CK Enterprise Matrix helps teams connect exploitation, execution, and defence evasion into a single hunt hypothesis.

Where call integrity is a concern, CIS Benchmarks matter because hardened platforms reduce the attack surface that code-reuse chains can exploit, especially when paired with compiler and runtime protections. The operational goal is to make abnormal control transfers visible, not merely to prevent one exploit variant.

Risk and Threat Considerations

COP is risky because it exploits trust in legitimate code paths. If the environment allows enough reusable calls and the binary lacks strong control-flow integrity, an attacker can redirect execution without needing to inject new code, which can frustrate naive detection and prolong compromise.

Failure mechanism: The attacker corrupts execution state so the program performs a sequence of valid calls with attacker-chosen effects, while the defender’s controls fail to distinguish that chain from ordinary execution.

Impact: The process can be manipulated to disclose data, alter program behaviour, or support further compromise, especially when the chain reaches library routines that were never meant to be combined in that way.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK addresses the attack and risk surface, while NIST SP 800-53 Rev 5 and OWASP ASVS set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
NIST SP 800-53 Rev 5 SI-16 — Memory Protection COP relies on memory corruption and control-flow abuse.
AU-6 — Audit Review, Analysis, and Reporting Abnormal call chains require log review and analysis to detect.
Recommendation — Enforce memory-protection mechanisms that block unauthorized control-data manipulation. Review execution telemetry for abnormal control-flow patterns and escalate anomalies.
OWASP ASVS V15 — Secure Coding and Architecture Code-reuse attacks exploit architecture and memory-safety weaknesses in software design.
Recommendation — Design applications to reduce memory-corruption and control-flow abuse opportunities.
MITRE ATT&CK T1055 — Process Injection COP is a process-level execution abuse technique that fits adversary control-flow manipulation patterns.
Recommendation — Map suspicious execution redirection to ATT&CK and hunt for process-control abuse.

Practitioner Guidance

What to verify: Validate that your telemetry can reconstruct call sequences, not just returns and exceptions. If the only evidence you retain is a crash dump or a high-level alert, you will miss the behavioural pattern that distinguishes COP from ordinary execution noise.

Decision rule: If a process shows unexpected transitions into library code or a call pattern that does not match the application’s normal control graph, treat it as a potential exploit path and escalate to memory corruption and process-integrity review before assuming it is a benign anomaly.

Practitioner takeaway: COP is best defended by making control flow observable and hard to spoof, because the attack succeeds when legitimate calls are allowed to compose into illegitimate behaviour.