Network Forensics-1
Network Forensics-1
otw
The first step, of course, is to download and install Wireshark. If you are
using Kali, it is pre-installed, Wireshark is available for multiple platforms
(Windows, Linux, Unix, etc). Make certain you install the version
compatible with your operating system. In addition, like other packet
sniffing tools such as Snort, Wireshark requires either Winpcap (Windows)
or libpcap (Linux) library files. When Wireshark prompts you asking
whether you want to install these, make certain to say "Yes".
(1) Ethernet,
(4) Wi-Fi
Now, Wireshark will begin capturing packets from your network interface
and packaging them into the .pcap format. This is the standard file format
for packet capture (you will find it being used throughout our industry in
such products as Snort, aircrack-ng and many others)
You will see three separate analysis windows in Wireshark. The top
window, labeled #1 in the screenshot below, is known as the Packet List
Pane. You should see color coded packets moving in real time through
this window.
The middle window, labeled #2 and is know as the Packet Details Pane.
This pane provides us with header information from the selected packet in
Window #1.
In the filter window, type "tcp". You will notice that it turns green
indicating that your syntax is correct (it remains pink when your syntax is
incorrect). Now, click the arrow button to the far right of the filter window
to apply the filter.
When you do, Wireshark will filter out all traffic, but the tcp traffic. You can
do the same for just about any protocol such as "http", "smtp", "udp",
"dns" and many others. Try out a few and see what kind of traffic is
passing your interface.
ip.addr==<IP address>
Note the double equal sign (==) in the Wireshark filter syntax. A single =
will not work in this syntax.
ip.addr == 192.168.1.107
Now, you will see only traffic coming or going to that IP address. This
allows me to narrow down my analysis to an IP of interest.
We can also filter traffic by port. If I want to see only TCP traffic destined
for port 80, I can create filter like that below;
tcp.dstport==80
When creating filters, we will most often use == as the operator in our
filter (there are others see below). This works fine as long as we are
looking for one of the many fields in the protocol. If we are looking for
strings in the payload, we have to use the "contains" operator. So, if I were
looking for packets with the word Facebook in them, I could create filter
like that below.
Finally, we can click on the Expressions icon to the far right of the Filters
window and it will open the Wireshark Display Filter Expressions
window like below.
To the left of this window is the long list of fields that can be filtered for.
These are hundreds of protocols and their included fields. You can expand
a protocol and find all of its fields and select the field of interest.
The upper right hand window includes the Relation choices. These include;
Operator Description
== Equal to
!= Not equal to
Try creating filters using some of these other operators and fields to get a
feel for what Wireshark can do for you.
It some cases, rather than examine all the packets of a particular protocol
or traveling to particular port or IP, you will want to follow a stream of
communication. Wireshark enables you do this with little effort. This can
be useful if you are trying to follow a conversation of a rogue, disgruntled
employee who is trying to do damage to your network, for instance
This will open a pull down window like that above. Click "Follow" and then
"TCP Stream".
This opens a window that includes all the packets and their content in this
stream. Note the statistics at the bottom of the window to the far left
(5796 bytes) and the method of displaying the content (ASCII).
Finally, we may want to gather statistics on our packet capture. This can
be particularly useful in creating a baseline of normal traffic. Simply click
on the Statistics tab at the top of Wireshark and a pull down menu will
appear. In our case, let's navigate down to the IPv4 Statistics and then All
Addresses.
When we click, it will open a window like below that will display statistics
for each and every IP address in our packet capture
Wireshark is an essential tool for analyzing network traffic both for the
network engineer but also the digital forensics investigator. Every digital
forensic investigator should be conversant with this powerful tool.
For more on using Wireshark for network forensics, check out this article.