Command Injection & Reverse Shells

Command Injection

Common ways of injecting commands

Argument injection

Reviewing Source Code

Upgrading Command Injection to a Shell

Resources

Linux Bind Shells

Linux Reverse shells

Making our revshell an MCP

Upgrading Linux Shell to a Better Shell

python -c 'import pty; pty.spawn("/bin/bash")'
python3 -c 'import pty; pty.spawn("/bin/bash")'
echo 'os.system('/bin/bash')'
/bin/sh -i
/bin/bash -i
perl -e 'exec "/bin/sh";'

Polyglot Payloads

Windows Reverse Shells

Windows Revshell Generator