Friday 5:10 p.m.–5:40 p.m.
Building and breaking a Python sandbox
Jessica McKellar
- Audience level:
- Intermediate
- Category:
- Python Core (language, stdlib, etc.)
Description
Abstract
What does it take to make a Python sandbox that can run untrusted code? Learn some surprising language features and experience the security challenges first-hand as we work through building a Python sandbox from scratch, finding new ways to escape it at each turn.
You'll leave this talk with renewed appreciation for the dynamic nature of Python, some sneaky language tricks, and a solid grounding in the classes of security concerns sandboxed environments have to consider through concrete examples, building from the simplest cases up through quite sophisticated exploits.
Throughout the talk we take inspiration from the excellent pysandbox and PyPy sandbox projects, as well as some devious historical Capture the Flag challenges involving breaking out of flawed sandboxes.