Network Analysis Training
Network Analysis Training
A OPERATION CHIMERA
NETWORK ANALYSIS MODULE // SECURITY BLUE TEAM
User Datagram Protocol (UDP) is a connectionless protocol that unlike TCP doesn’t
use error-checking and recovery services. UDP continuously sends datagrams to
the recipient whether they receive them or not. Example: UDP is used in live
streaming and online gaming, as the clients typically want speed instead of quality.
This is why sometimes the quality of the video may drop or games may become
‘laggy’, because some packets haven’t been delivered correctly or became
corrupted in transit.
INTRODUCTION TO WIRESHARK
[1] Introduction
[2] Downloading Wireshark
[3] Using Wireshark – Live Capture + GUI
[4] Using Wireshark – Importing PCAPs
[5] Using Wireshark – Default Color Coding
[6] Using Wireshark - Filters
N.A OPERATION CHIMERA
NETWORK ANALYSIS MODULE // SECURITY BLUE TEAM
Introduction:
Wireshark is an open-source network protocol analyzer that was created in 1998 by
Gerald Combs. This packet sniffer is able to capture network traffic and store it
locally for analysis any time. Whilst this tool is usually used for network
troubleshooting, it can be used for malicious purposes such as sniffing attacks,
passive reconnaissance, and troubleshooting attack scans or exploitation attempts
to make sure they’re working. Wireshark is able to import and export .pcap files,
which is an abbreviation for packet capture.
Downloading Wireshark:
You’ll usually find Wireshark pre-installed in most security-related Linux
distributions, especially the Offensive Security Kali image. Wireshark is available
on Linux, Windows, and MacOS. The download link for Wireshark is:
https://www.wireshark.org/download.html. If you’re running Ubuntu as the root
user, you can use the following command to install Wireshark:
sudo apt-get install wireshark.
The only network adapter I have configured is eth0, so let’s monitor that by clicking
on it to highlight it, then clicking on the shark fin symbol in the top toolbar on the
left so start capturing packets. The main panel will start to fill up with packets that
are being recorded in real-time – yeah it looks confusing, but we’ll go through an
example later to make sure that you’re able to use Wireshark at a basic level!
You can stop recording traffic by pressing the red square button (same as the blue
fin that you pressed to start) in the top left of the tool’s display. Now that we have
some packets to mess around with, we can actually go into analyzing packets to get
useful information.
Wireshark has three panes, which are shown in the above screenshot. From top to
bottom they are:
• Packet List: This section shows the list of packets that Wireshark has
logged, including the time since start, sequential order, source IP/device,
destination IP/device, protocol type, packet length, and a short
description. From here you can right-click on a packet to follow the stream
or apply filters to sort through them all. Packets are color coded to help
better visualize the data.
• Packet Details: This pane shows you much more detail about the packet,
and the information is put into different categories, from frame to protocol,
so it’s easier to read.
• Packet Bytes: This section shows the raw hexadecimal of the packet.
Wireshark Filters:
Filters are a really important part of Wireshark that allows us to find specific activity
and look at the results we want to see instead of having to look through everything
contained in the PCAP or live capture.
So, let’s apply a super simple filter. Below we have a screenshot of a pcap that is
currently in time order with no filters. If we only want to see traffic associated with
the HTTP protocol, we can use http. Now on the bottom picture we can see that the
protocol column only features HTTP, allowing us to look specifically at web-based
activity including GET and POST packets.
N.A OPERATION CHIMERA
NETWORK ANALYSIS MODULE // SECURITY BLUE TEAM
Now let’s try following a tcp stream using a filter. If we use the filter “tcp.stream
eq(uals) 0” then this window will pop-up, displaying the first tcp stream in the
packet capture. Remember, streams are like conversations. We can see that in this
conversation the client issued a GET request to view a webpage, which was met
with a HTTP 200 OK message, and below that is the website content.
In the below example, I’m using the “frame contains” filter to look for TCP, HTTP
and DNS activity related to facebook. This is a great way to find activity from
specific sites. A real-world example would be using a PCAP from a firewall to
investigate a user clicking on a malicious website. Using this information, we can
search for “frame contains malicious-site” and see any associated traffic, such as
files downloaded, webpages visited, and any information submitted to the site.
You should make sure you’re familiar with the Wireshark GUI, how to follow
conversations (streams), and how to collect information from packets. When
starting, it’s a lot of ‘messing around and seeing what you can find’. Want to get
some more experience before the challenge? Try loading some of these PCAPs
provided by Wireshark and take a look yourself!
https://wiki.wireshark.org/SampleCaptures.
MODULE CHALLENGE
If you think you’re ready for the module challenge, head over to the website and
click on the ‘Challenge Brief’ under the Network Analysis module!
Good luck.