Writeups PicoCTFForensicsPCAPWiresharkROT13

Wireshark doo dooo do doo Writeup - PicoGym

Writeup for the Wireshark doo dooo do doo challenge from PicoCTF PicoGym.

Contents

Category: Forensics

Difficulty: Medium

Points: 50

Description

A network capture file (shark1.pcapng) is provided. The flag is hidden inside one of the captured HTTP responses, encoded with ROT13.

Overview

Background: PCAP Analysis

Solution

Step 1: Parse the Capture File

with open("shark1.pcapng", "rb") as f:
    scan = list(pcapng.FileScanner(f))

packets = [p.packet_data for p in scan
           if type(p) == pcapng.blocks.EnhancedPacket]

Step 2: Filter to the HTML Packet

packet = [p for p in packets if b"Content-Type: text/html" in p][0]

Step 3: Decode and Clean the Payload

packet = packet.decode("unicode-escape")
packet = "".join(c for c in packet if c.isprintable())
data = packet.split()[-1]

Step 4: Apply ROT13

rot13 = str.maketrans(
    "ABCDEFGHIJKLMabcdefghijklmNOPQRSTUVWXYZnopqrstuvwxyz",
    "NOPQRSTUVWXYZnopqrstuvwxyzABCDEFGHIJKLMabcdefghijklm"
)
result = str.translate(data, rot13)

Flag

picoCTF{p33kab00_1_s33_u_deadbeef}

← Back to Blog