CYART // SCHEMA · DEFENSE-LAYERS7 NODES · 7 LINKSBLOCKED HERETELEMETRYALERTTHREAT · Attacker — phish, creds, exploitTHREAT01Attackerphish, creds, exploitEDGE · Edge — WAF, DDoS, TLSEDGE02EdgeWAF, DDoS, TLSSERVICE · Identity — SSO, MFA, deviceSERVICE03IdentitySSO, MFA, deviceSERVICE · Application — input validation, authzSERVICE04Applicationinput validation, authzDATA · Data — encryption, DLP, KMSDATA05Dataencryption, DLP, KMSSTREAM · Detection — logs, EDR, SIEMSTREAM06Detectionlogs, EDR, SIEMSTREAM · Response — runbooks, isolate, rotateSTREAM07Responserunbooks, isolate, rotate

Sandboxing and privilege separation

Assume the parser will be compromised and limit what it can do: the broker pattern, Chromium's process model and Rule of Two, seccomp-bpf, Landlock, pledge, AppContainer, in-process sandboxing with WebAssembly, and designing the IPC boundary.

🔒 PROBy ·Lesson·11 min read·Advanced → Staff
sandboxingprivilege separationseccomp-bpfLandlockChromium Rule of Twobroker process

01Plan for the bug you have not found

✓What you will learn
  • Explain privilege separation and the broker pattern
  • Apply Chromium's Rule of Two to decide where a sandbox is needed
  • Choose between seccomp-bpf, Landlock, pledge/unveil, AppContainer and microVMs
  • Design an IPC boundary that does not become the next vulnerability

Mitigations make exploitation harder; sandboxing limits what a successful exploit achieves. The idea is privilege separation: split a program so that the code handling dangerous input runs with almost no privileges, and a small, carefully written broker holds the privileges and performs only the operations the sandboxed part asks for, after checking them. OpenSSH has done this since 2002, with an unprivileged pre-authentication child handling network input.

Chromium's Rule of Two is the clearest design heuristic. Code may have at most two of these three properties: it processes untrustworthy input, it is written in an unsafe language (C or C++), and it runs with high privilege (unsandboxed). A C++ image decoder handling web content must therefore be sandboxed, or rewritten in a memory-safe language, or fed only trusted input.

Untrusted inputUnsafe languageHigh privilegeVerdict
YesYesNo (sandboxed)Acceptable: the renderer model
YesNo (Rust, Java, Wasm)YesAcceptable: a memory-safe parser in the browser process
NoYesYesAcceptable: trusted data only
YesYesYesNot allowed: one bug is full compromise

This is an advanced module

Vulnerability research & exploit mitigations is part of the Pro pass. 4 more sections — the deep dives, the final design, follow-ups and the test — unlock with it.

Already a cyart.io or studio.cyart.io member? Your pass code is in your Studio account.