60 Mins

Milestone 2: Automated PCAP Credential Extractor

Building the PCAP Parser Engine

In this mission, you are working as a Security Analyst for the VoidX SOC. We have intercepted a raw PCAP file containing unencrypted traffic from a compromised internal workstation. Your objective is to script a Python tool that parses the binary data to identify and extract HTTP POST payloads containing sensitive login credentials.

Your script must leverage the scapy library to read the PCAP file. Once the file is loaded, you must iterate through each packet, filter specifically for TCP traffic, and then inspect the application layer for HTTP POST requests. When a POST request is identified, you need to extract the raw payload data and search for common patterns like 'user=', 'username=', 'pass=', or 'password='.

Ensure your output is clean, formatted, and clearly indicates the source and destination IP addresses along with the extracted credential strings.

Security Operator Note: Focus on using the Scapy Raw layer's .load attribute to access the byte string containing the POST body data.
Text
# Target Input Stream:
# mock_post_payload = 'POST /login HTTP/1.1\r\nHost: internal.voidx.io\r\n\r\nuser=admin&pass=SuperSecret2024!'
# Expected Output: '[!] Credential found: user=admin&pass=SuperSecret2024!'
Lab Overview

Objectives & Tasks

Review the tasks below and follow the interactive instructions to complete this module.

Knowledge Check

Ready to test your understanding of Milestone 2: Automated PCAP Credential Extractor?

Back