start	end	text
0	9080	Good afternoon, everyone. And this next talk that is sponsored by the Packet Hacking Village.
9500	14920	Is More Money More Problems? Actually, I'm wrong. Sorry. Is More Wireless More Problems?
14920	22980	By Jeff Horvath and Winston Tam.
23940	28360	Hey, guys. Thanks for coming out to our talk today. More Wireless, More Problems.
28360	31300	From the modular wireless security systems to the data analytics that love them.
31300	36900	I'm Jeff Horvath from Alsatian Consulting. Presenting with me today is Winston Tam from Uplinks LLC.
37840	41980	So, to tell you guys a little bit about me, I did 13 years in the Army as an intelligence officer.
41980	44480	I did 10 of those years in special operations units.
44680	48640	Once I got out of the military, I started Alsatian Consulting.
48640	50700	There's our website if you ever want to check us out.
50700	57760	We do cybersecurity, digital signature reduction, personal data protection to private sector and public sector individuals.
57760	61580	I have a BA in political science from Drexel University.
61580	65520	I have a master's in information security engineering from the Sands Institute.
65560	70600	And with that, I got 10 GAIAC certifications and there's my analyst ID so you can prove that I'm not a liar.
70940	74320	I'm a huge wireless enthusiast and I have two German Shepherds.
74320	79080	A 13-year-old girl named Belle and a 3-year-old boy named Gunner.
80080	86500	Hey, everybody. My name is Winston. I work in software development with my company, Uplinks.
86500	90340	I spent eight years in the Navy. Four of those in special operations.
90380	93740	During that time, I was a network engineer, pen tester, and a red teamer.
95040	102680	I also did like three concurrent years as a commercial pen tester for banks, ISPs, and funny enough, like an Indian reservation.
102680	104760	They get like a .gov domain. That's kind of cool.
105460	109780	Yeah, I do DIY tinkering, love 3D printing.
109940	114060	I have a lot of projects. A bunch of expired certs I don't care about.
114060	116020	I'm a proud Bengal cat dad.
116780	119880	I stopped playing Factorial. I switched over to RimWorld.
120280	122660	But I'm still... yeah, I know, I know.
123140	126020	Yeah, and I'm a decent rock climber.
126020	127580	And yeah, that's how I spend my time.
129460	134060	So let's talk about why we did this. Why the impetus behind this whole project.
134060	137700	And me being a huge wireless nerd, I wanted to collect large swaths of data.
137700	141580	I want to collect all of the channels, all of the packets, get all of the things.
141580	146300	And my initial thought for this was, okay, how many adapters can I actually put onto one computer?
146300	148340	Can I just do an all-in-one situation?
148480	152700	And if I can, how physically big is that and how much power is that going to take?
152700	155780	And what I found is that that then creates a huge issue with form factor.
155820	164260	Because in order to put the requisite amount of cards that we have displayed here on the front on one computer, that's going to be a rather large box.
164260	171260	So there's form factor issues. There are power concerns with it, with getting enough power to have that and actually have it be kind of portable.
171760	177800	Number of peripheral devices, right? The more things you add, the more the operating system has to take care of and has to keep track of.
177800	179680	So the more things you add, the more RAM you have.
179680	184520	And eventually you have this incredibly powerful system that really can only do about one or two things.
185180	189700	And with all that collection, even if we did get that to work, it still has a large amount of data.
189700	200300	I mean, think about how much Wi-Fi is flying around right now and how much data in a one-hour run you can get if you're listening to every single channel.
200520	204620	So we had a lot of large amounts of data that were choking my analytic tools.
204620	208080	I couldn't put it into Google Earth. I couldn't put it into another app called QGIS.
208080	211700	I couldn't put it into Wireshark because they were just too big.
211720	219440	And I would end up either having to strip out data and miss things, or I would end up having an incomplete amount of data.
219820	223680	So my solution to that is building the signal processing and reconnaissance kit yellow.
223680	230020	Which, yes, I know it looks a little orange, but I really wanted the last letter to be a Y, and I couldn't think of any kind of tech thing that started with Y.
230040	232440	So that's why it ends in Y, and that's why I'm calling that yellow.
233420	239740	It's a modular wireless collection. Each Raspberry Pi is set to do a different band of the wireless frequency.
240140	246500	It will also do Bluetooth BLE. With these Android phones, it will do cellular parameters.
246640	253180	So what tower you're on, what frequencies you're talking to the cell network on, how good or how bad of service you have, how far you are from the tower.
253180	256180	Because, again, I'm a huge wireless nerd, and that stuff really interests me.
256180	265740	It's got 13 alpha NEH cards, 13 MediaTek alpha cards, one Wi-Fi 6 card, because there really isn't that much Wi-Fi 6.
265740	274160	And me, being a self-funded guy, I'm not going to waste money buying chips that just aren't going to get used.
274240	280220	And then there are five NULAC SDRs running, looking for RTL 433 compatible devices.
280900	285620	Again, these things are running on three individual Raspberry Pi 5s, four Android phones.
285620	289200	The Android phones are running Wiggle and also GNET Track Pro.
289260	297300	And then I bagged it all up into these REI Trailgate gear cubes, and then put all of that into this portable REI Trailgate gear bin.
298880	300320	So why did I make it modular?
300320	304960	Well, one, we talked earlier about the memory requirements for having a lot of devices.
304960	314400	If I distribute those devices across multiple computers, multiple Pis, my RAM requirements go down,
314400	319720	because Raspberry Pis have been able to run 13 wireless cards simultaneously ever since the Raspberry Pi 2.
319780	324920	So the Raspberry Pi 5 has more than enough power to handle that much traffic.
324920	327640	So we distributed amongst multiple devices.
327800	330980	I don't have a need for live processing. I don't need to see my data come in.
330980	335040	I'm going to do all of my analytics on the back end when I have everything merged together.
335340	339440	So I don't need to set alerts. I don't need to have a GUI. I don't need to have anything.
339440	342780	This is all just a fire-and-forget headless collection system.
343900	348980	This also reduces bottleneck, because now I don't have all this stuff feeding into one device.
348980	354200	It still has to keep track of all the other devices and all of the other peripherals that are attached to it.
354200	360780	That also allows for a little bit more robustness, because if I have an issue with a collected file,
360780	364960	if I have an issue with a collected database, I may lose that entire day's run.
364960	367360	I may lose that entire day's session.
367520	370860	So now that I have it distributed amongst different devices,
370860	374240	if something happens to one of them, I still have collection from the other two.
375240	379360	This also, by dividing it up like this, creates smaller files, which are much more manageable.
379440	383840	It's scalable. As I become more interested in other types of wireless technology,
383840	388160	I just build a new Pi, and then we build a new ingest into it.
388780	391160	So I'll show you what some of that looks like.
391160	395660	And I've got two examples here for single-device characterization and AP characterization.
396960	401260	And because this is not my first DEF CON, I'm not doing it live.
405280	410000	So what we have here is the sample dashboard for single devices,
410000	415520	and we have the OUI of the devices that it sees, time-of-day analysis about when those devices are active,
415520	419800	day of week, and I did all my collection on a Tuesday, so that's why it's all in one pot.
420660	424280	Probed SSIDs for client devices, so what Wi-Fi networks are they looking for,
424280	428040	what access points have they been seen on, what protocols have been collected,
428040	433360	and this is a video, this is not a live website, so I can't scroll. There we go.
433360	439580	We've got the layers and the types of protocols that we got collected,
439580	442580	and this is all from Tshark or Wireshark.
442580	447280	We got MDNS device names, we've got DHCP client names and operating system,
447280	452100	we have user agent strings, we have MDNS information about the actual thing,
452100	456000	and this is all from unencrypted wireless networks that are collected with Kismet
456000	461800	that PacketGlass actually will take out and customize and contextualize.
462340	464400	So that's what it can show for single devices.
464400	467860	When we talk about access points, when we talk about that,
467860	473720	here we've got dots on a map, this is from a drive that I took in Washington, D.C.
473860	478860	Here we've got the top values of the access points, their encryption, their channel,
479640	490100	their bandwidth, their capabilities, and it scrolls down and you can see there's lots of things.
491060	493560	And then again, we get into more information about the network itself.
493560	500580	So again, the chip manufacturer, the BSID with the OUI lookup, the SSID list of the SSIDs we've seen,
500580	503840	what the router gateway IP address is, subnet mask, DNS server,
503840	507540	information that the router is giving up in an unencrypted network.
509690	514790	And there's also support for 802.11h, the country code, country settings,
514790	519730	so I can see what kind of frequencies the device is using,
519730	526190	what the WPS Wi-Fi protected setup information is about the manufacturer, about the type of device,
526190	532010	what clients are associated with it, all kinds of information related to the operation of that network.
532010	537630	Again, all passively collected because I can collect all of the Wi-Fi's with the SparkyBox.
540130	543950	So I'm going to turn it over to Winston, he's going to tell you about the ones and zeros behind it all
543950	546230	that actually make those pretty dots appear on a map.
546230	547530	All right.
550380	555960	Everybody, so, uh, yeah, what I was trying to let's get this blows up.
558240	562800	Do I doesn't look like it took a second. Cool. Thanks.
563040	566400	All right. So, uh, yeah, he collected a lot of data.
566960	574600	And a lot of them were geo data. And I'm just going to go over the specs, the planning and the kind of the execution of it.
574600	578720	But overall, I kind of realized over the course of a conversation at a bar
578720	583440	that this is a geo wireless processing hub from multiple software.
585560	590040	So like I said, we kind of were just having a chat, just drinking.
590140	592540	And he was telling me about all his wireless problems.
593120	597640	And, you know, and two and a half hours later, I was like, yeah, hold my beer. Let me let me do this.
597640	599080	And I signed on to do that.
600680	603540	So the objective is to kind of like put dots on maps, right?
603860	607080	Jeff is doing everything in the number one column over there.
607080	611760	He's collecting it from Kismet, Wiggle, ArrowDump, a couple of other formats.
611760	618060	I'll mention more later. So pretty much all my responsibility is in the number two section, the analytics platform.
618880	622200	At this point, as he was telling me all about it, I kind of had one in mind.
622380	624060	Spoiler alert, it's Elk.
624480	632960	And the goal is to make it easy for him to put dots on maps and pretty much change out maps or even visualization if he needs to.
635000	638840	So like I was mentioning earlier, these are the type of different formats that he mentioned.
639300	647220	But just to give you an idea, the files I'll be actually be dealing with were like .kismets, .tsv, SQLite, CAP, CSVs.
647340	650780	Maybe not everything needs to be preprocessed.
650780	657460	But as I was working on this, I was realizing I kind of have to consolidate everything down to one single format that would work with Elk.
659200	661140	So what is Elk?
661140	670120	So overall, Elk is just this open source-ish, it's a big asterisk there, analytics platform.
670120	672000	It does real-time data collection.
672740	676520	E stands for Elasticsearch, L is Logstash, K is Kibana.
676580	683600	But what you really care about is the ingestion order is actually from Logstash, that's where the data comes in.
683600	693160	Logstash forwards it over to Elasticsearch into indexes, where you will perform some kind of tagging to let go, hey, this is how we're going to retrieve the data.
693540	696440	And so when you can actually look up, do the searching later.
696880	698560	And Kibana is where you do the visualization.
701720	705040	So right out of the box, Elk doesn't really do what we need it to do.
705040	708380	It doesn't know what a Kismet file is. It certainly doesn't know...
709920	712940	Yeah, it doesn't really know how to use any of that data.
714000	718880	For example, maybe coming from Wiggle, we have something called Trilat, a field called Trilat.
718880	722200	And coming from Kismet, we have something called Latitude.
722380	726260	We need to somehow let Elasticsearch know, hey, these guys are the same thing.
726260	728040	This is the same type of geodata.
728680	732540	They also have a different data structure for all of these files coming in.
732760	737860	And lastly, the first-party solution for Elastic Map is Elastic Map Server.
738180	739560	That costs money.
739820	741640	And I don't like to give money away.
741640	743900	So let's do a free version of that.
746430	751470	So this is a little diagram I drew up to kind of handle the whole solution.
751670	753730	The right side is everything you saw.
753730	755950	It's containerized with Docker.
755950	758190	In this case, we're just using Docker Compose.
758310	763330	And we also added a little map server on the right side there.
764050	767590	On the left-hand side is pretty much where most of the preprocessing happens.
767590	770670	We're using a Python script to just handle everything.
772850	777370	And, yeah, we have, like, three directories that we'll kind of go over in a little bit.
782460	787900	So the work ahead of us is pretty much to have, one, stand up a copy of Elk.
787900	789480	Two, convert the files.
789640	791640	Three, we need to normalize the data field.
791920	794660	Four, we need to tell how we're going to use that data.
794660	798660	And then five, we need somewhere, even if we can put it on a coordinate space,
798660	802580	some kind of mapping on the background to show, hey, where on the map are we?
802580	806680	Because you can have coordinate systems, but it doesn't necessarily have to translate to a map.
807840	810020	You can put anything you want behind there.
814130	816650	All right, so great news about Elk.
816650	819890	It already came pretty much preassembled, right?
819890	823990	If you look for Docker Compose for Elk, they've already made it super easy.
824210	825770	Easiest thing you ever do is just download it.
825770	827910	Docker Compose up deep, you have it up and running.
827910	829830	But like I said, it doesn't do anything yet.
830150	835070	But I do want to give, like, huge props to, like, Elk Ninja for making this, like, really frictionless.
835070	839650	I'm pretty sure that's actually the first-party GitHub project for them.
841370	845370	All right, so talking a little bit about converting the files into a compatible format.
845810	851350	So like I said, I decided to do this in a Python script outside of the Elk stack.
851550	855790	So we have an ingest folder, an index folder, and an archive folder.
855790	859370	We're pretty much dumping all of the data that we collected into an ingest folder,
859370	862150	where the Python script can be monitoring it.
862150	866050	And we can be monitoring for, like, Kismet files, SQL files, or whatnot.
866790	870650	And we kind of chose it for the least amount of work that Jeff had to do.
871190	876010	So pretty much as soon as he's exporting it, we want to have all the default settings.
876350	880590	So for, I think, Wiggle, it might be something as simple as, like, backup.sqlite.
880690	888090	All right, so the search pattern I'm looking for, then, is backup.sqlite for the Python script.
888610	891470	If I have to convert it down, then I'll convert it down to JSON.
891470	897810	And if I don't have to, I pretty much just pass it along from TSV or CSV and move it right along.
897950	903810	For the JSONs, there is a little kind of like a Logstash or Elasticsearchism,
903810	908670	which is you pretty much have to convert all JSONs into a single line per entry.
908830	912290	And this is for Elasticsearch efficiency reasons.
914330	919910	So there is a multi-line format you can do, but that, like, honestly, do you want to be less efficient?
922650	925610	So here's an example of how we might convert it from Wiggle.
926790	930550	So the Python script is going to look for, okay, cool, I see a backup.sqlite.
932410	934890	And we're going to just run this command.
935470	938710	Yeah, these are prefields, so this is kind of like slightly of a destructive editing.
938710	940970	This is also why we also backup the originals.
941910	944830	But these are the fields that Jeff told me, hey, this is what I need.
944830	945570	Great, awesome.
945570	948890	You could, hey, say select star and grab everything.
948890	953810	But if you're not really needing to, because the amount of data we're dealing with,
953810	956610	we really want to just, like, cut down on size where we can.
958950	960910	And same thing for Kismet as well.
961310	963670	We're also dumping it out into a JSON file.
963670	967690	And if it has a PCAP file, we can, like, dump it out into a PCAP NG.
968030	970030	And this is where we kind of ran into a little tricky thing.
970030	971690	I tried using PacketBeat.
972050	978830	And PacketBeat really feels like it's more designed for any kind of, like, streaming or network monitoring.
978830	981830	It's not really designed for this, like, individual file ingestion.
982010	987710	So what I decided to do was just have Tshark actually convert it back from PCAP also into JSON.
987850	994030	And that's also another step where we can do more filtering down so we can remove data that has absolutely nothing to do with us.
994030	996650	Because at first I was like, yeah, let's keep all the data.
996830	998870	I think we wound up filling up that...
999810	1002570	Yeah. In, like, a single session.
1002570	1005190	So that was, like, well, let's not do that.
1005650	1009330	So, yeah, we started looking for other types of traffic and things that we specifically wanted.
1012590	1017670	So to... yeah, the next part is then we had to tag and normalize the data, right?
1017670	1023370	So even though we bring it into Logstash, so we moved it over from preprocessing into Logstash now.
1023550	1026070	Logstash kind of needs a way to go, okay, what am I doing with this?
1026070	1029370	So right off the bat, we're using the file plugin.
1029570	1032230	And then for filtering, this is where I was talking about earlier.
1032370	1036370	This is how we let it know, hey, or start transforming from...
1036370	1045950	If Wiggle calls it Latitude and Kismet calls it, I don't know, Trilong or Trilat or whatever, right?
1045950	1052350	We're trying to give it a way to say, hey, we're going to consolidate all of this data type into one single naming field or a single field.
1052570	1055150	So that Elasticsearch knows how to use it.
1055150	1058850	And then, yeah, in the output, obviously, we're just sending it over to Elasticsearch.
1061310	1065330	And now that we are actually in Elasticsearch, we need to tell Elasticsearch, okay, cool.
1065330	1072090	Within this index, it doesn't, even though we called it, say, location, right, it doesn't really know what location is yet.
1072090	1077770	So here's where we actually define, hey, we made something called location, and we're going to define it into a geopoint.
1078230	1082310	Now, geopoint is something that's native to Elasticsearch, so it knows how to use that data.
1082730	1087310	Because we gave it a lat and a long, and it looks at it and says, oh, cool, this is an array. It has a lat and a long.
1087710	1090830	Let's put that as a dot. Let's put that somewhere on the map.
1091430	1096970	And that's pretty much how that works, and we have to repeat this process for every software that we want to do that.
1097450	1099230	But that's essentially the whole pipeline.
1099670	1105370	And to tie the whole thing together, like I said, because we're not interested in, you know, paying too much to do this,
1105890	1110190	we just decided to use MapTiler, which is another open source software that we can just grab that.
1110190	1117110	Elasticsearch actually made it pretty easy where you can just either pop it into settings or in an environmental variable when you run up or spin up Elasticsearch.
1117690	1123230	For the case of using MapTiler, that's actually just a domain for a self-hosted option for it.
1124330	1126990	And in this case, we're also using just OpenStreetMaps.
1127450	1132550	So that's how we're able to just, like, put tiles underneath the coordinate system.
1134050	1140630	So to wrap it up, I want to give some special thanks to Ming, the Packet Hacking Village committee, for allowing us to present today.
1140710	1145570	Elk Ninja for the work on the Dockerized version of Elastic.
1145570	1151230	Dark Matter for giving me the idea of how to build a large-scale wireless collection rig.
1151230	1156850	Dragorn, Weigel Project, Guyakoff Solutions for making all the software that powers this system.
1156850	1164070	My husband, Mark Winters, who helped me make this actually fit into a nice, pretty presentable form.
1164250	1169010	Monkey User for letting us borrow a lot of his pictures for this amazing presentation.
1169270	1172490	And Tyler Carper for his contributions with Winston.
1176410	1179610	Questions, comments, complaints, other things to begin with. Let's see.
1179610	1182350	I have a question.
1182350	1182870	Yeah.
1182990	1186590	I think if I heard correctly, you have three separate...
1188150	1189330	Yes.
1189770	1195650	Do you do anything special? Do you make any special efforts to synchronize the time you give the rig?
1195650	1198410	Because I would imagine when you reintegrate the data...
1199050	1199210	Yep.
1199210	1200410	...you have to have the...
1201230	1209090	Yep. So they get their time from the NTP server whenever I connect them up.
1209090	1212630	And then they have an RTC battery in there that's keeping that running.
1212630	1215990	So I may lose a few seconds, but with what I'm doing, it's not really...
1215990	1218430	Like, I'm not looking for an exact one-to-one correlation.
1218490	1220110	Got it. Cool. Thank you.
1222370	1223430	Anything else?
1235100	1236140	I just grab it all.
1236460	1239680	Yep. And then afterwards, then I look for the anomalies.
1239680	1242040	Then I look for the things that I want to see.
1242040	1245600	It's like, oh, that protocol looks interesting. Let's look more at that device.
1248180	1250800	So I've been able to find a lot of stuff through MDNS.
1250800	1254460	I've been able to find a lot of stuff through DHCP requests.
1254460	1258640	A lot of information about devices themselves, which has been really handy for that.
1260460	1262760	Yep. They're getting mid-signal.
