1 00:00:00,000 --> 00:00:04,320 Today we're going to be talking about hunting mobile rogue access points. 2 00:00:04,840 --> 00:00:10,420 And so it's kind of the same methodology, but we've beefed it up just a bit. 3 00:00:10,860 --> 00:00:12,140 I'm Todd Parity. 4 00:00:12,720 --> 00:00:13,820 I'm Minnie. 5 00:00:13,940 --> 00:00:15,500 We're out of Colorado. 6 00:00:15,640 --> 00:00:19,140 We're both pen testers, and we like to do stuff on the side for fun. 7 00:00:19,140 --> 00:00:23,140 So none of the things that we're going to talk about today reflect anything about our employers. 8 00:00:23,320 --> 00:00:28,040 This is all a personal project, especially any opinions or jokes we might make. 9 00:00:28,040 --> 00:00:30,960 These were not approved by our employers. 10 00:00:32,300 --> 00:00:33,180 All right. 11 00:00:35,780 --> 00:00:42,540 So, first of all, whenever we give this presentation, we like to just set the stage so that everybody understands what we're talking about. 12 00:00:42,540 --> 00:00:44,820 What is a rogue access point? 13 00:00:44,940 --> 00:00:55,580 A rogue access point is a wireless access point that's either misconfigured or maliciously configured and exists in a hardware baseline that you don't want it there. 14 00:00:55,580 --> 00:00:58,960 So the idea is you want to find these and get rid of them. 15 00:00:59,040 --> 00:01:01,040 They come in all sorts of forms. 16 00:01:01,040 --> 00:01:09,080 You know, you have sysadmins that set up an old Netgear router, hoping to get stuff done, and they leave it open. 17 00:01:09,080 --> 00:01:21,900 Or you have a retail shop that installs a wireless extender, and they authenticate to your WPA2 main hub, and anybody else can access that extender because it is broadcasting open. 18 00:01:21,900 --> 00:01:22,620 Boom. 19 00:01:22,620 --> 00:01:23,520 Right behind the network. 20 00:01:23,520 --> 00:01:34,420 So these are real threats in terrestrial networks, and they require some specific tactics to find out. 21 00:01:34,560 --> 00:01:40,240 So last year, Minnie and I talked about hunting the stationary APs. 22 00:01:40,480 --> 00:01:46,760 There's a link here that I guess we'll post the slides on the Wireless Villages page. 23 00:01:46,900 --> 00:01:49,600 Follow the link, watch our talk from last year. 24 00:01:49,600 --> 00:01:51,180 We won't talk too much about it. 25 00:01:51,180 --> 00:01:53,700 But this year we're talking about mobile rogue APs. 26 00:01:53,700 --> 00:01:55,060 These are the foxes. 27 00:01:55,440 --> 00:02:01,160 If you're competing in the CTF, if you've ever competed in the CTF, you know that this is one of the challenges. 28 00:02:01,280 --> 00:02:05,940 Go out and find a wireless access point that's roaming around. 29 00:02:05,940 --> 00:02:18,460 Now this presents its own challenges, because in order to find it, whatever gear you have with you, that antenna pattern has to match the antenna pattern of what you're searching for. 30 00:02:18,460 --> 00:02:20,680 At least they have to be in the same vicinity. 31 00:02:20,680 --> 00:02:28,460 So you can spend a ton of time on your feet looking for a fox and never pick up its signal if you're not doing things right. 32 00:02:29,120 --> 00:02:34,020 And if you go back and watch our talk from last year, it's pretty much what happened. 33 00:02:34,020 --> 00:02:35,220 We just walked around a lot. 34 00:02:35,220 --> 00:02:42,580 If you think about Caesar's Palace blueprints, and if you put a Roomba on that blueprint, that's pretty much what we did. 35 00:02:42,580 --> 00:02:46,280 It just went back and forth until we found the stationary AP. 36 00:02:46,280 --> 00:02:51,880 So hunting mobile APs takes on its own form. 37 00:02:52,180 --> 00:02:57,940 Because you can go back and forth just like a Roomba would to try to cover your entire search space. 38 00:02:57,940 --> 00:03:01,680 But if you're not in the same place as the fox, you're going to miss them. 39 00:03:02,720 --> 00:03:04,100 So it's attacker controlled. 40 00:03:04,100 --> 00:03:07,980 The attackers got the hardware on themselves. 41 00:03:08,980 --> 00:03:12,260 So for any sort of hunting, what do you need? 42 00:03:12,260 --> 00:03:17,500 What are the key pieces of information that you need to go out and hunt the rogue AP? 43 00:03:18,360 --> 00:03:20,440 You have to be able to identify your target. 44 00:03:20,440 --> 00:03:26,960 Here in the wireless CTF, the organizers post a BSSID and that's it. 45 00:03:27,100 --> 00:03:28,440 They'll just give you a BSSID. 46 00:03:28,440 --> 00:03:29,400 They don't tell you the frequency. 47 00:03:29,400 --> 00:03:30,680 They don't tell you the channel. 48 00:03:30,700 --> 00:03:32,260 And you've got to go out and find it. 49 00:03:32,340 --> 00:03:36,300 So you have to at least start with a BSSID. 50 00:03:36,300 --> 00:03:41,620 And a lot of folks will pick this up like if they're doing this threat hunting for real. 51 00:03:41,620 --> 00:03:45,080 They'll have some indication that something's wonky in their environment. 52 00:03:45,080 --> 00:03:50,000 And they'll be able to pull a BSSID and that's what they start from. 53 00:03:50,640 --> 00:03:55,100 So it's better if you have a frequency and a channel because you narrow your search space. 54 00:03:55,140 --> 00:03:57,960 You can tune your gear a lot easier that way. 55 00:03:58,180 --> 00:04:02,080 But you also have to deal with a bunch of structural and wireless interference. 56 00:04:02,100 --> 00:04:06,080 So you may need different types of antennas, directionals. 57 00:04:06,080 --> 00:04:11,360 In our talk last year, we talked about not using Yagi's for these types of hunting. 58 00:04:11,500 --> 00:04:12,560 It's kind of cool. 59 00:04:12,560 --> 00:04:13,080 Looks cool. 60 00:04:13,080 --> 00:04:16,520 You're walking around with this big thing that looks like a sniper rifle. 61 00:04:17,080 --> 00:04:19,320 But it actually makes the search a lot harder. 62 00:04:19,320 --> 00:04:24,940 Because remember, your antennas, your radiation patterns have to overlap. 63 00:04:24,940 --> 00:04:32,980 And if you've got a soda straw that you're just pointing around in whatever direction, then it's going to be really difficult to find somebody else's donut. 64 00:04:33,980 --> 00:04:40,600 And here, especially this year, for the contest, you have a huge space to cover. 65 00:04:40,600 --> 00:04:43,660 Last year we talked about Caesar's Palace. 66 00:04:43,660 --> 00:04:53,280 Something like 60 acres of space, 30,000 people, 600 floors of rooms. 67 00:04:53,280 --> 00:04:54,840 So just tons of space to cover. 68 00:04:54,840 --> 00:04:56,860 And this year we're across three different casinos. 69 00:04:56,860 --> 00:05:00,720 So you just imagine how that scales up. 70 00:05:02,560 --> 00:05:13,140 So, coming off our success from DC25, finding the stationary access point, Minnie and I decided that we were done walking around. 71 00:05:13,420 --> 00:05:16,400 Like, we were going to cut that out of our strategy immediately. 72 00:05:16,620 --> 00:05:21,880 I get shin splints really easy, I've got flat feet, and Minnie's got a bum knee. 73 00:05:21,920 --> 00:05:27,760 So, we were done walking and we thought, okay, how do we approach this in a smart way? 74 00:05:27,760 --> 00:05:34,300 So our idea was, let's just sit still, or at least relatively still. 75 00:05:34,300 --> 00:05:42,000 Let's deploy some sort of sensor that can just stay in one place and somehow we get notified. 76 00:05:42,340 --> 00:05:47,840 Well, one way to do that is just get a huge team of people, 12 plus people. 77 00:05:47,860 --> 00:05:52,540 Everybody gets a raspberry pie and you're on ham radio and you all go out to your different locations. 78 00:05:52,540 --> 00:05:53,500 Well, guess what? 79 00:05:53,580 --> 00:05:55,460 People are unreliable. 80 00:05:55,760 --> 00:05:57,700 And they suck at communicating. 81 00:05:57,700 --> 00:06:08,580 So, we needed something that we could control, something that had a protocol that made sense to us, that we could check out and would work, you know, 9 times out of 10. 82 00:06:08,580 --> 00:06:13,460 Of course, we wanted 10 out of 10, but 9 times out of 10 is good enough for us. 83 00:06:15,920 --> 00:06:26,280 So with that in mind, traditional hunting takes, you know, walking around but using direction finding. 84 00:06:26,280 --> 00:06:28,080 And that's still important to us. 85 00:06:28,080 --> 00:06:33,420 Even though we didn't want to walk around, we still have to eventually use traditional methods. 86 00:06:33,560 --> 00:06:48,380 So the idea is, once we deploy an automated non-human sensor network, and at this point we still didn't know what that would be, we're going to narrow down our search space and be notified where we need to be next. 87 00:06:48,380 --> 00:06:51,660 And hopefully we're somewhat close to where we need to be next. 88 00:06:51,660 --> 00:06:56,820 And we thought that might make things just a little more efficient. 89 00:06:57,860 --> 00:07:00,900 So another thing that we needed to make sure is that we kept our costs down. 90 00:07:00,900 --> 00:07:08,820 Like I said at the beginning, Minnie and I bankrolled this whole project ourselves, and we're pretty poor, so we had to keep all of our costs down. 91 00:07:08,920 --> 00:07:18,120 Also, we had to keep our costs down for this last point, because we needed to make these things concealable, at least to compete in the wireless CTF. 92 00:07:18,120 --> 00:07:28,480 We wanted to be able to place whatever these sensors would be, we wanted to be able to place them in places that we didn't have to have physical security over. 93 00:07:28,600 --> 00:07:30,040 That we could just leave them there. 94 00:07:30,200 --> 00:07:33,720 And it's DEF CON, there's a bunch of thievery happening here. 95 00:07:34,040 --> 00:07:37,860 If you guys see things on the walls or on tables, you're probably going to pick it up. 96 00:07:38,060 --> 00:07:53,620 This is important because we could have built out this whole strategy I've described so far by just buying a bunch of Aruba access points, or Cisco Enterprise access points, because they have this functionality built into them. 97 00:07:53,780 --> 00:08:04,100 If you deploy enough of them, they can build out a two-dimensional heat map, and you can see relatively where specific users, specific access points are. 98 00:08:04,880 --> 00:08:12,860 But at $500 to $1500 a wireless access point, we didn't want those just walking off here at DEF CON. 99 00:08:12,860 --> 00:08:23,140 So our approach was a low-cost, rapid prototype of a deployable and unmanned sensor network. 100 00:08:24,340 --> 00:08:32,140 So after doing some research, trying to figure out what devices kind of fit that model, we came across the ESP8266. 101 00:08:32,140 --> 00:08:35,160 How many of you ever played around with this before? 102 00:08:35,200 --> 00:08:37,500 It's gaining popularity. 103 00:08:37,500 --> 00:08:44,180 The ESP family of wireless chips has been around, at least the DEF CON scene, for a long time. 104 00:08:44,260 --> 00:08:55,160 The last several years, some of the badges have featured ESPs, ESP32s, and then obviously a lot of the Indy badges feature that same chip. 105 00:08:55,560 --> 00:08:57,340 There's a lot of functionality in them. 106 00:08:57,340 --> 00:09:01,260 For us, the ESP32 is a little more expensive than what we wanted. 107 00:09:01,260 --> 00:09:07,620 I think it came in at about a $15 a node price, and we wanted to keep costs extremely low. 108 00:09:07,620 --> 00:09:10,780 So if you see here, it's $3. 109 00:09:11,380 --> 00:09:15,160 Get it on Amazon, $3, no big deal. 110 00:09:15,800 --> 00:09:18,980 And that was the building block for our whole sensor network. 111 00:09:19,500 --> 00:09:21,740 These were released in 2014. 112 00:09:21,960 --> 00:09:23,760 Somebody out of China was manufacturing them. 113 00:09:23,760 --> 00:09:29,140 Nobody here really caught wind of it, except if you were really into hardware hacking. 114 00:09:29,140 --> 00:09:35,680 And then Hackaday picked up the ESP8266 for one of their pieces. 115 00:09:36,060 --> 00:09:41,040 And there's a great article on what they were able to do with the ESP8266. 116 00:09:41,360 --> 00:09:43,240 Because it's pretty unique. 117 00:09:43,240 --> 00:09:49,480 At $3, you get almost 20 dB out of this tiny little chip that's powered by 3.3 volts. 118 00:09:49,480 --> 00:09:58,120 So in open space, some people have done tests, and it reaches client to the wireless access point is about 300 meters. 119 00:09:58,120 --> 00:10:02,120 So it's got a really, really good radiation pattern. 120 00:10:03,000 --> 00:10:13,660 And even better in the chip is all the functionality that you need to run WPA and WPA2. 121 00:10:13,860 --> 00:10:20,080 So that meant that we didn't have to write that from scratch, which is really important for me because I'm a horrible coder. 122 00:10:20,080 --> 00:10:25,120 Really important for many because I didn't want to turn them into a slave during this project. 123 00:10:25,120 --> 00:10:32,880 So the ESP8266 has two GPIO transmit and receive serial pins. 124 00:10:33,160 --> 00:10:36,480 This is really neat for debugging because we can just see. 125 00:10:36,480 --> 00:10:42,280 We can print stuff out, you know, just like really rudimentary debugging. 126 00:10:42,720 --> 00:10:45,240 Entering our own print line, seeing what's going on. 127 00:10:45,540 --> 00:10:50,480 But it also allows us to combine multiple ESPs if we wanted to. 128 00:10:50,480 --> 00:10:56,740 Or put other sorts of sensors on it so that we can read and control what's going on. 129 00:10:56,740 --> 00:11:03,900 So this quickly became our number one choice for how we would build this network out. 130 00:11:03,900 --> 00:11:06,460 It's got a 32-bit RISC processor on it. 131 00:11:07,280 --> 00:11:10,160 You can overclock it up to 160 megahertz. 132 00:11:10,660 --> 00:11:17,200 And one of the limitations is it only has a meg of RAM, and that's for both program code and user data. 133 00:11:17,200 --> 00:11:22,660 So that may not seem like it now, but when you're dealing with wireless stuff, that's very small. 134 00:11:22,700 --> 00:11:28,360 So our ability to just dump a bunch of logic onto this is slim. 135 00:11:29,160 --> 00:11:35,140 It runs on 3.3 volts, which means you can power it with a little tiny coin cell. 136 00:11:36,300 --> 00:11:41,020 A lot of the projects that you'll find online for 8266 is a bunch of IoT stuff. 137 00:11:41,020 --> 00:11:56,080 Farmers who are monitoring their water flows, and folks who are watering plants, and a lot of watering going on with 8266s, because they act as a wireless access point themselves, and they run natively. 138 00:11:56,080 --> 00:12:07,260 If you just bought this right now, this little guy, and it came to you over Amazon, and you just powered it up on 3.3 volts, it's got a full web server running on it. 139 00:12:07,260 --> 00:12:09,200 So it's really plug and play. 140 00:12:09,200 --> 00:12:18,140 You just start working with it, access the website, and kind of build it to suit your needs just from there. 141 00:12:19,660 --> 00:12:23,500 Yeah, so if you hadn't seen one before, that's about how small it is. 142 00:12:25,120 --> 00:12:27,640 Picture does not depict actual size. 143 00:12:27,640 --> 00:12:29,160 I forgot to put that up there. 144 00:12:31,340 --> 00:12:39,620 Indoors, it has a pretty limited range, what wireless doesn't, because you're dealing with a bunch of concrete and steel, and here you're dealing with a bunch of water, because all the humans walking around. 145 00:12:39,620 --> 00:12:41,080 You've got about 80% water. 146 00:12:41,080 --> 00:12:43,300 That's a lot of attenuation happening. 147 00:12:44,560 --> 00:12:50,320 And if you're running, if you're using the wireless chipset the entire time, it's super power-hungry. 148 00:12:50,320 --> 00:13:00,220 So this, what we ended up learning as we built these, is these coin cells running with our code base lasted about 15 minutes, which was awesome. 149 00:13:00,220 --> 00:13:02,280 And then it got really, really hot. 150 00:13:02,280 --> 00:13:10,060 So if you had little tiny robin eggs, you could crack them on top of the chip and you'd have breakfast for a minute. 151 00:13:11,140 --> 00:13:14,960 The other limitation is it's 2.4 gigs only. 152 00:13:14,960 --> 00:13:22,640 That's the only band that it operates on, which is a limitation for the contest, because there's a ton of stuff in the wireless CTF that is on 5 gigs. 153 00:13:22,640 --> 00:13:25,520 So that's just completely out of the ballpark for us. 154 00:13:27,260 --> 00:13:29,500 But it makes a really good proof of concept. 155 00:13:29,500 --> 00:13:37,140 So if we decide that we can stomach more cost per node, we can upgrade that to a dual-band chip and move on. 156 00:13:40,300 --> 00:13:47,940 So I want to walk you through a bit of history, lessons learned, or just a journey of the 8266. 157 00:13:48,280 --> 00:13:59,120 Since we picked this up last year, about December of 2017 is when we started this project so that we could compete last year in the wireless CTF. 158 00:14:01,280 --> 00:14:05,400 The 8266 didn't have a lot of documentation online. 159 00:14:06,280 --> 00:14:10,380 What it did have was inconsistent between different sources. 160 00:14:11,180 --> 00:14:14,020 Even worse, the tooling was just not even there. 161 00:14:14,020 --> 00:14:18,500 So development boards didn't really exist for this specific model. 162 00:14:18,500 --> 00:14:20,780 Now, for the 32, they're all over the place. 163 00:14:20,780 --> 00:14:25,240 But this really cheap model, there wasn't a lot of resources available to us. 164 00:14:25,240 --> 00:14:31,680 So we ended up having to go back to our electrical engineering days and remind ourselves what a breadboard is. 165 00:14:32,200 --> 00:14:36,840 So this was our first kind of development board. 166 00:14:36,960 --> 00:14:42,140 The idea was, since we were building a network of sensors, we needed at least three. 167 00:14:42,220 --> 00:14:47,060 One to act as the root node, and two more so we could see how they communicated with each other. 168 00:14:47,180 --> 00:14:54,360 So this allowed us to program and run the chips all on the same board, just made it a lot more simple. 169 00:14:55,380 --> 00:15:00,420 Even more simple is how you interact with the 8266. 170 00:15:00,680 --> 00:15:05,740 Flashing firmware, powering it off, putting it into operational mode. 171 00:15:05,740 --> 00:15:07,220 Just these two buttons. 172 00:15:07,760 --> 00:15:16,800 Well, it's a pull-down and a pull-up on two of the GPIO pins, but we use these buttons to perform that. 173 00:15:16,800 --> 00:15:31,720 And a certain pattern of using those puts the chip into program mode, so you can take your entire program, load it on, flash it, and then it resets automatically, and then it's automatically in operational mode. 174 00:15:31,720 --> 00:15:34,100 So whatever code you're running, you're seeing it happen right there. 175 00:15:34,100 --> 00:15:39,300 So if you're changing the access point, right after it flashes, that access point name is going to pop up. 176 00:15:39,440 --> 00:15:41,300 So it's really quick, a lot of fun. 177 00:15:42,860 --> 00:15:46,460 Later on, we improved our design for our development board. 178 00:15:46,460 --> 00:15:48,700 This is the next one on the left. 179 00:15:48,700 --> 00:15:52,140 We needed them to be individual nodes. 180 00:15:52,140 --> 00:15:55,580 We are now ready to go out and deploy these and test them more. 181 00:15:55,980 --> 00:16:06,060 So on that board on the right is just a 5-volt FTDI that has a power regulator on it that takes it down to... 182 00:16:06,060 --> 00:16:08,720 a voltage regulator that takes it down to 3.3 volts. 183 00:16:09,400 --> 00:16:13,020 At $3 a piece, they're pretty... 184 00:16:13,460 --> 00:16:14,820 I mean, what do you expect? 185 00:16:14,820 --> 00:16:15,820 They're dainty. 186 00:16:15,820 --> 00:16:20,560 So if you put 3.39 volts into it, they're going to fry. 187 00:16:20,600 --> 00:16:23,660 So it's important that your voltage regulator is sound. 188 00:16:23,660 --> 00:16:25,640 And we found that this one was really good. 189 00:16:27,200 --> 00:16:30,020 And that was 2017. 190 00:16:30,340 --> 00:16:45,840 Earlier this year, on the right, somebody on Amazon, or somebody released on Amazon their own USB to ESP UART adapter, which I cursed at because I really wanted that at the end of 2017. 191 00:16:46,220 --> 00:16:47,960 It would have made things a lot easier. 192 00:16:47,960 --> 00:16:50,900 You see there's a switch on the side instead of two buttons. 193 00:16:50,900 --> 00:16:54,160 Makes it so much faster, smoother development. 194 00:16:55,900 --> 00:16:57,560 And that's $8. 195 00:16:57,680 --> 00:17:04,040 That whole thing comes with an ESP8266 and the development board. 196 00:17:04,100 --> 00:17:05,440 That's why I gave you a link. 197 00:17:05,440 --> 00:17:08,820 If you want to get started with this, it honestly just costs you $8. 198 00:17:08,820 --> 00:17:19,540 And it's a great way to dive down into the actual beacons and packets and frames that are coming in and out of the 802.11 space. 199 00:17:21,780 --> 00:17:25,900 We've competed in the wireless CTF the last two and a half years. 200 00:17:25,900 --> 00:17:27,100 We didn't do it this year. 201 00:17:28,260 --> 00:17:36,080 And I can't tell you that I ever once actually looked into a packet and pulled out the beacon. 202 00:17:36,180 --> 00:17:37,360 I just used tools to do it. 203 00:17:37,360 --> 00:17:41,540 So it was really fun to get our hands dirty and really get down to the protocol level. 204 00:17:41,740 --> 00:17:43,000 Quickly, cheaply. 205 00:17:43,760 --> 00:17:47,460 And now, with a lot more documentation and support out there. 206 00:17:48,220 --> 00:17:49,960 So anyways, that's kind of part of the journey. 207 00:17:51,740 --> 00:17:59,720 After we were done developing, we had to go back to that requirement of making our nodes, our sensor nodes, concealable. 208 00:18:00,200 --> 00:18:00,660 Right? 209 00:18:00,660 --> 00:18:01,720 Because you all be thieving. 210 00:18:01,920 --> 00:18:04,100 So we needed to make sure you couldn't find them. 211 00:18:04,100 --> 00:18:06,500 Or if you did see them, you didn't think they were anything valuable. 212 00:18:06,500 --> 00:18:14,820 We even got to the point of talking about putting Cyrillic characters inside of our code in case anybody dumped the firmware. 213 00:18:14,840 --> 00:18:17,920 So they thought it was coming from somewhere in Eastern Europe. 214 00:18:18,880 --> 00:18:21,640 The NSA actually has their own OUI. 215 00:18:21,720 --> 00:18:29,740 OUI is the first three bytes of the MAC address for your chip. 216 00:18:30,280 --> 00:18:33,720 And so we thought about setting our MAC address to the NSA's OUI. 217 00:18:33,720 --> 00:18:40,020 But Minnie talked some sense into me and said that probably wouldn't be a good idea because there might be some legal things that we don't know about. 218 00:18:40,440 --> 00:18:41,960 Anyways, it's public. 219 00:18:41,960 --> 00:18:42,860 You can go look it up. 220 00:18:42,860 --> 00:18:46,040 Just go to an OUI database and type in NSA and it's there. 221 00:18:47,840 --> 00:18:49,360 Anyways, I digress. 222 00:18:49,620 --> 00:18:53,260 So we needed to build our concealables. 223 00:18:53,260 --> 00:19:04,040 So we went from the board you saw in the previous one on the right, which allows us just to take that ESP out and back in to our deployable, as we call them, on the left. 224 00:19:04,080 --> 00:19:09,640 We upgraded from the nickel cell to lithium ion batteries. 225 00:19:09,640 --> 00:19:12,320 This one is a 3.3 volt. 226 00:19:13,020 --> 00:19:19,560 I think it's a 1200... I don't know what it was in terms of amperage. 227 00:19:19,760 --> 00:19:22,240 But it was enough to last longer than 15 minutes. 228 00:19:22,240 --> 00:19:24,160 These lasted us about two hours. 229 00:19:26,180 --> 00:19:28,720 We rolled through those batteries pretty quick. 230 00:19:28,720 --> 00:19:30,020 But this is just a case. 231 00:19:30,020 --> 00:19:33,840 It's a utility case that you might install at your house or something. 232 00:19:33,960 --> 00:19:37,020 And we found that with all the heat that was generated, this wasn't a great idea. 233 00:19:37,440 --> 00:19:41,020 Because there's no way to ventilate all the heat, so that plastic got really hot. 234 00:19:41,020 --> 00:19:43,880 And the last thing we wanted to do was cause another fire. 235 00:19:43,880 --> 00:19:45,340 Well, we didn't cause the fire. 236 00:19:46,600 --> 00:19:49,440 Have another fire at DEF CON. 237 00:19:49,500 --> 00:19:51,920 And these are a little big, right? 238 00:19:53,520 --> 00:19:56,420 I had one earlier, but they're about this big. 239 00:19:56,420 --> 00:19:59,300 About the size of the fish I caught, too. 240 00:20:00,860 --> 00:20:05,520 We realized, probably not an ideal form factor, so we shrunk it even more. 241 00:20:06,380 --> 00:20:08,760 Here's what they look like now. 242 00:20:08,840 --> 00:20:11,200 By the way, Todd's acting like he planned all this. 243 00:20:11,200 --> 00:20:16,660 But he actually just decided that we were going to start using the coin cells right in the middle of the CTF. 244 00:20:16,660 --> 00:20:19,780 Yeah, it was a flexible choice. 245 00:20:20,340 --> 00:20:22,000 It was ad hoc. 246 00:20:23,140 --> 00:20:25,800 So it's just this little coin cell holder. 247 00:20:25,800 --> 00:20:32,000 These were for nodes that we were okay with deploying for 15 minutes, going and picking up, and then resetting. 248 00:20:32,680 --> 00:20:37,080 I've got a whole box of ESPs here, I don't know if you can see it. 249 00:20:37,080 --> 00:20:38,160 Come up afterwards. 250 00:20:38,620 --> 00:20:41,200 Yeah, if you'd like one, I'm happy to give them away. 251 00:20:42,240 --> 00:20:44,100 The ones that we're not using now. 252 00:20:44,780 --> 00:20:50,700 In fact, I've got that whole programming board, I've got an extra one, so come talk to me if you'd like it. 253 00:20:51,500 --> 00:20:58,160 And then that is blue masking tape on the battery bank that you see on the left, and it works perfectly. 254 00:20:58,160 --> 00:21:01,080 It distributes heat unimaginably. 255 00:21:01,960 --> 00:21:07,200 All right, and then we just had Velcro on the bottom, so we would stick these, and I think... 256 00:21:07,920 --> 00:21:09,800 We stuck these everywhere. 257 00:21:09,840 --> 00:21:14,320 We stuck them under tables, behind chairs, behind the pillars, on the walls. 258 00:21:15,100 --> 00:21:21,540 TVs, underneath, we came into the wireless village and stuck them underneath the tables. 259 00:21:22,360 --> 00:21:24,660 For purposes we'll explain later. 260 00:21:25,760 --> 00:21:30,420 And, yeah, so that was kind of our deployment strategy. 261 00:21:31,820 --> 00:21:47,920 My goal with this kind of introduction, I'm about to turn the time over to Mini, was if you hadn't heard of the ESP8266, to kind of give you an introduction to it, it's an awesome little chip, a great way to get started with wireless stuff, either if you just need a wireless access point, 262 00:21:47,920 --> 00:22:04,260 or if you want to do some of the more cool things that you can do with the software that you load on, that Mini's going to talk about, and then kind of show you our progress for our methodology and what brought us to the form factor and the deployment that we had here. 263 00:22:04,340 --> 00:22:09,720 So at this point, Mini, I'm going to turn this over to you, and Mini's going to talk to us about software considerations. 264 00:22:11,820 --> 00:22:21,280 So, yeah, like Todd was saying, we were just looking for something super straightforward that I could get started with, with a relatively shallow knowledge of wireless and 802.11. 265 00:22:21,280 --> 00:22:23,000 I'm not, like, a wireless expert. 266 00:22:23,000 --> 00:22:37,980 I'm sure all of these fine people over here could tell you a lot more than I could, so I was just looking to prototype something really quick, find something with some open source software out there that I could fork and just bootstrap in and start writing firmware on the fly. 267 00:22:38,980 --> 00:22:40,900 Obviously, I wanted to flash it quick. 268 00:22:41,460 --> 00:22:43,560 I had no idea what I was doing with the hardware. 269 00:22:43,560 --> 00:22:47,400 If I destroyed it in some manner, I didn't want it to matter. 270 00:22:47,400 --> 00:22:54,040 That happened several times, but that's why we work as a team, because I got to build the new hardware that Mini destroyed. 271 00:22:55,340 --> 00:23:16,300 So we used this prototype software at the time called Painless Mesh that a guy named GMag wrote, and basically you have a centralized route and it dynamically forms a wireless topology based on some kind of shortest path algorithm in the background. 272 00:23:16,580 --> 00:23:20,780 And so our leads are obviously just those little implants out there. 273 00:23:20,780 --> 00:23:23,140 And yeah, that was really it. 274 00:23:23,140 --> 00:23:27,320 What I'm trying to demonstrate here is that you have to have a root node in order to make this work. 275 00:23:27,320 --> 00:23:33,160 So we ended up putting this on just a little Raspberry Pi with an LED screen and carried it around. 276 00:23:35,660 --> 00:23:55,280 So for the root node, we ended up getting to a point where we wanted, since they kept sending out foxes, to dynamically introduce BSS IDs and have the opportunity to remove them at a later date if we needed to or clear everything and start over from scratch. 277 00:23:55,500 --> 00:24:07,360 So we just took a Python script, hooked it up over serial on our root node and sent it a JSON blob and propagated that blob over the mesh to the slaves. 278 00:24:07,720 --> 00:24:25,140 And then we came up with a kind of, just a pseudo TCP SYNAC data flow, I suppose you could say, just to make sure that the message gets out and that the bots acknowledge the message and that we're actually hunting for the thing that we're looking for, 279 00:24:25,140 --> 00:24:26,760 or the things, plural. 280 00:24:27,480 --> 00:24:33,320 And then, you know, you could probably forward the bot data into like a cool web app or something. 281 00:24:33,640 --> 00:24:37,640 But there's only a team of two, so we didn't really get to that. 282 00:24:37,680 --> 00:24:42,340 But there was another project on GitHub that I got some help from. 283 00:24:43,240 --> 00:24:54,740 It's mentioned in the readme somewhere, I can't remember what it's called, but he did some pretty cool visualizations with the wireless traffic for sniffing on just like a single ESP. 284 00:24:56,080 --> 00:25:06,440 So for the bots, like I said, going into this, I didn't even know that I couldn't run promiscuous mode at the same time as station AP mode. 285 00:25:06,620 --> 00:25:09,080 So I was like, oh, oops. 286 00:25:09,080 --> 00:25:13,800 I have to put this into kind of like a bimodal functionality. 287 00:25:14,220 --> 00:25:41,260 So using the task, it's like an asynchronous task scheduler, which is a fancy way of saying you write these responsibilities that the bots are supposed to achieve at any given time, like channel hopping or re-initialization to the mesh network or signal acknowledgements to the other bots. 288 00:25:41,860 --> 00:25:46,900 And yeah, that was kind of a learning experience. 289 00:25:46,900 --> 00:25:51,300 So we came up with this kind of bimodal functionality in short. 290 00:25:52,980 --> 00:26:17,380 And we also found a necessity to kind of change the, when we found a target, we needed to send out an alert and that kind of, with the way the topology changes when the mesh reconnects, we had to kind of change the way that the software is functioning so that the message could get across the mesh network as expediently as possible. 291 00:26:17,880 --> 00:26:38,180 So we ended up leveraging some strategies with NTP, network time protocol, and yeah, keeping everything in synchronization in those bimodal segments at the same time so that each bot was doing the same thing at the same time, if that makes sense. 292 00:26:38,940 --> 00:26:41,040 And we'll talk more about that in a second. 293 00:26:41,040 --> 00:26:42,960 So this is just the basic duty cycle. 294 00:26:42,960 --> 00:27:04,780 So by default, 20,000 milliseconds, communicating over the mesh, renegotiating topology, getting information about NTP synchronizations, and then for nine seconds going promiscuous and continuously scanning, looking for the beacons in the frames, basically 802.11 frames in the air that you're trying to hunt. 295 00:27:07,120 --> 00:27:09,440 And then here's the root duty cycle. 296 00:27:09,440 --> 00:27:26,860 We're handling communications between the mesh, synchronization with NTP, obviously, with the bots, and sending responses to alerts, acknowledging that we've found a target or not, and saving cycles since these things are already so power hungry. 297 00:27:30,230 --> 00:27:50,710 And I'm calling this NTP magic because it was all built in a painless mesh and I can't take credit for implementing it, but basically you take the duty cycle time and then you offset that with the current NTP synchronization interval and that basically just allows everything to do what I call synchronized swimming, 298 00:27:50,710 --> 00:28:12,150 where like we were talking about before, they're communicating at the same time and then they're all scanning at the same time so that when someone finds something, they can automatically jump into a, hey, I found your target alert mode screaming at the air and the rest of the mesh continues to do what it's doing and then the message will come over as soon as the rest of the mesh network gets back into synchronization. 299 00:28:13,410 --> 00:28:16,070 So this is just a short video. 300 00:28:16,490 --> 00:28:23,710 I do apologize, we were trying to get a live demo together and we had some upstream dependency issues that kind of broke. 301 00:28:24,130 --> 00:28:26,050 Is that playing, Todd? 302 00:28:26,050 --> 00:28:27,070 How do you play that? 303 00:28:30,960 --> 00:28:32,640 All right, so you got to give it a sec. 304 00:28:32,640 --> 00:28:46,340 So basically on the left and the right, we're just monitoring serial of two of these bots and what I want you guys to see is them entering the promiscuous mode at the same time and also communicating over the mesh at the same time, making NTP negotiations. 305 00:28:50,400 --> 00:28:51,720 It takes a sec. 306 00:28:51,720 --> 00:29:02,200 This is kind of one of the hardest things that we had to wrap our heads around because sometimes there'd be interference where a leaf wouldn't be able to, or a bot as we call them, wouldn't be able to communicate back to the root node. 307 00:29:02,200 --> 00:29:06,820 So independently, it still needed to be in sync with the rest of the mesh. 308 00:29:06,820 --> 00:29:14,800 Yeah, so the bot initialization, it's in mesh communication mode right now and there's actually a lot of back-end calls that are happening. 309 00:29:14,880 --> 00:29:22,940 You can change the debug level on the painless mesh library to get more granular view of the things that are actually taking place. 310 00:29:22,940 --> 00:29:25,160 Oh, and then there's beacons. 311 00:29:25,920 --> 00:29:40,480 And it's actually capturing the whole 802.11 frame and we ended up having to capture probe requests too because they had a fox where you actually had to capture the source PSSID of who was making a probe. 312 00:29:40,640 --> 00:29:45,340 So we had to kind of change our tactics later on in the CTF for that as well. 313 00:29:45,340 --> 00:29:47,580 So right now, it's just a conditional block. 314 00:29:47,580 --> 00:29:56,300 It looks for a beacon that's in an array of PSSID targets that you're looking for and then if it doesn't find a beacon, it'll check the probe. 315 00:29:57,400 --> 00:30:05,260 And so the waterfall of data that you're seeing here, just like Minnie was saying, is the beacons that we're capturing in sniffing mode. 316 00:30:05,260 --> 00:30:06,920 And we do that for 20 seconds. 317 00:30:07,140 --> 00:30:11,380 And then they go back into mesh communication mode. 318 00:30:11,380 --> 00:30:13,240 I think you had a better name for it. 319 00:30:13,920 --> 00:30:15,780 Mesh communication mode works. 320 00:30:15,840 --> 00:30:16,600 Awesome. 321 00:30:16,860 --> 00:30:18,400 I'll take credit for that. 322 00:30:25,090 --> 00:30:27,150 And this looks like a duplicate slide. 323 00:30:28,050 --> 00:30:29,010 My bad. 324 00:30:29,890 --> 00:30:47,390 These are just the JSON blobs, the data we're sending back to the root node and then we just put some directional arrows on there to indicate that while we didn't have to do as much walking as we did in the stationary hunt, we still had kind of a patrol that we would do so that we had a higher likelihood of capturing the operator on the move. 325 00:30:47,390 --> 00:30:52,350 And you can see here that we didn't deploy these all over Caesars. 326 00:30:52,350 --> 00:30:54,430 This was a proof of concept for us. 327 00:30:54,590 --> 00:31:07,190 So the limitation here is that our mesh network would only work for us in the one specific place that we deployed it, which this is kind of a map of the hallway right around the wireless CTF from last year. 328 00:31:07,630 --> 00:31:11,510 And that was, you know, an obvious limitation of what we did. 329 00:31:11,630 --> 00:31:19,950 Yeah, and granted, you could consolidate all your root nodes and create a distributed C2 strategy if you wanted to. 330 00:31:20,430 --> 00:31:22,290 It wouldn't be a huge push-up. 331 00:31:23,690 --> 00:31:26,070 This is the alert mode I was talking about. 332 00:31:26,070 --> 00:31:33,770 So basically, like I was saying, it stops everything it's doing and it just starts screaming at the rest of the network indicating that it's found the target. 333 00:31:34,230 --> 00:31:51,330 And it does that for a certain amount of time before it receives an acknowledgement from the root and then it also sends back a finish acknowledgement back to the root to tell the root to shut up and get back to its job of listening to as much traffic as possible. 334 00:31:51,570 --> 00:31:59,730 And then it re-synchronizes with the same NTP offsets and goes back to its default communication mode with the mesh. 335 00:32:02,990 --> 00:32:04,110 All right. 336 00:32:05,070 --> 00:32:12,290 So, on the left here, this is a bunch of traffic on the root node over serial. 337 00:32:12,570 --> 00:32:20,250 So you can see the different connections that we're making wirelessly with our slaves. 338 00:32:20,250 --> 00:32:32,930 And then on the right, I don't know if you guys can see it in the upper right-hand corner, that's going to be an updater script where we're updating the root over serial before the root sends out commands to the rest of the bots in the mesh. 339 00:32:33,990 --> 00:32:41,510 And then on the bottom right, I was just using that as an indicator to synchronize the videos because there's another video that's overlaid on top of this. 340 00:32:41,510 --> 00:32:42,210 Give us a sec. 341 00:32:42,210 --> 00:32:43,870 We're not great video editors. 342 00:32:44,570 --> 00:32:45,750 Don't judge us. 343 00:32:52,830 --> 00:32:55,170 Okay, so, yes, I sent a target. 344 00:32:55,870 --> 00:32:57,710 That's a MAC address right there. 345 00:32:58,630 --> 00:33:01,230 And that's a real MAC address of one of my devices. 346 00:33:01,710 --> 00:33:09,290 Anyways, the root is acknowledging with the JSON blob that it's received it and it's sent it over the mesh. 347 00:33:09,290 --> 00:33:11,430 I'm just printing out the JSON on the left there. 348 00:33:11,430 --> 00:33:14,270 So now these nodes are actually hunting. 349 00:33:16,090 --> 00:33:18,270 Is the overlay video going to play now? 350 00:33:20,710 --> 00:33:21,610 There it is. 351 00:33:21,610 --> 00:33:23,590 All right, so, we're in a library. 352 00:33:24,330 --> 00:33:28,170 And as you can see, there's one of our nodes connected to a Chromebook. 353 00:33:30,210 --> 00:33:32,930 And I'm going back to my root next to Spider-Man. 354 00:33:35,510 --> 00:33:38,430 And we're trying to show you guys here that there's no smoke and mirrors. 355 00:33:42,040 --> 00:33:51,080 And when it catches a target, it's going to spit out something in that Python monitor script on the left that's green, indicating that it's found one of its targets. 356 00:33:51,080 --> 00:33:54,700 And we also wrote a script where it goes through... 357 00:33:54,700 --> 00:33:55,440 Oh , there it goes. 358 00:33:55,440 --> 00:33:59,960 And Todd's about... I don't know if there... he's over there. 359 00:34:00,080 --> 00:34:02,920 Like, oh, what, 50 meters away or so? 360 00:34:03,120 --> 00:34:04,560 Probably like 50 feet, yeah. 361 00:34:04,560 --> 00:34:06,460 Yeah, and it's pretty basic. 362 00:34:06,460 --> 00:34:08,440 You know, you just have one slave out there. 363 00:34:09,520 --> 00:34:15,420 You probably can't see it from back there, but the last number on the right, that highlighted green, is the RSSI value. 364 00:34:15,420 --> 00:34:16,560 It's negative 85. 365 00:34:16,560 --> 00:34:18,640 Yeah, and now it's negative 78. 366 00:34:20,260 --> 00:34:25,880 And so, yeah, the script we wrote, you can also pull that out and go straight into arrow dump. 367 00:34:25,880 --> 00:34:32,260 So, we also had an alpha card, and we would just dump that BSSID straight in and start hunting. 368 00:34:32,420 --> 00:34:35,760 But for demonstration purposes, we kept it in monitor mode. 369 00:34:35,760 --> 00:34:40,500 Yeah, that's when we'd switch into just the traditional hunting direction finding. 370 00:34:41,140 --> 00:34:54,020 But one really neat thing about the way that we deployed these, and just, I mean, it wasn't anything we did, it's just the theory behind it is, especially with the RSSI values and the different nodes that are communicating back, at that point, we can establish direction, 371 00:34:54,020 --> 00:34:54,340 right? 372 00:34:54,340 --> 00:35:08,000 So, if we're in a hallway and everybody's going that way, but our signal is coming back to us saying that, hey, the signal's getting stronger, and each subsequent node is telling us it's right there, and we're just looking for the people or person that's just walking towards us, 373 00:35:08,000 --> 00:35:13,200 and that's when we kind of switch into the traditional mode and get on our feet. 374 00:35:17,370 --> 00:35:18,850 Oh, there we go. 375 00:35:19,450 --> 00:35:21,570 And we thought this was interesting. 376 00:35:21,570 --> 00:35:30,010 While we were doing the CTF, we had noticed other people were putting these things, this is not ours, other people were putting these out in the field for shenanigans like de-authentication. 377 00:35:30,590 --> 00:35:38,630 We got really frustrated at the end of the hunt because we hadn't found any foxes, so we just downloaded, what's his name, Space Hoon? 378 00:35:38,630 --> 00:35:50,090 Space Hoon's beacon spamming software, and started beacon spamming out the target VSS IDs in and around the village, just to drive the other teams crazy. 379 00:35:50,110 --> 00:35:51,310 Yeah, so you heard that right. 380 00:35:51,310 --> 00:35:54,930 We didn't find the fox, so I hope we didn't say that at the beginning. 381 00:35:54,930 --> 00:35:56,570 Yeah , here's how you find a fox. 382 00:35:56,730 --> 00:36:00,010 This was just kind of our approach, we thought it was cool and novel. 383 00:36:01,090 --> 00:36:05,870 And we did get very frustrated, but we got kind of our... 384 00:36:05,870 --> 00:36:08,390 We wasted a bunch of some of these guys' time. 385 00:36:08,390 --> 00:36:10,470 Yes, it was vindictive for us. 386 00:36:11,190 --> 00:36:16,570 At least two people went chasing our signal, and Mini did something very evil. 387 00:36:17,010 --> 00:36:26,190 He set a delay in when the beacon would spam, so it wouldn't just be constant, it would be like every seven seconds you'd get a beacon spam for three seconds. 388 00:36:26,190 --> 00:36:29,690 It was every 25 seconds, and it would be for like two seconds. 389 00:36:29,690 --> 00:36:31,170 You'd just get a little blip. 390 00:36:31,170 --> 00:36:39,970 25 seconds is long enough for you to think that, okay, I'm going to go out in that hallway, and I'm going to go down this way, and then before you know it, your signal's gone. 391 00:36:40,470 --> 00:36:48,930 So we watched people, and the desperation in their face, as they went out into the hallway, thinking they found it, and then it just disappeared, and just their face went white. 392 00:36:49,610 --> 00:36:51,990 And then we targeted that team from Idaho. 393 00:36:51,990 --> 00:36:54,190 Do you remember the gentleman with the white beard? 394 00:36:54,190 --> 00:36:54,550 Yeah , yeah. 395 00:36:54,550 --> 00:37:03,550 Hunter tablet, we kind of followed him over, and then we placed one of them behind the TV, we knew one of the goons, and he was like losing his mind for a good 20 minutes. 396 00:37:03,550 --> 00:37:05,230 We kind of felt, did we apologize to him? 397 00:37:05,230 --> 00:37:05,470 Yeah. 398 00:37:05,470 --> 00:37:06,090 Okay. 399 00:37:09,620 --> 00:37:27,400 So since we basically came up with this little scheme to have a, what I call, a Wi-Fi C2, if you will, it'd be really cool to apply the distributed model to the stuff that's already out there for the ESP8266 software, like the beacon spamming, and instead of just throwing them out there in beacon spamming, 400 00:37:27,400 --> 00:37:35,140 to actually have some level of control and feedback, deauth would be cool too. 401 00:37:35,700 --> 00:37:51,480 I mean, I'm not going to like suggest it to anyone, but I'll just say, just imagine if you placed these outside, if someone placed these outside of like an enterprise or something like that, and just like sat in their car and screwed around with the Python script for a couple hours, 402 00:37:51,480 --> 00:37:59,360 you could like, you could probably, I mean, theoretically, I'm not suggesting anything to anyone, but it'd be kind of fun. 403 00:38:01,760 --> 00:38:15,380 So, for the future, we were thinking 802.11, maybe one of the reasons we didn't find the foxes, there was like, there's just so much saturation, there's so many pineapples, and there's so much shenanigans. 404 00:38:15,720 --> 00:38:21,260 Some of the times we couldn't even get like traffic back from the mesh, depending on where we deployed it. 405 00:38:22,320 --> 00:38:37,920 Yeah, and the way that that looked in the spectrum, so like if you were using regular tools like AeroDump, what you would see is every 20 seconds, an access point would stand up on one of our ESPs, and it was called test in production, I think. 406 00:38:37,920 --> 00:38:53,080 And so you would see that pop up, but folks who are walking around with pineapples, that are doing what's called karma mode, where they're just responding to every single beacon as if they are a legitimate access point, are stealing those handshakes, right? 407 00:38:53,080 --> 00:38:58,200 Or stealing those initial connection attempts. 408 00:38:58,200 --> 00:39:14,400 So whenever we would stand up in station AP mode, our theory is, we didn't collect the data on this, you know, while we were doing it, but our theory is that we would lose connection, because our node would try to connect to that karma response. 409 00:39:15,380 --> 00:39:25,530 So 802.11 really is not a great protocol, Wi-Fi is not a great protocol to backhaul all your communications back to the root node on. 410 00:39:26,030 --> 00:39:32,150 Obviously we're going to use it to sniff and all of this stuff, but there's some better options out there. 411 00:39:32,230 --> 00:39:42,550 In terms of reliability, I mean, for obvious reasons, in an environment like this that's so hostile, it's just probably not the best choice, but it's great for a quick and dirty POC. 412 00:39:43,670 --> 00:39:49,970 Otherwise, we're thinking about switching it up to something more expensive that Todd was thinking about. 413 00:39:50,110 --> 00:39:58,010 Yeah, well, like, if we could just stomach more money just walking away with each node, if somebody walked away with it, then we could do a lot more. 414 00:39:58,330 --> 00:40:01,310 We could build this into dual band. 415 00:40:01,870 --> 00:40:06,090 LoRa is great for, would be our backhaul communications. 416 00:40:06,090 --> 00:40:19,150 We do that over, I forget what frequency it is, but we could use LoRa for backhaul, and obviously, you know, battery packs and all of that, and casings and however we concealed it. 417 00:40:19,350 --> 00:40:28,890 We could definitely dump more money into it, but for us, we wanted to keep costs low and be able to test, deploy, and interact with it pretty quick. 418 00:40:29,070 --> 00:40:39,830 So, in the future, if we can do that, we might seek out a dual band chip to do that with, but that's at like $30 just starting, sometimes more. 419 00:40:40,170 --> 00:40:42,550 If you know of any, please tell us. 420 00:40:42,550 --> 00:40:49,110 Maybe our research is just poor, we haven't found it yet, but a $3 dual band chip would be ideal. 421 00:40:50,210 --> 00:40:57,890 Yeah, yeah, we were thinking about just, well, should we talk about the other idea, about clustering the USPs together? 422 00:40:57,930 --> 00:41:04,290 Yeah, so, switching between the modes takes a lot of power. 423 00:41:05,510 --> 00:41:07,830 And there's a lot of overhead, too. 424 00:41:07,830 --> 00:41:08,270 There is. 425 00:41:08,270 --> 00:41:17,930 Things are running on a single thread, even though it's asynchronous, it's pseudo-asynchronous, it's basically like coding in the 90s, I guess, whatever that's like. 426 00:41:17,930 --> 00:41:23,210 Right, you're taking up most of that 1 meg code RAM. 427 00:41:23,210 --> 00:41:30,470 That 1 meg RAM is just being eaten up by both of your processes for going from station mode to sniffing mode. 428 00:41:30,470 --> 00:41:35,190 So, you could just distribute that over two ESPs and put them in the same box. 429 00:41:35,790 --> 00:41:40,410 Doubles your cost of a node, because it's two ESPs, it's not a big deal. 430 00:41:40,610 --> 00:41:43,470 But now you have more processing power available to you. 431 00:41:43,470 --> 00:41:45,830 Yeah, they can just communicate over serial to you. 432 00:41:45,830 --> 00:41:53,570 And we could sleep one chip while the other one's monitoring, and you save power that way, too. 433 00:41:53,870 --> 00:41:55,370 Yeah, definitely. 434 00:41:56,250 --> 00:42:05,610 But obviously, implications with going with the hardware Todd's talking about, we'd have to roll our own code and stop copying other people's stuff. 435 00:42:05,610 --> 00:42:08,830 Which is actually the reason we didn't have a live demo today. 436 00:42:09,690 --> 00:42:15,330 Five days ago, somebody committed an update to one of the libraries we were dealing with, and... 437 00:42:15,330 --> 00:42:21,290 What we know is we didn't track our dependencies well, and the last time that the compiled version worked was May. 438 00:42:21,330 --> 00:42:26,370 So it's on GitHub, and it's MIT, so you guys can take it and do whatever you want with it. 439 00:42:27,010 --> 00:42:29,230 All we know is back in May it was working fine. 440 00:42:29,230 --> 00:42:34,930 Yep, and so if we had our own painless mesh library, obviously we'd be testing any changes there. 441 00:42:34,930 --> 00:42:39,270 But we rushed into it, didn't version stuff, and... shit broke. 442 00:42:39,270 --> 00:42:51,630 Yeah, and just want to tip our hat for all the people who wrote a lot of these lower-level libraries for the ESPs, and for all the other talkers that did such an awesome job here, and for having us. 443 00:42:51,630 --> 00:42:53,210 Thank you guys very much. 444 00:42:53,270 --> 00:42:53,750 Yeah. 445 00:42:53,750 --> 00:42:55,410 Do you guys have any questions? 446 00:42:55,710 --> 00:42:56,130 No? 447 00:42:56,130 --> 00:42:56,850 All right. 448 00:42:58,470 --> 00:42:59,930 We got two. 449 00:42:59,930 --> 00:43:01,010 Way back there. 450 00:43:02,990 --> 00:43:05,130 I can't hear you, dude. 451 00:43:06,490 --> 00:43:07,710 Just yell. 452 00:43:12,260 --> 00:43:13,660 The BLE? 453 00:43:14,240 --> 00:43:17,820 Yeah, that was an option, but cost-prohibitive. 454 00:43:18,920 --> 00:43:21,940 Let me repeat the question, make sure I got it right. 455 00:43:21,940 --> 00:43:26,300 Did we think about using BLE for communication across nodes? 456 00:43:26,500 --> 00:43:26,960 Yes. 457 00:43:26,960 --> 00:43:36,120 Cost-prohibitive for us, because we had to sniff with the wireless chip anyways, so putting another chip on there... 458 00:43:39,410 --> 00:43:41,010 32 does. 459 00:43:41,010 --> 00:43:42,350 He says the 32 has BLE. 460 00:43:42,350 --> 00:43:48,670 Yes , 8266 is like a stripped-down Honda Civic, right? 461 00:43:49,110 --> 00:43:52,610 ESP32 is like an elite Hyundai. 462 00:43:54,650 --> 00:43:59,650 You know, it's still not like the best, but you do get BLE with it, which would be a great idea. 463 00:43:59,650 --> 00:44:02,810 If I wasn't so cheap, I probably would do that. 464 00:44:02,810 --> 00:44:03,810 Great question. 465 00:44:03,810 --> 00:44:04,890 Yes. 466 00:44:13,280 --> 00:44:14,320 No. 467 00:44:15,160 --> 00:44:16,280 Can you repeat the question, Todd? 468 00:44:16,280 --> 00:44:21,840 Yeah, did we have a linear regulator that... 469 00:44:31,750 --> 00:44:32,930 Right. 470 00:44:33,850 --> 00:44:35,970 Yeah, we just plugged it straight in. 471 00:44:35,970 --> 00:44:37,410 We were like, let's go. 472 00:44:37,510 --> 00:44:42,450 So that may have been part of our power usage issue, for sure. 473 00:44:42,810 --> 00:44:44,410 Okay, thank you. 474 00:44:44,890 --> 00:44:46,590 Other question up here? 475 00:44:47,130 --> 00:44:47,910 Yeah. 476 00:45:04,890 --> 00:45:23,330 So the question was if the current constraints of the hardware limited the amount of beacons we were able to parse, and the answer was, I mean, it depends on how fast you're hopping channels, and we didn't really have a baseline to measure it against, 477 00:45:23,330 --> 00:45:33,010 but from what I could tell, compared to just standard arrow dumps with an alpha card and a laptop, it was actually, it pulled out a good amount of data. 478 00:45:33,690 --> 00:45:38,490 Yeah, we weren't storing every single beacon correct. 479 00:45:38,490 --> 00:45:43,570 We were just churning through it and comparing the beacon address. 480 00:45:44,050 --> 00:45:45,590 I don't know, you wrote that logic. 481 00:45:45,590 --> 00:45:46,170 What did we do? 482 00:45:46,170 --> 00:45:48,230 Yeah, we were just looking for the beacon. 483 00:45:48,230 --> 00:45:49,230 Yeah, we would just compare it. 484 00:45:49,230 --> 00:45:50,670 If it was the right one, then we popped it. 485 00:45:50,670 --> 00:45:51,710 And the probes eventually. 486 00:45:51,970 --> 00:45:54,250 Any other questions? 487 00:45:55,170 --> 00:45:56,350 Okay, thank you all very much. 488 00:45:56,350 --> 00:45:56,850 Thanks, guys. 489 00:45:56,850 --> 00:45:57,870 Enjoy the rest of your DEF CON. 490 00:45:57,870 --> 00:45:58,110 Thank you.