1 00:00:00,920 --> 00:00:02,420 All right. 2 00:00:03,320 --> 00:00:05,040 Greetings, Wireless Village. 3 00:00:05,360 --> 00:00:07,480 Thanks for coming to my talk today. 4 00:00:09,280 --> 00:00:10,740 Brandon has the audio. 5 00:00:12,400 --> 00:00:19,700 All right, so today we're going to be talking about how to run a software-defined radio capture-of-the-flag using Challenge CTL. 6 00:00:20,060 --> 00:00:25,620 So, Challenge CTL is the software that we use to run the RF capture-of-the-flag here and some of the challenges. 7 00:00:26,460 --> 00:00:30,340 So, what we're going to talk about today is what is the RF CTF? 8 00:00:30,340 --> 00:00:35,800 If you've heard my spiel during this weekend, you're probably familiar with this. 9 00:00:36,080 --> 00:00:46,560 But just to make sure we're on the same page, we're going to go over what our goals are for the RF CTF, what kinds of challenges that we have, Wi-Fi, RFID, the other RF stuff, other RF. 10 00:00:46,560 --> 00:00:56,060 In this case, we kind of use that interchangeably with software-defined radio, mostly because we're using software-defined radio for a lot of it, and that's what we expect people to use to solve it. 11 00:00:56,060 --> 00:01:01,700 It's not necessarily the only thing that you could use to solve it, but that's what other RF is referring to. 12 00:01:01,880 --> 00:01:03,780 We'll talk a little bit about scoring. 13 00:01:03,960 --> 00:01:09,600 We're not going to go super deep into that since the focus of this is on using Challenge CTL. 14 00:01:10,520 --> 00:01:13,160 And then we'll talk about what some of those challenges are. 15 00:01:13,160 --> 00:01:20,620 We'll dive into Challenge CTL, what the design goals were for that, the current state, and then some future development ideas for it. 16 00:01:20,860 --> 00:01:34,120 And hopefully by the end of this, you'll be able to run Challenge CTL, you'll be able to run our software-defined radio challenges at home by yourself on your machine, your software-defined radio, and possibly even write your own challenges or roll the keys yourself. 17 00:01:35,900 --> 00:01:38,160 So a couple of acknowledgements real quick. 18 00:01:38,540 --> 00:01:41,960 A lot of people have contributed to make the RFCTF happen. 19 00:01:41,960 --> 00:01:43,900 That's for all the different challenges. 20 00:01:43,980 --> 00:01:51,240 So I'm going to be talking about one aspect of it, but to actually make the event that you're seeing in front of you, it takes a lot of people. 21 00:01:51,520 --> 00:01:56,180 Current and former RFHS staff, there are a lot of people that have contributed and volunteered over the years. 22 00:01:56,360 --> 00:02:09,460 Friends of the village, we have folks that haven't technically been on staff but are good friends of the village and have contributed a lot in terms of challenges, technical support, releasing great products, releasing great libraries, other software that we make use of. 23 00:02:09,820 --> 00:02:16,500 And then specifically for Challenge CTL and the software-defined radio challenges, I want to give acknowledgements to Russ Handorf. 24 00:02:16,500 --> 00:02:22,640 He is the person that introduced the software-defined radio aspect to the RF Capture the Flag. 25 00:02:22,660 --> 00:02:27,740 And then Corey Koval, also, he was the one that originally wrote Challenge CTL. 26 00:02:27,740 --> 00:02:34,220 I've been making some contributions, but Corey is the one that wrote the original wrapper for all these challenges. 27 00:02:36,160 --> 00:02:38,380 So what is the RF CTF? 28 00:02:38,380 --> 00:02:47,040 So it's a radio frequency capture the flag, and the goal is to capture, identify, and decode or interact with lots of different RF signals. 29 00:02:47,360 --> 00:03:02,200 And these can range anything from Wi-Fi to Bluetooth, RFID, amateur radio, other types of RF, things like tire pressure sensors, industrial control systems, basically anything that communicates wirelessly, we're interested. 30 00:03:02,200 --> 00:03:05,760 And that can be a part of our challenge, or a part of our contest. 31 00:03:05,860 --> 00:03:08,420 And our goals are a couple of fold. 32 00:03:08,420 --> 00:03:11,540 So one, it's a competition, so it is a contest. 33 00:03:11,540 --> 00:03:17,000 We want to see who can solve the most challenges, who can solve them most quickly, all that kind of stuff. 34 00:03:17,220 --> 00:03:20,220 But the main goals are learning and experimentation. 35 00:03:20,220 --> 00:03:23,360 We want this to be an educational activity. 36 00:03:23,480 --> 00:03:34,800 We want people to be able to come and try out their tools, their software, be able to attack our networks and signals and really play with stuff in a way that they wouldn't necessarily be able to at home or out in public. 37 00:03:34,840 --> 00:03:37,060 So things like, you know, we've got restaurant pagers. 38 00:03:37,060 --> 00:03:41,500 If you want to try to set some of those off, set ours off and don't tick off the local restaurant. 39 00:03:41,840 --> 00:03:44,180 Try out new different attacks and things. 40 00:03:44,180 --> 00:03:52,860 Try out aspects of amateur radio or just wireless experimentation that you've not gotten a chance to do at home. 41 00:03:55,720 --> 00:03:57,080 So real quick on scoring. 42 00:03:57,080 --> 00:04:02,580 One of the things that makes it a CTF contest or a capture the flag contest is the scoring. 43 00:04:02,740 --> 00:04:08,900 So again, we're not going to dive super deep into this, but I want to acknowledge that this is a really important part if you're trying to make it a game. 44 00:04:09,600 --> 00:04:11,520 You have to keep score some way. 45 00:04:11,900 --> 00:04:19,020 If you want to just set this up for learning and experimentation, you can run all these challenges and just have a good time, not worry about scoring at all. 46 00:04:19,920 --> 00:04:25,320 Typically speaking, each challenge will have a certain number of points assigned to it. 47 00:04:25,320 --> 00:04:33,300 There are some other things where it's like you'll accumulate points based on how long you were in control of an access point or something along those lines. 48 00:04:33,300 --> 00:04:41,020 Those are a little bit different, but most of the challenges are if you solve this challenge, you submit this flag and you get this number of points. 49 00:04:41,740 --> 00:04:50,140 If you're going to be running a moderately sized capture flag or larger, something like this, you need some sort of scoring system. 50 00:04:50,140 --> 00:04:55,560 You could use paper or just write down scores for people if you have a small event, just a handful of people. 51 00:04:55,660 --> 00:04:58,800 Or if you're doing this with a couple of coworkers or something. 52 00:04:59,320 --> 00:05:07,860 But for something like this, you need some sort of automated scoring system for people to put points in or put flags into, have them validated, and then assign points. 53 00:05:08,620 --> 00:05:11,060 Right now we're using CTFD. 54 00:05:11,160 --> 00:05:14,520 That's an open source project that you can download and run yourself. 55 00:05:14,520 --> 00:05:16,800 I think you can pay them to host it. 56 00:05:16,800 --> 00:05:18,220 We're hosting our own. 57 00:05:19,260 --> 00:05:23,300 We've tried with a number of different roll-your-own scoring systems in the past. 58 00:05:23,300 --> 00:05:27,140 Over there on the right side, you can see that's our previous scoreboard. 59 00:05:27,800 --> 00:05:29,640 Down below, that is CTFD. 60 00:05:29,640 --> 00:05:31,260 That's what we're currently using. 61 00:05:34,530 --> 00:05:39,770 I mentioned typically the scoring is you get a certain number of points per challenge. 62 00:05:39,770 --> 00:05:42,830 At a basic level, what is an RFCTF challenge? 63 00:05:42,830 --> 00:05:47,770 This is a discrete wireless signal or a device to decode or interact with. 64 00:05:47,850 --> 00:05:54,410 We want to break down the Capture the Flag into small nuggets, like discrete things for people to do. 65 00:05:54,410 --> 00:06:00,510 Capture this Morse code signal, or set that pager off, or decode this other thing. 66 00:06:00,690 --> 00:06:07,150 Things like MeshTastic is really popular right now, but MeshTastic is not a Capture the Flag challenge. 67 00:06:07,150 --> 00:06:11,910 We could have a MeshTastic challenge, but it would be, we're sending out a message. 68 00:06:11,910 --> 00:06:12,910 Decode that message. 69 00:06:12,910 --> 00:06:16,830 Find that message, or send me a message on MeshTastic. 70 00:06:16,830 --> 00:06:17,950 Find this node. 71 00:06:17,950 --> 00:06:18,910 Find this device. 72 00:06:18,910 --> 00:06:19,990 Something like that. 73 00:06:19,990 --> 00:06:26,790 We have to make it a little bit more specific and something that people can actually digest and solve. 74 00:06:27,550 --> 00:06:29,030 A couple of requirements. 75 00:06:29,030 --> 00:06:32,390 Things that are required for our Capture the Flag challenges. 76 00:06:32,510 --> 00:06:34,050 Number one, it has to be legal. 77 00:06:34,050 --> 00:06:38,250 It has to be legal for both us to transmit and for the contestants to receive. 78 00:06:38,250 --> 00:06:43,510 This is one of the reasons that you won't see us running a cellular challenge, for example. 79 00:06:44,090 --> 00:06:47,730 We don't have the licenses to be able to transmit onto cellular bands. 80 00:06:47,750 --> 00:06:50,830 Contestants don't have licenses to be able to monitor that. 81 00:06:50,830 --> 00:06:52,970 That would cause all sorts of legal problems. 82 00:06:53,210 --> 00:06:59,770 Even if we were able to run our own cell tower, for example, it would be problematic to get the contestants to decode that. 83 00:06:59,770 --> 00:07:06,470 We would also potentially be encouraging people to do something that could get them into legal trouble if they make a misconfiguration or something. 84 00:07:06,470 --> 00:07:08,550 So we've tried to avoid things like that. 85 00:07:08,950 --> 00:07:11,990 Similar sort of thing with things like ADS-B. 86 00:07:11,990 --> 00:07:23,850 There's potentially ways that we could run an ADS-B challenge, but we need to modify that in a certain way so that people aren't sending out packets and disrupting local air traffic and that kind of stuff. 87 00:07:25,150 --> 00:07:28,030 Another requirement is the challenge has to be solvable. 88 00:07:28,490 --> 00:07:32,970 With this being said, it doesn't necessarily have to be solvable with some off-the-shelf software. 89 00:07:32,970 --> 00:07:37,250 There doesn't have to be an easy solution, but there has to be an answer for people to get to. 90 00:07:37,470 --> 00:07:42,750 So it can't just be a, we're transmitting something, good luck, let us know what you find. 91 00:07:43,090 --> 00:07:46,530 That would be hard to score, also frustrating for the contestants. 92 00:07:46,530 --> 00:07:48,390 You don't really know when you get to the end. 93 00:07:48,550 --> 00:07:52,430 And we want there to be a defined end to each of the challenges. 94 00:07:53,390 --> 00:07:55,170 Challenges also need to be repeatable. 95 00:07:55,170 --> 00:07:59,190 We have to do this every single time, like the same way every single time. 96 00:07:59,330 --> 00:08:04,230 And so throughout the course of the weekend, we're transmitting challenges hundreds of times, if not thousands. 97 00:08:04,270 --> 00:08:06,850 And it needs to be the same every single time. 98 00:08:07,090 --> 00:08:09,990 And we need to be able to do that at least for the course of the weekend. 99 00:08:10,410 --> 00:08:18,030 It's even better if we can have rollable keys, easily changeable keys, where we can change that between conferences. 100 00:08:18,110 --> 00:08:22,490 But if nothing else, it has to be repeatable for the duration of the contest. 101 00:08:23,330 --> 00:08:25,210 A couple of nice-to-have things. 102 00:08:25,530 --> 00:08:28,750 We'd like for the challenges to be solvable with commodity hardware. 103 00:08:28,750 --> 00:08:36,170 Things like an RTL-SDR or a BladeRF, a HackRF, things that people would commonly have and might be bringing to conferences. 104 00:08:36,550 --> 00:08:40,010 We try to avoid things that require specialized hardware. 105 00:08:40,010 --> 00:08:46,050 So if you need, let's say, one example that we've run a couple of times is 60 GHz Wi-Fi. 106 00:08:46,590 --> 00:08:51,970 There's specific hardware out there that you need for 60 GHz Wi-Fi or frequencies in that range. 107 00:08:52,030 --> 00:08:54,910 And that's not something that people typically carry around. 108 00:08:55,270 --> 00:09:03,190 When we've done that, we typically have gear available to loan to people to do that, but that is a little bit inconvenient on our side to be able to just bring more gear. 109 00:09:03,230 --> 00:09:04,410 It's another thing to bring. 110 00:09:04,410 --> 00:09:11,470 So nice-to-have is making sure that we can transmit it and that contestants can receive it with commodity hardware. 111 00:09:12,770 --> 00:09:17,090 And then another nice-to-have, I mentioned that the challenge has to be solvable. 112 00:09:17,830 --> 00:09:28,290 It's nice to have things like MultiMon that is meant for decoding pager traffic or other software like FL Digi for decoding some of the amateur radio modes. 113 00:09:28,450 --> 00:09:37,950 Those are nice-to-haves, but even if you have to go to something like InSpectrum or URH to manually decode some of these signals, that's okay. 114 00:09:37,950 --> 00:09:43,530 Sometimes that is meant to be a hard challenge, but it's nice when there's something out there already for folks to go and use. 115 00:09:43,530 --> 00:09:46,390 This way they can go and experiment with the protocols. 116 00:09:47,230 --> 00:09:54,290 It makes the challenge a little bit more approachable than there's a signal out there with no software that we know of to decode it. 117 00:09:54,290 --> 00:09:55,090 Good luck. 118 00:09:55,530 --> 00:09:58,370 Those are some of the requirements and nice-to-haves. 119 00:10:01,410 --> 00:10:07,310 There are a few rabbit holes that go into making the RF capture the flag that are outside the scope of this presentation. 120 00:10:07,730 --> 00:10:15,790 For the Wi-Fi challenges, check out the RFCTF container and some of the other repositories up on the RFHS GitHub. 121 00:10:16,550 --> 00:10:21,910 For the FOXs, Kitsune is the software that we run on the little FOX modules. 122 00:10:21,910 --> 00:10:28,110 Just for reference, the FOXs, we're talking about the fox-and-hound type challenges. 123 00:10:28,110 --> 00:10:31,110 That's where we give a person a wireless transmitter. 124 00:10:31,110 --> 00:10:39,450 They go around the conference just enjoying themselves like normal and then the contestants have to go find that person based only on the information about the wireless transmitter. 125 00:10:40,570 --> 00:10:43,270 The code that we're using right now for that is Kitsune. 126 00:10:43,270 --> 00:10:44,970 That's up on our GitHub as well. 127 00:10:45,670 --> 00:10:49,830 For RFID challenges, those are not transmitted with Challenge CTL. 128 00:10:49,830 --> 00:10:54,070 We have a building in a box that RTA created for us. 129 00:10:54,110 --> 00:10:58,670 And then you can also look into RFID door simulators for creating RFID challenges. 130 00:11:00,230 --> 00:11:01,930 RFID tends to... 131 00:11:01,930 --> 00:11:12,190 It's more realistic when you have real readers and so when you have a real reader configured to read the credentials that you're trying to get people to attack, that ends up being a more engaging RFID challenge. 132 00:11:12,210 --> 00:11:14,510 But those are outside the scope of this presentation. 133 00:11:14,510 --> 00:11:21,770 I just want to make you aware that that is also part of the RF Capture the Flag and things that you can look into if you're looking to run this kind of event yourself. 134 00:11:25,130 --> 00:11:29,970 So, running RFCTF challenges and running specifically the other RF. 135 00:11:29,970 --> 00:11:33,750 So, not Wi-Fi, not Bluetooth, RFID, that kind of stuff. 136 00:11:34,110 --> 00:11:37,150 One of the ways that you can run these is using dedicated hardware. 137 00:11:37,150 --> 00:11:39,130 And you'll see examples of this up there. 138 00:11:39,190 --> 00:11:43,890 Things like pagers, TPMS sensors, the RGB light ones that we have. 139 00:11:44,650 --> 00:11:46,830 We used to have a DVB-T transmitter. 140 00:11:47,430 --> 00:11:49,770 There's a couple of examples up in that picture there. 141 00:11:49,770 --> 00:11:54,690 Six low-pan radios, 802.15.4, a couple of different pagers and whatnot. 142 00:11:55,090 --> 00:12:02,270 So, the pros of this is that when you use off-the-shelf hardware doing exactly what it was designed to do, it's very reliable. 143 00:12:02,290 --> 00:12:03,830 It's also very realistic. 144 00:12:04,890 --> 00:12:06,270 So, those are great. 145 00:12:06,270 --> 00:12:11,570 And it's always fun to have stuff where people have seen these things and go, like, hey, I've seen that before. 146 00:12:11,570 --> 00:12:12,810 I know exactly what that is. 147 00:12:12,810 --> 00:12:17,750 I've seen that in my local restaurant, or I've seen that in a hospital, or isn't that a pager from the 80s? 148 00:12:17,810 --> 00:12:18,950 And the answer is yes. 149 00:12:18,950 --> 00:12:21,450 Those are all real devices just doing their thing. 150 00:12:22,250 --> 00:12:24,270 Cons of this are scalability. 151 00:12:25,110 --> 00:12:28,930 The more of these types of things that we add, the more hardware we have to bring. 152 00:12:28,930 --> 00:12:33,330 So, that just adds weight, adds complication in terms of getting the equipment to events. 153 00:12:34,350 --> 00:12:37,290 It adds expense because we have to go buy these things. 154 00:12:37,390 --> 00:12:43,210 We may or may not do that anyway for challenge development, but it just reduces the scalability of it. 155 00:12:44,050 --> 00:12:46,170 Replacement is also an important concern. 156 00:12:46,170 --> 00:12:51,770 If you have dedicated hardware, if that pager fails, that challenge is no longer in the CTF. 157 00:12:52,730 --> 00:12:57,190 I can't just run out to the store and buy a tire pressure sensor necessarily. 158 00:12:57,890 --> 00:13:01,590 That's probably the most easily replaceable item on that page. 159 00:13:01,810 --> 00:13:07,810 Some of the pagers and some of the dedicated hardware, though, you can't just run out locally and get if you need to replace it. 160 00:13:08,050 --> 00:13:13,010 Another con for some of the off-the-shelf stuff is the ease of changing keys. 161 00:13:13,210 --> 00:13:16,750 That pager, for example, that's got number 61 on it. 162 00:13:16,750 --> 00:13:24,830 That pager is always number 61 and there may be a way to change it with some other dedicated hardware, but it is not easy to change. 163 00:13:24,830 --> 00:13:30,330 That pager will always be that number assigned to that system unless it gets reprogrammed some other way. 164 00:13:30,590 --> 00:13:32,270 Same thing with that tire pressure sensor. 165 00:13:32,270 --> 00:13:33,610 It's got its own ID. 166 00:13:33,650 --> 00:13:38,670 It'll always be the same no matter what, basically until that battery dies and can't be changed. 167 00:13:38,670 --> 00:13:40,350 Those are some of the cons. 168 00:13:40,350 --> 00:13:44,870 It is nice again because they're realistic, they're engaging, and they're very reliable. 169 00:13:47,310 --> 00:14:03,850 The next step up from using dedicated hardware is using individual SDR flow graphs, things like GNU Radio or other types of scripts and whatnot, to be able to transmit using a HackRF, BladeRF, USRP, any of these types of things. 170 00:14:04,130 --> 00:14:06,690 These are great because they're easy to prototype. 171 00:14:06,690 --> 00:14:12,950 It's easier to roll the keys, usually, assuming you've designed that in a way where you can roll the keys and actually change things. 172 00:14:13,190 --> 00:14:15,410 And you can transmit it with commodity hardware. 173 00:14:16,390 --> 00:14:22,170 Downside to this is, so this is how most of our challenges start, is by an individual flow graph. 174 00:14:22,710 --> 00:14:24,190 I have one radio. 175 00:14:24,190 --> 00:14:25,890 I'm doing one thing at a time. 176 00:14:26,170 --> 00:14:27,190 I tried it out. 177 00:14:27,190 --> 00:14:28,210 Great, it works. 178 00:14:28,210 --> 00:14:29,830 That's good enough to be a challenge. 179 00:14:30,630 --> 00:14:40,510 Downside is when you do the development like this, you're tying up a single SDR device to one challenger script, and so that device will just be doing that one thing. 180 00:14:41,270 --> 00:14:47,890 And then starting and stopping those things with multiple devices, you are basically limited. 181 00:14:47,890 --> 00:15:01,550 If you turn off the GUI and make this into a script that just runs once and exits , you can wrap that in a bash script or something like that, but you're still essentially limited to the same loop, just one device running that one script. 182 00:15:07,260 --> 00:15:08,120 Let's see. 183 00:15:08,300 --> 00:15:10,960 Subdividing individual SDR flow graphs or scripts. 184 00:15:13,420 --> 00:15:19,340 When you're creating these individual scripts, there's essentially three different things that you can do with them. 185 00:15:19,740 --> 00:15:21,460 You can do a capture and replay. 186 00:15:21,460 --> 00:15:24,520 I mentioned the dedicated off-the-shelf hardware. 187 00:15:24,780 --> 00:15:33,900 One of the things that we could do with that is capture the raw IQ and just replay that IQ file, just a raw capture, which is fine. 188 00:15:33,900 --> 00:15:34,860 That will work. 189 00:15:34,860 --> 00:15:35,860 That will be functional. 190 00:15:35,860 --> 00:15:37,860 It's kind of messy, a little bit noisy. 191 00:15:37,860 --> 00:15:41,640 If we don't do some additional filtering and stuff, then you could be capturing other noise. 192 00:15:41,660 --> 00:15:44,780 It's not really the best way of doing things, but it would work. 193 00:15:45,940 --> 00:15:49,360 Next way, generating binary or audio files to transmit. 194 00:15:49,360 --> 00:15:58,460 This is how some of our challenges are done right now, where you generate a binary file and then use that into a more generic script to transmit that out of your SDR. 195 00:15:59,780 --> 00:16:03,640 That's reliable, but rolling keys can be challenging. 196 00:16:03,760 --> 00:16:11,540 Right now, with the challenge that we have running out of the SDR box, it takes roughly two hours to roll the keys. 197 00:16:11,540 --> 00:16:15,720 Not because there's that many challenges, that there's just so many things to do. 198 00:16:15,720 --> 00:16:23,560 It's that the time that it takes, the FL Digi is what we're using to generate some of those keys, and it's doing everything in real time. 199 00:16:23,560 --> 00:16:37,660 It's meant for interactive use, and so it is replaying everything in real time, so we have to wait for everything to finish generating and then save off the WAV file, then do it again to test to make sure that that works. 200 00:16:38,920 --> 00:16:47,200 And then there's also complication in terms of making sure that all the files are the right format and all that, before they go into the flow graph. 201 00:16:48,300 --> 00:16:53,140 So then, the next, the ideal state is when you're generating the signals entirely within the flow graph. 202 00:16:53,140 --> 00:17:04,300 So you give it the key that you want, so if I want the flag to be the quick fox jumps over the lazy dog or whatever, I just put that in and it generates everything for me. 203 00:17:04,300 --> 00:17:09,100 I don't have to wait for it to generate a binary file or anything, and it just goes. 204 00:17:12,820 --> 00:17:19,840 So, next thing to consider for scaling up from those individual scripts is scaling up with multiple devices. 205 00:17:20,180 --> 00:17:27,660 So, the pro, the main advantage that you get with this is that you will be able to get more challenges in the air with standardized hardware. 206 00:17:28,000 --> 00:17:32,300 So, you can absolutely run all of these challenges on a single device. 207 00:17:32,440 --> 00:17:34,720 The downside is that you're limited to that one device. 208 00:17:34,720 --> 00:17:40,180 That device can transmit usually one thing at a time, so you have one challenge in the air at any one time . 209 00:17:40,300 --> 00:17:51,660 And if your contestants are waiting for a specific challenge to come around, then they have to wait for all the other challenges that you have going to be transmitted before it gets back to the one that they're interested in. 210 00:17:51,960 --> 00:18:01,080 So, if you add multiple devices, then you can have three or more, however many radios you have, you can have that many challenges in the air at the same time. 211 00:18:01,540 --> 00:18:06,940 This is something that we've prototyped over multiple years, going back to roughly 2014. 212 00:18:07,440 --> 00:18:15,900 Russ Handorf, who I mentioned earlier, his original SDR football was actually using a couple of Raspberry Pis and PiFM to transmit some of the challenges. 213 00:18:16,640 --> 00:18:21,640 We relatively quickly moved on from that to using a couple of HackRFs. 214 00:18:21,760 --> 00:18:29,440 And so, the diagram up in the top right is essentially a functional diagram of the original software defined radio football. 215 00:18:29,640 --> 00:18:35,860 There were a couple of Raspberry Pis controlling a few HackRFs, and then those going out to a couple of amplifiers. 216 00:18:36,060 --> 00:18:41,360 There was also a DVB-T dongle, that's that specialized hardware, some of that specialized hardware I mentioned before. 217 00:18:42,160 --> 00:18:55,100 And from what I remember about running challenges on this, there was essentially one script per device, per HackRF, and then there was synchronization happening through a database that was on one of those two Pis. 218 00:18:55,960 --> 00:19:06,820 So that was essentially the first iteration of ChallengeCTL, before it was called ChallengeCTL, but that was how we were coordinating some of the challenges, and having each of those hosts go through and check, is there a challenge available? 219 00:19:06,820 --> 00:19:08,620 Is there one that I need to be running right now? 220 00:19:08,620 --> 00:19:12,300 And do I have, like, am I ready to transmit that on this device? 221 00:19:13,680 --> 00:19:20,320 Fast forward about a decade, and now we have our current generation SDR box, which is the picture in the bottom right. 222 00:19:20,320 --> 00:19:29,660 That is using three BladeRF 2.0s and that is running ChallengeCTL, which is a single Python wrapper to do all that marshalling and scheduling. 223 00:19:33,020 --> 00:19:36,900 So like I said, this is the current generation of our SDR box. 224 00:19:37,400 --> 00:19:38,840 It's running in Python. 225 00:19:38,840 --> 00:19:44,480 It's a multi-threaded Python application to manage the CTFs, or CTF challenges. 226 00:19:44,500 --> 00:19:58,480 It manages a list of software-defined radio devices, so it knows that it's got, in this particular case, it has three BladeRFs and it checks to make sure that device is available before it starts transmitting, and then when it finds an available device, 227 00:19:58,480 --> 00:20:03,400 it will check to see if there's a challenge that it needs to be transmitting, and it will take that challenge and start sending it. 228 00:20:04,720 --> 00:20:08,420 It manages a list of challenges, so we're not limited to three challenges with this. 229 00:20:08,420 --> 00:20:17,280 We have probably 15 or 16 different flags being sent out from these three devices, and it will cycle those challenges across devices as they're available. 230 00:20:17,640 --> 00:20:32,140 This is also doing some spectrum painting, so if you've seen our display over that direction, where we have the various different sponsor logos coming across the spectrum, that display isn't mixing them into the spectrum, that's doing that after the fact, 231 00:20:32,140 --> 00:20:42,780 but for Challenge CTL, we're actually putting our logo out on the radio frequency right before we transmit the challenge to make sure that contestants are aware that one of our challenges is coming. 232 00:20:46,140 --> 00:20:50,980 So, right now, there are a handful of different types of challenges in Challenge CTL. 233 00:20:51,160 --> 00:20:53,380 First type is Morse code. 234 00:20:53,800 --> 00:20:56,180 Next type is amplitude shift keying. 235 00:20:56,640 --> 00:21:02,640 We have narrowband FM and upper sideband flow graphs for transmitting some of the amateur radio digital modes. 236 00:21:02,840 --> 00:21:13,480 All three of those are actually carriers over from the original SDR Football and what Russ Endorf developed, I think, in collaboration with Arguello and some of his SDR examples. 237 00:21:14,280 --> 00:21:16,320 But those are some of the challenges that we've got. 238 00:21:16,320 --> 00:21:23,000 We've also got POCSAG and the long range systems restaurant pager challenge being transmitted out of that box as well. 239 00:21:25,260 --> 00:21:27,120 Alright, so, demo time. 240 00:21:28,280 --> 00:21:31,140 So, all of this is open source. 241 00:21:31,140 --> 00:21:32,880 Challenge CTL is open source software. 242 00:21:32,880 --> 00:21:34,680 It is available on our GitHub. 243 00:21:37,600 --> 00:21:50,600 And so, if you go to github.com rfhs challengectl there's a link to this from our website as well, rfhackers.com but this is the project that you're going to want to be looking at. 244 00:21:51,220 --> 00:21:54,900 So, this is what we use to transmit out all those challenges. 245 00:21:55,220 --> 00:22:02,200 We also have this flags archive where we upload challenges from previous CTFs. 246 00:22:02,200 --> 00:22:08,960 So, what I'm going to walk you through right now is running actually running all of our challenges as we were running them at ShmooCon. 247 00:22:08,960 --> 00:22:12,900 So, on my laptop here, I have a single just a single blade RF. 248 00:22:12,900 --> 00:22:19,020 So, not as fancy as the SDR box that we have up there with three of them. 249 00:22:19,800 --> 00:22:30,440 If you git clone the challenge CTL you'll come out here, you'll have a number of different scripts here. 250 00:22:30,440 --> 00:22:39,520 First one to take note of is the create devices.text.py So, one of the things that challenge CTL needs is two things. 251 00:22:39,520 --> 00:22:42,160 It needs a devices file and a flags file. 252 00:22:46,520 --> 00:22:52,980 So , first thing we need to do is generate that device file and then I'll show you the flags files as well. 253 00:22:53,200 --> 00:22:56,280 So, there are also a number of other examples up here. 254 00:22:56,280 --> 00:23:05,940 So, the flags.text.ci that's for testing to make sure that we don't have any new errors just for essentially continuous integration, continuous testing. 255 00:23:07,340 --> 00:23:09,580 But to create those, we have some examples 256 00:23:13,360 --> 00:23:13,760 for... 257 00:23:13,760 --> 00:23:17,400 So , this is the general format of the devices.text file. 258 00:23:17,400 --> 00:23:22,900 So, it's going to have a device ID or a device index and then the device string for Osmo SDR. 259 00:23:23,960 --> 00:23:28,980 Nice thing is that this script that I'm about to run will generate that file for you. 260 00:23:29,000 --> 00:23:32,500 So, you don't have to remember any of this, you don't have to worry about it. 261 00:23:36,580 --> 00:23:45,160 So, what that script is going to do is that it will query your system for any SDR devices that you have and it will put those into the devices.text. 262 00:23:47,160 --> 00:23:52,720 So, that's the devices.text file for my laptop right now with just this one SDR. 263 00:23:56,120 --> 00:23:59,360 Next thing that we have is the flags file. 264 00:23:59,360 --> 00:24:02,080 So, I mentioned that we have all of our... 265 00:24:02,440 --> 00:24:06,360 a lot of our previous conferences uploaded here with all the challenges that we're running. 266 00:24:06,400 --> 00:24:11,260 So, for ShmooCon 2025, this is a conference that we ran the CTF at in January. 267 00:24:19,730 --> 00:24:23,550 And this is what the flags file looks like. 268 00:24:24,350 --> 00:24:29,970 So, essentially what you have here is first line is the conference name and the start and end times. 269 00:24:30,090 --> 00:24:32,770 And then everything after that is an individual challenge. 270 00:24:32,870 --> 00:24:36,310 And you'll see from here we've got the ham digital challenges. 271 00:24:36,310 --> 00:24:39,670 So, these are all the amateur radio digital modes. 272 00:24:39,670 --> 00:24:45,150 Those are things like RIDI or Thor or Feldhell. 273 00:24:45,150 --> 00:24:46,630 There's a couple different other ones. 274 00:24:46,630 --> 00:24:51,550 Basically anything that can be encoded into an audio file can go into that type of challenge. 275 00:24:52,490 --> 00:24:55,210 So, you have a challenge name. 276 00:24:55,330 --> 00:25:00,070 For those files, the wave file is one of the arguments for it. 277 00:25:00,070 --> 00:25:05,230 You'll see one of the things that we need to work on is getting a more consistent format for some of these things. 278 00:25:05,230 --> 00:25:12,990 This field has a wave file for the upper side band, narrow band FM, and narrow band FM flow graphs. 279 00:25:13,270 --> 00:25:19,590 And then there are some other parameters after that for the audio's sample rate and the frequency that you're transmitting on. 280 00:25:20,670 --> 00:25:25,310 We also have the capability to transmit on different frequencies or randomized frequencies. 281 00:25:25,310 --> 00:25:34,470 So, when you see things like ham 440 that is anything in the amateur radio band at 440 megahertz could be transmitted anywhere within that range. 282 00:25:34,470 --> 00:25:39,410 This challenge is a little bit more difficult because it's not on the same frequency every time. 283 00:25:40,930 --> 00:25:43,610 Moving along from there, the Morse code challenges. 284 00:25:43,990 --> 00:25:54,410 These are one of the ideal state challenges where all you have to do is put in the text that you want sent in Morse code and make sure the frequency is right. 285 00:25:54,590 --> 00:26:02,750 There's also some parameters for changing the speed of the Morse code, but you type in the key that you want and that's what will be sent out over Morse code. 286 00:26:03,070 --> 00:26:06,470 No generating WAV files or BIN files or anything like that. 287 00:26:07,150 --> 00:26:11,470 The amplitude shifting challenges are basically the same as the CW ones. 288 00:26:11,470 --> 00:26:15,150 Those are you type in the flag and that will be sent. 289 00:26:16,170 --> 00:26:22,310 POCSAG is a little bit different in that there's an extra parameter for the cap code in addition to the flag. 290 00:26:23,010 --> 00:26:29,490 And then LRS is a little bit different in that these parameters are passed directly to the script that is generating a BIN file. 291 00:26:29,490 --> 00:26:35,670 So this is kind of an intermediate between generating a BIN file or a WAV file before running all of this. 292 00:26:35,890 --> 00:26:40,870 This script will generate the BIN file on the fly and then transmit it out. 293 00:26:41,190 --> 00:26:42,130 That's ephemeral. 294 00:26:42,130 --> 00:26:46,750 It could be a little bit better, but that is how that is working. 295 00:26:47,690 --> 00:26:59,130 Then the SSTV is a similar sort of thing to the other digital modes in that we have a WAV file that we generate, in that case with QSSTV or any other SSTV programs, and you plug it in there. 296 00:27:01,530 --> 00:27:07,110 Also in the flags archive, we have all the WAV files. 297 00:27:11,040 --> 00:27:14,620 So these are all the WAV files that were in that flags file. 298 00:27:14,620 --> 00:27:17,040 So this is exactly what we ran at ShmooCon. 299 00:27:17,820 --> 00:27:28,740 So once you have all that, all you have to do is run challengectl.py with the flag file and 300 00:27:36,670 --> 00:27:38,330 your device file. 301 00:27:41,890 --> 00:27:50,370 And so once you run that, assuming you have all the files in the right place and all that, it will pick up your SDR device that you defined earlier. 302 00:27:50,370 --> 00:28:00,670 And right now, this is spectrum panning on that frequency and transmitting out the challenge that we had running at ShmooCon on 905.55 MHz. 303 00:28:01,610 --> 00:28:03,250 We'll stop this in a second. 304 00:28:03,250 --> 00:28:10,590 I don't have an RTL to show you actually decoding that over the air, and this is probably interfering with some of the contestants at the moment. 305 00:28:10,810 --> 00:28:14,750 But that is all you have to do to run our challenge at home. 306 00:28:15,690 --> 00:28:21,650 So again, if you're running this with just one SDR, it's only going to be transmitting one challenge at a time. 307 00:28:21,650 --> 00:28:24,830 If it's just you doing this for practice, for fun, that's probably enough. 308 00:28:26,130 --> 00:28:29,950 But you can scale up from there and run with multiple different devices if you want. 309 00:28:33,750 --> 00:28:38,710 Let's see, one of the other things that we can look at is I mentioned FL Digi. 310 00:28:38,730 --> 00:28:46,610 If you want to roll some of the flags for the digital modes, FL Digi is what we're using to generate those files. 311 00:28:48,230 --> 00:28:52,010 If you open up FL Digi, there's an option. 312 00:28:52,010 --> 00:28:58,590 So this is meant for essentially amateur radio either contesting or just using digital mode software. 313 00:28:58,590 --> 00:29:04,970 So this would normally be used interactively with other hams across the world with an HF rig and all that kind of stuff. 314 00:29:04,970 --> 00:29:11,530 There is also an ability to generate these WAV files. 315 00:29:11,530 --> 00:29:12,590 So if you want to... 316 00:29:13,410 --> 00:29:18,350 Let's say we wanted to generate a RIDI flag for right now. 317 00:29:18,430 --> 00:29:25,690 So if we picked RIDI 45 and then said Ham Digital 9 318 00:29:28,730 --> 00:29:31,030 This is a test flag. 319 00:29:31,510 --> 00:29:38,170 You can go up here and in the audio menu , TX Generate Generate 320 00:29:41,360 --> 00:29:42,160 a WAV file. 321 00:29:42,160 --> 00:29:43,640 Hit transmit . 322 00:29:44,500 --> 00:29:50,740 And it'll go through and actually put that into a WAV file that you can then use in Challenge CTL. 323 00:29:51,440 --> 00:30:01,340 Now if you do that, make sure you double check the sample rate of the audio file and the sample rate that you have set in the flow graph because that is something that just bit us a few minutes ago. 324 00:30:01,860 --> 00:30:05,480 8,000 Hz as it turns out is not the same as 48,000 Hz. 325 00:30:06,060 --> 00:30:07,500 But it's easy to miss. 326 00:30:08,160 --> 00:30:14,020 That's what you need to do for generating new flags for any of the modes that FL Digi supports. 327 00:30:14,580 --> 00:30:25,780 If you want to check to make sure that that worked, you can also go back up there and stop the TX Generate and do a playback and then load that WAV file that you just created. 328 00:30:26,780 --> 00:30:38,880 Play it on a continuous loop, that'll just start going and once you see it decoding on that same mode that you just did, this is what the contestants should be seeing after they get it either over the air or over the virtual syncs for the virtual side of the game. 329 00:30:53,830 --> 00:30:55,930 Then QSSTV, some other software. 330 00:30:55,930 --> 00:31:17,650 So for the SSTV Challenge, this will also generate WAV files for you if you transmit and have your options set to sound for sound output, sound card and record, that'll generate that WAV file that you need to put into Challenge CTL for the SSTV Challenges. 331 00:31:17,750 --> 00:31:25,170 From there you need to load up an image of some kind and then it'll generate the WAV file for you. 332 00:31:39,910 --> 00:31:55,110 Alright, so that is essentially Challenge CTL, that's what we're using for all the Software Defined Radio Challenges and so in that short amount of time we just ran the ShmooCon 2025 RFCTF from this laptop right here. 333 00:31:55,110 --> 00:31:56,830 You can also do that at home. 334 00:31:57,410 --> 00:31:59,810 A couple of ideas for future development. 335 00:31:59,950 --> 00:32:08,650 So I mentioned the virtual challenges, we also have a virtual side of the game where we are sending those same files, those same WAV files over a zero message queue sync. 336 00:32:09,690 --> 00:32:11,930 Essentially so you can stream it over the internet. 337 00:32:11,950 --> 00:32:22,850 It was prompted in Defcon 2020 during COVID, that's what really prompted the it set a fire under the development idea, since we couldn't come out here and actually run the CTF. 338 00:32:23,030 --> 00:32:25,770 But right now Challenge CTL does not run those. 339 00:32:26,590 --> 00:32:41,230 It shouldn't be too hard trademark to integrate those into Challenge CTL, but one of the considerations there is that the parameters that you need for running a virtual challenge are different from the ones you need for a physical challenge. 340 00:32:41,230 --> 00:32:45,370 So for a virtual challenge, there's no frequency. 341 00:32:45,370 --> 00:32:46,450 There's a port. 342 00:32:46,910 --> 00:32:48,910 Some of the things don't really matter. 343 00:32:48,910 --> 00:32:50,530 The bandwidth might be different. 344 00:32:50,530 --> 00:32:56,730 There are just some aspects of it that don't matter for the virtual side that do matter for the physical side and vice versa. 345 00:32:56,930 --> 00:33:05,470 So getting that all into one consistent format so that you can have one flag file format to be able to do all that, that would be nice to have. 346 00:33:05,470 --> 00:33:06,670 That's something that we'd like to do. 347 00:33:06,670 --> 00:33:10,950 So we have just one software stack running all the challenges, both physical and virtual. 348 00:33:11,870 --> 00:33:16,910 Another nice to have that we'd like to work on is having multiple coordinated SDR boxes. 349 00:33:17,010 --> 00:33:19,830 So right now, I've got two different boxes up there. 350 00:33:19,830 --> 00:33:21,850 One has two SDRs in it. 351 00:33:21,850 --> 00:33:22,990 One has three. 352 00:33:23,150 --> 00:33:26,530 They don't communicate back and forth with each other about what's running. 353 00:33:26,530 --> 00:33:34,470 The way we're dividing that up right now is one box has all the main challenges that are running both virtually and physically. 354 00:33:34,730 --> 00:33:41,350 The second box has things that are special, running just in the room, or haven't been integrated into Challenge CTL yet. 355 00:33:41,350 --> 00:33:54,370 But it would be really awesome to be able to have multiple SDR boxes that communicate over a network and say, like, hey, I'm running this challenge, I just transmitted that one, all those sorts of things, so we can have even more challenges on the air without colliding with each other. 356 00:33:55,730 --> 00:33:58,830 Another nice to have would be adding logic for multiple transmit frontends. 357 00:33:58,830 --> 00:34:08,490 So the Blade RFs have two different transmit ports and it would be really neat to be able to have different antennas on there for different frequencies or different filters, all that sort of thing. 358 00:34:09,130 --> 00:34:16,590 We have the start of that logic in there, mostly because one of the ports on a Blade RF that we have broke in transit. 359 00:34:16,650 --> 00:34:22,550 So it literally snapped off the board and we need to transmit out the second port now because the first one is broken. 360 00:34:22,770 --> 00:34:26,690 So that specific device is hard-coded in there to always transmit out the second port. 361 00:34:26,910 --> 00:34:30,010 We need to polish that up a little bit and actually make that a little bit better. 362 00:34:31,530 --> 00:34:36,250 Another thing that we need to work on is having sensible gain defaults based on your SDR type. 363 00:34:36,250 --> 00:34:41,870 So the Hack RF, Blade RF, USRP, the gain settings for all those are all different. 364 00:34:42,170 --> 00:34:48,450 We need to make sure that we have a consistent gain settings at least across all the challenges for all the Blades. 365 00:34:48,450 --> 00:34:52,130 But having sensible gain for a Hack RF. 366 00:34:52,130 --> 00:34:59,330 So if I know I'm transmitting from a Hack RF saying I know this is a reasonable setting for that and setting that automatically would be really nice. 367 00:35:00,030 --> 00:35:03,610 I'd also like to make use of the Blade RF gate calibration. 368 00:35:03,610 --> 00:35:09,310 So if you have a Blade RF 2.0 Nuon is actually calibrating them for doing a gain calibration. 369 00:35:09,630 --> 00:35:15,570 So there is a curve for your transmit frequency and how much power you're actually transmitting. 370 00:35:15,570 --> 00:35:20,190 You can standardize that to have it be a flat consistent gain across the entire spectrum. 371 00:35:20,190 --> 00:35:23,710 I think it would be really cool to have that integrated into Challenge CTL as well. 372 00:35:24,730 --> 00:35:31,310 I showed you the FL Digi and how we're rolling the digital mode keys and that's a little bit painful. 373 00:35:31,310 --> 00:35:35,750 One at a time is not that bad but if you're doing six or seven of those, it takes a little while. 374 00:35:36,970 --> 00:35:39,490 If there's a better way, I'd love to do that. 375 00:35:39,490 --> 00:35:48,310 As far as I know, or at least we haven't found yet a way to programmatically have FL Digi generate those files and not have to sit there and wait for it. 376 00:35:49,490 --> 00:35:51,690 If there's a better way, I'd love to hear about it. 377 00:35:51,690 --> 00:35:54,850 If any of you know about a better way to do that, I'd love to hear it. 378 00:35:55,050 --> 00:35:58,410 But that's another nice to have future development goal. 379 00:35:59,490 --> 00:36:03,330 I mentioned we could do a capture and replay type of challenge. 380 00:36:03,330 --> 00:36:05,070 We don't currently have a flow graph for that. 381 00:36:05,070 --> 00:36:06,170 It won't be that hard. 382 00:36:06,690 --> 00:36:07,910 It's a relatively simple thing. 383 00:36:07,910 --> 00:36:09,170 We just don't have it in there yet. 384 00:36:09,170 --> 00:36:15,110 But that'll let us integrate some of the Woody's crazy challenges where there's one device that does this thing. 385 00:36:15,110 --> 00:36:17,930 We could integrate that and have that transmit a little bit more regularly. 386 00:36:18,850 --> 00:36:22,470 And then something that we're perpetually looking for are additional challenges. 387 00:36:22,490 --> 00:36:25,110 Additional things we can integrate into Challenge CTL. 388 00:36:25,150 --> 00:36:29,050 Even if it's not quite ready to go into there, we're always interested in adding more stuff. 389 00:36:29,050 --> 00:36:34,350 One of our goals is to have as much as many different types of signals out here as we can. 390 00:36:34,450 --> 00:36:37,550 Just to give everybody something interesting to look at. 391 00:36:37,550 --> 00:36:40,210 Not everybody's interested in Morse or the digital modes. 392 00:36:40,210 --> 00:36:43,230 Some people are more interested in certain challenges versus others. 393 00:36:43,430 --> 00:36:46,870 And we like having all the things so you can choose your own adventure. 394 00:36:49,830 --> 00:36:51,470 And that's all I got. 395 00:36:51,470 --> 00:36:55,950 That is Challenge CTL and how to run your own RFCTF at home. 396 00:36:55,950 --> 00:36:59,830 Any questions or comments? 397 00:36:59,830 --> 00:37:01,030 Concerns? 398 00:37:03,870 --> 00:37:04,550 Yeah 399 00:37:10,530 --> 00:37:11,210 . 400 00:37:28,850 --> 00:37:33,750 So the question's about containerizing the SDR challenges and Challenge CTL. 401 00:37:33,750 --> 00:37:37,790 So you're asking if we can containerize Challenge CTL and how to run those challenges? 402 00:37:48,790 --> 00:37:49,850 Yeah. 403 00:38:00,960 --> 00:38:02,640 That is true. 404 00:38:02,640 --> 00:38:04,400 No, that's correct. 405 00:38:04,400 --> 00:38:09,240 The virtual SDR challenges have not been open sourced yet. 406 00:38:10,040 --> 00:38:11,840 One of our goals is to do that. 407 00:38:12,360 --> 00:38:16,220 And basically, when those are open sourced, they will be in Challenge CTL. 408 00:38:19,000 --> 00:38:21,420 Yeah, the flow graph is essentially the same. 409 00:38:21,420 --> 00:38:27,020 It's instead of a BladeRF or a HackRF or an Osmocomp sync, we're using a ZMQ sync. 410 00:38:28,060 --> 00:38:41,280 And then the examples that we have, the RFCTF files or whatever it is, also on our GitHub, those flow graphs are just the ZMQ source into a file or into an audio sync or something like that. 411 00:38:41,280 --> 00:38:43,260 And those are examples just to get folks started. 412 00:38:43,260 --> 00:38:46,880 But yeah, that is essentially what's happening on the other side. 413 00:38:46,880 --> 00:38:48,100 We have a different... 414 00:38:48,740 --> 00:38:57,320 So we have our own challenge runner that's running on the virtual side, specifically designed for the virtual things. 415 00:38:57,400 --> 00:39:00,880 And so there shouldn't be as much of a difference between the two. 416 00:39:00,880 --> 00:39:02,220 They're already very similar. 417 00:39:02,480 --> 00:39:10,300 And so the first step for Challenge CTL is likely going to be running Challenge CTL in either a physical or virtual mode. 418 00:39:10,540 --> 00:39:16,340 And then we can have all the virtual challenges just with a different flag format or something like that. 419 00:39:16,360 --> 00:39:24,460 But this way we'd at least have one program and one set of flow graphs or two sets of flow graphs, essentially, for those challenges. 420 00:39:25,440 --> 00:39:28,180 So yeah, that is not out there yet, but it will be. 421 00:39:35,480 --> 00:39:36,360 Not sure. 422 00:39:36,540 --> 00:39:41,720 Probably when we're good and ready, but that is not a hard and firm answer. 423 00:39:41,720 --> 00:39:49,340 That is just the place where they're at right now has the other secret sauce for the CTF . 424 00:39:49,340 --> 00:39:50,140 Yeah. 425 00:39:51,860 --> 00:39:53,160 Any other questions? 426 00:39:57,720 --> 00:39:58,820 Looks like no. 427 00:39:59,020 --> 00:40:02,800 Hey guys , thanks everybody for coming to my talk and sticking through the end. 428 00:40:02,800 --> 00:40:08,200 And if you have any more questions or want to play in the CTF, come see me at the CTF table. 429 00:40:08,460 --> 00:40:09,020 Thanks.