Individual skill

bypassing-restricted-shells

Escaping restricted shells (rbash, rksh, lshell), chroot jails, and language sandboxes (Lua, Python) during authorized engagements, plus bypassing command filters and bad-character / WAF restrictions to obtain arbitrary command execution from a constrained shell environment.

internal/tools/skills/data/linux-hardening/bypassing-restricted-shells/SKILL.md

Read pinned source

Source commit d42f381ad34843e71a42658e5c57290c713e85af

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
No
Repository scan complete
No
Skill scan complete
No
Observed behavior
Not checked yet
Last checked
Nov 7, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.

Repository context

Repository stars (not skill ratings)
1,313
Repository last updated
Nov 7, 2026
License
Apache-2.0

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# Bypassing Restricted Shells

## When to Use

- After landing in a restricted shell (`rbash`, `rksh`, `lshell`, custom menu shells) where `cd`, `/`, `>`, and PATH changes are blocked
- When a chroot jail confines the filesystem view and you need to reach the real root FS
- When command-injection input is filtered (spaces stripped, keywords blocked, character allowlists)
- When stuck inside a language sandbox (Lua, Python) reachable from an application
- During post-exploitation when an interactive shell needs to be upgraded from a limited binary

## Critical: Techniques Most Often Missed

Restricted-shell assessments fail when the tester tries one escape, hits a block, and assumes the jail is solid. Always run the full matrix.