start	end	text
4920	5580	Okay.
26940	32000	Hi, my name is Eli McRae, and I'm here to present about BYO CTF.
32260	37960	I believe that the best way to learn something is actually to go about teaching it to other people.
38480	42980	And one of the great ways to do that with regards to cybersecurity is through Capture the Flag events.
42980	48840	And I believe that everyone has the opportunity to learn how to become a CTF challenge developer.
49780	51300	So a bit about myself.
51300	53720	I am not an expert in anything.
53720	59160	I've been in the hacking community here in Arkansas for the past 20 years or so.
59160	62920	Just doing various things, particularly Forsmith 2600.
62920	64900	We started that in 2006.
65400	69600	And then also the Arkansas hackers discord, crime.life.
69980	73640	I've got about 18 or so years of industry experience.
73840	86900	That is anything from computer repair to software development, network engineering, over into education and academia, military experience.
87320	91200	I say kind of on that because I'm a member of the Arkansas Air National Guard.
91200	94680	Spent some time doing NCC and comm work there.
94680	101840	But for the last seven years, I've been doing cyber operations for the 223rd Little Rock Air Force Base.
102820	105180	So yeah, that's a little bit about me.
105180	106500	At the top there.
107500	109880	So a bit about my CTF story.
110280	113380	There was an event in Little Rock, Arkansas called Jolt.
114120	118820	That was a point in my life where I had been out of the military for a couple of years.
118820	120340	I went to that event.
120340	124080	I was fortunate enough to be on a team that did really well.
124100	126160	I was on with some heavy hitters.
126160	127840	And we did well.
127840	128780	We won.
129180	131020	And I was like, man, that was really cool.
131020	137680	It ended up getting me back on track and into the military, being able to do all of this hacking stuff as a career .
138900	143380	Well, in the process of doing that, I guess maybe my ego was like overinflated or something.
143380	147080	But we said, man, that's a really cool thing.
147080	148680	We could do that in Fort Smith.
148680	155960	The reason we said in Fort Smith was because that is, you know, where most of the top three teams were from.
155960	158500	And so, we said we're going to do that.
158500	162420	We'll put together a really cool event in Arkansas.
163200	168600	The history of that was really based on CTFD.
168800	172260	So, in 2018, we ran our first event.
172260	178500	And that was based off of a fork of custom changes that we made to like CTFD itself.
179200	182540	We wrote some interesting additions there.
182540	190260	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.
190260	194820	And so, I took that and made that a plug -in.
195260	201600	And I helped run CTFs around the state of Arkansas on behalf of the Department of Education.
202020	205160	And a lot of that legacy sort of still continues on.
205160	210440	I think there's something to the effect of 535 high schools in Arkansas.
210440	219900	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.
219900	226140	So, it was really cool to be able to help share that experience with high school students.
226580	229940	But CTFD, I think, has some problems as well.
230320	236820	Particularly, as like changes would come out, it was hard to port the challenges from version to version.
237180	246460	So, also, our plug-ins were hard to maintain because there was something that was changing on the back-end database or something.
246480	249680	It was hard to sort of keep that running and in line.
249980	252820	All of that being said, please go use CTFD.
252820	253960	Good framework.
253960	256000	Love it for a number of reasons.
256000	262480	So, with all of that, as we were developing challenges, there were some struggles.
263420	272040	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.
272040	282000	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.
282000	291260	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.
291260	295060	And I think for that event, we were targeting 48 hours of CTF time.
295160	296880	So, that's a lot of challenges.
298240	302020	And I think we ended up producing something like close to 100.
303300	312720	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.
314200	324040	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.
324060	325260	What are they going to eat?
325260	327640	What are they going to do with the food that they've eaten, right?
328520	330260	So, that.
330620	333860	What that led to ultimately is overproduction of challenges.
333860	337320	We had way more challenges than we ended up actually deploying.
337320	344900	Part of that was the technical error for one reason or another, or we just simply overlooked it in the spreadsheet.
345880	353580	That self-imposed vendor lock-in, we built those challenges with the capabilities of our framework in mind.
353580	360920	So, we couldn't take our challenges and take them to another event because just the way that the flag reveals would work out.
360920	369040	We're just different in that other framework, whether that be Melavora, the Facebook framework, CTFD, something in between, HomeAid.
369660	378180	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.
378520	387140	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.
387480	393220	People moved on out of the area, weren't able to contribute remotely.
393460	403500	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.
403720	408560	And it's really hard to always have interesting and new challenges.
408920	411180	And that was very important to us.
411180	415880	We didn't just want to go and sort of regurgitate the same challenge over and over again for people.
415880	422400	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.
424120	426480	So, again, human logistics is hard.
426480	428360	You guys want to look at those links.
428360	435860	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.
435860	442780	Every bit of money went back into the community, back into the event or other events, potentially.
442880	448880	So, we said that we had a problem and we need a solution.
450560	460380	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.
460380	464980	People would always volunteer to help, but we don't need help stacking chairs.
464980	467200	We need to help with really cool ideas.
467440	468620	We can move tables.
468620	471520	We can figure out the bathroom situation, as I said.
471520	475180	But we need interesting content to make people want to come.
476460	484680	Next, we wanted some way for those contributions that people would make to be rewarded or given back to them in some meaningful way.
484680	488440	Something that would mean something more so than just a thumbs up or kudos.
491320	495560	And because of that, I guess this was like sort of a secondary feature.
495560	499300	I wanted there to be some form of, like, inter-player transactions.
499300	505420	So, within the game, I can influence your play of the game to some degree.
508560	518860	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.
518860	523620	And so, it would also potentially allow us to participate in the game again.
523620	530760	Because once you sort of joined the challenge developer team, it kind of took you out of the talent pool.
530760	533480	And Arkansas is not particularly large.
534500	538340	So, there are cities that are larger than the entire state population of Arkansas.
538340	540960	So, our talent pool was not as broad as others.
540960	543280	So, we want to be able to play the game too.
544320	550500	And I'm sure there's some other problem that we were having that we thought this was a good idea.
551100	555820	So, I will say that at the time, no other framework offered this.
555820	560480	But I put a heavy asterisk there because I don't think I even bothered to Google it.
560780	563020	So, they might have existed.
563020	564920	If one exists, please share.
565220	566740	Be glad to see it.
566740	568820	So, none of that stuff existed until...
603350	603730	Cool
610180	610560	.
611440	612880	I hope that video played well.
612880	613420	Maybe it did.
613420	614400	Maybe it didn't.
614400	615940	Hopefully that will go better live.
616920	623780	Anyway, FS 2600 solution, BYOCTF, bring your own challenge or capture the flag.
623780	624820	Something like that.
624960	627240	I think it's supposed to be a regular expression joke.
627260	628020	I made it up.
628020	629400	I kind of ran with it.
629400	631760	So, it's for us, by us.
631760	636080	If you want to get a copy of these slides, you can go to byoctf.com forward slash slides.
636680	638260	And look at that.
638520	640320	The rest of the slide deck, that is.
641180	643840	So, I started this in 2020.
644220	647300	And then I let it cook for a long minute.
647520	650020	I don't think there was any contributions that I made.
650020	651580	I kind of didn't forget about it.
651580	654420	But there was just, you know, COVID and all that stuff.
654420	658840	So, there was no, like, in-person event that was getting thought about for a long time.
660400	664000	And then something changed in, you know, late 2022.
664000	666080	We said, oh, man, maybe we should do this thing.
666440	669740	And I think I accidentally committed us to doing it in 2023.
670300	674420	And so, that led us up to, you know, the event.
674420	693360	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.
693360	706800	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.
707560	721740	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.
722840	728860	That opens us up as the game masters or GMs to be able to play again.
729960	748080	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?
748880	755640	And so, we created this external validation scheme, as well, which is still in place, but it's honestly not the main feature.
755960	761840	You can contribute a challenge that is externally validated, where you never give us the flag.
762660	770240	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.
771920	777240	We have our inter-player transactions and other things of that nature.
777500	780540	You can sell stuff, hints, and information to each other.
780540	781620	I think that's fun.
781620	783400	With that, you have an economy.
783860	789100	It's flag-oriented, meaning that the flags are not bound to a specific challenge.
789100	801320	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.
801320	804820	You can simply find a flag and capture it.
806160	817600	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.
817780	823120	We have the same thing as the first blood points, the decaying points over time.
823420	835340	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.
835780	837700	And then some other game modes, as well.
838500	840500	It used to be strictly Discord-based.
840500	847860	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.
849640	853380	But most people really wanted the web experience.
853380	861480	So, it's not strictly Discord-based, but the initial implementation was made to run as a Discord bot.
861480	864140	But that's not essential to the concept.
864640	868440	I wanted the strong authentication that came with it.
869980	871800	So, other features.
871800	873780	I mentioned the externally validated flag.
873780	876120	You don't have to give us the flag material.
877600	880320	They have a different mechanism, slightly.
880360	885860	Rather than typing sub, you type esub for external sub validation.
885980	893120	But one caveat is that we will see the SHA-256 of the flag that's submitted.
894280	896920	I mean, you've got to trust something somewhere.
896920	900740	You can always channel this to GM and say, hey, what's the flag that produces that hash?
900740	903300	And if we can't produce it, okay, there you go.
903940	908000	Go to that link for the prototype server.
908000	910280	You can implement that and look at the routes.
910280	913720	It's all in Flask, so it's pretty straightforward and easy to ingest.
914120	918160	I will say I have not implemented that in the web UI, but there you go.
918860	923320	Challenge dependency or extension, I thought that was fun.
923680	931520	What was really interesting is that a user-contributed challenge can extend any other uh, existing challenge.
931520	948840	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?
948840	953340	And that's the only flag that you wrote for that challenge.
954140	959440	Player two can come along and say, hey, but what was saved in the clipboard memory?
959560	966460	And that can be sort of a reuse and a recycling of that person's content.
966500	970880	And we'll talk a little bit about some of the limitations, the features, and why that would still be possible.
971740	992380	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.
992380	1000640	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.
1000980	1007500	Just so long as the previous challenge in the chain exists within the database, you can create a dependency on it.
1007500	1010700	That should be logical or obvious.
1011280	1015700	So, this is the data model for udatabase.nersc.
1016100	1026200	So, yeah, it looks like spaghetti code because it looks complicated, and it kind of is.
1026200	1027300	It's overly complicated.
1027300	1038460	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.
1039340	1040200	There's that.
1040200	1042500	So, how does it do the thing?
1042500	1051600	I told you an interesting story about how a player would get extra points for contributing a challenge.
1051600	1053520	Here's that narrated.
1053720	1056600	So, here is the author of a challenge.
1056600	1058300	He's created challenge CC.
1058300	1060600	There's two flags to this challenge.
1060620	1065680	One of them is worth 150 points, and flag two is worth 50 points.
1065720	1078720	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.
1078720	1081640	So, real quick, that's all tunable.
1081640	1083880	You can change that information.
1085460	1087960	But, there's that.
1087960	1093580	So, at this point, once you've committed that, you are down 100 points.
1093720	1095660	So, you pay that money.
1095660	1100040	You are now invested in the viability of that challenge.
1100040	1104880	As that happens, as you commit it, it becomes available to other players.
1105560	1108300	They can have the opportunity to solve it or not.
1108300	1110720	There's no guarantee that you will get a solve.
1110800	1119420	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.
1119420	1132820	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.
1132820	1136060	So, that turns out to be 37.5 points.
1136060	1138080	So, now your score goes up as well.
1138080	1142020	You're still down, but you're getting closer to breaking even again.
1143700	1145540	Next comes player two.
1145540	1148560	They solved flag one for 150 points.
1148560	1149780	Their number goes up.
1149780	1151100	Your number goes up.
1151100	1153280	Again, now you're at 375 points.
1153280	1155600	You're only 25 points down at this point.
1156820	1160020	Third player comes along, 150 points.
1160060	1165120	You get that same 25% boost, and you are now in the green.
1165120	1169940	You've made, or in the black, I guess it's saying, you've made 12.5 points.
1170680	1173220	You are up from your starting position.
1173220	1177840	Meanwhile, you might have also been working on other challenges, solving those things as the author.
1179240	1181740	Now, notice that this is player one again.
1181740	1186060	He's captured flag two, and that is only worth 50 points.
1186060	1189220	Now, you still get that same 25% bump.
1189220	1193320	In this instance, it's 12.5 points, so that puts you up 25 there.
1195160	1199020	Same game, player four, fourth person comes along.
1199020	1205020	There's only the practical limit of how many teams there are to get your points there.
1205020	1212580	Right now, you're at 62.5 points up from your initial contribution.
1212680	1218000	So, pretty straightforward, I think, as far as how that plays out.
1218060	1230140	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.
1230140	1232340	We've been trying to shop it around.
1232340	1240400	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?
1240400	1242180	All right, that's a criticism.
1242340	1249380	The next one, what about challenges that are just, oh, flag one, two, three, or password is password, things of that nature.
1249380	1258120	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.
1258760	1261300	We'll see some mitigations for that as well.
1262920	1266740	Legitimate, but otherwise over or undervalued challenges.
1266820	1270480	That one's hard, but you could call it an honest mistake.
1270480	1276420	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.
1276740	1280020	Trivial challenges is you just trying to get a leg up, you know.
1280180	1283560	But this third one here is kind of an honest mistake.
1283560	1286740	You didn't know that it was going to be as hard as it was.
1286740	1290400	It's still solvable, but you didn't know it was going to be difficult for everybody.
1291600	1294360	And then the last one is like bad faith administrators.
1294500	1298680	We have, you know, I guess a more practical solution for that.
1298760	1308280	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.
1309180	1319040	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.
1319900	1329300	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.
1329300	1332180	So, we'll talk about that one here in just a second.
1333000	1336740	So, we have the controls in place for bad faith administrators.
1336740	1344420	What I can do is offer my promise as the event organizer that I'm not going to try to win my own event.
1344420	1346260	It's going to look pretty lame if I do.
1346260	1347660	So, there you go.
1347660	1352780	That's the practical solution to bad faith administrators.
1354380	1355640	We can tune.
1355640	1357420	It's just a database at the end of the day.
1357420	1362860	We can go in and change the values if we notice that everyone's like, ooh, that challenge is way too hard.
1362860	1372200	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.
1373020	1381920	The next one is that race to the bottom concept where everyone's just flooding the entire game with just easy and trivial challenges.
1382200	1386120	We can disable specific challenges or we can just disable the entire thing.
1386120	1396660	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.
1398400	1403560	And then, obviously, we can disable a user in challenges associated with that user.
1404360	1409480	So, that is, you know, that's kind of just hitting them with a band hammer or something.
1410740	1416860	I guess I have this here because it should be obvious, but you cannot submit a challenge from your own team.
1417060	1420460	Like, that's... I would hope that that should be obvious to you.
1421460	1424820	And I always like to say, like, please don't make us use these rules.
1424940	1426640	Don't hack the scoreboards, what we always do.
1426660	1433060	Would say, you know, big sort of follow the same rules, you know, don't mess with the infrastructure.
1433220	1438600	So, I thought that this framework was fun because there's a lot of game theory involved in it as well.
1439200	1446720	Some of the game and game theory is really just, like, where it comes from is the idea that your decisions impact my decisions.
1446720	1449880	So, how you play the game impacts how I play the game.
1450080	1461200	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.
1461920	1473200	And by defect, we mean create unfair challenges or create some sort of disadvantage for... I'm sorry, disadvantage for the opposing side.
1473200	1477480	So, trying to create an advantage for themselves or cooperate.
1478260	1485360	We incentivize cooperation via the reward system and we dissuade defection via the commit fee.
1485380	1490000	So, again, you have to commit 50% of the sum of your flags in order for you to be able to post it.
1490000	1497420	So, that alone should help mitigate some people that are willing to just try to nuke the game.
1498460	1501440	So, let's see.
1501700	1503140	Asymmetric information.
1503420	1510000	This is sort of, again, calling back to the idea that there's a legitimate challenge that's otherwise undervalued.
1510500	1520740	They are able to go forth and tune that information based on their experience and other events.
1521180	1525080	I have this set up as like time vampires versus impossible challenge.
1525080	1528040	Time vampire is a real challenge.
1528040	1531840	It's just sucking time, something that's time consuming otherwise.
1531840	1536520	An impossible challenge is broken or intentionally broken.
1536600	1542940	I have impossible because I guess the joke I was making was like impossible meats.
1542940	1545620	Like the impossible whopper or something.
1545700	1546660	So, where's the beef?
1546660	1547520	That's the joke.
1547520	1548200	Okay.
1550180	1552480	Again, we can change those things.
1552580	1562260	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.
1562960	1565740	All of that will lead to what they call Nash equilibrium.
1566240	1571720	And so, that is where creating fun and fair challenges is the best strategy.
1571860	1575480	That's what that Nash equilibrium is within our game.
1576720	1589860	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.
1589860	1601480	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.
1601800	1608960	It allows you to have sort of just some structured format and then you're able to obviously manage that through GIF or whatever.
1608960	1620060	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.
1621060	1627580	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.
1627580	1630320	They can start with a very simple cryptography challenge.
1630320	1632000	So, you can make very small contributions.
1632000	1635960	And I'm sure there's some other benefits in there that I'm rushing through right now.
1635960	1642000	So, the events that have used BYOCTF framework successfully.
1643480	1644460	Shell on the Border.
1644460	1645280	That's our event.
1645280	1646700	That's me, right?
1646740	1652400	We did a really cool event over New Year's Eve of 2023.
1652400	1656140	I guess December 2023 going into 2024.
1656760	1658200	That was Shell on the Border.
1658200	1663760	We didn't have as many folks there as we would have liked, but it turns out we had just the right folks.
1664100	1666100	So, that was... I'm super proud of that event.
1666100	1667480	It was really awesome.
1667480	1670320	If you weren't there, you missed out.
1670560	1678480	SparkCon, that was a really cool CTF hosted by the Walmart red team at Walmart headquarters in Bentonville, Arkansas.
1678880	1684340	And then maybe, who knows, you know, Bic Village on DEF CON 33, you know, hit me up.
1684980	1688760	So, here's some pictures from Shell on the Border.
1688900	1693220	It was in an old... it used to be a skate park a long time ago.
1694140	1697000	And it's been converted into an arcade.
1697240	1700520	We have, you know, all the cool hacker event stuff.
1700640	1709760	Badges and, you know, scoreboards and CTFs and lock picking with untold amounts of cash in there.
1709880	1713460	You can go and look at more photos at that event or that QR code.
1713460	1714460	It's the same thing.
1715160	1718260	I do want to brag on Shell on the Border for one second, though.
1718420	1719460	This was fun.
1719460	1731860	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.
1731860	1734100	You also performed, and that was fantastic.
1734320	1738280	One of our guys was there, and he's like, oh, man, I love this song.
1738280	1742540	And it turns out he was talking to Omai, but he didn't realize it until, like, 30 minutes later.
1742620	1743340	Fantastic.
1743820	1744620	Big ups there.
1744620	1745300	Thank you.
1746860	1756180	So, SPARKCON, again, hosted at... on April 20th, hosted at Walmart headquarters at their SPARKCON event.
1756840	1766980	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.
1767720	1769200	A lot of fun.
1769440	1771460	There were about 140 folks there.
1771460	1774200	So, as far as people that registered.
1774500	1776760	Their team sizes were set differently.
1776760	1780600	Again, most of the settings in this are tunable because they're settings.
1782100	1783070	And there are...
1783810	1786470	they had a lot of participation overall.
1786470	1792490	You can kind of just drop in and check it out throughout the entire event, which I thought was really fun.
1793910	1797290	So, I've told you about all this cool stuff within BYSDTF.
1797310	1798870	I've asked you to use it.
1799230	1800530	But how do you do so?
1801350	1805030	So, again, I mentioned that it manifests as a Discord bot.
1805030	1806050	These are the commands.
1806050	1807450	This is all on the GitHub page.
1807450	1808610	You can see there.
1808890	1810910	But there are a couple of core commands you'll see.
1810910	1814730	So, first of all, you had to be associated with our event at Shell on the Border.
1814730	1818550	You had to have it set up in such a way that you were a member of the Arkansas Hackers Discord.
1818550	1820490	You can go to HTTPS, crime.life.
1820490	1822830	That's crime with a K, the one true spelling.
1824550	1826810	And then you had to register.
1827570	1828810	You'd register a team.
1828810	1836170	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.
1836170	1840290	And then you would give that password to anyone else that wanted to join your team specifically.
1840350	1842190	That's your registration command.
1843710	1846610	Once you're registered, this is how you could view them.
1846610	1848850	So, it's, you know, bang all.
1849250	1850470	And then pick a challenge.
1850470	1853390	I picked challenge 25 here, for instance.
1854150	1863570	And these are all manifesting or, I'm sorry, happening as messages or DMs to the Discord bot within that channel.
1864550	1869870	So, I say I want to view either, you know, bang V or bang view.
1869910	1871870	And then the challenge ID, challenge number.
1872470	1873930	And that'll give you the description.
1873930	1875570	That's roughly what it looks like.
1876470	1879590	You know, the description is telling you everything you need to solve the flag.
1881190	1885190	This is how you would submit the flag by sending just, again, pound sub.
1885190	1886690	It's in submit a flag.
1887050	1889250	And then just, you know, the flag content.
1890110	1895630	You can see here that we're calling out that you cannot submit a flag from your own challenge.
1895630	1897630	That was one of the I created.
1897710	1901830	So, I cannot get points for my own stuff or anyone on my team's stuff.
1904330	1908990	So, you can see here is a successful completion as well for that particular challenge.
1908990	1910370	That was challenge 25.
1911650	1914750	So, if I do, you know, bang who am I?
1914750	1916570	You can see there's my information.
1916570	1922610	You have an API key that you can use to sort of get access to the web interface.
1922770	1926310	Which is the other thing and we will show you.
1926470	1928690	But it gives you links and all that kind of good stuff.
1928950	1935930	There's public and private keys and stuff you can do with PKI that was built out and fun to have.
1935930	1938770	But not essential to this framework in any way.
1939630	1944290	If you want to see your score, the scoreboard in Discord format, this is how you would do it.
1944650	1951590	So, if you thought Headspace UIs were whack, you can view a web interface.
1951590	1963490	Most people wanted to use the web interface because it was easier to ingest the information for whatever reason.
1964010	1967370	Which was a little bit disappointing because I spent a lot of time thinking about the other one.
1967370	1970390	But anyway, I taught them a lesson.
1970390	1972930	Didn't spend any time thinking about this one.
1973030	1976470	This is the scoreboard that we had projected on the wall.
1976990	1986630	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.
1988170	1998150	This is, again, I put negative thought into the prettification of this.
1998690	1999870	But here we are.
1999870	2000530	That's it.
2000530	2001950	That's what she looks like.
2001950	2003570	That's the web interface, guys.
2004090	2009090	So, right here in the middle, you can see, that's what I call the magic flag hole.
2009090	2013970	You put flags in there and ideally get points out when you submit the flag.
2014410	2017490	There was also that tipping mechanism that I mentioned earlier.
2017490	2020470	You can send tips from this, you know, the player hud.
2021410	2024810	You pick a player, you type their name or something in there.
2024810	2026570	There's a dropdown as well.
2027090	2032490	And then you can say something about them and give them a certain number of points.
2033250	2047350	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.
2047350	2048670	So, there you go.
2048910	2049890	That was fun.
2049890	2050570	I didn't know.
2050570	2051430	I didn't think about that.
2051430	2052350	And there we are.
2052410	2054930	So, we did create a mitigation where there's now a fee.
2054930	2059670	You have to spend additional funds to send a tip to somebody.
2059670	2065350	Anyway, that's, you know, the landing page on the hud.
2067230	2075550	But you can see here, even an older screenshot for some reason, where we're listing the available challenges.
2075550	2077710	You can see there's like a solved status.
2077710	2084630	You can click, you can see the percentages, different tags that are associated with that challenge.
2084630	2096210	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.
2096450	2103370	Those are all things that you can control left for and find within the list of challenges.
2104650	2108810	So, when you go to a specific challenge, this is the information that will land on it.
2108810	2113050	You'll see all of the hints that you can purchase for your particular challenge.
2113170	2120390	You can see the details, the description, how many flags it has, what are the sum of the value of flags.
2121990	2129330	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.
2129890	2133110	The framework does not host any files when you submit a challenge.
2133110	2136450	You're not giving it, oh, here's a, you know, two gigabyte PCAP.
2136450	2138430	You have to store that on your own.
2138430	2140090	That's your own thing.
2140090	2141810	Welcome to the life of a challenge developer.
2141810	2145450	How do you get your materials to the players?
2146610	2167110	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.
2167810	2169430	So, there's that.
2169750	2171830	It's not case insensitive.
2171830	2173850	There's no way to build regular expression.
2173850	2175210	Not that there's no way.
2175210	2179190	I chose not to build regular expressions or make it case insensitive.
2180010	2181950	That's just the game.
2181950	2185610	So, these are all the transactions.
2185610	2188730	I said that this is a transaction -oriented framework.
2188770	2192970	These are all the transactions associated with your specific team.
2193190	2205450	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.
2205850	2209650	Just a way for you to be able to account for that.
2210170	2216130	That same thing, except for public transactions, happens right here.
2216130	2220510	So, this is something you could maybe have on a different wall somewhere.
2220570	2222110	These are all public transactions.
2222110	2227970	So, any time someone sends a tip, there's that fun, you know, message that can show up.
2227970	2230150	If you go and look at them, you'll see that.
2230350	2232610	As you receive a tip, you will see the message.
2232610	2233950	They're not necessarily public.
2234870	2237090	So, that's fun, I guess.
2237430	2241270	There was an interesting XSS bug that I fixed in that, too.
2241270	2242790	So, hacker's gonna hack, man.
2242790	2243650	Thank you, guys.
2244910	2246470	This is what it looks like on the back end.
2246470	2249750	It's all written in Python, I said, again, that Discord bot.
2250050	2255870	But you can, you know, dump a list of users within the framework, their score, as well.
2256130	2258710	You can look at the BYOCTF stats.
2258770	2265070	So, how many solves were for a particular challenge that was a BYOC challenge?
2265370	2268310	What is the total payout for some of those challenges?
2268790	2276890	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.
2276890	2281710	You can do that, such that they can't view new challenges or submit new flags.
2283950	2285230	Things of that nature.
2288890	2291230	That's what the transactions look like on the back end.
2291230	2294190	You can see that there is unredacted flag content here.
2294190	2298950	So, don't run this on, like, the projector overhead or something like that.
2298950	2305250	So, that stuff is there for, I guess, debugging purposes originally, I think.
2305670	2306830	So, there's that.
2306830	2308010	That's what it looks like on the back end.
2309270	2312170	Um, let's build and pour some challenges.
2312170	2313250	You can really do this.
2313250	2317070	You go to scoreboard.byoctf.com forward slash creator.
2317070	2323670	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.
2323670	2326610	You're not having to write this TOML file by hand.
2326750	2331730	But this is what the structure for a simple single flag challenge could look like.
2331730	2333510	You have to have your author.
2333790	2343590	Back when it was strictly Discord based, that was your Discord user ID, not the old discriminator with the pound number.
2343630	2346810	This is the current, like, username for Discord.
2347390	2349190	The challenge, that's what people see.
2349190	2351770	The challenge description is the description of the challenge.
2351790	2353470	It's pretty obvious.
2353570	2354150	Tags.
2354150	2356730	These are the categories, if you will.
2356790	2359130	We don't have, like, categories.
2359130	2360110	They're all freeform.
2360110	2366090	We try to normalize them so you're not going to have a capital web and lowercase web set of categories.
2366090	2370590	Strip white space, lowercase, and it's kind of an upsert.
2370590	2376510	If the tag already exists, it gets added to it.
2376510	2378170	It's not creating a new thing.
2378170	2379870	If it doesn't exist, it gets added.
2380250	2382830	This UUID is a unique identifier.
2383410	2386090	Ideally , it's not going to have any duplicates.
2386810	2388010	So, there's that.
2388010	2390190	And this is an array of flags.
2390190	2392310	First off, the flag title.
2392310	2399690	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.
2399690	2403090	Or a specific level within my challenge.
2403090	2404970	So, this is flag one.
2404970	2408250	Collect information from user's desktop.
2408710	2412750	Flag value is how many points that flag is worth.
2412750	2419870	Flag is the actual thing that the user is supposed to paste or type into the magic flag hole to get their money.
2420950	2421830	Hints.
2422490	2431130	So, this is any information you want to be a user about your challenge, but charge them for it.
2431130	2432090	Here you go.
2432130	2434950	You do actually get a cut of the hints as well.
2434950	2436990	I believe it's that same 25%.
2436990	2440450	And they are doled out lowest cost first.
2440450	2441850	So, you need to order them.
2441850	2448030	So, the very first hint you would give to somebody should be the cheapest hint you would charge them.
2449610	2451250	And there's that.
2451570	2453390	So, that's a single flag challenge.
2453390	2459090	That right there, you copy and paste it as a toml file, commit it to the framework, and boom, there it is.
2459090	2461890	So, that's your single flag challenge.
2462770	2465670	Here's a single flag challenge with a dependency.
2465670	2474990	Here's all that same information, except there is a field that says depends on and it has a UUID of some existing challenge.
2474990	2479590	It has to exist within the framework before it will be accepted as a valid challenge.
2479850	2494670	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.
2494670	2497650	So, you can't commit them in reverse order.
2498670	2500750	Same concept, single flags.
2500750	2503950	If you want to do multiple flags, here's how you do that.
2503950	2506550	Flags, flags, flags, pretty straightforward.
2506710	2508650	Same thing is true for hints.
2510030	2513170	This is how you set up an externally validated challenge.
2513170	2524230	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.
2524230	2543590	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?
2543890	2544470	Yes.
2544470	2547250	Or is this the SHA-236 of the flag that you've submitted?
2547250	2549050	And you'll say yes or no.
2549250	2557990	And if we get the answer back from you, then, you know, we're, you know, in the money on that, I guess.
2557990	2559490	So, you've earned something.
2559890	2561570	It feels like an attack vector.
2561630	2562950	I don't think that it is.
2563330	2566090	You can look at it, but don't waste a whole lot of time on it.
2567270	2576330	So, those tools that I mentioned, uBuilding, B-Y-O-C-T-F, you know, Builder, this is going to walk you through.
2576330	2578750	So, you don't have to hand jam any of that toml.
2579030	2587230	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.
2587230	2598190	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.
2598230	2603870	And now that you have Google authentication built in, you don't really, you don't have to use your Discord ID, I guess.
2603870	2605190	I should update that.
2605190	2606190	But here we are.
2606190	2613350	You just, whatever your name is, your name within the framework, use that name for your author.
2613350	2615990	You can't commit a challenge that's not yours.
2615990	2624950	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.
2624950	2627370	And thus, they would get charged for it.
2627970	2629430	Anyway, there we are.
2630250	2639690	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.
2640270	2644090	The link to that will be in the slides.
2688630	2691170	So,
2702290	2742630	so golly gee, that sure was a cool video.
2743790	2744750	Awesome.
2745110	2749070	Links and resources, this is where you can go and find those things.
2749070	2751170	I think the link in the video is actually wrong.
2751170	2753690	I've dropped the validator subdomain.
2754650	2756670	And it's all just living on the scoreboard now.
2756670	2759470	They were separate apps at one point, but now it's all just one.
2760690	2764830	Yeah, so those things can get you started in writing CTF challenges.
2764990	2767670	Next, what makes a good CTF challenge?
2767770	2777790	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.
2777790	2784610	I think that this is an opportunity for you to think about someone else's learning experience.
2786330	2792490	What is it that you're expecting them to know versus like, know before they come to the event?
2792490	2794610	Or as they start your challenge?
2794710	2798310	Versus what are you wanting them to discover in solving your challenge, right?
2798310	2806010	All of that stuff, sort of thinking about that helps you understand how to value your challenge.
2806010	2808830	That's to say, is this a really hard challenge, thus high points?
2808830	2811590	Or is it an easy challenge, thus low points?
2812710	2823390	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.
2823390	2832030	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.
2832790	2836010	That is to say, well, it's not that it's easy for everybody.
2836010	2846090	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.
2846090	2853330	If it's objectively easy, again, flag one, two, three, or something, then everyone has that same opportunity.
2853710	2856350	So, it's like, ah, you weren't paying attention.
2856350	2858950	You missed this really, you know, gimme challenge.
2858950	2861190	Don't tell you it happens sometimes.
2861850	2865390	So, here's some examples, like binary to ASCII conversion.
2865390	2876510	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.
2876510	2879790	Oh, wow, what's, how do I translate from one to the other?
2879790	2880910	Oh, well, okay.
2881630	2882170	Excellent.
2882170	2884190	That might be a hundred point challenge for them.
2884190	2895170	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.
2895170	2898010	But, you know, you value that lowly.
2898190	2901270	Base 64, not everybody knows what that is.
2901570	2904550	You know, that's just something you get to know with experience.
2905310	2908870	You know, that, but notice that it's not 25 points, it's 50 points.
2910230	2927930	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.
2928010	2930670	And in that, you might have to learn something new.
2930670	2951090	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,
2951090	2952890	that might make it more difficult.
2952890	2954370	So, four points.
2955350	2957370	So, so on, so forth.
2957830	2959830	That's, you know, one way to look at it.
2959830	2967370	So, I like to make sure to express the distinction between complexity and complicated.
2967750	2969470	There's a difference between the two.
2969470	2989970	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,
2990150	2991210	a cool way to think about it.
2991210	2994770	Have them, shoot, I've messed up at this point.
2994950	2995610	Restart.
2995610	2996210	Edit.
2996350	2996970	Oh, edit.
2996970	2997950	I can edit this.
2997950	2998610	Nice.
2998610	2999810	Go back.
3001970	3004430	All right, edit at 40.
3005430	3007410	What time is this?
3007790	3008490	429.
3008490	3009370	Okay, cool.
3012130	3017290	So, I want to make a distinction between complexity and difficulty.
3017410	3027450	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.
3027490	3030930	Because that's, you know, again, script kitty stuff, right?
3030930	3035910	You can go and download an executable, point it at something, and hack it.
3035910	3039530	You've, ah, ah, there's not much learning going on there.
3040030	3044310	So, how could you change the equation, is the question I'm asking there.
3044310	3047330	So, any number of ways to do that.
3047330	3051190	You can make it really hard to do, but likely to happen.
3051910	3057930	And that would change the, you know, the other side of the equation, where it's no longer just low points, maybe medium points.
3057930	3073330	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.
3074790	3086650	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.
3087270	3090650	And that gives us a, you know, a system shell on that remote machine.
3090650	3094310	So, we can look at the administrator's desktop, flag.txt.
3094310	3103190	But we have a higher order objective in mind, and that is to compromise, you know, information within the organization.
3103190	3114850	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.
3115410	3130230	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.
3130230	3132370	So, they're going to lose their insurance, right?
3133310	3134110	Problematic.
3134110	3139010	That is an interesting thing that doesn't have anything to do with the technical exploit.
3139010	3145130	It has to do with understanding something within the mechanics of the game that is hosted at TRICARE.info.
3145130	3152430	So, now there's something you had to learn about this challenge from this challenge and exploit it.
3153650	3166450	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?
3166870	3171330	So, I think that's a cool way to architect challenges.
3173610	3175710	Again, these points are made up.
3175710	3178090	So, just use your best judgment.
3178370	3182010	So, this is the point we're asked for questions, comments, concerns.
3183210	3185770	Hearing none, we'll move on.
3185970	3187850	This is our final call to action.
3187850	3189210	Please contribute.
3189210	3202830	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.
3202850	3204990	That would be very useful.
3204990	3206670	I'm not good at that stuff.
3207530	3209930	Or your experiences with it.
3209930	3215970	Any ideas you have for various game types or something like that, please just participate.
3215970	3216830	That would be cool.
3218210	3220190	And that is it.
3220190	3223090	I would like to say there's a funny story here.
3223090	3226610	We had a couple of skits at Shell on the Border 2023.
3228050	3235110	And one of them was involving Hal from hackers.
3236810	3238770	So, yeah, that was fun.
3238770	3243810	And then this was also like how to register players and users and such the framework.
3243810	3246470	So, it kind of walked you through that stuff.
3247950	3250790	So, you won't play this, though.
3250790	3252370	Hey, Shell on the Border.
3252850	3253370	Yeah.
3253430	3254070	Boom.
3254070	3254370	All right.
3254370	3254710	There we go.
3254710	3255250	Boom.
3255590	3257210	Thank you, and hack the planet.
