Introduction
Hey everyone, I hope you’re all doing great. Today, we’re diving into tackling a machine on Vulnhub.com called Deathnote. Let’s see what challenges await us!
Summary
Difficulty Level: Easy
Description: Don’t spend too much time thinking outside the box. It’s a straightforward challenge. It’s recommended to use VirtualBox instead of VMware for this task.
For more information about Deathnote and to download it, click the link provided.
Death Note [Link]
Let’s Hack
First, we need to discover our machine’s IP address. We can achieve this by using two tools: netdiscover and nmap.
netdiscover nmap -Pn 192.168.1.1/24
In my case, I utilized netdiscover and successfully found the IP address, which is 192.168.1.2.
![](https://techyrick.com/wp-content/uploads/2024/02/Feb-18-S-1024x277.webp)
After conducting an Nmap scan, I discovered that there are two open ports.
nmap -pn 192.168.1.2 22 ssh Secure Shell 80 http Hypertext Transfer Protocol
After attempting to access the IP in the browser without success, I decided to use Dirb to search for any available content.
dirb http://192.168.1.2
![](https://techyrick.com/wp-content/uploads/2024/02/Feb-18-Screenshot-from-Squoosh-4-1024x311.webp)
Then, I came across three endpoints.
http://192.168.1.2/robots.txt http://192.168.1.2/wordpress/index.php --> http://192.168.1.2/wordpress/ http://192.168.1.2/wordpress/wp-content/uploads
![](https://techyrick.com/wp-content/uploads/2024/02/Feb-18-Screenshot-from-Squoosh-5-1024x197.webp)
![](https://techyrick.com/wp-content/uploads/2024/02/Screenshot-2024-02-18-at-5.48.02 PM-1024x113.webp)
![](https://techyrick.com/wp-content/uploads/2024/02/Feb-18-S-1-1024x724.webp)
It’s displaying a hint! Let’s go ahead and open it.
![](https://techyrick.com/wp-content/uploads/2024/02/Feb-18-Screenshot-from-Squoosh-6-1024x553.webp)
Hint:
Locate the notes.txt file on the server. See the “L” comment.
Let’s concentrate on the hints.
Given that we need to find notes.txt and our website is running on WordPress, we have an endpoint at http://192.168.1.2/wordpress/wp-content/uploads. Let’s explore this further.
After some investigation, I discovered a directory listing on our endpoint:
http://192.168.1.2/wordpress/wp-content/uploads/2021/07/
Let’s access it.
Upon opening the directory, I found several subdirectories containing two .txt files, and among them was our notes.txt file.
![](https://techyrick.com/wp-content/uploads/2024/02/Feb-18-Screenshot-from-1024x190.webp)
Let’s open both of them.
![](https://techyrick.com/wp-content/uploads/2024/02/Feb-18-Screenshot-from-Squoosh-7-1024x507.webp)
![](https://techyrick.com/wp-content/uploads/2024/02/Feb-18-Screenshot-from-Squoosh-8-1024x443.webp)
It seems like one of these files contains usernames while the other contains passwords, but we’re not sure which is which.
Let’s take a step back. We also have a robots.txt file. Let’s examine it.
![](https://techyrick.com/wp-content/uploads/2024/02/Squoosh-Screenshot-Feb-18-1024x273.webp)
fuck it my dad added hint on /important.jpg ryuk please delete it
Something important seems to be in important.jpg. Let’s open it.
curl http://192.168.1.2/important.jpg
![](https://techyrick.com/wp-content/uploads/2024/02/Feb-18-Screenshot-from-Squoosh-9-1024x242.webp)
It indicates that we can use user.txt for the username. Since we also know that our SSH (port 22) is open, let’s attempt to find a username and password combination for it.
I employed the Hydra tool for this task.
hydra -L user.txt -P notes.txt ssh://192.168.1.2
![](https://techyrick.com/wp-content/uploads/2024/02/Squoosh-Screenshot-Feb-18-1-1024x377.webp)
Cool, we found the credentials!
Username: l Password: death4me
Let’s attempt to connect using SSH.
![](https://techyrick.com/wp-content/uploads/2024/02/Squoosh-Feb-18-Screenshot-1-1024x231.webp)
![](https://techyrick.com/wp-content/uploads/2024/02/Feb-18-Screenshot-from-Squoosh-10-1024x136.webp)
As per the hint, I located “L” in /opt/L, where I found two files: fake-notebook and rules. Let’s take a look at these two files.
case.wav :- look like hash code hint :- tool to decrypt hash
I utilized CyberChef to decrypt it, and it appears to be hex code. After decrypting it, we uncovered the password for Kira.
![](https://techyrick.com/wp-content/uploads/2024/02/Feb-18-Screenshot-from-Squoosh-11-1024x426.webp)
Now, let’s attempt to connect using the credentials for Kira.
su kira pasword kiraisevil
In the kira.txt file, we discovered another hash. Let’s try decrypting it using the same method.
![](https://techyrick.com/wp-content/uploads/2024/02/Squoosh-Screenshot-Feb-18-2-1024x480.webp)
After decoding, it’s indicating something.
please protect one of the following 1. L (/opt) 2. Misa (/var)
![](https://techyrick.com/wp-content/uploads/2024/02/Feb-18-Screenshot-from-Squoosh-12-1024x425.webp)
Now we need to search for Misa, which is located in the /var directory.
![](https://techyrick.com/wp-content/uploads/2024/02/Squoosh-Feb-18-Screenshot-2-1024x131.webp)
It seems it’s too late to focus on Misa now. Let’s shift our attention to obtaining the root flag. I then verified the permissions for Kira and confirmed that Kira has all the necessary permissions.
![](https://techyrick.com/wp-content/uploads/2024/02/Squoosh-Screenshot-Feb-18-3-1024x231.webp)
Here is a root directory.
sudo su for root access
Now we have access to view the contents of the /root directory. Let’s open root.txt.
cat root.txt
And with that, we have successfully solved the machine!
![](https://techyrick.com/wp-content/uploads/2024/02/Squoosh-Screenshot-Feb-18-4-1024x386.webp)
You’re welcome! If you have any more questions or need further assistance, feel free to ask.