Find You’re Path
![[system_sujet.png]](https://raw.githubusercontent.com/Nouman404/nouman404.github.io/main/_posts/CTFs/CTF_INSA_2024/photos/system_sujet.png)
Here we are given username and password for the user bob. We can ssh into the machine as follows:
As you can see, when we perform sudo -l we see that we can run the vim command as any user or group (ALL:ALL) without the need to specify our password. Lets have a look at how we can get a root shell with Vim on GTFOBins:
We run the provided command and we have now a root shell:
![[system_root.png]](https://raw.githubusercontent.com/Nouman404/nouman404.github.io/main/_posts/CTFs/CTF_INSA_2024/photos/system_root.png)
We go into the /root folder and get the flag. Voilà:
![[system_flag.png]](https://raw.githubusercontent.com/Nouman404/nouman404.github.io/main/_posts/CTFs/CTF_INSA_2024/photos/system_flag.png)