Post

PsExec Hunt Lab — Cyber Defenders writeup

Welcome back!

I’ll tell you how I had fun with doing PsExec Hunt Lab from Cyber Defenders. Before you do this lab, you’ll need to be familiar with network forensics tool: Wireshark, which is a tool used to capture and analyze network traffic either in real time or via pcap file.

Ok, I’ll skip scenario not for too long. Actually, lab scenarios are good to read cause they’ll help you investigate a case that looks like real-world. By reading scenarios, you’ll feel like you are investigating a real-world case as a SOC analyst.

Q1. To effectively trace the attacker’s activities within our network, can you identify the IP address of the machine from which the attacker initially gained access?

First, I checked Statistics -> Conversations to know which IPv4 addresses are included in this case. Then I went to “IPv4” tab.

Screenshot 1

There you’ll see many ip addresses, right? Here, “10.0.0.130” sent many thousands of packets to “10.0.0.133”. It looks suspicious. Normally, not one legitimate ip address did send packets like that. So, I assumed that the attacker first gained access to local machine “10.0.0.130” in some way. That machine compromised and the attacker also did lateral movement to other local machine “10.0.0.133”. Then attacker sent data between machines.

Q2. To fully understand the extent of the breach, can you determine the machine’s hostname to which the attacker first pivoted?

For this question, I did some filter: “ip.src == 10.0.0.130 and smb2”.

Screenshot 2

I inspected for each packet to look for account and host. I found that at the third packet. I did follow -> TCP stream to read full conversation between two hosts.

Screenshot 3

Another solution from Cyber Defenders is to use ntlmssp.challenge.target_name filter in Wireshark, click on packet containing NTLMSSP Challenge and check the Target Name field.

Screenshot 4

Q3. Knowing the username of the account the attacker used for authentication will give us insights into the extent of the breach. What is the username utilized by the attacker for authentication?

Screenshot 5

Q4. After figuring out how the attacker moved within our network, we need to know what they did on the target machine. What’s the name of the service executable the attacker set up on the target?

The question asks executable service and the placeholder for answer contains “.***”, so may be it is an executable file.

Screenshot 6

Q5. We need to know how the attacker installed the service on the compromised machine to understand the attacker’s lateral movement tactics. This can help identify other affected systems. Which network share was used by PsExec to install the service on the target machine?

I have to find network share to install service. Normally, when to use SMB service, we use pattern like “\[ip-address]\ — — — $”.

Screenshot 7

Q6. We must identify the network share used to communicate between the two machines. Which network share did PsExec use for communication?

You can see the answer from above image.

Q7. Now that we have a clearer picture of the attacker’s activities on the compromised machine, it’s important to identify any further lateral movement. What is the hostname of the second machine the attacker targeted to pivot within our network?

For this question, I used “ntlmssp.challenge.target_name filter in Wireshark”, which is hint from above question no 2.

I changed time format to be easy for reading. I played time filter up and down to see happened case in time order. At the 8th packet, you’ll see the answer.

Screenshot 8

I hope you’ll enjoy this. Thank you for reading to the end !! Have a nice days, guys!

This post is licensed under CC BY 4.0 by the author.