What is Sandbox?
An isolated environment where code runs with tightly restricted access, so that if it is malicious it cannot reach the rest of the system. Browsers sandbox web pages, and analysts detonate suspicious files in sandboxes to watch what they do.
Sandboxing shows up in two roles. As a protection, browsers, phones and document viewers run untrusted content in restricted processes, so an exploit must also escape the sandbox to do real harm. As an analysis tool, malware sandboxes (cloud services or local virtual machines) open a suspicious attachment or URL and record its behaviour: files written, processes started, network connections made. Analysts use those results to judge a file and extract indicators. Malware often checks whether it is in a sandbox and stays dormant if so, so a clean sandbox result is evidence, not proof, that a file is safe.
Source: NIST CSRC Glossary (CNSSI 4009-2022).
Practice it in a lab
Free, hands-on labs that teach Sandbox. 23 more labs also cover it.
- Sandbox a systemd service: drop its power with exec directives and score it with systemd-analyze (intermediate, ~60 min)
- Serve user-uploaded files safely: a separate origin, Content-Disposition, nosniff and a sandbox CSP (intermediate, ~60 min)
- Recognize malware's anti-analysis tricks: debugger, VM, sandbox, and timing checks (advanced, ~50 min)
- Render untrusted model chat templates in a Jinja sandbox, and audit them before you load (advanced, ~75 min)
- Sandbox a program's filesystem access from scratch with Landlock (advanced, ~70 min)
- Sandbox untrusted code with gVisor (runsc) — a userspace kernel between the container and the host (advanced, ~75 min)
- Sandbox untrusted code with WebAssembly and WASI (build the plugin host, prove the boundary) (advanced, ~90 min)
- Dynamic analysis: safely watch a program's real behavior in a sandbox VM (intermediate, ~75 min)
Related terms
Related
- Sandbox a systemd service: drop its power with exec directives and score it with systemd-analyze
- Serve user-uploaded files safely: a separate origin, Content-Disposition, nosniff and a sandbox CSP
- Recognize malware's anti-analysis tricks: debugger, VM, sandbox, and timing checks
- Render untrusted model chat templates in a Jinja sandbox, and audit them before you load
- Sandbox a program's filesystem access from scratch with Landlock
- Sandbox untrusted code with gVisor (runsc) — a userspace kernel between the container and the host
- Sandbox untrusted code with WebAssembly and WASI (build the plugin host, prove the boundary)
- Dynamic analysis: safely watch a program's real behavior in a sandbox VM
- MITRE ATT&CK
- Attack surface
- Indicator of compromise
- Defense in depth
- Cybersecurity glossary
- Free cyber labs