DCSG1 - The DEF CON Singapore Badge Presentation - Michael Schloh, Joyce Ng, Dani Weidman
Transcript
Machine-transcribed by YouTube. Expect errors in names, commands and version numbers.
Morning, DEF CON Singapore. Please help me welcome welcoming Michael Slow and the badge team to the DEF CON stage.
They will be speaking about the introduction version of hacking the very first DEF CON Singapore badge. In an hour, there will be the hardcore version next. So, welcome.
>> [applause] >> Okay, guys. Hello. Uh my name is Michael. Michael and I'm here to introduce the DEF CON Singapore 1
badge design team. And it is in place
number one, it's Dennis from uh RRG Group, right? Singapore Dennis. And we have Danny, who is responsible for the the laser tag application that we're going to demonstrate later. And we have as well Arjan, okay? So, there's other people involved um who are not on the stage um and we had a lot of help. We got really lucky with a really strong team. Um but this is the the DEF CON Singapore 1 badge design team. And I hope that you meet us in the in the in the hallways and get to know us so that we can help you and and um and answer questions.
That's the purpose that we're here for. We're here now. Okay, so space bar, right? Uh all right. So, that's um uh Joyce is is is should be coming and
um possibly will be here for the next uh part of this. We have two parts. One is a summary, kind of a beginning uh introduction to the features and to the project. And the second part is after um
the uh the the the keynote and that will be the hardcore implementation details design. I think that's the more valuable part. So, you need to come back in 1 hour. You coming back in an hour? Yeah? Okay, good. Um so, let's see what we have some critical information. This involves uh safety and as well as uh just the fun and enjoyment of using your device. Um
so, your your device comes charged, but it's partially charged. It will most likely uh deplete its battery before you're ready for that, like at about noon or in the afternoon. We do apologize. We didn't have time to fully charge the 100% all of the badges. So, in the evening, as you go to the hotel, the first thing you do, you plug your your battery in. It's a USB type-C connector. Charge the badge overnight so that you're ready when uh the next day um when you come to the event the next day. Quick tip about this, instead of coming to the event and then thinking, "Where is my badge? It's in the hotel."
You hang this badge from your hotel door, right? So, that you don't forget it as you leave. This happens to everybody. Quick hacker tip about DEF CON. Um when your battery is fully charged, it says 8 hours. It's more like 10 or 12 hours. So, um but that's very conservative. It's enough for 1 day's event. Um you must charge it. I'm going to repeat, charge it every day so that you have the uh the the wonder of exploration. You can be uh zapped with infrared and and participate in the games. All right? Um there are Can somebody give me a box, please? Do you have one? There are boxes available.
And they look like this. It's very decorative, but it's important as well for the security and safety. Um let me show you how that works. This is the critical information because there is a correct way on how to store your badge long-term or transport your badge in a bus, in a boat, in an airplane, in a car. And the thing that you want to do is you turn it off in the back. That's the the switch in the back. You disconnect the lanyard like this. You put you put it inside the box.
Put the lid on the box. And it's ready for transportation, okay? The reason the box is important is so that if you put your if you if you have keys and other metal things that go on to the badge, it's protected. A badge that is unprotected, the the metal things will short things on on the badge. So, it's important to use your boxes if you can. There's one box for every person. If you have not received one yet, try to find them. Where would they be? Uh by registration, I believe. And can you take that out again and give it back to me? So, and that's um the critical information. Um if you're charging the the device with your USB-C connector, a totally standard connector, you want to do that in a well-ventilated area where you can see it if there's any problem, right? Not a good idea to to charge on a airplane. Don't charge your phone. These These uh These tips are good for many different devices. This is not a special badge. It's basically anything that's has unprotected circuits where uh so, car keys can bridge the circuits and make shorts.
Uh Okay, let's go to the next. So, um this was a very difficult project. We began with a proposal to uh basically it was my intention to avoid a wonderful event, DEF CON uh Singapore, the inaugural event without an electronic badge. It would have been easier, and we're very lucky to have supportive bosses. All of the management of DEF CON agreed that we should have a DEF CON Singapore with the highest level of excellence. What hackers love, and that means electronics, hacker badges, right? So, instead of paper, we have a a really excellent um I have my badge now. We have a really excellent badge and that was the purpose from the very beginning. It took a couple months to really get approval and start working.
So in those in that time beginning in February until now, we had almost two months of design development, about one week of testing. There was three prototypes that were meaningful. I only received two and then we had to start production immediately. And until today we're still waiting for some things like batteries to arrive. So this was really a mission impossible. We had 20 days to deliver as the slide says. So we'd like to thank our friends at Espressif who had the idea instead of having a blinky badge that's just a simple, you know, a really simple badge. We're going to do something incredibly sophisticated using a risk five ISA instruction set architecture. It has a lot of features like secure boot and different partitions on board flash. I'm not going to try to to to describe all of the features there are several thousands. So thank you Espressif for with for the proposal for the idea to provide us with the chips, the microcontrollers that are on your badge right now. That was donated by Espressif. Thank you very much.
So and now over to Dennis. Right? >> So I'm going to talk about the manufacturing. So I'm going to do it based on timeline like this of the 50 days, right? So we're going to go with the timeline. So first April, we still have to confirm the hardware. So we were tasked to do it. On second April, the hardware is still pending. So only on 6th April we confirm that, you know, the final hardware is ready. So we can get some photos to take a look. So these are some of the minor things. You see that, you know, Michael look at it and say there's something in the board that's wrong. On 1st April, we still have to change it.
We're not going to finalize it. We're not going to freeze the hardware. Okay? So, you can see on 2nd April we did a UV print. It looks a little different because you can see on our speakers now on the badge it's a little different the hot the the UV print. So, that was not confirmed on the 2nd April. And 6th April on 2nd April we submitted the bots, the raw bots you can see here. So, you can see that there's no UV print on it. Okay? So, yeah, some some guys want to take photos of it. Okay. Yep. So, the next timeline from 6th to 7th April the lanyard design was submitted by Michael. Then we had another late order coming in at 9th April. Okay, so it was a mayhem like 630 badges was added on 9th April. And JLC, most of the hardware people know like JLC PCB they really helped us a lot cuz the the CEO was in the group as well with us. Said that okay, we we'll do it, you know, but they screwed up a little, but we we kind of figured it out even until yesterday 143 badges just arrived in Singapore. Okay?
So, you can see the lanyard there was the the order sent in to the lanyard
manufacturer. As of 11th April the first batch was UV print with SMT done. So, what's SMT? It's like putting the chips on the raw bots. Okay? This is the raw bots. So, what you can see on your badge now you see all the components. That's the SMT process or you call it the PCBA. Okay? And because the original battery suppliers didn't want to take up the late order, we have to find another one on 13th April which is like 15 days from today prior to today, right? So, 15th April we have the you
can see all the designs, the finalized designs on 11th April. Okay? Yeah, on 18th April itself last weekend I think or last last weekend the PCBA UV print and battery was assembled. Okay, the final touches to the badges was done. The edges have to be grind. You can see on your badges. Okay, most on the left and right you see we grind the edges. So, you can see the panels over here. We're going to rip it off. There will be some edging over it. We grind it. Okay? And the parcels were shipped from Shenzhen to Singapore on 20th of April. So, that was 8 days before today. Okay?
You can see the actual like most of you have the human badges. So, this is like the actual photo of it. The artwork, the UV print. Okay? And this is the parcels. Just to make sure like you know how it's getting transported from one end to the other. The one on the left, you can see on your left here was in Shenzhen. It was we shipped it on 20th of April and it was here in the warehouse on 22nd April. So, everything was pieced together perfectly, but it was a mayhem all together, but we got it done. That's why I say we put in the title called Mission Impossible. Okay?
So, I think I'm on the last slide. Yeah. So, 23rd April 2,677 badges arrived in Singapore. We were the latest firmware. As of yesterday, we still have to flash the firmware until 9:00 p.m. Just to make sure everyone has the latest firmware. Okay? And yesterday, 143 of them arrived. So, I'm going to pass on to Danny. She's going to talk about the laser tag and the color flooding. >> Good job. Thank you. >> Thank you.
>> Thank you, Dennis. Um now I'll give an overview of some of the specific things we've designed um that specifically take advantage of our situation here at DEF CON. That means taking advantage of having many tech-minded folks all together at once as well as being able to set up our own custom infrastructure in the exhibit hall space. We wanted to also make sure that there is a good social aspect since a lot of people come to DEF CON to meet interesting people and strike up conversations. But we also like the idea of having an element of competition. So, how could we do this? Well, we implemented a a of interesting features.
For one, we have a laser tag game built into the badge. To play, you just point your badge at the person you want to tag and press the right most most button to send a zap. So, if we look at the slide here, um the right most button is flashing green. That's assuming you're looking straight at the badge, but when you're pointing it away from you, it'll be the button on your left. Now, here's what it looks like when you push the button. There's a light animation that shows up. The LEDs light up from the bottom in your team color. So, in this example, that player is cyan.
Um after you send a zap, your opponent's badge will light up and you'll earn a point for your team. Now, you may have noticed the asterisk next to laser on the slide. That's because we don't actually use real lasers for safety and cost. The badge just has an infrared LED with a 25° beam angle so that it won't hurt anybody's eyes. A side effect is that you can register hits even if not pointing directly at the opponent, and you can tag multiple opponents in one hit. Yeah. The laser tag game has people split into teams. There are five team colors listed over there. When your badge turns on, it shows the animation in one of those colors, and then that's the color that's shown when you do a zap.
The overall game scores are aggregated by team. Um some notes on scoring. We didn't want you to be able to just stand in one place, let's say at the front of a talk session, and keep pressing the fire button quickly for infinite points. So, we made it an extra rule. Basically, you can only score off of a given player one time in 15 minutes. So, you have [snorts] to walk around to find new people to tag. So, if I hit Michael now, I'll have to wait 15 minutes before I can hit him again, but I can still tag Arjun or Dennis or anyone else in that time. I just have to wait 15 minutes before tagging the same person again.
If I try to, their badge will flash three times red telling me to go away and try again later. And of course, you can't get points for tagging members of the same team.
Since we're on the topic of scoring, um how can you see the scores? Well, we have an online scoreboard that's going to be updated roughly live over the course of the event. So, if you want to take a picture of that QR code or enter that link, um that would be great. I uh I've set this up on a leaderboard page, which may or may not crash right about now. Um I'm just going to refresh it on my phone cuz I'm curious. Loading. Okay, it loaded. Um that's great. Not enough people clearly went to the the URL, or it'd be gone. Um that page also has a tutorial. Um I know I ran through things quickly here, but the tutorial shows step-by-step how to play and uh animations, what it looks like when you fire, when you get hit, etc.
Um now, avid asterisk noticers will see that on the last slide. Um there are a couple asterisks next to live. Um So, let's get into what that actually means. Um just because this is actually where about 80% of the actual laser tag project effort work that was into the scoring component, so I'll spend a couple minutes on that. The trivial solution for live scoring would have been to have all the badges connect to the internet individually and send a message to the server each time they send a zap or get hit. Um we knew that wasn't going to be possible here, though. Getting 2,000 badges connected to the convention center Wi-Fi with a captive portal logins and other limitations would just not have been reliable.
So, instead, we decided to set up our own network of base stations around the exhibit hall. With base stations, the next most trivial solution would have been to have each badge immediately report its hits to the base station. Um but even with the 15 or so dedicated base stations, we're not confident that each badge would always be in range of one. Um and what about hits outside the hall? Should those count, too? That's right. We came up with
a new system. So, basically, every badge keeps track of how many times it's been hit by which other players' teams, along
with some additional info. Um and then every 30 seconds or so, the badge tries to transmit that record to whatever base stations happen to be nearby. That means we lose out on truly live scoring, but it makes the scoreboard should be relatively accurate over a longer time scale, and it lets us count hits from outside the exhibit hall, as long as that player reenters base station range at some point.
The scoring packets, by the way, are sent over ESP-Now, which let you use the Wi-Fi radio built into an ESP32 to make simple send and forget broadcast. And we've added periodic channel and data rate hopping to have the highest success rate in an unknown RF environment. If you want, you can try to reverse engineer the ESP-Now um packet format. It's definitely possible, and I'll be curious to see if anyone does it.
With the laser tag game, we also wanted to make it so other people could develop their own hardware that can tag and be tagged by the official Def Con Singapore badge. So, for that reason, it uses the open laser standard, which you can find on GitHub. This standard defines the specific infrared packet format used to send laser tag hits, as well as some other commands. It's based on a slightly modified version of the NEC protocol, just for maximal ease of development, and it has library support in Arduino and MicroPython. Um so, uh we're actually running a badge-related workshop in the cryptocurrency village today at 2:00 p.m. So, if you want to swing by, um definitely, you can ask us questions. We can help you get set up if you want to make your own custom hardware that can interact with these.
And then, as a last thing, um we've implemented not just the laser tag parts of Open Laser, but also the color change temporary and color change permanent packets. So, uh, we can do fancy things with extra hardware, like what I'm about to do. Um, I've a high-power IR transmitter, and I'm going to try to turn everybody's badge a color right now. So, we'll see if this works.
I think I think I got most people in the hall, so. How's that good?
Now, someone told me this talk should go into technical specifics, so, um, I'll just call out some things real quick for time. Um, for one thing, getting the base stations connected to the internet was really hard. Um, even though there are only 18 of them, the captive portal in the NBS Wi-Fi was a real pain, and we had to try things with MAC address spoofing and travel routers to get it to actually work. Um, plus, even though we, uh, track hits by unique ID for 15 minutes to prevent duplicate tags, we don't actually have the ability to transmit all of that data to the server. So, that's why, um, we only have the team-level scoreboard.
And yeah, note on the scoreboard, you can filter by whether or not you want to include hits from the third-party Open Laser devices. So, if you're worried about somebody building a super high-power, you know, transmitter and and dominating the scoreboard, you can filter that out. Yeah. Then the other, um, DEF CON specific feature I've worked on is, um, something we're calling color flooding. As you walk around the convention center, you may notice your badge turning certain colors as you near certain villages. We've actually piggybacked off of the laser tag base stations to make them also act as Bluetooth Low Energy beacons that command badges to get set to a certain color.
So, for example, if you enter the cryptocurrency village, where we'll be later, um, your badge will turn like a pulsing red animation. Versus if you go out to the chill out lounge area, your badge will turn indigo. And we have so far about seven or eight of these different color areas set up, and by the end of the day we'll have 15 or so. So, you'll just notice as you walk around the exhibit hall, your badge and the other badges of people around you should should show a similar animation. But yeah, since we're right at the beginning of the convention, it's hard to know exactly what the real world performance of the BLE range will be when the hall's covered with many human bodies and their associated electronic devices.
Um plus we're using uh BLE signals, so you can't really define direct hard boundaries between each area. Um but we're really interested to see how that goes. Um now speaking of LED animations, I will pass it over to Arjun.
>> [applause]
>> Uh I wrote the LED animation for the badge. So, the badge has 16 RGB LEDs
around the perimeter of the PCB. We drive them around 80 frames per second. Way faster than your eyes can see.
Which is what makes the uh animations look really smooth with no flicker. The library powering all of this is called libneon. It handles everything. The background animations like rainbow, gre- gradient, breathing effects, but also the game driven stuff. Uh when you get it in laser tag, that flash is libneon. When you walk into your village and your uh badge changes the color from the BLE beacon, also libneon. You can control it yourself right now. Button one is to decrease the brightness, button two is to increase the brightness. And you can change the animation by pressing the third button. And the fourth button is um
to for the laser tag. You can uh this is where you can score points. Uh if you want to write your own animation, you can find us at the cryptocurrency village and get started. Under the hood, we are also using hardware features like RMT to keep the timing precise and to avoid flicker. Back to Michael. >> Good job, Arjun. Arjun, he was responsible for the animations, the color uh s- uh part of the color flood uh and the lib neon. That was the one thing that we absolutely needed and he did a great job creating a component in the uh expressive component registry. It was wonderful.
Um right. So, there's a couple things to wrap up with. We'll we'll have plenty of time for questions, I believe. And I just want to um remind that there is on the back, it may be hard to to to to uh make a photo of this. There are two QR codes. They looks like they're kind of covered with the battery. One is simply the event itself, but the other should lead us, I hope, if it's correctly encoded, um to the badge area of the media.defcon.org
server, which uh Jeff so kindly for us prepared so that we could put files there. There is a schematics, a lot of different things. There are no layout files just yet because we don't want to uh destroy the fun of exploring challenges. There's a lot of secret messages hidden inside and a wonderful puzzle puzzle The puzzle was made by our friend Colin O'Flynn from New AE Tech in
Canada, one of the most popular hackers in the world. They make the Chip Whisperer. So, the the puzzle of the year for Singapore, thank you, Colin O'Flynn and our friends at New AE Tech. And I can guarantee that you will not solve it. I really mean that. Every single The best experts in this room, you and you and you as well. You will not solve this. You want some tips? Come to us in the cryptocurrency village. If other villages want to participate, come to us. We spread the the tips around. So, we don't want to be the the bottleneck. And you can get the information about documents and things like that by going online media.defcon.org.
Make Make gameplay fun like Arjun was talking about so that you can be a target and people can zap you and you can zap others. There is information on how to learn about some of the applications. It's close to the the front of the of the guide. So, if you have a moment and take a break, have a coffee, and read about the badge here. One of the things you can do that the that the guide does not explain is everything okay? Okay. Is that the infrared receiver is at the top. So, it will not help you to trick and cheat. But if you do cover the receiver, then nobody can can can zap you. Don't do that. That would be mean.
You have to enable the gameplay. Okay. So, we're just about at the end of the first half of the presentation. We want to do a sneak preview. Please change the switch the video to what is on the camera now. Where am I? If you can So, this will be some some information that's coming in a half hour. And thanks that Joyce is coming here as well. Joyce was our MicroPython, the chip flashing boss.
She did the the Wi-Fi manager and a number of extremely important and advanced things. She will be the star of the second half. Now, we want to open this up for questions because there's a lot of complexities involved. Not everything is very clear. We tried to document. Are there any questions for us? I I we have 5 minutes for questions. No time for questions. 2 minutes for we have time for two questions. Who has a question? So, question. Is there anything under the battery? Is the question. Next question.
Any questions? Don't ask me if if there's something under the battery. Okay, we're finished. I don't see other questions. Um information most of us at the cryptocurrency village can distribute information if you want more and thank you very much for coming to the summary half of the crypto of the of the badge of the Def Con Singapore badge.
Okay.





