A restricted python environment that limits what users can do inside a python interpreter.

  • Execution is through Serial Communication to prevent vulerabilities
  • Has sanitation of user input It is NOT a Sandbox. A sandbox has an independent environment.

Commonly created by:

  • disabling build-in functions like ( open(), exec(), eval(), etc )
  • Limiting imports
  • Overriding the [[Python builtins]] dictionary

Escape Techniques

Process

https://github.com/salvatore-abello/python-ctf-cheatsheet/blob/main/pyjails/how-to-solve-a-pyjail.md

  1. Pyjail Recon
  2. Pyjail Built-ins Exploitation

Resources