Post

SUDO MAKE ME A SANDWICH

Can you read the flag? I think you can! ssh -p 59861 ctf-player@green-hill.picoctf.net using password f7e73aca

image-1706

Connect with ssh -p 59861 ctf-player@green-hill.picoctf.net and use the password f7e73aca.

image-1707

image-1708

Only root can read flag.txt. Use sudo -l to check which commands your user can run with elevated privileges. image-1710

The sudo rules allow you to run the text editor emacs without a password (NOPASSWD). Run sudo emacs flag.txt to read the flag!

image-1711


This post is licensed under CC BY 4.0 by the author.