With that said, it is now my pleasure to introduce to you the first speaker of the day. It's going to be Ghost. Ghost. And he'll talk about microcontrollers. And Michael's going for, oh, yes, for fun and profit. Without much ado, Ghost, everyone. Give me a second to get everything on. So just a couple of logistical notes. The talk is slated for about a half hour every time I've timed it. So that's probably where we're going to end up today. And, yeah. So my hope with this talk is that I'm not introducing a zero-day, but I'm showing you guys something that I thought was cool and fun. And hopefully inspire you guys to maybe pick some of these boards up and come up with something even more awesome. So let's get the technical details out of the way. Who is the first speaker of the day? Who is this crazy person sitting up here? This is me. I'm an application security engineer for a company called Open Door in San Francisco. I started out as a front-end full-stack developer. So those of you who are full-stack front-end developers, engineers, and thinking about getting into security, it's an awesome way to go about doing it. Your development skills are very much in need. And so I highly recommend it. I'm very passionate about information security. If you've talked to me at the Wall of Sheep, hopefully my, by the way, I apologize if my voice is going. I've been talking at Wall of Sheep for going on three days now. So if you've talked to me, you know that I'm very passionate about this field. I'm the concept creator behind something called Day of Security. If, yeah, thank you. So if you haven't heard of Day of Security, this is a conference that we've created in San Francisco. We're hoping to take it national to bring more women into the industry. And so I'm going to give you a little bit of an overview of what we're going to do today. We're going to go through a full day of hands-on training, and we raffle off full expensive paid trips to DEF CON. So if that's something you're interested in hearing about or participating in or volunteering with, please let me know. I'll be glad to talk about it. I'm also a volunteer with the Bay Area OAS, B-Sides, and, of course, Wall of Sheep. And I can't leave this out. I'm a Philadelphian. Proud. So the big question that I usually get from all of you is, well, I'm a lot of this is, well, I can't just buy these things. Why even make it yourself? So a lot of the commercial solutions that are out there are expensive. I, there are companies here, I own most of their products. I love those products, but they're not, they're not cheap. A lot of these, you may have an engagement that requires disposable hardware. I love my rubber ducky. I don't want you to love my rubber ducky, so I'm going to keep my rubber ducky. So for disposable stuff, it may make much more sense to have something that's maybe cheaper. And much like that, they are also recognizable. So if I walk down the street and I see a bash bunny or a rubber ducky on the ground, that's going home with me. I'm not turning that in. And a lot of these features, a lot of these solutions offer a ton of features, which is great if you need those features, but if you just need a one-off or something very cheap, sometimes it's better to make it yourself. And, of course, in this crowd, DIY is fun. We all do. We all love DIY. Just some basics. Forgive me if this is overly simple, but really what we're looking at the difference here is the difference between a microcontroller and a microprocessor. So with the microcontroller, that's that guy right there. It's the integrated system on an Arduino versus our microprocessor that we all know is part of a larger system, which is that, which is the Raspberry Pi. Just as an aside, I'm going to show you a little bit of a little bit of an example here. If we're not aware, that the Arduino itself is not a microcontroller. The microcontroller is the item in the circle. The Arduino is the development platform. So let's take it one step further and look at microcontrollers versus systems on a chip. So the system on a chip is a microcontroller, but it's all soldered together. It's one unit. That's that guy right there. There's your microcontrollers. So unlike the Arduino platform, you can't swap these microcontrollers off. That unit comes as it is. However, much like a lot of the Arduinos, these are considered development boards because they have the USB port in there. And as you'll note from my arm, which I'm going to talk about later, that's something that I felt was, worked very well for the use case. So when to choose a microcontroller or a system on a chip. By the way, let me just slip back because I actually wanted to walk through one other thing with you. I forgot. Those boards, that is the ESP8266 in the top. The middle one is ESP32 and the bottom one is the ES32B. And that is the order in which they've, I believe, been released. I haven't done much work with the ES32s, but the ESP8266, which is the one that I'm wearing, works fairly well. So, when to choose a microcontroller or a system on a chip. I tend to like the UNIX philosophies here, is when you want to do one thing and do it well. And again, there's the ESP8266 and then the bottom two are ATtiny85s in the male and female versions. So here's a little overview of the ATtiny85. This is a board that I really like. It's a development board. What I wanted to draw your attention to is two things. First of all, the cost is $1.75 to $4.50, depending on where you get it on eBay. But this is the real clincher here. You only have about 6K after the bootloader. That's not a lot of room. However, for some of the things that we're going to do with this, 6K is really all that we need. So, we take a look at the case study, which many of you, I'm sure, can relate to. I used to work for a company where laptops get, we got left unlocked all the time. So, it's a lot of work. It was easy to get access to them and send out emails and harass them, but unfortunately, as we all know, employees don't learn from shame. They learn from demonstration. So, I wanted to come up with some way to show people what the damage and what the cost is of leaving laptops unlocked. At the same time, not embarrassing that one particular individual because they're not going to learn from that. So, what did we do? We used ATtiny85 during our new higher orientation to drive the ATtiny85. We used the ATtiny85 to drive the ATtiny85 to drive the reverse shell on a demo laptop. And we showed employees how easy it was to basically get full administrative access to their machine. The result? Everybody loved new higher orientation. All of the employees were excited that their first month in this company that they got to see hacking. Numbers of laptops unlocked went down drastically. Although, nobody would make anything USB related for me. Which, as an aside, I remember one day I came in and I had a USB drive and I had a USB charger and the only person who would take it would be it was a senior, senior, senior, senior, senior manager because he knew that if there was anything wrong with it, I would be smited into the ground. So, yeah, nobody takes anything USB from me anymore. So, I will blow up the screen. I'll blow it up so we can walk through the code in a minute. That's the ATtiny85. Now, one of the things I noticed, if you play with this board on Macs, you're going to have to slightly file down the edges. And one of my more intuitive friends said, what do you mean by slightly? So, let me show you. This is the before and after. And as you can see, it is literally very, very slight. What the symptoms are is if you plug it in and you haven't done this, you'll see power going through the circuit but it won't do anything. And so the leads aren't touching. They're just out of range. And so if you just plug it in and you haven't done this, it will, you'll see power going just take a file and just very carefully work those edges, it will work on a USB on a Mac. So let's pop that code up. By the way, everything is available in my Git lab. So if you can't read it, don't worry about it. But this is basically it. The DigiKeyboard library is loaded. I have a Boolean in there. And the reason I do that is I tend to like to put things in the places where they should be. I mean, you might see some people put stuff in the setup and it works. I tend to like it in the loop. You have a ‑‑ for me, I had an AWS public IP. I'm not giving you my AWS public IP, of course. And then you have your reverse shell command, which there's thousands of them online. So this is just the first one that I grabbed. You then ‑‑ in my setup, I set pin mode. The first thing that I do is I set the first pin to output. And what that's going to do, for those who aren't familiar with Arduinos, is that it's going to allow me to send output to the LED so I can make it flash. I then go through the loop. It hasn't run. So if you're not familiar with the Mac, I'm going to walk you through this. You hit the space and the mod GUI key. The mod GUI key is the command key. So we basically call up spotlight. We wait 100 milliseconds. We type in terminal. We hit the enter key. Hit 200 milliseconds. Type in command key. We wait 100 milliseconds. We type in command end. So we kick up a new terminal window. A couple things to ‑‑ as a point. You'll notice that I'm tossing in these delays. The AT-1085 and the rubber ducky are faster than the Apple GUI can handle. So if you haven't put these demos ‑‑ if you haven't put these timers in, you'll notice it will just outpace the GUI and it won't work. So you have to put these little timers in. And they're relative based on the system. The other reason why I'm using a new terminal window is if your target happens to be a developer who's running in the terminal or he's doing something with the terminal and you interrupt it, he may get flagged somewhere else and then your cover is blown. So you don't want to do that. So we open up a brand new terminal window. We then drop in our reverse shell command. Hit the enter key. And then we do command M. So for those of you who aren't aware, that's on the Mac. It minimizes it out of the way. So we don't want them to see it. And then we flash five times to let the attacker know, hey, I'm done. And then we set the bully in so it doesn't continue to run. So. These are some of the commands. Again, I'll make these available that I like to run. But, I mean, frankly, it's a terminal. You can do anything. These are some of the fun ones. If you run the top one and the target uses Mac mail, you'll get back every e‑mail address that they've used in Mac mail. That's really kind of nice. If you want to e‑mail, you can do that. But if you want to run to e‑mail all their friends and family and remind them about locking laptops. You can go through the bash history. You can go through the bash sessions. The second to last one is my personal favorite. This is running OSAScript. So for those who aren't aware, AppleScript on the Mac is the automation language. You can run it from the terminal using OSAScript. Marking it with the e‑flag saying this is a command. The piece that you want to pay attention to is the part that says, where's the icon file? That is a core icon file that Installer ICN has found. comes with the system. You can pretty much guarantee that that's going to be there. So you pop up a little box that says, hey, I would love to install something, but I need your password. Why don't you go ahead and give it to me? And it works effectively. It works surprisingly well. And, of course, if you just want to be a jerk and shut down the system, you can. But you have that control. The key ‑‑ the thing you have to keep in mind with the AT985 and doing the reverse shells is you want to do things that don't require administrative access unless you have the password, in which case it's game over. But if you don't, you're going to want to do things that don't require that. So what does this look like? Let's walk through it. As you see, you'll see two different screens. The terminal window is the attacker window. The GUI is the target window. So you're going to see a giant hand. There you go. There's the giant hand. And plug this guy in. So the default boot loader is about 5 to 8 seconds. There are ways that I've read that you can reduce that. I have not been able to get it to work. So 5 to 8 seconds is fine for me for now. Pops up. Boom. That's it. I now have a reverse shell on your laptop. So first thing I want to do is I want to start to ask for a password. Because why not? That would be awesome. And so I pop that in. And then I pop that in. And then I pop that in. And then I pop that in. I'd say that's pretty effective. Now, your verbiage might be different. But the icon really makes it as far as I'm concerned. So, of course, I'm going to put my password in. Why not? And as you can see, there we go. I got the password. So now I don't need to worry about anything popping up on the screen. I can sudo. But let's say I want to go ahead and e-mail our friends and family. And let's say I want to go ahead and e-mail our friends and family. And let's say I want to go ahead and e-mail our friends and family. And let's say I want to go ahead and e-mail some of the screens are blurred out. I'm not looking to social engineer myself in front of all of you. So, I'm not releasing those e-mail addresses. But you'll see how well it works. So, boom, those are all the e-mail addresses that I was able to pull back. And it's fairly effective. The other nice thing is you can look at bash history. So maybe if it's the developer I can start to find out what IP addresses they're hitting, how they're running some of their Git repos. Told they're storing things, just all sorts of like fun, fun things. So yeah, there you go. A couple other things that we tried, just as an aside. I sat down with a buddy of mine and we said okay well how can we do this with Docker and how can we like spin up a Kali instance. For those who aren't aware with Mac with Docker it's a DMG file and if the Docker isn't on the machine itself then it's going to require a GUI and then all of a sudden a GUI pops up and that's not a cool thing. So in that particular case what you can do is you can use homebrew which doesn't require a password and then you can start installing your tools that way and it's arguably a little bit slower but you at least get your attack tools on the target machine. If they do have a Docker on the machine then you can install Kali image and spin that up and go to town. So there's really endless things that you can do with this thing. But does it work with USB-C? Will it play? Well, it does. So short answer is yes, long answer is yeah, kind of. So as some of you may have found out if you own an Apple product or work with Apple products, their adapters are very, very touchy. They don't like things that aren't necessarily Apple or things they don't recognize. But I did find this guy which is five dollars on fries and ten dollars in the store. You get a handful of those and you're good to go. No more barriers. So we're going to talk about this guy now, the one on my wrist. This is the ESP8266. And so the cost of this board is between four and eight dollars. So there's your microcontroller and there's your antenna. It's 2.4 gigahertz BGNN. I've seen a whole bunch of really cool stuff done with this. I have the base build on my wrist which is simply just doing a, you know, a wardriving, which we'll talk about in a minute. Again, this is considered a development board because it has the USB female connector on there. However, I happen to like it because I charge my USB. So this is more of the fun side of it. Those of you who are from California, if you went to B-Sides SF you know that the theme was steampunk this year. So I was like thinking, okay, could I build something that was steampunk, DIY, Arduino, security based, what could I come up with? And I came up with my steampunk wrist mounted network scanner. Until the blood drains out of my arm, I'll hold my arm up. And so I put this in here as I'm putting a photo in because I didn't think this was going to make through TSA and whatnot. But surprisingly if you take it apart and put it in boxes and label it, it does. So, yeah, so it made it okay. I have it on. I am okay with photos. Afterward, you guys can take photos and take a look at it. But as you can see on the screen, what it does is it's basically using the core library that works with the chip. And it grabs an array of a whole bunch of APs. I've modified it, modified the output so that if it's hidden, it comes up with unknown, otherwise it would have been blank. It shows the encryption type, the signal strength, the channel, the, the MAC address, all sorts of fun things that you can, can spin up. Yeah, if you're spinning stuff up, I'll read it out. Although I'm not seeing anything, uh, crazy show up. Uh, by the way, just huge props to this woman. Uh, this is Monique from Mythical Masks. She's the one who made the leather that I'm wearing. Uh, that mask that she is sitting next to, she made. She is crazy good with leather. So, uh, big major props to her for the work that she did. So, those were the Arduinos. When we look at single board computers, uh, what are some things that we can, we can do with these things? And when do we use them? Um, frankly, if you need the flexibility of an OS and cost isn't terribly a concern, then I would definitely move up. So, there is a bazillion Raspberry Pi variations. I'm gonna look at the top one and the bottom one. Uh, for the latest, this is Raspberry Pi 3. Uh, this has got, uh, 1.2 gigahertz CPU, 1 giga RAM, uh, and all sorts of other things. Uh, it's got, uh, a bunch of other fun stuff. The cost is about $35, depending on where you get it. Um, I've found that getting it through, uh, MCM Electronics, who's owned, they just got purchased recently, but, uh, kind of kits also on, uh, Amazon work well, too. And this is the Zero W. So, this is the smallest board that they make. Uh, 1 gigahertz CPU, half the RAM, much smaller, uh, not as many, uh, adapt, uh, not as many, uh, sockets, but depends on what your needs are. So, what was my case study for this? So, I was curious about the network traffic around my home. Uh, I live in Northern California where people, uh, like the internet, uh, a lot. Uh, and so, uh, at the time I didn't own a pineapple and I was thinking, okay, what could I build this thing? So, I came up with a custom-built Raspberry Pi network analyzer, also known as a WordCamp. Uh, it's a, uh, a server-driven kit. Uh, and I'll show you what it looks like. I did not bring this one through TSA. Um, I, I felt that I was gonna just have a photo of it. Um, so, I'm using a TP-Link antenna. I'm not an antenna guy. Um, if the person asking about antennas yesterday, I did find that link. It's in the end. So, I don't know if he's here today. Um, I use a TP-Link. Uh, we're running Raspbian on it. Uh, the internal antenna we use for administrative access, and I'll explain that in one second. Okay. So, we have the external antenna for RF monitoring. And we use error dump and screen. Now, when you're thinking about screen, the reason we use screen is that we can keep the bash session going. So, if you have multiple engineers who are around this item, they can all log in to the administrative access and all log in to screen and see, see the dump of what's going on from error dump. So, it's kind of nice. It's multi-user. Uh, and running off like this, I'm going to show you how to run it. So, I have a battery. I have a, a Titan. That thing will run all day. Uh, that's not what's in the photo by the way, but it's, it will literally run all darn day. Um, excuse me. Powered off USB. And so the approximate cost for this whole thing, if you had none of these parts, is about $85. Um, I'm assuming most people in this room have some portions of these parts. So, uh, your cost may vary. And, uh, the, the, the, the, um, I am not a lawyer so uh, I just put this up there as a warning. Please be careful what you scan. Um, Error Dump has the ability to record. So, just be careful what you're scanning and recording before you do it. So, one last thing I wanted to talk about, um, is this guy. Uh, this was the precursor to the the poor man's rubber ducky that I built. I know that previously I had said that, you know, employees don't learn from shame. The only caveat to that is if that employee happens to be a friend of yours and they continuously leave their laptop unlocked. So I needed to build something to remind this person that they need to lock their laptop. And so using AppleScript and Bash and this really awesome USB thing I found on eBay, I was able to do that. So what does the PwnMe USB look like? By the way, this is also in GitLab as well. You have an application called ClickMe and you have the PwnMe script. You have a wallpaper image. You have an init script and you have an audio MP3. So inside the PwnMe script, basically it's an AppleScript that generates the ClickMe and that's what it looks like. It literally calls up and kicks off the init script. There we go. I will blow that in a second. So if you can't read it, I will walk through it. We'll stop at the top down. I mean, I have a giant message that's going to get read out. Please note that I am calling the environment variables log there, as you'll see in the video. Otherwise it won't make sense. I call out my wallpaper image, my audio image, and my USB path. And if you're interested in that, I'm going to show you how to do that. So I'm going to go to my If you can't tell, by the way, I was a JavaScript developer, so everything is very functional. So at the bottom, you'll see where I started calling my methods. I basically copy the wallpaper image over to the pictures. I copy the MP3 file over to the music file, to their music directory. I change their background and I wipe away all of their applications so they can see it. I then set the volume to 10. This is called Light the Fuse. And it took us a while to figure this out, but basically I put it in sleep mode and I eject the drive and put it in sleep mode, and then the script is still running, because the files are localized, it will keep going, and I now have a nice long time to walk away. Now, before I run this video, I did the best to make this entertaining. The part of it that you're missing is watching the engineer scramble to try and shut this down, so you kind of have to use your memory, your imagination. And imagine what this would be like if this blows up in your office. It's a lot of fun. So, again, that link will be at the end. I made it look like a CD. And because I used to be a designer, I made my own icon. Runs the script, kicks it out. Oh, no, no, you wait. It's coming. Hopefully the audio won't blow up your ears. I apologize. It was set to volume 10. I'm going to keep my hand over here just in case. I had about 15 seconds to walk away. Unfortunately, a typical user has left their laptop open and unlocked. Some cheeky hacker might have done some not-so-nice things given this advantageous opportunity. With information security being so important these days, I'm sure this was just a minor oversight, which will get corrected immediately. In the meantime, please enjoy this delightful musical selection, courtesy of a typical user. Cheers. This one's on the AF Play service. You have to imagine they're now sitting on like the right side of the stand. The fastest type that I would teach you is actually that way. So, if you don't have the right money, this is going to be a good one. I like her. My boss is going to get a six-pass change. So, then he gets quiet and he's like, oh, thank God, it's over. And, by the way, the script for this is available. You won't have the audio because I don't want to get copyrighted. There's no question about that. Thank you. Now, the other piece of it that you don't see is that at the end, if you don't catch it, it will delete all the files. So, not his files, not his files. The files associated with this. So, if he tries to find the MP3, it's gone. If he changes his background, it goes, poof, disappears. So, I clean up after myself. So, a couple extra little points. These are some links that I thought were helpful. There was a guy who asked. I don't know if he's here. Is the guy who asked for the antenna here? Raise your hand. Yeah, there you are. Okay, good. So, third link down. Dude, I take care of you, man. I found it last night after running to Walmart at 1230 because I didn't think I had the right adapter. Ironically, if you're not from Las Vegas, the Walmart is open 24 hours a day. They have lots of good stuff. So, that link right there, basically what it does is it talks about everybody who's had experience with Wi-Fi adapters. If you're not sure which one to pick, they do a pretty good walkthrough. I am not a good person for that. There's the link for Dave's Security. Please check it out. It is an awesome, awesome convention. We need more engineers. We need more women engineers in the industry. We need more women engineers in the industry. We are confident that our team can do that. Mythica Masks, she does amazing, amazing stuff. And one of the ones that's always been passed on to me is something called Electric Goldmine. If you're looking for just weird stuff to tie into your Arduinos, or your badges, if that will, they do get some pretty cool stuff. So, that was me. It was nice and short. This is where you can find me. That's my blog. I'm on Mastodon, because I'm that kind of hacker. And there's my GitLab. Sorry it's all weird, but yeah, that's it. And any questions or comments, let me know. Thank you.