1 00:00:00,000 --> 00:00:03,120 Good morning. I am Ryan Lynn and this is Pig Finding Truffles 2 00:00:03,120 --> 00:00:07,760 Without Leaving a Trace. We are going to start off today with a 3 00:00:07,760 --> 00:00:12,040 brief introduction and then talk about why we're here for those 4 00:00:12,040 --> 00:00:17,800 of us that are awake in here. And then after that we're going 5 00:00:17,800 --> 00:00:23,640 to figure out how this can help each of us. And I absolutely 6 00:00:23,640 --> 00:00:28,460 hate slides so most of this is going to be demos. We're going 7 00:00:28,460 --> 00:00:31,060 to talk a little bit about how the different stuff works and 8 00:00:31,060 --> 00:00:34,240 then we're going to go over the different protocols and plug-ins 9 00:00:34,240 --> 00:00:37,980 that the protocol for PIG supports. And we're going to 10 00:00:37,980 --> 00:00:42,380 talk about remediation. So first of all, I am Ryan Lynn. I'm a 11 00:00:42,380 --> 00:00:46,640 senior security consultant at Trustwave. I also like to play 12 00:00:46,640 --> 00:00:49,840 with cool toys so I've contributed to Metasploit and 13 00:00:49,840 --> 00:00:54,680 Beef and other stuff. And that's my website and Twitter 14 00:00:54,680 --> 00:00:58,440 ID if you're interested in things I say. So I'm going to 15 00:00:58,460 --> 00:01:03,160 talk a little bit about that. So why are we here? While I was 16 00:01:03,160 --> 00:01:06,840 looking at network traffic doing pen testing, I was getting 17 00:01:06,840 --> 00:01:11,100 frustrated because looking at Wireshark data is really cool 18 00:01:11,100 --> 00:01:15,180 but it's kind of a pain because getting data out of that to 19 00:01:15,180 --> 00:01:19,080 prioritize and really get into some sort of manageable format 20 00:01:19,540 --> 00:01:22,460 isn't necessarily easy. It's mostly a lot of down arrow and 21 00:01:22,460 --> 00:01:25,680 going, oh, that's interesting. Which isn't really interesting 22 00:01:25,680 --> 00:01:28,440 at all. So I wanted an easy way for you guys to get a sense of 23 00:01:28,460 --> 00:01:31,720 that. So I wanted an easy way to identify hosts and resources on 24 00:01:31,720 --> 00:01:35,980 a network. And primarily what I'm talking about is local 25 00:01:35,980 --> 00:01:40,640 segments. So for internal pen tests, frequently we hit a 26 00:01:40,640 --> 00:01:43,920 point where we're dropped on a local network segment and we 27 00:01:43,920 --> 00:01:47,140 want to know what's there. You know, there's, we can port scan 28 00:01:47,140 --> 00:01:50,560 it all and, you know, light up post IDSs and all that sort of 29 00:01:50,560 --> 00:01:53,820 stuff. But it's usually a good idea to start off by listening 30 00:01:53,820 --> 00:01:57,560 for a little bit and seeing what we see. So I wanted an easy way 31 00:01:57,560 --> 00:01:58,320 to collect that data. 32 00:01:58,460 --> 00:02:02,060 I wanted to be able to identify hosts and resources that are on a 33 00:02:02,060 --> 00:02:06,180 network. And also profile individuals. It's amazing how 34 00:02:06,180 --> 00:02:09,720 much information some people attach to their computer. 35 00:02:10,260 --> 00:02:15,300 Whether it be, you know, their name, which I sort of 36 00:02:15,300 --> 00:02:19,000 accidentally did that. And I realized it while I was working 37 00:02:19,000 --> 00:02:22,400 on the tool. So you'll see a packet of me being stupid in a 38 00:02:22,400 --> 00:02:26,440 couple minutes. Also to be able to determine network 39 00:02:26,440 --> 00:02:28,440 architecture. So looking at what's there, what's the 40 00:02:28,460 --> 00:02:31,500 network, what devices are on the network, in some cases how 41 00:02:31,500 --> 00:02:35,880 they're configured and other goodness. Also a lot of the time 42 00:02:35,880 --> 00:02:40,460 it will give us machine and user naming schemes. So if you're 43 00:02:41,700 --> 00:02:44,760 needing to brute force a user someplace, if they go ahead and 44 00:02:44,760 --> 00:02:47,820 give you their user ID without asking for it, that's kind of 45 00:02:47,820 --> 00:02:50,900 helpful. But the big thing I wanted to do was be completely 46 00:02:50,900 --> 00:02:54,920 silent. A lot of passive information gathering tools out 47 00:02:54,920 --> 00:02:57,240 there require you to essentially man in the middle of 48 00:02:57,240 --> 00:02:58,440 the network. Well, I'm not going to do that. I'm going to do a 49 00:02:58,460 --> 00:02:59,880 PourPort. I'm not going to do that. And that's good. And man in 50 00:02:59,880 --> 00:03:03,700 the middling in a lot of situations is very nice. But I 51 00:03:03,700 --> 00:03:05,600 kind of think that that's the thing that you should do after 52 00:03:05,600 --> 00:03:09,460 you start listening. So I wanted something that would allow me to 53 00:03:09,460 --> 00:03:12,460 do this with no IP address so I could look at the broadcast and 54 00:03:12,460 --> 00:03:15,880 multicast traffic on the network without actually, you know, 55 00:03:15,880 --> 00:03:23,260 participating in being able to, for instance, sending out a DHCP 56 00:03:23,260 --> 00:03:25,840 request. I wanted to just be able to listen on the network. 57 00:03:26,700 --> 00:03:28,440 And the man in the middle, people, the people who are 58 00:03:28,440 --> 00:03:33,940 for me was important because again I wanted to make sure this was the first step and once 59 00:03:33,940 --> 00:03:37,740 I had an idea of what I was looking at, this will help me figure out which hosts I might 60 00:03:37,740 --> 00:03:41,860 be targeting for specific men in the middle activities where I would look at more traffic. 61 00:03:45,720 --> 00:03:52,180 So why are we here? First of all, for passive information gathering it's good to understand 62 00:03:52,180 --> 00:03:56,680 what's on your network, what's talking, what protocols you may have broadcasting that you 63 00:03:56,680 --> 00:04:01,180 don't intend to be broadcasting. A lot of these are easily configurable through domain policies 64 00:04:01,760 --> 00:04:06,900 and so we're going to look at understanding what sort of packets are broadcast automatically. 65 00:04:07,860 --> 00:04:14,040 Also deep packet parsing kind of sounds like fun. But I wanted to make this information easier 66 00:04:14,040 --> 00:04:21,180 for everyone to access. So like I said, Wireshark is interesting sort of, but having a way to 67 00:04:21,180 --> 00:04:26,440 automatically pull out data out of PCAP or off the network and put it into something 68 00:04:26,440 --> 00:04:32,000 that is easy to manage is important. And so for this example, since we have already 69 00:04:32,390 --> 00:04:36,420 more and more information gathering in Metasploit, I chose Metasploit to use as the back end. 70 00:04:36,640 --> 00:04:41,480 So what we're going to be looking at is how to pull information from the network through 71 00:04:41,480 --> 00:04:47,360 passive listening and then insert that into Metasploit so that we can access it later. 72 00:04:47,760 --> 00:04:52,380 But also we're going to look at how we can easily leverage that data afterwards for pen 73 00:04:52,380 --> 00:04:54,980 tests or for sort of easier reporting. 74 00:04:55,360 --> 00:04:56,420 And yeah. 75 00:04:56,440 --> 00:04:59,360 You guys could just be here because you're waiting for the next talk. But hopefully you're 76 00:04:59,360 --> 00:04:59,720 here for me. 77 00:05:02,400 --> 00:05:07,920 So how will this help you? So for assist admin, it's good to know what information 78 00:05:07,920 --> 00:05:12,860 you're sending out. You want to make sure that you're not giving away more information 79 00:05:12,860 --> 00:05:19,240 about your server or resources than you want to. If you're a network admin or, you know, 80 00:05:19,260 --> 00:05:23,720 a client-side admin, this is even more important because knowing this stuff helps you build 81 00:05:23,720 --> 00:05:26,040 good hardening guidelines for your clients. 82 00:05:26,040 --> 00:05:31,280 So that when someone wanders into a Starbucks, you're not giving away a great deal of information 83 00:05:31,280 --> 00:05:33,800 about how your company's assets are configured. 84 00:05:35,780 --> 00:05:41,100 So for a pen tester, obviously we want to know as much as possible about what's going 85 00:05:41,100 --> 00:05:45,720 on in the segment that we're on so that we can figure out which hosts are going to be 86 00:05:45,720 --> 00:05:52,840 prime targets for attack. So for that aspect, that really, this project really is helpful 87 00:05:52,840 --> 00:05:53,360 for us. 88 00:05:53,600 --> 00:05:55,120 And so for everyone. 89 00:05:55,460 --> 00:05:56,020 So for everyone. 90 00:05:56,040 --> 00:06:02,420 Not everybody wants to look through Wireshark packets. So this is mainly for people who 91 00:06:02,420 --> 00:06:07,400 are tech savvy and are interested in seeing what types of information their machine is 92 00:06:07,400 --> 00:06:11,220 sending out. You want to know whether or not every time you connect to a wireless if 93 00:06:11,220 --> 00:06:16,980 everybody knows that your name is Jim Bob and you have an iPhone. So that really helps 94 00:06:16,980 --> 00:06:18,040 with that process. 95 00:06:18,520 --> 00:06:24,660 Also the Metasploit database really does make it easier to manage data. So this project 96 00:06:24,660 --> 00:06:25,800 is a step. 97 00:06:26,040 --> 00:06:32,360 It's a step to hopefully encourage more people to be able to interface with that to pull 98 00:06:32,360 --> 00:06:33,040 some of this information. 99 00:06:33,880 --> 00:06:38,980 Also I want a way to organize and manage the results with DRADIS. So DRADIS is a decent 100 00:06:38,980 --> 00:06:46,420 reporting framework. It has the ability to treat each entity as a node. And so one of 101 00:06:46,420 --> 00:06:51,700 the things I did is I wrote a DRADIS plug-in that will allow us to pull all the Metasploit 102 00:06:51,700 --> 00:06:56,020 data that we have into DRADIS so that we can look at it in an easier fashion. So that's 103 00:06:56,020 --> 00:06:59,560 This will also allow us to take the information that we've gathered and add additional notes 104 00:06:59,560 --> 00:07:07,240 to it and correlate it with other information we've gathered. And also this is a good way 105 00:07:07,240 --> 00:07:13,320 to stay quiet on the network. If you're worrying about tipping off things that are watching, 106 00:07:13,500 --> 00:07:20,800 whether it be in IPS or HIPS or any of that stuff, just listening isn't going to start 107 00:07:20,800 --> 00:07:25,900 triggering alerts. So before you start getting yourself blocked from things, this is a good 108 00:07:26,020 --> 00:07:34,100 first step. So talking is kind of boring. So show me. So the first thing we're going to do is on 109 00:07:34,100 --> 00:07:41,700 basic gathering data. I was lucky enough to get some of the wall of sheep data from Ryan at the 110 00:07:41,700 --> 00:07:56,000 wall of sheep desk. And so we're going to look at a little bit of that right now. So first 111 00:07:56,020 --> 00:08:00,220 thing that we're going to do is load up MSF console which, for those who are not familiar 112 00:08:00,220 --> 00:08:00,560 with Tet 113 00:08:26,020 --> 00:08:27,580 Most of the framework is very powerful. 114 00:08:28,220 --> 00:08:31,500 What I'm going to do next is connect to a local database. 115 00:08:31,940 --> 00:08:40,660 So we're going to do dbconnect, actually dbcreate. 116 00:08:44,140 --> 00:08:49,260 And the dbcreate will connect to the local Postgres database that I have and go ahead 117 00:08:49,260 --> 00:08:51,060 and create the table structure that we're going to use. 118 00:08:51,060 --> 00:08:57,060 The next thing I'm going to do is use the module that I created for the pass information 119 00:08:57,060 --> 00:09:03,000 gathering, which this is going to be released tomorrow morning because I fixed a bunch of 120 00:09:03,000 --> 00:09:03,680 stuff last night. 121 00:09:05,160 --> 00:09:07,840 I got the DEF CON network traffic. 122 00:09:08,100 --> 00:09:11,840 It turns out that not everybody sends properly formed network traffic at DEF CON. 123 00:09:12,040 --> 00:09:12,920 Who would have thought? 124 00:09:13,160 --> 00:09:18,360 So I sort of found some bugs in the process of getting the wall of sheep data. 125 00:09:18,640 --> 00:09:21,040 So this should be useful. 126 00:09:21,040 --> 00:09:29,380 This information is stored in the auxiliary tree under sniffers and it's called pig. 127 00:09:30,080 --> 00:09:32,020 So from here we can look at the options. 128 00:09:32,840 --> 00:09:36,060 The two primary things we need to do is set a PCAP file. 129 00:09:42,500 --> 00:09:49,200 And in this case we're going to look at two different protocols, CDP and SSDP, which 130 00:09:49,200 --> 00:09:50,360 is network plug and play. 131 00:09:51,060 --> 00:09:58,340 The other thing that we're going to do is so I'm not sure why it's here, but the sniffer 132 00:09:59,140 --> 00:10:04,980 framework for Metasploit requires an R host, which is typically designed for the host that 133 00:10:04,980 --> 00:10:05,580 you're going to attack. 134 00:10:05,920 --> 00:10:09,500 There's also a filter, which would be if you only want to listen to specific things. 135 00:10:09,780 --> 00:10:13,580 But for right now, until we get it fixed, you still have to set an R host to something. 136 00:10:13,960 --> 00:10:17,200 So it's completely ignored. 137 00:10:17,940 --> 00:10:19,580 So just set it to whatever you want. 138 00:10:20,160 --> 00:10:23,960 So right now, when we look at the hosts that are in the database, there's nothing there. 139 00:10:25,260 --> 00:10:26,480 And notes as well. 140 00:10:27,380 --> 00:10:33,840 So when we run the plug-in, we can see that it's pulling in host information for a couple 141 00:10:33,840 --> 00:10:34,360 different things. 142 00:10:34,660 --> 00:10:38,740 We see one SSDP host, which is, again, the network plug and play. 143 00:10:39,080 --> 00:10:42,120 And there's CDP devices detected, but they don't have IP addresses. 144 00:10:42,600 --> 00:10:46,640 So we're seeing broadcast traffic from hosts that are actually multicast traffic from hosts 145 00:10:46,640 --> 00:10:47,860 that aren't actually on the network. 146 00:10:48,100 --> 00:10:49,380 So when we go back. 147 00:10:49,380 --> 00:10:49,940 Back to DB hosts. 148 00:10:51,100 --> 00:10:54,960 We see a new host was added, the one through network plug and play. 149 00:10:55,440 --> 00:10:58,540 And when we look at the DB notes, we can see a couple different things. 150 00:10:58,820 --> 00:11:01,900 We can see under type, passive CDP. 151 00:11:02,660 --> 00:11:07,800 And under the next line is a passive SSDP. 152 00:11:08,340 --> 00:11:15,840 To be able to query the stuff directly, you can just do a dash T and type in the type 153 00:11:15,840 --> 00:11:16,780 of information you want. 154 00:11:17,120 --> 00:11:18,260 And so from this. 155 00:11:18,260 --> 00:11:19,780 We can see that we have a CDP packet. 156 00:11:20,260 --> 00:11:24,800 And obviously, from just listening to the network, we've gained quite a bit of information. 157 00:11:25,160 --> 00:11:26,220 We know that it's a switch. 158 00:11:26,620 --> 00:11:28,460 We know what port is connected. 159 00:11:28,800 --> 00:11:30,660 We know what capabilities it has. 160 00:11:30,960 --> 00:11:35,240 We know the full banner, including version and type of switch. 161 00:11:35,600 --> 00:11:37,400 And we even know the native VLAN. 162 00:11:37,840 --> 00:11:41,980 So we've already, just by listening for a second, gotten quite a bit of information 163 00:11:42,540 --> 00:11:45,280 about probably what type of infrastructure is being run. 164 00:11:45,680 --> 00:11:47,440 And what type of. 165 00:11:48,340 --> 00:11:49,220 Hardware is out there. 166 00:11:50,200 --> 00:11:52,820 So let's look at one other. 167 00:12:03,400 --> 00:12:05,380 So this is the broadcast traffic. 168 00:12:05,820 --> 00:12:09,540 So you can see here there is a number of DHCP requests going out. 169 00:12:09,720 --> 00:12:11,020 And a couple of other things. 170 00:12:11,620 --> 00:12:15,220 So the DHCP packets have some very interesting information in them. 171 00:12:15,440 --> 00:12:16,960 In addition to having the MAC address. 172 00:12:17,120 --> 00:12:17,420 Typically, you can see the MAC address. 173 00:12:17,440 --> 00:12:21,960 Basically, they also have information in them that may indicate what type of operating 174 00:12:21,960 --> 00:12:26,660 system it is, especially when you start looking at what information is requested. 175 00:12:27,680 --> 00:12:30,360 So that makes these very valuable. 176 00:12:30,900 --> 00:12:36,700 The bad thing is, is you don't always have an IP address to go with the MAC address. 177 00:12:37,040 --> 00:12:42,080 So one of the things that I've changed about this is if we don't have a MAC address, we 178 00:12:42,080 --> 00:12:46,720 will create an arbitrary IP address based off of the last four activities. 179 00:12:47,440 --> 00:12:49,940 So this is where you can see that the handsets of the MAC address, they will allow us to 180 00:12:49,940 --> 00:12:51,060 go ahead and capture that data. 181 00:12:51,420 --> 00:12:55,060 For the metasploit framework, one of the things that I had to work around was that 182 00:12:55,060 --> 00:12:59,760 every asset for a note has to be associated with an IP address. 183 00:13:00,040 --> 00:13:02,720 So I just randomly created IP addresses. 184 00:13:03,040 --> 00:13:08,600 So if we look at our hosts, obviously there's a lot of random IP addresses there. 185 00:13:09,060 --> 00:13:10,640 But it allows us to. 186 00:13:11,440 --> 00:13:11,940 . 187 00:13:15,060 --> 00:13:16,580 When we look at the DHCP. 188 00:13:16,580 --> 00:13:20,280 be able to capture each individual piece of information. 189 00:13:21,240 --> 00:13:25,200 So these, for instance, on the DEF CON network seem to be a lot 190 00:13:25,200 --> 00:13:28,380 of people changing MAC addresses and just sending out requests to 191 00:13:28,380 --> 00:13:32,760 see what comes back. So there's not a lot of information here. 192 00:13:32,880 --> 00:13:35,400 But I'm going to show some stuff that is more interesting 193 00:13:35,400 --> 00:13:41,520 in a moment. So that is the basics of actually gathering the 194 00:13:41,520 --> 00:13:48,280 data. So we've already looked at a little bit how to view the 195 00:13:48,280 --> 00:13:52,140 collected data with Metasploit. So let's look and see what 196 00:13:52,140 --> 00:14:01,320 information we see through DRADIS real quick. So for those 197 00:14:01,320 --> 00:14:05,880 of you that aren't familiar, DRADIS is a reporting framework 198 00:14:06,440 --> 00:14:11,000 that is written in Rails. So what we're going to do here is 199 00:14:11,520 --> 00:14:15,220 use the Thor command, which is a gem that you install as part of 200 00:14:17,520 --> 00:14:23,440 DRADIS to do a list to list all of the different things that we 201 00:14:23,440 --> 00:14:27,780 can run. So when we do the list, we can see that we can use Thor 202 00:14:27,780 --> 00:14:32,140 to back things up to reset portions or the server, which is 203 00:14:32,140 --> 00:14:41,220 what actually runs DRADIS itself. So right now DRADIS is 204 00:14:41,220 --> 00:14:41,500 starting to run. So we're going to do a little bit more of a 205 00:14:41,520 --> 00:14:46,480 up and we see that it is started up on local host, we can see the port number is 3004. 206 00:14:48,180 --> 00:14:52,980 So we will start up web browser. 207 00:15:02,540 --> 00:15:04,420 And we will log in to Dreadus. 208 00:15:11,880 --> 00:15:13,960 So Dreadus has a couple of different areas. 209 00:15:14,140 --> 00:15:19,080 One is over here where we will have all the nodes and then all of the information about 210 00:15:19,460 --> 00:15:22,960 the different things that we are reporting on will show up. 211 00:15:22,960 --> 00:15:28,440 So now that Dreadus is loaded, we have an import task which will allow us to import 212 00:15:28,440 --> 00:15:29,780 all of the data into it. 213 00:15:30,320 --> 00:15:38,860 So I'm going to back around this and if we do a list again and grab out MSF, we can see 214 00:15:38,860 --> 00:15:44,400 that there is a command to import all of the MSF configuration information. 215 00:15:44,880 --> 00:15:46,720 To do that, it uses XMLRPC. 216 00:15:47,360 --> 00:15:52,940 So we're going to come over to our Metasploit instance and we're going to load the data 217 00:15:52,940 --> 00:15:55,260 into the XMLRPC plug-in. 218 00:15:55,800 --> 00:15:58,120 We're going to specify a password of test. 219 00:15:59,000 --> 00:16:05,840 And so when that runs, we can see that it is loaded on local host on 55553 and has a 220 00:16:05,840 --> 00:16:07,500 user name of MSF and a password of test. 221 00:16:08,100 --> 00:16:17,260 So when we come back over here, we can find our Thor command again and so we do Thor Dreadus 222 00:16:19,040 --> 00:16:20,300 import MSF all. 223 00:16:22,140 --> 00:16:22,920 And so we're going to go back over here and import MSF all. 224 00:16:22,920 --> 00:16:29,220 So what we should see here is beginning import of the nodes and then the filter ran successfully. 225 00:16:29,800 --> 00:16:35,500 So when we come back to the Dreadus framework, we can hit refresh in the tree. 226 00:16:35,720 --> 00:16:40,580 We now have a Metasploit branch and all of the IP addresses that we had show up before. 227 00:16:40,960 --> 00:16:46,960 So before, you know, it was kind of hard to get an image of what all of that information 228 00:16:46,960 --> 00:16:47,360 was. 229 00:16:47,580 --> 00:16:49,260 But this is a little bit easier to navigate. 230 00:16:49,860 --> 00:16:52,040 So for the passive DHCP data, for instance. 231 00:16:52,040 --> 00:16:58,100 We can just through double clicking see all of the different information that we were 232 00:16:58,100 --> 00:16:58,680 able to gather. 233 00:16:59,980 --> 00:17:11,440 We can also expand all of these and look at all of the different types of information 234 00:17:11,440 --> 00:17:11,960 we have. 235 00:17:12,220 --> 00:17:20,100 So in addition to gathering just the nodes, we also have some information about what services 236 00:17:20,100 --> 00:17:20,620 are running. 237 00:17:20,620 --> 00:17:24,880 Through the queries that were or through the packets that we were processed. 238 00:17:25,120 --> 00:17:29,800 So DB services will show that it picked up two different types of protocols. 239 00:17:29,980 --> 00:17:32,460 So we're also getting some basic port scanning out of this as well. 240 00:17:33,700 --> 00:17:38,640 So when we go back into Dreadus, we can see that the nodes themselves, this SMB browse 241 00:17:38,640 --> 00:17:41,360 node is associated with port 138 UDP. 242 00:17:41,660 --> 00:17:45,340 So when we look at that, we get some interesting information. 243 00:17:45,600 --> 00:17:50,120 We get that we got this through an SMB browser. 244 00:17:51,260 --> 00:17:52,720 It's domain is workgroup. 245 00:17:53,180 --> 00:17:57,160 We know the OS version and we also know what capabilities it has. 246 00:17:57,300 --> 00:17:58,120 So it's a workstation. 247 00:17:58,300 --> 00:17:58,920 It's not a server. 248 00:18:00,040 --> 00:18:01,740 Some interesting stuff comes up here. 249 00:18:01,900 --> 00:18:07,100 So a lot of the times when we're doing pent us, people running their own version of SQL 250 00:18:07,100 --> 00:18:08,940 server is frequently a way in. 251 00:18:09,140 --> 00:18:13,480 A lot of the time when people have SQL server on their workstations, it's not properly 252 00:18:13,480 --> 00:18:15,360 patched or has a bad password. 253 00:18:15,600 --> 00:18:17,580 So Windows is really nice. 254 00:18:17,680 --> 00:18:19,900 And if you have a SQL server. 255 00:18:19,900 --> 00:18:24,440 It broadcasts and tells everyone because everybody should use it because it's awesome. 256 00:18:25,880 --> 00:18:27,800 So this shows up here. 257 00:18:27,980 --> 00:18:31,760 So if you're looking for SQL servers, I'm going to look at how to programmatically pull 258 00:18:31,760 --> 00:18:36,060 some of this stuff in a minute and we can easily go through the nodes to look for things 259 00:18:36,060 --> 00:18:37,220 like SQL servers. 260 00:18:41,100 --> 00:18:44,680 So and then for the passive SSDP, we're going to look for that in a minute. 261 00:18:45,080 --> 00:18:47,980 Again, SSDP I think is simple service discovery protocol. 262 00:18:48,200 --> 00:18:49,780 Which is the awesome network. 263 00:18:49,780 --> 00:18:50,260 Plug and play. 264 00:18:50,480 --> 00:18:54,900 So this device that is doing network plug and play, we know some cool stuff about it. 265 00:18:55,140 --> 00:19:00,960 We know it's Windows NT 5.1 and it's universal plug and play and if we want to find out 266 00:19:00,960 --> 00:19:05,080 more about it, the packet that gets sent out has an awesome URL we can go to to find 267 00:19:05,080 --> 00:19:08,520 out everything we want to about how to connect to this host via plug and play. 268 00:19:09,480 --> 00:19:14,540 So while this itself doesn't give you an easy way to get all that information because you 269 00:19:14,540 --> 00:19:18,600 have to send out a separate request to get it, basically we can script this, pull out 270 00:19:18,600 --> 00:19:22,960 the URLs and then run curl or whatever else we want to just iterate through all the plug 271 00:19:22,960 --> 00:19:25,700 and play devices to get their configuration information. 272 00:19:26,200 --> 00:19:28,840 So this is a nice step forward with that. 273 00:19:34,800 --> 00:19:41,960 So the next thing I am going to do is to show you a little bit more different types 274 00:19:41,960 --> 00:19:42,780 of data. 275 00:19:43,060 --> 00:19:45,620 So we've seen two pieces so far. 276 00:19:46,220 --> 00:19:46,700 Okay. 277 00:19:48,600 --> 00:19:53,460 And I wanted to keep it small for the purposes of looking at DRADIS because DRADIS as you 278 00:19:53,460 --> 00:19:56,880 start getting larger and larger, by default it uses SQLite 3. 279 00:19:57,240 --> 00:20:00,760 The more data you shove into the SQLite 3 database, the slower it gets. 280 00:20:01,080 --> 00:20:07,400 So if you're going to be doing DRADIS with a large number of hosts, go ahead and edit 281 00:20:07,400 --> 00:20:10,420 the files to switch it to Postgres otherwise you will be very, very sad. 282 00:20:12,520 --> 00:20:15,780 So we're going to set our PCAP file this time. 283 00:20:19,500 --> 00:20:20,700 Thank you. 284 00:20:30,080 --> 00:20:36,100 And so here when we run this one, we see a couple of different other things, if you can 285 00:20:36,100 --> 00:20:36,640 read that fast. 286 00:20:36,880 --> 00:20:39,160 So here we're seeing information from Dropbox. 287 00:20:39,400 --> 00:20:43,460 We're seeing MDNS packets, which MDNS is awesome. 288 00:20:43,760 --> 00:20:45,180 MDNS is multicast DNS. 289 00:20:45,280 --> 00:20:45,760 So if you're going to be doing DRADIS with a large number of hosts, go ahead and do 290 00:20:45,780 --> 00:20:48,960 And it just allows you to do some DNS-y things on your local network. 291 00:20:50,580 --> 00:20:54,740 One of the things that I hope to do for the next version is to eliminate a lot of this 292 00:20:54,740 --> 00:20:55,220 redundancy. 293 00:20:56,880 --> 00:21:00,160 For the packet parsing, I wanted to do it as quickly as possible. 294 00:21:00,520 --> 00:21:06,060 But the downside is when you start searching for notes before you post them into the framework, 295 00:21:06,280 --> 00:21:07,980 everything starts slowing down a lot. 296 00:21:09,420 --> 00:21:13,280 So right now, basically every note it sees goes in. 297 00:21:13,480 --> 00:21:15,340 Which is kind of good and kind of bad. 298 00:21:16,540 --> 00:21:21,500 But it's good to see what some of this information is. 299 00:21:21,800 --> 00:21:27,380 So if we look at our DB host again, we have quite a few more hosts. 300 00:21:29,980 --> 00:21:31,740 And quite a few more notes. 301 00:21:31,840 --> 00:21:33,960 So looking at some of the interesting things. 302 00:21:42,840 --> 00:21:43,300 Sorry. 303 00:21:44,320 --> 00:21:44,780 Okay. 304 00:21:45,300 --> 00:21:45,760 Okay. 305 00:21:45,760 --> 00:21:51,940 I also have to make this a little bit more consistent, apparently. 306 00:21:54,600 --> 00:22:00,360 So for MDNS, we can also see that, for instance, all of the information about the photo smart 307 00:22:00,360 --> 00:22:02,360 printer that was attached to the network. 308 00:22:02,540 --> 00:22:07,240 And so we have quite a bit of information about it just by nature of it being on the 309 00:22:07,240 --> 00:22:07,500 network. 310 00:22:08,720 --> 00:22:09,200 Okay. 311 00:22:15,640 --> 00:22:18,460 So one of the other things I wanted to talk about was the Pwn plug. 312 00:22:24,180 --> 00:22:28,940 So for those of you who have not seen one before, this is a Pwn plug. 313 00:22:29,380 --> 00:22:30,620 It's relatively small. 314 00:22:32,100 --> 00:22:34,700 Has USB port if you want to connect it to wireless. 315 00:22:35,060 --> 00:22:38,140 Has Ethernet if you want to connect it to Ethernet. 316 00:22:38,780 --> 00:22:39,180 It's relatively small. 317 00:22:39,200 --> 00:22:41,960 But it's basically the size of just any power brick. 318 00:22:42,120 --> 00:22:48,080 So if you put something interesting on it, like CO2 detector or have something else coming 319 00:22:48,080 --> 00:22:52,140 out of it so that it looks like it's just a normal power cord, somebody may not even 320 00:22:52,140 --> 00:22:52,980 notice that it's there. 321 00:22:53,400 --> 00:23:00,420 So there's a lot of development being done for these guys so that you can use tools like 322 00:23:00,420 --> 00:23:01,520 the passive information gathering. 323 00:23:01,820 --> 00:23:08,400 There was another talk, I think, yesterday on doing transparent bridging with one of 324 00:23:08,400 --> 00:23:11,500 these guys so that you can bypass some of the NAC restrictions. 325 00:23:12,200 --> 00:23:17,680 But these are becoming more and more popular as pen test tools because you can easily get 326 00:23:17,680 --> 00:23:23,900 them in somewhere and they probably won't go noticed very often, especially if you doctor 327 00:23:23,900 --> 00:23:24,640 them up a little bit. 328 00:23:24,900 --> 00:23:29,660 I mean, if you have, like, a great big antenna hanging off of it and, you know, write pen 329 00:23:29,660 --> 00:23:32,660 test device on it, people will go, huh, I wonder if that's supposed to be here. 330 00:23:32,880 --> 00:23:36,180 But it's easy to doctor up so that it looks like it's supposed to be somewhere. 331 00:23:36,980 --> 00:23:44,840 So, something along the lines of the pony express is a good way to get some of these 332 00:23:44,840 --> 00:23:46,240 tools onto a network. 333 00:23:47,580 --> 00:23:51,040 So, I was trying to get a demo together for this but I don't have one yet. 334 00:23:51,760 --> 00:23:56,120 But basically this is running a cut down version of backtrack so you have a lot of 335 00:23:56,120 --> 00:24:01,000 the same tools that you would have with backtrack including if you have wireless being able 336 00:24:01,000 --> 00:24:04,080 to join wireless networks and sniff traffic. 337 00:24:04,260 --> 00:24:05,600 There's even a 3G version. 338 00:24:05,740 --> 00:24:06,160 It's really cool. 339 00:24:06,160 --> 00:24:09,960 you can combine with typical wireless. So if you don't have 340 00:24:09,960 --> 00:24:13,500 an easy egress method out of the network, you can go ahead and 341 00:24:13,500 --> 00:24:18,540 have it call back to you through SSH over 3G. And so at that 342 00:24:18,540 --> 00:24:22,600 point you can bridge your ‑‑ you can get on to the network or 343 00:24:22,600 --> 00:24:26,900 be able to at least listen to network traffic without directly 344 00:24:27,400 --> 00:24:30,980 being there. So the 3G is interesting because it 345 00:24:30,980 --> 00:24:33,460 bypasses ‑‑ obviously you don't have to worry about what 346 00:24:33,460 --> 00:24:40,520 someone's egress filtering is like if it's going over 3G. So 347 00:24:41,420 --> 00:24:44,740 now that we've seen the stuff, we're going to talk a little bit 348 00:24:44,740 --> 00:24:50,540 more about code and how all of the stuff fits together. So if 349 00:24:50,540 --> 00:24:52,920 you're not interested in that stuff, most of the demos are 350 00:24:52,920 --> 00:24:55,040 done. We're going to look a little bit more about how to 351 00:24:56,300 --> 00:24:58,080 build some of these things. So if you're interested in the 352 00:24:58,080 --> 00:25:00,860 programming part, we're going to talk about some of that, too. 353 00:25:01,900 --> 00:25:03,440 But this is basically a ‑‑ I'm going to go ahead and 354 00:25:03,460 --> 00:25:03,500 talk a little bit more about the code that we're going to be 355 00:25:03,500 --> 00:25:06,280 the METASPLOIT framework plug‑in. It does an auxiliary 356 00:25:06,280 --> 00:25:10,380 module that does ‑‑ that accesses the sniffer library that 357 00:25:10,380 --> 00:25:14,140 allows us to pull all this information in. The module that 358 00:25:14,140 --> 00:25:17,320 we're using for most of the parsing is Racket. Unfortunately 359 00:25:17,320 --> 00:25:20,080 Racket doesn't have all of the protocols that we're doing. So 360 00:25:20,080 --> 00:25:24,840 for instance, this has its own mdns parser and some other things 361 00:25:24,840 --> 00:25:28,460 that hopefully will be able to contribute back to Racket in the 362 00:25:28,460 --> 00:25:32,220 future once I get this stuff stable enough so that everybody 363 00:25:32,220 --> 00:25:33,440 can parse mdns in the future. So I'm going to go ahead and 364 00:25:33,440 --> 00:25:33,460 explore that a bit. So we're going to start with a run with 365 00:25:33,460 --> 00:25:33,680 METASPLOIT from the core sniffer portion. I'm going to go ahead 366 00:25:33,680 --> 00:25:38,640 pretty easily. From the core sniffer portion, there's a 367 00:25:38,640 --> 00:25:41,980 number of helper modules. These helper modules let you define 368 00:25:41,980 --> 00:25:45,600 the protocol parsing for each individual protocol that you want 369 00:25:45,600 --> 00:25:49,540 to look at into a separate file. In addition, you set rules for 370 00:25:49,540 --> 00:25:52,400 when those files should be triggered. So you're not running 371 00:25:52,400 --> 00:25:55,840 every filter against every single package you see. So a lot 372 00:25:55,840 --> 00:25:58,980 of the things for like, you know, the multicast traffic. 373 00:25:59,100 --> 00:26:03,420 We're listening to specific multicast broadcast addresses, 374 00:26:03,420 --> 00:26:06,440 addresses so that we don't have to send things to every filter. 375 00:26:08,340 --> 00:26:24,780 So we're going to look at one of these real quick. So the individual plug-ins are kept 376 00:26:24,780 --> 00:26:36,560 under the data, and then exploits, and then I have created a subdirectory called pig in here. 377 00:26:37,680 --> 00:26:44,600 So these are the listing of all of the different protocols that we support. So for instance, for 378 00:26:44,600 --> 00:26:52,280 groove, we have the ‑‑ basically we have to define a new pig parser. We call it pig groove. 379 00:26:52,660 --> 00:26:54,760 Every one of these different ‑‑ we have to define a new pig parser. Every one of these 380 00:26:54,760 --> 00:27:00,080 different protocol parsers is prefixed with pig so that we know exactly what it is as far as 381 00:27:00,080 --> 00:27:06,180 classes go. So the register rules tells us what rules it should trigger on. So it should trigger 382 00:27:06,180 --> 00:27:15,420 on destination UDP port of 1211 and a network broadcast, basically. So from there, when it sees 383 00:27:15,420 --> 00:27:22,200 something that matches that, it passes to the parse function, which we go ahead and break out 384 00:27:22,200 --> 00:27:24,120 the Ethernet and IP portions of the packet. 385 00:27:24,760 --> 00:27:27,580 So it's a pretty simple process. We can just go ahead and assign those. But Racket will let us 386 00:27:27,580 --> 00:27:34,500 take the IP portion and get a UDP packet out of it. And then from there, basically, we can parse 387 00:27:34,500 --> 00:27:40,120 all of the different pieces, and everything pretty much ends with the report note, which reports 388 00:27:40,120 --> 00:27:47,420 the different pieces in. So the two important pieces of information are the host and the port as 389 00:27:47,420 --> 00:27:54,300 far as the report note goes, and the protocol as well. Because basically, when you specify those, 390 00:27:54,300 --> 00:27:59,980 it binds the note to a specific port and to a specific IP. If those don't exist, it goes ahead 391 00:27:59,980 --> 00:28:04,120 and registers that information. So as far as port scanning goes and knowing what things we're 392 00:28:04,120 --> 00:28:11,240 listening on, as this runs, this will go ahead and populate that information. So as far as pulling 393 00:28:11,240 --> 00:28:20,360 some of the stuff out programmatically, one of the things that I also wanted to show was we looked 394 00:28:20,360 --> 00:28:21,100 at... 395 00:28:24,320 --> 00:28:30,480 We looked at, for instance, the CDP information. So this is a basic Python script that will allow 396 00:28:30,480 --> 00:28:37,720 us to pull data from Metasploit through the XMLRPC interface. Again, the XMLRPC interface is the 397 00:28:37,720 --> 00:28:44,360 same thing that Dreadus uses to pull in the data. So basically, we use the XMLRPC lib. And then 398 00:28:45,320 --> 00:28:54,280 the base Metasploit XMLRPC is not typical web XMLRPC. It is null terminated XMLRPC, kind of like 399 00:28:54,300 --> 00:29:01,180 what Flash uses. So we had to sort of write a fix for that. So the MSF transport is a transport 400 00:29:01,180 --> 00:29:07,100 that basically just null terminates stuff instead of tries to do web requests, which makes it a 401 00:29:07,100 --> 00:29:13,960 little bit easier. So to set up something to be able to query, we basically just create a proxy 402 00:29:13,960 --> 00:29:21,160 object, connect it to the same port that we set up, and we saw when we did the load XMLRPC, the 403 00:29:21,160 --> 00:29:24,280 local host on 55553 with a local host on 55553 with a local host on 55553 with a local host on 55553 404 00:29:24,300 --> 00:29:26,380 with a month acito no reported, and I'm just going to do a little link or two here. 405 00:29:26,380 --> 00:29:31,060 So here we have the type of datavetter we set up. And then basically, we start off by doing 406 00:29:31,060 --> 00:29:36,500 an offlogin, the offlogin gets us a token and then for the next ten minutes we can continue to 407 00:29:36,500 --> 00:29:43,060 use that token to query any other data we want. So if we got a result of success, we logged in. 408 00:29:43,180 --> 00:29:49,820 Otherwise we looked at notes. And so basically, for this, we're only taking the notes that have the 409 00:29:58,280 --> 00:30:01,260 here we can see that we can directly pull that. Now we can 410 00:30:01,260 --> 00:30:05,720 manipulate this however we want. Basically it spits out the raw 411 00:30:05,720 --> 00:30:09,300 data structure. So if you, depending on how you want to do 412 00:30:09,300 --> 00:30:13,360 this, you can either convert the data structure into a Python 413 00:30:13,360 --> 00:30:17,400 data structure from the Ruby format or in a lot of cases I've 414 00:30:17,400 --> 00:30:21,960 just been parsing out where I know fields are. And so doing 415 00:30:21,960 --> 00:30:26,380 Perl regex matches to pull the specific piece of information 416 00:30:26,380 --> 00:30:30,880 that you're looking for. So for instance for the SSDP all you're 417 00:30:30,880 --> 00:30:36,720 really looking for is the URL. So when we look at that we can 418 00:30:36,720 --> 00:30:41,400 just go ahead and get all of the different URLs and this makes it 419 00:30:41,400 --> 00:30:45,200 pretty easy and then take those and then fire off a separate 420 00:30:45,200 --> 00:30:48,980 process to pull all of the XML configuration files through 421 00:30:48,980 --> 00:30:49,180 that. 422 00:30:54,700 --> 00:30:59,320 So as far as what is currently in each filter, I wanted to talk 423 00:30:59,320 --> 00:31:01,840 for a couple minutes about what types of information we're 424 00:31:01,840 --> 00:31:06,640 actually gathering. So CDP we looked at for a second. It's got 425 00:31:06,640 --> 00:31:10,480 the OS version IP address information, VLAN information. 426 00:31:10,760 --> 00:31:15,060 Where all of this really comes into handy is if you're doing a 427 00:31:15,060 --> 00:31:17,980 pen test, a lot of the times you will get things like what the 428 00:31:17,980 --> 00:31:21,880 voice over IP VLAN is and other information that can help 429 00:31:21,960 --> 00:31:25,420 lead to further compromise. So for instance since you're going 430 00:31:25,420 --> 00:31:28,260 ahead and getting all of the OS versions, if there's a 431 00:31:28,260 --> 00:31:31,580 vulnerability in a certain version of iOS, this will 432 00:31:32,100 --> 00:31:36,100 certainly help you. It also aids in VLAN hopping because it 433 00:31:36,100 --> 00:31:39,600 frequently will list all of the VLANs that are available and it 434 00:31:39,600 --> 00:31:42,660 will also frequently give out the management VLAN information. 435 00:31:43,020 --> 00:31:47,940 So the host or the IP address that will accept typically SNMP 436 00:31:47,940 --> 00:31:51,700 traffic or an SSH connection is frequently given away in CDP as 437 00:31:51,700 --> 00:31:51,900 well. 438 00:31:51,960 --> 00:31:56,600 So this can sort of unveil other areas of attack just by listening 439 00:31:56,600 --> 00:32:06,100 to the CDP traffic. DHCP inform. So there's a couple more things 440 00:32:06,100 --> 00:32:08,340 that I want to do with this but for right now it will pull out 441 00:32:08,340 --> 00:32:11,480 the MAC address host name, the vendor class and request list. 442 00:32:11,760 --> 00:32:14,680 Where vendor class and request list come in handy is each 443 00:32:14,680 --> 00:32:18,100 different version of Windows and many of the different versions of 444 00:32:18,100 --> 00:32:21,560 Linux have the vendor class and request list in different orders. 445 00:32:21,560 --> 00:32:24,740 Through using these two things together we can fingerprint the 446 00:32:24,740 --> 00:32:27,720 host pretty effectively so we won't know for instance the 447 00:32:27,720 --> 00:32:30,800 difference between Windows XP service pack two and three but 448 00:32:30,800 --> 00:32:34,180 we'll know the difference between Windows XP, Vista 2000 449 00:32:35,500 --> 00:32:41,320 and Windows 7 which if you have Windows 2000 out there that's a 450 00:32:41,320 --> 00:32:43,400 lot of the time a tip that that may be a host that you want to 451 00:32:43,400 --> 00:32:51,540 look more carefully at or if you accidentally find like a Windows 452 00:32:51,560 --> 00:32:55,620 me box then that's certainly something you want to look at a 453 00:32:55,620 --> 00:33:02,700 little closer or shoot. So through those together there are 454 00:33:02,700 --> 00:33:05,620 some slight differences between service pack that some people 455 00:33:05,620 --> 00:33:08,900 have done some research on. So we do have the ability to get a 456 00:33:08,900 --> 00:33:13,240 little bit finer grain but you lose a little bit of the 457 00:33:13,820 --> 00:33:16,360 guarantee isn't quite as strong. You can definitely figure out 458 00:33:16,360 --> 00:33:19,500 specific version but going down to the individual service pack is 459 00:33:19,500 --> 00:33:20,100 sometimes tough. 460 00:33:22,000 --> 00:33:25,980 So Dropbox is very cool. There's been a number of Dropbox 461 00:33:25,980 --> 00:33:30,040 vulnerabilities that have been released and one of the cool 462 00:33:30,040 --> 00:33:33,220 things about Dropbox is it goes ahead and spits out its version 463 00:33:33,220 --> 00:33:36,440 number so if any versions are vulnerable it goes ahead and 464 00:33:37,040 --> 00:33:40,560 cuts in on the research for you I guess. But it also shares all 465 00:33:40,560 --> 00:33:43,400 of the shared namespaces. The namespaces are the Dropboxes 466 00:33:43,400 --> 00:33:46,760 that you have access to. So if you have a network and you have 467 00:33:46,760 --> 00:33:49,360 three people who are on a network that share the same Dropbox 468 00:33:50,100 --> 00:33:52,180 and two of them are fully patched and one of them is 469 00:33:52,180 --> 00:33:55,280 running SQL server, then you know which one you want to go 470 00:33:55,280 --> 00:33:58,020 after. The one that doesn't maybe have a password on the 471 00:33:58,020 --> 00:34:01,000 SQL server. And so you can look at who has maybe sensitive 472 00:34:01,000 --> 00:34:04,520 information or who you may want to attack through some other type 473 00:34:04,520 --> 00:34:07,760 of method and figure out who is sharing data back and forth to 474 00:34:07,760 --> 00:34:11,600 figure out where relationships are. And so all of this is 475 00:34:11,600 --> 00:34:18,740 broadcast freely with Dropbox. So Groove which is I think called 476 00:34:20,120 --> 00:34:23,260 SharePoint collaboration or workspaces or something like that 477 00:34:23,260 --> 00:34:28,200 now is a pretty interesting protocol. It goes ahead and gives 478 00:34:28,200 --> 00:34:30,640 you lots of information about the person who is sitting in front 479 00:34:30,640 --> 00:34:33,920 of the computer including whether or not they're online or 480 00:34:33,920 --> 00:34:38,340 offline, if the Groove session is connected or not. So if 481 00:34:38,340 --> 00:34:42,340 somebody is actively connected and hasn't been logged out, then 482 00:34:42,800 --> 00:34:46,080 you can tell that they're there. It will also give you the ports 483 00:34:46,080 --> 00:34:49,380 that Groove is listening on. But the most interesting thing that I 484 00:34:49,380 --> 00:34:50,080 found is that if you have a group of people that are working on 485 00:34:50,100 --> 00:34:53,040 WorkSpaces that as part of the Lansync protocol that it uses, it 486 00:34:53,040 --> 00:34:57,500 lists out all of the interface's IP addresses. So where this really 487 00:34:57,500 --> 00:35:01,020 becomes interesting is if you're trying to figure out for instance 488 00:35:01,020 --> 00:35:04,400 what host may be running VM or you're looking for credit card 489 00:35:04,400 --> 00:35:09,780 data. A lot of the tests that we do are PCI related. And you hear 490 00:35:09,780 --> 00:35:13,060 things like I've got a VPN so you'll never be able to get to my 491 00:35:13,060 --> 00:35:15,740 credit card data. Well if you're running WorkSpaces and I can tell 492 00:35:15,740 --> 00:35:19,080 which people are connected to the VPN, then that's certainly an 493 00:35:19,080 --> 00:35:19,900 avenue of attack. 494 00:35:20,100 --> 00:35:23,740 Those are the people that I want to try to target to use 495 00:35:23,740 --> 00:35:28,600 their host as a relay through the VPN. So this gives out in my 496 00:35:28,600 --> 00:35:32,000 opinion sort of one of the worst pieces because it really tells 497 00:35:32,000 --> 00:35:35,700 you which targets are most interesting. But it also gives 498 00:35:35,700 --> 00:35:38,680 you the Groove version so that if there are Groove exploits you 499 00:35:38,680 --> 00:35:43,520 know which ones are most interesting. MDNS is my favorite 500 00:35:43,520 --> 00:35:48,120 one. So it can give you everything from a list of the 501 00:35:48,120 --> 00:35:49,900 open ports. So it's basically a 502 00:35:50,100 --> 00:35:54,560 free port scan for Mac in a lot of cases. And a lot of the ones 503 00:35:54,560 --> 00:35:57,560 that I see for this are Mac related as far as listing open 504 00:35:57,560 --> 00:36:00,900 ports. So basically just from hanging out and listening to 505 00:36:00,900 --> 00:36:04,180 MDNS data you can figure out what ports are running, whether 506 00:36:04,180 --> 00:36:07,900 or not sharing is enabled and all sorts of other goodies. And 507 00:36:07,900 --> 00:36:11,800 the only thing that I can figure out is that my Mac must be a 508 00:36:11,800 --> 00:36:18,180 whore because it wants everybody to know what's open. So of course 509 00:36:18,180 --> 00:36:20,080 everybody names their Mac right away. So it's a little bit of a 510 00:36:23,300 --> 00:36:25,940 game changer for me. So the first thing when you set up your 511 00:36:25,940 --> 00:36:29,400 Mac, you probably want to go through and change some of that 512 00:36:29,400 --> 00:36:32,320 information so that it's not as open. But it's an easy way to 513 00:36:32,320 --> 00:36:35,760 get people's names. Also the active state of the machine. 514 00:36:36,740 --> 00:36:42,820 There's a presence field in a lot of these that shows whether 515 00:36:42,820 --> 00:36:46,340 or not someone is actively doing things on the computer. So if 516 00:36:46,340 --> 00:36:48,720 someone is actively working on the computer, it might not be 517 00:36:48,720 --> 00:36:50,080 the time to mess with it. So it's a little bit of a game changer 518 00:36:50,100 --> 00:36:54,220 when they go home. It may be the time to mess with it. Also for 519 00:36:54,220 --> 00:36:56,660 things like printers, it gives out some really interesting 520 00:36:56,660 --> 00:36:59,600 information. I mean, if you want to know which printers have 521 00:36:59,600 --> 00:37:02,340 staplers or whatever, in case you really like staplers, you 522 00:37:02,340 --> 00:37:10,860 can use this. SMB is, you know, it's Microsoft, so it's trying 523 00:37:10,860 --> 00:37:13,280 to be helpful and stuff. So it will go ahead and just tell you 524 00:37:13,280 --> 00:37:17,420 the exact version of Windows and the host name. And frequently 525 00:37:17,420 --> 00:37:19,960 we'll go ahead and give you the main information as well. So if 526 00:37:20,100 --> 00:37:22,240 you're just like, I could figure out the domain, but I'm 527 00:37:22,240 --> 00:37:25,100 just going to hang out, it will be like, hey, here's my domain. 528 00:37:26,000 --> 00:37:28,560 So this really cuts down on figuring out what the Windows 529 00:37:28,560 --> 00:37:31,380 infrastructure looks like, the Windows naming schemes, and 530 00:37:31,880 --> 00:37:34,160 because this pulls it all in automatically, it just makes it 531 00:37:34,160 --> 00:37:39,500 really easy. Like I said before, the SQL server stuff. SSDP is 532 00:37:39,500 --> 00:37:42,880 also very cool. This is where you show people all of their 533 00:37:42,880 --> 00:37:49,720 security cameras. So apparently the infrastructure IT security 534 00:37:49,720 --> 00:37:50,080 guys, they don't have a lot of data. They don't have a lot of 535 00:37:50,100 --> 00:37:52,000 physical security guys, and the physical security guys don't 536 00:37:52,000 --> 00:37:55,540 work together. Because there seems to be a lot of corporate 537 00:37:55,540 --> 00:37:59,620 security cameras that the physical security guys are 538 00:37:59,620 --> 00:38:02,060 using that still have plug and play enabled. And so they're 539 00:38:02,060 --> 00:38:06,040 just screaming out, hey, come look at my feed. And a lot of 540 00:38:06,040 --> 00:38:09,320 places you also may find that they forgot to do things like add 541 00:38:09,320 --> 00:38:12,600 passwords. So if you want to watch the front gate or, you 542 00:38:12,600 --> 00:38:17,580 know, secretary or whatever, you can do all of that from here. 543 00:38:18,460 --> 00:38:19,980 You'll get information about print 544 00:38:20,100 --> 00:38:22,880 filters, cameras, and frequently network gateways. So 545 00:38:22,880 --> 00:38:25,220 if you're trying to figure out more about the network topology, 546 00:38:25,480 --> 00:38:30,340 this is also a good way to do that. It doesn't give you a 547 00:38:30,340 --> 00:38:32,540 whole lot of information straight up. It usually gives 548 00:38:32,540 --> 00:38:36,140 you a URL. And then from that URL, you can pull another XML 549 00:38:36,140 --> 00:38:38,860 configuration file. And usually that gives you a lot of 550 00:38:38,860 --> 00:38:41,120 information. There are even devices that will be so 551 00:38:41,120 --> 00:38:46,700 friendly as to give you things like the admin user name and the 552 00:38:46,700 --> 00:38:50,080 URLs to do different other things on the system. So you 553 00:38:50,080 --> 00:38:53,000 can see the URL just to view the camera or the URL to do admin 554 00:38:53,000 --> 00:38:58,700 functions. And URL to change the IP address. All of those things. 555 00:38:58,940 --> 00:39:02,480 And so SSDP is sort of a gateway to more interesting 556 00:39:02,480 --> 00:39:10,300 stuff. So we know how to steal lots of cool stuff now. So how 557 00:39:10,300 --> 00:39:14,280 do we fix it? For NetBIOS, one of the ways to do it is disable 558 00:39:14,280 --> 00:39:18,720 NetBIOS over TCP. Most places now have a pretty robust DNS 559 00:39:18,720 --> 00:39:20,060 structure. So if you want to fix it, you have to go to the 560 00:39:20,060 --> 00:39:24,040 server. So NetBIOS isn't overly necessary. So one of the things 561 00:39:24,040 --> 00:39:26,920 that is worth testing is if your company is still using NetBIOS 562 00:39:26,920 --> 00:39:30,160 over TCP, look at what happens when you start disabling that 563 00:39:30,500 --> 00:39:33,380 and whether or not problems occur. If you still have a 564 00:39:33,380 --> 00:39:38,020 win server, you're probably okay. And if you're pretty good 565 00:39:38,020 --> 00:39:40,600 with auto registering DNS and those sort of things, you're 566 00:39:40,600 --> 00:39:46,000 probably okay. For SSDP, disabling network plug and play 567 00:39:46,740 --> 00:39:50,040 is an excellent plan. For many of you, you're going to have to 568 00:39:50,060 --> 00:39:52,260 go to the server. Most of the stuff is not necessary. Most 569 00:39:52,260 --> 00:39:55,420 places have, you know, DCP will usually give you the information 570 00:39:55,420 --> 00:40:00,800 you need as far as network devices go. And I rarely see a 571 00:40:00,800 --> 00:40:05,320 need to use the network plug and play features. CDP is tough 572 00:40:05,740 --> 00:40:09,580 because from a network admin standpoint, it's really helpful 573 00:40:09,580 --> 00:40:13,240 to see what's attached on what port. And unfortunately, it's 574 00:40:13,240 --> 00:40:18,200 really a pain to turn it on selectively. So kind of my 575 00:40:18,200 --> 00:40:20,040 feeling on that is for edge devices, it's really hard to 576 00:40:20,060 --> 00:40:20,260 figure out what's attached on what port. For core devices, you 577 00:40:20,260 --> 00:40:23,640 probably don't need it. But for core devices, it certainly makes 578 00:40:23,640 --> 00:40:27,760 it easy to figure out topology. So if somebody is at your core 579 00:40:27,760 --> 00:40:30,460 in a place where they can sniff that traffic, then you have 580 00:40:30,460 --> 00:40:34,720 probably already screwed up. So enabling at the core usually 581 00:40:34,720 --> 00:40:37,660 isn't too problematic. But enabling on edge devices 582 00:40:37,660 --> 00:40:42,420 certainly gives away a lot of information. So DHCP, Cisco has 583 00:40:42,420 --> 00:40:47,920 the concept of a DHCP helper. DHCP helpers can help limit where 584 00:40:47,920 --> 00:40:50,040 the DHCP information goes. And it's really important to know 585 00:40:50,060 --> 00:40:52,700 that. And that will cut down on your ability to leak 586 00:40:52,700 --> 00:40:59,040 information via DHCP. Dropbox disabled the lancing protocol, 587 00:40:59,300 --> 00:41:02,720 and this doesn't happen. Basically, you can still get a 588 00:41:02,720 --> 00:41:05,480 lot of that same communication that you need and may generate a 589 00:41:05,480 --> 00:41:08,060 little bit more traffic. But it certainly won't give away as 590 00:41:08,060 --> 00:41:12,120 much information about what you have. And since Microsoft is so 591 00:41:12,120 --> 00:41:15,140 helpful, I haven't found a way to stop Microsoft from helping 592 00:41:15,140 --> 00:41:19,680 me. I've been trying for a number of years. And generally, 593 00:41:20,060 --> 00:41:24,260 they're just that helpful. So if anybody figures out a good way 594 00:41:24,260 --> 00:41:27,980 to stop Groove from telling everybody about your stuff, I'd 595 00:41:27,980 --> 00:41:33,900 certainly be interested. And MDNS is disabled when possible. 596 00:41:34,160 --> 00:41:37,320 But it may not always be an option. Some things that talk 597 00:41:37,320 --> 00:41:42,400 MDNS don't really have an off button. But, you know, obviously 598 00:41:42,400 --> 00:41:45,140 if you don't want everybody connecting to your iTunes, you 599 00:41:45,140 --> 00:41:49,580 can disable some of those features and get away with a 600 00:41:49,580 --> 00:41:56,740 little bit more security. So as far as ways to help, one of the 601 00:41:56,740 --> 00:41:59,400 things that I'm interested in is seeing more types of data. 602 00:41:59,640 --> 00:42:03,980 Obviously, the DEF CON traffic helped quite a bit because there 603 00:42:03,980 --> 00:42:09,840 are lots of weird things going on here. Also, the DHCP host ID 604 00:42:09,840 --> 00:42:12,840 stuff. I'm partially the way through it, but I'm hoping to 605 00:42:12,840 --> 00:42:17,600 get a little bit more effort so that I can get more specific with 606 00:42:17,600 --> 00:42:19,400 the different types of boxes. 607 00:42:19,580 --> 00:42:20,880 So that's something that I'm looking at as far as network 608 00:42:20,880 --> 00:42:25,220 fingerprinting with the DHCP parameters. And then also I'm 609 00:42:25,220 --> 00:42:27,460 looking at more traffic to just figure out more protocols in 610 00:42:27,460 --> 00:42:31,500 general. There's a lot more stuff out there that's 611 00:42:31,500 --> 00:42:35,200 broadcasting than what we listed, but hopefully I can get 612 00:42:35,200 --> 00:42:39,140 some more of those out there for the next release. And for the 613 00:42:39,140 --> 00:42:43,460 future, metrepeter actually has sniffing capability, too. And 614 00:42:43,460 --> 00:42:46,160 with the new way that they did metrepeter modules, some of this 615 00:42:46,160 --> 00:42:49,100 stuff is going to be able to be ported so that you can actually 616 00:42:49,100 --> 00:42:54,840 do it through sniffing on a box that you have already rooted. So 617 00:42:54,840 --> 00:42:58,420 as you attack a new box, get a new shell, this may be something 618 00:42:58,420 --> 00:43:01,840 that you can look at to gather information on new segments as 619 00:43:01,840 --> 00:43:05,040 you start progressing and pivoting through a network. 620 00:43:06,080 --> 00:43:10,240 Again, also more protocols because collect data and profit. 621 00:43:10,520 --> 00:43:12,960 And I still haven't quite figured in all the question 622 00:43:12,960 --> 00:43:17,720 marks, but I'm sure we can figure that out. And then, again, the 623 00:43:17,720 --> 00:43:18,920 better OS identification. 624 00:43:20,760 --> 00:43:24,940 So if you want to get the code itself, there is where the code 625 00:43:24,940 --> 00:43:29,820 is. As far as working with Metasploit goes, there's both a 626 00:43:30,680 --> 00:43:34,260 Metasploit website, which links to Metasploit Unleashed class, 627 00:43:34,500 --> 00:43:37,500 which is excellent if you are interested in learning 628 00:43:37,500 --> 00:43:40,680 Metasploit. And then I'm also releasing a coding for pen 629 00:43:40,680 --> 00:43:44,220 testers book, which is coming out in October that is going to 630 00:43:44,220 --> 00:43:46,540 go over a lot of the Ruby skills that you may need if you're 631 00:43:46,540 --> 00:43:49,080 interested in picking up the Ruby. And also talking about the 632 00:43:49,100 --> 00:43:52,680 how to build Metasploit modules in general. So if you're 633 00:43:52,680 --> 00:43:55,460 interested in sort of helping out with the Metasploit project, 634 00:43:55,660 --> 00:43:59,220 you think it's cool, there's some resources that can help you 635 00:43:59,220 --> 00:44:10,320 out. So, questions? No questions. That's kind of 636 00:44:10,320 --> 00:44:16,120 awesome. Well, thanks for attending. Oh, question. 637 00:44:19,100 --> 00:44:21,680 What if you said why networks are discussed and there's 638 00:44:21,680 --> 00:44:22,940 any why networks ? 639 00:44:28,540 --> 00:44:33,840 So the question was, if you're – was I using live networks or 640 00:44:33,840 --> 00:44:37,400 test networks, and do not run into questions where – or do not 641 00:44:37,400 --> 00:44:39,880 run into problems where people are filtering broadcast and 642 00:44:39,880 --> 00:44:43,180 multicast traffic. And the answer is, yes, because DEF CON 643 00:44:43,180 --> 00:44:47,320 is actually filtering broadcast and multicast traffic through 644 00:44:47,320 --> 00:44:49,080 their networks. And we will have a discussion about that in a few 645 00:44:49,080 --> 00:45:00,120 A lot of this stuff was tested with live network data, and some of this stuff was tested, but most of the bug fixing was done with real stuff that I saw on the network. 646 00:45:01,200 --> 00:45:09,180 And for wireless networks, more and more people are filtering, but for internal corporate networks, I don't see a lot of that. 647 00:45:10,700 --> 00:45:14,840 It seems like good network segregation is still a problem for corporate networks. 648 00:45:15,980 --> 00:45:25,900 And a lot of the time, it's just convenient to give out, you know, a slash 16 for a network just to make sure you don't run out of IP addresses. 649 00:45:26,200 --> 00:45:28,180 So that really extends the broadcast domain. 650 00:45:28,660 --> 00:45:33,880 And you may only get, you know, certain portions of a network, but you still typically see quite a bit of broadcast traffic. 651 00:45:35,380 --> 00:45:36,520 Does anybody else have any questions? 652 00:45:47,960 --> 00:45:55,720 The question was, so for some of the packets, they didn't have an IP address, so the MAC address was shown. 653 00:45:55,900 --> 00:45:56,720 And that's right. 654 00:45:56,940 --> 00:46:03,580 So as part of the DHCP stuff, you don't necessarily have to have an IP address to be sending DHCP information out. 655 00:46:06,480 --> 00:46:11,360 So for that, I basically created one because of limitation with the Metasploit framework. 656 00:46:11,960 --> 00:46:14,520 It doesn't really let you very easily. 657 00:46:14,840 --> 00:46:21,360 You can't just stick in notes without it being associated with something, since a lot of the database portions are relational. 658 00:46:21,640 --> 00:46:26,320 So the MAC address seemed like a good one to use to make it up. 659 00:46:26,880 --> 00:46:37,340 So to determine which MAC addresses are passively watching the network? 660 00:46:37,760 --> 00:46:44,120 So there are, but they require. 661 00:46:44,120 --> 00:46:46,960 The question was, is there a way to tell who's sniffing the network? 662 00:46:47,400 --> 00:46:50,220 And there are, but it requires sending out traffic. 663 00:46:51,300 --> 00:46:58,340 I believe that Eatercap has a way of looking at who's doing man-in-the-middling and who is doing sniffing on the network. 664 00:46:59,000 --> 00:47:03,140 And there are some packet tricks to do that. 665 00:47:05,840 --> 00:47:09,900 I think that Eatercap is probably the best place to look. 666 00:47:09,980 --> 00:47:12,420 And if anybody else has any recommendations, maybe they can help out. 667 00:47:12,840 --> 00:47:14,100 But I think that that's it. 668 00:47:14,100 --> 00:47:15,240 I think that's it for our questions right now. 669 00:47:15,680 --> 00:47:17,540 We're going to the question and answer room afterwards. 670 00:47:17,700 --> 00:47:20,180 So if you're interested in chatting more, please feel free to join us. 671 00:47:20,700 --> 00:47:21,140 Thank you. 672 00:47:22,340 --> 00:47:22,980 Thank you.