Pyjails & Restricted Shell Escapes
Breaking out of sandboxed Python eval environments or restricted rbash shells.
Key Techniques: Python MRO/subclasses traversal, Unicode NFKC identifier normalization, audit-hook bypasses, and GTFOBins.
The Misc category rewards creativity, scripting fluency, and cross-domain problem solving. It encompasses Python/Bash jail escapes, custom network protocols, algorithmic puzzles, and increasingly Web3/Smart Contract auditing (reentrancy, flash loans, storage slot manipulation).
Breaking out of sandboxed Python eval environments or restricted rbash shells.
Key Techniques: Python MRO/subclasses traversal, Unicode NFKC identifier normalization, audit-hook bypasses, and GTFOBins.
Solving 1,000 timed socket rounds, maze games, or custom binary protocols faster than humanly possible.
Key Techniques: pwntools remote tubes, asyncio concurrency, and resilient state-machine parsers.
Exploiting reentrancy, integer/precision bugs, delegatecall storage collisions, and oracle manipulation.
Key Techniques: Foundry (forge/cast/anvil) local forks, invariant testing, and reading raw contract storage slots.
Read jail filter rules carefully: distinguish AST checks, character blocklists, builtin removals, and OS-level sandboxes.
For timed socket challenges, log raw bytes with repr() first so hidden newlines or ANSI codes do not break your parser.
For Solidity targets, reproduce the exact chain state locally in Foundry Anvil and write a deterministic exploit test.
# Python normalizes Unicode identifiers (NFKC) during parsing:
# Even if ASCII "open" is blocked, fullwidth characters may normalize!
# Defense: never pass untrusted strings to eval() or exec() at all.
import unicodedata
print(unicodedata.normalize('NFKC', 'open')) # -> 'open'Understanding parser edge cases explains why denylist sandboxes consistently break.
| Challenge / Track | Platform | Level | Focus |
|---|---|---|---|
| Bandit Wargame (Levels 0-33) | OverTheWire | Beginner | Essential Linux CLI, permissions, SSH, and shell escapes |
| Ethernaut Smart Contract Wargame | OpenZeppelin | Intermediate | Hands-on EVM and Solidity vulnerability labs |
| Pyjail & Misc Archives | CTFtime / picoCTF | Intermediate | Creative scripting and sandbox bypasses |
Never use application-level blocklists or Python eval() as a security sandbox—isolate untrusted code with OS containers or microVMs, and apply checks-effects-interactions plus formal audits to smart contracts.