> For the complete documentation index, see [llms.txt](https://encient.gitbook.io/ctf-writeups-and-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://encient.gitbook.io/ctf-writeups-and-notes/ctf-writeup/gctf-2023/wireshark-2.md).

# Wireshark #2

Export HTTP object

## Description

I remember there is a compressed file. Please find it and expose the secret! Same challenge file as Wireshark #1.

## Solution

Challenge description mentioned file, so we can try to search for objects in the export section.

<figure><img src="https://3139068166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5otAmBnHXiDB0QXOOAMF%2Fuploads%2FmfarodXG3KWyLl5Rvn0j%2Fimage.png?alt=media&amp;token=cfba7e40-fc2e-4437-9960-f8b54e5499da" alt=""><figcaption></figcaption></figure>

`File` -> `Export Objects` -> `HTTP`

We chose to export HTTP objects as we can see that there are HTTP protocols in the packets. You can always choose other protocols to see whether there are any other objects transferred. However, the most common one is HTTP.

<figure><img src="https://3139068166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5otAmBnHXiDB0QXOOAMF%2Fuploads%2FAt8ujOWYfkjmehHmwofW%2Fimage.png?alt=media&amp;token=73ac6c31-2639-428a-8ed8-f03ee8064e4d" alt=""><figcaption></figcaption></figure>

Given hint is compressed file, we know that we need to focus on the zip file. We can then choose the `secret.zip` file and save it.

<figure><img src="https://3139068166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5otAmBnHXiDB0QXOOAMF%2Fuploads%2FPPQ87rgeOpq4wyYhEePx%2Fimage.png?alt=media&amp;token=c7c469ea-9645-44f4-80d4-384ed791a28f" alt=""><figcaption></figcaption></figure>

However, the zip file is not able to be extracted or unzipped as it is corrupted. It is shown that the end-of-central-directory is not found.

<figure><img src="https://3139068166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5otAmBnHXiDB0QXOOAMF%2Fuploads%2FuHC5qxSuSGqY2N7gp957%2Fimage.png?alt=media&amp;token=85d3303b-c540-4fdd-83fc-cb68667e4290" alt=""><figcaption></figcaption></figure>

After some research, we found the signature of the corrupted part.

```
hexedit secret.zip
```

<figure><img src="https://3139068166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5otAmBnHXiDB0QXOOAMF%2Fuploads%2FixNmXIEybCQlOhTHMqiS%2Fimage.png?alt=media&amp;token=3f5e1501-4578-4bfe-924b-a72c556eddaf" alt=""><figcaption></figcaption></figure>

Edit the corrupted part with the correct signature and the zip file will be fixed.

<figure><img src="https://3139068166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5otAmBnHXiDB0QXOOAMF%2Fuploads%2F5hp9wEa2HWspc9Svu7gW%2Fimage.png?alt=media&amp;token=94415036-4b7e-4b86-b1ad-2200b6cc4b11" alt=""><figcaption></figcaption></figure>

However, the zip file requires a password. The string in `secret.txt` did not work out for it. Therefore, we thought of bruteforcing the password.

```
zip2john secret.zip > secret.hash

```

Use `zip2john` to generate hash for the zip file.

```
john --wordlist=/usr/share/wordlists/rockyou.txt secret.hash
```

Then, use John the Ripper tool to bruteforce the password using `rockyou.txt` wordlist.

<figure><img src="https://3139068166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5otAmBnHXiDB0QXOOAMF%2Fuploads%2FGQnSXtgn0LYyy8TBBq2r%2Fimage.png?alt=media&amp;token=14377a3a-1c91-4b3d-8733-a824af4a5451" alt=""><figcaption></figcaption></figure>

The zip file password will be cracked successfully and the password is `batman`.

<figure><img src="https://3139068166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5otAmBnHXiDB0QXOOAMF%2Fuploads%2FO4GpEOZvCIhFdiPvwevl%2Fimage.png?alt=media&amp;token=082c3ebb-6894-4714-b328-d2414f3f0286" alt=""><figcaption></figcaption></figure>

Upon submitting the correct password, it will give us a file named “flag”. View it and get the flag.

## Flag

GCTF2023{C0rrupted\_Z1p\_f1l3s}
