1 00:00:00,000 --> 00:00:00,960 Well, good morning. 2 00:00:02,880 --> 00:00:04,260 How's DEF CON going for you guys? 3 00:00:05,620 --> 00:00:05,980 Yeah. 4 00:00:08,380 --> 00:00:09,220 Still waking up. 5 00:00:09,280 --> 00:00:10,800 How many of you are here with a hangover? 6 00:00:11,920 --> 00:00:13,480 How many of you are here still drunk? 7 00:00:15,060 --> 00:00:15,640 Right on. 8 00:00:16,100 --> 00:00:17,380 All right, we're going to go ahead and get started. 9 00:00:17,500 --> 00:00:18,320 My name is Andrew Whitaker. 10 00:00:18,500 --> 00:00:19,540 This is Dave Williams. 11 00:00:19,880 --> 00:00:20,540 Donald Hackers. 12 00:00:21,500 --> 00:00:23,400 So, just start off with some brief introductions. 13 00:00:23,840 --> 00:00:25,920 If you've got the program guide, you can read the bio, 14 00:00:26,000 --> 00:00:28,540 so I'm not going to do a whole lot of time in any introductions. 15 00:00:29,160 --> 00:00:30,720 I'm going to just say briefly about myself. 16 00:00:30,940 --> 00:00:34,320 I'm the Director of Enterprise InfoSec for the training camp in InfoSec Academy. 17 00:00:34,680 --> 00:00:37,160 We offer courses in licensed penetration testing, 18 00:00:37,340 --> 00:00:39,120 so you can actually get an international license 19 00:00:39,120 --> 00:00:41,320 to be a professional hacker all over the world. 20 00:00:41,520 --> 00:00:43,960 So, that's pretty cool, because as long as you have a license, 21 00:00:44,100 --> 00:00:45,040 it's okay to hack, right? 22 00:00:46,640 --> 00:00:50,400 And we also offer the Certified Ethical Hacking course as well. 23 00:00:50,840 --> 00:00:52,200 I also do a lot of writing. 24 00:00:53,220 --> 00:00:56,940 The author of the book, Penetration Testing and Network Defense, 25 00:00:57,160 --> 00:00:57,920 it's one of mine. 26 00:00:57,920 --> 00:01:00,960 It was for sale over at the EFF table in the vendor area. 27 00:01:01,120 --> 00:01:03,300 Last time I checked yesterday, they were all sold out, 28 00:01:03,840 --> 00:01:05,920 but I will be doing some book signings immediately 29 00:01:05,920 --> 00:01:08,340 after this over in the vendor area. 30 00:01:09,440 --> 00:01:12,440 Dave Williams, he started out actually as a security intern 31 00:01:12,440 --> 00:01:15,320 for the training camp, and then we hired him on full time. 32 00:01:15,440 --> 00:01:18,620 He now supports our information security for our U.S. operations. 33 00:01:19,080 --> 00:01:21,300 We have about 10 sites in the United States 34 00:01:21,300 --> 00:01:22,960 and several over in Europe. 35 00:01:23,800 --> 00:01:25,420 With that, let's go ahead and get started. 36 00:01:25,700 --> 00:01:26,920 So, what is this talk about? 37 00:01:27,040 --> 00:01:27,900 This talk is called, 38 00:01:27,900 --> 00:01:31,200 Corporate Network Spying, How to Spy on Corporate Networks. 39 00:01:31,300 --> 00:01:33,620 What this is, this is essentially a training 40 00:01:33,620 --> 00:01:34,800 on corporate network spying. 41 00:01:35,920 --> 00:01:39,480 This is designed for those beginner to intermediate skills. 42 00:01:40,100 --> 00:01:42,140 Now, what you find when you come to a conference like DEF CON, 43 00:01:42,320 --> 00:01:46,040 there's going to be some people or some talks that are really designed more 44 00:01:46,040 --> 00:01:47,700 for the intermediate to advanced crowd. 45 00:01:48,000 --> 00:01:51,220 They're really, really cool, but only about 5% of the people 46 00:01:51,220 --> 00:01:53,200 that attend it can fully understand the talk. 47 00:01:53,840 --> 00:01:56,140 This is more designed for more of the beginner to intermediate, 48 00:01:56,300 --> 00:01:57,120 because what I find is 49 00:01:57,120 --> 00:01:58,900 that everybody has to start somewhere. 50 00:01:59,100 --> 00:02:03,200 Everybody has to learn about packet capturing and corporate spying. 51 00:02:03,540 --> 00:02:05,200 So, this is more designed for that crowd. 52 00:02:05,460 --> 00:02:09,320 And I really appreciate talks like Atlas gave that really deal with, okay, 53 00:02:09,380 --> 00:02:13,980 where do we start with and how do we get to become more skilled? 54 00:02:14,780 --> 00:02:18,660 What this is not, this is not a discussion of some hot new exploit, 55 00:02:19,140 --> 00:02:22,480 which may only be theoretical, only work in a lab environment. 56 00:02:22,760 --> 00:02:26,400 Okay? We're going to be talking about things that have been tried and true. 57 00:02:27,120 --> 00:02:27,400 They work. 58 00:02:27,760 --> 00:02:30,440 This is also not going to be an overly technical discussion 59 00:02:31,000 --> 00:02:33,320 that only 1% of the techie world will understand. 60 00:02:33,600 --> 00:02:37,780 My goal is that everybody here will be able to grasp it no matter what your background is. 61 00:02:38,160 --> 00:02:42,380 In fact, I was reading on the DEF CON forum, roughly about 39% of the people 62 00:02:42,380 --> 00:02:44,740 that come this year are new to DEF CON this year, 63 00:02:44,860 --> 00:02:47,520 which means so this will be a good introduction for you. 64 00:02:48,500 --> 00:02:49,840 So, what are we going to be talking about? 65 00:02:49,960 --> 00:02:51,960 We're going to be discussing corporate network spying. 66 00:02:52,380 --> 00:02:54,000 What is corporate network spying? 67 00:02:54,200 --> 00:02:56,680 We're also going to do a rehash of how do you get 68 00:02:56,680 --> 00:03:01,360 around the issue of switches when you're spying on local area networks. 69 00:03:01,740 --> 00:03:05,100 Now, for a lot of you that might be reviewed, but for some of you that might be brand new. 70 00:03:05,420 --> 00:03:09,920 A lot of the techniques I'll be talking about have been spoken at previous DEF CON conferences. 71 00:03:10,400 --> 00:03:15,040 Then I'll be demonstrating or showing you snapshots of several tools that are designed 72 00:03:15,040 --> 00:03:18,060 to capture specific types of traffic on corporate networks. 73 00:03:18,320 --> 00:03:22,300 For example, we'll get into things like mail snarf, which is specifically designed 74 00:03:22,300 --> 00:03:24,940 to capture email traffic on a network. 75 00:03:25,160 --> 00:03:26,520 Also demonstrate things 76 00:03:26,680 --> 00:03:33,380 like an MSN protocol analyzer, which is designed to capture MSN messenger traffic. 77 00:03:34,100 --> 00:03:35,440 Then we're going to get into a demo. 78 00:03:35,580 --> 00:03:37,500 Now, half this is going to be our presentation. 79 00:03:37,780 --> 00:03:39,300 The other half is going to be our demo. 80 00:03:39,740 --> 00:03:43,460 Now, our demo, we're going to be able to show you one of the most challenging parts 81 00:03:43,460 --> 00:03:46,860 of corporate network spying, which is how do you get onto a remote network 82 00:03:46,860 --> 00:03:48,660 and start capturing the traffic. 83 00:03:48,920 --> 00:03:52,820 Okay? It's easier to do if you're trying to spy on your corporate network. 84 00:03:53,000 --> 00:03:55,700 It's harder to do if you're trying to spy on somebody else's network. 85 00:03:55,960 --> 00:03:56,360 Okay? 86 00:03:56,680 --> 00:03:59,220 By the way, everything I'm talking about, it's all theoretical, hypothetical. 87 00:03:59,760 --> 00:04:00,980 I don't endorse it. 88 00:04:03,080 --> 00:04:05,780 That aside, so my lawyers are happy now. 89 00:04:07,400 --> 00:04:09,980 But when we talk about corporate network spying on remote networks, 90 00:04:10,080 --> 00:04:10,980 it gets much more challenging. 91 00:04:11,420 --> 00:04:14,420 So the demo we're going to show you, we're actually going to set up a phishing scam. 92 00:04:14,680 --> 00:04:18,860 We're going to set up a phishing scam to get a user to click on a link, 93 00:04:18,960 --> 00:04:21,840 download what looks like a legitimate executable file. 94 00:04:22,080 --> 00:04:26,280 We're actually going to have them have a, install a practice test software. 95 00:04:26,680 --> 00:04:29,440 While the practice test software is being installed off of a website, 96 00:04:29,800 --> 00:04:34,940 we're going to be installing a Netcat backdoor Trojan at the same time without the user knowing. 97 00:04:35,320 --> 00:04:39,620 Once the Netcat backdoor Trojan is installed, we'll then get into that remote system, 98 00:04:39,800 --> 00:04:44,460 and then we will download a command line packet capturing software. 99 00:04:44,740 --> 00:04:46,280 We will capture some software. 100 00:04:46,440 --> 00:04:50,460 We will upload that back to our attacker machine, and then we will reassemble it. 101 00:04:50,860 --> 00:04:51,340 Okay? 102 00:04:51,520 --> 00:04:55,620 So we'll be reassembling, for the sake of our demo, we'll be reassembling a JPEG. 103 00:04:55,700 --> 00:04:56,080 Okay? 104 00:04:56,080 --> 00:04:59,400 So if you ever look at a packet capturing of a JPEG, it's just a bunch of garbage. 105 00:04:59,640 --> 00:05:02,860 So I'll actually show you how to reassemble it, and we'll be using a hex editor for that. 106 00:05:03,300 --> 00:05:06,940 So definitely take, stick around for a demo, because it should be pretty cool. 107 00:05:07,640 --> 00:05:08,700 Let's go ahead and get started. 108 00:05:09,040 --> 00:05:10,820 I've already talked about what is network spying. 109 00:05:10,880 --> 00:05:16,340 Network spying is basically wiretapping into a network, targeted packet capturing. 110 00:05:16,780 --> 00:05:18,080 Now you can do it one of two ways. 111 00:05:18,160 --> 00:05:20,940 You can either just try to capture all traffic and then analyze it, 112 00:05:21,000 --> 00:05:24,240 which a lot of times, if you're trying to do it remote onto another network, 113 00:05:24,380 --> 00:05:25,400 that makes it, 114 00:05:26,080 --> 00:05:27,540 a lot of times you're just trying to capture everything, 115 00:05:27,700 --> 00:05:30,560 and then sift through it and try to see if you have anything meaningful. 116 00:05:31,080 --> 00:05:34,980 The other way is just to try to capture traffic that is meaningful to you, 117 00:05:35,020 --> 00:05:38,400 such as passwords, or emails, or what websites people are going to. 118 00:05:38,740 --> 00:05:42,920 So some of the tools we'll be demonstrating are only for specific types of traffic. 119 00:05:44,400 --> 00:05:45,980 Who does corporate network spying? 120 00:05:46,380 --> 00:05:51,560 Well, legitimate would be law enforcement, as well as corporate networks, FBI, NSA. 121 00:05:51,720 --> 00:05:53,280 They do a lot of corporate network spying. 122 00:05:54,140 --> 00:05:55,480 You also have corporations 123 00:05:55,480 --> 00:05:56,420 that have consent. 124 00:05:56,840 --> 00:06:02,520 So chances are your boss is probably spying on you, or more likely you're spying on them. 125 00:06:03,520 --> 00:06:08,240 And then you also have hacker hobbyists and some corporate espionage going on as well. 126 00:06:08,540 --> 00:06:12,960 Just to kind of give you an idea of some of the things the FBI and NSA have been doing in the past. 127 00:06:13,640 --> 00:06:15,940 They have been using semantic forests. 128 00:06:16,300 --> 00:06:18,920 What semantic forest does, and it's actually been in the news, 129 00:06:18,960 --> 00:06:22,680 they haven't mentioned this particular name, but we've been hearing a lot about this in the news. 130 00:06:22,780 --> 00:06:25,460 What semantic forest does is it does automatic, you know, 131 00:06:25,480 --> 00:06:30,580 capturing of all voice conversations, and then does automatic transcription of all those voice conversations, 132 00:06:30,780 --> 00:06:33,360 and indexes it so that it's easy to search. 133 00:06:33,960 --> 00:06:39,780 We've been hearing a lot in the news the past year about how the FBI and NSA have been capturing voice conversations. 134 00:06:40,080 --> 00:06:41,500 This is what they're generally using. 135 00:06:41,700 --> 00:06:44,420 So a tool called semantic forests. 136 00:06:46,200 --> 00:06:51,400 Carnivore, also known as DCS-1000, they got rid of that in 2005. 137 00:06:51,760 --> 00:06:55,160 They actually started moving away, FBI started moving away from it about 2001. 138 00:06:55,160 --> 00:06:55,460 They actually started moving away, FBI started moving away from it about 2001. 139 00:06:55,460 --> 00:06:57,300 2002 to go to some commercial solutions. 140 00:06:57,680 --> 00:07:05,280 But what Carnivore did is it allowed you to tap into an ISP, be able to capture traffic. 141 00:07:05,500 --> 00:07:09,380 It involved a packet capturing software, a tool called Packeteer, 142 00:07:09,500 --> 00:07:12,600 which allowed you to reassemble packets, and Coolminer, 143 00:07:12,660 --> 00:07:17,460 which allowed you to search for certain phrases, such as passwords. 144 00:07:19,060 --> 00:07:21,260 You also have things like Echelon. 145 00:07:21,360 --> 00:07:25,440 Echelon is a cooperation between both the UK and the United States. 146 00:07:25,440 --> 00:07:33,260 That allows you to, that allows the FBI, or really the NSA, to be able to capture communication that crosses borders. 147 00:07:33,920 --> 00:07:38,480 And you have Magic Lantern, which is another capturing software. 148 00:07:39,900 --> 00:07:41,840 Corporations do a lot of spying. 149 00:07:42,100 --> 00:07:48,940 For corporations, PC Magazine said that 77% of companies are spying on their employees. 150 00:07:49,460 --> 00:07:51,540 I've even seen statistics higher than that. 151 00:07:51,560 --> 00:07:55,000 The American Management Association reported, 152 00:07:55,000 --> 00:07:59,720 81% of corporations are spying on their employees' email. 153 00:08:00,820 --> 00:08:06,920 You have 42%, according to that survey, that said they were spying on what their employees were doing with instant messaging. 154 00:08:07,740 --> 00:08:11,640 So chances are, corporations are going to be monitoring what you're doing. 155 00:08:12,720 --> 00:08:16,240 Justifications for that, well some of the justifications are to ensure employee productivity, 156 00:08:16,680 --> 00:08:21,160 to ensure the company is void of illegal activity, and to protect trade secrets. 157 00:08:21,540 --> 00:08:24,440 If you're a sysadmin, you're probably spying more to make, 158 00:08:24,440 --> 00:08:26,200 to see what your boss is up to. 159 00:08:27,200 --> 00:08:31,800 So, you also have hacker hobbyists, people that just go around, just look for wireless networks. 160 00:08:32,060 --> 00:08:37,780 Look for wireless networks, or I don't know, let's just say hypothetically, maybe you're at a hotel in Vegas. 161 00:08:38,360 --> 00:08:42,280 And you start looking for networks, like the one in your room. 162 00:08:42,640 --> 00:08:44,660 And you start plugging in, seeing what you can find. 163 00:08:44,720 --> 00:08:48,220 Maybe you can find some MAC addresses, maybe you can duplicate your MAC address. 164 00:08:48,460 --> 00:08:53,900 And apparently, some of the hotels even shut down your port, if you start duplicating your MAC address. 165 00:08:54,440 --> 00:08:54,800 Who knew? 166 00:08:56,340 --> 00:08:59,740 So, other examples, you also have corporate espionage. 167 00:09:00,000 --> 00:09:03,580 With corporate espionage, a great example of that, Oracle and Microsoft. 168 00:09:03,900 --> 00:09:05,360 Some of you may remember this story. 169 00:09:05,580 --> 00:09:10,100 Back, I think it was 2000 or 2001, Larry Ellison came out and confessed 170 00:09:10,100 --> 00:09:15,040 that he was hiring people to dig through the dumpsters of Microsoft, to see what Microsoft was up to. 171 00:09:15,460 --> 00:09:20,420 And so, a lot of companies, big and small, are doing corporate network spying. 172 00:09:22,460 --> 00:09:24,420 Law, or legal and ethical competition. 173 00:09:24,900 --> 00:09:25,760 So, I think that's a great example of that. 174 00:09:25,760 --> 00:09:26,980 And then, the other thing, I'm not going to spend a lot of time on this. 175 00:09:27,420 --> 00:09:33,320 Basically, if you don't have consent, you don't have authorization, it's going to get you in trouble if you get caught. 176 00:09:34,400 --> 00:09:36,080 So, let's move on to the good stuff. 177 00:09:38,280 --> 00:09:40,220 There are a number of commercial solutions. 178 00:09:40,440 --> 00:09:44,800 So, if you're in a commercial environment, and you need to start doing corporate spying, 179 00:09:44,900 --> 00:09:47,780 there are tools called network forensics analysis tools. 180 00:09:47,900 --> 00:09:51,340 Just punch it into a search engine, you'll find a number of tools out there. 181 00:09:51,460 --> 00:09:53,160 They tend to be very pricey. 182 00:09:53,160 --> 00:09:57,720 The tools I'm going to show you are either open source, or they are relatively inexpensive. 183 00:09:58,320 --> 00:10:00,160 And by inexpensive, I mean under $100. 184 00:10:02,980 --> 00:10:07,760 All right, so what I want to move into now is talk about sniffing on switch networks. 185 00:10:08,200 --> 00:10:10,220 Now, again, for some of you, this is going to be review. 186 00:10:10,960 --> 00:10:16,900 But for some of you, you may know one or two methods, but you may not know maybe all of the methods. 187 00:10:17,560 --> 00:10:22,680 What you're going to find is that when you start sniffing, or start trying to capture traffic on a switch network, 188 00:10:22,680 --> 00:10:24,060 it becomes much more difficult. 189 00:10:24,880 --> 00:10:26,440 I'm not going to be introducing anything new. 190 00:10:26,520 --> 00:10:28,540 I just want to spend some time so we're all on the same page, 191 00:10:28,700 --> 00:10:32,200 knowing what are some of the methods you can do to get around switched environments. 192 00:10:33,440 --> 00:10:35,640 First off, what about hub environments? 193 00:10:36,180 --> 00:10:38,020 Now, most places are not using hubs anymore. 194 00:10:38,380 --> 00:10:44,440 But with a hub environment, if a user, say, user A wants to send traffic to user B in that slide, 195 00:10:44,840 --> 00:10:46,980 user C would be able to see it as well. 196 00:10:47,160 --> 00:10:48,860 It's called a shared Ethernet environment. 197 00:10:49,180 --> 00:10:50,600 Everybody's able to see the traffic. 198 00:10:51,340 --> 00:10:52,240 That's an ideal. 199 00:10:52,680 --> 00:10:56,080 It's an ideal world for a malicious hacker trying to spy on a corporate network. 200 00:10:56,440 --> 00:10:57,480 Everybody's using hubs. 201 00:10:57,820 --> 00:11:00,480 In the real world, however, people are going to be using switches. 202 00:11:01,280 --> 00:11:06,080 What happens with a switch is when user A sends traffic to user B, 203 00:11:06,960 --> 00:11:11,000 well, the switch is going to record the source MAC address in its MAC table. 204 00:11:11,440 --> 00:11:15,140 So the switch will see that we got a source MAC coming in on fast Ethernet 01, 205 00:11:15,480 --> 00:11:17,400 and it's going to plug that into its MAC table. 206 00:11:17,780 --> 00:11:20,080 It's then going to look up the destination address, 207 00:11:20,320 --> 00:11:22,520 which is going to be user B, 208 00:11:22,520 --> 00:11:23,580 its MAC address, 209 00:11:23,840 --> 00:11:26,140 and it's going to see if it has that in its MAC table. 210 00:11:26,600 --> 00:11:29,640 At this point, it does not have user B in its MAC table, 211 00:11:29,820 --> 00:11:31,700 so it's going to end up flooding it out, 212 00:11:31,740 --> 00:11:34,780 both ports, fast Ethernet 02 and fast Ethernet 03. 213 00:11:35,720 --> 00:11:38,700 At this point, if a malicious hacker was at user C, 214 00:11:38,840 --> 00:11:41,020 user C would be able to see that traffic. 215 00:11:41,780 --> 00:11:46,800 What happens, though, when we have user B sending traffic back to user A? 216 00:11:47,000 --> 00:11:49,420 When user B sends traffic back to user A, 217 00:11:49,480 --> 00:11:52,500 well, the switch will record the source MAC address of user A. 218 00:11:52,520 --> 00:11:52,780 User B. 219 00:11:53,920 --> 00:11:56,120 And it will look up the destination MAC address. 220 00:11:56,540 --> 00:12:00,780 Now, at this point, it has a destination MAC address of user A in its MAC table. 221 00:12:01,440 --> 00:12:05,800 As a result, it will only send that traffic out fast Ethernet 01. 222 00:12:06,780 --> 00:12:11,460 And user C, our malicious hacker, would not be able to see any of that traffic. 223 00:12:11,760 --> 00:12:16,280 That's the problem we're talking about when we mention the challenges of sniffing on a switch network. 224 00:12:18,700 --> 00:12:20,120 So there are several solutions. 225 00:12:20,120 --> 00:12:22,900 We have ARP poisoning solutions. 226 00:12:23,220 --> 00:12:25,260 I'm going to talk about two methods for ARP poisoning. 227 00:12:25,520 --> 00:12:28,720 We have MAC duplicating, MAC flooding, and port mirroring. 228 00:12:30,480 --> 00:12:36,500 For ARP poisoning, the first method is you're going to be crafting ARP replies. 229 00:12:37,500 --> 00:12:38,400 Here's what happens. 230 00:12:38,640 --> 00:12:41,160 When user A wants to send traffic to user B, 231 00:12:41,260 --> 00:12:44,240 one of the first things user A will do is send out an ARP request, 232 00:12:44,540 --> 00:12:47,500 saying, what is the MAC address of user B? 233 00:12:48,940 --> 00:12:50,100 Then user B will say, 234 00:12:50,100 --> 00:12:53,560 user B is going to reply to that, saying, here is my MAC address. 235 00:12:54,020 --> 00:12:56,600 Well, when that ARP request is sent out, it is sent out broadcast, 236 00:12:56,900 --> 00:13:00,880 which means user C will see that broadcast, will see that ARP request. 237 00:13:01,220 --> 00:13:05,880 And all we're doing in this method is that user C is sending back the same ARP reply, 238 00:13:06,040 --> 00:13:08,060 saying, hey, I have that same MAC address. 239 00:13:08,340 --> 00:13:11,340 Why don't you send all traffic to user B to me as well? 240 00:13:12,420 --> 00:13:14,860 That's the first method of ARP poisoning. 241 00:13:15,020 --> 00:13:16,720 There are several tools out there that will do that. 242 00:13:17,660 --> 00:13:20,020 Some of the tools also use what's called gratuity. 243 00:13:20,100 --> 00:13:20,460 Gratuitous ARP. 244 00:13:20,580 --> 00:13:23,440 And what gratuitous ARP means, we don't even wait for a request. 245 00:13:23,680 --> 00:13:25,520 We just go ahead and start sending out replies. 246 00:13:26,200 --> 00:13:30,220 A lot of times what they may do is scan a network for all the IP addresses 247 00:13:30,220 --> 00:13:33,060 and then just start sending out replies for every single IP address. 248 00:13:33,460 --> 00:13:38,620 And at that point, our malicious hacker would be able to read all traffic for the entire network. 249 00:13:39,840 --> 00:13:42,700 So this is the first method for getting around the issue of switches. 250 00:13:47,400 --> 00:13:50,080 We'll jump down here to ARP poisoning method number two. 251 00:13:50,100 --> 00:13:51,960 With our poisoning method number two, 252 00:13:52,200 --> 00:13:57,260 here what we're mainly concerned about is traffic being sent out to the internet or through a router. 253 00:13:58,880 --> 00:14:00,460 So here we see a request. 254 00:14:00,680 --> 00:14:02,020 What is the MAC address for a router? 255 00:14:02,560 --> 00:14:06,740 And our malicious hacker is going to reply and say, I am also the router. 256 00:14:07,520 --> 00:14:11,280 At this point, all traffic sent to and from through the router, 257 00:14:11,420 --> 00:14:13,240 it's going to be able to capture that traffic. 258 00:14:13,480 --> 00:14:17,280 So this is a good way to be able to see maybe if people are going through a router 259 00:14:17,280 --> 00:14:19,360 to log into an email server or go to a website, 260 00:14:19,360 --> 00:14:21,060 be able to capture that traffic. 261 00:14:27,340 --> 00:14:29,320 Another method is MAC duplicating. 262 00:14:29,440 --> 00:14:31,440 Now MAC duplicating is a much more simple method. 263 00:14:31,600 --> 00:14:34,940 Here all you're doing is you're finding out what is another host on the network 264 00:14:34,940 --> 00:14:36,920 and you're going to duplicate that same MAC address. 265 00:14:37,260 --> 00:14:40,480 At this point, the switch can have two entries for the same MAC address. 266 00:14:40,820 --> 00:14:43,140 Now this really does depend on the switch. 267 00:14:43,280 --> 00:14:47,780 Some switches will allow to have the same MAC address be associated with more than one port. 268 00:14:47,780 --> 00:14:52,340 Other switches, they may not, they may alternate. 269 00:14:52,520 --> 00:14:56,340 As soon as they see a MAC address on one port, they'll only send traffic out that port. 270 00:14:56,580 --> 00:14:59,700 They see it on another port, they'll switch over and only send it out that port. 271 00:15:03,200 --> 00:15:06,080 So spoofing MAC addresses is not the most efficient method, 272 00:15:06,260 --> 00:15:08,080 but it is a method that you can do. 273 00:15:10,720 --> 00:15:15,060 Another method that I find pretty successful with is MAC flooding. 274 00:15:15,560 --> 00:15:17,540 What MAC flooding does is, 275 00:15:17,540 --> 00:15:20,480 it floods the switch with a number of MAC addresses. 276 00:15:20,960 --> 00:15:23,060 Your switch has a limited amount of memory, 277 00:15:23,180 --> 00:15:24,580 called content addressable memory, 278 00:15:24,760 --> 00:15:26,800 of the number of MAC addresses it can hold. 279 00:15:27,160 --> 00:15:28,600 As soon as you fill that up, 280 00:15:28,720 --> 00:15:32,060 at that point you're going to flush out all the MAC addresses it knows about. 281 00:15:32,700 --> 00:15:34,520 And now you have all these bogus MAC addresses, 282 00:15:34,700 --> 00:15:37,400 and essentially you're going to end up turning your switch into a hub. 283 00:15:37,660 --> 00:15:39,740 It's just going to send traffic out all ports. 284 00:15:40,360 --> 00:15:42,700 The one thing about MAC flooding is, 285 00:15:43,680 --> 00:15:45,320 with some lower end switches, 286 00:15:45,640 --> 00:15:47,520 it ends up essentially doing a denial of service. 287 00:15:47,540 --> 00:15:49,240 And it can actually end up crashing the switch. 288 00:15:51,340 --> 00:15:52,480 So, MAC flooding. 289 00:15:54,460 --> 00:15:57,160 An example of MAC flooding is a tool called MAC-OF. 290 00:15:57,400 --> 00:15:59,060 Here you see the output of MAC-OF. 291 00:15:59,360 --> 00:16:01,240 Very simple to run. It's from a Linux prompt. 292 00:16:01,400 --> 00:16:03,040 You just type MAC-OF, press enter, 293 00:16:03,220 --> 00:16:04,940 and it will begin flooding with, 294 00:16:05,080 --> 00:16:07,460 I forget the statistics, but it's something like 295 00:16:07,460 --> 00:16:09,320 100,000 MAC addresses per second. 296 00:16:09,740 --> 00:16:12,560 It will begin flooding the switch. 297 00:16:14,900 --> 00:16:17,440 Another method you could use for getting around the issue of 298 00:16:17,540 --> 00:16:19,260 switch networks is port mirroring. 299 00:16:19,480 --> 00:16:21,900 Now port mirroring is actually a very legitimate method 300 00:16:21,900 --> 00:16:23,820 that a lot of people use if you have to 301 00:16:23,820 --> 00:16:25,700 maybe set up an intruder detection system, 302 00:16:25,820 --> 00:16:27,320 or maybe you want to 303 00:16:27,320 --> 00:16:28,900 actually legitimately 304 00:16:29,400 --> 00:16:30,900 sniff traffic on your network. 305 00:16:31,340 --> 00:16:32,580 With port mirroring, 306 00:16:32,600 --> 00:16:35,300 Cisco calls it SPAN, 307 00:16:35,320 --> 00:16:36,620 switch port analyzer. 308 00:16:36,760 --> 00:16:39,040 You're basically setting up your switch so that 309 00:16:39,040 --> 00:16:41,520 all traffic on your network will be sent out 310 00:16:41,520 --> 00:16:42,080 this port. 311 00:16:42,760 --> 00:16:45,240 So it's almost as if one port on your switch 312 00:16:45,240 --> 00:16:47,520 is like a hub. It's able to see all traffic. 313 00:16:47,540 --> 00:16:49,380 Now if you're a malicious 314 00:16:49,380 --> 00:16:51,060 hacker, what you're going to have to do first 315 00:16:51,060 --> 00:16:52,720 is compromise the switch 316 00:16:52,720 --> 00:16:55,560 to be able to configure switch port analyzer 317 00:16:55,560 --> 00:16:56,420 or port mirroring. 318 00:16:56,880 --> 00:16:59,220 I have the output here for your Cisco 319 00:16:59,220 --> 00:17:01,120 people in the audience. This is 320 00:17:01,120 --> 00:17:03,560 how you configure port mirroring on a Cisco switch. 321 00:17:04,140 --> 00:17:05,460 Just monitor a session, 322 00:17:05,660 --> 00:17:07,460 you give it a number, you specify the source, 323 00:17:07,640 --> 00:17:09,100 and then you specify what the 324 00:17:09,100 --> 00:17:10,160 destination is. 325 00:17:11,320 --> 00:17:13,400 With Cisco, you can not only specify 326 00:17:13,400 --> 00:17:15,460 individual ports that you want to capture, 327 00:17:15,600 --> 00:17:16,820 but you can even specify 328 00:17:17,540 --> 00:17:19,620 entire VLANs that you want to capture. 329 00:17:21,460 --> 00:17:22,500 So here I see the 330 00:17:22,500 --> 00:17:24,180 example configuration. 331 00:17:26,640 --> 00:17:27,600 And all of this 332 00:17:27,600 --> 00:17:29,000 is on the CD as well. 333 00:17:29,220 --> 00:17:31,620 So if you're trying to write it down, it is on your CDs. 334 00:17:35,860 --> 00:17:37,380 So let's move on to talk about 335 00:17:37,380 --> 00:17:39,420 some specific packet capturing software. 336 00:17:39,880 --> 00:17:41,660 Now I'm going to use the term sniffer a lot. 337 00:17:41,720 --> 00:17:43,100 Sniffer is a registered trademark, 338 00:17:43,300 --> 00:17:45,720 but it's become just a common term. 339 00:17:45,840 --> 00:17:47,520 So forgive me if I use the term sniffer a lot. 340 00:17:47,540 --> 00:17:49,380 There's a number of packet 341 00:17:49,380 --> 00:17:50,080 capturing software. 342 00:17:51,800 --> 00:17:53,360 When I went out to PacketStorm 343 00:17:53,360 --> 00:17:55,040 Security, there was over 200 344 00:17:55,040 --> 00:17:57,000 tools, or actually I think it was 198 345 00:17:57,340 --> 00:17:59,180 tools just used for packet capturing. 346 00:17:59,920 --> 00:18:01,260 I'm going to be demonstrating 347 00:18:01,260 --> 00:18:02,620 some of the more popular tools, 348 00:18:02,840 --> 00:18:05,480 some of the open source and free tools. 349 00:18:05,900 --> 00:18:06,940 Including WinDump 350 00:18:06,940 --> 00:18:08,320 and TCPDump. 351 00:18:08,760 --> 00:18:11,160 WinDump and TCPDump, these are command line tools. 352 00:18:11,900 --> 00:18:13,360 WinDump, Windows, and 353 00:18:13,360 --> 00:18:15,140 TCPDump is Unix and Linux. 354 00:18:16,260 --> 00:18:17,380 And Ether 355 00:18:17,540 --> 00:18:19,520 Reel or Ethereal, which is now called 356 00:18:19,520 --> 00:18:20,180 Wireshark. 357 00:18:22,260 --> 00:18:23,180 So WinDump 358 00:18:23,180 --> 00:18:24,920 was developed by 359 00:18:25,540 --> 00:18:26,820 Loris DiGioanni, 360 00:18:27,600 --> 00:18:28,520 Gianluca Verini, 361 00:18:29,140 --> 00:18:30,600 and some other Italian people. 362 00:18:30,980 --> 00:18:32,980 Forgive me if I pronounce their name wrong. 363 00:18:33,800 --> 00:18:35,100 This is TCPDump. 364 00:18:35,260 --> 00:18:37,440 It requires a WinCap or libpcap 365 00:18:37,440 --> 00:18:39,420 library, so you had to get that installed first. 366 00:18:41,160 --> 00:18:42,980 There's a number of options from this. 367 00:18:43,180 --> 00:18:45,040 Now why am I talking about a command line tool? 368 00:18:45,240 --> 00:18:46,920 Well the benefit of a command line tool 369 00:18:47,540 --> 00:18:48,460 is when you want to get access 370 00:18:48,460 --> 00:18:49,560 to a system remotely. 371 00:18:50,540 --> 00:18:52,380 If I want to get access to a system remotely, 372 00:18:52,560 --> 00:18:54,640 I'm probably not going to have a GUI that I can work with. 373 00:18:55,080 --> 00:18:56,860 I'm going to want to try to get some type of 374 00:18:56,860 --> 00:18:58,460 command line tool on the remote system 375 00:18:58,460 --> 00:19:00,520 because it's easier to get a command line 376 00:19:00,520 --> 00:19:01,760 than it is to get a GUI. 377 00:19:04,420 --> 00:19:05,160 Some examples 378 00:19:05,160 --> 00:19:06,560 of what you can do with WinDump. 379 00:19:06,660 --> 00:19:09,080 WinDump-D will list off 380 00:19:09,080 --> 00:19:10,020 all of your interfaces. 381 00:19:10,760 --> 00:19:12,580 WinDump-I will allow you to select 382 00:19:12,580 --> 00:19:15,100 which interface you want to start capturing software on. 383 00:19:16,200 --> 00:19:17,400 You have some other options 384 00:19:17,540 --> 00:19:19,200 there including dash-W 385 00:19:19,200 --> 00:19:21,240 which will write to a log file and dash-R 386 00:19:21,240 --> 00:19:22,640 which will read from a log file. 387 00:19:23,040 --> 00:19:25,760 We'll be demonstrating this later on in our demo. 388 00:19:28,320 --> 00:19:29,580 Here you see the output 389 00:19:29,580 --> 00:19:30,140 of WinDump. 390 00:19:31,080 --> 00:19:33,200 It's not the prettiest output 391 00:19:33,200 --> 00:19:35,320 to analyze, but one of the 392 00:19:35,320 --> 00:19:37,880 nice things about WinDump and TCPDump 393 00:19:37,880 --> 00:19:39,440 is that it can also be 394 00:19:39,440 --> 00:19:41,300 read by ethereal, which is now 395 00:19:41,300 --> 00:19:43,560 Wireshark. So we're actually not going to 396 00:19:43,560 --> 00:19:45,440 be analyzing WinDump output directly. 397 00:19:45,580 --> 00:19:47,500 We're going to open it up within Wireshark. 398 00:19:47,540 --> 00:19:49,360 And show you that, because it's easier to read 399 00:19:49,360 --> 00:19:50,160 within Wireshark. 400 00:19:52,320 --> 00:19:53,280 So Wireshark 401 00:19:53,280 --> 00:19:54,640 just, I think it was 402 00:19:54,640 --> 00:19:57,600 last month, Dave, when it switched over to Wireshark? 403 00:19:58,140 --> 00:19:59,220 Yeah, about 404 00:19:59,220 --> 00:20:01,380 two months ago, ethereal 405 00:20:01,380 --> 00:20:02,460 became Wireshark. 406 00:20:03,380 --> 00:20:05,160 Supported by a number of programmers, 407 00:20:05,360 --> 00:20:06,500 over 100 programmers. 408 00:20:07,260 --> 00:20:09,300 Recognizes over 759 protocols. 409 00:20:10,460 --> 00:20:11,440 How many of you have ever 410 00:20:11,440 --> 00:20:13,220 used ethereal or Wireshark? 411 00:20:13,340 --> 00:20:14,600 It's an awesome, awesome tool. 412 00:20:14,740 --> 00:20:16,160 So you're familiar with it. 413 00:20:17,640 --> 00:20:19,320 We'll be showing you some output here. 414 00:20:20,340 --> 00:20:21,680 Here, just to kind of 415 00:20:21,680 --> 00:20:22,480 walk through it, 416 00:20:23,340 --> 00:20:25,580 you've got three main panes. The top pane is going to 417 00:20:25,580 --> 00:20:27,700 be showing just the overall traffic. 418 00:20:27,900 --> 00:20:29,460 The middle pane is going to show you 419 00:20:29,460 --> 00:20:31,380 the various headers. And then the bottom 420 00:20:31,380 --> 00:20:33,420 pane is going to be all of the hex output. 421 00:20:34,640 --> 00:20:35,500 So, I don't know if 422 00:20:35,500 --> 00:20:37,320 you guys can see on the screen here, but 423 00:20:37,320 --> 00:20:39,120 what we've got here is we're doing a 424 00:20:39,760 --> 00:20:41,320 DNS lookup. We've got an 425 00:20:41,320 --> 00:20:43,080 A lookup for 426 00:20:43,080 --> 00:20:45,540 defcon.org. You can then see that we've got 427 00:20:45,540 --> 00:20:47,520 our response. You then see that 428 00:20:47,540 --> 00:20:48,640 we're going out to Netcraft. 429 00:20:49,300 --> 00:20:51,400 When I did this, I had the Netcraft 430 00:20:51,400 --> 00:20:53,320 toolbar. So we see a little 431 00:20:53,320 --> 00:20:54,760 Netcraft lookup to make sure that 432 00:20:55,760 --> 00:20:57,240 Defcon's not part of a phishing scam. 433 00:20:58,020 --> 00:20:59,580 And then you go through and we see 434 00:20:59,580 --> 00:21:01,660 the three-way TCP handshake, 435 00:21:01,760 --> 00:21:02,960 SYN, SYNACK, and ACK. 436 00:21:03,040 --> 00:21:04,000 And then the 437 00:21:04,000 --> 00:21:05,860 GET request. 438 00:21:08,360 --> 00:21:09,440 Now, what a lot of people 439 00:21:09,440 --> 00:21:11,500 may not be familiar with is the fact 440 00:21:11,500 --> 00:21:13,500 that you can reassemble your TCP streams. 441 00:21:14,080 --> 00:21:15,520 If you right-click on any 442 00:21:15,520 --> 00:21:17,460 of your TCP traffic, you can go down 443 00:21:17,540 --> 00:21:18,680 to Follow TCP Stream. 444 00:21:19,200 --> 00:21:21,400 When you do that, you pull up on your screen, 445 00:21:21,580 --> 00:21:23,660 you have the red and the blue. 446 00:21:23,800 --> 00:21:25,360 The red is information that was 447 00:21:25,360 --> 00:21:27,300 sent out. The sender, the blue, 448 00:21:27,400 --> 00:21:28,080 is the receiver. 449 00:21:29,200 --> 00:21:31,280 So here we see we're sending out 450 00:21:31,280 --> 00:21:33,480 a GET request in the red, and then 451 00:21:33,480 --> 00:21:34,560 a response in the blue. 452 00:21:38,060 --> 00:21:39,660 You can use Wireshark 453 00:21:39,660 --> 00:21:40,300 to do a lot of 454 00:21:41,740 --> 00:21:43,440 password sniffing. There are 455 00:21:43,440 --> 00:21:45,400 a number of protocols that send their traffic 456 00:21:45,400 --> 00:21:46,220 in clear text. 457 00:21:46,860 --> 00:21:48,700 Telnet, and POP, and SMTP, 458 00:21:49,380 --> 00:21:50,320 just to name a few. 459 00:21:51,100 --> 00:21:53,160 But in addition, even those 460 00:21:54,380 --> 00:21:55,380 software applications 461 00:21:55,380 --> 00:21:57,500 that do try to encode or encrypt 462 00:21:57,500 --> 00:21:59,060 their passwords, often times 463 00:21:59,060 --> 00:22:00,360 it's very easy to reverse. 464 00:22:00,900 --> 00:22:02,700 Such as LAN Manager hashes, 465 00:22:02,800 --> 00:22:05,000 which are kind of old now, but LAN Manager hashes 466 00:22:05,000 --> 00:22:07,260 are very easy to reverse. Just take the password, 467 00:22:07,360 --> 00:22:08,340 split it into seven 468 00:22:08,980 --> 00:22:11,020 characters, convert to uppercase, 469 00:22:11,180 --> 00:22:13,220 and then run DES again. 470 00:22:13,340 --> 00:22:14,460 It's very easy to 471 00:22:15,420 --> 00:22:16,740 compare hashes with that. 472 00:22:17,180 --> 00:22:18,940 You also have things like VNC 473 00:22:18,940 --> 00:22:20,960 and some others that are very easy 474 00:22:20,960 --> 00:22:23,360 to crack. So if you're able 475 00:22:23,360 --> 00:22:25,420 just to capture some of the passwords, even if they are 476 00:22:25,420 --> 00:22:27,480 encoded or encrypted, a lot of times 477 00:22:27,480 --> 00:22:28,820 you can use that to then 478 00:22:29,800 --> 00:22:31,380 not necessarily reverse the hash, 479 00:22:31,520 --> 00:22:32,560 but compare hashes. 480 00:22:34,360 --> 00:22:35,340 So one of my 481 00:22:35,340 --> 00:22:36,760 most popular tools 482 00:22:37,320 --> 00:22:38,320 is Kain Enable. 483 00:22:39,200 --> 00:22:40,020 Kain Enable 484 00:22:40,020 --> 00:22:42,980 can capture just passwords. 485 00:22:43,060 --> 00:22:45,340 It will just look for passwords. Now it can do a lot of other things. 486 00:22:45,400 --> 00:22:47,120 But I'm just going to be showing you what it can do for 487 00:22:47,120 --> 00:22:47,520 passwords. 488 00:22:49,140 --> 00:22:51,140 Kain Enable, here we see an example where 489 00:22:51,140 --> 00:22:53,200 it's sniffing and it's able to capture 490 00:22:53,200 --> 00:22:55,300 POP passwords. So you're able to see 491 00:22:55,300 --> 00:22:56,800 somebody logging into a POP account, 492 00:22:57,340 --> 00:22:59,360 victim 14 with a password of 493 00:22:59,360 --> 00:23:00,240 defcon 14. 494 00:23:03,760 --> 00:23:05,000 Here we're able to see 495 00:23:05,000 --> 00:23:06,420 the output of 496 00:23:07,140 --> 00:23:08,860 looks like a NTLM session. 497 00:23:09,080 --> 00:23:10,640 Somebody was logging into a Windows box. 498 00:23:11,020 --> 00:23:12,420 Now here we have the hash, 499 00:23:12,620 --> 00:23:15,100 and the hash is not the password. But then we can 500 00:23:15,400 --> 00:23:17,200 either do a rainbow table, 501 00:23:17,380 --> 00:23:19,260 crack against it, or we can 502 00:23:19,260 --> 00:23:20,260 maybe pull it into a 503 00:23:20,940 --> 00:23:23,040 tool like what AtStake provides, 504 00:23:23,380 --> 00:23:25,320 or some of the other tools that will crack 505 00:23:25,320 --> 00:23:26,560 your LAN Manager hash. 506 00:23:26,920 --> 00:23:29,120 You can even right click on your 507 00:23:29,120 --> 00:23:31,440 LAN Manager hash and choose send to cracker. 508 00:23:31,820 --> 00:23:33,540 So begin cracking the password. 509 00:23:35,900 --> 00:23:37,220 You can even do Telnet 510 00:23:37,220 --> 00:23:37,620 conversations. 511 00:23:38,660 --> 00:23:41,300 Telnet is sent clear text. It will capture 512 00:23:41,300 --> 00:23:43,380 Telnet conversation in Kain Enable. 513 00:23:43,500 --> 00:23:45,380 Again, if you right click, you can 514 00:23:45,400 --> 00:23:47,340 go straight to view. It will pull up 515 00:23:47,340 --> 00:23:49,100 in a text file all of that 516 00:23:49,100 --> 00:23:49,920 Telnet conversation. 517 00:23:50,740 --> 00:23:52,600 In this case, we're logging into a router. 518 00:23:52,800 --> 00:23:55,260 So it's able to show you that we're 519 00:23:55,260 --> 00:23:57,260 logging into a router and the password in this case 520 00:23:57,260 --> 00:23:58,520 is let me in. 521 00:24:01,980 --> 00:24:03,240 Here we see an example of 522 00:24:03,240 --> 00:24:04,080 going out to a website. 523 00:24:04,800 --> 00:24:06,960 Logging into two different websites. One is 524 00:24:07,720 --> 00:24:09,280 hotpop.com and another 525 00:24:09,280 --> 00:24:10,680 is excite.com. 526 00:24:10,940 --> 00:24:13,340 By the way, hotpop.com, if you've never been out 527 00:24:13,340 --> 00:24:14,920 to it, it's one of my 528 00:24:15,400 --> 00:24:16,820 favorite sites. It's basically anonymous 529 00:24:16,820 --> 00:24:17,940 email, free email. 530 00:24:18,580 --> 00:24:21,340 When you get an email 531 00:24:21,340 --> 00:24:23,120 account, a lot of times you've got to put in 532 00:24:23,120 --> 00:24:25,000 another email account or some other 533 00:24:25,000 --> 00:24:26,220 information to verify you. 534 00:24:26,560 --> 00:24:27,880 Hotpop does not require that. 535 00:24:28,220 --> 00:24:29,880 It's completely anonymous. 536 00:24:30,980 --> 00:24:33,360 Here we're logging into hotpop. 537 00:24:33,800 --> 00:24:35,240 It did do 538 00:24:35,240 --> 00:24:36,780 some encoding of the username, 539 00:24:36,980 --> 00:24:38,700 but we were able to get the password. 540 00:24:40,260 --> 00:24:41,300 In comparison, 541 00:24:41,420 --> 00:24:42,480 for excite email, 542 00:24:42,700 --> 00:24:45,140 we were able to get the username, but not the 543 00:24:45,400 --> 00:24:45,500 password. 544 00:24:46,080 --> 00:24:48,840 However, it's fairly weak because 545 00:24:48,840 --> 00:24:50,520 if you count the number of characters here, 546 00:24:50,680 --> 00:24:52,460 it's the same as defcon14. 547 00:24:53,240 --> 00:24:55,020 You can see how many characters 548 00:24:55,020 --> 00:24:57,040 when you go to excite, how many 549 00:24:57,040 --> 00:24:58,440 characters the password is. 550 00:25:01,020 --> 00:25:02,580 Here we also see an example. 551 00:25:03,080 --> 00:25:05,060 This is FTP 552 00:25:05,700 --> 00:25:07,060 and we're able to capture 553 00:25:07,060 --> 00:25:07,800 FTP traffic. 554 00:25:08,380 --> 00:25:11,220 Here we have anonymous and then a password 555 00:25:11,220 --> 00:25:12,280 that was sent through FTP. 556 00:25:15,820 --> 00:25:17,300 Another tool you can use 557 00:25:17,300 --> 00:25:18,200 is dsniff. 558 00:25:19,000 --> 00:25:19,400 Question? 559 00:25:25,200 --> 00:25:26,900 Yes, it can do wireless as well. 560 00:25:27,360 --> 00:25:27,760 Yes. 561 00:25:28,960 --> 00:25:30,820 His question was, can cane enable 562 00:25:30,820 --> 00:25:32,640 sniff wireless traffic as well? 563 00:25:32,720 --> 00:25:33,460 The answer is yes. 564 00:25:36,520 --> 00:25:37,320 Another tool 565 00:25:37,320 --> 00:25:38,480 you can use is dsniff. 566 00:25:39,760 --> 00:25:40,500 dsniff is cool. 567 00:25:41,120 --> 00:25:43,240 It can work on Linux and can work on Mac. 568 00:25:43,360 --> 00:25:45,220 I've seen a lot of people with Macs here. 569 00:25:45,400 --> 00:25:47,260 You can use dsniff, 570 00:25:47,360 --> 00:25:49,240 but it can be used only 571 00:25:49,240 --> 00:25:50,880 to listen for passwords. 572 00:25:51,600 --> 00:25:53,300 Here we see we just ran it for a while 573 00:25:53,300 --> 00:25:54,820 and we were able to see that 574 00:25:55,320 --> 00:25:55,900 here we got 575 00:25:57,060 --> 00:25:58,800 user defcon. There's the password. 576 00:26:00,120 --> 00:26:01,500 Here we got DC Williams. 577 00:26:01,900 --> 00:26:03,060 Dave Williams logging in. 578 00:26:03,880 --> 00:26:05,520 It will capture your password. 579 00:26:05,700 --> 00:26:07,140 If you can get this onto a system, 580 00:26:07,260 --> 00:26:08,500 just run it on a network, 581 00:26:08,700 --> 00:26:10,360 you can begin capturing passwords. 582 00:26:13,780 --> 00:26:15,240 In this case, it's capturing 583 00:26:15,400 --> 00:26:15,900 hot passwords. 584 00:26:17,340 --> 00:26:19,300 It's also not difficult to be able to write 585 00:26:19,300 --> 00:26:21,220 your own packet capturing software to do this. 586 00:26:21,400 --> 00:26:23,420 All you do is you just capture the traffic 587 00:26:23,420 --> 00:26:25,380 and then just write a filter 588 00:26:25,380 --> 00:26:27,220 to only look for the phrase pass 589 00:26:27,220 --> 00:26:28,380 or the phrase user. 590 00:26:28,700 --> 00:26:29,860 Begin looking for it. 591 00:26:30,600 --> 00:26:33,100 Ettercap is another great tool to be able to look 592 00:26:33,100 --> 00:26:35,000 to sniff passwords. It has both 593 00:26:35,000 --> 00:26:36,300 active and passive 594 00:26:36,960 --> 00:26:37,840 capturing capabilities. 595 00:26:38,480 --> 00:26:40,220 What do I mean by active and passive? 596 00:26:41,020 --> 00:26:43,300 Passive is like in a hub or a wireless environment. 597 00:26:43,520 --> 00:26:45,380 It's a shared environment. You just want to capture 598 00:26:45,400 --> 00:26:46,040 all of the traffic. 599 00:26:46,960 --> 00:26:49,000 Active means it's going to use one of those five 600 00:26:49,000 --> 00:26:50,200 techniques I told you about. 601 00:26:50,400 --> 00:26:52,980 Either the R poisoning, the MAC duplicating, 602 00:26:53,000 --> 00:26:54,560 the MAC flooding, the port mirroring. 603 00:26:54,580 --> 00:26:56,100 One of those active attacks. 604 00:26:57,380 --> 00:26:59,300 Here we see an output of Ettercap. 605 00:27:01,200 --> 00:27:02,700 I'll kind of zoom in here. 606 00:27:02,900 --> 00:27:05,300 With Ettercap, you can see it was able to grab a user, 607 00:27:06,120 --> 00:27:06,920 Quicksilver, and 608 00:27:06,920 --> 00:27:07,420 pass. 609 00:27:11,160 --> 00:27:13,440 You can also get people's email traffic. 610 00:27:14,380 --> 00:27:15,380 Here we see an example 611 00:27:15,400 --> 00:27:16,920 with email traffic. 612 00:27:17,220 --> 00:27:19,060 We're able to see, again, a username. 613 00:27:19,680 --> 00:27:20,160 Victim14. 614 00:27:20,900 --> 00:27:23,560 We jump down here to the password. 615 00:27:23,940 --> 00:27:24,420 Defcon14. 616 00:27:25,640 --> 00:27:27,260 The neat thing about this is 617 00:27:27,260 --> 00:27:29,340 a lot of times what people use for their email 618 00:27:29,340 --> 00:27:31,300 password is the exact same password 619 00:27:31,300 --> 00:27:32,820 used to log into their Windows machine. 620 00:27:33,900 --> 00:27:35,120 If you're hypothetically 621 00:27:35,120 --> 00:27:36,600 at a hotel 622 00:27:36,600 --> 00:27:39,240 and you're able to capture somebody's email 623 00:27:39,240 --> 00:27:41,200 password and you have their IP 624 00:27:41,200 --> 00:27:43,240 address, you may then try to connect into the 625 00:27:43,740 --> 00:27:44,560 C share. 626 00:27:45,400 --> 00:27:47,200 The admin share 627 00:27:47,200 --> 00:27:49,120 on that machine using that exact same 628 00:27:49,120 --> 00:27:51,260 username and password. A lot of times people will 629 00:27:51,260 --> 00:27:52,400 reuse that password. 630 00:27:54,960 --> 00:27:57,220 Again, you can right click and go to follow 631 00:27:57,220 --> 00:27:59,260 TCP stream. When you right click 632 00:27:59,260 --> 00:28:00,980 and follow TCP stream, we have here 633 00:28:00,980 --> 00:28:03,000 shown out the user and 634 00:28:03,000 --> 00:28:03,900 the password. 635 00:28:06,620 --> 00:28:08,420 You can also use it to read 636 00:28:09,200 --> 00:28:09,900 email messages. 637 00:28:11,180 --> 00:28:13,240 Again, right click and go to 638 00:28:13,240 --> 00:28:14,700 follow TCP stream. 639 00:28:15,400 --> 00:28:16,920 We can see here we have an email message. 640 00:28:17,040 --> 00:28:18,520 This particular email message says, 641 00:28:18,780 --> 00:28:20,920 hey, the Defcon conference is coming up. 642 00:28:21,080 --> 00:28:22,540 Can we send some feds to it? 643 00:28:24,180 --> 00:28:25,260 There's our email 644 00:28:25,260 --> 00:28:27,140 message. Sincerely, Victim14 645 00:28:27,140 --> 00:28:28,680 at punkass.com. 646 00:28:31,220 --> 00:28:33,160 Here's an analysis of email message 647 00:28:33,160 --> 00:28:34,520 but this time using Addercap. 648 00:28:36,640 --> 00:28:38,480 Here we got the username and password 649 00:28:40,020 --> 00:28:40,980 as well. 650 00:28:41,480 --> 00:28:42,760 MailSnarf is another great one. 651 00:28:42,820 --> 00:28:45,040 MailSnarf is probably one of the easiest ones to use. 652 00:28:45,400 --> 00:28:46,920 You just type MailSnarf 653 00:28:46,920 --> 00:28:49,240 and it will sit back and start capturing 654 00:28:49,240 --> 00:28:51,100 all mail messages 655 00:28:51,100 --> 00:28:51,800 that it sees. 656 00:28:52,900 --> 00:28:54,440 Here we see an output of that. 657 00:28:54,880 --> 00:28:57,260 To run it, all you do is 658 00:28:57,260 --> 00:28:59,160 type MailSnarf and then it will start 659 00:28:59,160 --> 00:29:01,180 listening. It listens by default on 660 00:29:01,180 --> 00:29:03,360 eth0. There are 661 00:29:03,360 --> 00:29:05,080 some switches you can do if you want to specify 662 00:29:05,080 --> 00:29:06,440 a different interface. 663 00:29:08,880 --> 00:29:10,540 We can see here is the 664 00:29:11,260 --> 00:29:12,920 output of the email message just saying 665 00:29:12,920 --> 00:29:14,000 testing MailSnarf. 666 00:29:17,100 --> 00:29:18,600 Analysis of FTP traffic, 667 00:29:18,860 --> 00:29:19,860 walk you through this. 668 00:29:20,060 --> 00:29:20,820 Here we have 669 00:29:22,240 --> 00:29:23,280 username, Defcon14. 670 00:29:24,280 --> 00:29:25,620 Another output here we got 671 00:29:25,620 --> 00:29:27,400 password required for Defcon14. 672 00:29:27,640 --> 00:29:29,420 This would be the response from the FTP 673 00:29:29,420 --> 00:29:29,740 server. 674 00:29:30,700 --> 00:29:33,140 Then we have, it tells us 675 00:29:33,140 --> 00:29:34,720 it's a Microsoft FTP service. 676 00:29:36,960 --> 00:29:38,180 There is the password. 677 00:29:39,920 --> 00:29:40,440 Again, 678 00:29:40,680 --> 00:29:42,620 it tells us that we're logged in. 679 00:29:42,780 --> 00:29:45,380 We can always right click and go to follow TCP service. 680 00:29:48,500 --> 00:29:50,180 Here we can see 681 00:29:50,180 --> 00:29:51,140 username, 682 00:29:51,440 --> 00:29:51,820 password, 683 00:29:52,080 --> 00:29:53,580 even does a little MACB 684 00:29:53,580 --> 00:29:55,460 which tells me that when this user 685 00:29:55,460 --> 00:29:57,100 logged in, they were probably using a MAC 686 00:29:58,700 --> 00:29:59,620 going into 687 00:29:59,620 --> 00:30:00,980 a Microsoft FTP server. 688 00:30:07,380 --> 00:30:09,220 Ettercap can do the same thing. 689 00:30:12,520 --> 00:30:15,200 What Ettercap will also do is show 690 00:30:15,400 --> 00:30:17,540 you the FTP traffic once a 691 00:30:17,540 --> 00:30:19,220 person is logged in. It makes it a little bit easier 692 00:30:19,220 --> 00:30:20,020 to see than say 693 00:30:21,520 --> 00:30:21,960 Wireshark. 694 00:30:22,600 --> 00:30:25,220 Here we see it's just sniffing and it's able to 695 00:30:25,220 --> 00:30:27,240 see we're doing a directory listing 696 00:30:28,180 --> 00:30:29,360 within the FTP 697 00:30:29,360 --> 00:30:31,240 server. It makes it really easy to 698 00:30:31,240 --> 00:30:33,120 monitor somebody's FTP server. 699 00:30:33,280 --> 00:30:34,820 Of course, once you have the username and password, 700 00:30:35,020 --> 00:30:37,260 you can just get in yourself and see what you can 701 00:30:37,260 --> 00:30:37,540 find. 702 00:30:41,500 --> 00:30:43,120 There's also tools for MSN 703 00:30:43,120 --> 00:30:43,900 Messenger traffic. 704 00:30:45,400 --> 00:30:46,260 You can always use Wireshark. 705 00:30:46,420 --> 00:30:48,820 Here we're using Wireshark to capture your 706 00:30:49,400 --> 00:30:50,500 MSN Messenger traffic. 707 00:30:51,480 --> 00:30:52,780 Here we got a message 708 00:30:53,220 --> 00:30:55,100 saying, hey, we need to send FEDs to the 709 00:30:55,100 --> 00:30:57,040 DEF CON conference. Hackers are bad, 710 00:30:57,240 --> 00:30:57,680 very bad. 711 00:30:59,140 --> 00:31:01,120 We got a response from attacker14 712 00:31:01,120 --> 00:31:02,460 at punkass.com. 713 00:31:02,840 --> 00:31:04,740 Attacker14 tells us, no, 714 00:31:05,020 --> 00:31:06,720 there's no need to send a FED. 715 00:31:07,040 --> 00:31:09,100 I'm sure nobody will do anything illegal 716 00:31:09,100 --> 00:31:09,480 there. 717 00:31:11,740 --> 00:31:13,360 An even easier tool 718 00:31:13,360 --> 00:31:15,080 for capturing your MSN Messenger 719 00:31:15,400 --> 00:31:17,380 traffic is you can use 720 00:31:17,380 --> 00:31:19,320 MSN Sniffer. There are a number 721 00:31:19,320 --> 00:31:21,000 of other tools out there, MSN Protocol 722 00:31:21,000 --> 00:31:23,120 Analyzer and some others, but 723 00:31:23,120 --> 00:31:24,940 MSN Sniffer works pretty well. 724 00:31:25,720 --> 00:31:26,940 MSN Sniffer, you just 725 00:31:26,940 --> 00:31:29,340 start running it and down in the bottom 726 00:31:29,340 --> 00:31:30,980 window, it will show you all 727 00:31:31,620 --> 00:31:32,060 messages 728 00:31:33,220 --> 00:31:34,600 just for MSN Messenger. 729 00:31:37,360 --> 00:31:39,200 The way to read it is you actually have to 730 00:31:39,200 --> 00:31:41,280 start on the bottom because it adds messages 731 00:31:41,280 --> 00:31:43,360 up to the top. Here we have it. 732 00:31:43,800 --> 00:31:45,300 Is it okay to leave my wireless 733 00:31:45,400 --> 00:31:47,460 open? You don't think anyone will use 734 00:31:47,460 --> 00:31:49,380 it, do you? And the response, 735 00:31:49,860 --> 00:31:51,440 nah, you have nothing to worry about. 736 00:31:52,160 --> 00:31:52,960 Where do you live again? 737 00:31:56,400 --> 00:31:57,240 You can also 738 00:31:57,240 --> 00:31:58,240 use it to capture 739 00:31:59,200 --> 00:32:00,080 web traffic. 740 00:32:00,700 --> 00:32:02,620 URL Snarf is a great tool for that. 741 00:32:03,040 --> 00:32:05,320 URL Snarf, run from a command line. 742 00:32:05,660 --> 00:32:07,140 It's also part of the DSniff 743 00:32:07,140 --> 00:32:09,400 suite of tools. Just run 744 00:32:09,400 --> 00:32:11,200 it from a command line and it will sit back and just 745 00:32:11,200 --> 00:32:13,380 capture all of the URLs that a person is 746 00:32:13,960 --> 00:32:14,400 viewing. 747 00:32:19,540 --> 00:32:21,560 Entercap will also allow you to watch 748 00:32:21,560 --> 00:32:22,860 in real time what 749 00:32:22,860 --> 00:32:25,080 a person is viewing on the 750 00:32:25,080 --> 00:32:25,280 web. 751 00:32:25,480 --> 00:32:27,040 I should pull up those web pages. 752 00:32:30,980 --> 00:32:31,460 What's that? 753 00:32:32,300 --> 00:32:32,780 Oh, 754 00:32:33,000 --> 00:32:34,600 instant messaging as well. 755 00:32:36,800 --> 00:32:37,560 You can also 756 00:32:37,560 --> 00:32:38,940 capture voice conversations. 757 00:32:39,260 --> 00:32:40,260 This is really cool. 758 00:32:40,480 --> 00:32:41,880 You can capture voice conversations. 759 00:32:42,400 --> 00:32:44,380 Cain Enable is a great tool to do that. 760 00:32:44,500 --> 00:32:45,380 With Cain Enable, you can capture 761 00:32:45,400 --> 00:32:47,800 your voice conversations. 762 00:32:48,000 --> 00:32:48,240 Now, 763 00:32:48,320 --> 00:32:51,140 in the real world, it's not 764 00:32:51,140 --> 00:32:52,720 quite always this simple. 765 00:32:52,960 --> 00:32:55,360 For example, with Cisco Voice over IP, 766 00:32:55,540 --> 00:32:57,620 a lot of times with Cisco Voice over IP, 767 00:32:58,480 --> 00:32:59,400 people will 768 00:32:59,400 --> 00:33:01,180 encrypt all of their voice traffic. 769 00:33:01,940 --> 00:33:03,080 Most environments 770 00:33:03,080 --> 00:33:04,320 hopefully are doing that. 771 00:33:04,780 --> 00:33:07,040 When you have voice traffic like Skype, 772 00:33:07,220 --> 00:33:09,300 if you're a Skype user, Skype uses 773 00:33:09,300 --> 00:33:11,520 AES encryption, so it's very difficult 774 00:33:11,520 --> 00:33:13,400 to be able to read your Skype 775 00:33:13,400 --> 00:33:13,940 conversations. 776 00:33:15,400 --> 00:33:17,180 I got some voice traffic here. 777 00:33:17,300 --> 00:33:18,760 I used a soft phone 778 00:33:18,760 --> 00:33:21,320 application. It just records 779 00:33:21,320 --> 00:33:22,140 it as a WAV file. 780 00:33:22,700 --> 00:33:25,460 It records the voice conversation as a WAV file. 781 00:33:25,720 --> 00:33:27,160 You just right click and hit 782 00:33:27,160 --> 00:33:28,800 play. It will play back 783 00:33:28,800 --> 00:33:30,260 the entire voice conversation. 784 00:33:30,900 --> 00:33:33,220 If you're going to begin doing this, you want to make sure you have a large 785 00:33:33,220 --> 00:33:34,900 enough hard drive. If it's a long conversation, 786 00:33:35,220 --> 00:33:37,220 that will end up being a very large WAV file. 787 00:33:40,120 --> 00:33:41,080 Now for the 788 00:33:41,080 --> 00:33:43,180 fun part of the talk. We're going to get into our 789 00:33:43,180 --> 00:33:44,800 demo. Let me introduce 790 00:33:46,560 --> 00:33:47,720 what our demo 791 00:33:47,720 --> 00:33:48,220 is going to be. 792 00:33:49,360 --> 00:33:50,780 What we have here is we have 793 00:33:51,280 --> 00:33:53,300 two attacker machines, and we 794 00:33:53,300 --> 00:33:55,280 have a victim machine, and then we've got a server 795 00:33:56,080 --> 00:33:57,000 hosting a website. 796 00:33:58,120 --> 00:33:58,900 Just one minute. 797 00:33:59,960 --> 00:34:01,300 What we're going to be doing here 798 00:34:01,300 --> 00:34:03,360 is our attacker is 799 00:34:03,360 --> 00:34:05,120 going to try to capture traffic 800 00:34:05,120 --> 00:34:07,240 on the victim's machine. We're trying to 801 00:34:07,240 --> 00:34:09,320 capture traffic being sent to and from the victim 802 00:34:09,320 --> 00:34:11,480 machine. In this environment, 803 00:34:11,640 --> 00:34:13,300 the victim machine we're going to pretend 804 00:34:13,300 --> 00:34:14,360 is on a different network. 805 00:34:15,400 --> 00:34:16,920 How are we going to get onto that remote 806 00:34:16,920 --> 00:34:19,200 host? I know a lot of times 807 00:34:19,200 --> 00:34:21,280 when I do a lot of 808 00:34:21,280 --> 00:34:23,200 pen testing, and I also teach our 809 00:34:23,200 --> 00:34:24,420 licensed pen testing courses, 810 00:34:24,920 --> 00:34:26,980 people are always like, these tools are great, 811 00:34:27,220 --> 00:34:29,180 but when you're actually doing 812 00:34:29,180 --> 00:34:31,260 a pen test, how do you get onto that remote 813 00:34:31,260 --> 00:34:33,240 host? How do you get that packet 814 00:34:33,240 --> 00:34:35,200 capturing software on there? You can't really 815 00:34:35,200 --> 00:34:37,280 use Wireshark because you can't get on 816 00:34:37,280 --> 00:34:39,140 there and install it. It's 817 00:34:39,140 --> 00:34:41,280 much harder to do. That's what 818 00:34:41,280 --> 00:34:43,260 we're going to walk you through. It's kind of start to finish. 819 00:34:43,820 --> 00:34:45,360 We're going to show you, we're going to 820 00:34:45,400 --> 00:34:46,280 set up a phishing scam. 821 00:34:47,320 --> 00:34:49,340 What the attacker will do here 822 00:34:49,340 --> 00:34:51,400 is copy down the trustme.com 823 00:34:51,400 --> 00:34:52,980 website, a legitimate website. 824 00:34:53,380 --> 00:34:54,900 We're going to copy down that website, 825 00:34:55,200 --> 00:34:57,120 and on that website is a 826 00:34:57,120 --> 00:34:59,660 executable, a legitimate executable. 827 00:34:59,740 --> 00:35:01,260 It happens to be some practice test 828 00:35:01,260 --> 00:35:02,940 software. What 829 00:35:02,940 --> 00:35:05,260 the attacker is going to do is it's going to 830 00:35:05,260 --> 00:35:07,300 take that software, and it's 831 00:35:07,300 --> 00:35:08,780 going to bind it with a 832 00:35:08,780 --> 00:35:09,840 Netcat Trojan. 833 00:35:10,960 --> 00:35:13,300 Then we're going to send an email to the victim 834 00:35:13,300 --> 00:35:15,380 saying, hey, go to trustme.com 835 00:35:15,400 --> 00:35:16,480 and download 836 00:35:16,480 --> 00:35:18,340 this practice test software. 837 00:35:18,880 --> 00:35:21,280 The victim will then do that, 838 00:35:21,460 --> 00:35:22,680 but while they're downloading 839 00:35:22,680 --> 00:35:25,320 the software, they're not going to trustme.com, 840 00:35:25,480 --> 00:35:27,000 they'll actually be going to the attacker machine. 841 00:35:28,320 --> 00:35:29,340 Then the victim 842 00:35:29,340 --> 00:35:31,260 is going to be installing the practice test software, 843 00:35:31,400 --> 00:35:33,260 but they'll really be installing the Netcat Trojan 844 00:35:33,260 --> 00:35:34,180 in the background. 845 00:35:34,920 --> 00:35:37,460 Once they've got the Netcat Trojan on, the attacker 846 00:35:37,460 --> 00:35:39,240 can connect into that box 847 00:35:39,240 --> 00:35:41,460 and then use TFTP 848 00:35:41,460 --> 00:35:43,380 to download a command line 849 00:35:43,380 --> 00:35:45,380 sniffer. Once we have a command 850 00:35:45,400 --> 00:35:47,420 line sniffer on, we can then begin capturing 851 00:35:47,420 --> 00:35:49,400 traffic. We then have to 852 00:35:49,400 --> 00:35:51,360 upload that same traffic back to 853 00:35:51,360 --> 00:35:52,980 the attacker machine 854 00:35:52,980 --> 00:35:54,300 and then analyze it. 855 00:35:55,020 --> 00:35:57,600 We're going to be reassembling a JPEG 856 00:35:57,600 --> 00:35:59,340 using a hex editor 857 00:35:59,340 --> 00:36:01,260 so that we can reassemble the original 858 00:36:01,260 --> 00:36:03,460 file. Just to recap 859 00:36:03,460 --> 00:36:05,000 the steps we're going to do, 860 00:36:05,180 --> 00:36:07,060 the attacker is going to copy down 861 00:36:07,060 --> 00:36:09,300 the trustme.com website 862 00:36:09,300 --> 00:36:10,880 and it's going to begin hosting it. 863 00:36:11,100 --> 00:36:13,320 The attacker is going to bind a backdoor 864 00:36:13,320 --> 00:36:15,380 Trojan Netcat with a legitimate executable. 865 00:36:15,400 --> 00:36:17,360 The attacker will 866 00:36:17,360 --> 00:36:18,900 then send an email to the victim 867 00:36:18,900 --> 00:36:21,360 requesting that they download the executable. 868 00:36:22,560 --> 00:36:23,460 The victim 869 00:36:23,460 --> 00:36:24,820 will install the executable 870 00:36:24,820 --> 00:36:26,920 and subsequently, without knowing it, 871 00:36:26,980 --> 00:36:28,240 will also install Netcat. 872 00:36:29,100 --> 00:36:30,980 The attacker is going to use Netcat 873 00:36:30,980 --> 00:36:32,640 to connect into the victim machine. 874 00:36:33,580 --> 00:36:35,160 The attacker will then use 875 00:36:35,160 --> 00:36:36,980 TFTP to download 876 00:36:36,980 --> 00:36:38,940 WinDump onto the victim's machine. 877 00:36:39,780 --> 00:36:41,360 The attacker will then capture 878 00:36:41,360 --> 00:36:43,120 traffic as victim goes to 879 00:36:43,120 --> 00:36:43,480 a website. 880 00:36:45,400 --> 00:36:47,400 The attacker will then analyze the traffic 881 00:36:47,400 --> 00:36:49,000 sent to and from the victim machine. 882 00:36:49,420 --> 00:36:51,360 The attacker will rebuild the graphic 883 00:36:51,360 --> 00:36:52,880 in this case a JPEG 884 00:36:53,320 --> 00:36:55,340 captured by WinDump using a hex editor. 885 00:36:56,220 --> 00:36:57,400 Now what I want to show you here 886 00:36:57,400 --> 00:36:59,300 is that being able to spy on a 887 00:36:59,300 --> 00:37:00,580 corporate network, a remote network, 888 00:37:00,760 --> 00:37:02,080 there's a lot more steps involved. 889 00:37:02,280 --> 00:37:04,460 It's not just about running packet capturing software. 890 00:37:04,800 --> 00:37:06,420 You really do have a lot more steps involved 891 00:37:06,420 --> 00:37:08,280 to get onto the host, capture it, 892 00:37:08,340 --> 00:37:09,920 send it back, and then analyze it. 893 00:37:10,980 --> 00:37:13,040 If we have time, and I think we will 894 00:37:13,040 --> 00:37:15,040 if we can get it working, we'll also demonstrate DriftNet. 895 00:37:15,760 --> 00:37:16,400 DriftNet will 896 00:37:18,820 --> 00:37:19,180 reassemble 897 00:37:19,180 --> 00:37:20,720 those JPEGs in real time 898 00:37:21,360 --> 00:37:23,200 rather than have to use a hex editor. 899 00:37:23,840 --> 00:37:25,300 At this point we're going to switch off. 900 00:37:25,440 --> 00:37:26,100 We're going to go to 901 00:37:27,040 --> 00:37:28,700 two monitors. We're going to try to get 902 00:37:28,700 --> 00:37:30,580 an attacker machine on one side 903 00:37:30,580 --> 00:37:32,900 and we're going to try to get a victim machine on the other. 904 00:37:34,920 --> 00:37:36,600 I know we have a lot of steps here. 905 00:37:36,740 --> 00:37:38,600 I'm going to go through it very slowly. 906 00:37:39,780 --> 00:37:41,160 What I want to show you is that 907 00:37:41,160 --> 00:37:43,240 in the real world it's a lot more challenging 908 00:37:43,240 --> 00:37:45,000 if you want to be able to sniff traffic 909 00:37:45,400 --> 00:37:47,060 in a remote network. There's a lot more steps involved. 910 00:37:47,440 --> 00:37:49,120 That's what we're going to be walking you through. 911 00:37:49,640 --> 00:37:51,080 The first thing we need to do is 912 00:37:51,080 --> 00:37:53,180 on the attacker machine, Dave, if you could go 913 00:37:53,180 --> 00:37:55,340 to a web browser and pull up 914 00:37:55,340 --> 00:37:56,680 the trustme.com website. 915 00:37:57,420 --> 00:37:59,460 This will show you that trustme.com 916 00:37:59,460 --> 00:38:00,840 is a website that we have 917 00:38:01,320 --> 00:38:02,320 hosted on the server here. 918 00:38:02,860 --> 00:38:04,740 You can see it says Certified Ethical Hacking 919 00:38:04,740 --> 00:38:06,820 Practice Exam. At Training Camp 920 00:38:06,820 --> 00:38:09,640 we create our own practice exams. 921 00:38:10,700 --> 00:38:11,440 The website 922 00:38:11,440 --> 00:38:13,220 is very simple. It just says click this link 923 00:38:13,220 --> 00:38:14,340 to download the Training Camp 924 00:38:15,400 --> 00:38:16,220 attacker practice exam. 925 00:38:16,500 --> 00:38:18,400 You can click on the link and it will 926 00:38:18,820 --> 00:38:20,700 download the executable. 927 00:38:20,980 --> 00:38:23,220 What we need to be able to do for our phishing attack 928 00:38:23,220 --> 00:38:25,280 is copy down this whole website 929 00:38:25,280 --> 00:38:26,400 and then host it locally. 930 00:38:28,100 --> 00:38:29,440 At this point, Dave, 931 00:38:29,500 --> 00:38:31,220 if you could go out to a command prompt window 932 00:38:32,380 --> 00:38:33,400 and it's going to go back 933 00:38:33,400 --> 00:38:34,460 to the root of the C drive. 934 00:38:34,720 --> 00:38:36,620 We have a utility called wget. 935 00:38:37,300 --> 00:38:38,680 wget, if you've never worked with it, 936 00:38:38,740 --> 00:38:39,860 it's a great utility to have. 937 00:38:39,980 --> 00:38:41,900 It will mirror entire websites for you. 938 00:38:42,520 --> 00:38:44,760 He's going to do wget-m 939 00:38:45,400 --> 00:38:45,840 for mirror. 940 00:38:46,920 --> 00:38:47,940 Then he's going to do 941 00:38:48,640 --> 00:38:50,940 dash-r, which is to do a 942 00:38:50,940 --> 00:38:53,280 recursive lookup and pull out 943 00:38:53,280 --> 00:38:55,080 all websites that are linked 944 00:38:55,080 --> 00:38:57,400 from this page. He's going to do a dash-l, 945 00:38:58,000 --> 00:38:59,360 which is the number of links 946 00:38:59,360 --> 00:39:00,880 you want to do a recursive lookup for. 947 00:39:01,680 --> 00:39:02,920 We're just going to say two, 948 00:39:03,100 --> 00:39:05,320 but you can really make it whatever you want in this case. 949 00:39:05,700 --> 00:39:06,620 Then the website, 950 00:39:06,880 --> 00:39:08,920 www.trustme.com 951 00:39:10,820 --> 00:39:13,000 At this point, I just copied down our website. 952 00:39:13,600 --> 00:39:15,160 If you can highlight it there, Dave, 953 00:39:15,400 --> 00:39:17,400 you see it also copied down ceh.exe. 954 00:39:17,940 --> 00:39:19,100 That's your executable. 955 00:39:19,280 --> 00:39:21,180 We're going to use that practice test software 956 00:39:21,180 --> 00:39:23,360 to bind it with 957 00:39:23,360 --> 00:39:24,860 the Trojan netcat. 958 00:39:25,480 --> 00:39:26,660 At this point, if we could 959 00:39:27,200 --> 00:39:27,900 pull up, 960 00:39:29,640 --> 00:39:31,360 and I'll show you here that at the root 961 00:39:31,360 --> 00:39:32,040 of our C drive, 962 00:39:33,160 --> 00:39:36,060 we've got www.trustme.com 963 00:39:36,060 --> 00:39:37,340 There's a website that we copied 964 00:39:37,340 --> 00:39:39,220 down. If you go inside it, 965 00:39:39,300 --> 00:39:41,360 if you want to launch the index.html, 966 00:39:41,840 --> 00:39:43,140 we'll see, sure enough, 967 00:39:43,340 --> 00:39:45,360 there's our website that we copied 968 00:39:45,400 --> 00:39:45,560 down. 969 00:39:47,100 --> 00:39:48,480 If you want to close out of that, 970 00:39:48,640 --> 00:39:51,160 we'll just run the ceh.exe so that you guys can see 971 00:39:51,160 --> 00:39:53,100 this is a legitimate 972 00:39:53,100 --> 00:39:53,960 program. 973 00:39:55,060 --> 00:39:57,100 It's going to run through the practice test installation. 974 00:39:58,360 --> 00:39:59,180 We can even 975 00:39:59,180 --> 00:40:00,540 launch it if you want. 976 00:40:01,620 --> 00:40:02,340 There it is. 977 00:40:03,300 --> 00:40:04,740 There's our practice test. 978 00:40:08,540 --> 00:40:09,600 Close out of that. 979 00:40:10,240 --> 00:40:13,380 That's the executable. That's the legitimate executable 980 00:40:13,380 --> 00:40:14,620 that we want to bind 981 00:40:15,400 --> 00:40:16,060 with netcat. 982 00:40:18,220 --> 00:40:19,340 One of the first things 983 00:40:19,340 --> 00:40:21,120 we need to do is we need to go back into our 984 00:40:21,120 --> 00:40:22,820 trustme.com and we need to edit 985 00:40:22,820 --> 00:40:25,020 the HTML so that 986 00:40:25,020 --> 00:40:26,920 the location for the 987 00:40:28,380 --> 00:40:28,860 executable 988 00:40:28,860 --> 00:40:30,860 is not going to trustme.com, 989 00:40:31,080 --> 00:40:32,920 but it's rather going to our local machine. 990 00:40:33,700 --> 00:40:35,260 It's going to edit the HTML here 991 00:40:35,260 --> 00:40:36,260 and just put in 992 00:40:36,260 --> 00:40:39,200 this machine so that when we host it, 993 00:40:39,360 --> 00:40:40,680 the executable is going to be, 994 00:40:40,860 --> 00:40:43,320 people will be downloading it from the attacker machine. 995 00:40:44,280 --> 00:40:45,260 We'll save that. 996 00:40:45,740 --> 00:40:47,040 We're going to close out of that. 997 00:40:48,300 --> 00:40:49,200 At this point, 998 00:40:52,680 --> 00:40:54,480 what we're going to have to do is 999 00:40:55,040 --> 00:40:56,240 bind the trojan. 1000 00:40:57,180 --> 00:40:58,760 The trojan that we're going to be using 1001 00:41:00,420 --> 00:41:01,220 actually first 1002 00:41:01,220 --> 00:41:03,040 do you want to go in there and 1003 00:41:03,780 --> 00:41:05,140 rename the files first? 1004 00:41:05,540 --> 00:41:05,940 Okay. 1005 00:41:06,980 --> 00:41:08,740 First thing that Dave's going to do here is 1006 00:41:08,740 --> 00:41:10,240 he needs to rename a couple of files. 1007 00:41:10,600 --> 00:41:12,840 What we're going to be doing when we bind the trojan 1008 00:41:13,400 --> 00:41:14,840 is we're going to be creating a new 1009 00:41:15,400 --> 00:41:15,940 setup.exe. 1010 00:41:16,960 --> 00:41:19,080 We're going to bind netcat to a brand new 1011 00:41:19,080 --> 00:41:20,880 setup.exe for this 1012 00:41:21,400 --> 00:41:22,380 practice test software. 1013 00:41:22,900 --> 00:41:24,600 What we need to do first is 1014 00:41:25,200 --> 00:41:27,740 make a backup of the original setup.exe. 1015 00:41:28,220 --> 00:41:29,800 The original setup.exe, 1016 00:41:29,840 --> 00:41:31,340 we'll just call it z.exe. 1017 00:41:32,500 --> 00:41:33,540 Setup.exe 1018 00:41:33,540 --> 00:41:35,420 makes a call to setup.lst. 1019 00:41:36,140 --> 00:41:37,340 We're just going to make a 1020 00:41:37,340 --> 00:41:38,100 copy of that 1021 00:41:39,320 --> 00:41:39,840 and 1022 00:41:40,920 --> 00:41:42,620 name it z.lst. 1023 00:41:42,820 --> 00:41:43,140 ... 1024 00:41:45,600 --> 00:41:47,240 That's just so that when we do our binding 1025 00:41:48,100 --> 00:41:49,320 it'll work. We're going to create a 1026 00:41:49,320 --> 00:41:50,560 brand new setup.exe. 1027 00:41:50,900 --> 00:41:53,280 At this point, we're going to pull up our 1028 00:41:53,280 --> 00:41:55,160 binding application. We're going to use 1029 00:41:55,160 --> 00:41:57,340 yet another binder, or YAB. 1030 00:41:58,780 --> 00:41:59,140 YAB 1031 00:41:59,140 --> 00:42:01,240 you can get it at areyoufearless.com 1032 00:42:02,440 --> 00:42:03,160 areyoufearless.com 1033 00:42:04,600 --> 00:42:05,320 What Dave's 1034 00:42:05,320 --> 00:42:06,860 going to do is he's going to click on the plus sign 1035 00:42:07,400 --> 00:42:09,300 to select his file that he wants 1036 00:42:09,300 --> 00:42:11,280 to bind. He's going to 1037 00:42:11,280 --> 00:42:13,220 go ahead and browse and he's 1038 00:42:13,220 --> 00:42:14,980 going to choose the netcat utility. 1039 00:42:15,480 --> 00:42:17,300 Which we have at the root of our C drive 1040 00:42:17,300 --> 00:42:18,500 there. There it is. 1041 00:42:21,600 --> 00:42:23,060 As you go down, we have 1042 00:42:23,060 --> 00:42:25,200 the target path. We're just going to 1043 00:42:25,200 --> 00:42:26,280 keep it in the same folder. 1044 00:42:26,960 --> 00:42:29,160 We also have certain 1045 00:42:29,160 --> 00:42:31,200 attributes you can set, like you can set 1046 00:42:31,200 --> 00:42:32,940 a read-only attribute or hidden attribute. 1047 00:42:33,120 --> 00:42:34,380 We're just going to leave that as is. 1048 00:42:34,760 --> 00:42:37,020 We also have execution methods. 1049 00:42:37,380 --> 00:42:38,980 We're going to choose asynchronously. 1050 00:42:39,260 --> 00:42:41,280 What asynchronously says is it's going to go 1051 00:42:41,280 --> 00:42:43,320 through and run the setup of the practice 1052 00:42:43,320 --> 00:42:45,180 test and then run netcat. 1053 00:42:46,040 --> 00:42:47,200 Sometimes you have problems 1054 00:42:47,200 --> 00:42:49,080 if you try to do it synchronously and try to do it 1055 00:42:49,080 --> 00:42:49,680 at the same time. 1056 00:42:50,980 --> 00:42:52,860 Now we've got netcat set up. 1057 00:42:53,340 --> 00:42:54,300 Did we add the switches? 1058 00:42:59,060 --> 00:43:00,340 For execution parameters, 1059 00:43:01,000 --> 00:43:02,700 we're going to add a dash 1060 00:43:03,200 --> 00:43:05,220 p for the port number that we're going to 1061 00:43:05,220 --> 00:43:06,620 use to connect to our victim machine. 1062 00:43:06,980 --> 00:43:08,260 We'll just choose 50. 1063 00:43:08,560 --> 00:43:10,560 It's a random number here. We're going to 1064 00:43:10,560 --> 00:43:12,140 choose a dash e 1065 00:43:13,220 --> 00:43:15,380 to execute cmd.exe 1066 00:43:15,400 --> 00:43:17,140 This way, when we 1067 00:43:17,140 --> 00:43:19,060 connect into our victim host, 1068 00:43:19,220 --> 00:43:20,280 we'll get a command shell. 1069 00:43:20,600 --> 00:43:22,220 Then we'll do the dash L. 1070 00:43:23,320 --> 00:43:25,400 Dash L will set 1071 00:43:25,400 --> 00:43:27,620 it up to listen for when we connect into it. 1072 00:43:28,500 --> 00:43:29,280 I think 1073 00:43:29,280 --> 00:43:29,700 we're good there. 1074 00:43:30,880 --> 00:43:32,920 Now we're going to add the second file. 1075 00:43:33,160 --> 00:43:35,100 The second file we're going to be adding is 1076 00:43:35,100 --> 00:43:37,040 that z.exe. Remember that? 1077 00:43:37,080 --> 00:43:38,440 That was the setup that we renamed. 1078 00:43:38,960 --> 00:43:40,220 Now we're going to add that. 1079 00:43:40,740 --> 00:43:43,020 Put in the path there for 1080 00:43:43,020 --> 00:43:43,240 ... 1081 00:43:46,180 --> 00:43:47,320 CEH practice test. 1082 00:43:47,700 --> 00:43:48,480 Then we'll call it 1083 00:43:49,980 --> 00:43:50,780 z.exe. 1084 00:43:53,520 --> 00:43:54,720 Hold on, Dave. We'll just show 1085 00:43:54,720 --> 00:43:57,380 there is an option there for registry startup methods. 1086 00:43:57,640 --> 00:43:58,440 We're not going to use it. 1087 00:43:58,840 --> 00:44:00,220 What's nice about that is 1088 00:44:00,660 --> 00:44:02,300 if a person restarts their computer, 1089 00:44:02,520 --> 00:44:04,400 you can have netcat start up every single time 1090 00:44:04,400 --> 00:44:05,640 by putting it into the registry. 1091 00:44:05,980 --> 00:44:07,240 It's kind of a nice option there. 1092 00:44:07,420 --> 00:44:08,500 We'll just go ahead and hit okay there. 1093 00:44:10,200 --> 00:44:11,520 The next thing we need to do is 1094 00:44:11,520 --> 00:44:12,680 we're going to go to the options menu. 1095 00:44:12,880 --> 00:44:15,360 We're going to deselect, melt 1096 00:44:16,760 --> 00:44:17,560 the stub 1097 00:44:17,560 --> 00:44:18,360 after execution. 1098 00:44:19,100 --> 00:44:20,440 We're just going to keep netcat 1099 00:44:21,400 --> 00:44:22,860 running there. We're just going to keep it. 1100 00:44:22,900 --> 00:44:24,780 We're not going to erase it afterwards. 1101 00:44:25,120 --> 00:44:27,200 We're also going to change the icon of our new 1102 00:44:27,200 --> 00:44:29,300 setup.exe so it looks like 1103 00:44:29,300 --> 00:44:31,340 a legitimate setup.exe file. 1104 00:44:32,680 --> 00:44:33,380 Now we're going to 1105 00:44:33,380 --> 00:44:35,300 go ahead and click the build button. 1106 00:44:36,380 --> 00:44:37,420 We're going to put it into 1107 00:44:37,420 --> 00:44:39,440 CEH practice test. We're just going to call it 1108 00:44:40,700 --> 00:44:41,500 setup.exe. 1109 00:44:42,900 --> 00:44:44,020 We have until 1110 00:44:44,020 --> 00:44:44,640 1150. 1111 00:44:48,600 --> 00:44:49,660 Thank you though. 1112 00:44:51,120 --> 00:44:52,240 We're going to go ahead and build 1113 00:44:52,240 --> 00:44:56,640 the setup.exe. 1114 00:44:58,920 --> 00:45:01,300 Now we have a new setup.exe that when ran 1115 00:45:01,300 --> 00:45:03,440 is going to actually call z.exe 1116 00:45:03,440 --> 00:45:05,480 and do the original installation of the practice test. 1117 00:45:05,900 --> 00:45:07,560 It's also going to load netcat. 1118 00:45:08,100 --> 00:45:09,540 In order to get this ready, 1119 00:45:09,640 --> 00:45:10,940 we need to repackage this. 1120 00:45:11,520 --> 00:45:12,340 So that it looks like 1121 00:45:14,020 --> 00:45:15,260 one self-extracting 1122 00:45:15,260 --> 00:45:15,820 executable. 1123 00:45:16,600 --> 00:45:18,580 What Dave's going to do now, he's going to do it kind of quickly, 1124 00:45:18,740 --> 00:45:20,520 but he's going to be going through and he's going to 1125 00:45:20,520 --> 00:45:22,580 go into Winzip, create a zip file, 1126 00:45:22,780 --> 00:45:24,480 then we're going to create a self-extracting archive 1127 00:45:25,340 --> 00:45:26,020 using Winzip. 1128 00:45:26,700 --> 00:45:28,240 We're using an evaluation version. 1129 00:45:28,400 --> 00:45:29,440 We're still evaluating it. 1130 00:45:30,200 --> 00:45:32,340 Love to hear your input. If it's a good software to get, 1131 00:45:33,340 --> 00:45:35,040 eventually we'll make a decision there. 1132 00:45:40,700 --> 00:45:41,900 So he's just going through 1133 00:45:41,900 --> 00:45:42,880 and just creating a new 1134 00:45:46,640 --> 00:45:48,000 calling setup.exe. 1135 00:45:50,660 --> 00:45:52,040 He's going through this kind of quickly, 1136 00:45:52,140 --> 00:45:54,020 but there we go. 1137 00:45:58,700 --> 00:45:59,380 Cancel out of that. 1138 00:46:05,140 --> 00:46:05,620 . 1139 00:46:15,060 --> 00:46:16,380 Alright, so now we got our 1140 00:46:17,020 --> 00:46:17,940 self-extracting archive. 1141 00:46:18,460 --> 00:46:20,860 He's then going to put that back in the folder 1142 00:46:20,860 --> 00:46:22,880 for www.trustme.com. 1143 00:46:33,280 --> 00:46:35,000 And we're going to rename it 1144 00:46:35,040 --> 00:46:36,820 we're going to get rid of the old CEH 1145 00:46:36,820 --> 00:46:38,440 and rename this one to 1146 00:46:38,870 --> 00:46:39,700 ceh.exe. 1147 00:46:45,420 --> 00:46:46,900 So now what we need to do is take 1148 00:46:46,900 --> 00:46:48,900 these files and host it. We're already 1149 00:46:48,900 --> 00:46:50,320 running IIS on this box. 1150 00:46:50,560 --> 00:46:52,760 So now we're just going to copy these into 1151 00:46:52,760 --> 00:46:54,700 the cinetpub wwwroot 1152 00:46:55,720 --> 00:46:56,920 folder so we can begin 1153 00:46:56,920 --> 00:46:58,780 hosting this website. 1154 00:46:59,820 --> 00:47:00,240 Alright. 1155 00:47:00,640 --> 00:47:02,880 So just to recap, what we've done so far is we've 1156 00:47:02,880 --> 00:47:04,940 copied down trustme.com, we've copied down the 1157 00:47:05,040 --> 00:47:06,820 practice test software, we've then created 1158 00:47:06,820 --> 00:47:08,820 a new setup.exe that would bind 1159 00:47:08,820 --> 00:47:10,420 netcat with this 1160 00:47:11,040 --> 00:47:12,940 with the practice 1161 00:47:12,940 --> 00:47:14,980 test software. We then put it into the 1162 00:47:14,980 --> 00:47:16,780 cinetpub directory so we're going to begin hosting 1163 00:47:16,780 --> 00:47:18,940 this website. I'm now going to draw 1164 00:47:18,940 --> 00:47:20,720 your attention over to the victim machine 1165 00:47:21,440 --> 00:47:22,380 over on your 1166 00:47:22,940 --> 00:47:25,040 left. Now over on 1167 00:47:25,040 --> 00:47:27,060 the victim machine, we've already sent an email 1168 00:47:27,060 --> 00:47:28,900 to the victim, so Dave if you want to 1169 00:47:28,900 --> 00:47:30,040 open up Outlook Express 1170 00:47:32,100 --> 00:47:33,000 check a look at 1171 00:47:33,000 --> 00:47:35,020 our email here. Now the email message, we've 1172 00:47:35,040 --> 00:47:35,920 got a message from Bill Gates 1173 00:47:35,920 --> 00:47:38,500 and the email message says 1174 00:47:38,500 --> 00:47:40,320 congratulations on winning the new certified 1175 00:47:40,320 --> 00:47:42,700 ethical hacker practice test from the training 1176 00:47:42,700 --> 00:47:44,820 camp. Now one of the 1177 00:47:44,820 --> 00:47:46,060 key signs that you're 1178 00:47:46,060 --> 00:47:48,860 under a phishing 1179 00:47:48,860 --> 00:47:50,360 scam is 1180 00:47:50,900 --> 00:47:51,480 grammatical errors. 1181 00:47:52,840 --> 00:47:55,080 So if you can spot some grammatical 1182 00:47:55,080 --> 00:47:56,720 errors in there, we are the 1183 00:47:56,720 --> 00:47:58,520 please to H-E-R-E. 1184 00:47:58,760 --> 00:48:00,600 It's usually a sign that you're under a phishing 1185 00:48:00,600 --> 00:48:00,880 scam. 1186 00:48:03,040 --> 00:48:04,760 So they are getting better. 1187 00:48:05,040 --> 00:48:07,080 They're learning about the new thing called spell check. 1188 00:48:07,960 --> 00:48:08,940 It's a great new 1189 00:48:08,940 --> 00:48:11,060 technology. But what you'll see 1190 00:48:11,060 --> 00:48:12,860 is that it says go ahead and click on 1191 00:48:12,860 --> 00:48:14,340 this at trustme.com. 1192 00:48:15,040 --> 00:48:16,860 Now we did a very simple phishing scam. 1193 00:48:17,180 --> 00:48:18,920 If you take one of our classes 1194 00:48:18,920 --> 00:48:20,820 we show you much more advanced ways to be able to 1195 00:48:20,820 --> 00:48:22,920 hide what the real website is that you're going to. 1196 00:48:23,220 --> 00:48:24,980 But here at trustme.com 1197 00:48:24,980 --> 00:48:26,760 and I don't know if you can see it down the lower left 1198 00:48:26,760 --> 00:48:28,940 but it does show you what the real IP address 1199 00:48:28,940 --> 00:48:30,240 is that you're going to. 1200 00:48:30,920 --> 00:48:32,900 And Dave if you want to go ahead and pull up the 1201 00:48:32,900 --> 00:48:34,340 source of that email. 1202 00:48:35,520 --> 00:48:36,560 We're going to properties. 1203 00:48:36,900 --> 00:48:38,120 We're going to message source. 1204 00:48:39,520 --> 00:48:40,900 And here we can look at the HTML 1205 00:48:40,900 --> 00:48:41,900 source for the file. 1206 00:48:42,460 --> 00:48:44,900 And you'll see that while it says 1207 00:48:44,900 --> 00:48:46,940 trustme.com what you're really doing is going 1208 00:48:46,940 --> 00:48:49,080 to in this case 10.1.1.3 1209 00:48:49,080 --> 00:48:50,140 is it? Yeah 3. 1210 00:48:50,420 --> 00:48:51,900 Which is the attacker machine. 1211 00:48:52,940 --> 00:48:55,300 So the user thinks they're going to trustme.com 1212 00:48:55,300 --> 00:48:56,880 but they're really going to the attacker 1213 00:48:56,880 --> 00:48:58,860 machine. Let's close 1214 00:48:58,860 --> 00:49:00,960 out of that. Well if 1215 00:49:00,960 --> 00:49:02,860 I'm the victim I say hey cool I got some 1216 00:49:02,860 --> 00:49:04,940 free practice test software. Let me go ahead 1217 00:49:05,040 --> 00:49:05,700 and click on it. 1218 00:49:07,600 --> 00:49:08,820 Pull up the web page 1219 00:49:08,820 --> 00:49:10,760 and there is our website. 1220 00:49:11,100 --> 00:49:12,820 Now this is actually on the attacker 1221 00:49:12,820 --> 00:49:14,680 machine. But the user will think 1222 00:49:14,680 --> 00:49:16,400 they're on trustme.com. 1223 00:49:16,700 --> 00:49:18,600 Now in this case it's just showing an IP address 1224 00:49:18,600 --> 00:49:20,900 but a lot of unsuspecting users will see an 1225 00:49:20,900 --> 00:49:22,880 IP address and not really think twice about it. 1226 00:49:23,440 --> 00:49:24,960 So at this point Dave go ahead 1227 00:49:24,960 --> 00:49:26,360 and let's just go ahead and run 1228 00:49:28,360 --> 00:49:28,840 our 1229 00:49:28,840 --> 00:49:30,740 new executable. You saw 1230 00:49:30,740 --> 00:49:32,940 very quickly you saw that it was extracting 1231 00:49:32,940 --> 00:49:34,820 the archive. It's now 1232 00:49:35,040 --> 00:49:36,020 going through. It looks like it's 1233 00:49:36,760 --> 00:49:38,160 installing the practice test. 1234 00:49:39,140 --> 00:49:41,040 Pretty cool we got a new practice test. 1235 00:49:41,300 --> 00:49:42,760 I like that. Now 1236 00:49:44,660 --> 00:49:45,700 it works. 1237 00:49:46,940 --> 00:49:48,820 Now Dave if you would go out to a command 1238 00:49:48,820 --> 00:49:49,160 prompt 1239 00:49:50,620 --> 00:49:52,360 and run netstat dash 1240 00:49:52,920 --> 00:49:54,920 a. What netstat dash a will 1241 00:49:54,920 --> 00:49:56,840 do is tell you what ports are 1242 00:49:56,840 --> 00:49:58,700 listening and sure enough we have port 1243 00:49:58,700 --> 00:50:00,880 50 listening which is used 1244 00:50:00,880 --> 00:50:02,980 by netcat. So at this point 1245 00:50:02,980 --> 00:50:05,020 I just installed a practice test software but in the 1246 00:50:05,040 --> 00:50:06,420 background I installed netcat. 1247 00:50:09,860 --> 00:50:11,000 So now we're going to go back 1248 00:50:11,000 --> 00:50:12,980 to the attacker machine so draw your 1249 00:50:12,980 --> 00:50:14,120 eyes over here to your right. 1250 00:50:14,620 --> 00:50:17,020 On the attacker machine we can now use netcat 1251 00:50:17,020 --> 00:50:18,320 to get into the victim machine 1252 00:50:18,860 --> 00:50:21,000 and download some packet capturing 1253 00:50:21,000 --> 00:50:22,780 software and begin capturing traffic. 1254 00:50:24,020 --> 00:50:24,460 So 1255 00:50:25,040 --> 00:50:26,900 he's using putty. You can use really whatever 1256 00:50:26,900 --> 00:50:28,940 telnet application that you want to use. 1257 00:50:29,140 --> 00:50:31,060 Dave just happens to be using putty over here 1258 00:50:31,060 --> 00:50:33,020 and he's already got it preconfigured 1259 00:50:33,020 --> 00:50:33,980 to go to the victim machine. 1260 00:50:35,500 --> 00:50:36,560 So we'll connect. 1261 00:50:36,820 --> 00:50:38,980 Now at this point even though he's 1262 00:50:38,980 --> 00:50:40,340 on the attacker machine he's 1263 00:50:40,820 --> 00:50:42,780 telnetted into the victim machine. 1264 00:50:43,140 --> 00:50:44,900 And just to verify that if you want to type 1265 00:50:44,900 --> 00:50:45,640 the word hostname 1266 00:50:46,620 --> 00:50:48,160 and by typing hostname 1267 00:50:48,860 --> 00:50:50,920 sure enough we are now on the victim machine. 1268 00:50:52,400 --> 00:50:52,960 Question? 1269 00:51:01,500 --> 00:51:02,620 Yeah, yeah 1270 00:51:02,620 --> 00:51:03,900 exactly. You 1271 00:51:06,540 --> 00:51:07,340 have just 1272 00:51:07,340 --> 00:51:08,660 put the victim behind a firewall. 1273 00:51:08,800 --> 00:51:10,580 Would you want to use the netcat over here 1274 00:51:10,580 --> 00:51:12,720 and just blow the main shell out? 1275 00:51:13,080 --> 00:51:14,360 Yeah, let me just 1276 00:51:15,040 --> 00:51:16,900 mention there are comments 1277 00:51:16,900 --> 00:51:18,880 there. One of the comments was how do you 1278 00:51:18,880 --> 00:51:20,560 get what the victim's IP address is? 1279 00:51:21,140 --> 00:51:22,720 Well you can always look in the 1280 00:51:22,720 --> 00:51:24,220 web logs. That's one method. 1281 00:51:24,660 --> 00:51:26,660 And then this other gentleman mentioned 1282 00:51:26,660 --> 00:51:28,920 well you can also do netcat the reverse way. 1283 00:51:29,420 --> 00:51:30,960 Which would also be a 1284 00:51:30,960 --> 00:51:32,980 might even be a more efficient way 1285 00:51:32,980 --> 00:51:34,040 so that you can 1286 00:51:35,500 --> 00:51:36,380 get a 1287 00:51:37,260 --> 00:51:38,040 reverse shell. 1288 00:51:38,340 --> 00:51:39,900 There are many, many ways to do it. 1289 00:51:46,120 --> 00:51:48,620 Yeah, now also 1290 00:51:48,620 --> 00:51:50,840 we also chose port 50. Chances are a lot of 1291 00:51:50,840 --> 00:51:53,140 firewalls are going to block incoming traffic from port 50. 1292 00:51:53,280 --> 00:51:54,800 Much more common port might be 1293 00:51:55,580 --> 00:51:56,820 TCP port 53 1294 00:51:56,820 --> 00:51:58,820 inbound because a lot of firewalls 1295 00:51:58,820 --> 00:52:00,860 do have that open to be able to do zone transfers. 1296 00:52:01,320 --> 00:52:03,020 So a lot of different ways to do this. 1297 00:52:03,320 --> 00:52:04,240 We're keeping it 1298 00:52:05,040 --> 00:52:06,000 relatively simple for the demo. 1299 00:52:06,320 --> 00:52:07,600 Because what we really want to show is 1300 00:52:07,600 --> 00:52:10,140 more of the packet capturing. 1301 00:52:11,360 --> 00:52:12,880 Alright, so here we're on the remote 1302 00:52:12,880 --> 00:52:13,180 machine. 1303 00:52:14,440 --> 00:52:15,540 And at this point 1304 00:52:17,180 --> 00:52:18,180 we're going to do the 1305 00:52:19,160 --> 00:52:19,600 TFTP. 1306 00:52:23,380 --> 00:52:24,800 So we're launching a TFTP 1307 00:52:24,800 --> 00:52:26,640 server. It's Trivial File Transfer Protocol. 1308 00:52:27,740 --> 00:52:28,700 We're going to use that 1309 00:52:28,700 --> 00:52:31,020 to be able to download the remote Trojan. 1310 00:52:31,940 --> 00:52:32,900 And what Dave's 1311 00:52:32,900 --> 00:52:34,140 going to do is do a TFTP. 1312 00:52:35,040 --> 00:52:36,400 Actually, yeah, we'll go to the root. 1313 00:52:37,880 --> 00:52:38,840 TFTP-i 1314 00:52:38,840 --> 00:52:39,940 to get a binary file. 1315 00:52:40,440 --> 00:52:41,460 We're going to do a 1316 00:52:43,300 --> 00:52:44,120 get request 1317 00:52:46,860 --> 00:52:47,820 windump.exe 1318 00:52:47,820 --> 00:52:48,540 And of course this is 1319 00:52:49,420 --> 00:52:50,360 expecting that 1320 00:52:50,360 --> 00:52:52,640 the firewall will allow you to 1321 00:52:52,640 --> 00:52:53,920 TFTP outbound. 1322 00:52:54,380 --> 00:52:56,200 So we're going to get windump. 1323 00:52:56,940 --> 00:52:58,360 And sure enough the transfer 1324 00:52:58,880 --> 00:53:01,120 was successful. We see it both in our 1325 00:53:01,120 --> 00:53:02,900 telnet window as well as 1326 00:53:02,900 --> 00:53:04,940 up top in our telnet. 1327 00:53:05,040 --> 00:53:06,720 We were able to transfer windump. 1328 00:53:06,880 --> 00:53:08,180 Now that we have windump transferred 1329 00:53:08,900 --> 00:53:09,580 we can do 1330 00:53:10,980 --> 00:53:11,780 windump-d 1331 00:53:12,260 --> 00:53:14,500 that will show us what interfaces we have 1332 00:53:14,500 --> 00:53:15,300 on our victim machine. 1333 00:53:16,520 --> 00:53:17,580 We see that we have 1334 00:53:17,580 --> 00:53:19,940 I don't know if you can pull that up a little bit there Dave. 1335 00:53:21,020 --> 00:53:23,060 So we have windump-d 1336 00:53:23,060 --> 00:53:24,140 that shows us our interfaces. 1337 00:53:24,260 --> 00:53:25,160 We have a dialup adapter 1338 00:53:25,640 --> 00:53:26,460 and we have 1339 00:53:26,460 --> 00:53:30,320 our network adapter. 1340 00:53:30,740 --> 00:53:32,020 We're going to use the second one. 1341 00:53:32,380 --> 00:53:35,020 So we're going to do windump-i 1342 00:53:35,040 --> 00:53:36,440 for interface 1343 00:53:36,920 --> 00:53:39,080 two for the network adapter 1344 00:53:39,560 --> 00:53:40,880 we're going to do dash-s 1345 00:53:40,880 --> 00:53:42,900 zero. Now what dash-s zero 1346 00:53:42,900 --> 00:53:44,460 is going to do is that's going to specify 1347 00:53:44,460 --> 00:53:46,940 what length or how much of the packet we want to 1348 00:53:46,940 --> 00:53:47,280 capture. 1349 00:53:48,740 --> 00:53:50,600 It's somewhat counterintuitive because 1350 00:53:50,600 --> 00:53:52,700 zero you would think you don't want to capture 1351 00:53:52,700 --> 00:53:54,520 any of the packet. But it's actually 1352 00:53:54,950 --> 00:53:56,900 whenever you specify zero as your length 1353 00:53:56,900 --> 00:53:58,940 it's going to end up capturing the entire packet. 1354 00:53:59,080 --> 00:54:00,740 We want to capture the entire packet because 1355 00:54:00,740 --> 00:54:02,040 we want to later reassemble it. 1356 00:54:02,520 --> 00:54:04,020 We're then going to say dash-i 1357 00:54:06,080 --> 00:54:07,040 I'm sorry dash-c 1358 00:54:08,220 --> 00:54:09,220 and we'll just say 1359 00:54:09,220 --> 00:54:10,880 200. Dash-c is how many 1360 00:54:10,880 --> 00:54:12,000 packets do you want to capture. 1361 00:54:12,980 --> 00:54:14,820 So really you could play around with this 1362 00:54:14,820 --> 00:54:16,700 just so in a basic example here 1363 00:54:16,700 --> 00:54:17,820 we'll just say 200 packets. 1364 00:54:18,900 --> 00:54:20,340 And then we're going to do dash-w 1365 00:54:20,340 --> 00:54:22,260 so we can write this to a log file. 1366 00:54:22,460 --> 00:54:24,080 We'll call it log.txt 1367 00:54:25,500 --> 00:54:26,640 We'll go ahead and run that. 1368 00:54:27,240 --> 00:54:29,220 Now we need to generate some traffic. 1369 00:54:29,640 --> 00:54:31,000 So over on the victim machine 1370 00:54:31,000 --> 00:54:31,900 over on your left 1371 00:54:32,520 --> 00:54:35,020 Dave's going to pull up a web browser. We're just going to go to another one 1372 00:54:35,040 --> 00:54:37,240 say victim14.com 1373 00:54:38,440 --> 00:54:39,000 And 1374 00:54:39,000 --> 00:54:41,120 very simple page here 1375 00:54:41,120 --> 00:54:43,040 since we're going to be reassembling 1376 00:54:43,040 --> 00:54:45,060 a graphic, it's just a page with a graphic on it 1377 00:54:45,060 --> 00:54:46,720 he'll refresh a few times 1378 00:54:46,720 --> 00:54:49,000 to try to get 200 packets. 1379 00:54:49,500 --> 00:54:50,280 And sure enough 1380 00:54:50,280 --> 00:54:52,160 after he refreshed a few times 1381 00:54:52,160 --> 00:54:54,800 we got 200 packets captured. 1382 00:54:55,480 --> 00:54:57,160 So WinDump has now stopped. 1383 00:54:57,380 --> 00:54:58,840 Now that WinDump has stopped 1384 00:54:58,840 --> 00:55:00,920 we can now send that 1385 00:55:00,920 --> 00:55:02,820 log file back to the attacker machine. 1386 00:55:04,460 --> 00:55:05,020 So 1387 00:55:05,800 --> 00:55:06,760 we'll do a 1388 00:55:07,420 --> 00:55:07,940 tftp 1389 00:55:07,940 --> 00:55:10,440 and we're going to 1390 00:55:10,900 --> 00:55:13,000 specify the IP address of our tftp server 1391 00:55:13,000 --> 00:55:15,180 and then we're going to put that file. 1392 00:55:15,780 --> 00:55:16,800 So we're actually 1393 00:55:16,800 --> 00:55:18,560 controlling the victim machine right now 1394 00:55:18,560 --> 00:55:20,960 and we're putting our log file back on 1395 00:55:20,960 --> 00:55:21,660 the attacker machine. 1396 00:55:23,660 --> 00:55:24,880 Now we see the transfer 1397 00:55:24,880 --> 00:55:25,620 was successful. 1398 00:55:27,540 --> 00:55:28,960 Now what we're going to do is 1399 00:55:28,960 --> 00:55:30,260 we're going to open up 1400 00:55:33,080 --> 00:55:34,820 actually let's first show that 1401 00:55:35,040 --> 00:55:37,080 the log.txt file is there. 1402 00:55:38,540 --> 00:55:38,960 And 1403 00:55:39,440 --> 00:55:40,040 it's there. 1404 00:55:40,860 --> 00:55:42,720 So what we're going to do is we're going to open up 1405 00:55:42,720 --> 00:55:43,980 and within 1406 00:55:45,960 --> 00:55:46,380 Wireshark 1407 00:55:46,380 --> 00:55:47,860 or ethereal 1408 00:55:47,860 --> 00:55:50,440 to be able to show you this traffic 1409 00:55:50,440 --> 00:55:51,500 that we were able to capture. 1410 00:55:54,820 --> 00:55:56,860 And we're going to go ahead and be reassembling 1411 00:55:56,860 --> 00:55:58,260 the graphic. I'm actually going to ask Dave 1412 00:55:58,260 --> 00:55:59,440 to kind of take over from here. 1413 00:56:00,760 --> 00:56:02,680 He's really good at reassembling 1414 00:56:03,860 --> 00:56:04,840 various binaries and 1415 00:56:05,040 --> 00:56:06,440 traffic. So Dave you want to take it from here 1416 00:56:06,440 --> 00:56:07,900 and kind of walk through what you're doing? 1417 00:56:08,820 --> 00:56:10,940 Now that I have the log file 1418 00:56:10,940 --> 00:56:12,780 there, I'm going to open that up. 1419 00:56:13,100 --> 00:56:14,540 So I'm going to go down to all files 1420 00:56:14,540 --> 00:56:16,640 because it's a text file. Scroll over to 1421 00:56:16,640 --> 00:56:17,740 log file. 1422 00:56:22,000 --> 00:56:22,860 So now we have 1423 00:56:22,860 --> 00:56:24,880 the full traffic that was captured on the other 1424 00:56:24,880 --> 00:56:26,880 machine. You can see Windows update was trying to 1425 00:56:26,880 --> 00:56:27,500 run over there. 1426 00:56:28,960 --> 00:56:30,800 I'm just going to search for http traffic 1427 00:56:30,800 --> 00:56:32,480 since we know that 1428 00:56:32,480 --> 00:56:34,820 we just wanted to see what they were checking out on the web. 1429 00:56:35,040 --> 00:56:36,860 So we're going to put in http for 1430 00:56:36,860 --> 00:56:38,120 a filter. Just hit enter. 1431 00:56:38,960 --> 00:56:40,400 Now it pops up all the 1432 00:56:40,910 --> 00:56:42,920 http. You're going to see a lot of the same copy 1433 00:56:42,920 --> 00:56:44,860 because I refreshed the same image multiple 1434 00:56:44,860 --> 00:56:45,300 times. 1435 00:56:46,700 --> 00:56:47,400 Here it's 1436 00:56:50,120 --> 00:56:52,120 we go to file tcp stream. 1437 00:56:52,700 --> 00:56:54,900 You're going to see the get headers 1438 00:56:54,900 --> 00:56:56,160 and then the receive headers. 1439 00:56:56,680 --> 00:56:58,880 If we start scrolling down here, this is 1440 00:56:58,880 --> 00:57:00,900 the jpeg. This is what a jpeg 1441 00:57:00,900 --> 00:57:02,180 looks like in binary form. 1442 00:57:05,040 --> 00:57:06,540 It doesn't look like much right now 1443 00:57:06,540 --> 00:57:08,820 unless you're really 1444 00:57:08,820 --> 00:57:10,620 geeky you won't be able to see what that image is. 1445 00:57:12,140 --> 00:57:13,080 So what we 1446 00:57:13,080 --> 00:57:14,340 want to do is we want to reconstruct that. 1447 00:57:16,160 --> 00:57:17,040 First we're going to 1448 00:57:17,040 --> 00:57:18,200 just check out the conversation 1449 00:57:18,200 --> 00:57:20,860 that we received, that we captured. 1450 00:57:20,980 --> 00:57:22,680 We don't care what was sent from this machine 1451 00:57:22,680 --> 00:57:24,560 to this server. We just want to get the other 1452 00:57:25,380 --> 00:57:25,780 information. 1453 00:57:26,840 --> 00:57:28,840 Now in ftp this is really easy. 1454 00:57:29,120 --> 00:57:30,900 Doing in ftp you don't 1455 00:57:30,900 --> 00:57:32,000 have any of this stuff here. 1456 00:57:32,380 --> 00:57:33,780 This is the http headers. 1457 00:57:35,040 --> 00:57:37,100 We'll mess up reconstructing 1458 00:57:37,100 --> 00:57:37,600 the jpeg. 1459 00:57:38,260 --> 00:57:40,720 Normally in an ftp we just do save as 1460 00:57:40,720 --> 00:57:43,100 select raw and then name it 1461 00:57:43,100 --> 00:57:45,000 test.jpeg and then you'll be able to 1462 00:57:45,000 --> 00:57:45,980 open it up no problem. 1463 00:57:47,120 --> 00:57:48,700 Since they're using the web 1464 00:57:48,700 --> 00:57:50,660 and that's usually what most users are going to be using 1465 00:57:50,660 --> 00:57:51,700 that you're going to want to spy on. 1466 00:57:52,060 --> 00:57:54,560 We're going to go to raw, save as 1467 00:57:55,680 --> 00:57:56,740 save it to the desktop 1468 00:58:03,160 --> 00:58:03,960 test.jpeg 1469 00:58:05,040 --> 00:58:06,860 Now we're going to leave this open. It'll help us 1470 00:58:06,860 --> 00:58:08,660 reconstruct the binary in a minute here. 1471 00:58:09,540 --> 00:58:10,860 We're going to go over to the desktop. 1472 00:58:11,540 --> 00:58:13,000 Now we have test.jpeg. 1473 00:58:13,220 --> 00:58:14,960 Now this won't open because 1474 00:58:14,960 --> 00:58:16,560 all the headers are messed up. 1475 00:58:16,680 --> 00:58:18,400 There's http headers in there and then 1476 00:58:18,400 --> 00:58:20,540 they can't see what the actual image is. 1477 00:58:20,960 --> 00:58:22,320 So what we're going to do is 1478 00:58:23,180 --> 00:58:24,400 we're going to open this up 1479 00:58:24,960 --> 00:58:26,960 with a hex editor. I'm going to use winhex. 1480 00:58:30,160 --> 00:58:30,760 So now 1481 00:58:30,760 --> 00:58:32,780 you can see here the http headers. 1482 00:58:33,700 --> 00:58:35,020 Well we want to find out where 1483 00:58:35,040 --> 00:58:35,780 jpeg starts. 1484 00:58:37,040 --> 00:58:38,360 So you can see here we have 1485 00:58:39,000 --> 00:58:40,620 jfif. That's the first recognizable 1486 00:58:40,620 --> 00:58:42,220 character that's printed out there. 1487 00:58:42,540 --> 00:58:44,620 But you can see that there's another couple characters 1488 00:58:44,620 --> 00:58:46,720 here that aren't printable. 1489 00:58:47,200 --> 00:58:48,760 So what we're going to do is we're going to come here 1490 00:58:48,760 --> 00:58:49,600 and we're going to count over. 1491 00:58:49,760 --> 00:58:51,880 One, two, three, four, five, six. 1492 00:58:52,240 --> 00:58:55,100 So we know we're six over from the first jpeg 1493 00:58:55,700 --> 00:58:56,660 readable characters. 1494 00:58:58,980 --> 00:59:00,140 So here's a j. 1495 00:59:00,840 --> 00:59:02,940 One, two, three, four, five, six. 1496 00:59:03,500 --> 00:59:04,940 So this is the very 1497 00:59:05,040 --> 00:59:06,320 start of the jpeg header. 1498 00:59:06,680 --> 00:59:08,160 Once you start doing some of these 1499 00:59:09,220 --> 00:59:10,720 reassemblies you'll see that they're always the same. 1500 00:59:10,920 --> 00:59:12,700 So all jpegs are going to have that as the header. 1501 00:59:12,760 --> 00:59:14,340 All exes, all WinZip. 1502 00:59:15,040 --> 00:59:16,940 So we're going to get rid of all this other junk 1503 00:59:16,940 --> 00:59:17,640 in front of it. 1504 00:59:18,220 --> 00:59:20,020 So we're going to go up and highlight all of it. 1505 00:59:23,540 --> 00:59:24,680 Make sure you get everything. 1506 00:59:24,940 --> 00:59:26,620 You forget a bit and it's not going to 1507 00:59:26,620 --> 00:59:28,980 reconstruct. So we want to get rid of it. 1508 00:59:29,120 --> 00:59:30,980 We're going to right click, go to edit, 1509 00:59:31,600 --> 00:59:32,280 go to remove. 1510 00:59:33,020 --> 00:59:34,720 It's going to ask if I want to remove it. 1511 00:59:35,040 --> 00:59:35,500 We're going to say yes. 1512 00:59:36,140 --> 00:59:38,360 So now the top of our jpeg header is okay. 1513 00:59:39,340 --> 00:59:40,940 But we'll notice that since 1514 00:59:40,940 --> 00:59:42,540 I refreshed a bunch of times in that 1515 00:59:42,540 --> 00:59:44,800 follow TCP stream, there's also 1516 00:59:44,800 --> 00:59:46,900 a couple other HTTP headers that got 1517 00:59:46,900 --> 00:59:48,840 thrown in there. So we're going to want to clean 1518 00:59:48,840 --> 00:59:49,540 them out as well. 1519 00:59:52,800 --> 00:59:54,380 Sometimes a scroll doesn't work that well 1520 00:59:54,380 --> 00:59:55,220 if you use a mouse. 1521 01:00:01,740 --> 01:00:03,000 So we just want to make sure 1522 01:00:03,000 --> 01:00:05,020 we go all the way to the end, get every bit in there. 1523 01:00:06,320 --> 01:00:06,720 Edit. 1524 01:00:07,360 --> 01:00:07,760 Remove. 1525 01:00:09,100 --> 01:00:10,820 Yes. So now this should be 1526 01:00:11,720 --> 01:00:12,820 a full jpeg. 1527 01:00:14,020 --> 01:00:14,940 Now we're going to just 1528 01:00:14,940 --> 01:00:16,820 save it. We're going to re-save it as 1529 01:00:16,820 --> 01:00:17,780 test.jpeg. 1530 01:00:18,580 --> 01:00:19,820 Head back down to the desktop. 1531 01:00:21,300 --> 01:00:22,780 Open it up. And there's the 1532 01:00:22,780 --> 01:00:24,920 jpeg the user was using. Now we just 1533 01:00:24,920 --> 01:00:26,860 did it with a jpeg. That's fairly easy. 1534 01:00:27,060 --> 01:00:29,080 But the main thing is if a user 1535 01:00:29,080 --> 01:00:30,760 is downloading a program, an exe 1536 01:00:30,760 --> 01:00:32,980 or anything else like that from their intranet, 1537 01:00:33,060 --> 01:00:34,700 we're going to be able to capture that and then 1538 01:00:35,040 --> 01:00:37,180 assemble it. Using a jpeg 1539 01:00:37,180 --> 01:00:38,860 is fairly easy to use using DriftNet 1540 01:00:38,860 --> 01:00:40,860 or other programs, but the exes is 1541 01:00:40,860 --> 01:00:41,820 really where it gets kind of cool. 1542 01:00:43,840 --> 01:00:44,200 Awesome. 1543 01:00:45,000 --> 01:00:46,560 Dave, if you want to try to get at the 1544 01:00:47,080 --> 01:00:48,960 Linux box showing up there, we can actually show 1545 01:00:48,960 --> 01:00:50,500 you DriftNet, if we can get that up and 1546 01:00:50,500 --> 01:00:51,000 working. 1547 01:00:52,780 --> 01:00:54,980 Just to reiterate what he was mentioning there 1548 01:00:54,980 --> 01:00:57,020 is that this works not just with jpegs, it works 1549 01:00:57,020 --> 01:00:58,600 with exes, it works with 1550 01:00:58,600 --> 01:01:01,060 Word documents, anything that somebody might be 1551 01:01:01,060 --> 01:01:02,920 transferring across a network. You just 1552 01:01:02,920 --> 01:01:04,960 have to capture it, figure out where the header 1553 01:01:05,040 --> 01:01:06,760 is, start, figure out if there's any 1554 01:01:06,760 --> 01:01:08,980 footers, delete those, and 1555 01:01:08,980 --> 01:01:11,100 then within a hex editor, 1556 01:01:11,280 --> 01:01:12,860 and then you have the reassembled file. 1557 01:01:14,560 --> 01:01:15,000 So 1558 01:01:15,000 --> 01:01:15,840 here we have our 1559 01:01:16,820 --> 01:01:18,280 we have a Linux box 1560 01:01:18,840 --> 01:01:20,840 here where it's actually running a security 1561 01:01:20,840 --> 01:01:22,800 auditor, which is one of several 1562 01:01:22,800 --> 01:01:24,740 CDs that we give out for a certified 1563 01:01:24,740 --> 01:01:26,540 ethical hacking class. So we have about 1564 01:01:27,240 --> 01:01:28,980 over a thousand software tools that 1565 01:01:28,980 --> 01:01:29,860 we give you in that class. 1566 01:01:30,900 --> 01:01:31,700 We got it running? 1567 01:01:32,500 --> 01:01:32,940 Alright. 1568 01:01:35,040 --> 01:01:36,720 So what Dave's going to do now is he's going to show you 1569 01:01:36,720 --> 01:01:38,880 DriftNet. DriftNet does the exact same 1570 01:01:38,880 --> 01:01:40,340 thing as far as the jpeg reconstruction, 1571 01:01:40,800 --> 01:01:42,740 but it does it as you're browsing the web. 1572 01:01:43,000 --> 01:01:45,000 So it's just one other 1573 01:01:45,000 --> 01:01:46,920 tool that you can show that you can just do this real 1574 01:01:46,920 --> 01:01:48,240 time without having to reassemble. 1575 01:01:51,140 --> 01:01:52,740 So Dave's going to go on our 1576 01:01:53,160 --> 01:01:54,880 Linux box, just type DriftNet. 1577 01:01:55,820 --> 01:01:57,060 We'll see if we can get this 1578 01:01:57,500 --> 01:01:58,480 demo to work here. 1579 01:01:59,240 --> 01:02:00,500 DriftNet is now running. 1580 01:02:05,100 --> 01:02:06,940 You got to admit for a Linux tool that's 1581 01:02:06,940 --> 01:02:08,880 probably one of the easiest commands 1582 01:02:08,880 --> 01:02:11,080 to enter. Just DriftNet. 1583 01:02:11,920 --> 01:02:13,000 And then over on 1584 01:02:13,000 --> 01:02:13,220 the 1585 01:02:15,020 --> 01:02:16,980 victim machine, he just went to that 1586 01:02:16,980 --> 01:02:18,740 same web page, pulled up that 1587 01:02:18,740 --> 01:02:20,760 graphic, and DriftNet in real time 1588 01:02:20,760 --> 01:02:22,220 was able to reconstruct the graphic. 1589 01:02:22,680 --> 01:02:24,800 It is open source, so 1590 01:02:24,800 --> 01:02:26,780 you can take a look at the source code 1591 01:02:26,780 --> 01:02:28,780 see how the author did it. 1592 01:02:28,960 --> 01:02:30,900 But it shows you that it is possible 1593 01:02:30,900 --> 01:02:32,940 just to do all of this real time without having 1594 01:02:32,940 --> 01:02:35,020 to use a hex editor. The real cool thing about this 1595 01:02:35,040 --> 01:02:36,720 is you sit on someone else's wireless network 1596 01:02:36,720 --> 01:02:38,780 and you see bits going by, big deal. But you 1597 01:02:38,780 --> 01:02:40,800 actually want to see where they're going. So now you can 1598 01:02:40,800 --> 01:02:42,780 actually see what images, what web pages they're hitting. 1599 01:02:43,080 --> 01:02:45,020 And it gets you a little closer 1600 01:02:45,020 --> 01:02:45,720 to their experience. 1601 01:02:49,220 --> 01:02:49,900 Hypothetically speaking. 1602 01:02:55,400 --> 01:02:56,780 I know we're actually 1603 01:02:56,780 --> 01:02:58,720 a little bit ahead of time. I don't mind 1604 01:02:59,240 --> 01:03:00,900 actually ending a little bit early because that 1605 01:03:00,900 --> 01:03:02,900 gives you time to go and check 1606 01:03:02,900 --> 01:03:04,400 out Boost, check out some other things. 1607 01:03:05,040 --> 01:03:06,920 So I don't think anybody's going to get real upset 1608 01:03:06,920 --> 01:03:07,940 if we do end early. 1609 01:03:08,700 --> 01:03:10,780 Because that does give you a chance to go experience 1610 01:03:10,780 --> 01:03:12,900 more of DEF CON. But just to kind of rehash 1611 01:03:12,900 --> 01:03:14,820 of what we did here, we talked about 1612 01:03:14,820 --> 01:03:16,200 our packet capturing software. 1613 01:03:16,860 --> 01:03:18,120 As everybody stands up. 1614 01:03:19,280 --> 01:03:21,000 Alright, let me conclude it real quick. 1615 01:03:21,340 --> 01:03:22,960 The point I want to show you is that 1616 01:03:22,960 --> 01:03:24,980 packet capturing, yes it's an older 1617 01:03:24,980 --> 01:03:26,920 thing, but yes it's still really, really cool. 1618 01:03:27,160 --> 01:03:28,820 The biggest challenge is that if you want to 1619 01:03:28,820 --> 01:03:30,900 spy on a remote network, is finding 1620 01:03:30,900 --> 01:03:32,800 out ways to get onto that remote host. 1621 01:03:33,020 --> 01:03:35,000 And I hope I just showed you one way. I'll be 1622 01:03:35,040 --> 01:03:36,600 at a relatively simple way, 1623 01:03:36,700 --> 01:03:38,920 but shows you that you do have to find a way to 1624 01:03:38,920 --> 01:03:39,820 get onto a remote host. 1625 01:03:40,440 --> 01:03:42,560 In about an hour, I'll be out 1626 01:03:42,560 --> 01:03:44,300 at the vendor booth, 1627 01:03:44,460 --> 01:03:46,700 at the EFF vendor booth, be able to sign 1628 01:03:46,700 --> 01:03:48,980 any books or answer any questions. 1629 01:03:49,460 --> 01:03:50,980 By the way, just one last 1630 01:03:50,980 --> 01:03:52,800 point I want to make. How many of you saw our 1631 01:03:52,800 --> 01:03:55,120 t-shirts? How many of you saw our t-shirts? 1632 01:03:55,320 --> 01:03:57,320 How many of you saw the business cards? 1633 01:03:57,700 --> 01:03:58,940 Training Camp, we are sponsoring 1634 01:03:58,940 --> 01:04:00,860 a hacker challenge. The challenge is still 1635 01:04:00,860 --> 01:04:02,660 going on. The prize is 1636 01:04:02,660 --> 01:04:04,880 $1,000. You guys like money? 1637 01:04:05,520 --> 01:04:06,600 So $1,000 1638 01:04:06,600 --> 01:04:08,940 for the prize. We gave out 1639 01:04:08,940 --> 01:04:11,020 1,000 shirts. The shirts are gone, but we still 1640 01:04:11,020 --> 01:04:12,780 have business cards with a challenge on them. 1641 01:04:13,440 --> 01:04:14,580 And if you follow 1642 01:04:14,580 --> 01:04:16,900 the challenges, the first person to the end 1643 01:04:16,900 --> 01:04:18,100 gets $1,000. 1644 01:04:18,700 --> 01:04:20,940 So the challenge is still going on. I talked to some people 1645 01:04:20,940 --> 01:04:22,880 last night. They were getting pretty close, 1646 01:04:22,960 --> 01:04:25,000 but not there yet. So if you 1647 01:04:25,000 --> 01:04:26,820 want one of those business cards, just grab me 1648 01:04:26,820 --> 01:04:28,760 or grab Dave, and 1649 01:04:28,760 --> 01:04:30,820 I'll be happy to give you one of those cards. 1650 01:04:32,420 --> 01:04:32,820 Questions? 1651 01:04:33,020 --> 01:04:33,880 I see a question in the back. 1652 01:04:35,920 --> 01:04:37,260 You have to find out. 1653 01:04:37,320 --> 01:04:37,460 You have to find out. 1654 01:04:37,460 --> 01:04:37,920 Find that out, man. 1655 01:04:38,320 --> 01:04:39,800 How far the rabbit hole goes. 1656 01:04:41,880 --> 01:04:42,320 Question? 1657 01:04:49,520 --> 01:04:50,880 Yes, yes, absolutely. 1658 01:04:51,000 --> 01:04:52,820 The question is, is there a way to poison a 1659 01:04:53,700 --> 01:04:54,400 host file? 1660 01:04:54,660 --> 01:04:56,660 Absolutely. There's actually a great book called 1661 01:04:56,660 --> 01:04:57,320 Windows 1662 01:04:59,220 --> 01:05:00,100 Microsoft Press 1663 01:05:00,100 --> 01:05:02,980 Windows Command Line 1664 01:05:02,980 --> 01:05:04,560 Tools. I forget the exact title. 1665 01:05:05,040 --> 01:05:06,700 But if you get into this kind of stuff, 1666 01:05:06,780 --> 01:05:08,080 you definitely want to grab a hold of that book, 1667 01:05:08,180 --> 01:05:10,080 because Windows 2000, 2003 has 1668 01:05:10,680 --> 01:05:12,540 like hundreds of command line options. 1669 01:05:12,860 --> 01:05:14,680 And one thing you can do is from a command line 1670 01:05:14,680 --> 01:05:16,260 actually poison someone's host file, 1671 01:05:16,400 --> 01:05:18,740 or you can even change what their 1672 01:05:18,740 --> 01:05:20,780 DNS server is. So you don't need access 1673 01:05:20,780 --> 01:05:22,840 to the GUI. You can actually do it straight from a command line, 1674 01:05:22,960 --> 01:05:24,700 which is really cool. Redirect them 1675 01:05:24,700 --> 01:05:25,280 to you. 1676 01:05:26,420 --> 01:05:28,920 Alright, well I'm going to 1677 01:05:28,920 --> 01:05:30,780 go ahead and end up early, giving you a chance to see 1678 01:05:30,780 --> 01:05:32,760 some other talks, give you a chance to check out 1679 01:05:32,760 --> 01:05:34,480 the vendor booth and check out some of the things going on. 1680 01:05:34,680 --> 01:05:35,520 Thank you for your time.