How to use GTFOBins

Tryhackme — Jr Penetration tester — Room — Linux PrivEsc- Task 6 -Privilege Escalation: Sudo

Deepak Kushwah
Oct 31, 2021

https://tryhackme.com/room/linprivesc#

Task 6 Privilege Escalation: Sudo

Answer the questions below

Solution 1: — using https://gtfobins.github.io/

https://gtfobins.github.io/ is a valuable source that provides information on how any program, on which you may have sudo rights, can be used.

As we know user karen has three programs on target system with sudo rights.

let’s check with nano.

Just search nano at https://gtfobins.github.io/ and we got function named as sudo, let’s check it.

now let’s run “sudo nano” on target machine

Now press ctrl+R

then ctrl+X to move on execute a command mode

now we are on execute a command mode

Now we ran command “reset; sh 1>&0 2>&0"as mentioned in GTFOBins

Now we got the shell, let’s check user i’d.

let’s capture the flag.

capturing the flag2
What is the hash of frank’s password?

--

--