AbsoluteNano

less than 1 minute read

πŸ“¦ SUDO MAKE ME A SANDWICH

Category Author
πŸ“¦ Miscellaneous Darkraicg492

Challenge Prompt

You have complete power with nano. Think you can get the flag?

Additional details will be available after launching your challenge instance.

Problem Type

  • Sudo

Solve

We are told we need to SSH into the machine, so we start with that. 2026-03-22_13-41-02

Upon logging in we check the directory where we see that there is a flag.txt file, but it is read only by Root. 2026-03-22_13-41-18

If we run a sudo -l to list out the commands we can run as root we see we can run nano with no password, but only against the file /etc/sudoers.
2026-03-22_13-41-45

If we run the command we are allowed to run:
2026-03-22_13-47-42

Inside the file we see the last line that let’s us run nano as root against the /etc/sudoers file. If we remove the text /etc/sudoers, we can run nano as root against any file!
Before:
2026-03-22_13-44-21

After:
2026-03-22_13-43-56

You can use Control + X to exit, Y to save and then Enter key to save as the same filename to overwrite.

We can use those permissions to give us sudo rights to the flag.txt file.
2026-03-22_13-48-26

Inside the flag.txt file we have the flag!
2026-03-22_13-48-02