24Tem
Why can I cat a file I can’t find? [migrated]
I'm working on a TryHackMe problem (Task 15 here) to exploit a vulnerable component of a website to gain RCE and then read the contents of /opt/flag.txt
.
The targeted website uses an IP generated by TryHackMe which is different on each attempt, so I can't link to it. The exploit is here.
I can read the file using cat /opt/flag.txt
; but find -name 'flag.txt'
and find -name '/opt/flag.txt'
return no result; attempts to cd
to /.
or to the parent of the cwd are unsuccessful; and ls -a
doesn't list flag.txt
in the cwd.
Why can I cat
a file that I can't find
, and that doesn't appear to be in the cwd?