📖
CTF Wiki
  • 🚩Arne's CTF Writeups!
  • 2025
    • TUCTF
      • Forensics - Security Rocks
    • San Diego CTF
      • Crypto - RustSA
      • Misc - Triglot
  • 2024
    • Lexington CTF
      • Misc - a little bit of tomcroppery
    • Imaginary CTF
      • Web - Journal
    • Space Heroes CTF
      • Web - Antikythera
    • HTB Cyber Apocalypse
      • Pwn - Sound of Silence
      • Misc - MultiDigilingual
  • 2023
    • NahamConCTF
      • Mobile - Red Light Green Light
    • BucketCTF
      • Rev - Schematic
      • Rev - Random security
    • HTB Cyber Apocalypse
      • Rev - Cave System
      • Rev - Somewhat Linear
      • Pwn - Void
  • 2022
    • DownUnderCTF 2022
      • Cloud - Jimmy Builds a Kite
    • Ã¥ngstromCTF 2022
      • Pwn - really obnoxious problem
      • Pwn - whatsmyname
    • Engineer CTF
      • Misc - Not really random
      • Misc - Broken Pieces
    • KnightCTF 2022
    • HTB CTF: Dirty Money
      • Forensics - Perseverance
  • 2021
    • MetaCTF CyberGames 2021
    • HTB - Cyber Santa
      • RE - Infiltration
    • Securebug CTF Thor 2021
      • Web - Tricks 1
      • Web - Tricks 2
      • RE - Hidden in Plain Sight
    • TFC CTF 2021
      • RE - Crackity
      • Pwn - Jumpy
      • Misc - Weird Friend
    • K3RN3L CTF 2021
      • Crypto - Pascal RSA
    • DamCTF 2021
      • Misc - library-of-babel
      • Pwn - cookie-monster
    • Killer Queen CTF 2021
      • Pwn - Tweety Birb
      • Forensics - Tippy Tappies
      • Pwn - I want to break free
    • BuckeyeCTF 2021
      • Web - pay2win
      • Misc - USB Exfiltration
Powered by GitBook
On this page
  • Description
  • Downloads
  • Solution
  1. 2021
  2. BuckeyeCTF 2021

Misc - USB Exfiltration

Medium | 106 solves | 252 points

Last updated 3 years ago

Description

Someone stole data from our servers and you need to figure out exactly what they took or you're fired! We know they zipped the files then transferred them via USB somehow so here's a capture of the USB traffic. You should be able to recover the files from that, right?

Downloads

Solution

First, we are presented with a Wireshark packet capture file.

From the protocol and challenge description itself, we know that these are USB traffic packets.

On further examination, I noticed that there are anomalies in the packet lengths.

While most of the packets were of lengths of < 100, there was a range of packets that have the length 16448. Again, from the initial bytes and challenge description itself, we can confirm that these are bytes of a zip file. To extract the zip file from the packets, we will use the following command:

tshark -r exfiltration.pcapng -T fields -e usb.capdata | sed -r '/^\s*$/d' > data.txt
  • The 1st part is to extract only from the Leftover Capture Data

  • The 2nd part is to remove all the empty lines

  • The last part is to output the data to the file 'data.txt'

Looking at the output data file, we see that there are still some gibberish data not related to the zip file. But since we know the zip file's header signature of 50 4B 03 04 and end signature of 50 4B 03 04, we can accurately extract the necessary bytes and write them out as a new file.

After creating the zip file and extracting it, we are given 2 files:

  1. meme.png

  2. flag.b64

The meme.png is absolutely useless and the other file flag.b64 is obviously the flag that is base64 encoded. Simply base64 decode the string and we get the flag!

Flag: buckeye{why_1snt_7h3r3_4_di55ect0r_4_th1s}

709KB
exfiltration.pcapng
Wireshark packet capture
meme.png