Oh, I can start? Oh, sorry, I thought we were... All right, we can start. All right, thanks everyone for coming. I know there are a bazillion other things you could be doing here at DEF CON, and I appreciate you giving me your time. So, today I want to talk to you about the Power Glove. This guy is... how do you pronounce it? Diogenes, and he lived in a barrel. He's probably the most accurate of the Asian Greek philosophers. I love these old paintings because they're beautiful. There's so many of them. They're not AI-generated, and they don't have copyright. Like for these, for example, even if there's a gate, you won't see it in the bottom right, but the museum has released it on like a CC1 copyright, so you can just use it wherever you want. Today we're going to talk about this. Instead of using a clicker or a keyboard or whatever you want, we're going to use a Nintendo Power Glove. So I can do this, and go to the next slide. That's it. If you want to leave now, you're good to go. But in general, I want people to be able to see what I'm going to talk about in case they want to go and be somewhere else. I don't want to get to the end and say, that guy just wasted my time or whatever. So I'm going to talk about a bunch of these, why I'm doing this, what is a Power Glove, how it works, what other people have done, because it's pretty popular, what I did to do the dev stuff, and in the end, if this still works, we're going to have a demo. If you were in the Bug Bounty talk that I had yesterday, this is a free-for-all CTF. You will know when someone captures the flag. If no one captures the flag, we'll talk about it in the end, about why. So my name is Parsia, I work at Microsoft. This is my third DEF CON. Originally, my first ever talk was DEF CON 2018. 2020, I did recording. And this year, I did my third, which was yesterday, and this is my fourth talk. So in my second time at DEF CON, it's been seven years, or as something I would like to say, seven years of famine. 2016, I bought this Power Glove for a Hacker Man cosplay from the movie Kong Fury. And I won 50 bucks, which is the first and last time I've actually bought I'm sorry, won anything in a corporate environment, so that was good. Does anyone recognize this guy? He is from a sitcom called Third Rock from the Sun. It's one of my favorite ones. So this is independent research, not affiliated with my employer or yours or anyone else's. It's just something that I did that I think was cool. So why did I want to do this? In 20, not 2013, but a couple of years ago, I watched a talk by Haroon Mir. Haroon is a South African hacker and one of the people that I really, really like. Not only he is technically great, but he's also a kind human being. So he had this talk about why do we have so many enforced conferences, which is ironic because we are already at DEF CON. And they let everyone speak at DEF CON these days, like me. And he was like, we're doing entertainment, so people want to be entertained, so we are doing all of this. And in order to be remorable, I learned all the wrong lessons from Haroon. Fortunately for him and me, he's not here, so he left after Black Hat. So you're not going to see this. But in my opinion, if you want your presentation to be memorable, you need to have at least one of these three, possibly all three. So first, you really have to be technically advanced, so technically advanced that the audience thinks it's magic. Second, you need to have charisma or risk. And as you can see, I don't have any. And the third, you have to do these hijinks with this, so people can remember, oh, I remember that guy. He has a power glove. So I remember I joined a company, and I was going around, it was a game launch, and I was going around the game launch with this. And then people were like, who is that guy with a power glove? A talk that I look up to very idyllically that had all three was the late Barnaby Jacks talk here in Vegas at Black Hat. So 2013, he put a bunch of ATMs up there. And it's so advanced because people don't know how ATMs work. They are just money machines. So he started popping bills out of it, and they even coined a term called jackpotting for him. So he's technically advanced, he has charisma, and then he's putting an ATM on it, and this money is coming out of it. So that is my ideal thing that I wanted to do. But the Nintendo Power Glove is something super old. It was released in 1989. If you are older than this, and that includes me, be sure to stretch and think about that shingles vaccine in a little bit. I got shingles at 29, so I don't have to worry about that, but I don't know. It was released at around like $100, which is $200 current inflation inflated, but we all know that you could have probably bought a house, right? By then, it wasn't actually created by Nintendo. So I was talking to someone today and they told me that Nintendo wanted to get into the US market, and I hadn't heard it before, but they didn't want to do toy, they didn't want to do video games, because video games are bad and for kids. So they wanted to do toys. So as a result, they had this as a toy. So it wasn't created by Nintendo, it was designed by a different company, and even produced by a different company. Like in Japan, it's called Pax Famicom Glove. Famicom is the name of NES in Japan. In the US, it was created by... I used to pronounce it Mattel, but a friend of mine, Amber, said, no, it's Motel. So I'll go with this. So as a result, the Motel is a company that makes Barbie. As a result, well, this is a Barbie, I guess. So the idea is that Plato said a man is a featherless bipedal, and Diogenes grabbed a chicken, plucked all the feathers, and said, behold, a man. And the guy in the barrel, of course, did it. The original joke was that I am a Barbie. And then my wife looked at me and said, seriously, listen to yourself. As you can see, there's stark, like, difference. All I can say is, like, to borrow from the TV show, thank God that love is blind, habibi. But, yeah. So it became, it was actually very, very popular. It had really cool ads. We saw one of the ads. And it was also because of this movie called The Wizard. So you see a young Fritz Savage traveling across the country to compete in a video game tournament. And it is a walking, talking ad for Nintendo. Now, he has a power glove on his left hand, which is a lie, because I never made a left-handed version of it. It's just right-handed. So at some point, they see Billy. Billy is the main bad guy. And Billy is playing, takes out the power glove out of a suitcase with, like, huge plum. And then starts playing Red Racer. Power glove would have different mods. So for Red Racer, you could put a mod and hold it like a wheel. And you could, like, do this. For, like, Mike Tyson's punch up, you could do, like, punch. And you could do, like, uppercut. So it looks very, very cool. But in the end, he says the iconic quote, like, I love the power glove. It is so bad. And it is. Don't get me wrong. If you want to make it work, it won't work. Today, I met someone. And he said, does the power glove work? And I said, yes. And he said, well, I had one as a kid. And it barely worked. And I said, OK, let me rephrase that. It's functional. So the way it works is, you have these sensors you put around your TV. And I'm, like, putting this thing. And we saw it, like, a couple of slides ago. You can see the sensors around the TV that Billy's playing. And then these are essentially microphones. They're glorified microphones. And it's the thing with the hardware people. The good thing, the hardware hacking people are not here. I mean, a couple of them are here. But we can do that. They are really... they name things differently. Like, so these are not microphones. These are sensors. So you put them around your TV. And there's this junction box at the bottom. Oops. Did I go to the next slide? No. And this junction box, that DB9 connector goes into there. There's Power Glove. And that 7-pin connector is your Nintendo connector. It goes to the NES. And then now it works. You sit in front of it. Sometimes it does that. There we go. And this, you can see, it is from here, it starts sending out sound waves. So when I talk to people here at DEF CON or, like, Blue Hats or anywhere else, they were, like, oh, is this, like, a gyrometer or, like, accelerometer? No, it's just sound waves. They don't have any of that. So if, unfortunately, you can't hear it. But if you listen, you can hear this very rapid tick, tick, tick, tick sound of, like, hypersonic sounds going out. And you sit in front of it. And then the sound's going. And you can use the Doppler effect and the sensors. You can do, like, up and down, left and right, and forward and backward. But it doesn't really work great. As you can see. So Ben Heck, in 2016, like, did a teardown. He tried to figure out what can we do to make it a mouse. So if you put a... if you connect it to an NES with a Power Glove-enabled game, it would start, like, working the Power Glove mode. And it would start sending, like, four bytes, which is X, Y, Z, and then the buttons that you have here. So you can also do, like, A. And you can also do B. Unfortunately for me, these sensors do not work. I bought a second one, and the sensors on that didn't work. So maybe after all these years, the sensors have stopped working. So we tried to make it a mouse. And that is... and then tried to draw in MS Paint, and that's what it did. So you can't really... it doesn't really work. The other guy, Dr. Ben... unfortunately, it didn't release any code. Dr. Benjamin Blondo did a similar thing to what I did. But instead of a Bluetooth keyboard, he created a joystick. A wired joystick. Unfortunately for me, the code that he released also didn't work. For some reason, I don't know why, but I had to redo it. But he gave me this great information, that pinout for the DB9 or DE9 pin, whatever you want to call it. So you have... the green ones are supposedly wiggles for the sensors. Again, for mine, it doesn't work, so I just gave up. And then you have five volts. It works... all the electronic works on five volts. And a ground and latch and a bunch of other things. So now I have the pinout. I can start reading what's coming out. I also found this other thing. This is a connector from RetroUSB. So I bought like ten of these, but none of them except this worked with a power glove. If you connect this to the power glove, not this, but the sensors and junction box, it will act as a USB joystick on Windows, which has great backwash compatibility. And I don't say this because I work there, but it is great. I love it for gaming. So now I have... I know how to pinout. I need to read those pinouts. The first thing I need to figure out is like, what can I do? And then my idea was that I want to have a Bluetooth keyboard. And in this day and age, if you want to have a microcontroller with a Bluetooth, you do an ESP32. So ESP32, this is a dev board. ESP32 is that chip. It's called a system on a chip. It has Bluetooth, Wi-Fi, and a kind of beefy CPU. The cheapest one I could find had like 140 megahertz CPU, like 8 megabytes of flash, which is really great. And then you can also have expansion boards that exposes more pins and gives you like more power supply, like a barrel jack and USB-C and all that. But there's a huge problem. These are 3.3 pins. And internally, the CPUs actually work lower, like 1.8 volts. And I would expect that the voltages for the boards actually... dev boards actually drop in the future because they're more energy efficient and just better. Now, what happens when you send a 5-volt signal to a 3.3 pin? If you are unlucky, nothing happens. If you're unlucky, the pin dies. But if you're very unlucky, the CPU dies and then like the magic smoke comes out. And I killed a bunch of those ones on the left. Okay, so what now we need to do? We need to find a board that has Bluetooth, what we want, and also 5-volt resistance. And I found this thing. This is an Arduino Uno R4 Wi-Fi. And it's a freak of nature. Because you have that ESP32 there. And it also has its own CPU, which is an ARM Cortex 41 megahertz something, something. So you talk to the ARM Cortex and that talks to the ESP32 to set up Bluetooth and whatever. But unfortunately, there were like no libraries, like nothing. They just released it and there was nothing else. But the pins are 24-volt resistance, so that was good. But there was nothing for me to do. But someone had actually created something that you could do a... short a couple of pins and then flash the firmware and just talk to the ESP32 directly, which is kind of like an oxymoron because you already have a CPU there. And I tried and it didn't work. And I was like, okay, what can I do? So look at something else. I found this other thing called a level shifter, this red thing on the left. So it's a very interesting piece of tech. Now, we are dealing with signals. It's not like constant power. And signals are, in this case, we're looking at the digital signals. So a signal is high if it's over a certain amount of voltage for a certain amount of time. But other than that, it's just a signal. So you supply the five, the high and low, and the ground. And then every signal from one side gets converted to the other one, which is really great. Now, that's like a bunch of pins that I wanted to solder and I don't know how to solder. And then I was... Blue Hat, a team member of mine, was running the soldering station. So I asked him to solder these for me. And then I guilt-tripped him into soldering these for him. And that guy is Reid. I asked for his permission to ask for his name. So everyone say, thank you, Reid. Thank you. And then tomorrow, we'll start working on counting. So the other thing that this is, the other one I found, this is from TIDA Electronics. So TIDA is a Taiwanese shop. It is... I used to make fighting game sticks, like custom fighting game sticks, which are basically like a wooden box with an Xbox controller or something. With a bunch of wires going to the buttons. And they were very popular in the guitar pedal and custom fighting game community. So I found these for like $7 before tariffs. These are 5 volt resistance. And they also have like a battery slot at the bottom that you can put an 18650 battery on it. And that was great. So I started using those. Now an 18650 battery, we all know what it is. It's 18 millimeters diameter, 65 millimeters length. And the zero in the end means it's round. You should not over discharge it. You should not overcharge it. And then you can have like these charger modules, a TP456 to do that. And that board has all of those. So I started using the 5 volt pin on that for this. But I had a bigger problem. Because if you are on battery, that 5 volt pin, the red line at the bottom, is connected to that micro USB. So it only gives you like less than a volt. So you can't rely on the battery. You can do another thing that at the corner of the bottom left corner, the pin is 3.3. So you can grab a step-up module and then convert 3.3 to 5. And then you're good to go. But then I said, okay, maybe I should do something else. So I find these battery packs. They give you like whatever you want, a micro USB. And then you connect it and that. And now you have like a 5 volt from there. From the 5 volt. So right now I'm connected to the computer. I have the battery pack if you want to. But if you want to do a step-up module with like just one battery. That the power consumption is very, very minimal. Especially when you're not just, you know, running it. I mean that the sounds are working, but other than that. Like I've made it run overnight with one 18650 of like 23 mega amp hour. I'm sorry, milliamp hour, I wish. Mega, milliamp hour. It was running overnight and was still working. All right. So now we have something that doesn't die. And then now we need to start like development. And I was very, I've never, never done this before. So it was very, very much easier than I was thinking. You can use Arduino IDE, platform IO that I never use. Or EPA, ESP, IDF. The great thing about Suppressive, the company that makes this, these chips. And they're making these by the hundreds of millions. And they're made by TSMC. Is that they release a lot of code that's called unlicensed. As in like, it is good for, it has a license and it's called unlicensed. You can use it for whatever you want. There is, they're not a software company. They can give you this code. You can start modifying this code and they can do whatever you want. But they don't have a lot of answers. All right, so we know how to read. We know how to use a controller to read. How do we do that? And this is essentially an NES gamepad, right? So in order to read an NES gamepad, the protocol is very well documented. What we do is we had a latch. So we pulse the latch. Which is another one of the things that hardware people say instead of putting a signal up. They also call like screws, fasteners, motors or actuators and so on. You pulse the latch and then you read one bit from the data pin. If the button is pressed, the pin is zero. If not, it's one. And the first button is the A. And then you pulse the clock seven more times and then read data after after. And then you read A, B, start, select. And then like, you know, the arrow keys and then that's it. One thing that I almost burned my power glove with is that NES has a 1.79 megahertz CPU. So the power glove is not expecting rapid polling. I read somewhere, I'm not sure if it's true, that it only expects like 20 reads a second. Like 20 hertz. But I felt a little bit of experimentation. I almost burned it because my CPU on the ESP32 is 140. So I was just doing it very quickly. So I had to like add some delay in between the reading. Well, it's not really that bad. So it almost died, but it didn't. So you do a bit of delay and now you have read one byte, which gives you all the buttons that you have. And then now we have a button. The next thing I wanted to do, I want to create a Bluetooth mouse. And when you create a Bluetooth mouse, there are libraries out there that create one for you. The only thing you need to supply is, okay, where am I? And you supply four bytes. So you supply the buttons, which goes by bits. First bit is one, right-click, left-click, and then so on. And then you do the x. So x is going to positive, x is going to be right here. So if you're going up, you're going minus, minus y, and so on. And then you will also supply a wheel, the wheel of the mouse, which is zero in what I'm doing. Another thing you could do is that I did, it was very slow. So I had to add what's called a step, which is your mouse sensitivity, your mouse sensitivity on your machine. Everything is multiplied by that, so it's going faster. And I created a mouse, and it's the world's clunkiest etch-a-sketch. So I'm using the arrow keys as a mouse, and you have to hold A for right-click. And as you can do this, it's very, very well, very clunky, but better than nothing. Okay, so we have a mouse. Next thing I wanted to do is I wanted to create a keyboard. And when you are using a keyboard, you would assume that you're going to be sending ASCII hex code to the Bluetooth as it has a HID. But it's not. So you send eight bytes, but only the first and third, zero and two, are being used. The first one is the actual key, and the number three, I'm sorry, number two is the modifier. I'm sorry, the first one is the modifier, number two is the actual key. So instead of sending the ASCII hex code, for A you send four, and then you O up to Z. If you want to do capital A, you do exactly as you were doing when you were typing. You do shift as modifier and an A, and that the keyboard thinks, oh yeah, I've gotten a capital A for you. So I guess maybe that's like that. And then, so I created these mappings and said, okay, if I'm reading, if I see right being selected, I go right and left and up and down. And you can also add the media keys if you want, like you don't want to pop calc or so on and so forth. This is essentially what it does. And then at the end, what we do is you create a Bluetooth keyboard, you grab it by, I've found a library that basically does most of it for you, which is really fun. And then there was, and then you read whatever is coming from the buttons. Now there was this huge problem, I guess this is dying because this is faulty electronics. Yesterday when I called it a CTF at the Bug Bounty Village, it suddenly started going all the way to the left. And I thought maybe someone has messed with it. But it seems like just the electronics were dying. So last night I connected it to my machine and it was just popping calcs over and over again, which is the select key for me. So I had to add some code that, okay, if nothing is pressed, which everything is one, ignore it. If everything is pressed, which sometimes it does, also ignore it because I'm not going to be pressing all the keys together. And everything other than that, if I've created one of the arrow keys, do that mapping. If I've created one of the other one's keys, do that mapping. Another problem is I didn't put a delay here. So if I would write, it would just immediately go up until to the next. So that was pretty much it. And then I did it for my wife and he said, well, where's the demo? And I looked at her and said, yes, you have been looking at the demo. And then she all just rolled her eyes. So if you want some unsolicited marriage advice, she will let you make the joke if you're persistent. But yeah, I'm very lucky that I'm being able to use this as the demo thing. So I don't have to have a demo in the end. But in order for it to happen, I did a similar, like a demo, a quick demo at the hotel last night. So it was just, you know, you can go to the next slide, previous slide. And then if you press select, it should be able to pop cap for you. It's really fun. All right, so what did we learn here today? We can use the power glove as a gimmick. And that is great. And next year, I better see people putting using some janky shirts as a presentation thought. It would be great if you go into your boardroom and then instead of like typing on a keyboard like a nerd, you press something and the shirt pops up. The boardroom will remember you as the guy with the power glove or whatever it is. That popped the show. And thank you very much for your time and have a great rest of the call.