[00:00.000 --> 00:04.320] Today we're going to be talking about hunting mobile rogue access points. [00:04.840 --> 00:10.420] And so it's kind of the same methodology, but we've beefed it up just a bit. [00:10.860 --> 00:12.140] I'm Todd Parity. [00:12.720 --> 00:13.820] I'm Minnie. [00:13.940 --> 00:19.140] We're out of Colorado. We're both pen testers, and we like to do stuff on the side for fun. [00:19.140 --> 00:23.140] So none of the things that we're going to talk about today reflect anything about our employers. [00:23.320 --> 00:28.040] This is all a personal project, especially any opinions or jokes we might make. [00:28.040 --> 00:30.960] These were not approved by our employers. [00:32.300 --> 00:33.180] All right. [00:35.780 --> 00:40.040] So, first of all, whenever we give this presentation, we like to just set the stage [00:40.040 --> 00:42.540] so that everybody understands what we're talking about. [00:42.540 --> 00:44.820] What is a rogue access point? [00:44.940 --> 00:50.420] A rogue access point is a wireless access point that's either misconfigured or maliciously [00:50.420 --> 00:55.580] configured and exists in a hardware baseline that you don't want it there. [00:55.580 --> 00:58.960] So the idea is you want to find these and get rid of them. [00:59.040 --> 01:01.040] They come in all sorts of forms. [01:01.040 --> 01:07.720] You know, you have sysadmins that set up an old Netgear router, hoping to get stuff done, [01:07.720 --> 01:09.080] and they leave it open. [01:09.080 --> 01:14.680] Or you have a retail shop that installs a wireless extender, and they authenticate to your [01:16.140 --> 01:21.900] WPA2 main hub, and anybody else can access that extender because it is broadcasting open. [01:21.900 --> 01:23.520] Boom. Right behind the network. [01:23.520 --> 01:32.520] So these are real threats in terrestrial networks, and they require some specific [01:32.520 --> 01:34.420] tactics to find out. [01:34.560 --> 01:40.240] So last year, Minnie and I talked about hunting the stationary APs. [01:40.480 --> 01:46.760] There's a link here that I guess we'll post the slides on the Wireless Villages page. [01:46.900 --> 01:49.600] Follow the link, watch our talk from last year. [01:49.600 --> 01:51.180] We won't talk too much about it. [01:51.180 --> 01:53.700] But this year we're talking about mobile rogue APs. [01:53.700 --> 01:55.060] These are the foxes. [01:55.440 --> 01:59.360] If you're competing in the CTF, if you've ever competed in the CTF, you know that this [01:59.360 --> 02:01.160] is one of the challenges. [02:01.280 --> 02:05.940] Go out and find a wireless access point that's roaming around. [02:05.940 --> 02:11.300] Now this presents its own challenges, because in order to find it, whatever gear you have [02:11.300 --> 02:17.920] with you, that antenna pattern has to match the antenna pattern of what you're searching [02:17.920 --> 02:18.460] for. [02:18.460 --> 02:20.680] At least they have to be in the same vicinity. [02:20.680 --> 02:26.200] So you can spend a ton of time on your feet looking for a fox and never pick up its signal [02:26.200 --> 02:28.460] if you're not doing things right. [02:29.120 --> 02:34.020] And if you go back and watch our talk from last year, it's pretty much what happened. [02:34.020 --> 02:35.220] We just walked around a lot. [02:35.220 --> 02:41.320] If you think about Caesar's Palace blueprints, and if you put a Roomba on that blueprint, [02:41.320 --> 02:42.580] that's pretty much what we did. [02:42.580 --> 02:46.280] It just went back and forth until we found the stationary AP. [02:46.280 --> 02:51.880] So hunting mobile APs takes on its own form. [02:52.180 --> 02:57.260] Because you can go back and forth just like a Roomba would to try to cover your entire [02:57.260 --> 02:57.940] search space. [02:57.940 --> 03:01.680] But if you're not in the same place as the fox, you're going to miss them. [03:02.720 --> 03:04.100] So it's attacker controlled. [03:04.100 --> 03:07.980] The attackers got the hardware on themselves. [03:08.980 --> 03:12.260] So for any sort of hunting, what do you need? [03:12.260 --> 03:17.500] What are the key pieces of information that you need to go out and hunt the rogue AP? [03:18.360 --> 03:20.440] You have to be able to identify your target. [03:20.440 --> 03:26.960] Here in the wireless CTF, the organizers post a BSSID and that's it. [03:27.100 --> 03:28.440] They'll just give you a BSSID. [03:28.440 --> 03:29.400] They don't tell you the frequency. [03:29.400 --> 03:30.680] They don't tell you the channel. [03:30.700 --> 03:32.260] And you've got to go out and find it. [03:32.340 --> 03:36.300] So you have to at least start with a BSSID. [03:36.300 --> 03:41.620] And a lot of folks will pick this up like if they're doing this threat hunting for real. [03:41.620 --> 03:45.080] They'll have some indication that something's wonky in their environment. [03:45.080 --> 03:50.000] And they'll be able to pull a BSSID and that's what they start from. [03:50.640 --> 03:55.100] So it's better if you have a frequency and a channel because you narrow your search space. [03:55.140 --> 03:57.960] You can tune your gear a lot easier that way. [03:58.180 --> 04:02.080] But you also have to deal with a bunch of structural and wireless interference. [04:02.100 --> 04:06.080] So you may need different types of antennas, directionals. [04:06.080 --> 04:11.360] In our talk last year, we talked about not using Yagi's for these types of hunting. [04:11.500 --> 04:13.080] It's kind of cool. Looks cool. [04:13.080 --> 04:16.520] You're walking around with this big thing that looks like a sniper rifle. [04:17.080 --> 04:19.320] But it actually makes the search a lot harder. [04:19.320 --> 04:24.940] Because remember, your antennas, your radiation patterns have to overlap. [04:24.940 --> 04:29.380] And if you've got a soda straw that you're just pointing around in whatever direction, [04:29.380 --> 04:32.980] then it's going to be really difficult to find somebody else's donut. [04:33.980 --> 04:40.600] And here, especially this year, for the contest, you have a huge space to cover. [04:40.600 --> 04:43.660] Last year we talked about Caesar's Palace. [04:43.660 --> 04:53.280] Something like 60 acres of space, 30,000 people, 600 floors of rooms. [04:53.280 --> 04:54.840] So just tons of space to cover. [04:54.840 --> 04:56.860] And this year we're across three different casinos. [04:56.860 --> 05:00.720] So you just imagine how that scales up. [05:02.560 --> 05:10.100] So, coming off our success from DC25, finding the stationary access point, [05:10.100 --> 05:13.140] Minnie and I decided that we were done walking around. [05:13.420 --> 05:16.400] Like, we were going to cut that out of our strategy immediately. [05:16.620 --> 05:21.880] I get shin splints really easy, I've got flat feet, and Minnie's got a bum knee. [05:21.920 --> 05:27.760] So, we were done walking and we thought, okay, how do we approach this in a smart way? [05:27.760 --> 05:34.300] So our idea was, let's just sit still, or at least relatively still. [05:34.300 --> 05:42.000] Let's deploy some sort of sensor that can just stay in one place and somehow we get notified. [05:42.340 --> 05:47.840] Well, one way to do that is just get a huge team of people, 12 plus people. [05:47.860 --> 05:52.540] Everybody gets a raspberry pie and you're on ham radio and you all go out to your different locations. [05:52.540 --> 05:55.460] Well, guess what? People are unreliable. [05:55.760 --> 05:57.700] And they suck at communicating. [05:57.700 --> 06:04.040] So, we needed something that we could control, something that had a protocol that made sense to us, [06:04.040 --> 06:08.580] that we could check out and would work, you know, 9 times out of 10. [06:08.580 --> 06:13.460] Of course, we wanted 10 out of 10, but 9 times out of 10 is good enough for us. [06:15.920 --> 06:26.280] So with that in mind, traditional hunting takes, you know, walking around but using direction finding. [06:26.280 --> 06:28.080] And that's still important to us. [06:28.080 --> 06:33.420] Even though we didn't want to walk around, we still have to eventually use traditional methods. [06:33.560 --> 06:39.160] So the idea is, once we deploy an automated non-human sensor network, [06:39.160 --> 06:42.340] and at this point we still didn't know what that would be, [06:42.340 --> 06:48.380] we're going to narrow down our search space and be notified where we need to be next. [06:48.380 --> 06:51.660] And hopefully we're somewhat close to where we need to be next. [06:51.660 --> 06:56.820] And we thought that might make things just a little more efficient. [06:57.860 --> 07:00.900] So another thing that we needed to make sure is that we kept our costs down. [07:00.900 --> 07:04.460] Like I said at the beginning, Minnie and I bankrolled this whole project ourselves, [07:04.460 --> 07:08.820] and we're pretty poor, so we had to keep all of our costs down. [07:08.920 --> 07:11.760] Also, we had to keep our costs down for this last point, [07:12.500 --> 07:18.120] because we needed to make these things concealable, at least to compete in the wireless CTF. [07:18.120 --> 07:24.260] We wanted to be able to place whatever these sensors would be, [07:24.260 --> 07:28.480] we wanted to be able to place them in places that we didn't have to have physical security over. [07:28.600 --> 07:30.040] That we could just leave them there. [07:30.200 --> 07:33.720] And it's DEF CON, there's a bunch of thievery happening here. [07:34.040 --> 07:37.860] If you guys see things on the walls or on tables, you're probably going to pick it up. [07:38.060 --> 07:44.020] This is important because we could have built out this whole strategy I've described so far [07:44.020 --> 07:50.880] by just buying a bunch of Aruba access points, or Cisco Enterprise access points, [07:50.880 --> 07:53.620] because they have this functionality built into them. [07:53.780 --> 07:57.620] If you deploy enough of them, they can build out a two-dimensional heat map, [07:57.620 --> 08:04.100] and you can see relatively where specific users, specific access points are. [08:04.880 --> 08:12.860] But at $500 to $1500 a wireless access point, we didn't want those just walking off here at DEF CON. [08:12.860 --> 08:23.140] So our approach was a low-cost, rapid prototype of a deployable and unmanned sensor network. [08:24.340 --> 08:29.160] So after doing some research, trying to figure out what devices kind of fit that model, [08:29.160 --> 08:32.140] we came across the ESP8266. [08:32.140 --> 08:35.160] How many of you ever played around with this before? [08:35.200 --> 08:37.500] It's gaining popularity. [08:37.500 --> 08:44.180] The ESP family of wireless chips has been around, at least the DEF CON scene, for a long time. [08:44.260 --> 08:50.660] The last several years, some of the badges have featured ESPs, ESP32s, [08:50.660 --> 08:55.160] and then obviously a lot of the Indy badges feature that same chip. [08:55.560 --> 08:57.340] There's a lot of functionality in them. [08:57.340 --> 09:01.260] For us, the ESP32 is a little more expensive than what we wanted. [09:01.260 --> 09:07.620] I think it came in at about a $15 a node price, and we wanted to keep costs extremely low. [09:07.620 --> 09:10.780] So if you see here, it's $3. [09:11.380 --> 09:15.160] Get it on Amazon, $3, no big deal. [09:15.800 --> 09:18.980] And that was the building block for our whole sensor network. [09:19.500 --> 09:21.740] These were released in 2014. [09:21.960 --> 09:23.760] Somebody out of China was manufacturing them. [09:23.760 --> 09:29.140] Nobody here really caught wind of it, except if you were really into hardware hacking. [09:29.140 --> 09:35.680] And then Hackaday picked up the ESP8266 for one of their pieces. [09:36.060 --> 09:41.040] And there's a great article on what they were able to do with the ESP8266. [09:41.360 --> 09:43.240] Because it's pretty unique. [09:43.240 --> 09:49.480] At $3, you get almost 20 dB out of this tiny little chip that's powered by 3.3 volts. [09:49.480 --> 09:52.200] So in open space, some people have done tests, [09:52.200 --> 09:58.120] and it reaches client to the wireless access point is about 300 meters. [09:58.120 --> 10:02.120] So it's got a really, really good radiation pattern. [10:03.000 --> 10:13.660] And even better in the chip is all the functionality that you need to run WPA and WPA2. [10:13.860 --> 10:17.080] So that meant that we didn't have to write that from scratch, [10:17.080 --> 10:20.080] which is really important for me because I'm a horrible coder. [10:20.080 --> 10:25.120] Really important for many because I didn't want to turn them into a slave during this project. [10:25.120 --> 10:32.880] So the ESP8266 has two GPIO transmit and receive serial pins. [10:33.160 --> 10:36.480] This is really neat for debugging because we can just see. [10:36.480 --> 10:42.280] We can print stuff out, you know, just like really rudimentary debugging. [10:42.720 --> 10:45.240] Entering our own print line, seeing what's going on. [10:45.540 --> 10:50.480] But it also allows us to combine multiple ESPs if we wanted to. [10:50.480 --> 10:56.740] Or put other sorts of sensors on it so that we can read and control what's going on. [10:56.740 --> 11:03.900] So this quickly became our number one choice for how we would build this network out. [11:03.900 --> 11:06.460] It's got a 32-bit RISC processor on it. [11:07.280 --> 11:10.160] You can overclock it up to 160 megahertz. [11:10.660 --> 11:13.780] And one of the limitations is it only has a meg of RAM, [11:13.780 --> 11:17.200] and that's for both program code and user data. [11:17.200 --> 11:22.660] So that may not seem like it now, but when you're dealing with wireless stuff, that's very small. [11:22.700 --> 11:28.360] So our ability to just dump a bunch of logic onto this is slim. [11:29.160 --> 11:35.140] It runs on 3.3 volts, which means you can power it with a little tiny coin cell. [11:36.300 --> 11:41.020] A lot of the projects that you'll find online for 8266 is a bunch of IoT stuff. [11:41.020 --> 11:46.960] Farmers who are monitoring their water flows, and folks who are watering plants, [11:46.960 --> 11:50.300] and a lot of watering going on with 8266s, [11:50.300 --> 11:56.080] because they act as a wireless access point themselves, and they run natively. [11:56.080 --> 11:59.960] If you just bought this right now, this little guy, [11:59.960 --> 12:04.640] and it came to you over Amazon, and you just powered it up on 3.3 volts, [12:04.640 --> 12:07.260] it's got a full web server running on it. [12:07.260 --> 12:09.200] So it's really plug and play. [12:09.200 --> 12:12.320] You just start working with it, access the website, [12:12.320 --> 12:18.140] and kind of build it to suit your needs just from there. [12:19.660 --> 12:23.500] Yeah, so if you hadn't seen one before, that's about how small it is. [12:25.120 --> 12:29.160] Picture does not depict actual size. I forgot to put that up there. [12:31.340 --> 12:34.220] Indoors, it has a pretty limited range, what wireless doesn't, [12:34.220 --> 12:36.200] because you're dealing with a bunch of concrete and steel, [12:36.200 --> 12:39.620] and here you're dealing with a bunch of water, because all the humans walking around. [12:39.620 --> 12:43.300] You've got about 80% water. That's a lot of attenuation happening. [12:44.560 --> 12:48.420] And if you're running, if you're using the wireless chipset the entire time, [12:48.420 --> 12:50.320] it's super power-hungry. [12:50.320 --> 12:53.420] So this, what we ended up learning as we built these, [12:53.420 --> 12:58.140] is these coin cells running with our code base lasted about 15 minutes, [12:58.140 --> 13:00.220] which was awesome. [13:00.220 --> 13:02.280] And then it got really, really hot. [13:02.280 --> 13:04.520] So if you had little tiny robin eggs, [13:04.520 --> 13:10.060] you could crack them on top of the chip and you'd have breakfast for a minute. [13:11.140 --> 13:14.960] The other limitation is it's 2.4 gigs only. [13:14.960 --> 13:16.960] That's the only band that it operates on, [13:16.960 --> 13:19.300] which is a limitation for the contest, [13:19.300 --> 13:22.640] because there's a ton of stuff in the wireless CTF that is on 5 gigs. [13:22.640 --> 13:25.520] So that's just completely out of the ballpark for us. [13:27.260 --> 13:29.500] But it makes a really good proof of concept. [13:29.500 --> 13:33.440] So if we decide that we can stomach more cost per node, [13:33.440 --> 13:37.140] we can upgrade that to a dual-band chip and move on. [13:40.300 --> 13:44.260] So I want to walk you through a bit of history, [13:44.260 --> 13:47.940] lessons learned, or just a journey of the 8266. [13:48.280 --> 13:50.780] Since we picked this up last year, [13:50.780 --> 13:56.280] about December of 2017 is when we started this project [13:56.280 --> 13:59.120] so that we could compete last year in the wireless CTF. [14:01.280 --> 14:05.400] The 8266 didn't have a lot of documentation online. [14:06.280 --> 14:10.380] What it did have was inconsistent between different sources. [14:11.180 --> 14:14.020] Even worse, the tooling was just not even there. [14:14.020 --> 14:18.500] So development boards didn't really exist for this specific model. [14:18.500 --> 14:20.780] Now, for the 32, they're all over the place. [14:20.780 --> 14:22.760] But this really cheap model, [14:22.760 --> 14:25.240] there wasn't a lot of resources available to us. [14:25.240 --> 14:28.680] So we ended up having to go back to our electrical engineering days [14:28.680 --> 14:31.680] and remind ourselves what a breadboard is. [14:32.200 --> 14:36.840] So this was our first kind of development board. [14:36.960 --> 14:40.400] The idea was, since we were building a network of sensors, [14:40.400 --> 14:42.140] we needed at least three. [14:42.220 --> 14:43.800] One to act as the root node, [14:43.800 --> 14:47.060] and two more so we could see how they communicated with each other. [14:47.180 --> 14:52.620] So this allowed us to program and run the chips all on the same board, [14:52.620 --> 14:54.360] just made it a lot more simple. [14:55.380 --> 15:00.420] Even more simple is how you interact with the 8266. [15:00.680 --> 15:05.740] Flashing firmware, powering it off, putting it into operational mode. [15:05.740 --> 15:07.220] Just these two buttons. [15:07.760 --> 15:14.200] Well, it's a pull-down and a pull-up on two of the GPIO pins, [15:14.200 --> 15:16.800] but we use these buttons to perform that. [15:16.800 --> 15:22.020] And a certain pattern of using those puts the chip into program mode, [15:22.020 --> 15:27.700] so you can take your entire program, load it on, flash it, [15:27.700 --> 15:29.780] and then it resets automatically, [15:29.780 --> 15:31.720] and then it's automatically in operational mode. [15:31.720 --> 15:34.100] So whatever code you're running, you're seeing it happen right there. [15:34.100 --> 15:35.840] So if you're changing the access point, [15:35.840 --> 15:39.300] right after it flashes, that access point name is going to pop up. [15:39.440 --> 15:41.300] So it's really quick, a lot of fun. [15:42.860 --> 15:46.460] Later on, we improved our design for our development board. [15:46.460 --> 15:48.700] This is the next one on the left. [15:48.700 --> 15:52.140] We needed them to be individual nodes. [15:52.140 --> 15:55.580] We are now ready to go out and deploy these and test them more. [15:55.980 --> 16:00.860] So on that board on the right is just a 5-volt FTDI [16:00.860 --> 16:06.060] that has a power regulator on it that takes it down to... [16:06.060 --> 16:08.720] a voltage regulator that takes it down to 3.3 volts. [16:09.400 --> 16:13.020] At $3 a piece, they're pretty... [16:13.460 --> 16:15.820] I mean, what do you expect? They're dainty. [16:15.820 --> 16:20.560] So if you put 3.39 volts into it, they're going to fry. [16:20.600 --> 16:23.660] So it's important that your voltage regulator is sound. [16:23.660 --> 16:25.640] And we found that this one was really good. [16:27.200 --> 16:30.020] And that was 2017. [16:30.340 --> 16:33.320] Earlier this year, on the right, [16:33.320 --> 16:36.460] somebody on Amazon, or somebody released on Amazon [16:36.460 --> 16:40.260] their own USB to ESP UART adapter, [16:40.260 --> 16:45.840] which I cursed at because I really wanted that at the end of 2017. [16:46.220 --> 16:47.960] It would have made things a lot easier. [16:47.960 --> 16:50.900] You see there's a switch on the side instead of two buttons. [16:50.900 --> 16:54.160] Makes it so much faster, smoother development. [16:55.900 --> 17:01.260] And that's $8. That whole thing comes with an ESP8266 [17:01.880 --> 17:05.440] and the development board. That's why I gave you a link. [17:05.440 --> 17:08.820] If you want to get started with this, it honestly just costs you $8. [17:08.820 --> 17:11.900] And it's a great way to dive down into [17:11.900 --> 17:16.140] the actual beacons and packets and frames [17:16.140 --> 17:19.540] that are coming in and out of the 802.11 space. [17:21.780 --> 17:25.900] We've competed in the wireless CTF the last two and a half years. [17:25.900 --> 17:27.100] We didn't do it this year. [17:28.260 --> 17:31.180] And I can't tell you that I ever once [17:31.960 --> 17:36.080] actually looked into a packet and pulled out the beacon. [17:36.180 --> 17:37.360] I just used tools to do it. [17:37.360 --> 17:39.380] So it was really fun to get our hands dirty [17:39.380 --> 17:41.540] and really get down to the protocol level. [17:41.740 --> 17:43.000] Quickly, cheaply. [17:43.760 --> 17:47.460] And now, with a lot more documentation and support out there. [17:48.220 --> 17:49.960] So anyways, that's kind of part of the journey. [17:51.740 --> 17:53.360] After we were done developing, [17:54.340 --> 17:55.680] we had to go back to that requirement [17:55.680 --> 17:59.720] of making our nodes, our sensor nodes, concealable. [18:00.200 --> 18:01.720] Right? Because you all be thieving. [18:01.920 --> 18:04.100] So we needed to make sure you couldn't find them. [18:04.100 --> 18:06.500] Or if you did see them, you didn't think they were anything valuable. [18:06.500 --> 18:09.340] We even got to the point of talking about putting [18:10.880 --> 18:12.820] Cyrillic characters inside of our code [18:12.820 --> 18:14.820] in case anybody dumped the firmware. [18:14.840 --> 18:17.920] So they thought it was coming from somewhere in Eastern Europe. [18:18.880 --> 18:21.640] The NSA actually has their own OUI. [18:21.720 --> 18:29.740] OUI is the first three bytes of the MAC address for your chip. [18:30.280 --> 18:33.720] And so we thought about setting our MAC address to the NSA's OUI. [18:33.720 --> 18:35.660] But Minnie talked some sense into me [18:35.660 --> 18:37.480] and said that probably wouldn't be a good idea [18:37.480 --> 18:40.020] because there might be some legal things that we don't know about. [18:40.440 --> 18:42.860] Anyways, it's public. You can go look it up. [18:42.860 --> 18:46.040] Just go to an OUI database and type in NSA and it's there. [18:47.840 --> 18:49.360] Anyways, I digress. [18:49.620 --> 18:53.260] So we needed to build our concealables. [18:53.260 --> 18:56.780] So we went from the board you saw in the previous one on the right, [18:56.780 --> 18:59.820] which allows us just to take that ESP out [18:59.820 --> 19:04.040] and back in to our deployable, as we call them, on the left. [19:04.080 --> 19:09.640] We upgraded from the nickel cell to lithium ion batteries. [19:09.640 --> 19:12.320] This one is a 3.3 volt. [19:13.020 --> 19:19.560] I think it's a 1200... I don't know what it was in terms of amperage. [19:19.760 --> 19:22.240] But it was enough to last longer than 15 minutes. [19:22.240 --> 19:24.160] These lasted us about two hours. [19:26.180 --> 19:28.720] We rolled through those batteries pretty quick. [19:28.720 --> 19:33.840] But this is just a case. It's a utility case that you might install at your house or something. [19:33.960 --> 19:37.020] And we found that with all the heat that was generated, this wasn't a great idea. [19:37.440 --> 19:41.020] Because there's no way to ventilate all the heat, so that plastic got really hot. [19:41.020 --> 19:43.880] And the last thing we wanted to do was cause another fire. [19:43.880 --> 19:45.340] Well, we didn't cause the fire. [19:46.600 --> 19:49.440] Have another fire at DEF CON. [19:49.500 --> 19:51.920] And these are a little big, right? [19:53.520 --> 19:56.420] I had one earlier, but they're about this big. [19:56.420 --> 19:59.300] About the size of the fish I caught, too. [20:00.860 --> 20:05.520] We realized, probably not an ideal form factor, so we shrunk it even more. [20:06.380 --> 20:08.760] Here's what they look like now. [20:08.840 --> 20:11.200] By the way, Todd's acting like he planned all this. [20:11.200 --> 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. [20:16.660 --> 20:19.780] Yeah, it was a flexible choice. [20:20.340 --> 20:22.000] It was ad hoc. [20:23.140 --> 20:25.800] So it's just this little coin cell holder. [20:25.800 --> 20:32.000] These were for nodes that we were okay with deploying for 15 minutes, going and picking up, and then resetting. [20:32.680 --> 20:37.080] I've got a whole box of ESPs here, I don't know if you can see it. [20:37.080 --> 20:38.160] Come up afterwards. [20:38.620 --> 20:41.200] Yeah, if you'd like one, I'm happy to give them away. [20:42.240 --> 20:44.100] The ones that we're not using now. [20:44.780 --> 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. [20:51.500 --> 20:58.160] And then that is blue masking tape on the battery bank that you see on the left, and it works perfectly. [20:58.160 --> 21:01.080] It distributes heat unimaginably. [21:01.960 --> 21:07.200] All right, and then we just had Velcro on the bottom, so we would stick these, and I think... [21:07.920 --> 21:09.800] We stuck these everywhere. [21:09.840 --> 21:14.320] We stuck them under tables, behind chairs, behind the pillars, on the walls. [21:15.100 --> 21:21.540] TVs, underneath, we came into the wireless village and stuck them underneath the tables. [21:22.360 --> 21:24.660] For purposes we'll explain later. [21:25.760 --> 21:30.420] And, yeah, so that was kind of our deployment strategy. [21:31.820 --> 21:36.020] My goal with this kind of introduction, I'm about to turn the time over to Mini, [21:36.020 --> 21:41.600] was if you hadn't heard of the ESP8266, to kind of give you an introduction to it, [21:41.600 --> 21:45.660] it's an awesome little chip, a great way to get started with wireless stuff, [21:45.660 --> 21:47.920] either if you just need a wireless access point, [21:47.920 --> 21:52.260] or if you want to do some of the more cool things that you can do with the software that you load on, [21:52.260 --> 21:53.880] that Mini's going to talk about, [21:54.720 --> 21:58.440] and then kind of show you our progress for our methodology [21:58.440 --> 22:04.260] and what brought us to the form factor and the deployment that we had here. [22:04.340 --> 22:07.280] So at this point, Mini, I'm going to turn this over to you, [22:07.280 --> 22:09.720] and Mini's going to talk to us about software considerations. [22:11.820 --> 22:15.040] So, yeah, like Todd was saying, we were just looking for something super straightforward [22:15.040 --> 22:21.280] that I could get started with, with a relatively shallow knowledge of wireless and 802.11. [22:21.280 --> 22:23.000] I'm not, like, a wireless expert. [22:23.000 --> 22:26.560] I'm sure all of these fine people over here could tell you a lot more than I could, [22:26.560 --> 22:29.220] so I was just looking to prototype something really quick, [22:29.220 --> 22:32.500] find something with some open source software out there that I could fork [22:32.500 --> 22:37.980] and just bootstrap in and start writing firmware on the fly. [22:38.980 --> 22:40.900] Obviously, I wanted to flash it quick. [22:41.460 --> 22:43.560] I had no idea what I was doing with the hardware. [22:43.560 --> 22:47.400] If I destroyed it in some manner, I didn't want it to matter. [22:47.400 --> 22:50.480] That happened several times, but that's why we work as a team, [22:50.480 --> 22:54.040] because I got to build the new hardware that Mini destroyed. [22:55.340 --> 23:01.900] So we used this prototype software at the time called Painless Mesh [23:01.900 --> 23:07.860] that a guy named GMag wrote, and basically you have a centralized route [23:07.860 --> 23:12.240] and it dynamically forms a wireless topology [23:12.560 --> 23:16.300] based on some kind of shortest path algorithm in the background. [23:16.580 --> 23:20.780] And so our leads are obviously just those little implants out there. [23:20.780 --> 23:23.140] And yeah, that was really it. [23:23.140 --> 23:25.720] What I'm trying to demonstrate here is that you have to have a root node [23:25.720 --> 23:27.320] in order to make this work. [23:27.320 --> 23:31.740] So we ended up putting this on just a little Raspberry Pi with an LED screen [23:31.740 --> 23:33.160] and carried it around. [23:35.660 --> 23:41.160] So for the root node, we ended up getting to a point where we wanted, [23:41.160 --> 23:46.100] since they kept sending out foxes, to dynamically introduce BSS IDs [23:46.100 --> 23:52.060] and have the opportunity to remove them at a later date if we needed to [23:52.060 --> 23:55.280] or clear everything and start over from scratch. [23:55.500 --> 24:01.260] So we just took a Python script, hooked it up over serial on our root node [24:01.260 --> 24:07.360] and sent it a JSON blob and propagated that blob over the mesh to the slaves. [24:07.720 --> 24:15.580] And then we came up with a kind of, just a pseudo TCP SYNAC data flow, [24:15.580 --> 24:18.520] I suppose you could say, just to make sure that the message gets out [24:18.520 --> 24:20.980] and that the bots acknowledge the message [24:21.480 --> 24:25.140] and that we're actually hunting for the thing that we're looking for, [24:25.140 --> 24:26.760] or the things, plural. [24:27.480 --> 24:30.860] And then, you know, you could probably forward the bot data [24:30.860 --> 24:33.320] into like a cool web app or something. [24:33.640 --> 24:37.640] But there's only a team of two, so we didn't really get to that. [24:37.680 --> 24:42.340] But there was another project on GitHub that I got some help from. [24:43.240 --> 24:45.960] It's mentioned in the readme somewhere, I can't remember what it's called, [24:45.960 --> 24:50.420] but he did some pretty cool visualizations with the wireless traffic [24:50.420 --> 24:54.740] for sniffing on just like a single ESP. [24:56.080 --> 25:01.000] So for the bots, like I said, going into this, [25:01.000 --> 25:04.640] I didn't even know that I couldn't run promiscuous mode at the same time [25:04.640 --> 25:06.440] as station AP mode. [25:06.620 --> 25:09.080] So I was like, oh, oops. [25:09.080 --> 25:13.800] I have to put this into kind of like a bimodal functionality. [25:14.220 --> 25:20.080] So using the task, it's like an asynchronous task scheduler, [25:20.080 --> 25:26.980] which is a fancy way of saying you write these responsibilities [25:26.980 --> 25:30.360] that the bots are supposed to achieve at any given time, [25:30.360 --> 25:34.100] like channel hopping or re-initialization to the mesh network [25:34.100 --> 25:41.260] or signal acknowledgements to the other bots. [25:41.860 --> 25:46.900] And yeah, that was kind of a learning experience. [25:46.900 --> 25:51.300] So we came up with this kind of bimodal functionality in short. [25:52.980 --> 25:58.160] And we also found a necessity to kind of change the, [25:58.160 --> 26:01.120] when we found a target, we needed to send out an alert [26:01.120 --> 26:06.660] and that kind of, with the way the topology changes [26:06.660 --> 26:08.920] when the mesh reconnects, [26:08.920 --> 26:11.880] we had to kind of change the way that the software is functioning [26:11.880 --> 26:14.800] so that the message could get across the mesh network [26:14.800 --> 26:17.380] as expediently as possible. [26:17.880 --> 26:24.440] So we ended up leveraging some strategies with NTP, [26:24.440 --> 26:29.700] network time protocol, and yeah, keeping everything in synchronization [26:29.700 --> 26:33.580] in those bimodal segments at the same time [26:33.580 --> 26:37.000] so that each bot was doing the same thing at the same time, [26:37.000 --> 26:38.180] if that makes sense. [26:38.940 --> 26:41.040] And we'll talk more about that in a second. [26:41.040 --> 26:42.960] So this is just the basic duty cycle. [26:42.960 --> 26:48.160] So by default, 20,000 milliseconds, communicating over the mesh, [26:48.160 --> 26:52.740] renegotiating topology, getting information about NTP synchronizations, [26:53.240 --> 26:56.980] and then for nine seconds going promiscuous and continuously scanning, [26:56.980 --> 27:02.800] looking for the beacons in the frames, basically 802.11 frames in the air [27:02.800 --> 27:04.780] that you're trying to hunt. [27:07.120 --> 27:09.440] And then here's the root duty cycle. [27:09.440 --> 27:13.120] We're handling communications between the mesh, [27:13.120 --> 27:16.840] synchronization with NTP, obviously, with the bots, [27:16.840 --> 27:19.180] and sending responses to alerts, [27:19.180 --> 27:22.920] acknowledging that we've found a target or not, [27:22.920 --> 27:26.860] and saving cycles since these things are already so power hungry. [27:30.230 --> 27:33.470] And I'm calling this NTP magic because it was all built in a painless mesh [27:33.470 --> 27:35.290] and I can't take credit for implementing it, [27:35.290 --> 27:38.230] but basically you take the duty cycle time [27:38.230 --> 27:44.830] and then you offset that with the current NTP synchronization interval [27:45.750 --> 27:50.710] and that basically just allows everything to do what I call synchronized swimming, [27:50.710 --> 27:52.070] where like we were talking about before, [27:52.070 --> 27:55.190] they're communicating at the same time and then they're all scanning at the same time [27:55.190 --> 27:57.650] so that when someone finds something, [27:57.650 --> 28:00.630] they can automatically jump into a, [28:00.630 --> 28:04.030] hey, I found your target alert mode screaming at the air [28:04.030 --> 28:06.750] and the rest of the mesh continues to do what it's doing [28:06.750 --> 28:10.070] and then the message will come over as soon as the rest of the mesh network [28:10.070 --> 28:12.150] gets back into synchronization. [28:13.410 --> 28:16.070] So this is just a short video. [28:16.490 --> 28:19.490] I do apologize, we were trying to get a live demo together [28:19.490 --> 28:23.710] and we had some upstream dependency issues that kind of broke. [28:24.130 --> 28:27.070] Is that playing, Todd? How do you play that? [28:30.960 --> 28:32.640] All right, so you got to give it a sec. [28:32.640 --> 28:34.560] So basically on the left and the right, [28:34.560 --> 28:37.040] we're just monitoring serial of two of these bots [28:37.860 --> 28:42.400] and what I want you guys to see is them entering the promiscuous mode at the same time [28:42.400 --> 28:44.640] and also communicating over the mesh at the same time, [28:44.640 --> 28:46.340] making NTP negotiations. [28:50.400 --> 28:51.720] It takes a sec. [28:51.720 --> 28:54.960] This is kind of one of the hardest things that we had to wrap our heads around [28:54.960 --> 28:59.100] because sometimes there'd be interference where a leaf wouldn't be able to, [28:59.100 --> 29:02.200] or a bot as we call them, wouldn't be able to communicate back to the root node. [29:02.200 --> 29:06.820] So independently, it still needed to be in sync with the rest of the mesh. [29:06.820 --> 29:11.600] Yeah, so the bot initialization, it's in mesh communication mode right now [29:11.600 --> 29:14.800] and there's actually a lot of back-end calls that are happening. [29:14.880 --> 29:18.300] You can change the debug level on the painless mesh library [29:18.300 --> 29:22.940] to get more granular view of the things that are actually taking place. [29:22.940 --> 29:25.160] Oh, and then there's beacons. [29:25.920 --> 29:28.800] And it's actually capturing the whole 802.11 frame [29:28.800 --> 29:32.280] and we ended up having to capture probe requests too [29:32.280 --> 29:38.360] because they had a fox where you actually had to capture the source PSSID [29:38.360 --> 29:40.480] of who was making a probe. [29:40.640 --> 29:45.340] So we had to kind of change our tactics later on in the CTF for that as well. [29:45.340 --> 29:47.580] So right now, it's just a conditional block. [29:47.580 --> 29:53.320] It looks for a beacon that's in an array of PSSID targets that you're looking for [29:53.320 --> 29:56.300] and then if it doesn't find a beacon, it'll check the probe. [29:57.400 --> 30:00.600] And so the waterfall of data that you're seeing here, [30:00.600 --> 30:05.260] just like Minnie was saying, is the beacons that we're capturing in sniffing mode. [30:05.260 --> 30:06.920] And we do that for 20 seconds. [30:07.140 --> 30:11.380] And then they go back into mesh communication mode. [30:11.380 --> 30:13.240] I think you had a better name for it. [30:13.920 --> 30:15.780] Mesh communication mode works. [30:15.840 --> 30:18.400] Awesome. I'll take credit for that. [30:25.090 --> 30:27.150] And this looks like a duplicate slide. [30:28.050 --> 30:29.010] My bad. [30:29.890 --> 30:33.030] These are just the JSON blobs, the data we're sending back to the root node [30:33.030 --> 30:35.770] and then we just put some directional arrows on there to indicate that [30:35.770 --> 30:39.750] while we didn't have to do as much walking as we did in the stationary hunt, [30:39.750 --> 30:43.390] we still had kind of a patrol that we would do [30:43.390 --> 30:47.390] so that we had a higher likelihood of capturing the operator on the move. [30:47.390 --> 30:52.350] And you can see here that we didn't deploy these all over Caesars. [30:52.350 --> 30:54.430] This was a proof of concept for us. [30:54.590 --> 30:59.150] So the limitation here is that our mesh network would only work for us [30:59.150 --> 31:01.270] in the one specific place that we deployed it, [31:01.270 --> 31:07.190] which this is kind of a map of the hallway right around the wireless CTF from last year. [31:07.630 --> 31:11.510] And that was, you know, an obvious limitation of what we did. [31:11.630 --> 31:14.950] Yeah, and granted, you could consolidate all your root nodes [31:14.950 --> 31:19.950] and create a distributed C2 strategy if you wanted to. [31:20.430 --> 31:22.290] It wouldn't be a huge push-up. [31:23.690 --> 31:26.070] This is the alert mode I was talking about. [31:26.070 --> 31:29.330] So basically, like I was saying, it stops everything it's doing [31:29.330 --> 31:31.290] and it just starts screaming at the rest of the network [31:31.290 --> 31:33.770] indicating that it's found the target. [31:34.230 --> 31:36.610] And it does that for a certain amount of time [31:36.610 --> 31:39.830] before it receives an acknowledgement from the root [31:39.830 --> 31:44.590] and then it also sends back a finish acknowledgement back to the root [31:44.590 --> 31:47.770] to tell the root to shut up and get back to its job [31:47.770 --> 31:51.330] of listening to as much traffic as possible. [31:51.570 --> 31:54.470] And then it re-synchronizes with the same NTP offsets [31:54.470 --> 31:59.730] and goes back to its default communication mode with the mesh. [32:02.990 --> 32:04.110] All right. [32:05.070 --> 32:07.850] So, on the left here, [32:07.850 --> 32:12.290] this is a bunch of traffic on the root node over serial. [32:12.570 --> 32:15.410] So you can see the different connections that we're making [32:18.170 --> 32:20.250] wirelessly with our slaves. [32:20.250 --> 32:22.970] And then on the right, I don't know if you guys can see it [32:22.970 --> 32:26.310] in the upper right-hand corner, that's going to be an updater script [32:26.310 --> 32:28.170] where we're updating the root over serial [32:28.170 --> 32:32.930] before the root sends out commands to the rest of the bots in the mesh. [32:33.990 --> 32:36.910] And then on the bottom right, I was just using that as an indicator [32:36.910 --> 32:39.890] to synchronize the videos because there's another video [32:39.890 --> 32:41.510] that's overlaid on top of this. [32:41.510 --> 32:43.870] Give us a sec. We're not great video editors. [32:44.570 --> 32:45.750] Don't judge us. [32:52.830 --> 32:55.170] Okay, so, yes, I sent a target. [32:55.870 --> 32:57.710] That's a MAC address right there. [32:58.630 --> 33:01.230] And that's a real MAC address of one of my devices. [33:01.710 --> 33:05.330] Anyways, the root is acknowledging with the JSON blob [33:05.330 --> 33:09.290] that it's received it and it's sent it over the mesh. [33:09.290 --> 33:11.430] I'm just printing out the JSON on the left there. [33:11.430 --> 33:14.270] So now these nodes are actually hunting. [33:16.090 --> 33:18.270] Is the overlay video going to play now? [33:20.710 --> 33:21.610] There it is. [33:21.610 --> 33:23.590] All right, so, we're in a library. [33:24.330 --> 33:28.170] And as you can see, there's one of our nodes connected to a Chromebook. [33:30.210 --> 33:32.930] And I'm going back to my root next to Spider-Man. [33:35.510 --> 33:38.430] And we're trying to show you guys here that there's no smoke and mirrors. [33:42.040 --> 33:45.480] And when it catches a target, it's going to spit out something [33:45.480 --> 33:48.340] in that Python monitor script on the left that's green, [33:48.340 --> 33:51.080] indicating that it's found one of its targets. [33:51.080 --> 33:54.700] And we also wrote a script where it goes through... [33:54.700 --> 33:55.440] Oh, there it goes. [33:55.440 --> 33:59.960] And Todd's about... I don't know if there... he's over there. [34:00.080 --> 34:02.920] Like, oh, what, 50 meters away or so? [34:03.120 --> 34:04.560] Probably like 50 feet, yeah. [34:04.560 --> 34:06.460] Yeah, and it's pretty basic. [34:06.460 --> 34:08.440] You know, you just have one slave out there. [34:09.520 --> 34:11.500] You probably can't see it from back there, [34:11.500 --> 34:15.420] but the last number on the right, that highlighted green, is the RSSI value. [34:15.420 --> 34:16.560] It's negative 85. [34:16.560 --> 34:18.640] Yeah, and now it's negative 78. [34:20.260 --> 34:22.960] And so, yeah, the script we wrote, [34:22.960 --> 34:25.880] you can also pull that out and go straight into arrow dump. [34:25.880 --> 34:27.760] So, we also had an alpha card, [34:27.760 --> 34:32.260] and we would just dump that BSSID straight in and start hunting. [34:32.420 --> 34:35.760] But for demonstration purposes, we kept it in monitor mode. [34:35.760 --> 34:40.500] Yeah, that's when we'd switch into just the traditional hunting direction finding. [34:41.140 --> 34:43.600] But one really neat thing about the way that we deployed these, [34:43.600 --> 34:45.220] and just, I mean, it wasn't anything we did, [34:45.220 --> 34:47.060] it's just the theory behind it is, [34:47.060 --> 34:49.040] especially with the RSSI values [34:49.040 --> 34:51.500] and the different nodes that are communicating back, [34:51.500 --> 34:54.340] at that point, we can establish direction, right? [34:54.340 --> 34:57.700] So, if we're in a hallway and everybody's going that way, [34:57.700 --> 35:00.540] but our signal is coming back to us saying that, [35:00.540 --> 35:01.960] hey, the signal's getting stronger, [35:01.960 --> 35:05.060] and each subsequent node is telling us it's right there, [35:05.060 --> 35:08.000] and we're just looking for the people or person that's just walking towards us, [35:08.000 --> 35:13.200] and that's when we kind of switch into the traditional mode and get on our feet. [35:17.370 --> 35:18.850] Oh, there we go. [35:19.450 --> 35:21.570] And we thought this was interesting. [35:21.570 --> 35:24.630] While we were doing the CTF, we had noticed other people were putting these things, [35:24.630 --> 35:25.690] this is not ours, [35:25.690 --> 35:30.010] other people were putting these out in the field for shenanigans like de-authentication. [35:30.590 --> 35:34.670] We got really frustrated at the end of the hunt because we hadn't found any foxes, [35:34.670 --> 35:38.630] so we just downloaded, what's his name, Space Hoon? [35:38.630 --> 35:42.390] Space Hoon's beacon spamming software, [35:42.390 --> 35:47.270] and started beacon spamming out the target VSS IDs in and around the village, [35:47.270 --> 35:50.090] just to drive the other teams crazy. [35:50.110 --> 35:51.310] Yeah, so you heard that right. [35:51.310 --> 35:54.930] We didn't find the fox, so I hope we didn't say that at the beginning. [35:54.930 --> 35:56.570] Yeah, here's how you find a fox. [35:56.730 --> 36:00.010] This was just kind of our approach, we thought it was cool and novel. [36:01.090 --> 36:03.550] And we did get very frustrated, [36:03.550 --> 36:05.870] but we got kind of our... [36:05.870 --> 36:08.390] We wasted a bunch of some of these guys' time. [36:08.390 --> 36:10.470] Yes, it was vindictive for us. [36:11.190 --> 36:14.190] At least two people went chasing our signal, [36:14.190 --> 36:16.570] and Mini did something very evil. [36:17.010 --> 36:19.950] He set a delay in when the beacon would spam, [36:19.950 --> 36:21.510] so it wouldn't just be constant, [36:21.510 --> 36:26.190] it would be like every seven seconds you'd get a beacon spam for three seconds. [36:26.190 --> 36:29.690] It was every 25 seconds, and it would be for like two seconds. [36:29.690 --> 36:31.170] You'd just get a little blip. [36:31.170 --> 36:33.790] 25 seconds is long enough for you to think that, [36:33.790 --> 36:36.570] okay, I'm going to go out in that hallway, [36:36.570 --> 36:37.970] and I'm going to go down this way, [36:37.970 --> 36:39.970] and then before you know it, your signal's gone. [36:40.470 --> 36:44.190] So we watched people, and the desperation in their face, [36:44.190 --> 36:46.450] as they went out into the hallway, thinking they found it, [36:46.450 --> 36:48.930] and then it just disappeared, and just their face went white. [36:49.610 --> 36:51.990] And then we targeted that team from Idaho. [36:51.990 --> 36:54.190] Do you remember the gentleman with the white beard? [36:54.190 --> 36:54.550] Yeah, yeah. [36:54.550 --> 36:57.090] Hunter tablet, we kind of followed him over, [36:57.090 --> 36:59.210] and then we placed one of them behind the TV, [36:59.210 --> 37:00.410] we knew one of the goons, [37:00.410 --> 37:03.550] and he was like losing his mind for a good 20 minutes. [37:03.550 --> 37:05.230] We kind of felt, did we apologize to him? [37:05.230 --> 37:05.470] Yeah. [37:05.470 --> 37:06.090] Okay. [37:09.620 --> 37:12.760] So since we basically came up with this little scheme [37:12.760 --> 37:16.980] to have a, what I call, a Wi-Fi C2, if you will, [37:16.980 --> 37:19.640] it'd be really cool to apply the distributed model [37:19.640 --> 37:23.240] to the stuff that's already out there for the ESP8266 software, [37:23.240 --> 37:24.660] like the beacon spamming, [37:24.660 --> 37:27.400] and instead of just throwing them out there in beacon spamming, [37:27.400 --> 37:33.280] to actually have some level of control and feedback, [37:33.280 --> 37:35.140] deauth would be cool too. [37:35.700 --> 37:38.640] I mean, I'm not going to like suggest it to anyone, [37:38.640 --> 37:42.340] but I'll just say, just imagine if you placed these outside, [37:42.340 --> 37:46.600] if someone placed these outside of like an enterprise or something like that, [37:46.600 --> 37:50.420] and just like sat in their car and screwed around with the Python script [37:50.420 --> 37:54.480] for a couple hours, you could like, you could probably, [37:54.480 --> 37:57.340] I mean, theoretically, I'm not suggesting anything to anyone, [37:57.340 --> 37:59.360] but it'd be kind of fun. [38:01.760 --> 38:06.840] So, for the future, we were thinking 802.11, [38:06.840 --> 38:08.780] maybe one of the reasons we didn't find the foxes, [38:08.780 --> 38:11.340] there was like, there's just so much saturation, [38:11.940 --> 38:15.380] there's so many pineapples, and there's so much shenanigans. [38:15.720 --> 38:19.560] Some of the times we couldn't even get like traffic back from the mesh, [38:19.560 --> 38:21.260] depending on where we deployed it. [38:22.320 --> 38:24.640] Yeah, and the way that that looked in the spectrum, [38:24.640 --> 38:27.100] so like if you were using regular tools like AeroDump, [38:27.100 --> 38:29.840] what you would see is every 20 seconds, [38:29.840 --> 38:33.700] an access point would stand up on one of our ESPs, [38:33.700 --> 38:37.920] and it was called test in production, I think. [38:37.920 --> 38:40.160] And so you would see that pop up, [38:40.160 --> 38:43.080] but folks who are walking around with pineapples, [38:43.080 --> 38:45.740] that are doing what's called karma mode, [38:45.740 --> 38:47.740] where they're just responding to every single beacon [38:47.740 --> 38:51.020] as if they are a legitimate access point, [38:51.020 --> 38:53.080] are stealing those handshakes, right? [38:53.080 --> 38:58.200] Or stealing those initial connection attempts. [38:58.200 --> 39:01.310] So whenever we would stand up in station AP mode, [39:01.640 --> 39:04.460] our theory is, we didn't collect the data on this, [39:04.460 --> 39:05.760] you know, while we were doing it, [39:05.760 --> 39:08.660] but our theory is that we would lose connection, [39:08.660 --> 39:14.400] because our node would try to connect to that karma response. [39:15.380 --> 39:19.130] So 802.11 really is not a great protocol, [39:19.690 --> 39:23.870] Wi-Fi is not a great protocol to backhaul all your communications [39:23.870 --> 39:25.530] back to the root node on. [39:26.030 --> 39:29.790] Obviously we're going to use it to sniff and all of this stuff, [39:29.790 --> 39:32.150] but there's some better options out there. [39:32.230 --> 39:35.690] In terms of reliability, I mean, for obvious reasons, [39:35.690 --> 39:37.990] in an environment like this that's so hostile, [39:37.990 --> 39:40.230] it's just probably not the best choice, [39:40.230 --> 39:42.550] but it's great for a quick and dirty POC. [39:43.670 --> 39:47.030] Otherwise, we're thinking about switching it up [39:47.030 --> 39:49.970] to something more expensive that Todd was thinking about. [39:50.110 --> 39:52.750] Yeah, well, like, if we could just stomach more money [39:52.750 --> 39:56.030] just walking away with each node, if somebody walked away with it, [39:56.030 --> 39:58.010] then we could do a lot more. [39:58.330 --> 40:01.310] We could build this into dual band. [40:01.870 --> 40:06.090] LoRa is great for, would be our backhaul communications. [40:06.090 --> 40:08.990] We do that over, I forget what frequency it is, [40:08.990 --> 40:12.010] but we could use LoRa for backhaul, [40:12.010 --> 40:15.890] and obviously, you know, battery packs and all of that, [40:15.890 --> 40:19.150] and casings and however we concealed it. [40:19.350 --> 40:21.170] We could definitely dump more money into it, [40:21.170 --> 40:23.810] but for us, we wanted to keep costs low [40:23.810 --> 40:28.890] and be able to test, deploy, and interact with it pretty quick. [40:29.070 --> 40:32.030] So, in the future, if we can do that, [40:32.030 --> 40:35.770] we might seek out a dual band chip to do that with, [40:35.770 --> 40:39.830] but that's at like $30 just starting, sometimes more. [40:40.170 --> 40:42.550] If you know of any, please tell us. [40:42.550 --> 40:45.530] Maybe our research is just poor, we haven't found it yet, [40:45.530 --> 40:49.110] but a $3 dual band chip would be ideal. [40:50.210 --> 40:52.610] Yeah, yeah, we were thinking about just, [40:52.610 --> 40:55.930] well, should we talk about the other idea, [40:55.930 --> 40:57.890] about clustering the USPs together? [40:57.930 --> 41:04.290] Yeah, so, switching between the modes takes a lot of power. [41:05.510 --> 41:07.830] And there's a lot of overhead, too. [41:07.830 --> 41:08.270] There is. [41:08.270 --> 41:10.250] Things are running on a single thread, [41:10.250 --> 41:13.690] even though it's asynchronous, it's pseudo-asynchronous, [41:13.690 --> 41:16.850] it's basically like coding in the 90s, I guess, [41:16.850 --> 41:17.930] whatever that's like. [41:17.930 --> 41:23.210] Right, you're taking up most of that 1 meg code RAM. [41:23.210 --> 41:26.250] That 1 meg RAM is just being eaten up by both of your processes [41:27.050 --> 41:30.470] for going from station mode to sniffing mode. [41:30.470 --> 41:33.370] So, you could just distribute that over two ESPs [41:33.370 --> 41:35.190] and put them in the same box. [41:35.790 --> 41:39.290] Doubles your cost of a node, because it's two ESPs, [41:39.290 --> 41:40.410] it's not a big deal. [41:40.610 --> 41:43.470] But now you have more processing power available to you. [41:43.470 --> 41:45.830] Yeah, they can just communicate over serial to you. [41:45.830 --> 41:51.130] And we could sleep one chip while the other one's monitoring, [41:51.130 --> 41:53.570] and you save power that way, too. [41:53.870 --> 41:55.370] Yeah, definitely. [41:56.250 --> 42:00.650] But obviously, implications with going with the hardware Todd's talking about, [42:00.650 --> 42:05.610] we'd have to roll our own code and stop copying other people's stuff. [42:05.610 --> 42:08.830] Which is actually the reason we didn't have a live demo today. [42:09.690 --> 42:15.330] Five days ago, somebody committed an update to one of the libraries we were dealing with, and... [42:15.330 --> 42:17.450] What we know is we didn't track our dependencies well, [42:17.450 --> 42:21.290] and the last time that the compiled version worked was May. [42:21.330 --> 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. [42:27.010 --> 42:29.230] All we know is back in May it was working fine. [42:29.230 --> 42:32.230] Yep, and so if we had our own painless mesh library, [42:32.230 --> 42:34.930] obviously we'd be testing any changes there. [42:34.930 --> 42:39.270] But we rushed into it, didn't version stuff, and... shit broke. [42:39.270 --> 42:47.050] Yeah, and just want to tip our hat for all the people who wrote a lot of these lower-level libraries for the ESPs, [42:47.050 --> 42:51.630] and for all the other talkers that did such an awesome job here, and for having us. [42:51.630 --> 42:53.210] Thank you guys very much. [42:53.270 --> 42:55.410] Yeah. Do you guys have any questions? [42:55.710 --> 42:56.850] No? All right. [42:58.470 --> 43:01.010] We got two. Way back there. [43:02.990 --> 43:05.130] I can't hear you, dude. [43:06.490 --> 43:07.710] Just yell. [43:12.260 --> 43:13.660] The BLE? [43:14.240 --> 43:17.820] Yeah, that was an option, but cost-prohibitive. [43:18.920 --> 43:21.940] Let me repeat the question, make sure I got it right. [43:21.940 --> 43:26.300] Did we think about using BLE for communication across nodes? [43:26.500 --> 43:31.580] Yes. Cost-prohibitive for us, because we had to sniff with the wireless chip anyways, [43:31.580 --> 43:41.010] so putting another chip on there... 32 does. [43:41.010 --> 43:42.350] He says the 32 has BLE. [43:42.350 --> 43:48.670] Yes, 8266 is like a stripped-down Honda Civic, right? [43:49.110 --> 43:52.610] ESP32 is like an elite Hyundai. [43:54.650 --> 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. [43:59.650 --> 44:03.810] If I wasn't so cheap, I probably would do that. Great question. [44:03.810 --> 44:04.890] Yes. [44:13.280 --> 44:14.320] No. [44:15.160 --> 44:16.280] Can you repeat the question, Todd? [44:16.280 --> 44:21.840] Yeah, did we have a linear regulator that... [44:31.750 --> 44:32.930] Right. [44:33.850 --> 44:37.410] Yeah, we just plugged it straight in. We were like, let's go. [44:37.510 --> 44:42.450] So that may have been part of our power usage issue, for sure. [44:42.810 --> 44:44.410] Okay, thank you. [44:44.890 --> 44:46.590] Other question up here? [44:47.130 --> 44:47.910] Yeah. [45:04.890 --> 45:13.550] So the question was if the current constraints of the hardware limited the amount of [45:13.550 --> 45:19.250] beacons we were able to parse, and the answer was, I mean, it depends on how fast you're [45:19.250 --> 45:23.570] hopping channels, and we didn't really have a baseline to measure it against, but from [45:23.570 --> 45:29.570] what I could tell, compared to just standard arrow dumps with an alpha card and a laptop, [45:29.570 --> 45:33.010] it was actually, it pulled out a good amount of data. [45:33.690 --> 45:39.570] Yeah, we weren't storing every single beacon correct. We were just churning through it and [45:39.570 --> 45:46.170] comparing the beacon address. I don't know, you wrote that logic. What did we do? [45:46.170 --> 45:48.230] Yeah, we were just looking for the beacon. [45:48.230 --> 45:50.670] Yeah, we would just compare it. If it was the right one, then we popped it. [45:50.670 --> 45:51.710] And the probes eventually. [45:51.970 --> 45:56.350] Any other questions? Okay, thank you all very much. [45:56.350 --> 45:56.850] Thanks, guys. [45:56.850 --> 45:57.870] Enjoy the rest of your DEF CON. [45:57.870 --> 45:58.110] Thank you.