export TERM=xterm // give us access to term commands such as clear.
Optional if phase 2 not make the job done. Press CTRL+Z to put the shell in the background. Next, type this command in the same window: stty raw -echo;fg. This will bring your shell back to the foreground with a fully interactive experience.
Gather Infos and spiking
history check users, architecture and services
su user login with another user
sudo -l check what files current user could run as root
cat /etc/crontabcrontab -l cron is your friend
ls -l /bin/bash/bin/bash -p an easy win
sudo -u user command run command as other users
Exploiting SUID Executables(bash, binary)
find / -perm -1000 -type d 2>/dev/null # Sticky bit - Only the owner of the directory or the owner of a file can delete or rename here
find / -perm -g=s -type f 2>/dev/null # SGID (chmod 2000) - run as the group
find / -perm -u=s -type f 2>/dev/null # SUID (chmod 4000) - run as the owner
find / -perm /4000 -type f 2>/dev/null # Using the chmod number
find / -perm -g=s -o -perm -u=s -type f 2>/dev/null # SGID or SUID