My name's Jay Beal, and I've been somehow speaking here for like 10 years. So thank you, conference. Please don't make it the last. Anyway, I've been having a whole lot of fun, and I hope you guys are too. DEF CON's really been growing, and it's been changing, and it's getting really cool. I'm really impressed. So anyway, I'm here to talk about client-side attacks a little bit. I did a talk yesterday that I'll reference here and there that was on a tool that I've been writing and finishing and debugging at this point now called the Midler, and the Midler is basically doing some attacks on client-side, on clients as they're surfing to web applications, as they're updating themselves, as they're doing anything over HTTP. So that talk very much came out of the ideas in this one, and they both feed into each other, and actually they use some of the same tools, use some of the same codes. So I'll kind of... I'll be talking... I'll be making references back and forth to that one, and I'm also going to talk about some of the other things that are going on at DEF CON because, wow, this has been a really great conference. We've got a whole lot of people with a whole lot of different ideas that are similar to each other's in some ways and just exploring different areas of the same space, which is actually the whole purpose of a technical conference in the first place, or at least it's one of the major purposes. I came from an academic world where that's one of the biggest things we do. So it's really cool. It's really cool that we're all kind of bringing good ideas. Anyway, after this, I'll be in some breakout room, I guess probably like across the hallway or something. So if anybody wants to come and hang out, we did that yesterday after the talk, and I thought it was really a blast. We kept going until they kicked us out of that room too, and we had some really cool people who were from some pretty impressive places, and we got into, you know, a bit of an argument. We got into a bit of a full-on agreement, and the stuff we agreed on, none of us really liked that much. So anyway... Come to the breakout room afterwards if you want, and we'll do that again. And if you don't, well, then come catch a beer with me. Okay, so I am a, what do we call it? I'm a consultant, or sometimes we call ourselves consultants. Never seriously, but, you know, we do sell our time by the hour, so what the hell? And the nice thing is, as a consultant, I get to do all kinds of stuff. Sometimes it's just sitting around talking with people and saying, okay, well, you know, how are you doing this, how are you doing this, kind of basically looking at the design of an app, and trying to figure out whether we can make it so that it doesn't have to get hacked later on. And sometimes what I do is, well, try to break that application, or try to break the networks. I just, I get to do a heck of a lot of pen testing. And pen testing's a weird little, pen testing's a weird little task. It's one of those things that, it has these multiple purposes, and one of them is sure to find out what's wrong, find out how I could break in. But another part of that that's always there is this question is, could you break in? Yeah. If you could break in, how far could you go? You know, could you break in and all you're going to do is you'll compromise some web server and deface our front-end website? Or could you break in and get all of this, you know, patient data or credit cards or what have you? You know, could you go and, could you get that kind of information? One of the things, one of the things I talked about yesterday with the Midler is that I really, I like to bring themes as often as I can. I like to bring themes, things for us to talk about. And one of my big themes lately, if I was angry about it, it would be a rant. But instead, since I'm not, it's a theme, is that we are always talking about the risks. We always think about what are the risks to a business? What are the risks to an organization? What's the risk to, well, you know, Jay's Home Network, whatever. But we think of it in terms of, you know, let's see, we've got kind of the secrecy, which is kind of confidentiality. Somebody could get data they shouldn't be able to get. And then we have, like, availability. They could shut it down. But the one we constantly always forget about, anybody know what it is? Okay. Integrity. Yeah. So this is CIA. We've got confidentiality, integrity, availability. And we always forget about, I swear, everybody, maybe in the security community, we don't do it as much, but I think we still do. We're always saying, wow, what if a bad guy got to this data? What if a bad guy got to this data? What if a bad guy could knock this down or make this inaccessible? Right? And we never think, well, what if a bad guy could change data? And worse, what if a bad guy could change data and you never noticed? And we don't know how much that goes on. We really don't. Every so often we get a peek. Every so often we find out. We say, oh, wow, TJ Maxx has been getting hacked for a heck of a lot longer than three, three days. It's, you know, what data has changed? Well, that's going to be hard. I mean, what do you do with an integrity tax? Suppose you're running your own little bank or, you know, your own little library, and you don't know who's got what book anymore, who's got how many dollars, because, well, you'll trust it. Or what if you think, what if you do trust it, but your trust is not supposed to be there? Anyway, so this is, that's part of what I'm getting into with both of these talks. And it's kind of a theme I want to keep coming back to is the question of integrity. So we'll go there. Anyway, so we're doing, I do a whole bunch of pen tests, and on pen test, the hard part is basically always getting to the internal network. The internal network's much, much harder to get to, and that's, and actually getting to the internal network from the outside has been getting harder and harder. Now, that may mean that somehow I'm getting lamer and lamer. Oh, come on, I don't get a laugh on, okay. Tough room. Yeah, Jay's lame. Rock on. So anyway. Anyway, so yeah, I mean, it's, I could be getting lamer and lamer, but I don't think that's what's happening. I think to some extent we're getting perimeters that are tighter and tighter. Does that mean the code's getting better? Well, to some extent, but I'm not sure. I think to some extent it's just that we've, you know, we finally got, we've been pushing, we've all been trying to push, you know, organizations to use decent firewalls and so on, decent perimeters for a long time, and, well, we kind of won that battle most of the way. I mean, we still have stuff, but I don't see what I used to see. Like, you know, 10 years ago I was looking at a, I'd look at a firewall and be like, okay, this thing says all the traffic's in unless it's destined for, you know, port 137, 139, 135, you know. Nowadays, I see, you know, I see default and I rule sets that say nothing's allowed in except for port 80 and only to this server, and even better, I often see firewall rule sets that say nothing's allowed in to this server except on this port and only from that partner network or only from these, from these people. We're not going to, we'll have SSH ports open or we'll have, you know, whatever, we'll have certain even IPsec ports. That will be allowed, but only from the known ISPs of our sysadmins, and things get a lot harder as an attacker. Now, things got a lot harder as an attacker over time, and really what happened was the attackers kind of found other ways to do it, and we're going to come to that, but the cool thing is that once you get to the internal network, hey, switch slides, there we go. Once you get to the internal network, things get a heck of a lot easier. They get way easier. I mean, think about, if you don't, if you haven't had this experience as a penetration tester. Or maybe as an evil hacksaw, think about it from just your own company or your own network for a little bit. Just think, okay, well, suppose I was here and I didn't have any passwords at all, but I just had one desktop here. I didn't even have any privilege on the desktop, maybe. Maybe I didn't even have, maybe it wasn't even signed into the domain or anything like that. What do I get? I get a heck of a lot of access. I mean, we're just so many companies. Once you're on the inside, you can go anywhere. Because most companies still, I know this sounds amazingly simplistic. You're all, you're not going to believe me, but I'm telling you, I go to way too many companies. And I say, well, I'm looking at the same damn architecture. Well, we've got, you know, we kind of have three legs on a firewall, right? We've got, we've got the internet, big bad internet. We've got this DMZ where we've got servers that the internet's got access. And we know that that's where things are supposed to go. And then we've got the internal network. Okay. So we're basically deploying assets on two networks. One's the DMZ, and it's got like 10 servers on it, or 500 servers on it, or 5,000, depending on your size. And then we've got the internal network, which is everything else. What do I mean by everything else? It's got all the workstations. It's got all the printers. It's got all the internal-only servers. It's got every single other asset. I swear, you know, look at multinational companies, and they still end up having a fairly flat network on the back. Is it really flat? No, no. They're doing all kinds of crazy stuff for performance. But what I'm saying is, from an access control perspective, they're not doing much. If I get one desktop, I'm really going to have way too much access. I mean, we'll look at, you know, I tell you, we'll do our, we'll do a pen test, and we'll say, okay, I've got this one desktop, and I start looking at the internal network. I start looking at what assets are there. I'm like, ooh, look. I found a SharePoint server. What's on that SharePoint server? I go look at the SharePoint server. I'm like, okay, I've got, maybe I'm able to get, maybe I'm able to get one user's username and password, and that user's not an IT. And I'm like, hey, look, on the SharePoint server, which I can log into as one of the accounting users, I've got, well, the passwords for every single device here, demand, admin credentials, and everything. True story. But I just, there's a tremendous, and that's kind of the easy case. But the hard, but, you know, if you do want to make it hard, once I get to inside, I start finding lots and lots of servers. That aren't in any way filtered, and aren't in any way patched, and again, lots of, lots of good access to information. Recent internal pen test, I'm spending a whole lot of time on one slide, aren't I? But recent internal pen test, we were, you know, we're on site, we're at the client, and we do our scanning. And this network is huge, and we're having trouble actually just keeping track of all the targets. But we find 800 databases. And out of 800 databases, 40 of them had their username, I mean, had their passwords set to, let's see, they were all Microsoft. Microsoft. SQL server databases. Can anybody guess? S-A, blank, that's about all I need. Yeah, 40 of them. So you say, well, 48 out of 800, that's not too bad. But 40 databases, I only needed one half the time, right? At that point, well, let's assume that this was a really, really big credit card company. It wasn't, but let's assume it was. Well, I'm going to have, trust me, I'm going to have enough access, I'm going to have enough data on that that I'm going to be, well, eating free for a long time if I'm a criminal. Luckily, I'm not. I couldn't pull off this whole criminal thing. I've just got this fear of jail and hurting anybody and all kinds of stuff like that. Whoa. Good thing that wasn't a beer bottle. So anyway, my deal is that once I get inside, once I get onto the internal network, whether it's by walking on, by finding some illicit wireless access point, or by hacking a desktop, I have a tremendous amount of access. Those first two are pretty easy if you're well located and they've been bad with their wireless. But the thing that happens far, far, far, far more often is the desktops get hacked. And that's part of what I'm going to go into. Okay. Somehow I'm having trouble flipping slides. Well, maybe it's a coordination from way too many parties here last night. DEF CON's kind of good for that. If you're watching this on video and you're not at the conference, wow, you missed a great night. So anyway, so like I said, we're finding it a whole lot harder. We're finding it much, much harder to hack into the network from the outside, to just say, okay, well, I'm going to scan for web servers, I'm going to find web servers that are vulnerable, and I'm going to use exploits against them. And even if I've got access to commercial feeds of exploits, hacking servers from the outside is getting really, really difficult. And so over time, what we've started doing, what we've started doing, and what a lot of consulting companies I think are doing, is basically saying, wait a second, why don't we do what the attackers switched to doing like, I don't know, five years ago? Why don't we actually go after the desktops themselves instead of the servers? Why don't we send emails or IMs or whatever? Why don't we try to get the users inside to click on links or open attachments or whatever, and those are client-side exploits? And it's not like I invented client-side exploits. They've been out there in core impact for a long time, and Metasploit got them, and Metasploit made them a whole lot more accessible to all of us. And gee, wow, that's been... It's just amazingly powerful what you can do with this. I mean, if you want to... If I need to convince somebody to patch their browser, if I need to convince a family member to patch their browser now, I don't have any trouble anymore. And I'm like, hold on, just give me a second. Clickety, clickety, clickety, clickety. Okay, why don't you surf to this website? And they'll go, and they'll surf to CNN.com, and boom. They're like, hey, you've got my screen on your screen. What's going on? And you're like, it's a client-side exploit, Dad. So anyway, yeah, I kind of experimented. I experimented. I experimented with a client-side family. Not meanly. It's just that I can't get them to patch, or I can't get them to put their stuff behind an ad box or whatever. My family is way too ownable, and I don't like that. So I try to help them out, and sometimes I have to convince them. Always legally, absolutely. So anyway, in doing penetration tests, we've started saying, okay, well, why don't we actually start hacking client-side software? Because that's where the attackers went a long, long time ago. It's very, very easy. Here's an example. I swear, I'm not trying to sell you all pen tests. Honestly, you guys are the people who do them for the most part. So to some extent, this is just a, I haven't tried to be light on mentioning that I do this for work, because, well, I kind of figure that, you know, you all do too, and we're more having a conversation among our own community. Anyway, so we're on a recent pen test, and we're having a whole lot of trouble breaking in, or this is, actually, this isn't that recent a pen test. This is a pen test a while back. We're having trouble breaking in, and this is where we kind of come across the idea of client-side exploitation. We say to the client, hey, listen, we're breaking in, you have an amazingly small perimeter. Can we, you know, realizing that penetration tests are a subset of what a real attacker gets to do, because a real attacker gets a whole lot more time, because they can spend as long as they want, but also a real attacker doesn't have to stop with only these methods and these ways. A real attacker can go social engineering if they want. They can go client-side if they want. They can go physical if they want, and they can buy the plane ticket or what have you. Okay, so we said, you know, hey, can we make this a little more realistic and throw in this client-side exploitation? We know it's safe. We've tested all this stuff. We'd like to give it a try. And the client said, well, I don't know if I can get even my boss to agree to, you know, to get exploited or much less the rest of IT, but I'll let you try to hack me. And I said, that's great. He's like, okay, well, let me go patch. And I'm like, no, no, no, no, like, let's pretend, you know, let's make this, you know, let's make this kind of realistic. Let's make it as if, you know, you came in this morning and you didn't think that I was coming after you. And he said, great. And so we fired off. We took every single client-side exploit in core impact and every single client-side exploit in metasploit and, you know, and gave it to him. You know, we fired them off and so on. We set them up and let him, gave him attachments and gave him links and all this. And he clicked on every single one. And I'm sitting there thinking, okay, we're not getting in. Gosh, this is the first time in years we haven't successfully hacked a client. I'm going to have to go and, you know, do the seppuku thing. And I don't even know where I put my samurai sword. So this is going to suck. But anyway, the very, very, very last, very, very last client, the very last client-side exploit worked. It was wonderful. See, the thing was, this guy had IE7. Back when IE7 was still really, really new. And so first. First, it's already harder to hack than IE6. And then second, well, people hadn't been writing that many exploits for it, at least not ones they were publicly releasing. And so we didn't have that much for his browser. And also his, he had like two different forms of antivirus and they were going and catching a whole bunch of these suckers. So we're like, ah, darn it, that would have got in. But the antivirus got it. Okay, darn, that one would have got. Anyway, we finally get to one. It's Acrobat Reader. And we send him, you know, we send him a PDF and he opens the PDF. And boom, we've got a shell on his system. And then we have. He has the ANC on his system. And then we can, then we start exploring the client's network. And then we own from top to bottom. And, well, the rest is history. The really crazy thing is why didn't he actually, you know, why didn't, why didn't he, why did he get, why did he get hacked? Acrobat Reader actually updates itself. Well, it's kind of crazy. But every time Acrobat Reader popped up and said, hi, I need to, I need to update myself. I'm like really old. He said, I don't have time for this. I was trying to open that PDF. How many of us have had that experience? Okay, raise your hand if, like, you've gotten something that's popped up and said you need to update. And you're thinking, I'm a security person. I really should. It could be a security issue. But honestly, I need to open this damn document. Right? I do this. I do this. I'm talking about this. And I do this. Okay, we're all, I know. And now you're like, wow, Jay's really lame. But really, what it is is that Jay's really human the same way all of you are. We are in very many ways the most paranoid IT users out there. We're absolutely the most paranoid. We're some of the most paranoid and knowledgeable IT staff at all because we're either in security or we're. We're here. So it means we're in security and we're thinking. It means we're in IT and we're thinking about it. Okay, so, and we still sometimes say, no, don't update right now. Okay, which means that we have that window of vulnerability that we go and scream at everybody else about. Okay, so this guy was a security guy. He was really, really paranoid. But honestly, when he needs to open a PDF, he doesn't have time to wait for it to update. He needs his desktop to be updated already. Whatever. Okay, we can get into why that is. But the thing was, one of the critical things here was, you know, we tried all these exploits and only one worked. And that's kind of good news, but we only needed one, right? We only needed one client-set exploit against one desktop that we attacked. We only attacked one desktop, but we could have attacked them all. And trust me, we would have found a lot more than one, right? But we only need one desktop and one client-set exploit against that desktop. And we're into the company. We're inside the internal network. And now, well, things get a whole lot easier. Okay, now, what does that mean? What does that mean? Well, have I gone... So, anyway, so this is my point. One of my points, I have a lot of these themes that I'm kind of starting to formulate. One of the themes that I formulated a long time ago and that a lot of us have been talking to this conference about is, it is so much easier being an attacker than a defender. Okay, I've been doing, you know, I've been making, trying to make tools for defense for a long time. And gosh, you know, they can really, really work. But even getting people to use them is kind of hard. Getting people to use defensive tools to do proactive. Because, honestly, it's like, I don't have time for that right now. I'll harden that box later. I'll, you know, I'll take that. I'm going to, I want to change the firewall rules and make it stronger. But I'll do that later. I wanted to install, you know, I want to update my Acrobat reader. But I'll do that later. And I'm not blaming us for that. We're human, and that's humans, and that's what happens. It's really hard for us to do proactive security. It's a whole lot easier for us to, well, set something up, maybe code something up, and set it up, and say, okay, you handle this for me because I don't have time, you know, what have you. Anyway, so, but let me tell you. Talk about this. Let me switch to the other side of this outside of the point of view of the victim for a second and outside of the point of view of the consultant pen tester and talk about the professional hackers, the criminal hackers, as it were. And it's strange to say criminal hackers because what if you're in a country where it's not a crime? You know, what if you're in a country where it's considered a day job? You know, there are, we're probably all used to that. I'm not saying that. You're not all thinking, wow, that would be really strange. I've never heard of that, right? We've all heard of lots and lots of people who are up to no good. Anyway, so the deal to me is. Really, this client-side stuff is what the attackers started doing years ago, like whatever it is. I don't know, roughly five years ago, give or take five years. So, anyway, our attackers started doing this about five years ago, and it's been wildly successful. Hacking desktops has been amazingly successful for them, and it's been so successful that their problem hasn't been in creating some of the stuff that we create here and present at DEF CON and Black Hat, okay? Their problem hasn't been saying, okay, well, how do I come up with something I can get past Vista's new, heap overflow protection? That's not their problem. Their problem has been, how do I manage all these systems I own? I mean, God, I own 400,000 systems. I don't even know everything I own. How do I manage it? And so they brought us the botnet, and they brought us better and better botnets, right? I mean, it's for a little while. We had botnets, and, you know, what was the earliest way that people were controlling botnets? It was our own little friend. Exactly. It was our own little friend, IRC. Thanks. For a little while, I said, you know what? This seems like a simple enough thing. Why don't I just start blocking out? Bound IRC from my network. And you might be like, well, wait. We got this one guy who still uses IRC. It's like, well, fine. Cool. Let's block IRC out of the network, and then we'll let, you know, his IP address do IRC. Or we'll have him go through a special proxy. So he's allowed. Maybe he can even authenticate to the proxy. So if any IRC is leaving, we know that it's, you know, we know that it's bad unless it came from there. So I used to say, well, let's block IRC. Let's log IRC. Let's just log no before you think I'm logging all your conversations on our evil, evil hacker channels or not so evil hacker channels. No, it's not like that. Why don't we just log all the flow data and find out where all the IRC is going? And, you know, that was what I said. And you could still do that. You'll still catch some of the stuff. But honestly, the attackers switched to, they said, you know, screw this. They made their own command and control that was centralized. Then they went beyond that. They made their own command and control that was centralized and encrypted. Then they went beyond that and said, let's make our own command and control that's encrypted and peer-to-peer. And, gosh, wow, they're making it really, really, really hard. We talk about Flash. We talk about Flash. We talk about FluxDNS. We talk about all kinds of stuff. And we say, wow. But my point here is not to even go into that, but to say, realize the attackers have been so successful compromising desktops and compromising all these workstations that they had to create the botnet. And they don't even understand what they have. Workstation control is amazingly powerful. It's amazingly powerful. And most attackers, most of our attackers who have these botnets, they don't even scratch the surface of what they could do with them. Okay. If you had a targeted attack. I love that. I love when people talk. I love when people talk about, you know, people talk about spear phishing, going after individual things. If we're doing a targeted attack, this is one of the biggest things that's crazy. Unless you're in here doing the criminal attacks and you, well, heck, you probably still have to have a pretty decent network of people you're talking to. We don't really entirely know what the, you know, uber-skilled criminal attackers are actually up to. Yes, some of us get to watch pieces. Some of us are able to find out for this given set. We say, we caught these guys, but we didn't catch all these other guys because they're not hacking. They're not just hacking some central. They're not hacking just the government. They're not hacking just the government. They're not hacking just a couple banks. They're hacking everybody, right? Anyway, I mean, remember England did this whole thing where they were, I don't, was it MI5 or MI4 that said, assume that the Chinese own everything? And, wow, that was a little scary. But if you think about this, if we were to start looking at it, if you just looked at workstations, most of the time we go to companies and they don't even know all the machines they've got inside that are compromised. They suspect some of them might be. They don't know. Some of them don't even believe that any of them are compromised. And you say, okay. Well, throw up a sniffer and start watching your outbound traffic and look for something that's abnormal. Okay? At some point, that won't work so well. The botnets will all switch to doing, to using port 80 for their command and control. And they'll not just use port 80, but they'll use true HTTP because, well, we all, we made that, you know, we could do that 10 years ago. But, you know, right now, just start watching. And most companies are really surprised. Like, oh, my God, we have 24 compromised systems and that's out of 500. And we say, yeah, that's how it goes. It's not all just my, you know, my. My parents' PC. My parents haven't been, well, I was about to say my parents' PC hasn't been owned, but how would I know? Right? How would I know if mine had? Yeah, we catch it a lot of time, but we don't always catch it. If somebody were to do something, and this is one of the big things when we look at antivirus, we look at IPS, we look at IDS and all that. We say, wow, if we're signature-based, the tough part is enough people have to have been attacked by this that the vendors or that the open source free people or that whoever, that somebody's been able to create a signature. But don't get me off on a rant about signatures versus. Behavioral and how you need both and not just one and stuff like that, right? It's actually, I like the whole idea of having two antivirus solutions at the same time on every desktop because it's like, you know. Anyway, so beyond that, think about what you get out of these botnets. Think about what you get out of client-side exploitation, out of compromising clients and not doing it as part of a botnet. You know, like it's just one day you decide that you've got a grudge against your former employer. You've decided to be criminal. I don't encourage this in any way. But, you know, you decide you're going to go after your former. And you send some emails or what have you, or you send you in some way, get your former people, your former employers, you know, on your former employees network to, you know, get some client-side exploits to go to bad websites or to click on or to click on bad attachments or what have you. What happens? Well, you control one workstation or more. If you control one workstation inside of many, many companies, what can you do? What if it's the right workstation? What if it's the workstation that's currently logged in with all kinds of access? Could you print yourself checks? I've got a, you know, I've got friends who've done. They've done pen tests and, you know, they found a check printer. They found a machine attached to the check printer and printed themselves a million-dollar check and said, look, workstation security is important. It's not just the servers. I want to bring one of those checks to a conference one day. But, honestly, I'm sure that the client wouldn't let you. But, anyway, so as pen testers, we end up using this. We end up using this and we find internal access amazingly powerful. Why is it amazingly powerful? I love Windows. I love Windows. Not that. Not that the Mac isn't, if it ever gets targeted in greater numbers, going to be massively more vulnerable because they haven't really had to deal with the massively hostile environment there is for Microsoft software. But, you know, if I, one of the things I like on a pen test is that once I own one workstation, I go and look for cache credentials. I find the cache credentials. I wait long enough. I find cache credentials for other users. I find cache credentials for administrators. And sooner or later, I have domain admin on it. Who in here has done pen testing for work? Like, okay. Okay. So, about a tenth of the room. You all know, just raise your hand again if you've enjoyed the amazing power of cache credentials. Okay. More hands just went up beyond the ones that did it for work. So, I don't know what that means. But, yeah, no. Cache credentials. So, all of a sudden, I own the entire darn domain. And, wow, Microsoft hosts are awesome. I mean, AD is a beautiful thing. I am constantly, constantly embarrassed. I'm embarrassed for Unix that we don't have some of the power that AD brings because we could do it. It's not like LDAP didn't exist already. It's not like we don't have, like, 3D. It's far, far easier config files to modify than, you know, than the registry, right? You know, but we haven't had need to. And the reason we haven't had need to is we haven't been anywhere near as successful with open source desktops as Microsoft has been. We've been great with open source servers. Go. But, anyway. So, I'm getting off on a tangent, which I never do. Ever, ever, ever. So, anyway. So, you know, client-side exploitation. I'm going to get into it. I'm going to get more and more technical as we go. One of the big questions we get is, listen, isn't this just social engineering? If it's social engineering, should it really belong? Or, if it's social engineering, can't I just train my users? And I say, yeah, train your users. Do your security awareness training. Do whatever it is. You know, do what I do with my parents and say, Dad, if you get an email. God, my father's going to kill me if he ever sees this talk. Hi, Dad. So, I'm sorry. And so, anyway. You know, my dad will every so often, you know, like, show me, hey, I got this thing that says that my Google AdWords account is, my Google AdWords account is, like, all, it's the payment processing isn't working. It's not working. It's just to log in. And it says, you know, whatever, AdWords.Google.com. So, I'm going to click on it. But you told me to call you before I clicked on any link that I got an email. I said, yeah. Okay, let's right-click on that link. You see how that end part says, are you? That's not the real one. And he's like, oh. But, honestly, I started thinking, God, how hard is it? How hard is it for me to just tell everybody in the company, everybody in the company, much less my own family, how hard is it to teach every single person to right-click on the link? And if I could, how much harder, what would come out next? You know, would I just, okay, well, don't load images in your emails because that might be C-server text. Security awareness is amazingly important at companies. I totally think you should all keep doing it. We should all keep teaching. But understand that some people are going to get fooled. I've watched security people get fooled. A couple years ago, I was working with this, you know, well, I'll just say somebody in the security field. And I'm talking to him. And he said, yeah, this morning I got this thing. And it was a contest. And it said I was going to win an iPod. And it was, like, really, really cool. And so I went and I clicked on it. I started filling out the form. And I clicked. Next. And I went to the second page of the form. And then I'm like, wait, why does it want my social security number and my birth date? And he stopped. And he said, sheesh, I'm being phished. And it was just, it was 7 in the morning or 6 in the morning or whatever his version of 6 in the morning is. Let's call it kind of 3 in the morning for you morning people. Okay? So, you know, and he just kind of, he wasn't thinking. And he was a security guy. And he was an IT guy. He understood. He'd heard of the attack before. Trust me, my grandmother's online. She has not heard of this stuff before. Okay? She sends me e-mails in all caps. I told her. Grandma, stop shouting. You're hurting my ears. And she's like shouting. And it's, well, okay. So, by the way, there are two grandmothers that come to these conferences sometimes or know a whole lot. Raven Alder's grandmother and Dan Comincy's grandmother, they're like the most badass grannies I've ever seen. They both like, you're just like, shit. I mean, Raven's grandmother like runs Linux, goes to Lug and Lugs and gives talks. Because she called up Raven one time and asked her a question and asked Raven a question and said, how do I do this? And Raven said, I don't know. I don't run that. I don't run Windows. I run Linux. And Grandma said, okay, that's fine. Click. And she calls up later on and says, okay, I can't get PPP to work. And Raven's like, what? You just go to, I don't, I told you, I'm doing Linux. And Grandma says, yeah, yeah, I've been on Linux for a while. I did this. I've edited my Etsy hosts. I've edited this. Raven's like, oh, my God. Anyway. Yet another tangent, but let's just say it's kind of fun, that we're having fun in here. So, anyway, social engineering. My point to that tangent, if there could have been one, and I think there was, my point is that it's really, really hard to train all the users. Right? Right? Right? Right? Corporate users who actually have IT departments. Tons of people don't. And I'm going to come to that later on. But social engineering, well, you know what? People are going to get social engineered. And part of that's because social engineering is an attack on the human brainstem. It's an attack on how we all work. We all want to be helpful or we do get scared or whatever. There are very, you talk to people who do this who either do social engineering for a living or who do psychological profiling for a living. And they'll tell you that this stuff does work and there's a reason it works. And I will tell you that, honestly, every single one of us knows that if you get enough people attacked by something, you can get enough people. You ask, hey, can I have your password in exchange for a candy bar? You will find someone who says yes. If you can do that electronically, if you can do that, if you can make that automated, oh, God, you're going to win. If I go, if I look at a 50,000 guy in the front row who just said I'd do it, okay, cool. I'll talk to you later. I've got some candy bars in my bag. No. So, but I'll need you to fill out a little form authorizing me and all that stuff. So, if one, if one one hundredth of one percent or, you know, if one in 10,000 people got tricked by social engineering attack, one in 10,000, I can send 50 million emails. How many did I get? I can't even do the math right now. It's Sunday at DEF CON. But suppose that I have a 50,000 person company and one in 10,000 people clicks the link. Trust me, it's a lot more than one in 10,000 people. We've done this. We've simulated this. A whole lot more than one in 10,000 people. One in 10,000 people in a 50,000 person company gets what? I just got five. Yes, I know. My probability is kind of bad because we got, like, laws of large numbers and stuff, and those numbers weren't that large. But on average, kind of, you know, with, standard deviations and all that, I got five desktops. I only need one. Okay? So it's not enough to just say we're going to get social and, you know, this is just social engineering and the users suck. Okay? And I also think that we need to remember users, we have to protect the users. As security people, we have to protect the users from themselves and from the attackers. And really, it's not so much from themselves. Okay? It really is from the attackers. We can't blame the user. There's a lot of reasons I think we can't blame the user. One is, you know, unless you're going to put up, like, a driver's license for the Internet, we're not actually guaranteeing that everybody who buys a computer and gets on the Internet is actually in any way safe or prepared or trained. Now, I know a good number of people in this room at some point or another have said, there really should be a driver's license for the Internet. I'm writing a test. Right? But we don't get to do that. They let scum like us onto the Internet. Okay? None of us were supposed to be allowed on originally. Remember? It was, like, military and, you know, researchers and stuff. You know, this was way before you could, like, pay ten bucks to get a dial-up account. Now, God, what can you get for? Yeah. So it's. They didn't used to let scum like us on the Internet. Now they let us on, and they let us on the Internet from everywhere. They're, like, free, you know, just go to a coffeehouse. You never even have to have heard of an ISP. It's a beautiful, beautiful thing, except it's an ugly thing, too. So client-side attack. Why should you give a rat's ass about other people getting exploited by client-side attack? Maybe it's not your job. And what I say is, you know, think about when you were applying for a mortgage. Anybody in this room ever applied for a mortgage? Okay. We have 20 people at DEF CON, or at least in this talk, have applied for a mortgage. Nobody else. Everyone else is either independently. Wealthy or renting. Okay. So if you apply for a mortgage, you know, you fill out all these forms, and you give them a tremendous amount of information, much of which you never would like to be public. And it sits in your mortgage broker's computer. Or it sits in the bank's computer. But let's assume you used a mortgage broker, because lots of us do. So you used a mortgage broker. It sits in his computer. How long do you think it sits on his computer? Trust me. He's either in business for himself, or he's with a company of five or 10 or 20 people. You know, it's not big. He doesn't have an IT guy. Not one. He doesn't have even one full-time IT guy. How long does that sit on his computer? Say you applied for that mortgage 10 years ago. Do you think it's still there? Do you think your information is still there? I'm telling you it is. I'm telling you it is. We look at big companies and find that they haven't ever gotten rid of any of their old data. They don't need it anymore. They processed those credit cards, you know, 20 years ago. But, well, maybe not 20 years ago, but, you know, 10 years ago, and they still have the records. Anyway, so, but think about your mortgage broker's computer. Here's another one. My dentist. You know, I submitted forms to my dentist, and they all... They all get read into a computer, and they're all there. And which computer is it? Well, I'm not going to tell you guys where I get my teeth cleaned, but it's on the receptionist's workstation in the main lobby. Oh, and, you know, she's not always there. So you want to bring a hostile USB key, a hostile disk. You want to walk off the computer itself. You want to get her to surf to some site that, you know, promises that there are free games or whatever. You know, celebrity, you know, celebrity stories that haven't hit the... Whatever. You're going to get her, and then you're going to get me. And I'm not going to be able to say, well, the dentist should have hired a better, you know, IT guy that comes by once a quarter to make sure things are still working. Right? So I think that we can't blame the users. What we have to do instead of blaming the users is try to protect the users. So let's see. Where am I? Here we go. So I've been kind of... It looks like I'm jumping around the slides just a little bit, and I apologize for that. But basically, as an attacker, I just have to find one vulnerable workstation. All I need is one. Okay. Here's the other reason clients have exploitation at work. It works really well. We were protecting 150 servers. How hard was that? Could you absolutely, positively guarantee none of them got hacked? Okay. You couldn't, but, you know, you could better your odds. What if you've got to protect 10,000 or 50,000 or, you know, several hundred thousand workstations? God, that gets really, really, really hard. Patching has always been a race condition. It's always been reactive. It's really hard to beat it. One of the questions when I first floated this idea, when I first floated this idea, I take most of my ideas to a bunch of other people who talk at conferences or who don't talk at conferences, but who I respect and really, you know, I say, listen, is this new enough? Is this interesting? Is this something, you know, is this going to work technically? Am I totally full of crap? And they'll say, you know, and so I did this. And when I was doing this kind of early vetting, somebody said, well, this is just a patch management problem, Jay. It's not really worthy of talking about. And I kind of thought about it. I'm like, wow, maybe he's right. And I said, no, wait. It's not a patch management problem. Why? First, not every organization has a patch management tool in place. Not every single one does. I mean, we'll get into, we'll get into that, but assume that they do. You know, assume you say, well, Jay, at least your parents have, you know, Windows Update and stuff, right? Well, go beyond that. Patch management, you know, look at a given organization and say, there are a few things that aren't getting, there are a few things that aren't even getting patched by the patch management system. What kinds of stuff? Old hosts that aren't part of the domain, aren't part of the inventory. What kind of old hosts? Dedicated scanning machines. That thing runs the scanner. That thing just runs the multifunction devices or whatever. That's not getting patched. That's not part of the domain. That system can't be part of the domain because, because of a given federal law or what have you. Hosts that, you know, computers that get brought in by, get brought into the office from partner companies, they're not necessarily getting patched. You say, what the hell do I care about that? Listen, I've had, we've had companies, we have some companies we go to and they won't let us on their network. Say, what do you mean we can't be on your network? Can't put, they say, you can't put your hosts on the network. Use ours. You can't use yours. Say, what? Why? And they say, well, we are, let's see, a manufacturing company of some kind and the last three times that we've gotten hacked, every single time, it's been because somebody brought in, some, some contractor brought in a laptop that's not one of ours. It wasn't well patched. It had gotten owned and, and then the rest of our network, you know, and then other parts of our network got owned and it shut down manufacturing and it cost so many millions of dollars. Like, okay, we'll bring our own, you know, wireless cards, our own cell cards. So anyway, there's, you know, all I got to do is compromise a host that's not only one of yours inside your network. I just got to compromise a host that's in your network and then I've got that foothold I want. Beyond that, legacy systems of any kind and sometimes I have to throw in Unix hosts that don't auto patch. So anyway, patch management tools also, and this is where my, this is where my parents still get nailed. Patch management tools don't get every third party product. Okay, well I just talked about Acrobat Reader and that's something we're all used to. We're all used to Acrobat. But what about all the other software that's on my laptop? One of the ways I found, one of the ways I thought about the man in the middle tool that I released, the Midler, is that, you know, I've got all this software on my laptop and it's all going out and updating itself. And I started looking at it and saying, wow, it's doing a clear text. And wow, I'm not even always agreeing to the updates. And wow, some of it's not updating itself. Am I remembering to update it? So I'll talk about this. But anyway, even big, even lots of big companies that are pretty good at this, they don't even patch all that consistently or frequently enough anyway. Most companies seem to patch like every three months. And that's kind of good. There are lots of companies that do it every six or 12 or some systems just never get patched. And they only tend to be comprehensive for Microsoft software. Okay? And then, even if they do that, browser plugins don't really get patched. They don't get patched quite so well either. How many of us are used to, we started using more and more browser plugins. Our users have started using them. And the browser plugins, well, those suckers don't get updated by Microsoft for you. Or they don't get updated, they don't necessarily get updated for you. Okay? And I've told a whole bunch of browser plugins not to update because it took too long. And I said, I'll just, I'm not using that right now. I'll update it later. But I don't always know when something says I want to update that it wants to update because there's a security vulnerability in the plugin. So we're not really solving this via patching. Maybe we could solve it via vulnerability assessments. Right? A lot of the vulnerability assessment software, software now has, you know, can actually log into the workstations and find out what versions of software. But if they're not, they're doing a pretty bad job. And they still miss things. And we still have the false positive problem. And it's still very, very, very reactive. Okay? It's hard for us to do this. It's hard for us to do vulnerability assessments and catch all the client-side software issues. Okay. The thing is, vulnerability assessment software, for better or for worse, is really targeted most at server applications. Okay? It really is. It's targeted. And anybody, even on workstations, you know, it's targeted at actually going and talking to a service. And the cool thing is, you go and talk to a service and often it replies to the version number. Or you talk to a service and you're able to fingerprint what version of that given service it is. It's really nice when you're talking to server programs. Client programs aren't that helpful. They don't just give you their version number willy-nilly. Or wait, they do. This is kind of one of the places where this idea got good, which was a lot of the client-side software is identifying itself all the time. Okay? My browser, if you want to, I would love to, I'm not sniffing this network. I'm not even on the DEF CON, but I'd love to just talk to the wall of sheep guys and say, hey guys, you know, it's nice that you're logging all these usernames and passwords going by, but you're seeing a lot of clear text information going by. Why don't you start logging the user agent strings? Why don't you tell me how many people at DEF CON right now are surfing with vulnerable clients? Okay? How many people could I own? And I could give them some information out of a database very, very easily. They could tell me. We could find that in real time. We'd be like, okay, this person can be owned, this person can be owned, this person can be owned, this person can be owned. And just so I can kind of go off to a tangent to my previous, to my other talk, you know, you're surfing with a browser, you're surfing with a browser and that browser is vulnerable. You know what? I can actually figure out who you are anyway because you went to Gmail maybe or you went to many, many sites and at those many, many sites you've got a user ID and your user ID's not being encrypted because most of the websites that we're all using for fun, whether it's Gmail or LinkedIn or Facebook or Twitter, they're all kind of, well, the passwords might get encrypted, the usernames keep going, you know, once the passwords have gone, actually Twitter's been going a lot of, a lot of that's going up, no, it's not encrypted but we're seeing, we're seeing the usernames go by and we say, okay, I know that that machine is J. Beale and J. Beale is surfing with a vulnerable version of Firefox. Rock on, I'm going to own J. So the clients are identifying themselves, not just the web browsers, mail clients too. This is kind of interesting, I was on this, I was on this mailing list, on this private security mailing list and I sent an email that I thought was really, really insightful and I was waiting for the reply to come back and say, J., that's a really cool idea and somebody wrote me back and said, J., that's a cool idea but your mail client's like ages old and there's an active exploit at it, you could be receiving, instead of this friendly email from me, I could be owning you right now and I said, oh shit and I realized that I don't know if my mail client's updated or not, it's third party software, third party software, it ends up being a problem. So you say, well, what if you can't sniff all the user agent strings? The really, really cool thing is that big organizations tend to use transparent proxies for all of their outbound web traffic. Honestly, most organizations do because it saves you a lot of money on bandwidth. Well, what if I start looking at that? Nice thing, Squid, most of the other proxies out there will log user agent strings and take those user agent strings, start comparing them against OSVDB or another database of vulnerable stuff, compare it to the XML data that Microsoft kicks out and you can say, wait, that's a vulnerable browser and you can do it in real time, you can do it in real time, you can kind of watch it. So you don't have to sniff, you can be reading logs but if you can sniff, you're going to see a whole lot and what's really, really cool is, I've been talking about, you know, I've been saying, you can sniff mail clients, you can sniff browsers but I'm missing something big, I'm missing another bit of network client-side software that has lots and lots of vulnerabilities and can anybody tell me what it is? What's that? I heard Java, that was kind of cool. Anybody else? Okay, browser plug-ins. When I vetted this idea with Dan, with Dan Kaminsky, he said, you know, browsers is great but what about browser plug-ins and I said, what about them? And he said, they're vulnerable and they have just as much power as the browser does, why not exploit those? And I said, yeah, but how am I actually going to find out which ones are in use? Okay, well, it turns out, it's really, really cool. Well, let me just kind of show you real quick. This is just a snapshot of all the vulnerabilities we're finding in Acrobat Reader, snapshot of all the vulnerabilities we're finding in Flash, just doing a quick search on these and those are not all the vulnerabilities, those are the vulnerabilities that allowed takeover. So I skipped all the DOS vulnerabilities, I skipped anything that was just maybe even simple information disclosure. And so I said, Dan, how would you detect plug-ins? And he said, well, Arsenic, about a year, this was when we had this conversation more than a year ago, and he said, well, Arsenic released this tool at Torcon Seattle and the tool was just this thing called Mr. T, Master Reconnaissance Tool, and it'll actually tell you, hey, you can, in essence, if you can get someone to visit this site, it'll tell you all the versions of their plug-ins. I highly recommend you go here and see this, because it's amazingly powerful. I've given you just a short little snippet, it gives you pages, and you can see that this is the version of Shockwave Flash, this is the version of plug-ins you don't even know you had. I still had a Juiced plug-in in my browser, I didn't realize I still had it, I hadn't thought about updating it, I hadn't gone to the Juiced site. Somebody could lure me, get something that that plug-in handles, and congratulations, they exploit me. So, let's take this beyond this. We want to do client-side vulnerability assessment, let's go into non-network software. Okay, there's Larry Pesci on the Paul.com podcast. We have a whole bunch of good podcasts, I love a whole bunch of them. One of the ones I like the most is Paul.com, and Larry Pesci highlighted this thing that this guy Christian Martorella did, and basically what it did was, it's something called Metagoofill, and you pointed their website, it crawls the website, I mean, not crawls the website, it goes and searches for that website in Google and it looks for docs, it looks for things with doc attachment and XLS attachment and PDF attachment and so on, and it pulls them all down, and it says here you go, and it does more than just pulls them all down, it can actually give you the metadata from those docs, and the metadata can be really really interesting. Awesome, five. Okay, so the metadata can be really interesting, what kind of stuff does it tell you? It tells you the creator and the creation time and the version of the client. Okay, so now I can say I just saw a Word doc go by when I was sniffing or I just found a Word doc that was posted, I just had a Word doc that was posted up to the company's file server, if I look at that file server and find Word docs that were just created very, very recently, I could go and pull the metadata out of that, find out there was a vulnerable version of Word used, I see the creator, I see the IP address, and I can start saying okay, that is a system with a vulnerable version of Word, and I can the hidden lessons of this talk is that many, many things, whether they're network clients or non-network clients, software really loves to identify itself, it loves to identify itself, it loves to say hey, I'm this, and I don't know entirely why, but it's really cool, I love it, it's a wonderful security tool, okay, so I have now a way of actually finding out if I can watch the wire, if I can sniff the wire, I have a way of finding out also who's got vulnerable versions of all this other non-network client software, so now you say well Jay, okay great, you know what version of Firefox everybody's running, but how do you know if they're running a vulnerable version of Firefox, and this is where OSVDB comes in, OSVDB was created by Jake Coons and Forrest Ray, and now it's got a bunch of even cooler people working on it with them, Forrest is not doing it anymore, but it was an awesome idea, and he deserves credit, but OSVDB is an open source vulnerability database, one of the really, really cool things about it is that beyond just tracking vulnerabilities, and they put a whole bunch of time into So the cool thing is now, if you were to pull that down, this is what we're doing, if you were to pull that down and run a database on the same system that is sniffing, then you could say okay, I just saw this Firefox version string go by, I just saw this iTunes version string go by, and look it up, that version of iTunes is vulnerable to this, that version of Firefox is vulnerable to this, now I go a little bit further, and I say I can do clients.ips, I can say okay, not only can I make you a list of all the vulnerable clients, but I can actually, if I create my own proxy, did it, and I've talked to a bunch of organizations that also have done that as well, if you create your own proxy, you can say hey, anybody with a version string that chose themselves to be running software that's vulnerable to a publicly known exploit, we're just going to redirect them to a patch page, we're not going to let them surf outside the company, we're going to redirect them to a patch page in the company, and we're going to be automatically mirroring patches, but that way we can actually say you know what, screw it, I don't want this system to get compromised, Jay is a lazy bastard, and he's not necessarily patching his browser fast enough, so let's tell him he's got a vulnerable browser, and if we want to, let's do a little bit more beyond telling him he's a vulnerable browser, let's go and say you're not allowed out until you fix this, because we're not going to deal with your desktop getting hacked, and that's kind of cool, that's a configurable feature, that's where we get some simple, simple client-side IPS, and he said, Jay, how do you do the browser plugins, the way you do the browser plugins is basically once per day, right now it's hard-coded, but we'll make it into a user-configurable feature, once per day you say, I'm going to redirect you, I'm going to insert an iframe into your next clear-text session, and that iframe is going to send you to our own little host of Mr. T-Site, and our own little host of Mr. T-Site will show us what version you have, we'll parse all of that, and now we know what plugins you have, we know whether the plugins are vulnerable, so this is kind of the client-side IPS, and you can do this for other things, but there are two more things I want to add in, these are a couple new ideas I had, one is, suppose that, you know, I'm talking about sniffing the wire, man in the middling, I'm talking about man in the middling, you know, stuff I have, what if I were a bad guy, or what if I was a good guy, and I just wanted to help other people, what if you actually start owning other domains, what if you own the places people are going, if you want to stop people from going to a vulnerable site, you found out that this given website is a phishing site, or this given website is running client-side exploits, trying to pwn browsers, well you can make a list of all those client-side exploits, client-side sites, and only stop a browser from going to that site if it turned out that that site, only stop it from going to that site if the person was vulnerable and that site was actually offering an exploit for them, so now you take some of Dan's stuff, you take his ability to do that to other sites on the internet, and wow, I've got a nice thing, why don't I start DNS spoofing the bad guys, why don't I start basically making sure that you don't surf to the right people when you're surfing to the bad guys, you surf to me and I tell you, oh wait, you don't want to go there, or oh wait, you don't want to go there unless you're patched, we can go one further step than this, and I've added this slide specifically because there's a great talk here at 4 p.m., great talk, and this is, what if I could change routing on the internet, what if I could go beyond DNS, what if I could change routing on the internet, this is something that Dan and Jay and lots of other people in here are really trying to get all of us to think about, what if I could change routing and get you to surf to me even if you didn't want to, what if I could just send all of your data that was coming back to you or back to the hostile sites through somewhere else, I don't know if this is quite legal, but if I could do that, then at that point I can, well, if I go back to the Midler talk, I can inject bad things in, if I go to this talk where we're doing defensively, where we're doing defense, I can say, oh, you're vulnerable, I'm not going to let you get to the bad thing, or you're vulnerable, I'm going to just inform you, and now you could have a kind of cool thing, you know how lots of people have gone and scanned the whole internet, they found all the vulnerable DNS servers, the vulnerable web servers, or the open mail relays, and they sent an email to the people who are vulnerable and said, hey, you should fix this, well, what if we did this with bad guys, what if we did this with people going to the bad guy sites, or who were surfing with vulnerable stuff, and said, okay, I'm just going to capture all the internet traffic on this ISP today, and I'm going to send it through me, and then when it goes through me, I'm going to see if there are vulnerable clients, and then I'm going to email those people, or what have you. Anyway, it's kind of a little neat. If you own DNS, if you own routing, if you own local routing like ARP, if you start watching all the user agent strings, you can actually protect people quite a bit. You can also modify the requests in flight, you can do whatever you want, redirecting gets easy, this is why we go to coffee houses and end up in captive portals. One of the cool things I want to do though is basically to introduce the talk that's coming up at 4 p.m. If I could do that, if I can actually do, if I can get routing, I've got to make one correction for your typo there. It's not imagine that I could, it's I can. It's not even theoretical at this point. Okay, so someone can, he can. And we are. And they are. Right now. Go for it. You know what? We have to end soon, so this is why I'm also up here. Okay, short version is at 4 p.m. You get to find out that someone actually is taking a part of the internet and, they're just sending all the traffic and making it go through them and you can do some really cool stuff. My imagine slide is imagine if any, imagine if Jay could, imagine if any of you could. You end up getting some really nice stuff. You could gather a whole bunch of info, you can modify everything that you want in flight, tons of non-encrypted stuff. This is what the middler was about, but imagine if I could do the middler not just in my local land or not just with some DNS, some domains. What if I produce basically a talk that's happening at 4 p.m. in the same room? You just got to either stay here until then or remember how to get back here. I know many of you are drunk, so just stumble your way back to here. Track 4 room, this is going to be a really, really awesome talk. It's called Stealing the Internet. I'll see you all in breakout room or whatever.