So who here has ever had a real-time clock fail on their laptop 26 minutes before their talk started at DEF CON? Just me then. All right, great. So this is my first time at DEF CON and I am going to learn to back up my slides from now on. Hey, let's do a talk. Do you have the button? No? I'll just stand here. It's cool. My name is Rick Farina. Nobody here knows who that is. I'm also Zero Chaos. I do a little bit of work on the Aircrack team, but the fact of the matter is this fantastic gentleman right here is Mr. X. So anybody here ever crack a web key? And somebody give this man a round of applause. All right, so as I said, this is Thomas D. Otrep, founder of Aircrack NG. My name is Rick Farina. I just kind of have a little bit of time here. I'm going to hang out and goof off and come up with some funny stuff. So we've got a little bit of stuff we'd like to talk to you about today, a little bit of Aircrack NG stuff, and then we've also done a little bit of our own research individually in just some random fun places of the world. So we'll talk about it a little bit. Some of the topics in this presentation may be used to break the law in new and exciting ways. Of course, we don't recommend breaking the law, and it is your responsibility to check your local laws, blah, blah, blah, blah, blah. No, in all seriousness, folks, part of this talk is definitely... This is something that will get you arrested by the feds if you do something wrong. So I will highlight that, and I will warmly recommend that you don't do it. My code release was also on the laptop that exploded, so I will totally have that out later today, I promise. Again, my laptop exploded, so my little AP contest is going to be postponed until tomorrow. Tomorrow in the Wi-Fi village, I'm going to put up an access point. All you have to do is tell me what frequency it's on and what its MAC address is. That's it. Anybody here think they can do that? All right. So if you can do it, first hour of it, I'll give it like two hours maybe. I'll buy you a Ubiquiti SRC card. All you have to do is tell me what frequency and my MAC address. If it takes you too long, maybe I'll give you 50 bucks towards a nice Atheros card. And if it takes all day, then I'll give you a hearty handshake and a pat on the back for finally downloading my patch and figuring out what I did. Okay? I'm going to turn it over to Thomas here. We're going to talk a little bit about some new stuff we've done in Aircrack, and hopefully you guys will think it's funny. So for web attacks, you can sniff passively, but it's slow. You have to wait a long time to get enough packets to create. And now there's no more weak IV. But you can use replay. Unfortunately, replaying is a bit nosy. You can easily find a signature. For example, on ARP replay, you can see on the host, just open the TCP dump on the interface, and you will see a lot of ARP. There's also some features on the access points that can prevent getting IVs. So I'll show you some key ones. So the first one is about WPA. For pre-shared key, you need to get both sides of the communication. And you need to be in range of both the clients and the access point. And for enterprises, nearly impossible to crack it passively. But most cases of EAP are not easy to mine into middle. Okay. Currently, nearly all attacks focus on the access points. But access points are getting more and more secure. There's new features in it, PSPF, client isolation. You can see strong authentication. And now the APs are no longer the unguarded backdoor. We're going to attack the clients. Tools have appeared recently, but they're not easy to use. And they have odd requirements. Here's a few tools. WEPOF, Café Latte, Hurt Attack. It's a new attack we developed that turns any IP packet into a packet. For WPA, there's no public implementation. For PSK and for Enterprise, we have a free radius WPE, thanks to Brad and Josh. But it still requires an hardware access point. To attack the client, there's many separate tools that are not easy to use. And the documentation is not always there. And the configuration is... Not easy. Until now. Where we developed AirBaseNG, it's a full monitor mode access point. It merges a few tools into one. And it also works in ad hoc mode. It's easy and it's fast and daily for keys. There's a few abilities of AirBaseNG. You can do the evil twin. Do a fake access point that looks like the access point of your company. OnlyPort or Karma. It implements WEP attack, Hurt attack, Café Latte. You can also get the handshake without having the access point. You only need the client. And there will be... We'll soon see WPA Enterprise. AirBaseNG is a soft AP. You can use WEP on it with open or shade key. Café Latte attack and Hurt attack, as I said. You can capture WP access points. You can manipulate packets. Even decrypt WEP packets and resend them. You can also filter. Add some filters to avoid disturbing. Nearby networks. Some of the filters are on the BSSID. And you can also use ESSID. Because by default, it catches everything. Any client probing for a network will be attached to AirBase. It also implements MAC filtering like you can see on your access points. Here's a few examples. Here's a few examples. You can easily capture the WP handshake. The access point will be called my AP. You can also develop scripts to manipulate packets. You have to use dash Y uppercase. And then start another script in another console. This replay script is given in every archive of AirCrecNG. You can find it in the... In the test directory. You can also do soft access points. Meaning that it looks like a real one. You can connect to the access points. You can ping the computers. With SSH, you can even connect to internet via this computer. So, Rick will continue. Thank you. So, AirBase NG is kind of... A combination of a bunch of projects that the guys in the AirCrec team have been having for years now. Setting up multiple access points. Trying to crack everything in sight. And I had a friend of mine that was just using a little AirBase NG. And this track, I believe it was just the other day, cracked about three or four cell phones with it. It's a really fun tool. And really, all the access point security is there these days. It's getting a lot better. Anything especially deployed recently is going to be pretty tight. But now the clients are a lot more fun. So, we talk about just attacking the clients directly. But the fact is, this doesn't promise a win either. This just makes it a lot easier. When access points first started out, nobody was really looking there. Nobody thought of the security. Now, it's the clients that are shifting the focus towards the clients now. So, there are actually ways to defend this. APs are being configured more securely. The clients need to as well. So, the simple defenses are actually covered really well on Josh Wright's website, WillHackForSushi. I'll have a full list of stuff. But there's a lot of really important things you can do. I warmly recommend you check it out. There's actually group policy objects for those of you poor people that have to administer Windows boxes. I'm guessing it's most of the audience. There's actually a very, very great way to set up some of these things. It's very well covered by Josh. So, I'm telling you the bad things. And I tell you that the defenses are there. You just have to look for them. So, as I said, we're going to talk a little bit about some personal projects now. So, we were working. We were doing some of the air-based stuff for a while. And I don't know. I get bored really easily. So, I like Atheros cards. Who else likes Atheros? Anybody? A couple of people like Atheros. They're really nice. They're called software-defined radios. And I was going through the frequency set. And I saw, you know, okay, here's the U.S. frequency set. That looks a little weird. I mean, is the card really not capable of transmitting on those frequencies in the middle? I mean, seriously? It's missing 400 megahertz out of the middle of the spectrum. What about the license? License bands. Who here has a Ubiquiti Super Range card bus? It's a fantastic card. I just blew one of them up yesterday. Really nice. If you go to Ubiquiti's website and several other manufacturers as well, they also have licensed radios. Sell things for military usage, public safety. All kinds of really interesting applications. Very, very expensive stuff. And it operates on 4.920 gigahertz. 4.95. 5.1. They really tripled the cost of the radio and made a different one? I wonder if we can do that without making an extra radio. So it turns out that as a software-defined radio, Atheros actually does do most of that fun stuff in the software. So what do we do? Unfortunately, as you all know, Atheros is very nervous about people doing things like, I don't know, changing the frequency set that the card supports. So they release a binary-only HAL for MAD Wi-Fi. It works pretty well. Unless you want to do hacking stuff. But nobody here likes closed-source binaries, do you? So ATH-5K was actually released by the community. It was approved by Atheros. It was acceptable. Nobody got sued over it. It was really great. And so here we are with a driver that almost works. That you can do whatever you want with. So let's take a look. If it's driven by a binary HAL and ATH-5K is the new stuff, let's take a look at ATH-5K. So on the MAD Wi-Fi mailing list not too long ago, a gentleman by the name of Kugutsuman, I apologize if I mispronounce your name. If you're here, I'd love to talk to you. He released a patch to do the debug regulatory domain. Basically, it allows all of the channels that Atheros officially supports according to their own testing. Well, there are some really entertaining comments in the ATH-5K code. And set this to one to disable regulatory domain restrictions. Oh, you thought that one was funny? What about this one? The transceiver supports frequencies from 4.920 to 6100. And from 2312 to 2732. Wow. That's kind of funny. And what's that down at the bottom in Japan? 4.8 gigahertz. Isn't that reserved for the DOD in this country? Huh. So yesterday, your card could support 2412 to 2462, 5180, 5320. 5745, 5825. My driver kind of supports about 600 channels. So when you set the debug regulatory domain, you can now go from 2.192 gigahertz to 2.732 on the BG. And 4,800 to 6,000. We'll talk about that in just a second. You'll notice I only go up to 6,000. You'll also notice I mentioned I turned a really nice Wi-Fi card into a brick. So the gentlemen upstairs at the Hardware Hacking Village actually have a really nice spectrum analyzer. When I started transmitting on 6.1 gigahertz, the card stopped transmitting. It still listens very well, but the preamp doesn't seem to work very hot anymore. So what's on these new frequencies? This is why I mentioned you will very much get in trouble. We have your fixed point-to-point, DOD, some amateur radio guys here. Amateur radio. I just got my license. I got my license like two weeks ago so I could play with this stuff. So you can now use 2300 to 2310, 2390, 2450 for your access point. I mean, you don't even need encryption at that point. Who's looking? Certainly not me. Fixed satellite, point-to-point, instructional TV, fixed satellite, radio astronomy, Department of Defense. This is why you will get in trouble, folks. I'm releasing this patch. I'm giving it to you. As soon as I get it off my laptop, honestly. The problem is I've disabled transmit. You can monitor everything you want in this country. It's perfectly legal. If you transmit on a satellite frequency, the feds will be on your doorstep in about 15 minutes. If you transmit on a DOD frequency, they won't bother knocking. Let's look at some of the higher frequencies. A little more DOD, public safety. Radio astronomy. Radio location, which means radar. Ground-based radar. More amateur frequencies. Yes, that's right. We can run new access points now. And more satellite. Again, if you choose to modify my patch and start transmitting, I would really appreciate it if you talked to me. If you have an amateur radio license, I'd be happy to make sure you stay within your proper limits. If you happen to transmit on a satellite frequency, I apologize to your next of kin. Spectrum Analyzer. I did go upstairs and test all this with the Spectrum Analyzer. And I was on my way upstairs to take pictures of the Spectrum Analyzer when the real-time clock on my laptop failed and it shut down and wouldn't boot back up. So, as you might have noticed, I was a little late to my own talk. And they wouldn't let me borrow the Spectrum Analyzer to show you. So, if you guys really want to see this, we'll just all crowd the hardware village upstairs. I'd be happy to show you how it works. Again, I've already lost at least one Wi-Fi card and probably severely damaged the second one. Thanks, Michael, by the way. I really appreciate it. These settings may differ from card to card. So, if you were to fix it to transmit again, I take no responsibility for you blowing up your card. Just so you know. Okay. Limitations. When adding in all these new channels, there's a lot of problems. Most of these license frequencies. Especially in the 900 MHz, but some of the public safety gear as well. They just kind of fudge things. So, let's say you have mad Wi-Fi and you have a licensed radio and you say, I want to be on channel 1. Well, for the licensed radio, it's going to say channel 1, but it's going to set the frequency of 4920. So, if you were to use Arrow, Dump, or Kismet today, it would set the right frequency and it would pick that up. But all you'd see is that it's on channel 1. Not very helpful. It's just done to make things easier so you don't actually have to. To modify things that are visible to the user so that they can keep these things hidden from you. Obviously, it breaks a lot of things. So, Arrow, Dump, NG, we modified to support all the frequencies. Only the channels are shown in the display right now, and you kind of lose some of the really important header information. Yeah, we'll probably fix that. Kismet can't set the channels at all. It displays channels, not frequencies. But it does save very usable PCAP files, which is nice to go back and read in Wireshark. So, a lot of the improvements needed for this. Sniffers are too trusting. They see a beacon packet says I'm on channel 6. They log an access point on channel 6. It doesn't matter if channel 6 is 2.6 gigahertz. It's just I'm on channel 6. It was never really intended to deal with this broken stuff like channel number fudging. Thank you to all the manufacturers that decided that was the best way to do it. So, they really need to be improved. But wait. After I submitted this. I finally convinced DragNorn that it actually really was setting these channels. So, we fixed Nucor in about two minutes after arguing with me for six months. And fixed everything. So, now Kismet not only reports the frequencies the packets are received on. It automatically calculates what the center frequency is and shows that to you as well. The AerodumpNG updates are being made right now. And we should be releasing that with 1.0. And it should work very nicely. Not that the DoD would run web. I left my white hat in the speaker room, honestly. Please, please, please. It is legal in this country to monitor whatever you want. If you transmit on these frequencies, you will go to jail. I promise. If you have a license and you want to transmit on some of this stuff, I'd be happy to help you. If you don't have a license, I really recommend leaving the patch as it is. Okay? Have fun, everybody. Enjoy. And we will be taking questions after this. Thank you. So, I've been working on web cloaking. I think you still remember the talk of last year, the emperor has no cloak. Okay. Basically, web is still used. And some companies still use it for, like, wireless bandwidth. There are code readers, wireless payments. It works by inserting chaff in the air. It's a good idea, but unfortunately, you only have half the bandwidth you have. So, on an 11 megabit network, instead of having 700 kilobytes per second or 600, you only have 300. And even sometimes, you don't even need to filter out cloak packets. Craig and G just find the key directly. Just give the file and then, boom, you get the key. How to break it? There is no public documentation about it, so I had to analyze capture files. What I noticed is that every data packet is cloaked. For every packet, you have a cloaked packet. And at least the packet from the access point are protected. They have to check for the clients. Management frames and control frames are not cloaked. Also, notice that the packet size of the cloaked packet are the same as the original packet. So, you can easily find and match the packet on. And it's in the same place with sequence numbers. In most cases, it's a bit different than the sequence number of a real packet. For example, if you have a real packet with a sequence number of five, it can be three or four or six or seven, maybe a little bit more, but not more than that. And as I said, there's a lot of data. And only data packets are cloaked, meaning that only packets of type two and subtype zero are cloaked. You can also find what are the cloaked packet by checking the signal. You can see that the signal is different than the access point, and that's this way I did it. So here's a capture file. You can find the sequence number of 3669. And you can see a bit upper around there that there is another data packet that has the same sequence number and a bit lower here, another data packet that's the same sequence number. So we know that management frames are not cloaked. So we can say that this beacon has a real sequence number, and those two data packets are cloaked. With the implementation of a tool, we have no idea of what's the real implementation of web cloaking. And since we don't care about the key used by the sensor or if the data used in the packet are real or not, so the idea was using filters to remove cloaked packets. We have a single filter that gets the average signal and then can filter out the cloaked packet. We also have a few filters for sequence numbers. We base our analysis for each filter on packets that are known not to be cloaked. And you can combine filters in a different order. So as I say, we know that all management frames, the control frames, are not cloaked. We first save a base filter that is not cloaked. It's always applied. I just explained on the capture file, if any packets with an unknown status, like data packets that we don't know if it is cloaked or not, if this data packet has the same sequence numbers as a beacon, for example, or any other management frames, then it's a cloaked packet. We can filter out. And the other filter we have is a signal filter. We get the average signal of all packets we know that are not cloaked. We allow a small margin of error, really small, and packets outside of this margin are cloaked. They should be cloaked. Here's a few numbers. Here's a few numbers. This is the unfiltered capture file that contains both cloaked and unclogged packets. You can see that there is 400,000 packets, web data packets, and only 200,000 were decrypted successfully, meaning that the rest is cloaked packets. So you can see that half of these packets were cloaked. In the filtered capture file, you can see that with our filters, we filter a lot of packets. We only have 50,000 cloaked packets left, but that's enough to crack it. And on the cloaked capture file, we can check that to make sure that our filters are correct. You can see that there is more than 100,000 packets cloaked that we found. And only 2,000 are decrypted successfully with the key of the access point. Meaning that this filter, the signal filter, is not perfect, but it's already really good. And it doesn't give a lot of errors. So here's a cringy on the filter file. It just decrypted successfully a key. And you can see that not all packets can be decrypted with that key. So there's a few cloaked packets left. There will be a release soon. So... So stay tuned to check on subversion often. So as security researchers, I kind of feel it's our duty to the world to assume that we are probably not the smartest people in the world. As such, when I find something new or the Aircrack team finds something new or Thomas individually finds something new, we always want to share it. Because since we're not the smartest people in the world, somebody else thought about it first. They just weren't polite enough to tell you. There's a lot of things in this talk that are probably vulnerabilities you didn't know about or that are when you patch your driver, you'll find some vulnerabilities you didn't know about. Use this for good. We all want to do things that are fun. We all want to tell people about everything. And we all like our jobs. We all like our jobs. So just to make sure we've got the lawyer lottery set up, FCC guys, it's me and Thomas Rice Aircrack, I have nothing to do with it. So anybody from the DOD, stop in. We'll be hanging out in the Q&A and the wireless village. And I'd really love to know how you guys are using this in practice because I see you guys have a lot of frequency space reserved. We have the updated slide presentation on this laptop. That time I reserved to upload. It kind of went out the window as I took four laptops apart in the speaker room. We will have a full bibliography posted. It will be posted later this weekend. I'll give you links to all the fun stuff. I will show you all the patches and I will tell you all the mitigations for what we found. With that in mind, I think we actually have like a few minutes for questions and then we'll carry on to the speaker room. If you could please use the microphones if you have a question. I think there's a mic somewhere around here. Okay. Okay. Thank you very much. Can you hear me? Okay. So, this is, um, the Q2. There's both of them. And then there's the Q3. And then the Q2 will be posted tomorrow night. So we can. So the question is can you apply WPA, have you seen the WPA portals? enterprise to a rainbow table attack. Rainbow tables are actually only used for pre-shared key because enterprises, you're really attacking the EAP exchange, not the encryption itself, not the passphrase. There isn't really one. So with an enterprise approach, basically what you do, and Josh Wright and Brad, sorry, I can't remember your last name, did a really great presentation on this at SHMU. It is available for download. But basically they put up a fake access point, and then they have a rogue radius server behind it that just pretty much dumps your username and password to a file. So we've almost got that in Airbase NG. It should be released fairly shortly here. The question is, is the patches for the drivers, is that available for AF9K? I can't code to save my life. I can't code to save my life. I can't code to save my life. I can't code to save my life. So no, it's not because I was working on AF5K for the past few days without sleep. But tomorrow is a new day, and I was going to go out and do that for AF9K as well. Channel bandwidth support is not in that driver yet for AF5K. For AF9K, I believe it supports 20 and 40, and yeah, I don't plan to remove that. But I didn't patch in the half and quarter. I didn't patch in the half and quarter. I didn't patch in the quarter. I didn't patch in the quarter. I didn't patch in the quarter. I didn't patch in the quarter. I didn't patch in the quarter. I didn't patch in the quarter. I didn't patch in the quarter. I didn't patch in the quarter. I didn't patch in the quarter. I didn't patch in the quarter. I didn't patch in the quarter. I didn't patch in the quarter. I didn't patch in the quarter. I didn't patch in the quarter. I didn't patch in the quarter. I didn't patch in the quarter. I didn't patch in the quarter. I didn't patch in the quarter. yet. because it wasn't loading itself. And I noticed a whole lot of really great interrupt errors. So I don't think that the clock was fried by the Wi-Fi. However, yeah, some of the outside frequencies did have a little bit of a harmonic. And like I said, I got the card up to 6.0 gigahertz and it was looking good. And I got it up to 6.1 and all of a sudden it wasn't transmitting anymore. So we took it back to another laptop and we tested it out and it, the preamplifier blew. You've taken your card out and there's like the whole thing's hot? Yeah, it was about the tip of my pinky size was hot. The rest of the card was ice cold because just the preamplifier exploded. It was really cool. Another question? So the question is, can you use like an embedded box to allow for the extra time? range. The problem actually is only the fact that the driver is immature. AF5K supports station mode and it supports monitor mode. It does support injection, although I disabled that. It doesn't do access point mode. It doesn't even do ad hoc mode properly in my testing. So as soon as that driver matures a little bit, I would definitely be using a 5.925 gigahertz access point as I am authorized by the FCC to do. Question is to modify the card to use more bandwidth. There is definitely a limit in there. I know that mad Wi-Fi can handle up to 40 with no problem at all. I have not tried to push it farther. The problem is that does not work as you would expect unless your purpose is to jam the frequency. If you enable more bandwidth, you can't monitor more because even if you are on a 40 megahertz wide channel on channel 6, you won't see the 20 megahertz or the 10 or the 5 traffic. You are monitoring the whole thing so your hopping algorithm is different so you don't get the dynamic spread spectrum properly. So the question is how does the atheros driver play with the new atheros driver? That is actually a really great question. F5K was a project by the BSD team for quite some time and it works very well for the ABG cards. Atheros just released F9K maybe a little bit better than a week ago. So that, theoretically I hear it works really well but I have kind of had my head stuck into F5K for a while. So I will let you know tomorrow if you are curious. So the highest, I artificially limited the card based on what the spectrum analyzer told me. The card will accept being supported to 1.002 gigahertz and then the top end was 6.995 gigahertz. Can it really receive on those frequencies? That is a really great question. I didn't have anything to transmit on those frequencies. I transmitted on a frequency or two and the card exploded. I really couldn't get many packets through for sure. As for the antennas, if you use an antenna, if you use a Wi-Fi card with built-in antenna, it is definitely not tuned for that. It will feed back from the antenna and it will blow your preamp. I mean, I'm assuming. However they make a lot of good cards that have antenna connectors and you can always build your own cable and connect it to the proper kind of antenna. I don't know. Maybe I just don't have the equipment to do it. Maybe you can really set 6.995 gigahertz if you have the right antenna. I'm willing to bet the card will explode. But I've already tested it with one of mine. You let me know how it works out. Any questions? No? No? Thank you. Anybody else? All right, so we will be hanging out up in the Wi-Fi village, and that is right next door to the hardware hacking village. As soon as I can get the patch ripped off of my own laptop, I'd be happy to show people how it works, and it will be posted to Aircrack's website as soon as physically possible. And again, if you're DOD, you know where to find me. I would really love to know what you're using those frequencies for.