start	end	text
0	3540	All right. Without further ado, a man who needs no introduction.
8090	17270	Hello, everyone. How is everybody doing? Come on, DEF CON. Hey, my name is Guillermo. I'm 22.
17270	24090	It's my first time in DEF CON, first time speaking to so many people. So I think the Irish are going to be good for this.
26050	29610	So today I'm going to talk to you about Wi-Fi hacking.
31550	39390	So... yeah. So I have a bachelor's degree in the University of Chile. I'm Chilean, by the way.
41050	48510	I'm one year until I get my majors. So this... I'll talk a little bit about me.
48810	54370	So I'm into scrappers or crawlers. I don't know if you guys know them. Yep.
55090	60410	So I really like automation about things, like things you shouldn't do manually.
60410	67190	You should tell the PC or the machine to do it again and again.
67190	74610	So I helped create the genealogy tree for Chile, the biggest genealogy tree in Chile.
75370	83210	I did an HTR, it's handwritten text recognition research in Guatemala last year.
83210	86690	So I'm into AI as well, as most of you guys are.
88630	95330	And I went to DEF CON China on June, this last DEF CON on China, first one.
95590	101610	We did a workshop. In my second internship, I did Wi-Fi hacking.
101610	103910	So that's what we presented for DEF CON China.
103910	109030	And this is going to be the same workshop, just the talk.
110670	115190	So I don't know if you guys saw, the slides are going to be in that link.
115450	118150	The slides are really similar to the workshop ones.
118150	124670	So if you want to take a look, there's going to be, on the second link over there,
124670	128630	there's going to be some code for everything we're going to talk about.
130470	132830	You got your pictures?
136820	142380	All right, so Wi-Fi. Who knows here Wi-Fi? Everybody knows Wi-Fi, right?
142520	145240	So what is it? What is Wi-Fi?
145760	149780	Wi-Fi is a radio frequency. What does it do though?
149800	152580	So the idea of Wi-Fi is communicating.
152760	157160	You have an ISP that connects to the World Wide Web.
157160	162420	And you have a router that gives you the communication between the Web
162420	166460	and your machines or cell phones.
168480	172420	So I'm going to talk about a little brief history of Wi-Fi.
172960	181460	So on 97, the IEEE LAN protocol... I'm sorry, man. I'm so sorry.
183600	187460	The IEEE LAN protocols were defined.
187920	192880	And at first, they only supported two megabytes links.
192880	195300	So that wasn't good enough for Wi-Fi.
195920	199680	That was 802.11a.
199740	205680	And then once in year 99, 802.11b came around.
205680	209400	And it was like 10, 15, 20 megabytes per link.
209400	210960	So that was good for Wi-Fi.
210960	215120	So that's when Web came in in 99.
216740	219220	Two years later, Web got exploited.
219220	221080	So Web, so bad.
221880	225280	In 2003, WPA came across.
225740	231280	And 2006, WPS. We're going to talk a little bit about WPS.
232680	236800	In 2011, we got WPS vulnerable.
237060	240120	So does anybody here know WPS?
240120	242960	Yep. Yep. There you go.
244340	248040	2017, we got WPA2 cracked.
248520	253140	And 2018, we got WPA3.
253600	257340	And one year later, it's got already five vulnerabilities.
257340	260120	So it's not going to be implemented, I think.
261380	263220	Yep. Thanks for nothing.
265120	270200	So what are the attacks I'm going to talk to you about today?
270260	272520	We're going to attack WPS.
272540	274000	We're going to attack Web.
274100	276400	And WPA, WPA2.
276820	279520	We're going to talk about men in the middle.
279760	282600	How can we do that and how effective is it?
283680	286320	Denial of service, just one slide.
286620	288820	And DNS hijacking.
289540	291580	So, WPS.
291580	294380	Well, what is it, first of all?
295880	302180	WPS was implemented for the non-geeky people to connect to the Wi-Fi really easy and quick.
303380	308260	And, yeah, it has a single hard-coded value.
308260	312280	So only one value doesn't change unless you change it manually.
313120	315420	On 2011, it was cracked.
315420	316760	Brute force attack.
316760	322620	So you can spoof all the traffic on WPS.
323660	326220	So WPS has eight numbers.
326520	330660	And those eight numbers give you 10 to the 8th combinations.
331120	335060	So that's a really big key space for...
335060	340180	I mean, you look at that number, you say, wow, how can WPS be vulnerable?
340560	343700	But the last digit is a text sum.
343700	346360	So that's one less, 10 to the 7th.
346360	352300	And you get four, the first four digits are going to do a text sum.
352300	355160	And then the next three digits are going to do a different text sum.
355180	358660	So you actually get 10 to the 4th plus 10 to the 3th.
358660	361080	You only get a key space of 11,000.
361080	365100	So from that millionaire key space, you only get 10,000.
365100	366720	So that's why it's vulnerable.
371600	374780	So I'm going to go over the commands really quickly.
374780	381180	First, you're going to want to put your monitor mode, what's it called?
381180	383160	The Wi-Fi antenna?
384780	385780	Somebody?
386760	388620	The alpha? Nobody?
388880	389760	What's it called?
389760	392880	What's the term for your antenna?
393360	394260	What's that?
395440	397620	No, no, no, just the device.
397620	398820	How do you call it?
400800	401740	Adapter, yeah.
401740	403360	I was looking for that.
403360	406800	So you put your adapter in monitor mode.
407360	414660	And you can use the wash command to look at all the WPS around you.
415920	418820	And so you're going to brute force it with reaver.
419020	421880	That's how I did it. That's how I'm going to show you today.
422180	426180	So that simple command is going to brute force attack it.
426180	427540	You don't have to do anything at all.
427540	430440	You just reaver it and it's going to crack.
430440	435440	And the fourth command, you can authenticate to the Wi-Fi using the pin.
440180	445980	So I'm going to show you, I know you can't see that well, but...
445980	449360	Okay, so first you put your monitor mode interface.
450240	453840	Then what you'll do is check its monitor mode.
454160	458460	Then you use wash to check all the WPS around you.
458460	461800	You're going to see all of them showing up.
462600	466320	So you're going to pick your target and we're going to attack it.
466720	470300	Yeah, we chose WPS.
471560	475560	We get the MAC address and the interface.
475800	477800	And we start reaving it.
478580	480700	I don't know if that's a thing, start reaving.
480800	482080	You reaver it.
482120	486940	So what you can see right there, it's going to start using pins.
487760	489360	Like random pins.
489360	491260	And it's going to try to authenticate.
492000	493480	I can't, sorry.
494140	495180	I tried.
496260	498260	So you can see...
499560	503100	You can see right there it's like M1, M2, M3, M4.
503200	505240	So it's going to go through a process.
505300	508000	Like it's going to try pin 11111.
508000	511040	And it's going to go through the packages.
511160	513540	And it's going to be like, ah, this is not the pin.
513540	514600	Okay, next pin.
514600	519260	And reaver is going to go brute force attack it with the 11,000 key space combinations.
519260	520080	So...
521700	523500	So yeah, that's WPS.
523500	525060	Really easy to crack.
525280	531160	First, if you're trying to hack Wi-Fi, that's the first thing you're going to have to try.
531160	534320	Like, you see WPS, okay, let's attack it.
541110	544330	So, WPS has three versions.
544390	546810	Zero, no version, one, and two.
548810	549290	Version...
549290	554890	I was only successful with version zero, with the no version.
554890	560970	Why? Because the routers were so old, they didn't lock after trying a lot of pins.
560970	564470	So you can attack it and it won't lock.
564570	570750	Versions one and two, they have, after several failed attempts, they'll get locked.
570750	578150	So the solution there is going to be either the owner of the router has to reset it.
578150	580510	I'm sorry.
580830	586330	And it's not going to be that fast, because if you're going to start attacking, I don't know, 10 pins,
586330	592110	he's going to restart the router, and 10 pins, you're never going to get the 11,000, you know?
592110	594150	So that's a slow solution.
594210	596550	So there's the Pixie Dust script.
596650	604670	I wasn't successful running it, but I've read a lot about people being successful running that Pixie Dust.
604670	610770	So the way to solve the locks is using Pixie Dust.
612750	618190	Yeah, so you have to be really close to the AP, to the access point, to crack WPS.
618190	620970	If you're too far away, you just won't get it.
622590	629470	And there's a list of 175 devices that are vulnerable by WPS.
630670	634110	So if you got the link from the presentation, you can access that link.
644350	649630	So now that we got WPS out of the way, we're going to start talking about encryption methods.
650010	653410	And so I have a question for you guys. Why do we need encryption?
653970	662790	All right, so the first reason is that when you send data over the Internet, you have no power over the data.
662790	668330	So once you send it, anybody can take that packet. Anybody can do anything with that data.
668330	674130	So as users, we do not want to have our data out in the wild.
675110	677070	So encryption methods.
678670	685170	First, in 99, it was WEP. Then in WPA, WPA2, and WPA3.
685430	688570	So we're going to talk about all of them four.
689370	691790	Maybe not a lot about WPA3.
693470	698510	So WEP, web. Has anybody used web here?
699350	702030	Yep. Since how long?
702030	703790	Yeah, a while back.
703830	709250	So you're not going to be using WEP if you are here in DEF CON, you know.
709250	715970	But you can still check, you can still find WEP in the wild.
715970	723750	So if, I don't know why people are not up to date, but they should really stop using WEP.
724050	729230	So WEP has 64 and 128 bit key sizes.
729570	733790	It uses String Cypher RC4 for cyphering.
734830	738510	Which is actually a pretty good method, cypher method.
738510	742150	But the vulnerabilities is not going to be the cyphering.
742150	745350	The key is static and is entered manually.
745350	750210	So if you're using WEP, you're going to have to type in or randomly generate the key.
750310	752450	And it's going to stay the same all around.
753670	757870	So in 2001, it was compromised and it is very easy to crack.
759450	763630	To crack it, you're going to have to have some traffic through the network.
763630	765670	And I'm going to explain to you why.
772230	774370	So why is WEP vulnerable?
774370	779570	The packets are encrypted by the pre-shared key.
779750	786390	So when you enter the password of the WEP, that key is going to be used all throughout the packets.
786390	791810	So every packet I send to the internet is going to be encrypted by the same key.
791810	804030	So if you intercept, let's say, 10,000 packets, you're going to be able to decipher the password.
805530	809990	Mathematicians are so cool to do this. I don't know how it does it work behind the scenes.
810090	812750	But if it works, don't break it.
813290	818510	So the vulnerable thing here is that IVs are going to be repeated.
818510	824650	The IVs is an initialization vector. Once you send the packet, the encryption takes an IV.
824670	830050	And since IVs are not infinite, we are going to have like an overflow.
830050	832390	And you're going to have repeated IVs.
832530	839090	So with 24 bits, you're going to have that 16 million amount of IVs.
839090	849670	So once you start sending data through the network, once you reach over that 16,700,000, it's going to go back to 1.
849670	854350	And it's going to re-utilize the same IV used for a packet I sent a while ago.
854610	860570	So I can compare both IVs, and mathematicians are cool, so it works.
862530	868370	You can run all of the IVs in about 5 hours if you're patient.
868370	873570	You can get a web cracked in 5 hours. Usually it's not that long, usually it takes about half an hour.
875470	880230	And some commands. So once again, you're going to put your interface in monitor mode.
880610	883570	Then you're going to look for the target with AirDump.
884910	889670	All of you guys know the tools I'm using, right? Like you've been to the village.
890650	898750	After you search for your target, we are going to start doing a specific scan on that same target.
898750	903190	Using the BSSID, like the MAC address, and the channel, it's on that AP.
904290	908430	And in another terminal, we're going to start de-authenticating him.
908810	913670	Why do we need to de-authenticate the user, or the clients?
913670	919750	Because when the client connects to the network, it's going to go through the IVs.
919750	922870	And it's going to send packets to the network.
923070	926630	And it's going to be like, hey, I'm the user for this AP.
926630	929870	And IVs generated, and then you get the...
929870	937810	Since you are looking for the number 3 step, the AirDump, you're going to start getting all those packets.
938730	947030	So it's very important for you to start to keep those packets saved somewhere.
947030	949150	So then you can crack it with AirCrack.
949150	959730	Usually, if you have about 10,000 packets, which is maybe 10 minutes of listening into the Wi-Fi, you can crack it.
964390	964830	So...
967070	969870	First, we're going to put our interface in...
969870	971490	Okay, I skipped that step.
972010	975230	So I went directly to the AP I wanted to crack.
975610	979410	Right now, we are watching for the AP.
979410	982830	We can see we have a client connected back there. It's a station.
983330	985490	So if...
985490	989490	I know you can't see that well, but here in the data column...
989490	991730	I can't see either.
991730	995030	In the data column, you're going to start generating packets.
995030	997190	And those are the important packets.
997670	1001570	So once you get a lot of packets, you're going to start cracking it.
1001690	1008750	You can see that this station right here is generating a lot of packets, because it's maybe downloading something from the web.
1008990	1011430	Or streaming, I don't know.
1014750	1015230	Oh.
1016750	1018050	Oh, I'm sorry.
1023170	1025870	Oh, I can't...
1031280	1035120	I can't go forward, but...
1035120	1042260	I want you guys to see how it got the password, like, after you air-crack it.
1047090	1050170	Yeah, we're going to stay here for a minute, okay?
1053510	1057630	So there you can see I got a lot of packets in the data column.
1071540	1078440	So when I decide to say it's enough packets, I'll air-crack it. I'll just go ahead and do it.
1078700	1083280	You can start running on a second terminal, the air-crack command.
1083360	1087900	And it's going to go... so the first air-crack is going to ask for 5,000 IVs.
1088160	1090940	If it doesn't get it, it's going to wait until you get 10,000.
1090940	1095260	So you can have this in a parallel terminal, having the air-crack command.
1095360	1098880	And when it detects it's 5,000, it's going to go air-crack it.
1098880	1101240	And when it's 10,000, it's going to try again.
1101960	1105840	So there you just saw it was really, really, really fast.
1105840	1109300	Like, I ran the command, and it just instantly cracked it.
1109960	1115920	I think I had about 20,000 packets in my CAP files, so that's a pretty good number.
1115920	1118940	About 10,000 is a good number for start-cracking it.
1121860	1125380	So, what's the conclusion about WEP?
1125380	1128620	Do not use WEP. It's really easy to crack.
1128900	1138520	The encryption... so all your traffic is going to be unencrypted if you get the password.
1139680	1142900	So we're going to go into WPA.
1143360	1146960	WPA has two types of ciphering.
1146960	1151540	It's got TKIP and PSK, also known as AES.
1152900	1157460	It's got 128 and 256-bit keyphrases.
1157900	1164060	And the difference between TKIP, it's going to go packet to packet.
1164580	1170080	It's going to create dynamically... what's it called?
1170340	1172960	It's a pre-shared key. It's a PSK.
1172960	1176560	It's going to create it dynamically for every packet you're going to encrypt.
1177360	1183200	And AES is a stronger ciphering method.
1183820	1190640	If you want to crack AES, it's going to take you millions of years, so it's a really strong ciphering method.
1190920	1194820	And it was adopted by the US government in about 2006.
1196640	1201500	So WPA and WPA2 are really similar between each other.
1201500	1209520	The only thing that changes is that it's going to always use AES.
1209520	1212580	It's not going to let it use the TKIP.
1212880	1222420	So the problem with WPA is that the TKIP is really similar to the RC4 stream ciphering that we saw in WEP.
1222420	1225360	And that is not going to be good since WEP is cracked.
1225360	1229040	So WPA TKIP is going to be really similar to WEP.
1229040	1232660	So it's as vulnerable as WEP.
1233800	1238220	So AES is the best ciphering method.
1238220	1240420	It's the most safe.
1241620	1246600	Well, how can you create the PSK, the pre-shared key?
1246600	1252760	You take a passphrase, and it's going to go through a function.
1253400	1255660	I don't remember the name of the function.
1258250	1262190	The function is called PasswordBaseKeyDerivationFunction.
1262290	1266090	It creates a key.
1267570	1270210	That's what it does, that function.
1271170	1276830	So once you get the passphrase through that function, you are going to get the PSK.
1276930	1280450	Once you get the PSK, you're going to generate the PMK.
1280450	1288550	Which is going to be the... I can't remember what it stands for.
1291670	1293750	I can't remember the PMK.
1294230	1295910	PairwiseMasterKey, there it is.
1295910	1300110	So once you get the PairwiseMasterKey, you're going to combine it with a value.
1300110	1301510	Actually, two values.
1301510	1309050	The MAC address of the AP and the MAC address of the client.
1309050	1316690	So you're going to combine the pre-shared key, the PairwiseMasterKey, with all these four values.
1316690	1319870	And you're going to get the master key.
1324440	1327160	Okay, that looks very bad.
1327580	1332660	Okay, so you can see how the client and the router is going to be communicating.
1332660	1339540	First, the router is going to send an anon, which is the first value of...
1340120	1347960	It's going to be the first value that the client is going to use to create the PMK.
1348440	1354760	So once the AP sends that, the client is going to send back the PMK.
1354940	1357700	Once it's sent, the router is going to say,
1357700	1361920	Ah, okay, so you're okay until this point.
1361980	1364040	And it's going to send back another packet.
1371620	1374340	Yeah, so you can see it's a four-way handshake.
1374340	1376820	Does everybody know what the four-way handshake is, right?
1377340	1378060	Yep.
1378560	1380380	We're going to go over it a little bit.
1381280	1385320	So what's the vulnerabilities here in WPA?
1385320	1387240	The thing is that...
1387240	1394100	Okay, so the pairwise master key is composed of four different sections.
1394400	1403540	And the algorithm only checks the KCK, part of the PTK.
1403880	1405040	Why does that?
1405040	1411480	Because the chances of getting a KCK correct...
1411480	1418640	is the probability of getting a correct KCK with PTK correct is nearly zero.
1418640	1423280	It's 1 over 3 to the 10 to the 38.
1423280	1424280	Yeah, it's zero.
1424600	1429240	So the algorithm is only going to check the KCK part.
1430600	1433700	So why do we need to know that?
1433820	1438520	So the way to crack it is analyzing the four-way handshake.
1438520	1444000	Once you understand the four-way handshake, you know what to look for.
1444080	1447100	So in the first step...
1447100	1450840	I already explained this, so I'm going to go fast.
1458740	1467840	Yeah, so finally in the fourth step of the four-way handshake,
1467840	1473700	the AP is going to tell the client, hey, your numbers match, my numbers match,
1473700	1476960	you're a good host, come inside my network.
1480240	1486120	So for a little bit of commands, first you're going to put your monitor mode interface.
1486120	1489340	As always, you're going to look for the target with AirDump
1489340	1494400	and specify the target with AirDump and specify the channel on the BSSID.
1495100	1499480	In another terminal, you're going to want to de-authenticate the clients.
1500380	1505240	So in this step, you need to have clients inside the network.
1505320	1510580	Why? Because if you have no clients, then you can't listen to the four-way handshake.
1510580	1513560	We're trying to capture the four-way handshake.
1513560	1522220	So once we start de-authenticating them, the client is going to want to authenticate back to the network.
1522220	1525800	So that's when we get the WPA handshake.
1528750	1535850	And once we get the handshake, we can run AirCrack as well with a word list.
1535870	1537290	So dictionary attack.
1537670	1544270	Why is this useful? Because there are a lot of dictionaries out there in the web.
1544270	1553210	And today, nowadays, we have the cloud, so we can run a whole lot of passwords to crack the Wi-Fi password.
1557160	1561980	So here you can see the WPA handshake sign right there.
1562020	1565700	We can see that there are two clients connected to the network.
1565740	1570000	And once I start de-authenticating them, I'm going to get that message up there.
1570000	1573580	And that's all you need. That's the goldmine.
1576000	1581980	So if you do not get the handshake, you're going to want to de-authenticate once again.
1581980	1584720	And repeat until you do get the message.
1590780	1594760	So now we're going to see how to crack WPA and WPA2.
1594760	1599440	The way to crack WPA and WPA2 is actually the same method.
1599440	1602540	So I'm not going to do a difference between there.
1602640	1605600	So we do the monitor mode interface.
1605600	1608920	We're going to start looking for our target now.
1610740	1616500	So once we get our target, we're going to specify it in AirDump with the channel and the BSSID.
1621620	1623960	Getting the MAC. It's important.
1630180	1633840	So we can see right here that we got a client connected.
1633920	1637180	If we did not have that client, we just could not crack it.
1637800	1640880	So in another terminal, I'm going to start de-authenticating.
1641580	1649360	We can see that the power column is going to go jumping between 0 and a negative number.
1649440	1652620	That means that it's being interrupted.
1652760	1656080	So the client is going to be kicked off of the network.
1656160	1660660	And the client is going to try to get back into the network automatically.
1660900	1663920	So that's when we get the WPA handshake.
1667120	1675780	So what we did in China a month ago, two months ago, is that we created a password on Crunch.
1675780	1681020	Just created a whole dictionary with passwords, number-based.
1681540	1687280	So for the people attending the workshop, they could actually get to crack it.
1687380	1693180	We made it so that they could crack it in about 5-10 minutes.
1693180	1698260	So you can crack it with Aircrack and Dictionary.
1699860	1703300	So now I'm going to start talking about cloud.
1704220	1707000	There's this site called GPUHashMe.
1707520	1716440	And you can send the CAP files on that site so that it can start cracking it on their site, on the cloud.
1716720	1720460	So what it does is you have a basic search.
1721440	1724660	GPUHashMe is going to start doing...
1724660	1728060	Well, the basic search only takes 8 digits.
1728480	1735360	And it's going to use a reduced word list spectrum.
1736460	1741320	So once you send the CAP file, it's no charge.
1741360	1746340	And you get a message like, hey, we found your password. Do you want to pay $5 for it?
1746580	1749120	And usually I say no.
1749120	1753300	Because if it cracked it, then I can crack it with my own dictionaries.
1753300	1758760	So that's what we did in the workshops when we were trying to hack some Wi-Fis.
1758760	1761360	We actually sent it to GPUHashMe.
1761400	1768080	And once it said it got it, we just started cracking on my computer.
1769120	1777400	You also have an advanced WPA search, which takes a lot better and more word lists.
1777400	1780960	You have to pay in advance about $27.
1781120	1786560	So if you do not get the password or the password is not crackable, you do not get a refund.
1787460	1793380	Once it finds the password, it's free. You already paid $27 for it.
1798580	1800580	And there's the pro search.
1800580	1803360	It just uses a whole lot of spectrum.
1803360	1805400	It's going to be about $54.
1805940	1809720	So some of the cons about cracking in the cloud.
1809720	1816300	I think the cons are basically when you try to hack Wi-Fi is that it's really slow.
1816460	1825900	When I got into Wi-Fi hacking, I had high expectations.
1825900	1832480	Because I thought I was going to start cracking Wi-Fis and I'm going to be that cool kid that gets the whole neighborhood's passwords.
1832480	1834200	And it wasn't like that.
1834200	1838440	It took a lot of time and practice to actually know what you're doing.
1839880	1842560	So you can automize it.
1843000	1846600	Like I talked to you about crawlers and scrappers, I like automation.
1846800	1850480	So I had some scripts in the presentation from DEF CON.
1850480	1852500	There's some scripts for you guys to run.
1852500	1856640	That it takes the whole spectrum of Wi-Fis and it's going to start attacking all of them.
1860240	1863220	So we got a GPU hash me in the cloud.
1864180	1866760	And we tried to do it ourselves.
1866760	1869680	So we got an Amazon Web Service server.
1869680	1875480	And we had 16 NVIDIA K80 GPUs.
1876240	1880040	It was about less than a dollar for a GPU an hour.
1880040	1885660	So if you can actually crack the password in under an hour, it's going to be less than a dollar.
1888680	1896100	So the cons for doing this dictionary-based attack is that you actually need dictionaries.
1896780	1902380	That's kind of like a semi-con because there are a lot of dictionaries out there.
1902820	1904880	And really good dictionaries.
1905900	1913220	Another con, it was the configuration of the environment in Amazon Web Service was actually quite complicated.
1913220	1915560	It was not like, just go do it.
1915560	1918020	So we spent a lot of time doing that.
1919460	1921100	So as well as...
1923500	1926820	So I told you it was a slow process.
1927100	1931040	And in Amazon Web Service, we did not get really good performance.
1931040	1936880	Like, we had 16 GPUs and it only cracked 60,000 passwords a second.
1936880	1940380	Which sounds like a lot, but you're using 16 GPUs.
1940380	1946680	If you are trying to do a dictionary with 5 billion passwords, it's going to take a lot of time.
1946680	1955680	So actually, like I told you before, once we sent the cap file to the GPU,
1956520	1960880	and we got the check like, hey, we found your password,
1960880	1966880	we actually started using my Surface Book 2, and it was really, really, really fast.
1966880	1970920	It got really hot, so you can see why it's ventilating.
1971520	1974220	So I told you about the Amazon Web Service.
1974220	1978160	It cracked 60,000 passwords a second.
1978180	1981260	The Surface Book 2 cracked 100,000.
1981300	1986700	And with one GPU, I think we were doing something wrong in AWS,
1987220	1989240	but we couldn't figure it out.
1991180	1995180	And so now I'm going to start talking about client attacks.
1995340	2000840	So what I just talked to you about, it was infrastructure and encryption methods.
2000840	2003180	Now we're going to start attacking the client.
2005980	2009180	So the first attack is called the Café Latte attack.
2009600	2012600	I don't know why it's called like that, but it's a web attack.
2013000	2017840	So you actually do not need the AP to be nearby.
2017960	2019780	You only need the client.
2022420	2028720	So what you do in this attack is that you are going to simulate that the AP is near the client.
2028720	2031200	So the client is going to start connecting to you.
2031380	2036240	Once the client starts connecting to you, you are going to get the same passphrase from the client.
2036240	2041740	So you can actually crack the WEP passphrase that way.
2043140	2055500	The Café Latte attack is actually really simple to employ, to do to somebody if they are using a WEP AP,
2055500	2058240	which, please, do not use them.
2059140	2061420	Yeah, so it's really easy to execute.
2063140	2068080	Yeah, it's very important for you guys to have them in not associated mode.
2068220	2072880	You can see down there in the stations, they're not associated, so they are good clients.
2072880	2077540	If they are associated, we're going to have to kick them off the network and start doing the attack.
2080560	2085860	So for the Café Latte, I told you, you are supposed to create your own AP.
2085860	2093080	You do that with Airbase, and with command-n-w, that's going to start the Café Latte.
2093080	2097160	You actually run that command, and once the client starts connecting to you,
2097160	2099780	the Café Latte attack is going to execute by its own.
2099940	2101740	You don't have to do anything at all.
2102860	2108700	And you're going to have to collect the packets as well as we did in the WEP cracking.
2112360	2117080	And there's another variation of the Café Latte, it's called a Hirte.
2117080	2120980	What it does is it fragmentates all the packets.
2121020	2123800	So when you have a big packet sent through the network,
2123800	2129060	what this does is it's going to partition the big packet into really small packets,
2129060	2130480	so you can get more traffic.
2130480	2134020	Why do we need more traffic? Because we need the IVs to overflow.
2137100	2140080	So that's with the WEP client attacks.
2140460	2147500	So now, the Evil Twin. I think this is my favorite attack, the evil man in the middle.
2147500	2152260	Why is it my favorite attack? Because, well, if you're the man in the middle,
2152260	2157480	you are getting all the traffic from the person you want, or the company.
2158120	2160320	So I think that's really powerful.
2160320	2167200	Once you crack the password, you can decrypt the messages, unless it's HTTPS encrypted.
2167720	2171380	But, so, how does it work?
2171380	2175000	We see that we got an ISP.
2175640	2179180	And the Dracarys, Dracarys is actually a real name for AP.
2179180	2183020	We saw the, walking around the streets, we saw Dracarys down there.
2183020	2185320	So we said, huh, we need to hack them.
2185780	2192220	So, basically, the man in the middle is that all those machines are connected to Dracarys.
2192320	2198340	And our evil man down there is going to create an identic AP.
2199120	2204420	And with the same name, same ESSID, and same BSSID.
2205440	2210240	And what he's going to do, he's going to kick them out of the network.
2210360	2213900	He's going to denial of service the real AP.
2213900	2222600	And all those clients that are trying to reconnect to the AP are going to connect to the fake one.
2223300	2227680	So, it's actually quite easy to execute as well.
2227680	2233860	You just put the fake AP, kick the clients off, and the clients are going to come to you.
2237290	2241970	So, there's this thing about competing with the legitimate route AP.
2242170	2250970	You have to have the same signal, or strength, or power, as the original AP.
2250970	2256950	If you have less strength, power, the clients are not going to connect to you.
2258390	2265070	So, the steps for doing the man in the middle is you bring up a fake AP.
2266110	2269370	I'm sorry, you have an AP, you connect clients to it.
2269370	2274850	If you're doing this at home, and not in the wild, you bring up the AP, the original.
2274850	2279390	You connect some clients to it, and then bring up the fake AP.
2280110	2284410	Then you deauth them, and the clients are going to connect to the fake AP.
2284410	2288330	And that's what I told you right now.
2292990	2298430	Some commands. We already saw how to create a fake AP with Airbase.
2301690	2305230	This interface creates the AT0 interface.
2305370	2310210	And you're going to have to do a little bit of configurations between port forwarding.
2310290	2313490	So, you can actually give them internet access.
2313490	2318250	If you do not do this configuration, then the client that connects to the fake AP,
2318250	2321990	he's not going to be able to surface the net.
2324290	2327110	So, that's how you create the bridge.
2327110	2332090	You bridge your ETH0 with the fake AP created AT0.
2333210	2340410	You give them an IP, and I think I deleted some configurations.
2340410	2345250	If you want to know specific configurations, check out the Defcon China link.
2346710	2352450	So, once you ping that IP, so you know that you're having internet through the machine.
2354630	2356450	And more configurations.
2360310	2365590	So, what we want to do is...
2365590	2369870	So, we got our fake AP, and we got the client connected to us.
2369870	2372070	Now, we want to start sniffing the packets.
2372070	2374210	And we're going to do that with Wireshark.
2374210	2380350	We're going to put the Wireshark on the AT0, which is the fake AP interface.
2381210	2385970	And once you do that, you can start sniffing all the packets.
2387650	2394390	In the terminal for the error base, it's going to say, okay, the fake AP is up.
2394390	2400350	And it's going to start sending messages for when people try to connect to your network, to your AP.
2405780	2406700	Okay, so...
2407860	2412880	Error base is actually pretty cool, because you can tell it to...
2413460	2417360	You can tell it which kind of network I want to simulate.
2417560	2423600	For example, if I want an open network, I just do the error base, no parameters.
2423600	2429860	If I want a WEP fake AP, I just put the dash W.
2430200	2443880	And with WPA, WPA, with the different types of WPAs, we're going to start adding parameters to get the fake AP to behave like it's what you're trying to do.
2446220	2452240	So, we already talked about denial of service, like through it out.
2452240	2461400	When we were kicking off the clients of the networks for it to connect to us, we were actually denialing their service.
2461700	2468240	And the way I only know how to do DOS, it's with...
2469440	2471160	It's doing AirPlay.
2471160	2475880	So, the AirPlay is actually a pretty cool command as well.
2475880	2481760	You can tell it to do an infinite loop of deauthing with the dash 0.
2482160	2487720	You can do dash 0 and the next number, you see it's dash 00.
2487940	2491860	If I go dash 010, it's going to send 10 deauth packets.
2491860	2494960	If I go dash 00, it's going to go forever.
2494960	2502800	So, if you have your machine turned on and dash 00, she's not going to be able to connect to the network.
2508090	2511390	Alright, that was denial of service. I told you it was one slide.
2511550	2522890	So, DNS hijacking. We actually did not go in depth about this, but we got some pretty cool DNS results.
2523970	2527510	I'm not supposed to say, but we got all my neighbors.
2527930	2530890	And we started getting to the router and we put...
2531730	2533890	Yeah, you can't see it very well.
2533890	2539450	You go to the router homepage and to the configurations, you can go to the DNS.
2539450	2544150	And you can write down the IP you want it to... of another DNS server.
2547820	2553800	So, DNS hijacking is very useful for doing spear phishing.
2553800	2561680	Like, if you are able to hack into someone's Wi-Fi, get into the router and change the DNS,
2561680	2567160	you can actually get everything from the people connecting there.
2567160	2573280	Why? Because you're going to start looking like, ah, he goes to the bank of Chile,
2573280	2577460	he goes to the bank of Santiago, he goes to these pages, he goes there.
2577460	2585260	So, when you know where your client is doing the... which pages he's visiting,
2585260	2588220	you can actually create a phishing.
2588220	2592840	Like, ah, he goes to Banco de Chile. Okay, I'm going to create a fake Banco de Chile site
2593200	2606210	and redirect the original... you're going to redirect them to your fake website.
2606330	2609670	So, you can get credentials from whatever website you want.
2615910	2622890	There's... I think I didn't include the script, but you can actually automize it
2623510	2626190	by trying to crack the default passwords.
2626190	2632670	There are some dictionaries that have the default passwords for the different brands of APs.
2633170	2638430	For example, for Linksys, there's, like, username, password defaults,
2638430	2640950	and you can go through it really quick.
2640950	2647950	So, if your target is not really Wi-Fi geek, and he didn't change the passwords,
2647950	2649910	you're practically in.
2656480	2660160	And there's the link for how to DNS poison.
2660460	2665280	Like, it's a Spanish link, so if you want to translate it, that would be cool.
2669350	2671790	Okay, so, restaurants, coffee shops.
2671790	2681370	The typical display of a coffee shop or a restaurant is that you practically have Wi-Fi,
2681370	2687050	and maybe you have some machines connected to it, and then you have some printers.
2687090	2690910	You are going to have some customers eating there that are going to ask for the Wi-Fi.
2695080	2700360	So, what this guy can do, he can do a man-in-the-middle-in-the-hall restaurant.
2700360	2706900	For example, if he asks for the password, he is already in the network.
2706900	2711220	He doesn't have to do much work to get anything from the people.
2711220	2717320	You can actually get into the printers quite easily, and start printing the crap out of them, if you want to.
2718120	2724320	So, that's when I came to DEF CON, I was really worried about being hacked here,
2724320	2727420	and being worried about the Wi-Fis.
2727420	2730280	And I see that problem a lot in restaurants.
2730840	2735760	I am really looking out for anything suspicious.
2735780	2741320	Like, if I'm in Starbucks, for example, I look for suspicious people trying to do something.
2741320	2743480	Like, my nature, I don't know.
2747120	2762740	Okay, so that was all about Wi-Fi.
2762740	2767540	I just wanted to show you something we got into on our way.
2767540	2770860	It's a fake AP's flood.
2771220	2774220	So, what this command you're looking at right now,
2774220	2783920	what it does is it's going to create a whole bunch of fake AP's with really random names.
2784600	2785780	Like those.
2805540	2812720	So, if you guys can watch on your cell phones right now, I'm going to start doing the attack, or the flood.
2818060	2819960	Why is it not working?
2824260	2834100	Alright, so if you watch right now, you can see that you're looking at really weird named Wi-Fis.
2834520	2836900	If you can see them, raise your hand.
2837140	2846520	So, what happened in my machine right here, there's a lot of Wi-Fi going around, and my machine freezes.
2846620	2849780	So, there's the same proof of concept.
2849780	2857840	Like, how can you do a crash device by sending so many Wi-Fis?
2858040	2865600	We did not go in depth, but I think it's interesting to look for.
2865600	2872180	Like, if you want to mess with somebody, do a crazy AP flood and his cell phone freezes.
2878400	2882240	So, some of the devices we used.
2882360	2885540	You can see here the Pineapple, the Wi-Fi Pineapple.
2885720	2887880	You all know Hack 5, right?
2887960	2893020	So, the Pineapple, what it does is, it automizes all the attacks I just talked about.
2893180	2898300	And it does it fantastic, and it's really easy to use.
2898300	2904060	Like, if you want to get a man in the middle, you just tell it to do it, and it does it.
2904940	2912500	So, this adapter, it says it has 3km range, which I do not believe that.
2913000	2915540	It's actually pretty good for the cost.
2915540	2919540	It's $34 in Amazon, and it's actually a pretty good adapter.
2919680	2923300	The next one right here is $220 in Amazon.
2923300	2926900	It says it has 5km range.
2927120	2932640	I wouldn't trust that, but my friend has it, and it's not that good.
2936190	2938310	And that one, we got a crazy...
2939210	2946710	I think that one can go up about 5km on open, like no buildings in the middle.
2946830	2948790	So, that's a crazy adapter right there.
2950930	2958310	So, to finalize this talk, I just want to say, Wi-Fi is really weak.
2958330	2962930	Like, they have these strong methods for encryption and ciphering,
2962930	2968870	but there are a lot of ways to get around if you want to attack a target.
2968870	2970550	There are a lot of ways you can do it.
2970550	2975570	Even though Wi-Fi says it's safe, it is not.
2975810	2977690	And people do not know that.
2978350	2981530	So, even WPA3 is vulnerable.
2981530	2985350	So, I don't know how can we make it safer.
2985610	2987590	I always ask myself that question.
2987590	2989810	I just don't know how to solve it.
2989810	2995270	And I think people smarter than me are trying to solve it and they're not getting that either.
2996250	2998730	So, Wi-Fi is everywhere.
2998730	3001870	Everywhere you go, you're going to find Wi-Fi.
3002230	3007270	And I think that's a pretty cool research subject, like Wi-Fi in general.
3007270	3011790	Because everywhere you go, you're going to find it and everyone uses it.
3012570	3014510	So, WEP.
3014930	3020650	After getting to know WEP, I was like, why would people use WEP?
3020810	3029890	And so, we were in my boss's office with the adapter and we saw a WEP pop up and it went away.
3029970	3038450	So, we started looking for that WEP because we really wanted to do the hands-on, not just in the office.
3038450	3041290	So, we went outside to look for it.
3041290	3043650	So, I think it was a gas station.
3043890	3049850	And we were, one computer on one hand and the adapter on the other one, walking like that in the streets.
3049850	3051690	Like, where are you? Where are you?
3051690	3056270	And we actually got to, we found the WEP, it was a gas station.
3057650	3062150	So, we went there in bad hours because they weren't working.
3062150	3064130	It was like 7 p.m.
3064290	3067710	It was after hours, so no traffic was available.
3067710	3072730	So, we went there the next day and we actually got to crack that WEP.
3073350	3078070	I think that was my first Wi-Fi accomplishment.
3081770	3087810	Yeah, and to finalize it, Wi-Fi attacks are cheap to execute and they're actually pretty easy.
3087810	3091490	If you do not know anything about Wi-Fi, you can still do it.
3091590	3094850	So, there, hands-on for Wi-Fi.
3094850	3095430	Thank you.
