2-Hunting Insider Threats Part 1
2-Hunting Insider Threats Part 1
Part 1
Lab 2
LAB OBJECTIVES
The objective of this lab is to read the PCAP file and identify any abnormal or malicious
traffic. You will need to answer the questions below after analyzing the PCAP files.
LEARNING OBJECTIVES
The learning objective of this lab is to get the student comfortable reading PCAP files and to
identify potentially malicious network traffic using the tools discussed in the module. The
student will be able to accomplish this using the information on how to spot
normal/abnormal traffic patterns based on specific protocols discussed within the module.
RECOMMENDED TOOLS
• Network Miner
• Wireshark
• You:
o IP: 172.16.151.50
o RDP Credentials: elshunter:ahuntingweg0!
• Alice’s Machine:
o Machine Name: w0001
o IP: 172.16.151.100
o MAC: 00-0C-29-5B-2D-60
• Bob’s Machine:
o Machine Name: w0002
o IP: 172.16.151.102
o MAC: 00-0C-29-2E-14-E5
• Charles’ Machine:
o Machine Name: w0100
o IP: 172.16.151.101
o MAC: 00-0C-29-61-E9-14
• Domain Controller:
o Machine Name: dc
o IP: 172.16.151.200
o MAC: 00-0C-29-D2-21-41
• Internal Server:
o Machine Name: xampp
o IP: 172.16.151.201
o MAC: 00-0C-29-3A-A2-FA
*Ignore any other traffic within that PCAP that doesn’t pertain to the internal lab
network and any IPv6 traffic. *
1. How many devices would you consider suspicious within the 172.16.151.0/24 in the
PCAP?
2. Upon quick glance, why would you consider these devices suspicious?
3. Taking a closer look at the details, what would you flag as strange for each of these
devices?
4. Of the suspicious devices, which would you consider a top priority to analyze further?
5. Anything you noticed regarding the web traffic from Charles’ machine?
6. Using another tool, analyze the PCAP further, what additional information did you
gather regarding these suspicious devices?
Within the Hosts tab of Network Miner we can see a list of machines.
(The snapshot above is only reflecting the machines of interest, within our internal network.)
1. We can do this within the Hosts tab, by hitting the + icon to expand the details within
Network Miner.
2. Let’s look at the details of the next suspicious device, following the same procedures
outlined in the previous step.
We see the source port is port 80 and the destination port is 443. Both are typically TCP
destination ports for HTTP/HTTPS traffic and typically port 80 wouldn’t be a source port. It
can be used by an attacker to hide his traffic in plain sight.
3. Let’s look at the third device on our list that we flagged as suspicious. We see the details
are similar from the previous device.
• 172.16.151.103:
i. It’s most likely a Windows device.
ii. It’s called rogue1.
iii. It’s not part of the domain.
iv. It queried for www.wireshark.org.
• 172.16.151.125:
i. Strange MAC address, BEEEEFDEEEAD. (fake MAC addresses)
ii. Vendor for NIC unknown.
iii. Host name unknown.
iv. OS unknown.
v. Communicated with the other suspicious device, 172.16.151.150, using
ports 80 & 443.
• 172.16.151.150:
i. Strange MAC address, DEEEADBEEEEF. (fake MAC addresses)
ii. Vendor for NIC unknown.
iii. Host name unknown.
iv. OS unknown.
v. Communicated with the other suspicious device, 172.16.151.125, using
ports 80 & 443.
4. Next within Network Miner we can look at the Sessions tab for more information
regarding these three devices.
5. There are a lot of entries. We can simply apply a filter to narrow down the output. We
can start by looking at the first flagged device, rogue1 (172.16.151.103).
Nothing is showing for 172.16.151.103, but we must try the other two devices.
6. At this point we’ll apply filters for the two other devices.
8. Back under the Hosts tab let’s look at the details for these two devices again and look at
the information for Incoming Sessions and Outgoing Sessions.
We see it shows 0 sessions. We will need to look at this closer within Wireshark but for now
let’s continue to gather information from Network Miner.
9. Remember that 172.16.151.103 made a DNS query for the Wireshark website. Let’s look
at the DNS tab within Network Miner and apply a filter so we can focus on the device of
interest.
• Packet nr 14559 confirms the DNS query for the URI and a servfail as the DNS
answer.
• At this point we can’t confirm that Wireshark was used on this device. Either the
user was investigating the Wireshark tool or the user used the tool and upon
launching the tool, Wireshark, it attempted to access the URI to see if any updates
were available.
11. Once we have the PCAP loaded into Wireshark, we can apply a filter to focus on rogue1
and monitor the captured traffic.
If we scroll down towards the end we see the standard UDP/53 DNS Query for
www.wireshark.org but nothing else pops out regarding these packets. Let’s look at the other
two devices of interest.
12. Again, we will apply a filter to remove all the noise and just focus on 172.16.151.125 &
172.16.151.150.
You should immediately see that a packet using SSL stands out, but we don’t see the three-
way handshake needed to establish the encrypted communication between the two devices.
13. Let’s look closer at this packet in Wireshark by viewing the details of the packet.
• 172.16.151.103: We didn’t get anything further regarding the DNS Query to the
URI.
• We got more details about the communication between 172.16.151.125 &
172.16.151.150:
i. 1 SSL packet, but no handshake and no details for SSL within the packet.
ii. TCP Retransmission packets using ports 80 & 443, SYN flag set.
iii. Not a port scan, because it was using same ports in each packet.
• 172.16.151.103:
o Possibly a Windows box which seems purposely named rogue1.
o Not following corporate naming convention & not part of the internal domain.
o A DNS Query from that machine was made for www.wireshark.org.
o Hypothesis: This is possibly a rogue device someone plugged into the
network.
• 172.16.151.125 & 172.16.151.150:
o No OS details or hostname for these devices.
o The NIC vendor is unknown but the MAC addresses seem to be fake, Dead Beef
and Beef Dead.
Theoretically: At this point, as a hunter, you need to figure out what these devices are and
what the adversary is doing at these endpoints. Right now, you only have an idea as to what
is going on.
Now, you receive another PCAP and load it to see if these three devices are suspect within
the latest PCAP file.
PCAP #2
1. This PCAP has only approx. 3,200 packets but we will follow the same steps as in step 1
and load the 2nd PCAP into Network Miner. Below is a snapshot as to what we seen at
first glance. Remember we’re just focusing on 172.16.151.0/24 network.
PCAP #1
PCAP #2
So, in PCAP #2 we’re seeing A LOT of references to www.kali.org and under the Previous IP,
(missing from the PCAP #1 for W0100), we see an internal IP for a smaller network, such as
a home LAN. This leads us to believe that this is a personal edition of Kali and it is probably
running on a laptop plugged directly into the network.
• Maybe the individual used a program, such as macchanger, and changed the MAC to
duplicate an actual device.
• Another possibility, although unlikely, is that the individual plugged the device into
the network and someone obtained the same IP as Charles’ device which will cause
issues.
We will see if we can obtain these answers with further analysis. Before we move to the next
tab within Network Miner, we see an entry for Kali Linux again in the Hosts tab.
3. Next let’s look at the Sessions tab to see if we can get any information about the suspect
devices. Let’s apply filters to focus on the IP we’re analyzing.
Since this Kali box popped up it’s now on top of our list, passing rogue1. Comparing the
impact of a pentesting distro on the network, versus a packet analyzer tool, the pentesting
distro wins hands down, as evident in our behavior.
This screenshot explains what could have happened with our original machine at
172.16.151.101 and this Kali box.
Look at frame nr.’s 221, 725, and 803. They show that at some point this Kali box was put
on the network and took the IP of the original box, Charles’ box, and as a result, the data
recorded seems tainted [kali] (Windows). We need to look at this further in Wireshark.
We see the packets start right into a TCP session on port 80 and it’s a HTTP GET Request
regarding the login page for Simple Voices.
6. Let’s pull the MAC address and apply some filters using that to try to find when the Kali
box jumped into the network.
Charles’ Box
Kali Box
It seems that the Kali box jumps into the network at packet 294. Let’s look at this traffic
further:
Here we see an unknown protocol, BJNP. You will encounter unknown protocols in your
Network Hunt engagements and you must do your due diligence to research it. The BJNP
protocol is a proprietary protocol from Canon where devices scan the local network for
Canon printers. Upon our TH research, we identified that some Linux distros perform this
scan. This helps us conclude that this is a Linux box and not a Windows box.
7. Let’s look at that one further. We see this is still pertaining to the DNS Queries and
Responses.
At packet 811 we see something odd. We see 2 RDP packets with the RST flag set.
To investigate this further, let’s alter the filter and focus on 172.16.151.101.
By looking closer at this set of packets we see a struggle for this RDP session between
Charles’ machine and the Kali box. After this it appears that the Kali box goes quiet.
9. Now let’s focus ONLY on the MAC address of this Kali box, excluding the IP address and
see what we get.
At packets 824, 2300, and 2466 we confirm our theory. The suspect plugged Kali box onto
the network.
Note: A quicker way to spot this would have been to look at all the ARP packets, by using a
filter.
Let’s expand our thinking, can this be a MITM attack instead of a simple DHCP conflict?
11. Let’s go back to Network Miner and continue analyzing the packets. We know thus far
that IP address 172.16.151.101 can point to two devices when we’re analyzing the details
of the PCAP. We already know what’s going on in the Sessions tab and let’s look at the
DNS tab for anything.
Nothing new regarding the IP we’re investigating. Let’s look at the other tabs for any
information regarding this IP.
Here we see that Charles’ credentials were passed in cleartext and we already have strong
proof that two rogue devices were on the network today, one of them being a Kali box. At
this point we can’t clearly say if it was sniffed or not. It could have been sniffed either by
rogue1 using Wireshark or Kali using one of several ARP Poisoning tools,
We see the same IP address that we’re currently researching. At this point, we should report
the findings to Charles, so he can take the necessary measures, such as resetting the
password for starters. For us, the next step of the hunt is trying to find these rogue devices,
the culprit or culprits, and identify if they’re still on the network.
*Further analysis must be completed of this PCAP to find any other possible threats and we
still have some IPs of interest on our list. Let’s move on and check if we find anything
regarding the other IPs within Network Miner.
14. Within Network Miner add filter and look for any information in the Sessions and DNS
tabs about 172.16.151.125, 172.16.151.132, & 172.16.151.150.
• In Network Miner, we will don’t see any additional data.
15. Next, do the same within Wireshark for the suspect IPs.
16. First start with 172.16.151.103, remember this is suspect after 172.16.151.101.
• Nothing different really stands out, aside from what we already know.
17. Next let’s look at the new IP on our list, 172.16.151.132.
• For 172.16.151.132 we only see two packets and the MAC address is the same as
the Kali box.
i. (This should have been picked up in Network Miner > Hosts)
18. Finally let’s look at the last two IPs within Wireshark.
• Nothing new for 172.16.151.125 & 172.16.151.150. We see the same traffic as we
did in the previous PCAP.
1. How many devices would you consider suspicious within the 172.16.151.0/24 in the
PCAP?
a. 3
2. Upon quick glance, why would you consider these devices suspicious?
a. 1 machine had a host name of rogue1.
b. 2 machines didn’t show a host name.
3. Taking a closer look at the details, what would you flag as strange for each of these
devices?
a. 1 machine was called rogue1 and isn’t part of the domain. Plus, it made a DNS
query for the Wireshark website.
b. 2 machines seem to talk to each other on ports 80 & 443. They had fake MAC
addresses and no details for host name or OS disclosed.
4. Of the suspicious devices, which would you consider top priority to analyze further?
a. Rogue1 due to the DNS Query to Wireshark website.
5. Anything you noticed regarding the web traffic from Charles’ machine?
a. Using HTTP TCP/80 to access a login page.
6. Upon further analysis, using another tool, what additional information did you gather
regarding these suspicious devices?
a. SSL handshake not found within packets.
b. Secure Sockets Layer field empty.
c. Ports 80 & 443 used but typically these are destination ports, not source ports.
d. TCP Retransmission packets, SYN flag set only in all packets.
KEY TAKEWAYS
1. Network Miner gives us a good overview and allows us to spot information which we
can research further in Wireshark if we can’t within Network Miner.
2. Certain applications and OSes, such as Kali, make DNS requests to vendor-based
websites.
3. You should be able to spot certain traffic rather quickly if within future packets:
a. DHCP/IP conflict
b. ARP Poisoning