Lab 09 Network Capture Analysis
The purpose of this lab is to become acquainted with using packet capture analysis tools. We will set up a contrived access to a phishing email as our situation to capture.
Capture some data to work with
- Start tcpdump or tshark
- Run it on the machine you will be doing the email access from so that it sees all the network traffic
- Run it in a terminal window that only does the capture
- Save the capture to a file
- Leave it running
tcpdump -w emailcapture.pcap
- Start Thunderbird or another GUI email client on nmshost, or another VM you set up for this
- Add an email account: nets1032@zonzorp.net, email your professor for the password to use
- Let it figure out the connection config, but click Manual config after it makes a guess, and before saving it
- Turn off TLS/SSL for the IMAP connection, set it to None - Thunderbird will warn you it is insecure, but go for it anyway
- Save the config, and when Thunderbird starts up, open the Paypal folder and view the message in the folder - screenshot
* DO NOT DELETE THE MESSAGE, your classmates will need to be able to view it
- Stop the tcpdump so that you have a usable
emailcapture.pcap
file - screenshot
Use tcpflow to break out the flows into separate files
- Run tcpflow with full scanners to create separate flow files - screenshot
tcpflow -r emailcapture.pcap -a -e all -o emailflows
- Identify the flow file which contains the IMAP login. Hint - look for the word Authenticate in the flow file using grep - screenshot
- Use base64 decode on the login string to decode the login and password combination like you saw in the video - screenshot
base64 -d <<<"ugly long string on line after Authenticate in flow"
Use ngrep to find interesting flows
- Run ngrep to browse the IMAP session in the capture file
ngrep -I emailcapture.pcap -W byline -q port 143 | more
-
Create an ngrep command to find the Authentication information instead of the whole imap session - screenshot
- As a comparison, try using ngrep to view live traffic while retrieving the icanhazip.com website, displaying only http traffic in byline mode - screenshot
Use splitcap to manage large captures
- Use splitcap to make separate files for the flows on port 143 - screenshot
Reflection questions to be included in your project submission
- How do the flow files from splitcap differ from the flow files from tcpflow?
- Which one is easier to work with to extract the IMAP login?
- What commands did you use to extract the login from the tcpflows, versus the splitcap flows?
Use tcpstat to recognize interesting activity
- Run tcpstat to display the session activity timeline - screenshot
tcpstat -r emailcapture.pcap -o "Time: %r. \tbps: %b\tpps: %p\tARP: %A. \tTCP: %T. \tUDP: %U. \tSizes: %m-%M\n"
Task to be included in your project submission
- Identify if possible
- delays in the session
- when large transfers occurred
- when data bursts happened
Use NetworkMiner to explore a capture
- Install NetworkMiner and open your capture file
- Review the various tabs of discovered information
- Note the display of the login credentials for the IMAP session - screenshot
- After running NetworkMiner, review the files it put into the AssembledFiles and Images directories
- Select 2 capture files from the sample captures on netresec.com to open with NetworkMiner and see what it shows they contain
- include at least one screenshot showing something interesting from both of the pcaps you looked at
- describe what you found interesting about the ones you selected
Grading
Submit a single pdf file containing screenshots as well as text responses to the questions in the lab. Use the rubric on blackboard as a guide to ensure you have everything needed in your submission.