My talk doesn't start for eight minutes, but they've given me permission to tell you something outside my talk first, which I totally want to do, because there's something great that happened last week, and it was way too late to get it in my talk. So forget about this for eight minutes. We'll get back to that. What I want you to see is the link vulnerability. How many people know about the link shortcut vulnerability? Yeah, not even half of you. That means you guys can totally take over those guys. So on my website, samsclass.info, they had Wi-Fi on my airplane, so I got this working on the plane to another conference I just got back from, and we did it down there. This is awesome, and you don't need to know anything. So I wrote it up here, and I tried to get it in the speaker's corner, but I was too late to do it. So go to samsclass.info, and you can take over everybody around you and everybody in the whole blasted world right now. This is one of those rare times. So what's going on is... Okay. So Microsoft has a vulnerability that was found in their operating system so that link files, the routine that draws the picture on the screen, on the icon, has a bug in it. And I don't know exactly what it is. It's something like a buffer overflow. But anyway, you can put malicious binary in that file. So just viewing the file and seeing the icon means you're owned. So you can do it, and glorious HD Moore put it in Metasploit. So all you do is load up Metasploit. Issue the same old commands you always use in Metasploit. You tell it, use exploit, show payloads, choose a payload like reverse TCP Meta interpreter. And then your victim just... You have to trick your victim into going to a website, an Internet Explorer, or going to an SMB share. Because what you make is a malicious server. But if they go and view your server, the IE will pop to Windows Explorer, and they will see a window with these two files. And when this was originally found in the wild, it was traveling on USB sticks. And it was taking over power stations through SCADA. But the first step of that attack, which is a three-stage attack, was this one, which is awesome. So as soon as you see this shortcut, and the little picture appears, it's all over. You are owned. It has injected this DIL into memory and executed it. And if you're using Metasploit, it goes a phone back to you saying, please control me. And you control it, and you own that box. And that's what these instructions show you how to do. Metasploit looks like this when you're running it. Then when they connect, it does all this complicated stuff back and forth, sending more and more stuff over to the victim. And eventually, when it's done with all that hogwash, you get a session open. And then you just open the session, and you have a command prompt on that machine. And you can do whatever you want to it. I, of course, just go to the desktop and make a directory called owned. And your victim will just see directories start appearing on their desktop. It's wonderful. And there's nothing you can do about it. At least easy. There is no Microsoft patch. There are some things you can do, though, and that's, of course, the serious side of this. This is an awesome demonstration for students to get their attention. And it'll be homework for all my students next semester. But it'll be old and tired by then, like all my other homework, stuff that's been patched. So you have to get an old machine that's not patched, and then you can see it. But right now, you can do it to real living machines. And if they want to be patched, they have to go off the map. And you can use Sophos. Made a nice tool that will patch it. Microsoft Security Essentials apparently detects it because we tried it in the classroom. Two days ago in Orlando. And a guy with Microsoft Security Essentials, it popped up and saved him. So that's cool. So if you want to be safe, probably the most reasonable sane thing to do is put on Microsoft Security Essentials. I imagine the other antivirus products will eventually catch it, too. And maybe they already have. But anyway, there's a Microsoft workaround, but it stinks. You have to hack the registry, and you have to turn off the display of all icons. So all your icons look like dirt. So it's not much fun. Anyway. It's great for me that the previous speaker ended a bit early because I was thinking, I can't add this to my talk. And this is exciting. So you should all take over everybody around you at Windows, and then you can laugh. Because at DEF CON, you can do this stuff. And this is, as far as I know, it's not common that you have these living zero days with no patch. But it means that every server on the Internet running Windows and almost everybody running a Windows machine in here like me is probably vulnerable. As a matter of fact, I am vulnerable. I never got around to patching my own box. Which is commonly the case. Attacking boxes, you never patch them. I never run the firewall. I'm always getting all that junk out of my way. So you could take me over, actually. But you'd have to trick me into clicking on your link. Anyway. Let me see if it's time for my official talk yet. Looks like it is. Is there an authority figure? There you are. Is it time to get started? Okay. He says it is. All right. So let me depart from that, which is great stuff, but it's not my official talk here, which is also extremely important. I'm here on a mission from God. Okay. Which is IP version 6. Now, I've heard about IP version 6 for years and years, and it was like this total waste of time that I didn't really care about, and it seemed all complicated. And about three years ago, for some reason, I got all excited, and I tried to do it, and I got my best student. We spent six weeks replacing the firmware of routers with DDWRT and putting on things that were supposed to make it route IP version 6, and we couldn't make it work. We just got fed up and gave up. One other student of mine actually got it working because he had a Cisco router at home. But it would cost $200 a month to get IP version 6 to your house, and I said, well, you know, there's no point teaching anybody anything yet because there's no equipment worth having yet that you can afford in your house, and I better wait for them to do that. But in the back of my mind, the reason why I thought it would probably be okay is because there's class D and E just sitting there, 32 class As, enough to last us five or eight more years. So I figured there's really no crisis coming. But then I went to Hurricane Electric in Fremont, California. I went to a talk there, and they told us about IP version 6. And Aaron, the American Regional Internet Number Association, something like that, the people that really hand out the IP addresses were there, and they said they are not going to hand out D and E for general use. So we're coming into a time of crisis, and nobody is ready. And I knew this was my mission from God, to make sure all you people know about the crisis and what you can do about it because it's easy this time thanks to Hurricane Electric. So I'm Sam Bowne. I teach at Stanford. I go to City College San Francisco. And everything, my talk and everything is all on the web. All my stuff is always available for anybody to use. So let me show you why I care. IP version 4. We've all seen these addresses, 192, 168, 110. And, of course, in binary, that's a 32-bit binary number. And we all know how to subnet that and everything, but there's only 32 binary numbers, so there's only 2 to the 32 of them. And that's only 4 billion, and that's ridiculous, right? There's 7 billion people, and how many devices do you have on your body right now that need an IP address? I must have 4. And when I'm in my house, I have another 12. And, you know, there's no way 4 billion is ever going to cut it. So that's a problem. IP version 6 is the answer. Make the addresses really long and disgusting like this in hexadecimal. That is an IP version 6 address. Learn to love it. That is 128 bits long, and the good thing about that is there are enough of them, of course. That is 256 billion billion billion billion. So until we colonize the entire galaxy and have every atom in our body independently addressed to reformat will, we're not going to run out of those addresses. So we will not have to have IP version 7 in another 10 years. At least not because we ran out of addresses. And we really are running out of IP version 4 addresses. Here's the current situation. There are 256 class A's, blocks of 16 million, which is how they are commonly allocated. And we are now down to maybe 16 left. And they've already allocated something like six or eight of them this year. They're going to completely run out of them in 2011 at the current rate. It is an estimate because they are not allocated on a regular timetable. But they're going to run out in about one year. In about one year, whoever invents the new cell phone or iPad or any kind of gizmo and wants to sell 50 million of them is going to go say, okay, I have 50 million more things to attach to the Internet. And Aaron is going to say, tough. The Internet is full. You cannot attach any more devices to it. This is not going to be fun. So there's a crisis coming. We could see it coming 10 years ago and we're now down to less than one year left and nobody cares. Everywhere I go, most everybody, about 90% of my audiences have no interest in IP version 6 at all. They still think the way I did four months ago, it was some piece of nonsense, it's just a fake crisis like Y2K. Because they can just hand out those D and E addresses. They're just sitting there. Here's the projected timetable. The main reservoir addresses will run out in 2011. But the regional Internet registries will have some left over which they can continue to distribute and they will begin running out in 2012. That's the prediction. And then people will really go and there won't be any more IP addresses available. That's the end of the world. The Internet is full. Pack up the Internet and go do something else. That's not going to be a hit. But let me tell you what's already started happening. I brought up two years ago to my network administrator. Sydney College, we have a whole Class B address space. We have 65,000 IP addresses. And we're only using 30 of them for public-facing web servers. So we don't need them. So I wanted to sell them a long time ago because we're broke. We need money. And I went to my network administrator and he said, you can't sell them. We don't really own them. They're on loan or, you know, rent from some agency like IANA. But they just changed their policy about a month ago so you can really sell your IP addresses now. Because they said there are only two possibilities in the next year. They're either going to be a black market for used IP addresses or there's going to be a white market for used IP addresses. So we might as well choose the second of these two alternatives. And now when people apply to them and try to get IP addresses, they actually investigate why you're getting them. Because they want to determine if you really are going to use them or if you're just hoarding them so you can scalp them and sell them later. Speculators and IP addresses. And that's all coming. So in about a year, panic will set in. And it will happen. In about two years, I think we can really get a million bucks for our Class B. That's my goal. But we'll see. Because we don't need it. What you'll have to do instead of getting fresh IP addresses is you'll have to get IP version 4 addresses from some other company that was smarter than you and already went to IPv6. And that's what we're doing. And that's what all of you should do as soon as possible. Anyway, the Department of Defense changed to IP version 6 in 2008. They had a goal and they met it. To have the whole network runnable on IP version 6 in 2008. That is what put pressure on the end users. And operating systems like Microsoft put it in Windows XP. And they put it very well in Vista and Windows 7. It's in Linux. It's in Unix. It's in the Apple. Although Apple did a pretty bad job of it. But they will eventually be pressured to fix it. The rest of the federal government will switch in 2012 to IP version 6. And therefore, since every large manufacturer has to sell to the government, they have all been pressured into putting IP version 6 in their products even though there is no significant amount of traffic on the backbone in IP version 6 yet. And no significant consumer demand for it yet. But it's coming. And there will be a huge rush for it. And when it comes, there will be mad chaos because we are not ready. And most manufacturers and technicians are not getting ready. So the people that do know are going to be sitting pretty. And that should be you. And it's going to be my students because whether they like it or not, they're all going to do IP version 6 homework next semester. And my prediction is they will be glad of that in a year. So here's the summary. This is the current state of the Internet. And this is our fate. Those who accept soon will have a position of power in the new order. Those who resist will be crushed. So now that you have hopefully been motivated, you can now face the problem I faced, which is what do you do? Because there are big, thick books full of long, complicated, irritating things. And I looked at Microsoft's recommendation for an IP version 6 lab, and it was 260 pages long. And I said, how can it be this hard? It doesn't have to be that hard if you're a wimp. If you want to do it the Microsoft way and get all your domain controllers and exchange servers and everything, there's a bunch of fancy stuff you have to do. But you can get started and do the essentials easy and it's fun and it's a game. So anyway, but here's the plan. One plan which is really popular is to ignore it and hope it just goes away. This is not a practical plan, but it's the most popular one. The other one is to buy a gateway. And this is what's really going to happen. There's a lot of people, unfortunately, in everybody's house because they have a bunch of legacy equipment in their house that's IP version 4 only. So they are going to buy an IP version 6 device that will convert it to IP version 6 to go on the Internet. And there are currently four incompatible standards for that and four manufacturers making poorly designed devices to do that. So in the future, actually making a game connect to a game over here is going to require 16 combinations of imperfect translation on the way. And even more than that, Aaron will be giving some talks here. I'm not going to get into this. But the IETF guy at the last conference I went to was very unhappy because there's now NAT 4 to 4, changing IP version 4 to other version 4. There's NAT 4 to 6. There's NAT 6 to 4. And now there's even NAT 6 to 6, which was never supposed to happen. The whole point of IP version 6 was going to be end-to-end addressing. But that's already broken because the end-user machines can't handle the multi-homing. And I'll show you a little bit of that later. Anyway. So gateways are in the future. They're going to be a bloody mess. But companies are not going to use them. What you really want to have is dual stack on your company. This is the goal for the foreseeable future. For the next 10 years, we're going to have to run both IP version 4 and IP version 6 on our whole networks because everybody's going to have a mix of devices. And right now you can run IP version 4 only, but in 360 days. And therefore, all the people that plan more than a year ahead have already begun doing this, like Comcast and Verizon and Facebook and Google. They're already putting up IP version 6. So soon there will be IP version 6 only websites and IP version 6 only end-user devices. I think Verizon's cell phones are already IP version 6 only. It might be Comcast. I get it mixed up. One of those companies has already decided to use IP version 6 only on their cell phones. Smart meters are IP version 6 only. And Japanese televisions are IP version 6 only. And they get converted at the enterprise network address translation. Anyway, in the short run, the trick to get started learning is to use a technology. This is awesome. If you tunnel, you can take an existing IP version 4 Internet connection and you can run IP version 6 over it. Now, of course, this does not solve the problem. You're still using an IP version 4 address. It makes all your performance in IP version 6 inferior to your IP version 4 and all that. But it means you can learn how to do it now. And then you've got everything ready when you get native IP version 6 from your Internet service provider, which is coming very soon. AT&T offers it now, I've been told, with their latest U-verse. And various providers. I think Comcast just had their first rollout in California a month ago of IP version 6 directly to the businesses. So it's coming. So the fast thing is to set up a tunnel. And you can all do this right now. And all my students are going to do it. And you should. Because it's great. There are free tunnel brokers out there. Hurricane Electric runs one called Tunnel Broker. 6XS is one someplace in Europe. GoGo6 is my favorite because it's easy. You don't have to do anything to get a GoGo6 tunnel up except use Windows. And if you can't stand that, you should try one of the others. But here's GoGo6. And let me just show you because I am on IP version 6 right now. I'm connected with a wire to this DEF CON network. I'm using Windows 7. And so here is my local area connection down here. I have an IP version 4 address of 172.16.8.233. Now this FE80 address is a link local address. That's like a 169.254. It can only be used for local traffic. But I'm tunneling through the GoGo server. And I should have it running in one of my other panes here. There it is. The GoGo client. This is awesome. Because once you set it up, you don't have to touch it. And everywhere I carry my laptop, it connects to IP version 4 at a coffeehouse. And within a minute, the IP version 6 tunnel turns on. So I always have IP version 6. And I don't have to do anything to earn that. Because it automatically connects with a non-authentication network. So I have an authenticated free account to these guys. And I can choose how I want to do it. Right now I'm using the most universal one, UDP traversal. It will go right through network address translation and right through everything. I can go anywhere. It goes right through firewalls. It sends UDP packets out. And inside the UDP packets is IP version 6 hiding inside the IP version 4. And if I want to see my address, here is my glorious IP version 6 address. A long, horrible mess. But I've got it. And if I want to see the effect, I can go look at the 6SS website. Let's go to this one. And just go to 6SS. And the awesome bar should find it. Yeah, yeah, yeah. Open TNS. Well, here it is. 6SS. All right. And 6SS are the people that run one of those many tunnels. But the particular thing cool about them is at the bottom, they will tell you whether you've got it. Typically. Well, now it's not doing it to me. As always, I'm getting host. Enter website. Oh, okay. Dot. Okay. And there we are. At the bottom it should tell me you've got IP version 6. Non-SSL IP version 6 connection. It puts my address there. It's not as clear as it could be. But there it shows that's my IP address. You can make your IP address look a little smaller. Let me go back to my slides. But that shows I connected over version 6 instead of version 4. And that's the point. Now, let me go back to here. And show you actually I'll go back and do a couple other things when I've got my IP version 6 connection up. I can ping. You're probably used to this. If I ping yahoo.com, I see some replies from those boring old IP version 4 addresses. But if I ping google.com, I get IP version 6 by default because it prefers it. And that's Google's IP version 6 address. If you want to see what they've got, you do NS lookup in interactive mode so you can set the query. And set the query to give me the A record, which is IP version 4. And the IP version 6 record, which is four times longer, is the AAAA record. And now I can look up Google. I can get them both. There's the IP version 4 address for Google and the IP version 6 address for Google. And most people at Facebook has got my server. I'm using IP version 6 DNS server. But see, Facebook only has IP version 4 DNS records. But if you do, I think it's v6.facebook.com. I guess not. They do have an IP version 6 presence, but it's not resolving on me now. And I'm not going to struggle with it because something always has to go wrong. But anyway, that's the deal there. So let me just show you the way to do this that's fun. Hurricane Electric made a certification process. And I finished it. And all my students are going to suffer through it. So here's what you do. You first prove that you're an IP version 6 client. And then you make it to a certain level. Then you prove that you run a web server that responds to IP version 6 requests. Then you set up a DNS server. Then you set up a mail server that takes IP version 6 email. And then you set up a DNS server that takes IP version 6 DNS resolution and hands out that quad A record. And then you set up a DNS server that propagates an IP version 6 glue record to the root of your domain. Now, by the way, perhaps I won't feel so stupid. How many people know what a glue record is? Yeah. Well, I didn't. You're smarter than me. Anyway. But the glue record, you're going to learn about it if you do this certification, which I highly recommend. And it's fun. There are steps in it. So Google gave me a free cell phone. They gave me an Evo, which is awesome. But they didn't tell us they were going to give us an Evo at this conference. They said they mailed me a Droid six weeks before the conference. So I transferred my service to the Droid. Then when I got the Evo, I said, this Droid was wonderful six weeks ago. But it's junk. Now it's junk. I ought to have my Evo. So I transferred to there. And I gave the Droid away to my students that would get the highest certification. And they embraced this. This was a hit. So they had 30 days to get the highest level of IP version 6 certification. And one of them made it all the way to the end. And if you do make it all the way to the top, where you have all those things working and you are a sage, you get a T-shirt. And I told them that if they gave me the T-shirt, I would wear it to DEF CON and they mailed it to me right before the conference. So this is the awesome T-shirt you get for being a sage. And there is every possible fact. Thank you. There is every possible fact about IP version 6 crammed on the back, including one typo, which someone pointed out on Twitter. That should be your homework. Find the typo on this shirt after you get it. But anyway, I highly recommend getting these certs. And it's really fun. And let me check my time here. Right. I may not demonstrate the stages here. But you take some multiple choice tests and then you just connect. It's like a video game. You connect. It detects whether you got it. Does your web server host this file? No. Come back later. So it's really a lot of fun. And you ought to all do it. That's my opinion. Unless you already know everything about IP version 6. So I promised to say something about hacking since we are a security conference. And it is actually extremely important for the hackers to be in here fast because IP version 6 is a security nightmare. Because just to set it up, you have to turn off all security devices just to get it going. And most of your security devices are not IP version 6. It's capable. So typically you bypass the firewall and everything on the way in. So here's just a few things about it. The IP version 6 address is 64 bits for routing and 64 bits for the host. The 64 bits for the host are made up by each host. They are not distributed by DHCP typically, although they can be. Your device just makes up its own address by using its MAC address. The MAC address determines the outer six octets. The inner six octets are FFFE. Don't ask me why. But that's called the extended unique identifier. And it means that everything you send or receive is labeled with your real MAC address. And therefore, if you were to do something naughty like download copyrighted material, they would know who you are much better than they do if all they have is an IP version 4 address. So Windows Vista and Windows 7 have privacy extensions turned on by default. So it makes up a random number instead of using the recommended EUI, which also tends to break end-to-end addressing. But it does have the effect of protecting your privacy. You can turn that off if you want to. And many companies prefer to turn that off so that they can tell who's connecting and have policies to let this person do one thing and that person do another thing. Anyway, ICMP version 6. Good old ping. This is optional in IP version 4 and everyone got so tired of it they pretty much blocked it at the router. But in IP version 6 you must have it. Because it replaces ARP. There are no broadcasts in IP version 6. There are nothing but multicasts. And you find your neighbors with Neighbor Discovery Protocol over ICMP. There's a hacker's toolkit for IP version 6. THC. This rocks. And I sent to a Google conference in IP version 6 and they had an IP version 6 network. And we were connected. And so I immediately loaded an Ubuntu virtual machine on top of my Windows 7. It connected through IP version 6 through the virtual NIC, which I didn't think would work. And then I loaded the hacker's toolkit, which I had never seen until I found it right there. And I did a scan and I was able to find people here. You could never do a normal ping sweep in IP version 6. You could not sweep 2 to the 64 addresses to go through IP. It would take forever. But you can use Neighbor Discovery, which is pretty much like just sending a broadcast ping and they just tell you where they are. Because they need to for ARP. It's like the ARP cache. And there's a list of everybody at that conference. Just picked them right up with IP version 6. Anyway, I just mentioned security appliances. Typically don't do anything for your IP version 6 yet. They aren't ready. So you can run torrents over IP version 6. The torrent fiends know this. You can usually do that and the blocks don't block it. One other thing that's fun is the packet amplification attack. You can run a routing header 0. There's a header in front of each packet which can head to more headers. And if you use routing header 0, you can specifically specify the path for your packets to take. And you can tell it to follow a path that's going to make a loop. So much that RH0 has already been deprecated. Before IP version 6 is even hardly rolled out, they've already deprecated a few standards that cause problems. And the other one that's really funny is the ping pong. Every subnet in your network should be a slash 64. That's the rule to avoid going mad. You could have subnets from slash 1 to slash 127 for the Cisco guys out there. And you would use a slash 126 to make a subnet with only two addresses for a point-to-point link. But they recommend using a slash 64 for everything because you've got so many addresses you can waste them. But if you do, if I make one end of the cable end in 1 and the other end end in 2, all I have to do is send in one packet destined for 3 and coming from 4. And this packet will return an ICMP unreachable. And this packet will return an ICMP unreachable. It will flood the packet completely at line speed. One packet, that line is dead. There are devices out there that really fall for this. And if you have a long memory, you may remember TFTP had a similar problem. TFTP originally, as written in the RFC, Trivial File Transfer Protocol, said, you can send data and it's acknowledged. Every packet will always be acknowledged. If there is an error, you will send an error acknowledgement. And that will have to be acknowledged. And, you know, they didn't think of this. But TFTP works until the first error. And then it floods the wire with acknowledging each other back and forth. They patched that. Anyway, those are just a few of the problems coming up. And I guess I've run out of things to tell you. This is, everything is on my website if you want it. And we're going to have the questions in Room 106. And I think I might even have, oh, I'm right on time. I think I'm supposed to end at 1.20, I reckon. All right, so let's go to Room 106 if you've got any questions.