After exploring the file system, we discover that the sudo command has been configured to allow the fish user to run any command without a password:
su root
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. hack fish.io
http://10.10.10.15/uploads/shell.php A meterpreter shell opens, allowing us to navigate the file system and escalate privileges. After exploring the file system, we discover that
With administrative access, we can now explore the application's functionality. Upon reviewing the dashboard, we notice a " Upload File" feature. This feature can potentially be used to execute arbitrary code on the server. http://10
sudo -l We can leverage this configuration to gain root access: