|
| 1 | +--- |
| 2 | +title: "BSidesPDX - Down the Rabbit Hole" |
| 3 | +author: "Lyell Read" |
| 4 | +date: 2020-10-25T00:00:00-07:00 |
| 5 | +categories: ['Writeups'] |
| 6 | +tags: ['bsidespdx2020'] |
| 7 | +caption: "BSidesPDX logo" |
| 8 | + |
| 9 | +draft: false |
| 10 | +--- |
| 11 | + |
| 12 | +## Prompt |
| 13 | + |
| 14 | +Category: Over The Air |
| 15 | + |
| 16 | +297 Points |
| 17 | + |
| 18 | +5 Solves |
| 19 | + |
| 20 | +> During one of the commercial breaks of my favorite state sponsored educational video, there was some interference once again. There was a woman wearing some sort of face mask and there were strange tones. The tones were familiar and rang a bell, but I couldn’t quite put my finger on them. I don’t know what these things mean, but maybe you can figure it out. |
| 21 | +> |
| 22 | +> [twitch.tv/over_the_air](twitch.tv/over_the_air) |
| 23 | +> |
| 24 | +> Author(s): 0xdade & fdcarl |
| 25 | +
|
| 26 | +## Solution |
| 27 | + |
| 28 | +This challenge is where we really… umm… go down the rabbit hole, you could say ;). I started by playing the whole video and noting all the oddities that I could find, and started working them out one by one: |
| 29 | + |
| 30 | +- [\[00:00\]](https://youtu.be/_QgPMyRBBKM) : Many QR codes on the standby screen (challenge 1, “please stand by”) |
| 31 | +- [\[02:55\]](https://youtu.be/_QgPMyRBBKM?t=175) : Creepy appearance behind the betty crocker advertisement. |
| 32 | +- [\[04:51\]](https://youtu.be/_QgPMyRBBKM?t=291) : Sneezing guy repeated a couple times in quick succession. |
| 33 | +- [\[05:53\]](https://youtu.be/_QgPMyRBBKM?t=353) : In the duck & cover / burt the turtle clip, there’s a flag person in the bottom left that is sending text in the maritime flag signaling pattern. |
| 34 | +- [\[08:24\]](https://youtu.be/_QgPMyRBBKM?t=504): In the atomic bomb / duck & cover intro, when in Betty’s school, a creepy plague doctor mask guy with numbers and letters, and a tune (challenge 2, “xclusive numborz”) |
| 35 | +- [\[14:06\]](https://youtu.be/_QgPMyRBBKM?t=846) : When Tony is going to cubscouts / picnic – creepy guy overlay w anonymous-like mask on. |
| 36 | +- [\[15:46\]](https://youtu.be/_QgPMyRBBKM?t=946) : In the announcement about the Secret Squadron, `0x13A5C` is displayed, and a number is heard dialing in the background. |
| 37 | +- [\[17:21\]](https://youtu.be/_QgPMyRBBKM?t=1041) : Giant Behemoth: A message appears on the top of the screen. |
| 38 | + |
| 39 | +So, we eliminated or decoded one thing at a time, omitting the parts from previous challenges: |
| 40 | + |
| 41 | +- [\[05:53\]](https://youtu.be/_QgPMyRBBKM?t=353) : In the duck & cover / burt the turtle clip, there’s a flag person in the bottom left that is sending text in the maritime flag signaling pattern. |
| 42 | + |
| 43 | +The maritime / semaphore flag alphabet is documented, and I decoded the flag message to be two repetitions of: |
| 44 | + |
| 45 | +- J and ‘alphabetic’ (LH out ; RH up) |
| 46 | +- B and 2 (LH down; RH out) |
| 47 | +- S (LH low; RH out) |
| 48 | +- I and 9 (LH across low; RH up) |
| 49 | +- D and 4 (LH down; RH up – or LH up; RH down) |
| 50 | +- E and 5 (LH high; RH down) |
| 51 | +- S (LH low; RH out) |
| 52 | +- T (LH up; RH high) |
| 53 | +- R (LH out; RH out) |
| 54 | +- O (LH across high; RH out) |
| 55 | +- L (LH high; RH low) |
| 56 | +- O (LH across high; RH out) |
| 57 | +- L (LH high; RH low) |
| 58 | +- O (LH across high; RH out) |
| 59 | +- L (LH high; RH low) |
| 60 | +- O (LH across high; RH out) |
| 61 | + |
| 62 | +To get result `BSIDESTROLOLOLOL`. Bummer, but at least we can cross off this lead for now. |
| 63 | + |
| 64 | +- [\[17:21\]](https://youtu.be/_QgPMyRBBKM?t=1041) : Giant Behemoth: A message appears on the top of the screen. |
| 65 | + |
| 66 | +The message on the top of the screen was decoded, as it was quickly identified to be the [pigpen cipher](https://en.wikipedia.org/wiki/Pigpen_cipher). |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | +`not a flag either` |
| 71 | + |
| 72 | +- [\[15:46\]](https://youtu.be/_QgPMyRBBKM?t=946) : In the announcement about the Secret Squadron, `0x13A5C` is displayed, and a number is heard dialing in the background. |
| 73 | + |
| 74 | +Now things get more interesting. We have the tones associated with dialing a phone number, and a message on screen. The message reads `0x13A5C`, which is `80476` in decimal. |
| 75 | + |
| 76 | +Decoding the phone dial presses is a matter of interpreting the [DTMF](https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling) tones. This requires first trimming the whole audio clip from the recording into [a clip of just the phone dial tones](https://github.com/lyellread/ctf-writeups/blob/master/2020-bsidesctf/down-the-rabbit-hole/dtmf.wav). This `.wav` file can then be put into [a dtmf decoder](https://github.com/ribt/dtmf-decoder), and it returns a phone number: `5038326682`. |
| 77 | + |
| 78 | +For this next part, I’ll rely on what my teammates described, as I cannot call that number. However, when called, the caller is asked for a number. When provided with `80476`, the voice on the other end sounds out the following string of morse code: |
| 79 | + |
| 80 | +``` |
| 81 | +-- ... --. -. ..- -- ....- .---- -.... ---.. ...-- |
| 82 | +``` |
| 83 | + |
| 84 | +When decoded, this turns into the string `MSGNUM41683`, which we initially did not know what to do with. `41683` is another 5-digit number, however, so let’s just try calling 5038326682 back, and giving it our new number, shall we? |
| 85 | + |
| 86 | +More progress! The number speaks back `overtheair.space`. This link redirects us to [an unlisted YouTube video](https://www.youtube.com/watch?v=YcArof3MXx8) that contains more content similar to the twitch stream. In the middle of it, however, is a break, where loud beeping is heard that was instantly recognized to be [SSTV](https://en.wikipedia.org/wiki/Slow-scan_television). Now we need to decode that, and first that means downloading it… |
| 87 | + |
| 88 | +> Given the tragic closure of the `youtube-dl` repository caused by RIAA, we almost resorted to [downloading the source code off twitter, and reconstituting the youtube-dl source code from that](https://archive.vn/VdmaG), however someone still had youtube-dl installed, and we successfully (allegedly, maybe) downloaded that video (see there is a good use for `youtube-dl`, RIAA). |
| 89 | +
|
| 90 | +With that in hand, we extracted and trimmed the audio to [just the SSTV parts](https://github.com/lyellread/ctf-writeups/blob/master/2020-bsidesctf/down-the-rabbit-hole/captured_signals_sstv.wav), and then came the fun part. |
| 91 | + |
| 92 | +Following [an extremely thorough guide about how to decode this very kind of file](https://ourcodeworld.com/articles/read/956/how-to-convert-decode-a-slow-scan-television-transmissions-sstv-audio-file-to-images-using-qsstv-in-ubuntu-18-04), from Carlos Delgado, we successfully set up `qsstv`, a virtual audio cable (loopback so that audio can be played from computer into `qsstv`), and we were off to the races: |
| 93 | + |
| 94 | +I was a bit slow to start it the first time, so I got the second half first: |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | +… and the second part on the second run: |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | +``` |
| 103 | +BSidesPDX{b3_sUR3_T0_dr!nk_y0Ur_Ov4ltin3} |
| 104 | +``` |
| 105 | + |
| 106 | +~Lyell |
0 commit comments