> For the complete documentation index, see [llms.txt](https://alham-rizvi.gitbook.io/alhamrizvi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alham-rizvi.gitbook.io/alhamrizvi/picoctf-writeups/picoctf/forensics/pcap/shark_on_wire2.md).

# shark\_on\_wire2

First, we received a **PCAP file**. I opened it using **Wireshark** to analyze the network traffic.

I first searched for **UDP packets** and noticed that many packets were coming from the same IP address. So I applied this filter:

```
ip.src == 10.0.0.66
```

This showed all packets sent from that IP.

After playing around with different filters in Wireshark, I noticed that most of the UDP traffic had **source port 5000** and **destination ports 8990 or 8888**. But around **packet number 1104**, the source ports suddenly started looking random.

One of the packets had **source port 5112**. The number **112 is important because in ASCII it represents the letter "p"**, which is the starting letter of many **picoCTF flags** (`picoCTF{...}`). This suggested that the **port numbers might contain hidden ASCII data**.

To extract the numbers from the PCAP file, I used **tcpdump** with this command:

```
tcpdump -nr capture.pcap "udp and port 22" | awk {'print $3'} | cut -d . -f 5 | tr '\n' ' '
```

Then I cleaned the output to remove the extra digits:

```
tcpdump -nr capture.pcap "udp and port 22" | awk {'print $3'} | cut -d . -f 5 | sed 's/^5//g' | sed 's/^0//g' | tr '\n' ' '
```

This produced the following numbers:

```
112 105 99 111 67 84 70 123 112 49 76 76 102 51 114 51 100 95 100 97 116 97 95 118 49 97 95 115 116 51 103 48 125
```

These numbers represent **ASCII character codes**. So I copied them into **CyberChef** and used the **“From Charcode”** operation.

After decoding, it revealed the **flag**.

Thanks for this guy's writup! <https://dmfrsecurity.com/2021/09/05/picoctf-2019-shark-on-wire-2-writeup/>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://alham-rizvi.gitbook.io/alhamrizvi/picoctf-writeups/picoctf/forensics/pcap/shark_on_wire2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
