1 00:00:00,000 --> 00:00:05,320 Here we are going to try and give a talk. So the title of this talk, graphical representations 2 00:00:05,320 --> 00:00:09,560 of security relationships, are they awesome or are they bullshit? You probably already 3 00:00:09,560 --> 00:00:17,920 formed a strong opinion by this point in my screw ups. So here we go. By the way, I like 4 00:00:17,920 --> 00:00:21,520 doing presentations just with plain HTML. I can't believe how many hacker cons I go 5 00:00:21,520 --> 00:00:25,800 to and people are using PowerPoint. I was in the speaker green room before we got started 6 00:00:25,800 --> 00:00:30,400 and EFF people were there getting ready for their panel which is going on simultaneously. 7 00:00:30,800 --> 00:00:35,720 And one of them actually said, although she admitted this was not her original quote, 8 00:00:35,860 --> 00:00:41,120 she was citing it with fair usage in mind. She said, power corrupts and PowerPoint corrupts 9 00:00:41,120 --> 00:00:47,200 absolutely. So the beginning is this. We have this problem of collecting huge amounts of 10 00:00:47,200 --> 00:00:51,400 information and that's not rare in the security scene. You see you run a Nessus scan, you 11 00:00:51,400 --> 00:00:55,780 see a ton of kilopages of output. You are running a system of server you get a ton of 12 00:00:55,780 --> 00:01:01,100 of stuff. And how many people attended Rafael Marty's talk on Afterglow? All right, that 13 00:01:01,100 --> 00:01:04,700 was a fantastic talk and he's smarter than I am, but I'm going to do some different things 14 00:01:04,700 --> 00:01:10,180 based on some of his work. So we have the problem of large collections of information 15 00:01:10,180 --> 00:01:16,660 and we have two issues here. One is let's say you look at a Nessus scan of a network 16 00:01:16,660 --> 00:01:22,080 and you get, you know, a lot of information. There's two problems. The first one is does 17 00:01:22,080 --> 00:01:27,280 this, does any particular piece of information in that scan output make sense to you? That's 18 00:01:27,280 --> 00:01:33,420 hard to say. And then the second thing is do these two pieces of information go together? 19 00:01:33,600 --> 00:01:38,040 And that's hard to say, too. One of the problems with vulnerability scanners in general, of 20 00:01:38,040 --> 00:01:43,720 course, is that they look at each system that they scan as just its world unto itself. They 21 00:01:43,720 --> 00:01:47,260 don't understand that they participate in a whole environment. They don't know what 22 00:01:47,260 --> 00:01:50,380 kinds of things are important about them and so forth. And so we're going to try to 23 00:01:50,380 --> 00:01:52,060 do, see what we can do about that. 24 00:01:52,060 --> 00:01:54,800 We're going to talk about taking the information that they give us and making it more useful. 25 00:01:55,000 --> 00:01:58,280 So this is a picture of someone who believes that vulnerability scanners actually describe 26 00:01:58,280 --> 00:02:02,020 the security of their network. You can see he's got a seat reserved there on the bus. 27 00:02:04,640 --> 00:02:09,900 So we've seen recently some efforts to come up with solutions to these problems. We've 28 00:02:09,900 --> 00:02:14,440 seen a lot of security information management systems, things that do log aggregation, event 29 00:02:14,440 --> 00:02:21,620 roll-up, some kind of analysis of the patterns that they see. And that's all great. And then 30 00:02:21,620 --> 00:02:21,980 we also 31 00:02:22,060 --> 00:02:28,000 have seen in the non-product side of efforts to fix this problem or address this issue, 32 00:02:28,120 --> 00:02:35,520 we've seen two sort of parallel efforts. One is the increased emphasis on threat modeling. 33 00:02:35,700 --> 00:02:42,200 And I'm not a big zealot about fancy methodologies and producing documentation just so. When 34 00:02:42,200 --> 00:02:47,100 I talk about threat modeling, what I really mean usually is just being organized and consistent 35 00:02:47,100 --> 00:02:51,640 about how we describe things and rate them and rank them so that we are 36 00:02:51,640 --> 00:02:55,760 internally able to make apples to apples comparisons even though maybe nobody else 37 00:02:55,760 --> 00:03:00,000 in the world understands what we're talking about. So basically formal processes in place 38 00:03:00,000 --> 00:03:04,020 to make sure we're being thorough and we're being systematic about the way we describe 39 00:03:04,020 --> 00:03:04,300 risk. 40 00:03:04,560 --> 00:03:08,880 The second thing that we've seen getting a lot of attention lately are these operational 41 00:03:08,880 --> 00:03:15,440 frameworks, things like ITIL, COBIT, ISO 17799 or 27001 if you like fancier numbers, 42 00:03:17,760 --> 00:03:21,620 or the incident command system for incident handling. These are things that we see more 43 00:03:21,620 --> 00:03:28,580 that are trying to make responses to situations predictable and minimize risk 44 00:03:28,580 --> 00:03:32,620 through process so those are two two ways you know basically they're saying 45 00:03:32,620 --> 00:03:35,280 hey we can't really predict what kind of information we're going to gather but we 46 00:03:35,280 --> 00:03:38,360 know we're gonna have the same plan no matter what information we gather these 47 00:03:38,360 --> 00:03:42,960 are the steps we're gonna follow all right so what's our goal here so there's 48 00:03:42,960 --> 00:03:47,040 no shortage of information and in the aftermath of the 9-11 attacks a lot of 49 00:03:47,040 --> 00:03:49,680 intelligence agencies said that the problem was not that they didn't have 50 00:03:49,680 --> 00:03:53,000 data about what was going on it was they couldn't go through all of it so 51 00:03:53,000 --> 00:03:57,240 we're gonna try to find ways to organize the information that we collect in a way 52 00:03:57,240 --> 00:04:00,980 that it actually supports decision-making and just visualization 53 00:04:00,980 --> 00:04:05,680 is probably not enough so we're gonna make two two observations here the first 54 00:04:05,680 --> 00:04:11,180 thing is that security is not necessarily as hard as as it sounds when 55 00:04:11,180 --> 00:04:14,580 people talk about security it always seems really mysterious but sometimes 56 00:04:14,580 --> 00:04:17,180 that's just this perception of complexity and maybe we can do some 57 00:04:17,180 --> 00:04:19,560 things to reduce that the second thing is to note 58 00:04:19,560 --> 00:04:19,660 you know we've been talking about security for a long time and you know 59 00:04:19,660 --> 00:04:23,380 that the same set of data might contain multiple messages that are interesting 60 00:04:23,380 --> 00:04:27,240 to us so for example here's a little puzzle if you saw this sequence of 61 00:04:27,240 --> 00:04:31,380 numbers would you know what the next number is well what if you saw it 62 00:04:31,380 --> 00:04:35,020 organized like this same sequence of numbers but you're pretty good at 63 00:04:35,020 --> 00:04:39,820 guessing what comes after the two now so sometimes just the way we look at the 64 00:04:39,820 --> 00:04:43,800 information we see can be very helpful to us in terms of putting it in some 65 00:04:43,800 --> 00:04:47,040 sort of context for us so now we're going to make the transition to the 66 00:04:47,040 --> 00:04:49,460 scary math portion of the presentation and we're going to 67 00:04:49,460 --> 00:04:54,680 talk briefly about graph theories graph theory and so we're going to define what 68 00:04:54,680 --> 00:04:58,560 a graph is and I don't mean things like bar charts and stuff like that I'm 69 00:04:58,560 --> 00:05:02,680 talking about mathematical graphs which are sets of two kinds of things the 70 00:05:02,680 --> 00:05:07,600 first is what we call a vertex or a node a thing on the graph and then the 71 00:05:07,600 --> 00:05:11,740 edge is just a connection between any two vertices and I'm going to so you can 72 00:05:11,740 --> 00:05:14,300 have connections that are one-way only I'm only going to work with two-way 73 00:05:14,300 --> 00:05:17,340 connections just to keep things simple if you can go one direction you can go 74 00:05:17,340 --> 00:05:19,320 the other direction on my graphs so this is how we 75 00:05:19,320 --> 00:05:23,660 write it a graph is a union of two things a set of vertices and a set of 76 00:05:23,660 --> 00:05:29,740 edges fine that's all very interesting so here let's look at one here we have a 77 00:05:29,740 --> 00:05:33,280 graph with five nodes on it so their set of vertices is one two three four and 78 00:05:33,280 --> 00:05:37,080 five and then we're going to define some edges as just basically the pairs of 79 00:05:37,080 --> 00:05:41,220 vertices that are connected so you can see that there is an edge from one to 80 00:05:41,220 --> 00:05:46,660 two on that graph right and from one to four so that's an example of a graph the 81 00:05:46,660 --> 00:05:47,720 way we describe it here 82 00:05:49,320 --> 00:05:52,980 alright so familiar graphs you might remember right routing tables spanning 83 00:05:52,980 --> 00:05:56,380 tree descriptions those are graphs that were familiar with in the networking 84 00:05:56,380 --> 00:06:00,380 world if you do software development things like entity relationship diagrams 85 00:06:00,380 --> 00:06:03,920 object relational diagrams those are the sorts of things that you might 86 00:06:03,920 --> 00:06:07,580 encounter those are also represented mathematically as graphs and then in 87 00:06:07,580 --> 00:06:13,300 regular life you might think of a subway or metro maps so the you know the the 88 00:06:13,300 --> 00:06:17,560 nodes are the subway stations and then the edges are the subway lines that you 89 00:06:17,560 --> 00:06:18,640 could take in between them 90 00:06:19,860 --> 00:06:25,180 all right swell so now we're getting to the point where we can say what the 91 00:06:25,180 --> 00:06:30,880 title of the talk comes from I did some work for an educational institution and 92 00:06:31,320 --> 00:06:33,920 they wanted one of the things that they wanted was a map of their network and it 93 00:06:33,920 --> 00:06:37,960 was a large national network it was confusing and they had lost track of it 94 00:06:37,960 --> 00:06:42,320 so they want to know where it was and what was connected to what and so I 95 00:06:42,320 --> 00:06:47,820 built a tool for doing this using these graphs right so we have two two types of 96 00:06:47,820 --> 00:06:48,800 nodes we have routers 97 00:06:48,800 --> 00:06:55,160 which are one type of node and then a net block like you know 192.168.0.0.8 so 98 00:06:55,660 --> 00:06:58,920 that would be a net block so we got those two types of nodes and then an edge 99 00:06:58,920 --> 00:07:02,800 is just a connection between a router and a net block okay so is directly 100 00:07:02,800 --> 00:07:06,000 connected to so if you did it on a Cisco router show IP route and this net block 101 00:07:06,000 --> 00:07:13,220 is connected directly that would be an edge fine so we have this little snippet 102 00:07:13,220 --> 00:07:18,420 of code courtesy of P monkey in the front row P monkey stand up and say hi to the nice people 103 00:07:19,720 --> 00:07:26,340 this is just a little a little a little trick yeah yeah he's a sweetie a little thing for just 104 00:07:26,340 --> 00:07:32,400 walking through routers grabbing via SNMP they're routing tables and this you can just run this on 105 00:07:32,400 --> 00:07:38,120 your network and what we're going to do is take the the output of those things and we're going 106 00:07:38,120 --> 00:07:41,840 to massage it a little bit we're going to take every network that is directly connected and we're 107 00:07:41,840 --> 00:07:47,020 going to put it into a file the contents of which are the list of networks directly connected to 108 00:07:47,020 --> 00:07:48,600 the router and the name of that 109 00:07:48,800 --> 00:07:54,260 file is just something that helps us identify the router, like 10.1.10.1 was a router, so 110 00:07:54,260 --> 00:07:54,740 we call it that. 111 00:07:55,480 --> 00:07:55,920 Super. 112 00:07:56,060 --> 00:07:57,320 So, what do we get? 113 00:07:58,760 --> 00:08:01,760 Let's talk a little bit about graphs again. 114 00:08:01,960 --> 00:08:06,140 We can take the same graph that we saw earlier and represent it in a language called dot, 115 00:08:06,260 --> 00:08:10,980 which is just basically a language for describing the way a graph is. 116 00:08:11,380 --> 00:08:17,200 So you see we define our vertices, 1, 2, 3, 4, 5, and our edges, 1 to 2, 2 to 3, 2 to 117 00:08:17,200 --> 00:08:18,520 4, 3 to 5, and so forth. 118 00:08:18,720 --> 00:08:23,280 And then we can use something like graphvis to render that into the image that you see 119 00:08:23,280 --> 00:08:24,000 on the right there. 120 00:08:25,460 --> 00:08:29,900 Dot language is something that Afterglow works with and so forth. 121 00:08:30,880 --> 00:08:33,120 And that's where I got the idea of doing things this way. 122 00:08:33,540 --> 00:08:38,040 And then this is the, so this is the command line that you use to generate that graph from 123 00:08:38,040 --> 00:08:39,460 the dot file on the left. 124 00:08:40,500 --> 00:08:40,900 Fine. 125 00:08:40,900 --> 00:08:41,200 Super. 126 00:08:41,820 --> 00:08:42,220 Amazing. 127 00:08:42,760 --> 00:08:45,760 So this is the graph that we got for that network. 128 00:08:46,440 --> 00:08:47,080 And it's 129 00:08:47,200 --> 00:08:48,820 horribly disgusting in this format. 130 00:08:49,320 --> 00:08:53,080 And on my laptop I have a tool that I can zoom in on it. 131 00:08:55,400 --> 00:08:57,760 So I'm going to see if I can do that here. 132 00:09:00,880 --> 00:09:02,920 Note my one-handed Windows skills. 133 00:09:09,480 --> 00:09:10,760 No previews, please. 134 00:09:11,820 --> 00:09:12,900 Just this. 135 00:09:15,160 --> 00:09:17,180 Let's see if we can see this. 136 00:09:17,180 --> 00:09:17,900 See it a little larger. 137 00:09:19,980 --> 00:09:20,840 All right. 138 00:09:21,420 --> 00:09:23,960 Now there's kind of a magnifying glass over here. 139 00:09:24,860 --> 00:09:28,920 So let's just zoom in on a portion of the graph. 140 00:09:30,180 --> 00:09:31,720 And it's not liking me. 141 00:09:31,820 --> 00:09:37,420 But you can believe me, or not, that each of the red things, oh, pretty. 142 00:09:37,920 --> 00:09:38,380 All right. 143 00:09:38,400 --> 00:09:40,340 So the red objects are the net blocks. 144 00:09:42,160 --> 00:09:44,640 And the green objects are the routers. 145 00:09:44,780 --> 00:09:47,080 I colored the internet yellow so that we could see. 146 00:09:47,080 --> 00:09:47,880 See where the connections are. 147 00:09:48,240 --> 00:09:49,100 And this is kind of fun. 148 00:09:49,860 --> 00:09:51,420 And so I was very proud of this tool. 149 00:09:51,500 --> 00:09:52,460 And I wanted to show it off. 150 00:09:52,720 --> 00:09:58,100 And so I sent it to a mailing list internal to my company about how swell Cisco networking 151 00:09:58,100 --> 00:09:58,960 technology is. 152 00:09:59,140 --> 00:10:02,940 And I sent it to that, hoping that everyone would be very happy with me and praise me. 153 00:10:03,080 --> 00:10:06,960 And I got exactly two responses from the two engineers that I like and respect most at 154 00:10:06,960 --> 00:10:07,300 the company. 155 00:10:07,480 --> 00:10:08,820 And one of them said, this is awesome. 156 00:10:09,280 --> 00:10:10,620 You know, I want to use this all the time. 157 00:10:10,720 --> 00:10:11,800 And the other one said, this is bullshit. 158 00:10:12,100 --> 00:10:13,380 It doesn't tell me anything. 159 00:10:13,640 --> 00:10:15,260 And so that's why we're calling the talk this. 160 00:10:15,260 --> 00:10:18,740 So now we come to the central question. 161 00:10:18,900 --> 00:10:20,640 Is this awesome or is it bullshit? 162 00:10:20,780 --> 00:10:23,080 So I think there are points to be made on either side. 163 00:10:23,240 --> 00:10:26,920 On the awesome side, this has very strong nerd appeal, right? 164 00:10:27,000 --> 00:10:31,400 We can all agree that there's a simple image here and it's summarizing a great deal of 165 00:10:31,400 --> 00:10:31,680 data. 166 00:10:31,780 --> 00:10:32,800 And that's kind of cool. 167 00:10:32,980 --> 00:10:36,300 And so you could, if you had a magnifying glass and sufficient patience, you could find 168 00:10:36,300 --> 00:10:38,780 any piece of information that you were interested in in there. 169 00:10:38,920 --> 00:10:41,640 This is a whole lot easier than drawing that whole mess out by Visio. 170 00:10:41,760 --> 00:10:42,640 And it's cheap, too. 171 00:10:42,760 --> 00:10:45,240 Because the, you know, the software's cheap. 172 00:10:45,260 --> 00:10:45,380 It's free. 173 00:10:45,540 --> 00:10:46,500 And you can, it's on your CD. 174 00:10:46,660 --> 00:10:47,340 You can just have it. 175 00:10:47,640 --> 00:10:52,680 However, on the opposing side, it looks just like a spirograph. 176 00:10:53,220 --> 00:10:55,400 It doesn't really convey any message. 177 00:10:55,500 --> 00:10:57,880 It doesn't support any conclusion, right? 178 00:10:58,460 --> 00:11:03,660 So the engineer who said bullshit said, it's better to summarize data that's redundant 179 00:11:03,660 --> 00:11:04,120 or repetitive. 180 00:11:04,260 --> 00:11:06,480 You saw like 96 sites that looked exactly the same. 181 00:11:06,580 --> 00:11:08,060 They all had four net blocks hanging off of them. 182 00:11:08,380 --> 00:11:09,840 You probably all noticed that, right? 183 00:11:11,800 --> 00:11:14,760 And so graphs like this might actually distract from. 184 00:11:15,260 --> 00:11:16,680 The information that you're trying to find. 185 00:11:16,780 --> 00:11:18,740 And it might minimize the importance of problems. 186 00:11:18,880 --> 00:11:21,180 And that's not what we want when we're trying to make a point about security. 187 00:11:21,900 --> 00:11:22,460 All right. 188 00:11:23,620 --> 00:11:27,660 So let's talk a little bit about what my central theme here is. 189 00:11:28,400 --> 00:11:31,760 I'm really interested, I'm kind of obsessed with trust between systems. 190 00:11:31,980 --> 00:11:33,220 And so this is a quote from Halvar. 191 00:11:33,380 --> 00:11:38,860 And he's saying that almost all real hacking is done via transitive trust, which is, you 192 00:11:38,860 --> 00:11:41,860 know, you break into one system and having that degree of access gets you into another 193 00:11:41,860 --> 00:11:42,100 one. 194 00:11:42,380 --> 00:11:44,000 And he says my favorite quote. 195 00:11:45,260 --> 00:11:47,060 All hacking gets too little credit at security conferences. 196 00:11:47,220 --> 00:11:50,320 I'm on a personal mission to change that and have been for some years now. 197 00:11:51,460 --> 00:11:57,360 Another quote that I wanted to cite was from my colleague Sherdlu over at the side of 198 00:11:57,360 --> 00:11:57,520 the room. 199 00:11:58,160 --> 00:12:02,140 She was participating in a discussion with Steve Christie from MITRE. 200 00:12:02,240 --> 00:12:05,060 He asked the question, what is the state of vulnerability research? 201 00:12:05,420 --> 00:12:11,240 And the very excellent point was made that really what we consider vulnerability research 202 00:12:11,240 --> 00:12:14,280 is generally not research the way formal academic research is. 203 00:12:14,320 --> 00:12:14,940 And there should be. 204 00:12:14,940 --> 00:12:19,960 There should be maybe some degree of emphasis on trying to make this a little bit more rigorous. 205 00:12:20,300 --> 00:12:21,460 And I like that point. 206 00:12:22,060 --> 00:12:25,400 I also am sick of the idea of just data for its own sake. 207 00:12:25,560 --> 00:12:27,380 And that's what's wrong with the Spirograph graph, right? 208 00:12:27,440 --> 00:12:32,120 So this is an old essay from Bruce Schneier when he's trying to make the point that counterpane 209 00:12:32,120 --> 00:12:32,520 is cool. 210 00:12:33,900 --> 00:12:37,680 So 41% of the attacks we saw were unauthorized activity of some kind. 211 00:12:37,780 --> 00:12:41,320 Well, as opposed to this, you know, 59% of authorized attacks. 212 00:12:41,520 --> 00:12:41,840 I'm not sure. 213 00:12:42,500 --> 00:12:43,840 21% were scanning. 214 00:12:44,060 --> 00:12:44,260 You know. 215 00:12:44,260 --> 00:12:46,260 But what does this information do for you? 216 00:12:46,360 --> 00:12:47,760 What do you make out of that? 217 00:12:47,860 --> 00:12:49,840 How does that help you live your life better? 218 00:12:51,100 --> 00:12:53,860 So I also cite a number of different sources. 219 00:12:54,180 --> 00:12:58,300 One is Dan Burrows' talk from DEF CON 9, which introduced me to the idea that you could 220 00:12:58,300 --> 00:13:00,120 actually do math on data that you collect. 221 00:13:00,700 --> 00:13:06,700 The second one is a research that I'm familiar with from the UW Madison near my hometown. 222 00:13:07,040 --> 00:13:12,880 And this is a person who does computation on graphs. 223 00:13:13,360 --> 00:13:13,960 Trying to. 224 00:13:14,260 --> 00:13:16,180 Trying to do computation on graphs that represent attack patterns. 225 00:13:16,600 --> 00:13:20,420 I'm not doing fancy model checking, which is this strange algebra on top of the graphs. 226 00:13:20,580 --> 00:13:22,440 I don't bother with scary stuff like that. 227 00:13:22,960 --> 00:13:25,800 Rafael Marti's talk at DEF CON 13 blew my mind. 228 00:13:25,920 --> 00:13:27,380 And that made me want to start drawing pictures. 229 00:13:27,740 --> 00:13:29,020 And then K.S. 230 00:13:29,140 --> 00:13:35,980 Golubitsky's talk at LISA 05 on using automated tools to draw security conclusions, specifically 231 00:13:36,480 --> 00:13:37,660 computing attack surfaces. 232 00:13:37,880 --> 00:13:38,840 This is really interesting stuff. 233 00:13:39,040 --> 00:13:43,140 I recommend all of these pieces of research to you if you are having trouble sleeping 234 00:13:43,140 --> 00:13:44,420 and just want to know more about this stuff. 235 00:13:44,840 --> 00:13:49,580 So we have a number of tools previously released that we have incremental advances to. 236 00:13:50,900 --> 00:13:53,040 All of these are available from foofus.net. 237 00:13:53,300 --> 00:13:55,900 The latest revision of OWNR is not up there yet. 238 00:13:55,980 --> 00:13:56,920 I'll put it up when I get back. 239 00:13:58,400 --> 00:14:01,280 Basically this is just a NetBIOS information gathering tool. 240 00:14:01,680 --> 00:14:03,000 It's sort of general purpose. 241 00:14:03,120 --> 00:14:09,300 And the nice thing about it is that it puts things out in comma-separated files or character-separated 242 00:14:09,300 --> 00:14:13,080 files so that you can quickly find things in them using graphics. 243 00:14:13,080 --> 00:14:20,440 And we've had some improvements since it was shown then. 244 00:14:20,620 --> 00:14:23,380 It's actually thread safe, so we can do multi-threaded analysis. 245 00:14:23,940 --> 00:14:26,700 We've improved the active directory functionality and so forth. 246 00:14:27,340 --> 00:14:28,240 It's fun. 247 00:14:28,960 --> 00:14:32,900 Another tool is FGDUMP written by Fizzgig down in the front row. 248 00:14:32,960 --> 00:14:34,700 Fizzgig, stand up and say hi to the nice people. 249 00:14:35,260 --> 00:14:37,420 This is a replacement for PWDUMP. 250 00:14:37,540 --> 00:14:38,860 It is way better. 251 00:14:39,440 --> 00:14:43,060 Fizzgig also released PWDUMP 6, but it is superseded by FGDUMP 5. 252 00:14:43,060 --> 00:14:50,040 It is smart enough to do things like turn off anti-virus and anti-spyware things that it encounters 253 00:14:50,040 --> 00:14:55,180 so you don't DOS the machine that you're trying to dump passwords out of. It does a lot of nice stuff. 254 00:14:55,820 --> 00:15:01,540 So it was initially released at TourCon 7. There was a much better release around Christmas time, right? Yeah. 255 00:15:02,320 --> 00:15:06,920 So it's it's very nice. It's a sort of Swiss Army knife password dumping tools. 256 00:15:06,980 --> 00:15:09,860 It gets cached passwords and password history and stuff like that. Very fun. 257 00:15:09,860 --> 00:15:17,260 Another one is Medusa written by Jomo Kuhn who is not in the room. He's off seeing the EFF and I'm gravely insulted. 258 00:15:18,160 --> 00:15:25,820 It's just a good password grinder. It's a replacement for Hydra from THC, but it's designed specifically for giant multi-threading. 259 00:15:25,980 --> 00:15:29,320 It's very modular and you should get it and you'll love it. 260 00:15:30,260 --> 00:15:31,460 All right. So 261 00:15:32,140 --> 00:15:37,660 where are we? We're back to our matrix here, our graph here. So we've seen the dot representation of that graph. 262 00:15:37,820 --> 00:15:39,600 We've seen the visual representation of the graph. 263 00:15:39,680 --> 00:15:39,840 So we've seen the dot representation of that graph. 264 00:15:39,840 --> 00:15:41,700 We can also have a mathematical one. 265 00:15:41,960 --> 00:15:46,020 So we're gonna make ourselves a little matrix and the edge columns are just labels, right? 266 00:15:46,120 --> 00:15:49,240 One, two, three, four, and five. And one, two, three, four, and five down the sides. 267 00:15:49,420 --> 00:15:54,160 And what's interesting is the cells in there. Can I highlight this? Well, not really. Anyway, so 268 00:15:55,180 --> 00:16:00,220 rows like this. So for each cell what we do is if there is a connection between 269 00:16:01,460 --> 00:16:03,300 node one and 270 00:16:03,300 --> 00:16:09,600 say node two, we're gonna put a one in that cell. And if there isn't a connection between say node one and node three, 271 00:16:09,600 --> 00:16:13,340 we're gonna put a zero in that cell. And what we when we say connection, we mean just direct connection. 272 00:16:13,520 --> 00:16:19,040 They're right next door to each other. Okay, so what's called an adjacency matrix. It's a matrix of just ones and zeros and 273 00:16:19,480 --> 00:16:24,600 the ones I draw always have ones down the diagonal. If that's just a style point, you can do it differently if you like. 274 00:16:25,020 --> 00:16:27,320 So if you're on one, you can get to one in other words. 275 00:16:27,980 --> 00:16:33,760 Super. Okay, so we can represent the matrix that way or the graph that way. We can also multiply matrices together. 276 00:16:33,980 --> 00:16:39,580 These are two notations for doing that. The top one is sort of more like you would write a program to do it. 277 00:16:39,600 --> 00:16:42,800 The bottom one is what's called Einstein notation. That's named after some guy. 278 00:16:44,160 --> 00:16:45,520 And so the original 279 00:16:46,320 --> 00:16:51,540 adjacency matrix shows paths of length one, right? If we square that matrix, if we multiply it by itself, 280 00:16:52,040 --> 00:16:59,080 we'll see where there are paths of length two. So any place that there is a non-zero entry in one of these rows, 281 00:16:59,160 --> 00:17:04,340 it means there's a path of length two between these two things. In other words, this is a totally connected matrix. 282 00:17:04,480 --> 00:17:06,140 There are no zero 283 00:17:06,960 --> 00:17:09,580 nodes in here at all from any one 284 00:17:09,580 --> 00:17:13,720 node you can get anyplace else. And you can see that just visually inspecting it, right? 285 00:17:13,800 --> 00:17:15,580 There's nobody that's isolated on there. 286 00:17:16,820 --> 00:17:21,260 All right, so a little bit more math and we'll be home free. 287 00:17:21,780 --> 00:17:24,740 So you'll notice, you'll remember from your algebra classes, right? 288 00:17:24,780 --> 00:17:26,780 The geometric series there. You have this 289 00:17:26,780 --> 00:17:32,720 polynomial 1 over 1 minus x. If you actually were to take a piece of paper and divide that out, you'd get 1 plus x plus x 290 00:17:32,720 --> 00:17:39,560 squared plus x cubed and so on to infinity. You can do the same thing with matrices. The identity matrix, which is depicted down here, 291 00:17:39,560 --> 00:17:45,940 is just a matrix that's all zeros with ones down the diagonal, so and then we'll represent that as i. So 1 over 292 00:17:46,720 --> 00:17:52,960 or yeah, 1 or i over i minus our matrix gives us the geometric series for matrices. 293 00:17:53,100 --> 00:17:57,340 So 1 plus m plus m squared plus m cubed, if m is our matrix. 294 00:17:57,720 --> 00:18:04,520 And what this allows us to do is compute something called closure or transitive closure on our graph. In other words, we can take 295 00:18:05,740 --> 00:18:09,040 an individual adjacency matrix and we can say, are there 296 00:18:09,560 --> 00:18:17,800 you know, regardless of the length of the path, can you get here from there? And so if you have a zero in a row in that matrix, you can't get there, and if you have anything else, you can get there. 297 00:18:18,840 --> 00:18:28,340 So, if we had a way of building matrices, we could quickly compute the set of nodes that are accessible on a network. So this set of non-zero elements. 298 00:18:29,040 --> 00:18:33,640 And that might be awesome. And not bullshit. We'll see. 299 00:18:34,600 --> 00:18:36,180 So here's how I've been going about it. 300 00:18:36,320 --> 00:18:38,940 I take a number of different tools. 301 00:18:38,940 --> 00:18:41,260 OWNR to gather user account information. 302 00:18:42,100 --> 00:18:45,200 Nessus gives me information about vulnerabilities on systems. 303 00:18:45,640 --> 00:18:47,480 Fgdump grabs passwords for me. 304 00:18:48,220 --> 00:18:51,480 Medusa sees if those passwords work any place else that I haven't touched. 305 00:18:51,780 --> 00:18:55,940 And what we do is we build ourselves an adjacency matrix out of that. 306 00:18:56,040 --> 00:18:59,640 So an adjacency matrix is, oh, there's Dan. Hi. Great talk. 307 00:19:01,180 --> 00:19:03,920 So an adjacency matrix out of this. 308 00:19:03,980 --> 00:19:07,920 So what we're going to do is anytime we have passwords from a system 309 00:19:07,920 --> 00:19:08,860 and you have a user account 310 00:19:08,940 --> 00:19:12,040 and password that is repeated on another system. 311 00:19:12,240 --> 00:19:14,120 So system A has user Payton. 312 00:19:14,240 --> 00:19:15,840 Oh, that's me. I outed myself. 313 00:19:16,040 --> 00:19:16,220 Dan. 314 00:19:17,440 --> 00:19:19,360 User Fufas is on system A. 315 00:19:19,420 --> 00:19:21,860 And then user Fufas is also on system B. 316 00:19:21,900 --> 00:19:23,000 And the two passwords match. 317 00:19:23,240 --> 00:19:25,180 We're going to describe those two systems as adjacent. 318 00:19:25,400 --> 00:19:27,040 And this is Halver's idea of transitive trust. 319 00:19:27,260 --> 00:19:29,400 If you hack one, you get to log into the other one for free. 320 00:19:30,080 --> 00:19:33,540 All right. So we're going to build an adjacency matrix out of that. 321 00:19:33,620 --> 00:19:35,920 And on your CD you have a tool for doing that. 322 00:19:36,380 --> 00:19:38,340 And what I have been doing is 323 00:19:38,340 --> 00:19:40,080 then doing some cleanup. 324 00:19:40,260 --> 00:19:42,600 If you have multiple domain controllers on a network, 325 00:19:42,800 --> 00:19:45,040 you want to prune those out and reduce it to just one 326 00:19:45,040 --> 00:19:46,480 because they're the same anyway, et cetera. 327 00:19:47,400 --> 00:19:49,600 And we're going to convert that to dot language 328 00:19:49,600 --> 00:19:51,240 and we're going to draw a picture of it. 329 00:19:51,360 --> 00:19:53,580 And that's going to be cool. 330 00:19:53,740 --> 00:19:54,800 And everyone's going to think we're neat. 331 00:19:54,980 --> 00:19:58,660 So this is a school district measured this way. 332 00:19:58,780 --> 00:20:01,540 And again, we have the same problem that we did 333 00:20:01,540 --> 00:20:03,400 with our other graph. 334 00:20:03,680 --> 00:20:04,600 Let's get rid of this. 335 00:20:05,080 --> 00:20:06,860 And let's bring up this. 336 00:20:06,860 --> 00:20:08,620 This guy. 337 00:20:09,560 --> 00:20:16,100 So here we've got about 312 different systems, 338 00:20:16,240 --> 00:20:20,780 which are represented by the blue ovals. 339 00:20:20,840 --> 00:20:21,600 Those are computers. 340 00:20:22,020 --> 00:20:26,480 And the orange rectangles represent connections 341 00:20:26,480 --> 00:20:28,540 between those computers. 342 00:20:29,680 --> 00:20:34,160 So if we keep zooming in, you'll see 343 00:20:36,060 --> 00:20:38,860 come on, we just want to get to the point where it's legible. 344 00:20:39,760 --> 00:20:47,080 So what you'd see is IP addresses inside the blue kind of circles. 345 00:20:47,280 --> 00:20:50,140 And then inside the orange rectangles, 346 00:20:50,160 --> 00:20:53,180 you would see a user name and a password hash 347 00:20:53,180 --> 00:20:55,480 that match between those two systems. 348 00:20:55,880 --> 00:20:59,180 And that's kind of neat because what we can see all of a sudden 349 00:20:59,180 --> 00:21:02,920 is that we've got 314 systems on this graph, 350 00:21:02,920 --> 00:21:06,620 312 of them are connected by some kind of transitive trust. 351 00:21:06,920 --> 00:21:08,280 So in other words, if you hack one, 352 00:21:08,540 --> 00:21:11,580 you can basically romp all over the whole darn place. 353 00:21:13,140 --> 00:21:16,080 And what's sort of a couple interesting points. 354 00:21:16,260 --> 00:21:18,860 One is, oh, wake up laptop. 355 00:21:19,360 --> 00:21:22,140 Well, you saw there was a big sort of soccer ball shaped 356 00:21:22,140 --> 00:21:25,400 circle of nodes surrounding one account, 357 00:21:25,620 --> 00:21:27,160 which we're trying to get over to. 358 00:21:29,580 --> 00:21:31,520 That account happens to be named administrator. 359 00:21:31,520 --> 00:21:34,200 That's a password shared between, I don't know, 360 00:21:34,220 --> 00:21:34,920 a couple hundred systems. 361 00:21:36,520 --> 00:21:37,980 Let's just go back to the other view. 362 00:21:38,220 --> 00:21:40,020 And you'll just believe me that this is true. 363 00:21:40,640 --> 00:21:44,000 Also, you'll see that down here, there's a yellow octagon. 364 00:21:44,240 --> 00:21:46,100 If you have good enough eyes in this resolution, 365 00:21:46,280 --> 00:21:48,180 you might be able to see right there is a yellow octagon. 366 00:21:48,300 --> 00:21:49,540 That represents the domain controllers. 367 00:21:50,660 --> 00:21:54,080 And so basically there are, if you hack any one of these systems, 368 00:21:54,140 --> 00:21:56,500 you can get to all of them, including the domain. 369 00:21:56,660 --> 00:21:58,900 And that's, you know, kind of significant for their security. 370 00:22:00,000 --> 00:22:01,380 They thought that all they had to do 371 00:22:01,520 --> 00:22:02,560 was keep the domain controllers secure. 372 00:22:02,720 --> 00:22:04,600 But it turns out that the project of keeping their network secure 373 00:22:04,600 --> 00:22:08,020 is equivalent to the project of keeping all 314 systems on it secure. 374 00:22:08,260 --> 00:22:09,480 If one falls, they all fall. 375 00:22:10,260 --> 00:22:11,520 So that was kind of fun. 376 00:22:11,760 --> 00:22:15,200 But that graph really only conveys one message, 377 00:22:15,320 --> 00:22:16,260 which is you are owned. 378 00:22:16,600 --> 00:22:18,560 It does not help with anything else. 379 00:22:20,840 --> 00:22:24,240 And we want to see if we can't make it tell us more interesting things. 380 00:22:24,380 --> 00:22:26,640 So I call it this is somewhat bullshit, 381 00:22:27,200 --> 00:22:28,820 even though it was fun to make. 382 00:22:30,560 --> 00:22:32,820 So here's a little intermission for you. 383 00:22:32,980 --> 00:22:34,100 What do you think of this graph? 384 00:22:34,280 --> 00:22:37,760 This is from Greg Hogland and Gary McGraw's book, 385 00:22:37,820 --> 00:22:38,560 Exploiting Software. 386 00:22:39,520 --> 00:22:41,320 And I just love the caption here. 387 00:22:41,480 --> 00:22:43,000 This graph is rendered in three dimensions. 388 00:22:43,160 --> 00:22:44,120 First off, no, it's not. 389 00:22:44,260 --> 00:22:45,320 It's sitting right there on my screen. 390 00:22:45,620 --> 00:22:49,260 Each code location looks like a small room. 391 00:22:49,400 --> 00:22:50,900 I don't know what kind of rooms they live in. 392 00:22:52,280 --> 00:22:55,800 We use the OpenGL package to illustrate all the code paths 393 00:22:55,800 --> 00:22:58,720 leading toward a vulnerable S print, F call, and a target program. 394 00:22:58,820 --> 00:23:02,200 So let us just assume, they don't label it or anything clever like that, 395 00:23:02,260 --> 00:23:04,800 but let's just assume that this is the vulnerable S print, F call 396 00:23:04,800 --> 00:23:06,580 because everything seems to sort of be leading there. 397 00:23:06,860 --> 00:23:08,360 What are we to make of this graph? 398 00:23:08,540 --> 00:23:09,740 What on earth does it tell us? 399 00:23:09,940 --> 00:23:12,720 What is this room, which is not connected to anything? 400 00:23:14,140 --> 00:23:15,960 So what do you say? Awesome? 401 00:23:17,440 --> 00:23:18,240 Yeah, maybe. 402 00:23:18,980 --> 00:23:20,360 This is what I think. 403 00:23:26,860 --> 00:23:28,440 And I have nothing against this. 404 00:23:28,820 --> 00:23:31,320 It's a fine book, but that graph just blew me away. 405 00:23:31,700 --> 00:23:34,400 Okay, so let's see if we can start to make more sense here. 406 00:23:34,860 --> 00:23:39,700 The ISO 17799 standard is just a framework which claims to identify 407 00:23:39,700 --> 00:23:43,020 all of the stuff you ought to be doing if you are running your network well. 408 00:23:44,420 --> 00:23:49,160 It divides the project of running an organization up into 11 areas, 409 00:23:49,420 --> 00:23:52,480 and then those areas are subdivided into what are called objectives, 410 00:23:52,760 --> 00:23:54,220 so you have about 140 objectives. 411 00:23:54,820 --> 00:23:55,920 So that's that standard. 412 00:23:56,060 --> 00:23:57,260 We're going to use another standard, too, 413 00:23:58,820 --> 00:24:01,560 800-26, because they were just totally into sexy titles over at NIST. 414 00:24:02,340 --> 00:24:05,740 800-26, Guide to Self-Assessment of Networks. 415 00:24:05,820 --> 00:24:08,120 And they define a scale from 1 to 5 416 00:24:09,160 --> 00:24:12,860 about how far along you are in terms of making progress towards security virtue. 417 00:24:13,160 --> 00:24:14,260 Have you written a policy? 418 00:24:15,440 --> 00:24:18,800 Have you actually written a procedure for how you're going to execute on that policy? 419 00:24:19,080 --> 00:24:20,460 Are you doing that procedure? 420 00:24:20,800 --> 00:24:24,140 Have you put things in there so that you're testing to see that the procedure works? 421 00:24:24,300 --> 00:24:25,920 And then when you find that it's failed, 422 00:24:25,980 --> 00:24:28,320 do you have a procedure for taking steps to learn from that problem? 423 00:24:28,320 --> 00:24:29,500 And making progress? 424 00:24:29,680 --> 00:24:31,880 We've added a level zero, which means, 425 00:24:31,980 --> 00:24:33,760 holy cow, we never even thought of that yet. 426 00:24:35,080 --> 00:24:37,860 So we're going to take these two ideas, 427 00:24:38,120 --> 00:24:39,840 and you see I've assigned color codes to them. 428 00:24:39,920 --> 00:24:41,460 NIST did not bother to color these things. 429 00:24:41,860 --> 00:24:45,260 And what we're going to do is take those 11 areas, 430 00:24:45,900 --> 00:24:48,400 and we're going to represent for an organization, 431 00:24:48,620 --> 00:24:49,740 we're going to say, where are they? 432 00:24:49,780 --> 00:24:53,540 On that NIST scale for each of the 140 objectives. 433 00:24:53,920 --> 00:24:58,000 And we're going to recognize the hierarchical organization of that standard, 434 00:24:58,320 --> 00:25:00,060 so we have the standard, 11 areas, 435 00:25:00,280 --> 00:25:03,340 and 140 objectives distributed among those 11 areas. 436 00:25:03,640 --> 00:25:06,320 And what we're going to do is color each of those objectives 437 00:25:06,320 --> 00:25:09,200 based on their NIST ranking. 438 00:25:09,840 --> 00:25:13,060 And then we're going to draw a picture of that. 439 00:25:13,980 --> 00:25:15,820 How do we do this for ourselves at home? 440 00:25:15,940 --> 00:25:17,480 Oh yeah, another free tool that's on your CD. 441 00:25:18,280 --> 00:25:19,920 This is the kind of picture we get. 442 00:25:20,380 --> 00:25:23,380 So you can see the central, here's the standard. 443 00:25:24,020 --> 00:25:26,040 The color codes represent how we're doing. 444 00:25:26,040 --> 00:25:31,000 And what I do is for every area where there is something that's not ideal, 445 00:25:31,600 --> 00:25:33,780 or for every objective that's not ideal, 446 00:25:33,940 --> 00:25:37,640 the area represented by it gets sort of the lowest common denominator. 447 00:25:37,840 --> 00:25:41,440 So if you have one orange, this area turns orange. 448 00:25:41,560 --> 00:25:43,000 And this is a way of sort of visually representing 449 00:25:43,000 --> 00:25:44,580 how you're doing along with the ISO standard. 450 00:25:44,860 --> 00:25:46,800 It's a nice way to measure progress. 451 00:25:46,960 --> 00:25:48,980 I don't really care much about ISO certification, 452 00:25:49,320 --> 00:25:52,320 but this is a way of showing sort of what's holding you back in your organization, 453 00:25:52,500 --> 00:25:53,920 what things might be going better. 454 00:25:54,720 --> 00:25:58,780 All right, so that actually I claim represents something interesting. 455 00:25:58,920 --> 00:26:00,160 It helps you support a conclusion. 456 00:26:00,340 --> 00:26:02,000 It tells you where to focus your effort and so forth. 457 00:26:02,940 --> 00:26:04,800 Now the old plan was kind of cumbersome. 458 00:26:05,140 --> 00:26:08,100 It didn't provide much organization of our information. 459 00:26:08,360 --> 00:26:10,040 That's that school district graph I showed earlier. 460 00:26:10,220 --> 00:26:12,420 It didn't really support multiple views of the data. 461 00:26:12,480 --> 00:26:15,800 And we know we might want to visualize things more than one way. 462 00:26:16,100 --> 00:26:17,440 So we have a new plan. 463 00:26:17,580 --> 00:26:20,900 We're going to decouple the description of the data 464 00:26:20,900 --> 00:26:22,460 from the analysis of the data. 465 00:26:22,460 --> 00:26:26,700 And I'll tell you what I mean after, in just a moment. 466 00:26:26,840 --> 00:26:30,460 I'm also, I used to run things through afterglow to generate my dot files. 467 00:26:30,800 --> 00:26:34,840 I'm ditching afterglow not because afterglow isn't superior to my work in every way, 468 00:26:34,960 --> 00:26:37,200 but just because it's designed for a specific purpose 469 00:26:37,200 --> 00:26:39,860 and I want to be more granular with the way I manage dot. 470 00:26:41,400 --> 00:26:43,920 So what we're going to do is harvest our raw data, 471 00:26:44,020 --> 00:26:46,160 the same as we used to except that the tools are fancier now. 472 00:26:46,660 --> 00:26:48,660 We're going to render those into adjacency files 473 00:26:48,660 --> 00:26:51,240 with this map adjacencies program which is on your CD. 474 00:26:51,240 --> 00:26:53,200 And we're going to do this in two ways. 475 00:26:53,280 --> 00:26:56,200 We're going to represent an adjacency matrix and also adjacency lists. 476 00:26:56,420 --> 00:26:59,140 Just two equivalent representations of the same information. 477 00:26:59,480 --> 00:27:03,460 And now we can write simple scripts that just process those lists. 478 00:27:03,760 --> 00:27:05,200 You know, where can I get to from this node? 479 00:27:05,520 --> 00:27:08,600 What user account is connected to the most things and stuff like that. 480 00:27:08,740 --> 00:27:10,600 We can start making more interesting pictures. 481 00:27:12,880 --> 00:27:16,760 So we have that radiating view like we just saw with the ISO standard. 482 00:27:16,940 --> 00:27:18,240 We can also rank things. 483 00:27:18,680 --> 00:27:21,120 This is, let's see if we can't. 484 00:27:21,980 --> 00:27:22,680 Ditch that. 485 00:27:23,100 --> 00:27:24,760 Get ourselves one more picture. 486 00:27:30,080 --> 00:27:33,100 We can also draw things ranked as trees. 487 00:27:33,220 --> 00:27:34,900 This is a manufacturing company. 488 00:27:37,380 --> 00:27:39,760 Hopefully this one will zoom in a little faster than the others. 489 00:27:40,000 --> 00:27:40,060 Draw a box. 490 00:27:40,880 --> 00:27:41,360 Pardon? 491 00:27:41,700 --> 00:27:42,300 Draw a box. 492 00:27:43,840 --> 00:27:45,320 Oh, draw a box. 493 00:27:47,820 --> 00:27:49,340 I don't know how to draw a box. 494 00:27:52,000 --> 00:27:52,540 All right. 495 00:27:52,600 --> 00:27:54,620 All y'all box masters out there are better than me. 496 00:27:56,480 --> 00:28:01,780 So anyway, what's interesting here is we see that this system up at the top, from there 497 00:28:01,780 --> 00:28:02,760 you can get to one system. 498 00:28:02,920 --> 00:28:05,080 From this one, you're connected to just about everything. 499 00:28:05,360 --> 00:28:06,580 All of these are interconnected. 500 00:28:07,640 --> 00:28:09,280 That goes down to another stratum. 501 00:28:09,440 --> 00:28:13,460 And then what's interesting here is that the farthest away, what this shows us on this 502 00:28:13,460 --> 00:28:19,420 network is the farthest away you can be is one, two, three, four hops. 503 00:28:19,540 --> 00:28:21,220 Within four hops, you're every place on this network. 504 00:28:21,240 --> 00:28:25,460 And I think that's a sort of more interestingly organized presentation of the same kind of 505 00:28:25,460 --> 00:28:26,440 information we had before. 506 00:28:26,780 --> 00:28:29,580 It actually supports some kinds of decision making. 507 00:28:29,840 --> 00:28:31,600 What if we isolated this system? 508 00:28:31,700 --> 00:28:33,620 Then everyone would be safe against attack from that. 509 00:28:33,740 --> 00:28:37,240 Or what is this one account that's shared between all of these? 510 00:28:37,340 --> 00:28:38,860 Maybe we could get rid of that. 511 00:28:39,300 --> 00:28:42,880 I think those are the sorts of things that will help us actually make progress. 512 00:28:43,540 --> 00:28:44,140 All right. 513 00:28:44,380 --> 00:28:44,780 Now. 514 00:28:45,100 --> 00:28:46,820 How do you assign the rank to the top system? 515 00:28:47,600 --> 00:28:49,260 The way I assign the rank for the top system? 516 00:28:49,400 --> 00:28:50,240 Oh, that's a great question. 517 00:28:51,460 --> 00:28:55,060 What I did was I picked the system that I was interested in and I said that's the top system. 518 00:28:55,440 --> 00:28:58,900 And that's the, so, but seriously, that's actually the point of this. 519 00:28:59,060 --> 00:29:02,660 I want to be able to interrogate this data in ways that are interesting to me. 520 00:29:02,740 --> 00:29:04,180 I want to be able to ask questions about it. 521 00:29:04,240 --> 00:29:08,920 So when I'm interested in that one top system and I want to know about it, that's the glory of 522 00:29:08,920 --> 00:29:14,660 decoupling the rendering into adjacency files from the analysis of those adjacency files. 523 00:29:14,780 --> 00:29:18,000 I can write a thing that says, well, for any given host, what can I learn about it? 524 00:29:18,000 --> 00:29:20,540 And that's, so, I don't know who asked that question. 525 00:29:20,600 --> 00:29:21,240 That was a good question. 526 00:29:21,320 --> 00:29:21,720 And thank you. 527 00:29:24,800 --> 00:29:25,320 All right. 528 00:29:26,740 --> 00:29:30,720 So this is a familiar graph which I stole from Counterpane. 529 00:29:33,380 --> 00:29:34,840 This is what's called an attack tree. 530 00:29:35,220 --> 00:29:40,560 And the goal, basically, the goal here is, you know, I want to open a safe. 531 00:29:40,660 --> 00:29:42,160 So what are the different ways that could happen? 532 00:29:42,340 --> 00:29:43,020 I could pick the lock. 533 00:29:43,140 --> 00:29:43,860 I could learn the combination. 534 00:29:44,040 --> 00:29:45,080 Well, how might I learn the combination? 535 00:29:45,300 --> 00:29:46,240 I might find it written down. 536 00:29:46,400 --> 00:29:47,580 I might get it from somebody. 537 00:29:47,700 --> 00:29:47,980 How might I learn the combination? 538 00:29:48,000 --> 00:29:48,360 How might I get it? 539 00:29:48,420 --> 00:29:50,520 Well, I might threaten them or I might eavesdrop on them, et cetera. 540 00:29:50,680 --> 00:29:54,500 So this is a way of sort of modeling your adversary's decision-making process. 541 00:29:54,660 --> 00:29:59,620 And what I'm hoping is that graphs like this can actually model, well, if this is the system 542 00:29:59,620 --> 00:30:04,080 we're interested in keeping safe, what are all the ways you could get to it? 543 00:30:04,560 --> 00:30:08,640 And that's a sort of interesting question, I think, to be able to ask and answer. 544 00:30:09,960 --> 00:30:10,540 All right. 545 00:30:14,160 --> 00:30:14,960 All right. 546 00:30:15,500 --> 00:30:17,200 So we can start asking things like, 547 00:30:17,200 --> 00:30:20,400 can we rank hosts in order of their security importance? 548 00:30:20,620 --> 00:30:24,840 So things that are directly connected to other things versus things that are connected indirectly. 549 00:30:25,760 --> 00:30:30,220 Can we, if we know where, what we're interested in protecting, 550 00:30:30,420 --> 00:30:34,040 can we say all of the different paths to it via transitive trust? 551 00:30:35,200 --> 00:30:40,220 Those are the sorts of questions I'm hoping we'll be able to answer with our newfangled tools. 552 00:30:40,760 --> 00:30:43,480 And then you have this idea of degrees of separation on the network, 553 00:30:43,640 --> 00:30:46,680 emphasizing the importance of like one central system that's, 554 00:30:46,680 --> 00:30:49,060 or central account that's connected to all others. 555 00:30:49,840 --> 00:30:50,500 All right. 556 00:30:50,540 --> 00:30:54,840 So how does this line up in terms of what we actually are experiencing in the world? 557 00:30:54,900 --> 00:30:57,820 Here's the old window of vulnerability problem, right? 558 00:30:58,800 --> 00:31:03,500 You have, security nerds are always telling you to think about risk in terms of dollars per year, right? 559 00:31:03,520 --> 00:31:07,040 Annual rate of occurrence of security incidents versus, you know, 560 00:31:07,040 --> 00:31:09,440 the cost of a single security incident, single loss expectancy. 561 00:31:10,720 --> 00:31:16,340 And when you have a security solution, most products that people, 562 00:31:16,680 --> 00:31:18,900 notice security vendors never sell you a product, they sell you a solution. 563 00:31:19,740 --> 00:31:25,500 When they sell you the solution, what they're really focusing on usually is reducing the frequency of security incidents. 564 00:31:25,740 --> 00:31:31,740 So we buy a countermeasure that is supposed to make it impossible for certain things to happen to us. 565 00:31:33,220 --> 00:31:36,880 But, so what's interesting about this graph, which is, 566 00:31:36,880 --> 00:31:41,780 this is sort of trying to model the way the big internet worms of the early part of this decade happened. 567 00:31:42,280 --> 00:31:46,000 You'd have always some background noise of systems getting compromised. 568 00:31:46,000 --> 00:31:50,000 And then someone would figure out something was wrong with a system and they'd learn how to hack it. 569 00:31:50,160 --> 00:31:51,560 Stuff would start getting owned. 570 00:31:52,480 --> 00:31:55,580 Usually a patch would get introduced, but nobody paid attention to it. 571 00:31:55,720 --> 00:31:58,840 Then someone would automate the exploit and things would go through the roof. 572 00:31:59,020 --> 00:32:00,400 Then we'd start patching. 573 00:32:00,640 --> 00:32:02,860 And then most things would get patched over time. 574 00:32:03,020 --> 00:32:04,680 But it never all gets patched, right? 575 00:32:04,720 --> 00:32:08,980 If you run a web server and you look in your logs, you still see code red sweep through a couple times a year. 576 00:32:09,140 --> 00:32:10,460 Or a couple times a month, pardon me. 577 00:32:11,500 --> 00:32:14,000 And it never was zero to begin with. 578 00:32:14,100 --> 00:32:15,900 The people finding the O days make sure they're all 579 00:32:16,000 --> 00:32:19,340 always systems getting hacked and we don't know what's going on with them. 580 00:32:19,520 --> 00:32:22,100 It's alien technology that we don't know about. 581 00:32:23,220 --> 00:32:27,940 So what's interesting about this is we can start thinking in terms of 582 00:32:28,740 --> 00:32:32,600 not just the rate of occurrence of security incidents, 583 00:32:32,880 --> 00:32:35,620 but we can start minimizing the consequences of them 584 00:32:35,620 --> 00:32:39,040 by reducing connections between systems so that when one gets owned, 585 00:32:39,180 --> 00:32:41,980 it doesn't cascade into a failure of our whole network. 586 00:32:42,180 --> 00:32:44,740 Because we can spot which are the strategic connections, 587 00:32:46,000 --> 00:32:47,840 the strategic trust connections between systems. 588 00:32:48,420 --> 00:32:48,820 All right. 589 00:32:49,120 --> 00:32:52,500 So we're talking about minimizing the consequences of security incidents, 590 00:32:52,900 --> 00:32:54,940 not just reducing their occurrence. 591 00:32:55,880 --> 00:33:00,980 Isolating things better and with more confidence than we could before 592 00:33:00,980 --> 00:33:02,660 because we can spot some of these relationships. 593 00:33:03,200 --> 00:33:06,600 Hopefully this is good also for spotting single points of failure in our defenses. 594 00:33:06,900 --> 00:33:11,600 The whole, well, if one of these systems gets hacked, they all are a problem. 595 00:33:11,840 --> 00:33:13,620 Hopefully this is good for spotting those things. 596 00:33:13,620 --> 00:33:17,700 And then hopefully it's also giving us clear understanding 597 00:33:17,700 --> 00:33:20,720 of the effects of the security decisions we make. 598 00:33:20,860 --> 00:33:25,700 So again, we're able to start thinking about defending against attacks we don't know about yet. 599 00:33:25,900 --> 00:33:28,560 We don't care how system X gets compromised. 600 00:33:28,880 --> 00:33:32,260 We just want to know that when it does, what are the consequences to us. 601 00:33:33,520 --> 00:33:37,560 And we can also start combining this data with information from vulnerability scanners. 602 00:33:37,660 --> 00:33:43,600 So we can take our Nessus output and color the hosts on those graphs differently. 603 00:33:43,600 --> 00:33:45,740 Depending on what vulnerabilities they have, things like that. 604 00:33:45,960 --> 00:33:48,960 So again, there's no shortage of security information out there. 605 00:33:49,040 --> 00:33:55,260 The problem is trying to make it easier to synthesize it together and to use it intelligently. 606 00:33:55,900 --> 00:33:58,140 And we've got plenty of work left for me to do. 607 00:33:58,220 --> 00:34:00,060 I need to start fixing bugs in the code that I've written. 608 00:34:00,340 --> 00:34:03,400 I need to reimplement the matrix multiplication stuff. 609 00:34:03,600 --> 00:34:06,940 I currently have been doing that in the language J, which is very confusing. 610 00:34:07,080 --> 00:34:08,440 I don't know if any of you speak APL. 611 00:34:08,480 --> 00:34:10,740 J is a sort of next generation APL. 612 00:34:10,840 --> 00:34:13,400 I need to port that to Perl so that humans can read it. 613 00:34:14,360 --> 00:34:19,840 And I basically am going to just keep releasing scripts for doing certain kinds of pictures. 614 00:34:20,080 --> 00:34:25,400 And that's going to be ways of slicing and dicing that information that we've gathered in more interesting ways. 615 00:34:26,120 --> 00:34:30,820 And we've got just libraries full of graph theory that we can take advantage of and maybe use. 616 00:34:31,060 --> 00:34:33,860 People have been proving theorems for centuries. 617 00:34:34,140 --> 00:34:37,540 And these actually suddenly have applications to making security decisions. 618 00:34:37,700 --> 00:34:40,500 That transitive closure equation is a nice one for us. 619 00:34:41,120 --> 00:34:42,500 So some credits. 620 00:34:42,500 --> 00:34:43,740 I use GraphVis. 621 00:34:43,880 --> 00:34:45,100 I worship Afterglow. 622 00:34:45,200 --> 00:34:47,560 Here are two books that I would strongly recommend. 623 00:34:47,920 --> 00:34:50,660 The Graphs and Networks book is all you need to know about graph theory. 624 00:34:50,880 --> 00:34:54,040 The Algorithms book is a way of traversing those graphs. 625 00:34:54,300 --> 00:34:55,600 There's lots of good stuff in there. 626 00:34:55,760 --> 00:34:57,940 There are some tools that are not bundled on the CD. 627 00:34:58,600 --> 00:35:00,060 OWNR, Medusa, FGDump. 628 00:35:00,140 --> 00:35:01,660 Those are available from foofus.net. 629 00:35:03,480 --> 00:35:04,820 Greets to my peoples. 630 00:35:07,720 --> 00:35:09,280 And everybody likes a prize. 631 00:35:09,500 --> 00:35:12,140 So valuable prizes await people who solve the following. 632 00:35:12,500 --> 00:35:15,640 If you have problems right now, Medusa does not run under SigWin. 633 00:35:15,780 --> 00:35:21,680 If you get Medusa to run under SigWin and explain to us how it was done, we will do something nice for you. 634 00:35:22,220 --> 00:35:23,100 Let me know. 635 00:35:23,400 --> 00:35:30,700 Also, I have been trying to use the LSA enumerate accounts with user right API call to enumerate users. 636 00:35:31,220 --> 00:35:34,140 The SDK used to say you could do that. 637 00:35:34,540 --> 00:35:36,700 And I know that sounds like a crazy idea. 638 00:35:36,960 --> 00:35:41,560 Just enumerating accounts with an API called enumerate accounts. 639 00:35:43,600 --> 00:35:44,560 But it doesn't work. 640 00:35:44,980 --> 00:35:46,740 It doesn't work the way it's supposed to, at least. 641 00:35:46,800 --> 00:35:47,880 It doesn't work the way the docs say. 642 00:35:48,280 --> 00:35:52,520 Now, I noticed about a week before I came here that Microsoft has revised the docs. 643 00:35:52,800 --> 00:35:55,780 And it no longer says explicitly that you can do that. 644 00:35:55,800 --> 00:35:56,780 It sort of hints that you can. 645 00:35:57,140 --> 00:35:59,060 But they're being a little bit cagier about it. 646 00:35:59,160 --> 00:36:06,440 So if anyone makes a program that actually in C or C++ that actually can enumerate all users on a system using that API call, let me know. 647 00:36:06,520 --> 00:36:08,580 Again, something nice will happen to you. 648 00:36:10,700 --> 00:36:12,000 And that's, whoops. 649 00:36:12,500 --> 00:36:13,760 Should take me to foofus.net. 650 00:36:13,880 --> 00:36:15,860 So that is the material that I came with. 651 00:36:15,980 --> 00:36:19,040 I note that I am actually five minutes, I believe, ahead of schedule. 652 00:36:20,020 --> 00:36:21,800 And so I would love to take questions. 653 00:36:22,020 --> 00:36:23,960 I apologize for the delays at the start. 654 00:36:24,120 --> 00:36:27,320 And I also apologize that I couldn't show more interesting graphs. 655 00:36:28,000 --> 00:36:31,120 Porting from one computer to another all of a sudden was an unexpected thing. 656 00:36:31,560 --> 00:36:34,260 Special thanks to, this is foofus of foofus.com. 657 00:36:34,660 --> 00:36:37,060 It's amazing, first off, that there are two people with this handle. 658 00:36:37,120 --> 00:36:39,440 And then that we should meet at DEF CON is doubly amazing. 659 00:36:40,360 --> 00:36:41,960 But he loaned me his laptop. 660 00:36:42,540 --> 00:36:43,200 Thank you, man. 661 00:36:50,340 --> 00:36:52,960 If there are questions, I would love to entertain them. 662 00:36:53,060 --> 00:36:54,980 If not, I recognize it's DEF CON on a Sunday. 663 00:36:55,060 --> 00:36:55,700 Everybody's half asleep. 664 00:36:55,780 --> 00:36:56,040 Yes, sir. 665 00:36:58,180 --> 00:36:58,980 No, go ahead. 666 00:36:59,300 --> 00:37:00,460 Let's let him and then you're next. 667 00:37:00,480 --> 00:37:00,620 Yes. 668 00:37:02,280 --> 00:37:02,600 . 669 00:37:07,380 --> 00:37:07,700 Right. 670 00:37:09,580 --> 00:37:09,900 . 671 00:37:11,500 --> 00:37:11,940 . 672 00:37:14,340 --> 00:37:14,780 Okay. 673 00:37:14,900 --> 00:37:17,560 So the question is, can we use these same principles at design time? 674 00:37:18,560 --> 00:37:20,800 I think the principles are very applicable. 675 00:37:21,120 --> 00:37:26,340 The problem is what I'm, well, usually when I get to look at a system, it's already out 676 00:37:26,340 --> 00:37:26,920 there in the world. 677 00:37:27,180 --> 00:37:28,740 So I haven't done that work. 678 00:37:29,040 --> 00:37:33,020 Certainly you could draw, certainly you could draw connectivity graphs of things that don't 679 00:37:33,020 --> 00:37:33,520 yet exist. 680 00:37:33,800 --> 00:37:39,880 The, the, I guess the utility that I've perceived in what I'm doing is the ability to, you know, 681 00:37:40,340 --> 00:37:42,700 to spot connections and things that do exist. 682 00:37:42,980 --> 00:37:46,600 So at design time, you're doing it basically, it would be an on paper exercise. 683 00:37:46,860 --> 00:37:50,420 I think you could definitely use this for weighting some of the conclusions that you 684 00:37:50,420 --> 00:37:51,300 draw in threat modeling. 685 00:37:51,500 --> 00:37:56,440 But it's, you know, until it exists, it's not really rigorous because even the best 686 00:37:56,440 --> 00:37:57,720 plan can be bundled in implementation. 687 00:37:58,100 --> 00:38:00,480 And when you're talking at design time, you're only talking about planning stuff. 688 00:38:00,860 --> 00:38:01,340 All right. 689 00:38:01,380 --> 00:38:01,740 Yes, sir. 690 00:38:01,860 --> 00:38:02,020 Yeah. 691 00:38:02,160 --> 00:38:07,380 So have you thought about taking your graph data and piping it into some really cool, 692 00:38:07,420 --> 00:38:09,840 like, interactive graph exploiter? 693 00:38:09,840 --> 00:38:11,080 You know, like, operation sorts of tools. 694 00:38:11,080 --> 00:38:13,820 So the Dan Kaminski, we're going to do video of TrustGraph. 695 00:38:13,820 --> 00:38:14,220 Yeah, exactly. 696 00:38:15,220 --> 00:38:16,100 I have. 697 00:38:16,240 --> 00:38:20,560 I've played with LGL a little bit and I've done a sort of 3D fly-through look. 698 00:38:21,060 --> 00:38:24,680 Most of this I do for putting in documentation though. 699 00:38:24,760 --> 00:38:27,440 And so two-dimensional static representation has been my favorite. 700 00:38:27,720 --> 00:38:29,420 It's totally compatible with that. 701 00:38:29,520 --> 00:38:33,220 The dot language is very flexible and you can represent that in a variety of different 702 00:38:33,220 --> 00:38:33,460 things. 703 00:38:33,580 --> 00:38:36,660 I've been using graph viz, but if you like fancy twinkles, go for it. 704 00:38:37,620 --> 00:38:38,180 Yes, sir. 705 00:38:38,320 --> 00:38:39,820 Have you considered, you know, like, you know, like, you know, like, you know, like, 706 00:38:39,820 --> 00:38:46,860 doing directed graphs where you represent the undirected graph with two directions and 707 00:38:46,860 --> 00:38:50,660 having different weights to represent things like fireballs and stuff like that? 708 00:38:50,880 --> 00:38:51,060 Yes. 709 00:38:51,140 --> 00:38:54,700 So as I mentioned before, all the graphs that I'm drawing are undirected, which means every 710 00:38:54,700 --> 00:38:55,700 connection goes two ways. 711 00:38:55,820 --> 00:38:58,160 It is possible to think in terms of one-way connections. 712 00:38:58,980 --> 00:39:04,320 What I'm focusing on right now is transitive trust relationships or implied trust relationships. 713 00:39:04,860 --> 00:39:06,880 Most of those are two-way. 714 00:39:06,980 --> 00:39:07,120 Yeah. 715 00:39:07,120 --> 00:39:08,300 So I haven't bothered with it. 716 00:39:08,300 --> 00:39:12,140 But yeah, in terms of the dot syntax, all you do is instead of saying graph, you say 717 00:39:12,140 --> 00:39:14,140 digraph and you draw your edges differently. 718 00:39:14,520 --> 00:39:15,480 They have direction. 719 00:39:15,700 --> 00:39:16,080 Okay. 720 00:39:16,140 --> 00:39:18,000 So the facility exists. 721 00:39:18,140 --> 00:39:19,980 It just hasn't been something that I've focused on yet. 722 00:39:20,140 --> 00:39:25,240 Well, what about weighting the cost to go through and then trying to analyze that 723 00:39:25,240 --> 00:39:28,640 to see how hard is it to get to a particular node from, say, the internet? 724 00:39:28,940 --> 00:39:29,160 Yeah. 725 00:39:29,240 --> 00:39:35,760 That is interesting stuff and I encourage you to collaborate with me on this research. 726 00:39:36,140 --> 00:39:36,540 Cool. 727 00:39:36,540 --> 00:39:42,320 Well, one thing there that if we look back at this tree example, one of the interesting 728 00:39:42,320 --> 00:39:47,500 things here is that the graphs that I'm looking at are what I would call highly cyclic graphs. 729 00:39:47,820 --> 00:39:51,420 There are usually sort of loops that you can go through and multiple paths between 730 00:39:51,420 --> 00:39:51,820 things. 731 00:39:52,020 --> 00:39:56,060 And one of the things that I'm interested in doing is implementing like an open shortest 732 00:39:56,060 --> 00:39:59,520 path first algorithm so that we can do things like weight. 733 00:39:59,600 --> 00:40:02,080 What is the quickest way from point A to point B on the graph? 734 00:40:02,300 --> 00:40:05,600 I'm not doing that yet, but that is something that I certainly intend on doing. 735 00:40:05,600 --> 00:40:07,620 Again, those are all algorithms that exist. 736 00:40:07,800 --> 00:40:10,600 I just have to port them to my model of the data. 737 00:40:13,140 --> 00:40:15,940 Can you draw a correlation matrix instead of an adjacency matrix? 738 00:40:17,480 --> 00:40:17,960 Maybe. 739 00:40:18,280 --> 00:40:19,540 I'm not smart with math. 740 00:40:19,800 --> 00:40:22,640 If you want to talk to me later, I'd love to learn what that is. 741 00:40:22,920 --> 00:40:23,080 Okay. 742 00:40:25,920 --> 00:40:29,040 Can I draw a correlation matrix instead of an adjacency matrix? 743 00:40:29,260 --> 00:40:30,140 I assume I can. 744 00:40:31,900 --> 00:40:32,380 Yes. 745 00:40:33,680 --> 00:40:34,940 Smarter person says yes. 746 00:40:35,100 --> 00:40:35,580 I don't know why. 747 00:40:35,580 --> 00:40:36,080 I don't know what it is though. 748 00:40:36,880 --> 00:40:37,260 All right. 749 00:40:37,280 --> 00:40:37,960 Thank you very much. 750 00:40:38,040 --> 00:40:38,860 You've been very patient.