h4cked
Task 1: Oh no! We've been hacked!
It seems like our machine got hacked by an anonymous threat actor. However, we are lucky to have a .pcap file from the attack. Can you determine what happened? Download the .pcap file and use Wireshark to view it.
We can open the PCAP file in Wireshark after downloading it.
No answer needed
The attacker is trying to log into a specific service. What service is this?
If we scroll a bit we can see the following packets.
We can Follow > TCP Stream.
This does look like a login attempt.
Answer
ftp
There is a very popular tool by Van Hauser which can be used to brute force a series of services. What is the name of this tool?
Answer
hydra
The attacker is trying to log on with a specific username. What is the username?
We saw the in TCP Stream that the username was jenny.
Answer
jenny
What is the user's password?
If we change the stream to 7, we can find the correct password.
Answer
password123
What is the current FTP working directory after the attacker logged in?
We can find the current working directory on setting the stream to 16.
Answer
/var/www/html
The attacker uploaded a backdoor. What is the backdoor's filename?
We can find the answer in the same stream.
Answer
shell.php
The backdoor can be downloaded from a specific URL, as it is located inside the uploaded file. What is the full URL?
In order to answer this question we have to filter the packets using the following filter:
ftp-data
- On inspecting the second packet, we can find the URL.
Answer
http://pentestmonkey.net/tools/php-reverse-shell
Which command did the attacker manually execute after getting a reverse shell?
Let's navigate to stream 20.
Answer
whoami
What is the computer's hostname?
In the same stream, we can find the computer's host name.
Answer
wir3
Which command did the attacker execute to spawn a new TTY shell?
The answer is in the same stream.
Answer
python3 -c 'import pty; pty.spawn("/bin/bash")'
Which command was executed to gain a root shell?
Again in the same stream, we can find the answer.
Answer
sudo su
The attacker downloaded something from GitHub. What is the name of the GitHub project?
We can find the git clone that the attacker used.
Answer
Reptile