Writeup: Pragyan 2019 - Save Earth

Information

  • Category: forensics

Description

In the mid 21st century, Ex-NASA pilot Cooper leaves his little daughter and goes an interstellar journey around the space to find an alternative planet (PLAN A) or to capture gravitational data and send it back to earth, which Scientists will use to save Earth. However Cooper finds himself stuck in a tesseract that spans across time, there is only one way he could transmit the data to his little girl.

We have obtained parts of what Cooper sent to his daughter, can you find the flag and save the earth?

Note: This question does not follow the flag format

Writeup

The challenge consist in a PCAP file called SaveEarth.pcap with some USB packets.

Since we were triggered about this USB PCAP (RIVERSIDE!) we easily dumped the capture data:

tshark -Y "usb.transfer_type == 0x01 && !(usb.capdata == 00:00:00:00:00:00:00:00)" -r SaveEarth.pcap -T fields -e usb.capdata > hex_data.txt

We got:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
01:02:00:00:00:00:00:00
01:04:00:00:00:00:00:00
01:02:00:00:00:00:00:00
01:04:00:00:00:00:00:00
01:01:00:00:00:00:00:00
01:02:00:00:00:00:00:00
01:01:00:00:00:00:00:00
01:04:00:00:00:00:00:00
01:04:00:00:00:00:00:00
01:02:00:00:00:00:00:00
01:04:00:00:00:00:00:00
01:01:00:00:00:00:00:00
01:04:00:00:00:00:00:00
01:04:00:00:00:00:00:00
01:04:00:00:00:00:00:00
01:01:00:00:00:00:00:00
01:04:00:00:00:00:00:00
01:04:00:00:00:00:00:00
01:04:00:00:00:00:00:00
01:04:00:00:00:00:00:00
01:02:00:00:00:00:00:00
01:01:00:00:00:00:00:00
01:04:00:00:00:00:00:00
01:04:00:00:00:00:00:00
01:04:00:00:00:00:00:00
01:02:00:00:00:00:00:00
01:01:00:00:00:00:00:00
01:04:00:00:00:00:00:00
01:04:00:00:00:00:00:00
01:04:00:00:00:00:00:00
01:02:00:00:00:00:00:00
01:02:00:00:00:00:00:00

The data contains just 3 values so we thought to convert them in a morse code string.

1
2
3
4
5
6
7
8
9
10
11
KEY_CODES = {0x02: ["_", "_"], 0x01: [" ", " "], 0x04: [".", "."]}

data = open("hex_data.txt")
cursor_x = 0
output = []
for line in data:
key1 = int(line.split(":")[1], 16)
output.insert(cursor_x, KEY_CODES[key1])
cursor_x += 1

print("".join(output))

We got the string -.-. - ..-. ... ....- ...- ...-- which decodes to CTFS4V3 from morse.

Flag

pctf{wh4_50_53r1u5?}