cat: flag.txt: No such file or directory
Beginner Hint 1 (AI-translated)
- When you connect with
nc, you'll see that a shell is launched. - Reading
chal.sh, you can see thatflag.txtis created with permission 400 before the shell starts. - Then all files in the current directory are deleted by
rm *. - After that, a shell is launched via
sh. - Of course, running
cat flag.txtresults inNo such file or directory, so you can't read the flag directly. - So, how can you read the flag?
Beginner Hint 2 (AI-translated)
flag.txtis completely gone, but it wasn't the only file that contained the flag.- Think about
chal.sh, which also contained the flag.