
You needed to use strace ./readmsg to see which files it tries to open. It attempts to open /tmp/log.txt but fails because it doesn't exist. You create /tmp/log.txt , run it again, and discover it reads your file as root. You can now symlink /root/flag.txt to /tmp/log.txt . Privilege escalation via symbolic link race condition.
Before we discuss failure, we must understand the target. HTB categorizes machines as Easy, Medium, Hard, and Insane (Red). Most hackers fail on Insane not because they lack technical skill, but because they lack . hackthebox red failure
Upon initial inspection, the Red Failure box appears to be a straightforward challenge. The box has a single open port, 80, which is running a web application. The web application seems to be a simple IIS (Internet Information Services) server, hosting a default webpage. However, as hackers dig deeper, they realize that there is more to the box than meets the eye. You needed to use strace
In the world of cybersecurity, certifications often promise competence, but labs like HackTheBox (HTB) deliver it—through a crucible of frustration, research, and repeated failure. Among the pantheon of HTB machines, “Red” stands as a deceptively simple yet punishing reminder of a core truth: in penetration testing, You can now symlink /root/flag