start	end	text
2270	4930	Alright, looks like that last group of people I saw coming in came in.
4970	7570	So, we'll go ahead and get the talk started.
7630	8850	My name is Mikey Aubrey.
8850	12730	I'm giving a talk on tracking real-time locations with rogue Wi-Fi packets.
13030	14910	So, this is a pretty bold claim.
15030	16970	It's a pretty cool project.
17130	19050	So, we'll go ahead and dive right in.
19530	21750	A little bit more information on introductions here, though.
21850	22950	My name is Mikey Aubrey.
22950	27670	I am known as Huey Huey on the RF Village Discord, if any of you are on there.
27670	32090	I am 10 years, a little over 10 years now, a professional hacker.
32090	35030	I do commercial work, government work, other work.
35370	43570	I spent two years in radar technologies, which I'm only really bringing up because it's quite relevant to this talk and some of the technologies that are being used here.
43750	45370	And I would like to introduce the device itself.
45370	47210	I'm actually wearing two of them right now.
47210	49510	That's the little blinky things that are right above my badge.
49510	52310	You've probably seen several people walking around with these.
52310	54610	We are actively using them for a couple of things.
54610	56890	You'll see why and what here in a minute.
56890	59970	The device itself, it tracks 2.4 gigahertz.
60150	62230	And it is a working POC.
62250	64090	So it's part of a larger project.
64130	66890	The device itself is just a proof of concept.
66890	69230	But the proof of concept is fully functional.
69230	72410	It actually does some work that we have found to be useful.
74150	76370	So, we'll start with the technical problem statement.
76370	80630	This is what we were trying to solve, why this project came into fruition.
80730	89350	And that is that tracking down Wi-Fi devices is something that you have to do occasionally if you're in the admin world or if you're in secret spaces or anything like that.
89350	95470	You find yourself a rogue AP or a rogue device connects to you, you need to be able to find, track down those devices.
95610	104710	Well, the devices, if you've ever had to use them to try and track these things down, are either expensive, hard to use, and most likely both.
104950	108230	They are not the greatest of things to try and track down devices with.
108230	111190	And sometimes you can spend a very long time looking for stuff.
111270	113550	Most of the time, though, you don't have any of that.
113550	118450	You simply are told, hey, somebody created a Wi-Fi access point in our area.
118450	120530	I need you to go find it and shut it down.
120530	122210	And off you go.
122210	124210	I see a couple people nodding out in the audience.
124550	125190	Off you go.
125190	125990	Good luck.
126310	128130	I actually had somebody on the bus on the way here.
128130	129090	I was talking about this project.
129090	132530	And they mentioned that they were reprovisioning all the access points for their company.
133090	137610	And they did all of them, but there was one access point they could not find.
138130	139490	And it was their own access point.
139490	140810	They just had no idea where it was.
140810	143470	They just knew that they couldn't find it, couldn't reprovision it.
143750	145290	This is the kind of thing to do it.
145290	153530	The idea of this project was to create a low-cost solution with a low barrier of entry to give you guys something that you can use to do this.
153530	155110	Is it the best tool in the world?
155110	155730	No.
155730	159410	But it's also meant to be something that is cheap and accessible.
161570	166550	Now, we are going to have to go on a couple of tangents in this talk to make sure that everything comes around full circle.
166550	168890	But trust me, everything is coming around full circle.
168890	171390	So we are going to start with 802.11 basics.
171430	173570	Don't worry, we are not going to go too deep into the protocol.
173570	176570	We are not going to go too deep into that whole framework and what it is.
176930	181250	But just know that 802.11 is the standard that Wi-Fi devices use to communicate.
181250	186290	It's what creates a wireless local area network rather than a wired local area network.
186570	188310	They communicate using frames.
188310	193190	The concept of frames is the important thing to know to understand how all of this stuff is working.
194410	202170	Frames perform all of the functions from the management functions, from your access point controlling the devices, to your devices sending data to and from everywhere.
202170	203990	It's all done within frames.
205050	208310	So, going back, this is an example frame.
208310	209830	This is what the frames look like.
209830	212270	You can see they've got a header, they've got the body.
212450	213970	Different frames will have different structures.
213970	217050	The one you are looking at here is an empty data frame.
217190	221350	So, it's got your destination MAC, your source MAC, your BSS ID.
222570	228370	Things like sequence control and the CRC are usually handled by your stack automatically, so you don't need to worry too much about it.
228370	234790	The important things to take away from this slide are the destination MAC, the source MAC, and the BSS ID.
235050	240950	So, those are the three different things that kind of tell the data where it's going and who it's going to.
242330	247050	In this particular example, in the thing you see below there, the destination is like our target device.
247210	250510	The source would be set to the device that is sending the data out.
250510	254310	And then the BSS ID would be like an access point that's moving stuff around.
254670	263110	So , just a general understanding of what the frames are, because I'm going to be using terms like source MAC, destination MAC, and null data frames.
263110	264850	Those are terms that you're going to hear a lot in this talk.
264850	266950	So, I wanted to make sure we had that set up up front.
266950	269470	That way, we're all on the same page moving forward.
270490	272430	So, now I'm going to talk about polite Wi-Fi.
272430	277190	So, polite Wi-Fi is a... hesitate to use the term exploit.
277190	279870	It's not really an exploit of the 802.11 framework.
279870	283930	It is an interesting behavior of the 802.11 framework.
284070	296370	The basis of the polite Wi-Fi finding, which came out a number of years ago, there's a bunch of white papers on it, is that every device must send an ACK frame if they receive a valid frame.
296510	300550	So, this is to make sure that devices know, hey, I sent you data, and it comes back.
300550	307350	Similar to in TCP, where you have a handshake, where you give data, and then the device acknowledges that it received the data.
307370	308790	This is a very similar process.
308790	310450	You send a frame to a device.
310450	312570	The device says, hey, I got your frame.
313510	323990	Interestingly, and what makes this so critical, is that this data, like this valid frame, can come from outside of the network that your station, your device you're targeting, is on.
323990	331870	So, typically, devices will only communicate with each other within the same wireless area network, but these frames don't need to come from the network that you're on.
331870	333910	It will just respond with an ACK.
333910	346510	So, this means that any device can send to a target device a valid frame, and as long as the frame passes the CRC, which is what it defines as a valid frame, then the device must respond with an ACK.
346510	351590	It even defines the time period that it has to respond in as 12 microseconds, but most devices don't play nice.
352890	356890	So, this is a really kind of cool behavior, and it absolutely is real.
356890	359030	It's what you have it on.
359370	361590	But there are a couple of limitations.
361590	363510	One of them is power-saving mode.
363870	372110	So, devices will only respond if they are on, and most devices will have a period where they turn off to save battery.
372110	375830	If devices were on all the time, you would drain your batteries very quickly.
375990	391690	There's actually research done with polite Wi-Fi where they took security cameras that were made to have like 16 to 20 day batteries, and they were hitting them with these polite Wi-Fi frames to force them to stay on, and they drained the entire battery in just a matter of a few hours.
392050	394810	So, power-saving mode is a big issue with this.
395430	398510	We're already doing a little bit of work on how to overcome the power-saving mode.
398510	402450	You have to be able to send out a beacon frame with what is called a traffic indication map.
402830	406310	That is how devices know that the access point is trying to send them data.
406450	408670	So, there are ways to kind of overcome this limitation.
408670	417070	You can send it a traffic indication map saying, hey, I need you to turn on, and then you can send it the polite Wi-Fi frame to which it will then have to respond with an ACK.
417870	427710	All of this isn't implemented in these devices yet, because this requires you to know the access point as well as the target device, and we're trying to minimize any layers of what you need to know in advance.
429390	433410	So, this is why polite Wi-Fi is just considered an interesting anomaly.
433410	445890	So, if you look at the community as a whole, like the RF Wi-Fi community as a whole, they don't really view polite Wi-Fi as an exploit, because it's just a behavior that is part of the 802.11 framework.
445890	447850	It's not really anything.
447850	452010	You have to already have a valid frame that is going to a known MAC.
452010	455870	The device has to be on, so there's some limitations in it to even work.
455870	460770	And then, even if it does work, you don't gain any extra information from the target.
460830	462970	An ACK frame is extremely simple.
462970	469150	I'll give an example of one later, but it only has a single MAC address on it, and that MAC address would be my own device.
469150	479750	So, if my device sends out a frame to do the polite Wi-Fi attack, the ACK that comes back has my MAC address on it and nothing else.
479750	482390	So, the target device doesn't really give anything away.
482530	484450	So, again, this is just an interesting anomaly.
484450	486390	Nobody really thought much of it.
487710	490210	So, here's where we're going to go on yet another one of those tangents.
490250	491290	Don't worry.
491570	493690	It all comes full circle, I promise.
493850	497370	So, we're going to talk a little bit about a technique called trilateration.
498490	504150	Trilateration is, and this is one of the only times I'm actually going to read directly off the slide, because this is a very important definition.
504150	509410	It is the process of using these distance measurements to estimate position.
509610	516390	So, if you have distance measurements, this is the process of using those measurements to estimate the position of something.
516930	518310	Really important.
518370	526550	So, the way that you get these distance measurements is by using your known factors, which is time, speed, and distance, and the relationship between those three objects.
526550	529790	This is where I mentioned my radar background comes into play.
529970	533550	This isn't anything too complicated, but distance is equal to speed times time.
533550	537290	That's the main formula that we're interested in and going to be looking at that.
537430	545350	So , when you're doing this, you are beholden to your clock speed of your device measuring it, and that is really important when you are measuring the speed of light.
545350	547770	The speed of light is very, very, very fast.
547850	552790	Your clock, in comparison to the speed of light, is extremely slow.
552810	555670	So, that is kind of your biggest limitation, is time.
555670	557230	You can't control the speed of light.
557270	560150	Your time is limited by the clock speed of your device.
560150	564410	So, your distance measurement is going to be based on those kind of issues.
564530	570010	So, the longer you can increase that distance traveled, the less problem you're going to have with your distance.
570270	578030	We'll go into a little bit more math on that in just a minute, just kind of let that sink in, while we talk about a picture version of trilateration.
578030	582750	You can see we're going to talk about the one on the left here, trilateration without Wi-Fi polite, how that works.
583130	586710	You can see that there are three receivers here and a signal source.
586710	593570	Those three receivers, you have to assume that they know the location of each other, so they know how far apart they are from each other.
594270	596370	And their clocks are synchronized to each other.
596370	599930	So, whenever they get a signal, they can synchronize that data and understand it.
600690	606050	When the signal source sends out data, you can get a measurement of when that data gets received.
606190	609830	So, you can calculate T1, T2, T3, the time from there.
609830	613030	You can then use the time to calculate distance and use that to trilaterate.
613030	615250	It's a big simplification of the trilateration process.
615250	622710	It's a lot more complicated than this, but this is all you really need to know to understand how polite Wi-Fi can enhance this process.
623750	634250	There are a lot of limitations to doing it this way, and a lot of the things, if you research Wi-Fi tracking, like using Wi-Fi to locate devices, this is the process that most of them use.
634390	638330	You'll a lot of times see these devices that have multiple antennas sticking out in the same location.
638450	640910	They're using this kind of a technique to trilaterate.
641490	646830	If you're using polite Wi-Fi to do your trilateration, though, you have a couple of main advantages.
646850	651790	The biggest one being, if you look, now your source and receiver are in the same location.
651790	655110	They're now one device, which means you actually control the source.
655230	663430	You know exactly when that source signal came out, which is a huge advantage over just having a random device that you're just getting a signal from.
663430	665750	You have no idea when that device sent that data.
665750	667170	You just know when you received it.
667170	671050	In this situation, you know exactly when that signal came out.
671070	682310	And you know the distance between your receivers, just like in the other one, which means you can now calculate from the receivers, you can actually back-calculate the clock time that the original signal came out.
682810	685270	So this means you no longer have to synchronize your clocks.
685270	692610	You can actually use the origin of your controlled source as a way to synchronize the clocks on the attack time.
692930	704170	And then, you also have now increased that distance, because the signal has to go from the signal source to the target, the target has to process data, and then the target has to send data back out.
704170	710030	So this is where it diverges from your traditional radar technologies, where it's just a straight bounced signal.
710030	712530	Much easier to kind of get a distance measurement for.
712530	718430	In this case, the signal goes to the device, and the device has to process something, and then send back out.
718430	724190	This introduces what is called jitter, which is the amount of time it takes the device to process and send back out.
724190	728530	In the 802.11 standard, it says that that is meant to be exactly 12 microseconds.
728530	731070	That is absolutely not true in the real world.
731070	736250	But don't worry, there are ways to solve for it, and we're going to talk about that here in a minute.
737110	744570	This is just a dotted version of this, mostly for people who are watching the pre-recorded version of this talk, or who just see the slides.
744570	757950	The important things that are here, that I didn't talk about at detail, is that in trilateration without Wi-Fi, or polite Wi-Fi, you have to take the data you've received, and you have to line it up.
757950	771510	Because if you have a target that's sending out 100 frames a second, you need to know exactly which frame and which timing you're lining up with each different receiver, which involves a lot more processing and time.
771510	777150	However, if you're using polite Wi-Fi, it is obvious exactly which frame belongs to which thing.
777150	779410	You can back-calculate all of that time.
779410	791190	So there's a lot of advantages when it comes to trilateration by adding that extra bounce in between, even though you do introduce jitter, which you don't have with the more traditional form of trilateration.
791850	798990	And again, I just want to emphasize that increasing distance traveled for the signal increases accuracy.
799630	802430	And that's where we're going to talk a little bit about the clock issue.
802470	807870	This is your biggest limitation when it comes to accuracy, and this is true no matter what form of trilateration you're using.
808490	813470	The best clock speed on an ESP32, at least the ones that I'm using, is a 240 MHz clock.
813850	822650	If you calculate that with the speed of light, that means that a singular clock cycle, that's one operation, is 1.25 meters.
823050	833410	So if your device, your target, is 1.25 meters away, and I get that data, if I miss a single clock cycle, I am now 100% inaccurate.
833870	841910	If my device is 100 meters away, and I miss a single clock cycle, now I'm only 1% inaccurate.
841910	847390	So you can see, this is why distance, and making that distance bigger, matters.
847490	852890	And polite Wi-Fi gives you some agency over what that distance is.
852950	861450	When you're doing the trilateration without Wi-Fi polite, your distance is just whatever the shortest path is from your receiver to the signal.
861450	864150	But with this, you have control over it.
864650	872130	You really can't get better clock cycles without external stuff, and I don't know if you've ever tried to put external clocks on an ESP32.
872210	873710	They don't play nice.
873850	876810	They're very difficult to get really good readings on those.
877690	880850	So for this reason, you really need to worry about missed clock cycles.
880850	890530	You need to make your program, you need to make your system absolutely focused on minimizing any missed clock cycles that you might have.
890530	894750	Because again, one missed clock cycle is 1.25 meters of inaccuracy.
895730	898770	Now, there's got to be a way to kind of account for this, right?
898850	902710	You've got to account for jitter, which is going to be that unknown time it takes the device to process.
902710	910990	You've got to account for the actual device itself missing clock cycles because you had to process that incoming frame to see if it was the right one you're interested in.
911190	914150	And it turns out, somebody's actually solved all this.
914550	917170	In fact, somebody's kind of done this entire project.
917550	918230	YPeep.
918230	919470	Has anybody here heard of YPeep?
919470	920190	I'm just curious.
920190	922490	Has anybody here actually read up on that research?
922490	925510	Wow, actually, nobody seems to have known about it.
925510	926750	So , YPeep's really cool.
926750	927610	You should go look it up.
927610	929630	A really great white paper on YPeep.
929630	936530	They actually made a product, which attaches onto a drone, some ESP32s and an ESP8266.
936550	939010	They send out these polite Wi-Fi frames.
939010	940610	They get back the acts.
940610	943030	They then put that with the GPS on the drone.
943030	950610	They fly the thing around, and they claim, within a couple dozen centimeters of accuracy, they can locate devices, which is phenomenal.
950670	951670	Absolutely amazing.
951670	954190	They show the data on how they can account for jitter.
954270	955990	They talk about all of this.
955990	960410	And they're literally doing exactly what this whole project is about, which is awesome.
960410	964070	And, again, according to their paper, they were incredibly successful with this.
964070	965710	But there was a huge problem.
966990	972730	Number one, they put it on a drone, which is really cool, but I want a cheap solution.
972730	974750	And drones are not cheap, usually.
974750	976850	They're a little cheaper now than they used to be.
976970	979150	Number two, they did not release their code.
979150	985130	In fact, I reached out to them to ask them about this, and I said, hey, your research is exactly something I want to do.
985130	987810	I'd love to talk to you guys and get to know more about this.
987870	993410	And they sent back a vaguely threatening email that essentially said, no, we filed a patent.
993410	994690	We're commercializing this.
994690	995650	Back off.
996450	1004390	And number three, their algorithms and charts that I was talking about that showed they accounted for jitter, they're super informative in the fact that they don't tell you a darn thing.
1005030	1006910	They basically were just like, yeah, we solved jitter.
1007690	1009090	We made a chart.
1011490	1016150	So, the approach of using Ypeep is absolutely not viable, right?
1016150	1022210	I have no access to their product, I have no access to their code, and I got a vaguely threatening response because I was curious about it.
1023410	1025970	So, you know, we really can't do it.
1025970	1029590	But, Ypeep did teach me a couple of really important things.
1029590	1040770	Number one, most important thing Ypeep taught me is that this idea of using polite Wi-Fi to elicit extra information from the devices via signal analysis is possible.
1040910	1053790	They show that you can use polite Wi-Fi and the ACK coming back from the signal to do kind of round-trip time calculations, start getting info from it, and have something that works as a result.
1054150	1062870	The number two thing they taught me is that I absolutely, by any means, need to not do anything they did because they filed a patent and sent a vaguely threatening email.
1062890	1072710	So, everything that I do, every solution I need to do needs to be completely developed on my own, and I need to make sure that compared to the limited information they do provide, I'm not touching any of their stuff.
1072710	1075010	They've got their baby, I can't touch their baby.
1075010	1077250	But, again, it was possible.
1077270	1078790	This is something that works.
1078990	1083950	And somebody out there has proven it, even if they haven't shared how they did.
1084970	1087010	So, now I had to break down this problem, right?
1087010	1088430	We have a couple of problems to solve.
1088430	1091170	For one, we need a cheap, polite Wi-Fi implementation.
1091950	1097450	We need to gather, send, and receive data from multiple locations in order to do this analysis, right?
1097610	1100010	Trilateration requires multiple points.
1100410	1105810	I need to actually do the analysis, like whatever that looks like, to do the trilateration to account for jitter.
1106010	1108630	And I need some sort of user-friendly interface, right?
1108790	1112630	All this stuff is great, but if nobody can use it, nobody's going to use it.
1114410	1120610	So, from those problems, we are going to break down the gaps that need to be filled, and the things that are already solved.
1120670	1125750	So, for one, trilateration and other signal analysis techniques, they're already known.
1125750	1128290	Like, I don't need to reinvent trilateration.
1128290	1130190	This is a technique that exists.
1130370	1131930	I need to implement it.
1132070	1136070	I need to find a way to make it work, but I don't have to create it.
1136070	1138470	So, this is a gap that I do not need to fill.
1139050	1140750	The next one is a user-friendly interface.
1140750	1142090	I mean, come on, that's entirely doable.
1142090	1143390	Form follows function, though.
1143390	1144930	So, I just put that to the back of my mind.
1144930	1146770	We'll figure that out when we get there.
1146770	1149530	We have to have something for the user to interface with.
1149890	1151870	And then, finally, gathering send and receive data.
1151870	1154250	Well, this is all using the 802.11 framework.
1154250	1157230	That's kind of what the 802.11 framework is made for.
1157230	1161090	So, there's got to be some way for that to already be a solved problem as well.
1161250	1166890	Which means that the problem that needs to be filled, the gap that I need to fill, is a hardware solution.
1166890	1174230	Like, I need to find some hardware that can do polite Wi-Fi and is capable of sending and receiving the data that I need it to send and receive.
1174430	1176270	That is actually a gap to fill.
1176270	1177830	Everything else isn't a gap.
1177830	1178390	It's solved.
1178390	1179890	I just need to figure it out.
1180750	1183090	So, now we're on to the hardware selection.
1183110	1184950	I'm personally a fan of Espressif.
1184950	1186190	I love their stuff.
1186190	1186710	It's cheap.
1186710	1187410	It's accessible.
1187410	1188190	It's awesome.
1188190	1190030	Their documentation is amazing.
1191070	1192830	And, yeah, they're cheap.
1192830	1198010	They also have ESP-Now, which is a mesh capability for sending and receiving data between ESPs.
1198010	1199050	It's awesome.
1199330	1202870	And , the ESP-IDF allows for low-level control.
1202870	1206350	Meaning, I can send and receive 802.11 frames directly.
1206350	1219010	I don't have to do any weird thing where I'm, like, trying to change my device's Mac and I can literally just write an array of bytes and say, send this as an 802.11 frame and it will say, yes, sir.
1219010	1220570	And send that frame off.
1220830	1228510	So, in the end, the actual kit that I chose with the ESP 32 S2 Solo 2, it is on the DevKit C and it is $8.
1228530	1229390	I love it.
1229430	1231370	It's what's in these guys right here.
1231370	1232090	It's great.
1232150	1233730	Bought a bunch of them, set them all up.
1234890	1236490	So, now we have to break down the problem further.
1236490	1237670	So, we have our solution.
1237750	1238810	What do we need to do with it?
1238870	1241270	Problem number one, we need to implement polite Wi-Fi.
1241270	1243750	Problem number two, we need to implement ESP Now.
1244250	1247330	Well, ESP Now, again, looking at gaps that need to fill.
1247330	1250470	So, we're focusing our problem solving on gaps that need to fill.
1250470	1251850	So, we're not going to reinvent the wheel.
1251850	1253950	We're not going to start with something that's already solved.
1253950	1257650	We're going to start with the thing that we need to prove that this technology can work.
1258690	1261430	And, ESP Now has great documentation.
1261690	1262790	It's implemented.
1262790	1264430	It already exists.
1264430	1266650	I don't really need to, again, reinvent that.
1266650	1267730	I don't need to work with that.
1267730	1273170	I just need to figure out how my solution fits into the already existing solutions that are out there.
1273410	1276990	So, that means problem number one is to implement polite Wi-Fi.
1276990	1281190	There's nothing out there right now that shows you how to do polite Wi-Fi on this stuff.
1281430	1290170	The papers talk about the technical side of how to do it, but they don't provide any direct examples of here's what you do, here's when you do it, here's how you do it, here's what it looks like.
1290350	1292550	So, that is our problem to solve.
1293690	1298210	So, now, to implement polite Wi-Fi on an ESP32, we need a couple of things.
1298350	1299890	Number one, we need a valid frame.
1300590	1302270	Number two, we need the target.
1302730	1305610	Number three, we need to set our source ourselves.
1305610	1306910	We need to set our source MAC.
1307030	1311690	We need the ability to send those 802.11 frames, and we need the ability to receive ACKs.
1312530	1314290	You can see here, these are the frames I chose.
1314290	1317070	I chose a null data frame because they're small, they're quick, they're easy.
1318350	1325230	And you actually can throw some data on them if you want, but they are generally just a blank frame that's used to kind of keep a live signal.
1326130	1329950	And then the ACK coming back, you can see that is an extremely simple frame.
1329950	1332530	It's just got the frame control, which tells you that it's an ACK.
1332530	1339310	It's got how long that frame is going to be there, the MAC receiver, and the end.
1339450	1341570	There's almost no information in an ACK.
1341570	1346070	But we need the ability to do all of this within the ESP32.
1346290	1350810	So the first thing that we need to do in there is implement our first user interface.
1350810	1352910	The user needs to be able to set the target.
1352910	1354870	The user needs to be able to set their source.
1355150	1364090	So we did that using the non-volatile storage, the NVS, on the ESP32, and a serial interface, just a basic serial interface, to put the data in.
1364090	1370150	So again, this is our first instance of a user interface implementation, form follows function .
1370150	1372770	So the function is, they need to set the target and the source.
1372770	1376070	The form easiest was to just have a serial interface to do so.
1377190	1388330	Also, by using the non-volatile storage, you can reboot your device, so you plug it into your computer, use your serial to set the data, then you can unplug it, and plug it into a battery power source, and you don't lose your target, right?
1388330	1391610	It's not stored in memory, it's actually stored on the device.
1393110	1396190	So the next thing we needed to do was implement a frame.
1396450	1399990	Again, I chose a null data frame for this, because they are small and easy.
1400510	1401970	They're very quick.
1402290	1407490	They contain all of the details that you need, your destination, your source, and your BSSID.
1407970	1414310	In this particular case, we actually set the BSSID and the source to the same thing, because we don't know the access point of the target.
1414310	1415390	We don't really care.
1415810	1417590	The target doesn't even really care.
1417590	1419590	We just need to send something valid.
1420010	1421850	And this is a very easy frame to get valid.
1421850	1423910	They're quick to calculate, quick to put out there.
1425970	1429590	The next thing is, we need to put the ESP32 into promiscuous mode.
1429950	1433410	And with promiscuous mode, there are a bunch of filters that you can set.
1433430	1437250	So we set the filters in promiscuous mode to read ACK frames.
1437570	1442330	There's a lot of them out there, so you've got to have really quick processing for this, so you don't fill your buffer.
1442810	1444830	But easy to do.
1444830	1445550	And you know what?
1445550	1453110	While we were looking at putting in promiscuous mode for ACK frames, well, you can set some filters for other types of frames too, so why the heck not?
1453110	1455310	Let's also look at management frames and data frames.
1455310	1457690	Those will tell you if your target's in the area passively.
1457690	1463050	So we now have put the passive scanning feature into this device that has that active scan.
1463050	1464070	So we have both.
1464070	1469870	If your device sends out a beacon, we'll pick that up, and it'll also pick it up if we send out the polite WiFi.
1469870	1472450	It can do both at the same time, so why not?
1472710	1474330	And don't forget to channel hop.
1474850	1477210	That was a mistake I made early on.
1477210	1479010	Don't forget to hop through channels.
1481090	1484870	So the next step is to do the next level of user interface, right?
1484870	1494630	The user needs to be able to do something with this data, and I don't want people to have to be walking around with their laptop out all the time, reading the serial interface.
1495050	1500950	So I decided the easiest, again, form follows function, is to just throw two LEDs on the darn thing.
1501190	1506710	One of them blinks faster if the signal is stronger, and the other one is brighter if the signal is stronger.
1507570	1509050	I have them right here.
1509050	1510350	You can see they're blinking right now.
1510350	1514670	These are actually currently hunting the foxes that are set by the CTF.
1515790	1517910	And you can see I actually have a blink.
1517910	1520070	This blink is just to let me know that it's working.
1520070	1522050	So you've got the power LED on these things.
1522050	1525410	Then you've got this, which is kind of like my software is functional LED.
1525470	1528950	And then once I get a signal, this LED will turn on.
1529070	1531650	It'll actually get brighter if the device is closer.
1531650	1535870	However, in my experience, it is really hard to tell if something is brighter or not.
1535870	1538850	If you've ever actually used LEDs that do that, it's pretty much impossible.
1538850	1542870	That's why I added the second one, which is the faster blink, because that is very clear.
1543170	1547290	You can actually move these closer to devices and it will just go nuts.
1548110	1551250	Very, very easy and clear to see when it is functional.
1552790	1554550	And yeah, it started off as just the one LED.
1554550	1563070	I ended up adding the second one, and now we have a user interface that is very clear indication of the RSSI, of the signal strength of their target you're looking for.
1564790	1567970	So, I'm going to do a little demonstration of the device.
1567970	1570650	Like I said, I've had them running right here the whole time.
1571290	1576270	I actually think it might be easiest if I do the demonstration by grabbing the video that I have of it.
1576990	1578230	We'll do that here.
1578370	1581870	Go ahead and finish the talk, and then I'll pull up the video for you guys to do that.
1582030	1587570	The main reason being, I don't have foxes nearby for myself to target.
1587650	1594270	If anybody wants to volunteer a fox, I just need a 2.4 gigahertz device, and we can actually see these things in action.
1594270	1596370	But, it's really simple, like I said.
1596370	1598590	Light turns on when you get a signal.
1598590	1600310	Light blinks faster when you get closer.
1600350	1603830	It is not rocket science on that, and it's super easy.
1603830	1606010	The whole point I made it, again, was accessibility.
1606170	1610950	I want this to be something that you have somebody on your team who can say, provision these devices, right?
1610950	1619890	They build the repo, they flash it onto a device , you set the target, and you can hand it off to anybody and just say, hey, play hot or colder.
1619890	1621550	You got a 2 .4 gigahertz?
1621590	1622250	Awesome.
1623010	1625950	The next thing I actually need is a USB micro cable.
1626230	1628570	Anybody here could run to the table that I have?
1628850	1631350	I've got a couple people out here who have been working with me.
1631350	1634510	Somebody could run to the table and grab a USB micro cable off my laptop.
1634510	1636330	I'd appreciate that, or off my desk.
1638830	1645490	So, you know, I want it to be something that you can just hand it off to somebody, and they don't know anything about how this works.
1645490	1646250	They don't need to.
1646250	1649890	They just need to know, hey, if it's blinking, you're closer.
1650450	1652250	And honestly, this has been really successful.
1652250	1656790	We've had a number of people that have come up and been interested in these devices, and I've illustrated it to them.
1656790	1663770	I've handed it off to a few people that I work with who have no idea about any of this code that's in the background and how it's running, and it's super easy.
1663950	1666070	They can go out and see it.
1667610	1669670	So again, I'm going to go ahead and do the conclusion.
1669670	1672090	Like I said, we'll do a little bit of a demo here in just a minute.
1673070	1679490	And the conclusion is that the goal was to create a real-time tracking widget for Wi-Fi devices.
1680010	1682570	And that is not finished, but that is well underway.
1682570	1687590	And on the way, we have this proof-of-concept device that actually does it.
1687810	1692110	The technology there is available, accessible, and cheap, which was all the goals.
1692110	1692690	And it's proven.
1692690	1693590	Do you have the cable?
1693610	1694310	Awesome.
1694390	1695650	And it's proven.
1695690	1701670	So because of that, this is a pretty successful little device, and it's on the way.
1701730	1713410	All the problems that are left are items that, again, when we were doing our problem solving breakdown, and we were looking at it, all of those problems that are left are ones that have been solved in one way or another.
1714070	1715950	So all we have left to do is implement them, right?
1715950	1716930	That's the easy part.
1717410	1718430	Just do it.
1720210	1721870	So if you would like to...
1724340	1726820	I want to set down the microphone, but I don't want to move that thing too much.
1726820	1728460	So you said you had a 2 .4 gigahertz device?
1728460	1729960	You got the MAC address for it and stuff?
1733330	1737210	So I'm going to go ahead and unplug this here real quick while I set up a serial reader.
1772790	1773990	Don't you love demos?
1774010	1775350	Aren't they always the best, you know?
1775570	1776950	Always work first time.
1789880	1804200	So I know one thing I can do, it's a little bit of a cheap trick, but I can just look for the DC32 Wi-Fi and start beaconing off of that, but that's not as cool because they're kind of up and around, so I can't show you that it blinks faster when you get closer because you can only get so close to those.
1824740	1826460	All right, we've got serial interface up here.
1826460	1827460	Let me plug it back in.
1832060	1834460	All right, so yeah, here we have the serial output from this device.
1834520	1836020	It's just kind of giving me some data right now.
1836020	1839000	It's essentially just telling me that, hey, I don't see the target.
1839200	1845540	So I just need the MAC of a useful device and I don't even have my phone on me, so I can't grab that.
1852690	1854330	We're connected to DC32 right here.
1854330	1857810	I wonder if I can just grab the MAC address of my access point here.
1863010	1864070	There we go.
1867780	1868700	So 3CE9.
1868700	1872020	So we're going to type it in here, target MAC
1876650	1882150	3C E9
1886220	1893140	F7 So one thing that this might not work is this might be the 5 GHz band, so we will see.
1898310	1898750	0483
1904820	1906680	And I misspelled target MAC.
1907800	1909020	Isn't that great?
1937160	1944280	All right, we're going to fall on pan B here, which is the video demo, because demo gods are not on my side today.
1956290	1964510	So the video, what you're going to see is I actually, when I was testing these devices, I was picking random MAC addresses in my house that I had no idea what these devices were.
1964510	1966250	I didn't even know if they were in my house.
1966750	1971990	I was just going for it.
1972010	1980990	And as a result, I decided to use that as my first, like, fox hunt, was to figure out what these devices were that I was using.
1983450	1984630	So let's see.
1984630	1986430	Make sure this is the right video real quick.
1997970	2001090	All right, you guys are going to see the lovely inside of my house as well here.
2001090	2002130	This is going to be great.
2006720	2007700	Real quick question.
2007700	2010080	Is there sound coming from the HDMI?
2011340	2012100	There is not.
2012100	2013800	All right, so I will talk through it then.
2014980	2018380	So, see my lovely face here talking to it.
2018380	2020260	So this is in the pre-recorded version.
2020260	2021660	If you're seeing, there's actually two videos.
2021660	2028920	This is one where I actually show the device itself because you guys can actually come up here after we're done with the talk if you want to come up, ask questions, see the device.
2029120	2030380	We can talk a little bit more about it.
2030380	2031240	I'd be happy to.
2031480	2032380	So you can see that's there.
2032380	2033420	It's on the breadboard.
2033420	2034980	It's one of the earliest versions of the device.
2034980	2036660	Just barely getting it functional.
2036980	2042300	And I'm talking through the fact that I'm getting ready to go and fox hunt stuff in my own house.
2047430	2048770	It's unfortunate there's no sound.
2048770	2051290	I swear, I'm giving you the greatest speech of your life.
2051290	2054890	Like, if you could hear me talking on that video right now, you would be just wowed.
2056530	2057970	So I started in my basement.
2057970	2062330	I could tell that it wasn't in there because you can see that it is blinking, but it's not blinking that great.
2062330	2065390	But as I go up the stairs of my house, I'm blinking faster and faster.
2065430	2067430	I actually have no idea where this device is.
2067430	2068970	This is not a directional antenna.
2068970	2070750	This is an omnidirectional antenna.
2070810	2074450	The only data I have to identify this stuff is the signal strength.
2075310	2083330	So, you know, tracking stuff down is understandably a little bit more difficult because of that, but you can see that it is entirely possible.
2083330	2086310	As I'm moving through the house, I'm checking different Wi-Fi devices that I see.
2086470	2090250	You can see it's blinking slower, so that obviously wasn't the device.
2090390	2092550	You can see my children absolutely love to color.
2092670	2093610	I got a little doggie there.
2093610	2094550	Her name's Blueberry.
2095510	2097010	Kids love to color or play.
2097010	2098050	Kids kind of take over the house.
2098050	2098950	You know how that can be.
2099510	2102110	As you can see, I'm getting faster, so I'm thinking it might be my oven.
2102110	2105850	I know my oven has a Wi-Fi device in it, but it doesn't seem to be the oven.
2105970	2109470	I don't think that I have any Wi-Fi devices on the counter, but you might as well check.
2109510	2112690	Again, you can use that blinking light really easy to see where that is.
2113390	2127570	As I move into this room, it's going faster and faster, so the first thing I go to is my Switch, and I also have a device hiding behind the TV, a little Google Chromecast thing, and a sound bar, all of which might be the device, but we're not sure.
2127570	2130610	I actually didn't even know how fast the fastest blink was at this point either.
2130610	2132610	I just kind of programmed it, and off I went.
2133250	2137570	And then, as you can see, I got really close, and that little blinking light is just going insane.
2137570	2141530	So you can see I've located that it is that little smart speaker right there.
2141530	2146490	So you can kind of see that's how the device operates when it is functioning.
2148550	2150290	So let's get back to the presentation.
2153700	2157720	And yeah, now's the time for questions if anybody has any questions you want to ask.
2158040	2159220	I'll answer as many as I can.
2159220	2160900	It's a little bit loud, so please do speak up.
2160900	2161500	Yes, sir?
2167320	2168640	I'm sorry, I can't quite hear you.
2168640	2170520	Let me come forward a little bit.
2170520	2172220	I heard the first part of the question.
2179350	2183790	Alright, so the question was, if you wanted to evade this, could you use traffic control to increase the jitter?
2184010	2194090	So, if you do that, your device is not responding to acts correctly anymore, which will cause all sorts of other issues, because your device must act any valid frame it receives.
2194090	2195950	That is an 802.11 standard.
2196230	2200250	You would probably end up with connectivity issues in general if you did something like that.
2201130	2212510	I've thought about a number of different ways to try and evade this kind of technique, and an important thing to note about these devices is, for one, that they also do passive scanning, which you can't really evade a passive scan, but for the active side,
2212510	2217190	again, your device has to respond to a valid frame.
2217550	2220750	So, if the valid frame comes to you, you need to do that.
2220750	2229590	If you wanted to try and implement something that didn't respond with an act, you would likely end up with issues with 802.11 control, right?
2229630	2241770	Devices would send a packet to you, not receive the act, and go, oh, I better send it again, and send it again, until they actually receive that proper act at the end.
2243770	2244930	Yes, sir?
2247110	2249010	Am I going to release the code?
2249090	2251390	The answer is, after DEF CON.
2253830	2261690	So, when we are able to do any sort of code release or code reviews, it's currently under review right now, before release.
2262150	2273430	I was talking, I think the best place for that to be communicated out will be either on the Discord, or in the video description, when the actual recorded version of this talk goes live.
2273530	2280630	So, if you're not on it, the Radio Frequency Sanctuary Discord, I forgot the exact name of it off the top of my head, but that Discord is a great place.
2280630	2281530	All these guys are on it.
2281530	2282430	They're super responsive.
2282430	2284310	I've got to say a big thank you to the admin team.
2284870	2286850	So , if you're not on that Discord, get on the Discord.
2286850	2288850	Lots of great stuff being shared there.
2290450	2291090	Yes, sir?
2298610	2302430	Yes, so the question was, I mentioned trial iteration, but I was only doing one device on the video.
2302430	2305850	So, that is where I'm specifying, this is the proof of concept device.
2306110	2318370	So, the full problem statement gets broken down into a number of different steps, and one of them is the fact that there need to be multiple devices communicating to each other, and the data needs to be able to be correlated between the devices.
2319310	2323410	However, in that, I broke down which problems I needed to solve first.
2323410	2325790	Which problems don't have a solution.
2325790	2327670	Trial iteration is something that exists.
2327670	2328570	It's solved.
2328570	2331230	Well, it's not solved, but there are algorithms for it.
2331230	2332790	There's research on it.
2332790	2340290	But doing polite Wi-Fi on an ESP32 and collecting that data on the same device is not solved.
2340290	2344490	So, this is a proof of concept of that part of the chain.
2344490	2349190	So, the full trial iteration and that scale is not implemented on these singular devices.
2349190	2353450	Again, that's a big weakness that you saw when I was doing the hunt with the device.
2353510	2357690	I only had the signal strength on an omnidirectional antenna.
2357910	2370350	It doesn't do the full scale trial iteration yet, but the point of the presentation was to break down which of those problems are solved, how they're solved, and how this device fits into all of that with a solution for the one missing piece.
2391970	2397330	So, the question was about private MAC addresses from an iPhone and an iPad.
2397330	2402430	So, I unfortunately am not familiar with how exactly that protocol works or how that would work.
2402430	2407950	I know that if it uses 802.11 to send and receive frames, that's what this is.
2407950	2411970	These are 802.11 frames that these are looking at and using and manipulating.
2411970	2417370	So, if the device is using 802.11 to communicate, this would affect it.
2417970	2421210	Do iPads and iPhones have something proprietary that is outside of that?
2421210	2422750	I honestly don't know.
2424090	2425470	Somebody's shaking their head.
2425470	2428370	So, you would end up seeing if it's private MAC.
2428370	2429410	Do you know what that means?
2429630	2431030	I'm not familiar with that.
2435060	2437960	So, apparently with that, they pick a new MAC address.
2438060	2447220	So, that actually would affect this quite a bit because you set the target MAC and unless you had something to update that target MAC with the new MAC address, it wouldn't work.
2447760	2451680	I don't know if maybe you could put it into a filter that says all MAC addresses or something like that.
2451740	2459200	There's ways that you could attempt to do that, but the way that this device works is once you set that target MAC, that's what it's hunting.
2459200	2464480	So, if your device is rotating MACs, then by all means that would evade this device.
2465140	2465760	Yes.
2484010	2485450	Yeah, and I apologize.
2485450	2487850	I'm a big part of the 2.4 traffic right now.
2488270	2493790	So, he was just saying that was the gentleman who volunteered to use his phone as a 2.4 GHz target.
2493790	2497090	He was just saying that's exactly what's happening with his phone.
2497090	2501070	It was kind of rotating MACs and he couldn't even get his own devices to connect to it.
2501070	2511430	So, yeah, if we're talking about evasion techniques, rotating your MAC address would be an effective evasion technique as it would for any Wi-Fi scanner that's looking for a target MAC.
2511430	2514910	If you change your MAC, then it's no longer able to see who you are.
2517440	2521940	Any other questions or anybody have anything else that they'd like to add?
2522120	2523880	So, I do have one more quick little bonus slide.
2523880	2527260	It's nothing too crazy, but I did want to talk about this donkey.
2527520	2530780	So, this is a donkey named Maggie and she is wearing a blanket.
2530780	2533520	So, it is a blanketed donkey.
2535140	2536500	Hopefully, you get the reference.
2537100	2540440	So, I wanted to take a moment to talk about how else this is different than Ypeep.
2540440	2544700	Again, Ypeep is a solution that supposedly exists, so I do want to kind of cover this real quick.
2544960	2548040	For one, Ypeep actually uses two devices that are co-located.
2548040	2559460	This is a very, very, very common solution for this because it is really hard to send a transmit and then immediately receive that ACK back because it happens so, so, so quickly.
2560140	2569540	This does not rely on co-located devices and it does not, it can use an arbitrary number of devices even.
2569540	2571980	The idea is to have this be a mesh at the end of the day.
2572020	2574320	So, the number of devices don't really matter.
2574320	2579900	They can work together and it is totally different than their co-located one sender, one receiver.
2580700	2589980	And I have tested, you can in fact on at least the way I have programmed these, at least the way this works, it will receive the ACK from its own send, its own transmit.
2589980	2593140	It is fast enough to transmit and then receive that ACK.
2594360	2600840	The other thing is, they used an 8266 and an ESP32 of unknown type.
2601760	2606640	Ours just uses an ESP32S2 so we are using a totally different hardware base.
2606640	2611600	Those don't mention which one is the receiver, which one is the sender or how they are doing any of that.
2611600	2612780	So, different hardware.
2612880	2617560	And the final thing is that their trilateration techniques relied on drone GPS.
2618360	2627860	The trilateration that we are talking about doing will use round trip time between the devices in the mesh so that they can locate each other in an arbitrary location.
2628100	2634380	The idea is that the user would then pin one of them using a GPS or even just on an arbitrary map.
2634380	2636400	You could just draw a map on your screen.
2636840	2646600	Say this device is here and then the devices will get the distance to each other and locate devices within that area net that they have cast.
2647260	2650580	Totally different techniques when it comes to how the trilateration is working.
2650580	2652040	Totally different set of hardware.
2652580	2656600	And a totally different send and receive methodology.
2656980	2659380	Again, that is my donkey being covered.
2662900	2665640	If anybody wants to come up here and see the devices, chat with me.
2665640	2668640	I am more than happy to hang around for a little bit.
2668640	2670860	Talk to you guys, let you guys interact with the devices.
2672280	2674480	And yeah, we will call the talk here.
2674480	2677520	Thank you all for coming and hopefully you have a great rest of your day.
