1 00:00:04,920 --> 00:00:05,580 Okay. 2 00:00:26,940 --> 00:00:32,000 Hi, my name is Eli McRae, and I'm here to present about BYO CTF. 3 00:00:32,260 --> 00:00:37,960 I believe that the best way to learn something is actually to go about teaching it to other people. 4 00:00:38,480 --> 00:00:42,980 And one of the great ways to do that with regards to cybersecurity is through Capture the Flag events. 5 00:00:42,980 --> 00:00:48,840 And I believe that everyone has the opportunity to learn how to become a CTF challenge developer. 6 00:00:49,780 --> 00:00:51,300 So a bit about myself. 7 00:00:51,300 --> 00:00:53,720 I am not an expert in anything. 8 00:00:53,720 --> 00:00:59,160 I've been in the hacking community here in Arkansas for the past 20 years or so. 9 00:00:59,160 --> 00:01:02,920 Just doing various things, particularly Forsmith 2600. 10 00:01:02,920 --> 00:01:04,900 We started that in 2006. 11 00:01:05,400 --> 00:01:09,600 And then also the Arkansas hackers discord, crime.life. 12 00:01:09,980 --> 00:01:13,640 I've got about 18 or so years of industry experience. 13 00:01:13,840 --> 00:01:26,900 That is anything from computer repair to software development, network engineering, over into education and academia, military experience. 14 00:01:27,320 --> 00:01:31,200 I say kind of on that because I'm a member of the Arkansas Air National Guard. 15 00:01:31,200 --> 00:01:34,680 Spent some time doing NCC and comm work there. 16 00:01:34,680 --> 00:01:41,840 But for the last seven years, I've been doing cyber operations for the 223rd Little Rock Air Force Base. 17 00:01:42,820 --> 00:01:45,180 So yeah, that's a little bit about me. 18 00:01:45,180 --> 00:01:46,500 At the top there. 19 00:01:47,500 --> 00:01:49,880 So a bit about my CTF story. 20 00:01:50,280 --> 00:01:53,380 There was an event in Little Rock, Arkansas called Jolt. 21 00:01:54,120 --> 00:01:58,820 That was a point in my life where I had been out of the military for a couple of years. 22 00:01:58,820 --> 00:02:00,340 I went to that event. 23 00:02:00,340 --> 00:02:04,080 I was fortunate enough to be on a team that did really well. 24 00:02:04,100 --> 00:02:06,160 I was on with some heavy hitters. 25 00:02:06,160 --> 00:02:07,840 And we did well. 26 00:02:07,840 --> 00:02:08,780 We won. 27 00:02:09,180 --> 00:02:11,020 And I was like, man, that was really cool. 28 00:02:11,020 --> 00:02:17,680 It ended up getting me back on track and into the military, being able to do all of this hacking stuff as a career . 29 00:02:18,900 --> 00:02:23,380 Well, in the process of doing that, I guess maybe my ego was like overinflated or something. 30 00:02:23,380 --> 00:02:27,080 But we said, man, that's a really cool thing. 31 00:02:27,080 --> 00:02:28,680 We could do that in Fort Smith. 32 00:02:28,680 --> 00:02:35,960 The reason we said in Fort Smith was because that is, you know, where most of the top three teams were from. 33 00:02:35,960 --> 00:02:38,500 And so, we said we're going to do that. 34 00:02:38,500 --> 00:02:42,420 We'll put together a really cool event in Arkansas. 35 00:02:43,200 --> 00:02:48,600 The history of that was really based on CTFD. 36 00:02:48,800 --> 00:02:52,260 So, in 2018, we ran our first event. 37 00:02:52,260 --> 00:02:58,500 And that was based off of a fork of custom changes that we made to like CTFD itself. 38 00:02:59,200 --> 00:03:02,540 We wrote some interesting additions there. 39 00:03:02,540 --> 00:03:10,260 And in 2019, all of those changes, I sort of wrapped up into a plug-in that CTFD has sort of implemented, a plug-in system. 40 00:03:10,260 --> 00:03:14,820 And so, I took that and made that a plug -in. 41 00:03:15,260 --> 00:03:21,600 And I helped run CTFs around the state of Arkansas on behalf of the Department of Education. 42 00:03:22,020 --> 00:03:25,160 And a lot of that legacy sort of still continues on. 43 00:03:25,160 --> 00:03:30,440 I think there's something to the effect of 535 high schools in Arkansas. 44 00:03:30,440 --> 00:03:39,900 And about 20% of them have experienced some sort of CTF because of the work of the Computer Science Initiative team that I was a part of. 45 00:03:39,900 --> 00:03:46,140 So, it was really cool to be able to help share that experience with high school students. 46 00:03:46,580 --> 00:03:49,940 But CTFD, I think, has some problems as well. 47 00:03:50,320 --> 00:03:56,820 Particularly, as like changes would come out, it was hard to port the challenges from version to version. 48 00:03:57,180 --> 00:04:06,460 So, also, our plug-ins were hard to maintain because there was something that was changing on the back-end database or something. 49 00:04:06,480 --> 00:04:09,680 It was hard to sort of keep that running and in line. 50 00:04:09,980 --> 00:04:12,820 All of that being said, please go use CTFD. 51 00:04:12,820 --> 00:04:13,960 Good framework. 52 00:04:13,960 --> 00:04:16,000 Love it for a number of reasons. 53 00:04:16,000 --> 00:04:22,480 So, with all of that, as we were developing challenges, there were some struggles. 54 00:04:23,420 --> 00:04:32,040 Part of that was like the level of expectation I had placed on myself, never having run a CTF before, but having played in some. 55 00:04:32,040 --> 00:04:42,000 I was like, man, I don't understand how I'm going to create all of these interesting challenges and have enough content to cover the entirety of the event. 56 00:04:42,000 --> 00:04:51,260 So, one of the standards we set for ourselves was to be able to release at least one challenge, possibly three, every hour for the entire duration of the CTF. 57 00:04:51,260 --> 00:04:55,060 And I think for that event, we were targeting 48 hours of CTF time. 58 00:04:55,160 --> 00:04:56,880 So, that's a lot of challenges. 59 00:04:58,240 --> 00:05:02,020 And I think we ended up producing something like close to 100. 60 00:05:03,300 --> 00:05:12,720 The other thing is we didn't want to even announce the event until we had the human logistics side of it locked down because this was supposed to be an in-person event, kind of a party, like I said. 61 00:05:14,200 --> 00:05:24,040 And once you have the venue and the food and figuring out where people are going to go to the bathroom, that is the hardest part of hosting an in-person event. 62 00:05:24,060 --> 00:05:25,260 What are they going to eat? 63 00:05:25,260 --> 00:05:27,640 What are they going to do with the food that they've eaten, right? 64 00:05:28,520 --> 00:05:30,260 So, that. 65 00:05:30,620 --> 00:05:33,860 What that led to ultimately is overproduction of challenges. 66 00:05:33,860 --> 00:05:37,320 We had way more challenges than we ended up actually deploying. 67 00:05:37,320 --> 00:05:44,900 Part of that was the technical error for one reason or another, or we just simply overlooked it in the spreadsheet. 68 00:05:45,880 --> 00:05:53,580 That self-imposed vendor lock-in, we built those challenges with the capabilities of our framework in mind. 69 00:05:53,580 --> 00:06:00,920 So, we couldn't take our challenges and take them to another event because just the way that the flag reveals would work out. 70 00:06:00,920 --> 00:06:09,040 We're just different in that other framework, whether that be Melavora, the Facebook framework, CTFD, something in between, HomeAid. 71 00:06:09,660 --> 00:06:18,180 And ultimately, all of that sort of led to a distraction from the core mission, which is to celebrate the hacker community here in Arkansas. 72 00:06:18,520 --> 00:06:27,140 So, some of the challenges that we had also sort of as a team is that the team that was running the event kind of was shrinking. 73 00:06:27,480 --> 00:06:33,220 People moved on out of the area, weren't able to contribute remotely. 74 00:06:33,460 --> 00:06:43,500 Some had kids, myself included, and that just takes a lot of time away from us being able to come up with what we consider interesting and new challenges. 75 00:06:43,720 --> 00:06:48,560 And it's really hard to always have interesting and new challenges. 76 00:06:48,920 --> 00:06:51,180 And that was very important to us. 77 00:06:51,180 --> 00:06:55,880 We didn't just want to go and sort of regurgitate the same challenge over and over again for people. 78 00:06:55,880 --> 00:07:02,400 And so, we would always say to ourselves, like, we're going to have the event when we have something to say, something interesting to showcase. 79 00:07:04,120 --> 00:07:06,480 So, again, human logistics is hard. 80 00:07:06,480 --> 00:07:08,360 You guys want to look at those links. 81 00:07:08,360 --> 00:07:15,860 When you get the slide deck, you'll be able to click those and actually see everything we did was very transparent as far as, like, where we spent the money. 82 00:07:15,860 --> 00:07:22,780 Every bit of money went back into the community, back into the event or other events, potentially. 83 00:07:22,880 --> 00:07:28,880 So, we said that we had a problem and we need a solution. 84 00:07:30,560 --> 00:07:40,380 We wanted something that would implement the ability for players to be able to contribute challenges without, you know, sort of opening the kimono too much. 85 00:07:40,380 --> 00:07:44,980 People would always volunteer to help, but we don't need help stacking chairs. 86 00:07:44,980 --> 00:07:47,200 We need to help with really cool ideas. 87 00:07:47,440 --> 00:07:48,620 We can move tables. 88 00:07:48,620 --> 00:07:51,520 We can figure out the bathroom situation, as I said. 89 00:07:51,520 --> 00:07:55,180 But we need interesting content to make people want to come. 90 00:07:56,460 --> 00:08:04,680 Next, we wanted some way for those contributions that people would make to be rewarded or given back to them in some meaningful way. 91 00:08:04,680 --> 00:08:08,440 Something that would mean something more so than just a thumbs up or kudos. 92 00:08:11,320 --> 00:08:15,560 And because of that, I guess this was like sort of a secondary feature. 93 00:08:15,560 --> 00:08:19,300 I wanted there to be some form of, like, inter-player transactions. 94 00:08:19,300 --> 00:08:25,420 So, within the game, I can influence your play of the game to some degree. 95 00:08:28,560 --> 00:08:38,860 All of those features would allow us, the organizers, to sort of pay more attention to the experience and the ambience, the atmosphere, things like that. 96 00:08:38,860 --> 00:08:43,620 And so, it would also potentially allow us to participate in the game again. 97 00:08:43,620 --> 00:08:50,760 Because once you sort of joined the challenge developer team, it kind of took you out of the talent pool. 98 00:08:50,760 --> 00:08:53,480 And Arkansas is not particularly large. 99 00:08:54,500 --> 00:08:58,340 So, there are cities that are larger than the entire state population of Arkansas. 100 00:08:58,340 --> 00:09:00,960 So, our talent pool was not as broad as others. 101 00:09:00,960 --> 00:09:03,280 So, we want to be able to play the game too. 102 00:09:04,320 --> 00:09:10,500 And I'm sure there's some other problem that we were having that we thought this was a good idea. 103 00:09:11,100 --> 00:09:15,820 So, I will say that at the time, no other framework offered this. 104 00:09:15,820 --> 00:09:20,480 But I put a heavy asterisk there because I don't think I even bothered to Google it. 105 00:09:20,780 --> 00:09:23,020 So, they might have existed. 106 00:09:23,020 --> 00:09:24,920 If one exists, please share. 107 00:09:25,220 --> 00:09:26,740 Be glad to see it. 108 00:09:26,740 --> 00:09:28,820 So, none of that stuff existed until... 109 00:10:03,350 --> 00:10:03,730 Cool 110 00:10:10,180 --> 00:10:10,560 . 111 00:10:11,440 --> 00:10:12,880 I hope that video played well. 112 00:10:12,880 --> 00:10:13,420 Maybe it did. 113 00:10:13,420 --> 00:10:14,400 Maybe it didn't. 114 00:10:14,400 --> 00:10:15,940 Hopefully that will go better live. 115 00:10:16,920 --> 00:10:23,780 Anyway, FS 2600 solution, BYOCTF, bring your own challenge or capture the flag. 116 00:10:23,780 --> 00:10:24,820 Something like that. 117 00:10:24,960 --> 00:10:27,240 I think it's supposed to be a regular expression joke. 118 00:10:27,260 --> 00:10:28,020 I made it up. 119 00:10:28,020 --> 00:10:29,400 I kind of ran with it. 120 00:10:29,400 --> 00:10:31,760 So, it's for us, by us. 121 00:10:31,760 --> 00:10:36,080 If you want to get a copy of these slides, you can go to byoctf.com forward slash slides. 122 00:10:36,680 --> 00:10:38,260 And look at that. 123 00:10:38,520 --> 00:10:40,320 The rest of the slide deck, that is. 124 00:10:41,180 --> 00:10:43,840 So, I started this in 2020. 125 00:10:44,220 --> 00:10:47,300 And then I let it cook for a long minute. 126 00:10:47,520 --> 00:10:50,020 I don't think there was any contributions that I made. 127 00:10:50,020 --> 00:10:51,580 I kind of didn't forget about it. 128 00:10:51,580 --> 00:10:54,420 But there was just, you know, COVID and all that stuff. 129 00:10:54,420 --> 00:10:58,840 So, there was no, like, in-person event that was getting thought about for a long time. 130 00:11:00,400 --> 00:11:04,000 And then something changed in, you know, late 2022. 131 00:11:04,000 --> 00:11:06,080 We said, oh, man, maybe we should do this thing. 132 00:11:06,440 --> 00:11:09,740 And I think I accidentally committed us to doing it in 2023. 133 00:11:10,300 --> 00:11:14,420 And so, that led us up to, you know, the event. 134 00:11:14,420 --> 00:11:33,360 So, at the end of the day, the shortest and simplest analogy that I can offer is it is kind of like a potluck for hackers, where the challenge developers, the hosting body can create the main dish, if you will, and then everybody else can bring a side dish. 135 00:11:33,360 --> 00:11:46,800 They can bring, you know, some other component, some other forensics expertise, or some other network traffic analysis expertise, or some, you know, binary reversing expertise that your core team might lack. 136 00:11:47,560 --> 00:12:01,740 So, again, the core features of the BYOCTF, as is implemented by us, is that players can earn points by other players solving the challenges that they contribute. 137 00:12:02,840 --> 00:12:08,860 That opens us up as the game masters or GMs to be able to play again. 138 00:12:09,960 --> 00:12:28,080 There was, like, this core trust issue that I think was the interesting problem that made me try to decide to implement a solution in the first place was, like, how do I have people contribute challenges where they can trust that I am not going to cheat? 139 00:12:28,880 --> 00:12:35,640 And so, we created this external validation scheme, as well, which is still in place, but it's honestly not the main feature. 140 00:12:35,960 --> 00:12:41,840 You can contribute a challenge that is externally validated, where you never give us the flag. 141 00:12:42,660 --> 00:12:50,240 You can only answer yes or no, whether that flag was correct, and based on your response, it does the thing and gives the points. 142 00:12:51,920 --> 00:12:57,240 We have our inter-player transactions and other things of that nature. 143 00:12:57,500 --> 00:13:00,540 You can sell stuff, hints, and information to each other. 144 00:13:00,540 --> 00:13:01,620 I think that's fun. 145 00:13:01,620 --> 00:13:03,400 With that, you have an economy. 146 00:13:03,860 --> 00:13:09,100 It's flag-oriented, meaning that the flags are not bound to a specific challenge. 147 00:13:09,100 --> 00:13:21,320 So, you can do Oprah-style challenges, where you can, under your chair, you have a flag, you have a flag on the ceiling, and you don't have to know to go to a challenge X, Y, or Z, and then put that flag in that you found. 148 00:13:21,320 --> 00:13:24,820 You can simply find a flag and capture it. 149 00:13:26,160 --> 00:13:37,600 Obviously, you can have partial flags or multiple flags, but a single flag can actually be part of multiple challenges, which I think was an interesting idea, as well. 150 00:13:37,780 --> 00:13:43,120 We have the same thing as the first blood points, the decaying points over time. 151 00:13:43,420 --> 00:13:55,340 I had a lot of other ideas as far as game mode, so PVP, so a lottery effect, so the more people that solve a challenge, the less valuable it is at the end of the game. 152 00:13:55,780 --> 00:13:57,700 And then some other game modes, as well. 153 00:13:58,500 --> 00:14:00,500 It used to be strictly Discord-based. 154 00:14:00,500 --> 00:14:07,860 If you go to the GitHub, you'll notice it says BYOCTF underscore Discord, or something like that, or Discord BYOCTF, I don't remember. 155 00:14:09,640 --> 00:14:13,380 But most people really wanted the web experience. 156 00:14:13,380 --> 00:14:21,480 So, it's not strictly Discord-based, but the initial implementation was made to run as a Discord bot. 157 00:14:21,480 --> 00:14:24,140 But that's not essential to the concept. 158 00:14:24,640 --> 00:14:28,440 I wanted the strong authentication that came with it. 159 00:14:29,980 --> 00:14:31,800 So, other features. 160 00:14:31,800 --> 00:14:33,780 I mentioned the externally validated flag. 161 00:14:33,780 --> 00:14:36,120 You don't have to give us the flag material. 162 00:14:37,600 --> 00:14:40,320 They have a different mechanism, slightly. 163 00:14:40,360 --> 00:14:45,860 Rather than typing sub, you type esub for external sub validation. 164 00:14:45,980 --> 00:14:53,120 But one caveat is that we will see the SHA-256 of the flag that's submitted. 165 00:14:54,280 --> 00:14:56,920 I mean, you've got to trust something somewhere. 166 00:14:56,920 --> 00:15:00,740 You can always channel this to GM and say, hey, what's the flag that produces that hash? 167 00:15:00,740 --> 00:15:03,300 And if we can't produce it, okay, there you go. 168 00:15:03,940 --> 00:15:08,000 Go to that link for the prototype server. 169 00:15:08,000 --> 00:15:10,280 You can implement that and look at the routes. 170 00:15:10,280 --> 00:15:13,720 It's all in Flask, so it's pretty straightforward and easy to ingest. 171 00:15:14,120 --> 00:15:18,160 I will say I have not implemented that in the web UI, but there you go. 172 00:15:18,860 --> 00:15:23,320 Challenge dependency or extension, I thought that was fun. 173 00:15:23,680 --> 00:15:31,520 What was really interesting is that a user-contributed challenge can extend any other uh, existing challenge. 174 00:15:31,520 --> 00:15:48,840 And so, if you wanted to sort of pick up on something that was perhaps overlooked in a core, I use here memory analysis with volatility, a core challenge such as like, hey, what were the browser tabs open in Firefox? 175 00:15:48,840 --> 00:15:53,340 And that's the only flag that you wrote for that challenge. 176 00:15:54,140 --> 00:15:59,440 Player two can come along and say, hey, but what was saved in the clipboard memory? 177 00:15:59,560 --> 00:16:06,460 And that can be sort of a reuse and a recycling of that person's content. 178 00:16:06,500 --> 00:16:10,880 And we'll talk a little bit about some of the limitations, the features, and why that would still be possible. 179 00:16:11,740 --> 00:16:32,380 But, so, a way to think about that challenge dependency and unlocking is that our green challenges, A can unlock B and C, or that player D can build a dependency upon either B or C, and then do other great things with those challenges. 180 00:16:32,380 --> 00:16:40,640 So, the other way to look at that is A unlocks C or B, which unlocks D, which unlocks E, and all of those things can be player-contributed challenges. 181 00:16:40,980 --> 00:16:47,500 Just so long as the previous challenge in the chain exists within the database, you can create a dependency on it. 182 00:16:47,500 --> 00:16:50,700 That should be logical or obvious. 183 00:16:51,280 --> 00:16:55,700 So, this is the data model for udatabase.nersc. 184 00:16:56,100 --> 00:17:06,200 So, yeah, it looks like spaghetti code because it looks complicated, and it kind of is. 185 00:17:06,200 --> 00:17:07,300 It's overly complicated. 186 00:17:07,300 --> 00:17:18,460 There are features on some of those tables that don't ever end up getting leveraged, but they're there for the sake of, I don't know, future expansion, I guess. 187 00:17:19,340 --> 00:17:20,200 There's that. 188 00:17:20,200 --> 00:17:22,500 So, how does it do the thing? 189 00:17:22,500 --> 00:17:31,600 I told you an interesting story about how a player would get extra points for contributing a challenge. 190 00:17:31,600 --> 00:17:33,520 Here's that narrated. 191 00:17:33,720 --> 00:17:36,600 So, here is the author of a challenge. 192 00:17:36,600 --> 00:17:38,300 He's created challenge CC. 193 00:17:38,300 --> 00:17:40,600 There's two flags to this challenge. 194 00:17:40,620 --> 00:17:45,680 One of them is worth 150 points, and flag two is worth 50 points. 195 00:17:45,720 --> 00:17:58,720 You submit that to the game, and it says, okay, by default, that the fee that you have to pay in order to post a challenge is 50% of the sum of all your values of your flags. 196 00:17:58,720 --> 00:18:01,640 So, real quick, that's all tunable. 197 00:18:01,640 --> 00:18:03,880 You can change that information. 198 00:18:05,460 --> 00:18:07,960 But, there's that. 199 00:18:07,960 --> 00:18:13,580 So, at this point, once you've committed that, you are down 100 points. 200 00:18:13,720 --> 00:18:15,660 So, you pay that money. 201 00:18:15,660 --> 00:18:20,040 You are now invested in the viability of that challenge. 202 00:18:20,040 --> 00:18:24,880 As that happens, as you commit it, it becomes available to other players. 203 00:18:25,560 --> 00:18:28,300 They can have the opportunity to solve it or not. 204 00:18:28,300 --> 00:18:30,720 There's no guarantee that you will get a solve. 205 00:18:30,800 --> 00:18:39,420 But, those players choose to pick it up, and it turns out that player one captures the first flag, and that's 150 points for them. 206 00:18:39,420 --> 00:18:52,820 Their number goes up, but as a reward for you having contributed a challenge that is solvable, you have been rewarded 25%, again, tunable, of that 150 points. 207 00:18:52,820 --> 00:18:56,060 So, that turns out to be 37.5 points. 208 00:18:56,060 --> 00:18:58,080 So, now your score goes up as well. 209 00:18:58,080 --> 00:19:02,020 You're still down, but you're getting closer to breaking even again. 210 00:19:03,700 --> 00:19:05,540 Next comes player two. 211 00:19:05,540 --> 00:19:08,560 They solved flag one for 150 points. 212 00:19:08,560 --> 00:19:09,780 Their number goes up. 213 00:19:09,780 --> 00:19:11,100 Your number goes up. 214 00:19:11,100 --> 00:19:13,280 Again, now you're at 375 points. 215 00:19:13,280 --> 00:19:15,600 You're only 25 points down at this point. 216 00:19:16,820 --> 00:19:20,020 Third player comes along, 150 points. 217 00:19:20,060 --> 00:19:25,120 You get that same 25% boost, and you are now in the green. 218 00:19:25,120 --> 00:19:29,940 You've made, or in the black, I guess it's saying, you've made 12.5 points. 219 00:19:30,680 --> 00:19:33,220 You are up from your starting position. 220 00:19:33,220 --> 00:19:37,840 Meanwhile, you might have also been working on other challenges, solving those things as the author. 221 00:19:39,240 --> 00:19:41,740 Now, notice that this is player one again. 222 00:19:41,740 --> 00:19:46,060 He's captured flag two, and that is only worth 50 points. 223 00:19:46,060 --> 00:19:49,220 Now, you still get that same 25% bump. 224 00:19:49,220 --> 00:19:53,320 In this instance, it's 12.5 points, so that puts you up 25 there. 225 00:19:55,160 --> 00:19:59,020 Same game, player four, fourth person comes along. 226 00:19:59,020 --> 00:20:05,020 There's only the practical limit of how many teams there are to get your points there. 227 00:20:05,020 --> 00:20:12,580 Right now, you're at 62.5 points up from your initial contribution. 228 00:20:12,680 --> 00:20:18,000 So, pretty straightforward, I think, as far as how that plays out. 229 00:20:18,060 --> 00:20:30,140 But I think we need to definitely talk about the criticisms that I've encountered, and that I thought of initially, but that I've got some excellent feedback from folks over the last couple of years. 230 00:20:30,140 --> 00:20:32,340 We've been trying to shop it around. 231 00:20:32,340 --> 00:20:40,400 So, the first one is, what happens if somebody just creates a challenge that's, you know, a total brick and there's not a solution to it? 232 00:20:40,400 --> 00:20:42,180 All right, that's a criticism. 233 00:20:42,340 --> 00:20:49,380 The next one, what about challenges that are just, oh, flag one, two, three, or password is password, things of that nature. 234 00:20:49,380 --> 00:20:58,120 I call that the race to the bottom, and that's where people are going to just flood it with kind of BS challenges that are just super easy. 235 00:20:58,760 --> 00:21:01,300 We'll see some mitigations for that as well. 236 00:21:02,920 --> 00:21:06,740 Legitimate, but otherwise over or undervalued challenges. 237 00:21:06,820 --> 00:21:10,480 That one's hard, but you could call it an honest mistake. 238 00:21:10,480 --> 00:21:16,420 You can see the other ones, like the impossible to solve challenge, that's something that you would do to try to disrupt and ruin the game. 239 00:21:16,740 --> 00:21:20,020 Trivial challenges is you just trying to get a leg up, you know. 240 00:21:20,180 --> 00:21:23,560 But this third one here is kind of an honest mistake. 241 00:21:23,560 --> 00:21:26,740 You didn't know that it was going to be as hard as it was. 242 00:21:26,740 --> 00:21:30,400 It's still solvable, but you didn't know it was going to be difficult for everybody. 243 00:21:31,600 --> 00:21:34,360 And then the last one is like bad faith administrators. 244 00:21:34,500 --> 00:21:38,680 We have, you know, I guess a more practical solution for that. 245 00:21:38,760 --> 00:21:48,280 I would like to shout out Jeff at BIC for helping come up with ideas as I was pitching BYO CTF to them for their CTF framework. 246 00:21:49,180 --> 00:21:59,040 It was, you know, he was like, oh, man, I read through the docs and challenge cloning was a really clever solution, or I'm sorry, attack on the framework that I thought he put forth. 247 00:21:59,900 --> 00:22:09,300 So, the things that we would need to think about in order to mitigate that, turns out they were already in place, but I was kind of stumped in the conversation. 248 00:22:09,300 --> 00:22:12,180 So, we'll talk about that one here in just a second. 249 00:22:13,000 --> 00:22:16,740 So, we have the controls in place for bad faith administrators. 250 00:22:16,740 --> 00:22:24,420 What I can do is offer my promise as the event organizer that I'm not going to try to win my own event. 251 00:22:24,420 --> 00:22:26,260 It's going to look pretty lame if I do. 252 00:22:26,260 --> 00:22:27,660 So, there you go. 253 00:22:27,660 --> 00:22:32,780 That's the practical solution to bad faith administrators. 254 00:22:34,380 --> 00:22:35,640 We can tune. 255 00:22:35,640 --> 00:22:37,420 It's just a database at the end of the day. 256 00:22:37,420 --> 00:22:42,860 We can go in and change the values if we notice that everyone's like, ooh, that challenge is way too hard. 257 00:22:42,860 --> 00:22:52,200 We can just change the value and tune it to make it more appropriate or bring the value of coins in line with what everyone else's is. 258 00:22:53,020 --> 00:23:01,920 The next one is that race to the bottom concept where everyone's just flooding the entire game with just easy and trivial challenges. 259 00:23:02,200 --> 00:23:06,120 We can disable specific challenges or we can just disable the entire thing. 260 00:23:06,120 --> 00:23:16,660 It's a regular CTF framework as well, so you can still run on your core challenges and just disable and hide all of the other challenges that were submitted through the mechanism. 261 00:23:18,400 --> 00:23:23,560 And then, obviously, we can disable a user in challenges associated with that user. 262 00:23:24,360 --> 00:23:29,480 So, that is, you know, that's kind of just hitting them with a band hammer or something. 263 00:23:30,740 --> 00:23:36,860 I guess I have this here because it should be obvious, but you cannot submit a challenge from your own team. 264 00:23:37,060 --> 00:23:40,460 Like, that's... I would hope that that should be obvious to you. 265 00:23:41,460 --> 00:23:44,820 And I always like to say, like, please don't make us use these rules. 266 00:23:44,940 --> 00:23:46,640 Don't hack the scoreboards, what we always do. 267 00:23:46,660 --> 00:23:53,060 Would say, you know, big sort of follow the same rules, you know, don't mess with the infrastructure. 268 00:23:53,220 --> 00:23:58,600 So, I thought that this framework was fun because there's a lot of game theory involved in it as well. 269 00:23:59,200 --> 00:24:06,720 Some of the game and game theory is really just, like, where it comes from is the idea that your decisions impact my decisions. 270 00:24:06,720 --> 00:24:09,880 So, how you play the game impacts how I play the game. 271 00:24:10,080 --> 00:24:21,200 And this sets up like a... I guess it's a form of the classic prisoner's dilemma where one set of players has to decide to cooperate or defect. 272 00:24:21,920 --> 00:24:33,200 And by defect, we mean create unfair challenges or create some sort of disadvantage for... I'm sorry, disadvantage for the opposing side. 273 00:24:33,200 --> 00:24:37,480 So, trying to create an advantage for themselves or cooperate. 274 00:24:38,260 --> 00:24:45,360 We incentivize cooperation via the reward system and we dissuade defection via the commit fee. 275 00:24:45,380 --> 00:24:50,000 So, again, you have to commit 50% of the sum of your flags in order for you to be able to post it. 276 00:24:50,000 --> 00:24:57,420 So, that alone should help mitigate some people that are willing to just try to nuke the game. 277 00:24:58,460 --> 00:25:01,440 So, let's see. 278 00:25:01,700 --> 00:25:03,140 Asymmetric information. 279 00:25:03,420 --> 00:25:10,000 This is sort of, again, calling back to the idea that there's a legitimate challenge that's otherwise undervalued. 280 00:25:10,500 --> 00:25:20,740 They are able to go forth and tune that information based on their experience and other events. 281 00:25:21,180 --> 00:25:25,080 I have this set up as like time vampires versus impossible challenge. 282 00:25:25,080 --> 00:25:28,040 Time vampire is a real challenge. 283 00:25:28,040 --> 00:25:31,840 It's just sucking time, something that's time consuming otherwise. 284 00:25:31,840 --> 00:25:36,520 An impossible challenge is broken or intentionally broken. 285 00:25:36,600 --> 00:25:42,940 I have impossible because I guess the joke I was making was like impossible meats. 286 00:25:42,940 --> 00:25:45,620 Like the impossible whopper or something. 287 00:25:45,700 --> 00:25:46,660 So, where's the beef? 288 00:25:46,660 --> 00:25:47,520 That's the joke. 289 00:25:47,520 --> 00:25:48,200 Okay. 290 00:25:50,180 --> 00:25:52,480 Again, we can change those things. 291 00:25:52,580 --> 00:26:02,260 The way that I sort of built into the framework to help manage that was in gaining a free market experience was leveraging the rating system within the framework. 292 00:26:02,960 --> 00:26:05,740 All of that will lead to what they call Nash equilibrium. 293 00:26:06,240 --> 00:26:11,720 And so, that is where creating fun and fair challenges is the best strategy. 294 00:26:11,860 --> 00:26:15,480 That's what that Nash equilibrium is within our game. 295 00:26:16,720 --> 00:26:29,860 So, the benefits of this particular framework, even if you don't use it in your event or if you don't want to have people contribute challenges to your event, is how you store your challenges. 296 00:26:29,860 --> 00:26:41,480 I thought that was one of the hardest things was to collect information from other developers about how the layout of their, you know, their flag and their challenge should be stored. 297 00:26:41,800 --> 00:26:48,960 It allows you to have sort of just some structured format and then you're able to obviously manage that through GIF or whatever. 298 00:26:48,960 --> 00:27:00,060 So, the other benefit is that when you do run it in your event, that will allow people to make little contributions at their own pace. 299 00:27:01,060 --> 00:27:07,580 And they can be really easy if they don't want to try to, you know, come hard with a bunch of, like, reverse engineering challenges. 300 00:27:07,580 --> 00:27:10,320 They can start with a very simple cryptography challenge. 301 00:27:10,320 --> 00:27:12,000 So, you can make very small contributions. 302 00:27:12,000 --> 00:27:15,960 And I'm sure there's some other benefits in there that I'm rushing through right now. 303 00:27:15,960 --> 00:27:22,000 So, the events that have used BYOCTF framework successfully. 304 00:27:23,480 --> 00:27:24,460 Shell on the Border. 305 00:27:24,460 --> 00:27:25,280 That's our event. 306 00:27:25,280 --> 00:27:26,700 That's me, right? 307 00:27:26,740 --> 00:27:32,400 We did a really cool event over New Year's Eve of 2023. 308 00:27:32,400 --> 00:27:36,140 I guess December 2023 going into 2024. 309 00:27:36,760 --> 00:27:38,200 That was Shell on the Border. 310 00:27:38,200 --> 00:27:43,760 We didn't have as many folks there as we would have liked, but it turns out we had just the right folks. 311 00:27:44,100 --> 00:27:46,100 So, that was... I'm super proud of that event. 312 00:27:46,100 --> 00:27:47,480 It was really awesome. 313 00:27:47,480 --> 00:27:50,320 If you weren't there, you missed out. 314 00:27:50,560 --> 00:27:58,480 SparkCon, that was a really cool CTF hosted by the Walmart red team at Walmart headquarters in Bentonville, Arkansas. 315 00:27:58,880 --> 00:28:04,340 And then maybe, who knows, you know, Bic Village on DEF CON 33, you know, hit me up. 316 00:28:04,980 --> 00:28:08,760 So, here's some pictures from Shell on the Border. 317 00:28:08,900 --> 00:28:13,220 It was in an old... it used to be a skate park a long time ago. 318 00:28:14,140 --> 00:28:17,000 And it's been converted into an arcade. 319 00:28:17,240 --> 00:28:20,520 We have, you know, all the cool hacker event stuff. 320 00:28:20,640 --> 00:28:29,760 Badges and, you know, scoreboards and CTFs and lock picking with untold amounts of cash in there. 321 00:28:29,880 --> 00:28:33,460 You can go and look at more photos at that event or that QR code. 322 00:28:33,460 --> 00:28:34,460 It's the same thing. 323 00:28:35,160 --> 00:28:38,260 I do want to brag on Shell on the Border for one second, though. 324 00:28:38,420 --> 00:28:39,460 This was fun. 325 00:28:39,460 --> 00:28:51,860 And again, shout out to Omai for, one, putting me on to this, thank you for giving me the opportunity, and thank you for coming and playing in our CTF and thinking it was cool. 326 00:28:51,860 --> 00:28:54,100 You also performed, and that was fantastic. 327 00:28:54,320 --> 00:28:58,280 One of our guys was there, and he's like, oh, man, I love this song. 328 00:28:58,280 --> 00:29:02,540 And it turns out he was talking to Omai, but he didn't realize it until, like, 30 minutes later. 329 00:29:02,620 --> 00:29:03,340 Fantastic. 330 00:29:03,820 --> 00:29:04,620 Big ups there. 331 00:29:04,620 --> 00:29:05,300 Thank you. 332 00:29:06,860 --> 00:29:16,180 So, SPARKCON, again, hosted at... on April 20th, hosted at Walmart headquarters at their SPARKCON event. 333 00:29:16,840 --> 00:29:26,980 This was, like, the red team hosted a CTF for not only their internal folks, but for just folks coming to the event in general. 334 00:29:27,720 --> 00:29:29,200 A lot of fun. 335 00:29:29,440 --> 00:29:31,460 There were about 140 folks there. 336 00:29:31,460 --> 00:29:34,200 So, as far as people that registered. 337 00:29:34,500 --> 00:29:36,760 Their team sizes were set differently. 338 00:29:36,760 --> 00:29:40,600 Again, most of the settings in this are tunable because they're settings. 339 00:29:42,100 --> 00:29:43,070 And there are... 340 00:29:43,810 --> 00:29:46,470 they had a lot of participation overall. 341 00:29:46,470 --> 00:29:52,490 You can kind of just drop in and check it out throughout the entire event, which I thought was really fun. 342 00:29:53,910 --> 00:29:57,290 So, I've told you about all this cool stuff within BYSDTF. 343 00:29:57,310 --> 00:29:58,870 I've asked you to use it. 344 00:29:59,230 --> 00:30:00,530 But how do you do so? 345 00:30:01,350 --> 00:30:05,030 So, again, I mentioned that it manifests as a Discord bot. 346 00:30:05,030 --> 00:30:06,050 These are the commands. 347 00:30:06,050 --> 00:30:07,450 This is all on the GitHub page. 348 00:30:07,450 --> 00:30:08,610 You can see there. 349 00:30:08,890 --> 00:30:10,910 But there are a couple of core commands you'll see. 350 00:30:10,910 --> 00:30:14,730 So, first of all, you had to be associated with our event at Shell on the Border. 351 00:30:14,730 --> 00:30:18,550 You had to have it set up in such a way that you were a member of the Arkansas Hackers Discord. 352 00:30:18,550 --> 00:30:20,490 You can go to HTTPS, crime.life. 353 00:30:20,490 --> 00:30:22,830 That's crime with a K, the one true spelling. 354 00:30:24,550 --> 00:30:26,810 And then you had to register. 355 00:30:27,570 --> 00:30:28,810 You'd register a team. 356 00:30:28,810 --> 00:30:36,170 And the way that that worked is the first person to register a team name with a certain password would claim ownership of that team name. 357 00:30:36,170 --> 00:30:40,290 And then you would give that password to anyone else that wanted to join your team specifically. 358 00:30:40,350 --> 00:30:42,190 That's your registration command. 359 00:30:43,710 --> 00:30:46,610 Once you're registered, this is how you could view them. 360 00:30:46,610 --> 00:30:48,850 So, it's, you know, bang all. 361 00:30:49,250 --> 00:30:50,470 And then pick a challenge. 362 00:30:50,470 --> 00:30:53,390 I picked challenge 25 here, for instance. 363 00:30:54,150 --> 00:31:03,570 And these are all manifesting or, I'm sorry, happening as messages or DMs to the Discord bot within that channel. 364 00:31:04,550 --> 00:31:09,870 So, I say I want to view either, you know, bang V or bang view. 365 00:31:09,910 --> 00:31:11,870 And then the challenge ID, challenge number. 366 00:31:12,470 --> 00:31:13,930 And that'll give you the description. 367 00:31:13,930 --> 00:31:15,570 That's roughly what it looks like. 368 00:31:16,470 --> 00:31:19,590 You know, the description is telling you everything you need to solve the flag. 369 00:31:21,190 --> 00:31:25,190 This is how you would submit the flag by sending just, again, pound sub. 370 00:31:25,190 --> 00:31:26,690 It's in submit a flag. 371 00:31:27,050 --> 00:31:29,250 And then just, you know, the flag content. 372 00:31:30,110 --> 00:31:35,630 You can see here that we're calling out that you cannot submit a flag from your own challenge. 373 00:31:35,630 --> 00:31:37,630 That was one of the I created. 374 00:31:37,710 --> 00:31:41,830 So, I cannot get points for my own stuff or anyone on my team's stuff. 375 00:31:44,330 --> 00:31:48,990 So, you can see here is a successful completion as well for that particular challenge. 376 00:31:48,990 --> 00:31:50,370 That was challenge 25. 377 00:31:51,650 --> 00:31:54,750 So, if I do, you know, bang who am I? 378 00:31:54,750 --> 00:31:56,570 You can see there's my information. 379 00:31:56,570 --> 00:32:02,610 You have an API key that you can use to sort of get access to the web interface. 380 00:32:02,770 --> 00:32:06,310 Which is the other thing and we will show you. 381 00:32:06,470 --> 00:32:08,690 But it gives you links and all that kind of good stuff. 382 00:32:08,950 --> 00:32:15,930 There's public and private keys and stuff you can do with PKI that was built out and fun to have. 383 00:32:15,930 --> 00:32:18,770 But not essential to this framework in any way. 384 00:32:19,630 --> 00:32:24,290 If you want to see your score, the scoreboard in Discord format, this is how you would do it. 385 00:32:24,650 --> 00:32:31,590 So, if you thought Headspace UIs were whack, you can view a web interface. 386 00:32:31,590 --> 00:32:43,490 Most people wanted to use the web interface because it was easier to ingest the information for whatever reason. 387 00:32:44,010 --> 00:32:47,370 Which was a little bit disappointing because I spent a lot of time thinking about the other one. 388 00:32:47,370 --> 00:32:50,390 But anyway, I taught them a lesson. 389 00:32:50,390 --> 00:32:52,930 Didn't spend any time thinking about this one. 390 00:32:53,030 --> 00:32:56,470 This is the scoreboard that we had projected on the wall. 391 00:32:56,990 --> 00:33:06,630 Really, the point there is just for you to be able to see who's in first place, who's the individual top scoring players and who's the individual teams. 392 00:33:08,170 --> 00:33:18,150 This is, again, I put negative thought into the prettification of this. 393 00:33:18,690 --> 00:33:19,870 But here we are. 394 00:33:19,870 --> 00:33:20,530 That's it. 395 00:33:20,530 --> 00:33:21,950 That's what she looks like. 396 00:33:21,950 --> 00:33:23,570 That's the web interface, guys. 397 00:33:24,090 --> 00:33:29,090 So, right here in the middle, you can see, that's what I call the magic flag hole. 398 00:33:29,090 --> 00:33:33,970 You put flags in there and ideally get points out when you submit the flag. 399 00:33:34,410 --> 00:33:37,490 There was also that tipping mechanism that I mentioned earlier. 400 00:33:37,490 --> 00:33:40,470 You can send tips from this, you know, the player hud. 401 00:33:41,410 --> 00:33:44,810 You pick a player, you type their name or something in there. 402 00:33:44,810 --> 00:33:46,570 There's a dropdown as well. 403 00:33:47,090 --> 00:33:52,490 And then you can say something about them and give them a certain number of points. 404 00:33:53,250 --> 00:34:07,350 There was an interesting abuse of that mechanism, which involved people sort of boosting one player at the end of the game into first place by everyone tipping them their all the points that they had because they weren't going to win. 405 00:34:07,350 --> 00:34:08,670 So, there you go. 406 00:34:08,910 --> 00:34:09,890 That was fun. 407 00:34:09,890 --> 00:34:10,570 I didn't know. 408 00:34:10,570 --> 00:34:11,430 I didn't think about that. 409 00:34:11,430 --> 00:34:12,350 And there we are. 410 00:34:12,410 --> 00:34:14,930 So, we did create a mitigation where there's now a fee. 411 00:34:14,930 --> 00:34:19,670 You have to spend additional funds to send a tip to somebody. 412 00:34:19,670 --> 00:34:25,350 Anyway, that's, you know, the landing page on the hud. 413 00:34:27,230 --> 00:34:35,550 But you can see here, even an older screenshot for some reason, where we're listing the available challenges. 414 00:34:35,550 --> 00:34:37,710 You can see there's like a solved status. 415 00:34:37,710 --> 00:34:44,630 You can click, you can see the percentages, different tags that are associated with that challenge. 416 00:34:44,630 --> 00:34:56,210 So, whether, oh, this is just a generic like weird puzzle thing that we built, or it's a scripting challenge, or this is something that is a PowerShell-oriented challenge, or cryptography, or encryption, or something. 417 00:34:56,450 --> 00:35:03,370 Those are all things that you can control left for and find within the list of challenges. 418 00:35:04,650 --> 00:35:08,810 So, when you go to a specific challenge, this is the information that will land on it. 419 00:35:08,810 --> 00:35:13,050 You'll see all of the hints that you can purchase for your particular challenge. 420 00:35:13,170 --> 00:35:20,390 You can see the details, the description, how many flags it has, what are the sum of the value of flags. 421 00:35:21,990 --> 00:35:29,330 If you wanted it to be structured in such a way that you kind of feed them information, you have to feed them the information through the description. 422 00:35:29,890 --> 00:35:33,110 The framework does not host any files when you submit a challenge. 423 00:35:33,110 --> 00:35:36,450 You're not giving it, oh, here's a, you know, two gigabyte PCAP. 424 00:35:36,450 --> 00:35:38,430 You have to store that on your own. 425 00:35:38,430 --> 00:35:40,090 That's your own thing. 426 00:35:40,090 --> 00:35:41,810 Welcome to the life of a challenge developer. 427 00:35:41,810 --> 00:35:45,450 How do you get your materials to the players? 428 00:35:46,610 --> 00:36:07,110 If you have a flag format that deviates from, like, our core convention, which is capital F, capital L, capital A, capital G, curly bracket, summit witty flag, closing curly bracket, if it deviates from that, I would appreciate that you put your flag format in there. 429 00:36:07,810 --> 00:36:09,430 So, there's that. 430 00:36:09,750 --> 00:36:11,830 It's not case insensitive. 431 00:36:11,830 --> 00:36:13,850 There's no way to build regular expression. 432 00:36:13,850 --> 00:36:15,210 Not that there's no way. 433 00:36:15,210 --> 00:36:19,190 I chose not to build regular expressions or make it case insensitive. 434 00:36:20,010 --> 00:36:21,950 That's just the game. 435 00:36:21,950 --> 00:36:25,610 So, these are all the transactions. 436 00:36:25,610 --> 00:36:28,730 I said that this is a transaction -oriented framework. 437 00:36:28,770 --> 00:36:32,970 These are all the transactions associated with your specific team. 438 00:36:33,190 --> 00:36:45,450 That involves flag solves, hint purchases, rewards, anything that happened that influenced the score on your team will show up as part of your team transactions. 439 00:36:45,850 --> 00:36:49,650 Just a way for you to be able to account for that. 440 00:36:50,170 --> 00:36:56,130 That same thing, except for public transactions, happens right here. 441 00:36:56,130 --> 00:37:00,510 So, this is something you could maybe have on a different wall somewhere. 442 00:37:00,570 --> 00:37:02,110 These are all public transactions. 443 00:37:02,110 --> 00:37:07,970 So, any time someone sends a tip, there's that fun, you know, message that can show up. 444 00:37:07,970 --> 00:37:10,150 If you go and look at them, you'll see that. 445 00:37:10,350 --> 00:37:12,610 As you receive a tip, you will see the message. 446 00:37:12,610 --> 00:37:13,950 They're not necessarily public. 447 00:37:14,870 --> 00:37:17,090 So, that's fun, I guess. 448 00:37:17,430 --> 00:37:21,270 There was an interesting XSS bug that I fixed in that, too. 449 00:37:21,270 --> 00:37:22,790 So, hacker's gonna hack, man. 450 00:37:22,790 --> 00:37:23,650 Thank you, guys. 451 00:37:24,910 --> 00:37:26,470 This is what it looks like on the back end. 452 00:37:26,470 --> 00:37:29,750 It's all written in Python, I said, again, that Discord bot. 453 00:37:30,050 --> 00:37:35,870 But you can, you know, dump a list of users within the framework, their score, as well. 454 00:37:36,130 --> 00:37:38,710 You can look at the BYOCTF stats. 455 00:37:38,770 --> 00:37:45,070 So, how many solves were for a particular challenge that was a BYOC challenge? 456 00:37:45,370 --> 00:37:48,310 What is the total payout for some of those challenges? 457 00:37:48,790 --> 00:37:56,890 There's a bunch of different commands within that control CTF, such as, like, pausing the entire game if you wanted to shut it down for the night or something. 458 00:37:56,890 --> 00:38:01,710 You can do that, such that they can't view new challenges or submit new flags. 459 00:38:03,950 --> 00:38:05,230 Things of that nature. 460 00:38:08,890 --> 00:38:11,230 That's what the transactions look like on the back end. 461 00:38:11,230 --> 00:38:14,190 You can see that there is unredacted flag content here. 462 00:38:14,190 --> 00:38:18,950 So, don't run this on, like, the projector overhead or something like that. 463 00:38:18,950 --> 00:38:25,250 So, that stuff is there for, I guess, debugging purposes originally, I think. 464 00:38:25,670 --> 00:38:26,830 So, there's that. 465 00:38:26,830 --> 00:38:28,010 That's what it looks like on the back end. 466 00:38:29,270 --> 00:38:32,170 Um, let's build and pour some challenges. 467 00:38:32,170 --> 00:38:33,250 You can really do this. 468 00:38:33,250 --> 00:38:37,070 You go to scoreboard.byoctf.com forward slash creator. 469 00:38:37,070 --> 00:38:43,670 It will take you to a cool tool that helps bypass a lot of the hand jamming of stuff that you would have to do. 470 00:38:43,670 --> 00:38:46,610 You're not having to write this TOML file by hand. 471 00:38:46,750 --> 00:38:51,730 But this is what the structure for a simple single flag challenge could look like. 472 00:38:51,730 --> 00:38:53,510 You have to have your author. 473 00:38:53,790 --> 00:39:03,590 Back when it was strictly Discord based, that was your Discord user ID, not the old discriminator with the pound number. 474 00:39:03,630 --> 00:39:06,810 This is the current, like, username for Discord. 475 00:39:07,390 --> 00:39:09,190 The challenge, that's what people see. 476 00:39:09,190 --> 00:39:11,770 The challenge description is the description of the challenge. 477 00:39:11,790 --> 00:39:13,470 It's pretty obvious. 478 00:39:13,570 --> 00:39:14,150 Tags. 479 00:39:14,150 --> 00:39:16,730 These are the categories, if you will. 480 00:39:16,790 --> 00:39:19,130 We don't have, like, categories. 481 00:39:19,130 --> 00:39:20,110 They're all freeform. 482 00:39:20,110 --> 00:39:26,090 We try to normalize them so you're not going to have a capital web and lowercase web set of categories. 483 00:39:26,090 --> 00:39:30,590 Strip white space, lowercase, and it's kind of an upsert. 484 00:39:30,590 --> 00:39:36,510 If the tag already exists, it gets added to it. 485 00:39:36,510 --> 00:39:38,170 It's not creating a new thing. 486 00:39:38,170 --> 00:39:39,870 If it doesn't exist, it gets added. 487 00:39:40,250 --> 00:39:42,830 This UUID is a unique identifier. 488 00:39:43,410 --> 00:39:46,090 Ideally , it's not going to have any duplicates. 489 00:39:46,810 --> 00:39:48,010 So, there's that. 490 00:39:48,010 --> 00:39:50,190 And this is an array of flags. 491 00:39:50,190 --> 00:39:52,310 First off, the flag title. 492 00:39:52,310 --> 00:39:59,690 That's what you're going to use internally to know that, oh, that's the name of the challenge that I, of the flag that I solved. 493 00:39:59,690 --> 00:40:03,090 Or a specific level within my challenge. 494 00:40:03,090 --> 00:40:04,970 So, this is flag one. 495 00:40:04,970 --> 00:40:08,250 Collect information from user's desktop. 496 00:40:08,710 --> 00:40:12,750 Flag value is how many points that flag is worth. 497 00:40:12,750 --> 00:40:19,870 Flag is the actual thing that the user is supposed to paste or type into the magic flag hole to get their money. 498 00:40:20,950 --> 00:40:21,830 Hints. 499 00:40:22,490 --> 00:40:31,130 So, this is any information you want to be a user about your challenge, but charge them for it. 500 00:40:31,130 --> 00:40:32,090 Here you go. 501 00:40:32,130 --> 00:40:34,950 You do actually get a cut of the hints as well. 502 00:40:34,950 --> 00:40:36,990 I believe it's that same 25%. 503 00:40:36,990 --> 00:40:40,450 And they are doled out lowest cost first. 504 00:40:40,450 --> 00:40:41,850 So, you need to order them. 505 00:40:41,850 --> 00:40:48,030 So, the very first hint you would give to somebody should be the cheapest hint you would charge them. 506 00:40:49,610 --> 00:40:51,250 And there's that. 507 00:40:51,570 --> 00:40:53,390 So, that's a single flag challenge. 508 00:40:53,390 --> 00:40:59,090 That right there, you copy and paste it as a toml file, commit it to the framework, and boom, there it is. 509 00:40:59,090 --> 00:41:01,890 So, that's your single flag challenge. 510 00:41:02,770 --> 00:41:05,670 Here's a single flag challenge with a dependency. 511 00:41:05,670 --> 00:41:14,990 Here's all that same information, except there is a field that says depends on and it has a UUID of some existing challenge. 512 00:41:14,990 --> 00:41:19,590 It has to exist within the framework before it will be accepted as a valid challenge. 513 00:41:19,850 --> 00:41:34,670 So, if you have two challenges that you've committed, you have to commit the first challenge first, pay its fee, and then you have to commit the second challenge with this UUID set as the dependency and pay that fee as well. 514 00:41:34,670 --> 00:41:37,650 So, you can't commit them in reverse order. 515 00:41:38,670 --> 00:41:40,750 Same concept, single flags. 516 00:41:40,750 --> 00:41:43,950 If you want to do multiple flags, here's how you do that. 517 00:41:43,950 --> 00:41:46,550 Flags, flags, flags, pretty straightforward. 518 00:41:46,710 --> 00:41:48,650 Same thing is true for hints. 519 00:41:50,030 --> 00:41:53,170 This is how you set up an externally validated challenge. 520 00:41:53,170 --> 00:42:04,230 You have to give it the external validation URL, and that's just some HTTP endpoint, validate, and then you will receive a request and respond to it. 521 00:42:04,230 --> 00:42:23,590 So, if you're running the external validator that we wrote, that should just work for you, and it'll look through a JSON or a dictionary of various flags that you have set up on your infrastructure, and it'll say, is this the flag that you've submitted? 522 00:42:23,890 --> 00:42:24,470 Yes. 523 00:42:24,470 --> 00:42:27,250 Or is this the SHA-236 of the flag that you've submitted? 524 00:42:27,250 --> 00:42:29,050 And you'll say yes or no. 525 00:42:29,250 --> 00:42:37,990 And if we get the answer back from you, then, you know, we're, you know, in the money on that, I guess. 526 00:42:37,990 --> 00:42:39,490 So, you've earned something. 527 00:42:39,890 --> 00:42:41,570 It feels like an attack vector. 528 00:42:41,630 --> 00:42:42,950 I don't think that it is. 529 00:42:43,330 --> 00:42:46,090 You can look at it, but don't waste a whole lot of time on it. 530 00:42:47,270 --> 00:42:56,330 So, those tools that I mentioned, uBuilding, B-Y-O-C-T-F, you know, Builder, this is going to walk you through. 531 00:42:56,330 --> 00:42:58,750 So, you don't have to hand jam any of that toml. 532 00:42:59,030 --> 00:43:07,230 You just fill out all these fields, and then at the bottom of the page, you can copy the button that copies it or downloads the toml file for you. 533 00:43:07,230 --> 00:43:18,190 You can paste it into here, and I think I even added at the, you know, tail end of the other events, the ability to commit it directly from this. 534 00:43:18,230 --> 00:43:23,870 And now that you have Google authentication built in, you don't really, you don't have to use your Discord ID, I guess. 535 00:43:23,870 --> 00:43:25,190 I should update that. 536 00:43:25,190 --> 00:43:26,190 But here we are. 537 00:43:26,190 --> 00:43:33,350 You just, whatever your name is, your name within the framework, use that name for your author. 538 00:43:33,350 --> 00:43:35,990 You can't commit a challenge that's not yours. 539 00:43:35,990 --> 00:43:44,950 So, that's also a thing where you would, that was an attack that I thought of, like you submit a challenge on behalf of somebody else, which I thought was a funny thing to do. 540 00:43:44,950 --> 00:43:47,370 And thus, they would get charged for it. 541 00:43:47,970 --> 00:43:49,430 Anyway, there we are. 542 00:43:50,250 --> 00:43:59,690 So, I think this video that I have here is a short video that's like, I think, a minute and a half, which shows the entire process. 543 00:44:00,270 --> 00:44:04,090 The link to that will be in the slides. 544 00:44:48,630 --> 00:44:51,170 So, 545 00:45:02,290 --> 00:45:42,630 so golly gee, that sure was a cool video. 546 00:45:43,790 --> 00:45:44,750 Awesome. 547 00:45:45,110 --> 00:45:49,070 Links and resources, this is where you can go and find those things. 548 00:45:49,070 --> 00:45:51,170 I think the link in the video is actually wrong. 549 00:45:51,170 --> 00:45:53,690 I've dropped the validator subdomain. 550 00:45:54,650 --> 00:45:56,670 And it's all just living on the scoreboard now. 551 00:45:56,670 --> 00:45:59,470 They were separate apps at one point, but now it's all just one. 552 00:46:00,690 --> 00:46:04,830 Yeah, so those things can get you started in writing CTF challenges. 553 00:46:04,990 --> 00:46:07,670 Next, what makes a good CTF challenge? 554 00:46:07,770 --> 00:46:17,790 If we didn't discuss any of that stuff, which I don't think I did, I have a whole thing written up about my personal experiences writing challenges for others. 555 00:46:17,790 --> 00:46:24,610 I think that this is an opportunity for you to think about someone else's learning experience. 556 00:46:26,330 --> 00:46:32,490 What is it that you're expecting them to know versus like, know before they come to the event? 557 00:46:32,490 --> 00:46:34,610 Or as they start your challenge? 558 00:46:34,710 --> 00:46:38,310 Versus what are you wanting them to discover in solving your challenge, right? 559 00:46:38,310 --> 00:46:46,010 All of that stuff, sort of thinking about that helps you understand how to value your challenge. 560 00:46:46,010 --> 00:46:48,830 That's to say, is this a really hard challenge, thus high points? 561 00:46:48,830 --> 00:46:51,590 Or is it an easy challenge, thus low points? 562 00:46:52,710 --> 00:47:03,390 And then you can tune the value of your flags relative to the other challenges that you've experienced in other CTFs or in this CTF specifically. 563 00:47:03,390 --> 00:47:12,030 One thing that I will say is that the points don't matter as much because if it's really easy, then it's really easy for everybody. 564 00:47:12,790 --> 00:47:16,010 That is to say, well, it's not that it's easy for everybody. 565 00:47:16,010 --> 00:47:26,090 It's that if it's low points, or if it's overly valued, that is to say, like, I'm going to say a thousand points, and it's really easy, then everyone has that opportunity to capture it. 566 00:47:26,090 --> 00:47:33,330 If it's objectively easy, again, flag one, two, three, or something, then everyone has that same opportunity. 567 00:47:33,710 --> 00:47:36,350 So, it's like, ah, you weren't paying attention. 568 00:47:36,350 --> 00:47:38,950 You missed this really, you know, gimme challenge. 569 00:47:38,950 --> 00:47:41,190 Don't tell you it happens sometimes. 570 00:47:41,850 --> 00:47:45,390 So, here's some examples, like binary to ASCII conversion. 571 00:47:45,390 --> 00:47:56,510 If you're brand new to computers, and you're a seventh grader, and you're learning about, oh, man, keyboards, they have, you know, numeric values, key scan codes associated with them. 572 00:47:56,510 --> 00:47:59,790 Oh, wow, what's, how do I translate from one to the other? 573 00:47:59,790 --> 00:48:00,910 Oh, well, okay. 574 00:48:01,630 --> 00:48:02,170 Excellent. 575 00:48:02,170 --> 00:48:04,190 That might be a hundred point challenge for them. 576 00:48:04,190 --> 00:48:15,170 However, if you are, you know, dealing with a room full of hackers, that might not be a very good challenge, as far as, like, valuing, like, their time and efforts and whatnot. 577 00:48:15,170 --> 00:48:18,010 But, you know, you value that lowly. 578 00:48:18,190 --> 00:48:21,270 Base 64, not everybody knows what that is. 579 00:48:21,570 --> 00:48:24,550 You know, that's just something you get to know with experience. 580 00:48:25,310 --> 00:48:28,870 You know, that, but notice that it's not 25 points, it's 50 points. 581 00:48:30,230 --> 00:48:47,930 Like some of the classic binary exploitation, that might be a medium level, because it's not only do you have to understand about the fact that there are compiled executables, but how to abuse those executables, so that there's a certain amount of information you had to come to the challenge with. 582 00:48:48,010 --> 00:48:50,670 And in that, you might have to learn something new. 583 00:48:50,670 --> 00:49:11,090 So if there's a technique, like the string format vulnerabilities, where you're leaking information, or you're leaking information off of the stack, or off the heap, or some other, you know, mechanism, that, you know, obviously, if there's something you have to learn about the challenge during the challenge, 584 00:49:11,090 --> 00:49:12,890 that might make it more difficult. 585 00:49:12,890 --> 00:49:14,370 So, four points. 586 00:49:15,350 --> 00:49:17,370 So, so on, so forth. 587 00:49:17,830 --> 00:49:19,830 That's, you know, one way to look at it. 588 00:49:19,830 --> 00:49:27,370 So, I like to make sure to express the distinction between complexity and complicated. 589 00:49:27,750 --> 00:49:29,470 There's a difference between the two. 590 00:49:29,470 --> 00:49:49,970 And so, if you're executing this challenge, and you're building it out, if you're having them escalate their, the things that they're going to have to do as far as sophistication as a threat actor, they're, like, I don't know, I guess that's, that's a cool, 591 00:49:50,150 --> 00:49:51,210 a cool way to think about it. 592 00:49:51,210 --> 00:49:54,770 Have them, shoot, I've messed up at this point. 593 00:49:54,950 --> 00:49:55,610 Restart. 594 00:49:55,610 --> 00:49:56,210 Edit. 595 00:49:56,350 --> 00:49:56,970 Oh, edit. 596 00:49:56,970 --> 00:49:57,950 I can edit this. 597 00:49:57,950 --> 00:49:58,610 Nice. 598 00:49:58,610 --> 00:49:59,810 Go back. 599 00:50:01,970 --> 00:50:04,430 All right, edit at 40. 600 00:50:05,430 --> 00:50:07,410 What time is this? 601 00:50:07,790 --> 00:50:08,490 429. 602 00:50:08,490 --> 00:50:09,370 Okay, cool. 603 00:50:12,130 --> 00:50:17,290 So, I want to make a distinction between complexity and difficulty. 604 00:50:17,410 --> 00:50:27,450 I think it's important to think about if a challenge is really easy to do, very likely to happen, it has a high impact, it might not be a high point challenge. 605 00:50:27,490 --> 00:50:30,930 Because that's, you know, again, script kitty stuff, right? 606 00:50:30,930 --> 00:50:35,910 You can go and download an executable, point it at something, and hack it. 607 00:50:35,910 --> 00:50:39,530 You've, ah, ah, there's not much learning going on there. 608 00:50:40,030 --> 00:50:44,310 So, how could you change the equation, is the question I'm asking there. 609 00:50:44,310 --> 00:50:47,330 So, any number of ways to do that. 610 00:50:47,330 --> 00:50:51,190 You can make it really hard to do, but likely to happen. 611 00:50:51,910 --> 00:50:57,930 And that would change the, you know, the other side of the equation, where it's no longer just low points, maybe medium points. 612 00:50:57,930 --> 00:51:13,330 If it's unlikely to happen, and really easy to do, though, that again, you might have to work really hard to discover the vulnerability, but it's an easy vulnerability to trigger, that might change whether or not it's low points. 613 00:51:14,790 --> 00:51:26,650 Some of the examples that I'm walking through here in this, you know, fabricated challenge is like, the landmarks that I'm sort of laying out is that we use MS 1710 for initial access. 614 00:51:27,270 --> 00:51:30,650 And that gives us a, you know, a system shell on that remote machine. 615 00:51:30,650 --> 00:51:34,310 So, we can look at the administrator's desktop, flag.txt. 616 00:51:34,310 --> 00:51:43,190 But we have a higher order objective in mind, and that is to compromise, you know, information within the organization. 617 00:51:43,190 --> 00:51:54,850 So, in this, we're supposed to target PII, and there is a spreadsheet on so-and-so's desktop, and they are the, you know, the HR person within this organization. 618 00:51:55,410 --> 00:52:10,230 And then the next objective, once we found that spreadsheet and gotten the flag out of one of the cells in it or something, we are supposed to find and disenroll the base commander from their TRICARE, you know, registration. 619 00:52:10,230 --> 00:52:12,370 So, they're going to lose their insurance, right? 620 00:52:13,310 --> 00:52:14,110 Problematic. 621 00:52:14,110 --> 00:52:19,010 That is an interesting thing that doesn't have anything to do with the technical exploit. 622 00:52:19,010 --> 00:52:25,130 It has to do with understanding something within the mechanics of the game that is hosted at TRICARE.info. 623 00:52:25,130 --> 00:52:32,430 So, now there's something you had to learn about this challenge from this challenge and exploit it. 624 00:52:33,650 --> 00:52:46,450 So, all of those are escalating in complexity and sophistication beyond just like the technical vector of, oh, did you download and run the right command? 625 00:52:46,870 --> 00:52:51,330 So, I think that's a cool way to architect challenges. 626 00:52:53,610 --> 00:52:55,710 Again, these points are made up. 627 00:52:55,710 --> 00:52:58,090 So, just use your best judgment. 628 00:52:58,370 --> 00:53:02,010 So, this is the point we're asked for questions, comments, concerns. 629 00:53:03,210 --> 00:53:05,770 Hearing none, we'll move on. 630 00:53:05,970 --> 00:53:07,850 This is our final call to action. 631 00:53:07,850 --> 00:53:09,210 Please contribute. 632 00:53:09,210 --> 00:53:22,830 Please consider, you know, leveraging the framework to the best of your ability, whether that be, you know, just helping with documentation within the BYOCTF GitHub. 633 00:53:22,850 --> 00:53:24,990 That would be very useful. 634 00:53:24,990 --> 00:53:26,670 I'm not good at that stuff. 635 00:53:27,530 --> 00:53:29,930 Or your experiences with it. 636 00:53:29,930 --> 00:53:35,970 Any ideas you have for various game types or something like that, please just participate. 637 00:53:35,970 --> 00:53:36,830 That would be cool. 638 00:53:38,210 --> 00:53:40,190 And that is it. 639 00:53:40,190 --> 00:53:43,090 I would like to say there's a funny story here. 640 00:53:43,090 --> 00:53:46,610 We had a couple of skits at Shell on the Border 2023. 641 00:53:48,050 --> 00:53:55,110 And one of them was involving Hal from hackers. 642 00:53:56,810 --> 00:53:58,770 So, yeah, that was fun. 643 00:53:58,770 --> 00:54:03,810 And then this was also like how to register players and users and such the framework. 644 00:54:03,810 --> 00:54:06,470 So, it kind of walked you through that stuff. 645 00:54:07,950 --> 00:54:10,790 So, you won't play this, though. 646 00:54:10,790 --> 00:54:12,370 Hey, Shell on the Border. 647 00:54:12,850 --> 00:54:13,370 Yeah. 648 00:54:13,430 --> 00:54:14,070 Boom. 649 00:54:14,070 --> 00:54:14,370 All right. 650 00:54:14,370 --> 00:54:14,710 There we go. 651 00:54:14,710 --> 00:54:15,250 Boom. 652 00:54:15,590 --> 00:54:17,210 Thank you, and hack the planet.