Skip to content

Finley-Klee/Wireshark-Packet-Operations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 

Repository files navigation

Wireshark-Packet-Operations

This is a walkthrough of my work on the TryHackMe lab (https://tryhackme.com/r/room/wiresharkpacketoperations)

Description

This lab is designed to build upon the skills learned in the Wireshark basics lab. In this continuation the focus is placed on packet-level details with statistics, filters, operations, and functions.

Utilities Used

  • Wireshark

Environments Used

  • Linux Ubuntu

Project walk-through:

  • Statistics | Summary

This task used various tools in the statistics menu to investigate trends in the packet capture by things such as endpoints, conversations, and protocols.


I navigated to the resolved addresses under the statistics menu
the wireshark window with the drop down statistics menu highlighting the resolved addresses option

Within the resolved addresses I searched for bbc to find the hostname that begins with bbc, and found its IP address
a small wireshark window with resolved addresses at the top and bbc in the search bar with a single entry listed

Next, to find the number of IPv4 conversations, I navigated to the conversations window under the statistics menu. I can see from the numbers associated to the different tabs along the top that there are 435 IPv4 conversations.
the conversations window in wireshark is shown with a red rectangle around the number 435 which is located on the tab titled IPv4

The next question asks for the number of bytes transfered from the "Micro-St" MAC address, which I found by navigating to the conversations window, and then enabling name resolution so that the MAC addresses associated to known manufacturers would have the manufacturer's name displayed in place of their unique identifier.
the wireshark endpoints window shows a list of endpoints listed by their MAC address. The line with a Micro-St MAC address is highlighted and a red rectangle surrounds the number of bytes which reads 7474k

Then I searched for the number of IP addresses linked with Kansas City by navigating to the endpoints window, and then clicked on the IPv4 tab. I scrolled through the list focusing on the city column until I found 4 IP addresses with Kansas City listed as their location.
the endpoints window in wireshark is shown with a list of IPv4 hosts and various data about them. The highlighted row shows the first of four hosts with IP addresses that are located in Kansas City

Lastly, for this section, I stayed in the endpoints window but scrolled horizontally to find the AS Organization column. I searched for the "Blicnet" organization and discovered that it has the IP address 188.246.82.7
A highlighted row in the endpoints window showing an IP address associated with Blicnet in the AS organization column.



- Statistics | Protocol Details

The next section focuses on observing trends through the IPv4 and IPv6 Statistics menus.


First I found the most used IPv4 destination address by navigating to the IPv4 statistics menu, then to the source and destination addresses.
the menu navigation from statistics to IPv4 statistics to source and destination addresses in wireshark.

Once in the source and destination addresses window, I collapsed the source IPv4 addresses and expanded the destination IPv4 addresses. Then I sorted them by count descending so that the destination address with the most connections would be listed first.
The wireshark window shows the source and destination IPv4 addresses for all of the endpoints involved in the packet capture. The highlighted row shows the top result for destination IP address when sorted by count.

Next, I investigated the DNS activity using the DNS menu under statistics. The DNS window shows both minimum and maximum values for each topic. I sorted the topics alphabetically and scrolled down to the service stats to find the request-response time max value.
the DNS window of wireshark with a highlighted line for request response time.

Finally, I used the load distribution to find the number of successful HTTP requests by rad[.]msn[.]com
various domain names are listed to the left with rad.msn.com highlighted showing 39 requests in the count column.



- Packet Filtering

In task 4, packet filtering principles, I learned that filters can be used both during the capture phase and at the display level. One must be careful when using capture filters because misuse of filters can result in important packets related to the incident not being captured at all, and so TryHackMe recommended to start with capturing without filters and then filtering the packet capture later in the display. There is a syntax used to write filters in Wireshark comparison and logical operators, and the filtering principles task teaches how to use that syntax. Following this instruction phase I put that knowledge to work in the packet filtering | protocol filters task.


It started simple with the filter "ip" to find the number of Internet Protocol packets in the capture. We can see at the bottom of the page that this filter applies to 99.9% of the packets, resulting in a total of 81420 ip packets.
the wireshark overview page is shown with the letters i p in the filter box.

Next, I used the comparison operator less than to filter based upon the time to live value of ip packets and find the number of packets where the ttl is less than 10.
the wireshark packet capture page with 'ip.ttl < 10' in the filter bar.

Then I filtered by tcp port 4444 using the equal to operator.
the wireshark packet capture page with 'tcp.port == 4444' in the filter bar.

The next filter gets slightly more complicated. I needed to use the '&&' operator to combine two filters. The first filter selects all of the http packets based upon their request method, selecting only the get requests, and the and operator further narrows that selection to those requests that had a tcp destination port of 80.
the wireshark packet capture page with 'http.request.method == GET && tcp.dstport ==80' in the filter bar.

Lastly, I used the knowlege that I could create a filter by selecting it in the "Display Filter Expression" menu to find the filter for DNS type A queries.
Within the display filter expression window the row dns.a Address is highlighted and to othe right a section showing the options is present, ==, !=, <, etc. has the is present option selected.

It turned out that the filter was simply dns.a, but since I didn't know that initially, I was able to find that information. As a result I was able to discover 51 DNS type A queries. the wireshark packet capture page with 'dns.a' in the filter bar.



- Advanced Filtering

In this last section I stretched my filtering skills by adding terms like "matches", "contains" and "string" to really refine the filter options.


First, I searched for the http servers that contained "Microsoft" to find the Microsoft-IIS servers and added the does not equal comparison filter to exclude any that had a source port of 80.
At the top of the wireshark window, the filter bar is yellow and shows the filter 'http.server contains

Then I narrowed in on only the Microsoft-IIS servers which were version 7.5 by adding a "matches" filter.
The wireshark window is shown with a green filter bar at the top containing the filters 'http.server contains

Next, to search for any packets that used one of a number of tcp ports, I used the "in" filter and a set containing the ports to include.
The wireshark window with the filter 'tcp.port in {3333, 4444, 9999}' shown at the top.

To filter only the packets with even valued time to live, I first had to convert those values into a string using the "string" filter, then match the last number to a set of even numbers.
The wireshark window with the filter 'string(ip.ttl) matches

In the last two questions I used a previously created "Checksum Control" profile. I, once again, used the "Display Filter Expression" menu to find the filter for bad checksum values.
The Display Filter Expression menu is shown with the TCP field name expanded and the sub field

This allowed me to see only the packets with bad checksum values, which had a black custom highlight color associated with the Checksum Control profile. At the top of the wireshark window, the green filter bar is seen with the filter 'tcp.checksum_bad.expert' and below that all of the packets have a black background with red font color.

Lastly, I clicked on the bookmarked filter button to the right of the filter bar to find the number of packets with http response code 200 that also contained gif or jpeg image content. The wireshark window is shown with the filters '(http.response.code == 200) && (http.content_type matches

About

This is a walkthrough of my work on the TryHackMe lab (https://tryhackme.com/r/room/wiresharkpacketoperations)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors