1 # Tasteless CTF 2019 - RGB (steg)
3 ## The CTF in retrospective
4 I've checked out some of the challenges, but in the end I've sticked to the RGB Challenge, because I did already quite some
5 steganography challenges. I really liked that they had a good variaty of challenges and some of them were quite unique.
7 I would rank this CTF in the skill requirement to the level **high**.
8 It is also reflected in the scoreboard on CTF Time, where were not a lot of teams that managed to get past
11 [Scoreboard Tasteless CTF 2019 on CTFtime](https://ctftime.org/event/872)
13 In the End I also managed to grab one of the 3 Flags.
16 Tasteless released the Files of this CTF on their Github repo:
17 [Tasteless CTF 2019 Repo](https://github.com/tastelessctf/ctf2019)
21 We got presented with 3 Challenges called `R`, `G` and `B`.
22 All of them linked to the same pcapng file. So in one file were 3 Flags hidden.
23 This was a steganography challenge. We needed to find the hidden flags in the network dump.
25 You can find the pcapng file in the following github link: [chall.pcapng](https://github.com/tastelessctf/ctf2019/blob/master/RGB/chall.pcapng)
29 ### Investigating the PCAP
30 The PCAP file exists of a single stream of a HTTP Communication:
32 The endpoint the page `ctf.tasteless.eu/stegano` is requested by the caller.
35 Host: ctf.tasteless.eu
36 User-Agent: curl/7.55.1
40 and get responded by a PNG File
44 Content-Type: image/png
46 Transfer-Encoding: chunked
47 Date: Sat, 19 Oct 2019 13:37:00 GMT
53 After extracting the picture, I've checked it out with stegsolve.
54 Stegsolve is a cool Steganography tool, written in Java by Caesum.
55 Caesum made a great [Handbook about Steganography](http://www.caesum.com/handbook/stego.htm)
56 where he also links to his selfwritten tools [Stegsolve](http://www.caesum.com/handbook/Stegsolve.jar)
58 In the picture we found some hints for all 3 Challenges in the corresponding Plane
63 Category: Standards Track
70 Category: Informational
76 Category: Informational
82 While checking the PCAP File, I saw that the responses are chunked.
83 When I investigated the TCP Stream I checked the chunked responses, that were introduced with the
84 string `1000;` and I also saw that they have a single character afterwards attached in the line.
85 While stepping through I realized that it was the flag.
87 ### Extracting the flag
89 I didn't take the time to write a python script with `scapy` to extract the packets, instead I extracted
90 the flag by hand with help of almighty Wireshark.
92 I've opened the `Follow -> TCP Stream` Option and put into the search Field the value `1000;`.
93 Then I clicked through and assembled the Flag by hand.
95 Flag: `tctf{NoB0dy_3xPec7s_chUnK_ex7En5iOnz}`
99 This Challenge was not solved by me but by the colleague `@dachleitner` in Mattermost.
101 It was hidden in the CRC fields of the IDAT chunks.
102 CRC Fields are also sometimes a usable sidechannel to hide information :-)
104 Flag: `tctf{Wh0_Do3s_n0t_l1k3_fL4gz_1n_cRc}`
109 We didn't managed to find it during the CTF.
111 ### Challenge Aftermath
113 After the CTF I asked in the IRC channel what was the intended solution for the B challenge.
114 I got the following anser:
115 `hetti91: extract bits from byte padding in front of stored blocks`
117 It was linked to following Function of zlib:
118 [zlib BYTEBITS()](https://github.com/madler/zlib/blob/master/inflate.c#L534-L538)
123 * When doing CTFs, write down the values of the flag format characters in hex, so you can find them in a hexdump or stream of data.