~/talk

When Arbitrary Code Execution is Working As Intended What Code is Python Supposed To Execute

Talkat PyBay 2024 · on Saturday, 2024-09-21· [python, security]
name:Glyph
links:none on file
slides:none on file

Python executes code from many surprising places: current directory is often on sys.path, PYTHONPATH/PYTHONHOME/PYTHONSAFE and other env vars change import roots, pth files in site-packages run on startup without import, and pip install or pip download can execute package code. A proof‑of‑concept sandbox called sandbucket prototype uses macOS sandboxing to block access to home secrets while still running pip inside a restricted cache; it mostly works but remains experimental and requires careful vetting.

AI-written summary · about

  1. 0:00Introduction to arbitrary code execution
  2. 2:32Threat modeling and Python's threat model
  3. 8:29Where Python finds code to execute
  4. 15:10Securing Python environments from attackers
  5. 17:14Real-world attack scenarios in Python
  6. 23:25Why Python's default behavior is dangerous
  7. 25:32Demo: Sandbucket sandboxing tool
  8. 28:20Summary and defensive strategies
  9. 30:07Q&A begins
  10. 30:35Bundling code as executable for security
  11. 33:27Practical use of attack vectors
  12. 35:11Securing open-source projects and users
  13. 39:05Python-specific vs. general solutions
  14. 41:51Checksums for interpreter modules
  15. 44:18Sandboxing on macOS
  16. 46:45Containers vs. sandbucket for sandboxing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.