Here we are going to try and give a talk. So the title of this talk, graphical representations of security relationships, are they awesome or are they bullshit? You probably already formed a strong opinion by this point in my screw ups. So here we go. By the way, I like doing presentations just with plain HTML. I can't believe how many hacker cons I go to and people are using PowerPoint. I was in the speaker green room before we got started and EFF people were there getting ready for their panel which is going on simultaneously. And one of them actually said, although she admitted this was not her original quote, she was citing it with fair usage in mind. She said, power corrupts and PowerPoint corrupts absolutely. So the beginning is this. We have this problem of collecting huge amounts of information and that's not rare in the security scene. You see you run a Nessus scan, you see a ton of kilopages of output. You are running a system of server you get a ton of of stuff. And how many people attended Rafael Marty's talk on Afterglow? All right, that was a fantastic talk and he's smarter than I am, but I'm going to do some different things based on some of his work. So we have the problem of large collections of information and we have two issues here. One is let's say you look at a Nessus scan of a network and you get, you know, a lot of information. There's two problems. The first one is does this, does any particular piece of information in that scan output make sense to you? That's hard to say. And then the second thing is do these two pieces of information go together? And that's hard to say, too. One of the problems with vulnerability scanners in general, of course, is that they look at each system that they scan as just its world unto itself. They don't understand that they participate in a whole environment. They don't know what kinds of things are important about them and so forth. And so we're going to try to do, see what we can do about that. We're going to talk about taking the information that they give us and making it more useful. So this is a picture of someone who believes that vulnerability scanners actually describe the security of their network. You can see he's got a seat reserved there on the bus. So we've seen recently some efforts to come up with solutions to these problems. We've seen a lot of security information management systems, things that do log aggregation, event roll-up, some kind of analysis of the patterns that they see. And that's all great. And then we also have seen in the non-product side of efforts to fix this problem or address this issue, we've seen two sort of parallel efforts. One is the increased emphasis on threat modeling. And I'm not a big zealot about fancy methodologies and producing documentation just so. When I talk about threat modeling, what I really mean usually is just being organized and consistent about how we describe things and rate them and rank them so that we are internally able to make apples to apples comparisons even though maybe nobody else in the world understands what we're talking about. So basically formal processes in place to make sure we're being thorough and we're being systematic about the way we describe risk. The second thing that we've seen getting a lot of attention lately are these operational frameworks, things like ITIL, COBIT, ISO 17799 or 27001 if you like fancier numbers, or the incident command system for incident handling. These are things that we see more that are trying to make responses to situations predictable and minimize risk through process so those are two two ways you know basically they're saying hey we can't really predict what kind of information we're going to gather but we know we're gonna have the same plan no matter what information we gather these are the steps we're gonna follow all right so what's our goal here so there's no shortage of information and in the aftermath of the 9-11 attacks a lot of intelligence agencies said that the problem was not that they didn't have data about what was going on it was they couldn't go through all of it so we're gonna try to find ways to organize the information that we collect in a way that it actually supports decision-making and just visualization is probably not enough so we're gonna make two two observations here the first thing is that security is not necessarily as hard as as it sounds when people talk about security it always seems really mysterious but sometimes that's just this perception of complexity and maybe we can do some things to reduce that the second thing is to note you know we've been talking about security for a long time and you know that the same set of data might contain multiple messages that are interesting to us so for example here's a little puzzle if you saw this sequence of numbers would you know what the next number is well what if you saw it organized like this same sequence of numbers but you're pretty good at guessing what comes after the two now so sometimes just the way we look at the information we see can be very helpful to us in terms of putting it in some sort of context for us so now we're going to make the transition to the scary math portion of the presentation and we're going to talk briefly about graph theories graph theory and so we're going to define what a graph is and I don't mean things like bar charts and stuff like that I'm talking about mathematical graphs which are sets of two kinds of things the first is what we call a vertex or a node a thing on the graph and then the edge is just a connection between any two vertices and I'm going to so you can have connections that are one-way only I'm only going to work with two-way connections just to keep things simple if you can go one direction you can go the other direction on my graphs so this is how we write it a graph is a union of two things a set of vertices and a set of edges fine that's all very interesting so here let's look at one here we have a graph with five nodes on it so their set of vertices is one two three four and five and then we're going to define some edges as just basically the pairs of vertices that are connected so you can see that there is an edge from one to two on that graph right and from one to four so that's an example of a graph the way we describe it here alright so familiar graphs you might remember right routing tables spanning tree descriptions those are graphs that were familiar with in the networking world if you do software development things like entity relationship diagrams object relational diagrams those are the sorts of things that you might encounter those are also represented mathematically as graphs and then in regular life you might think of a subway or metro maps so the you know the the nodes are the subway stations and then the edges are the subway lines that you could take in between them all right swell so now we're getting to the point where we can say what the title of the talk comes from I did some work for an educational institution and they wanted one of the things that they wanted was a map of their network and it was a large national network it was confusing and they had lost track of it so they want to know where it was and what was connected to what and so I built a tool for doing this using these graphs right so we have two two types of nodes we have routers which are one type of node and then a net block like you know 192.168.0.0.8 so that would be a net block so we got those two types of nodes and then an edge is just a connection between a router and a net block okay so is directly connected to so if you did it on a Cisco router show IP route and this net block is connected directly that would be an edge fine so we have this little snippet of code courtesy of P monkey in the front row P monkey stand up and say hi to the nice people this is just a little a little a little trick yeah yeah he's a sweetie a little thing for just walking through routers grabbing via SNMP they're routing tables and this you can just run this on your network and what we're going to do is take the the output of those things and we're going to massage it a little bit we're going to take every network that is directly connected and we're going to put it into a file the contents of which are the list of networks directly connected to the router and the name of that file is just something that helps us identify the router, like 10.1.10.1 was a router, so we call it that. Super. So, what do we get? Let's talk a little bit about graphs again. We can take the same graph that we saw earlier and represent it in a language called dot, which is just basically a language for describing the way a graph is. So you see we define our vertices, 1, 2, 3, 4, 5, and our edges, 1 to 2, 2 to 3, 2 to 4, 3 to 5, and so forth. And then we can use something like graphvis to render that into the image that you see on the right there. Dot language is something that Afterglow works with and so forth. And that's where I got the idea of doing things this way. And then this is the, so this is the command line that you use to generate that graph from the dot file on the left. Fine. Super. Amazing. So this is the graph that we got for that network. And it's horribly disgusting in this format. And on my laptop I have a tool that I can zoom in on it. So I'm going to see if I can do that here. Note my one-handed Windows skills. No previews, please. Just this. Let's see if we can see this. See it a little larger. All right. Now there's kind of a magnifying glass over here. So let's just zoom in on a portion of the graph. And it's not liking me. But you can believe me, or not, that each of the red things, oh, pretty. All right. So the red objects are the net blocks. And the green objects are the routers. I colored the internet yellow so that we could see. See where the connections are. And this is kind of fun. And so I was very proud of this tool. And I wanted to show it off. And so I sent it to a mailing list internal to my company about how swell Cisco networking technology is. And I sent it to that, hoping that everyone would be very happy with me and praise me. And I got exactly two responses from the two engineers that I like and respect most at the company. And one of them said, this is awesome. You know, I want to use this all the time. And the other one said, this is bullshit. It doesn't tell me anything. And so that's why we're calling the talk this. So now we come to the central question. Is this awesome or is it bullshit? So I think there are points to be made on either side. On the awesome side, this has very strong nerd appeal, right? We can all agree that there's a simple image here and it's summarizing a great deal of data. And that's kind of cool. And so you could, if you had a magnifying glass and sufficient patience, you could find any piece of information that you were interested in in there. This is a whole lot easier than drawing that whole mess out by Visio. And it's cheap, too. Because the, you know, the software's cheap. It's free. And you can, it's on your CD. You can just have it. However, on the opposing side, it looks just like a spirograph. It doesn't really convey any message. It doesn't support any conclusion, right? So the engineer who said bullshit said, it's better to summarize data that's redundant or repetitive. You saw like 96 sites that looked exactly the same. They all had four net blocks hanging off of them. You probably all noticed that, right? And so graphs like this might actually distract from. The information that you're trying to find. And it might minimize the importance of problems. And that's not what we want when we're trying to make a point about security. All right. So let's talk a little bit about what my central theme here is. I'm really interested, I'm kind of obsessed with trust between systems. And so this is a quote from Halvar. And he's saying that almost all real hacking is done via transitive trust, which is, you know, you break into one system and having that degree of access gets you into another one. And he says my favorite quote. All hacking gets too little credit at security conferences. I'm on a personal mission to change that and have been for some years now. Another quote that I wanted to cite was from my colleague Sherdlu over at the side of the room. She was participating in a discussion with Steve Christie from MITRE. He asked the question, what is the state of vulnerability research? And the very excellent point was made that really what we consider vulnerability research is generally not research the way formal academic research is. And there should be. There should be maybe some degree of emphasis on trying to make this a little bit more rigorous. And I like that point. I also am sick of the idea of just data for its own sake. And that's what's wrong with the Spirograph graph, right? So this is an old essay from Bruce Schneier when he's trying to make the point that counterpane is cool. So 41% of the attacks we saw were unauthorized activity of some kind. Well, as opposed to this, you know, 59% of authorized attacks. I'm not sure. 21% were scanning. You know. But what does this information do for you? What do you make out of that? How does that help you live your life better? So I also cite a number of different sources. One is Dan Burrows' talk from DEF CON 9, which introduced me to the idea that you could actually do math on data that you collect. The second one is a research that I'm familiar with from the UW Madison near my hometown. And this is a person who does computation on graphs. Trying to. Trying to do computation on graphs that represent attack patterns. I'm not doing fancy model checking, which is this strange algebra on top of the graphs. I don't bother with scary stuff like that. Rafael Marti's talk at DEF CON 13 blew my mind. And that made me want to start drawing pictures. And then K.S. Golubitsky's talk at LISA 05 on using automated tools to draw security conclusions, specifically computing attack surfaces. This is really interesting stuff. I recommend all of these pieces of research to you if you are having trouble sleeping and just want to know more about this stuff. So we have a number of tools previously released that we have incremental advances to. All of these are available from foofus.net. The latest revision of OWNR is not up there yet. I'll put it up when I get back. Basically this is just a NetBIOS information gathering tool. It's sort of general purpose. And the nice thing about it is that it puts things out in comma-separated files or character-separated files so that you can quickly find things in them using graphics. And we've had some improvements since it was shown then. It's actually thread safe, so we can do multi-threaded analysis. We've improved the active directory functionality and so forth. It's fun. Another tool is FGDUMP written by Fizzgig down in the front row. Fizzgig, stand up and say hi to the nice people. This is a replacement for PWDUMP. It is way better. Fizzgig also released PWDUMP 6, but it is superseded by FGDUMP 5. It is smart enough to do things like turn off anti-virus and anti-spyware things that it encounters so you don't DOS the machine that you're trying to dump passwords out of. It does a lot of nice stuff. So it was initially released at TourCon 7. There was a much better release around Christmas time, right? Yeah. So it's it's very nice. It's a sort of Swiss Army knife password dumping tools. It gets cached passwords and password history and stuff like that. Very fun. 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. It's just a good password grinder. It's a replacement for Hydra from THC, but it's designed specifically for giant multi-threading. It's very modular and you should get it and you'll love it. All right. So where are we? We're back to our matrix here, our graph here. So we've seen the dot representation of that graph. We've seen the visual representation of the graph. So we've seen the dot representation of that graph. We can also have a mathematical one. So we're gonna make ourselves a little matrix and the edge columns are just labels, right? One, two, three, four, and five. And one, two, three, four, and five down the sides. And what's interesting is the cells in there. Can I highlight this? Well, not really. Anyway, so rows like this. So for each cell what we do is if there is a connection between node one and 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, we're gonna put a zero in that cell. And what we when we say connection, we mean just direct connection. 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 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. So if you're on one, you can get to one in other words. Super. Okay, so we can represent the matrix that way or the graph that way. We can also multiply matrices together. These are two notations for doing that. The top one is sort of more like you would write a program to do it. The bottom one is what's called Einstein notation. That's named after some guy. And so the original adjacency matrix shows paths of length one, right? If we square that matrix, if we multiply it by itself, 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, it means there's a path of length two between these two things. In other words, this is a totally connected matrix. There are no zero nodes in here at all from any one node you can get anyplace else. And you can see that just visually inspecting it, right? There's nobody that's isolated on there. All right, so a little bit more math and we'll be home free. So you'll notice, you'll remember from your algebra classes, right? The geometric series there. You have this 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 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, 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 or yeah, 1 or i over i minus our matrix gives us the geometric series for matrices. So 1 plus m plus m squared plus m cubed, if m is our matrix. And what this allows us to do is compute something called closure or transitive closure on our graph. In other words, we can take an individual adjacency matrix and we can say, are there 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. 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. And that might be awesome. And not bullshit. We'll see. So here's how I've been going about it. I take a number of different tools. OWNR to gather user account information. Nessus gives me information about vulnerabilities on systems. Fgdump grabs passwords for me. Medusa sees if those passwords work any place else that I haven't touched. And what we do is we build ourselves an adjacency matrix out of that. So an adjacency matrix is, oh, there's Dan. Hi. Great talk. So an adjacency matrix out of this. So what we're going to do is anytime we have passwords from a system and you have a user account and password that is repeated on another system. So system A has user Payton. Oh, that's me. I outed myself. Dan. User Fufas is on system A. And then user Fufas is also on system B. And the two passwords match. We're going to describe those two systems as adjacent. And this is Halver's idea of transitive trust. If you hack one, you get to log into the other one for free. All right. So we're going to build an adjacency matrix out of that. And on your CD you have a tool for doing that. And what I have been doing is then doing some cleanup. If you have multiple domain controllers on a network, you want to prune those out and reduce it to just one because they're the same anyway, et cetera. And we're going to convert that to dot language and we're going to draw a picture of it. And that's going to be cool. And everyone's going to think we're neat. So this is a school district measured this way. And again, we have the same problem that we did with our other graph. Let's get rid of this. And let's bring up this. This guy. So here we've got about 312 different systems, which are represented by the blue ovals. Those are computers. And the orange rectangles represent connections between those computers. So if we keep zooming in, you'll see come on, we just want to get to the point where it's legible. So what you'd see is IP addresses inside the blue kind of circles. And then inside the orange rectangles, you would see a user name and a password hash that match between those two systems. And that's kind of neat because what we can see all of a sudden is that we've got 314 systems on this graph, 312 of them are connected by some kind of transitive trust. So in other words, if you hack one, you can basically romp all over the whole darn place. And what's sort of a couple interesting points. One is, oh, wake up laptop. Well, you saw there was a big sort of soccer ball shaped circle of nodes surrounding one account, which we're trying to get over to. That account happens to be named administrator. That's a password shared between, I don't know, a couple hundred systems. Let's just go back to the other view. And you'll just believe me that this is true. Also, you'll see that down here, there's a yellow octagon. If you have good enough eyes in this resolution, you might be able to see right there is a yellow octagon. That represents the domain controllers. And so basically there are, if you hack any one of these systems, you can get to all of them, including the domain. And that's, you know, kind of significant for their security. They thought that all they had to do was keep the domain controllers secure. But it turns out that the project of keeping their network secure is equivalent to the project of keeping all 314 systems on it secure. If one falls, they all fall. So that was kind of fun. But that graph really only conveys one message, which is you are owned. It does not help with anything else. And we want to see if we can't make it tell us more interesting things. So I call it this is somewhat bullshit, even though it was fun to make. So here's a little intermission for you. What do you think of this graph? This is from Greg Hogland and Gary McGraw's book, Exploiting Software. And I just love the caption here. This graph is rendered in three dimensions. First off, no, it's not. It's sitting right there on my screen. Each code location looks like a small room. I don't know what kind of rooms they live in. We use the OpenGL package to illustrate all the code paths leading toward a vulnerable S print, F call, and a target program. So let us just assume, they don't label it or anything clever like that, but let's just assume that this is the vulnerable S print, F call because everything seems to sort of be leading there. What are we to make of this graph? What on earth does it tell us? What is this room, which is not connected to anything? So what do you say? Awesome? Yeah, maybe. This is what I think. And I have nothing against this. It's a fine book, but that graph just blew me away. Okay, so let's see if we can start to make more sense here. The ISO 17799 standard is just a framework which claims to identify all of the stuff you ought to be doing if you are running your network well. It divides the project of running an organization up into 11 areas, and then those areas are subdivided into what are called objectives, so you have about 140 objectives. So that's that standard. We're going to use another standard, too, 800-26, because they were just totally into sexy titles over at NIST. 800-26, Guide to Self-Assessment of Networks. And they define a scale from 1 to 5 about how far along you are in terms of making progress towards security virtue. Have you written a policy? Have you actually written a procedure for how you're going to execute on that policy? Are you doing that procedure? Have you put things in there so that you're testing to see that the procedure works? And then when you find that it's failed, do you have a procedure for taking steps to learn from that problem? And making progress? We've added a level zero, which means, holy cow, we never even thought of that yet. So we're going to take these two ideas, and you see I've assigned color codes to them. NIST did not bother to color these things. And what we're going to do is take those 11 areas, and we're going to represent for an organization, we're going to say, where are they? On that NIST scale for each of the 140 objectives. And we're going to recognize the hierarchical organization of that standard, so we have the standard, 11 areas, and 140 objectives distributed among those 11 areas. And what we're going to do is color each of those objectives based on their NIST ranking. And then we're going to draw a picture of that. How do we do this for ourselves at home? Oh yeah, another free tool that's on your CD. This is the kind of picture we get. So you can see the central, here's the standard. The color codes represent how we're doing. And what I do is for every area where there is something that's not ideal, or for every objective that's not ideal, the area represented by it gets sort of the lowest common denominator. So if you have one orange, this area turns orange. And this is a way of sort of visually representing how you're doing along with the ISO standard. It's a nice way to measure progress. I don't really care much about ISO certification, but this is a way of showing sort of what's holding you back in your organization, what things might be going better. All right, so that actually I claim represents something interesting. It helps you support a conclusion. It tells you where to focus your effort and so forth. Now the old plan was kind of cumbersome. It didn't provide much organization of our information. That's that school district graph I showed earlier. It didn't really support multiple views of the data. And we know we might want to visualize things more than one way. So we have a new plan. We're going to decouple the description of the data from the analysis of the data. And I'll tell you what I mean after, in just a moment. I'm also, I used to run things through afterglow to generate my dot files. I'm ditching afterglow not because afterglow isn't superior to my work in every way, but just because it's designed for a specific purpose and I want to be more granular with the way I manage dot. So what we're going to do is harvest our raw data, the same as we used to except that the tools are fancier now. We're going to render those into adjacency files with this map adjacencies program which is on your CD. And we're going to do this in two ways. We're going to represent an adjacency matrix and also adjacency lists. Just two equivalent representations of the same information. And now we can write simple scripts that just process those lists. You know, where can I get to from this node? What user account is connected to the most things and stuff like that. We can start making more interesting pictures. So we have that radiating view like we just saw with the ISO standard. We can also rank things. This is, let's see if we can't. Ditch that. Get ourselves one more picture. We can also draw things ranked as trees. This is a manufacturing company. Hopefully this one will zoom in a little faster than the others. Draw a box. Pardon? Draw a box. Oh, draw a box. I don't know how to draw a box. All right. All y'all box masters out there are better than me. So anyway, what's interesting here is we see that this system up at the top, from there you can get to one system. From this one, you're connected to just about everything. All of these are interconnected. That goes down to another stratum. And then what's interesting here is that the farthest away, what this shows us on this network is the farthest away you can be is one, two, three, four hops. Within four hops, you're every place on this network. And I think that's a sort of more interestingly organized presentation of the same kind of information we had before. It actually supports some kinds of decision making. What if we isolated this system? Then everyone would be safe against attack from that. Or what is this one account that's shared between all of these? Maybe we could get rid of that. I think those are the sorts of things that will help us actually make progress. All right. Now. How do you assign the rank to the top system? The way I assign the rank for the top system? Oh, that's a great question. What I did was I picked the system that I was interested in and I said that's the top system. And that's the, so, but seriously, that's actually the point of this. I want to be able to interrogate this data in ways that are interesting to me. I want to be able to ask questions about it. So when I'm interested in that one top system and I want to know about it, that's the glory of decoupling the rendering into adjacency files from the analysis of those adjacency files. I can write a thing that says, well, for any given host, what can I learn about it? And that's, so, I don't know who asked that question. That was a good question. And thank you. All right. So this is a familiar graph which I stole from Counterpane. This is what's called an attack tree. And the goal, basically, the goal here is, you know, I want to open a safe. So what are the different ways that could happen? I could pick the lock. I could learn the combination. Well, how might I learn the combination? I might find it written down. I might get it from somebody. How might I learn the combination? How might I get it? Well, I might threaten them or I might eavesdrop on them, et cetera. So this is a way of sort of modeling your adversary's decision-making process. And what I'm hoping is that graphs like this can actually model, well, if this is the system we're interested in keeping safe, what are all the ways you could get to it? And that's a sort of interesting question, I think, to be able to ask and answer. All right. All right. So we can start asking things like, can we rank hosts in order of their security importance? So things that are directly connected to other things versus things that are connected indirectly. Can we, if we know where, what we're interested in protecting, can we say all of the different paths to it via transitive trust? Those are the sorts of questions I'm hoping we'll be able to answer with our newfangled tools. And then you have this idea of degrees of separation on the network, emphasizing the importance of like one central system that's, or central account that's connected to all others. All right. So how does this line up in terms of what we actually are experiencing in the world? Here's the old window of vulnerability problem, right? You have, security nerds are always telling you to think about risk in terms of dollars per year, right? Annual rate of occurrence of security incidents versus, you know, the cost of a single security incident, single loss expectancy. And when you have a security solution, most products that people, notice security vendors never sell you a product, they sell you a solution. When they sell you the solution, what they're really focusing on usually is reducing the frequency of security incidents. So we buy a countermeasure that is supposed to make it impossible for certain things to happen to us. But, so what's interesting about this graph, which is, this is sort of trying to model the way the big internet worms of the early part of this decade happened. You'd have always some background noise of systems getting compromised. And then someone would figure out something was wrong with a system and they'd learn how to hack it. Stuff would start getting owned. Usually a patch would get introduced, but nobody paid attention to it. Then someone would automate the exploit and things would go through the roof. Then we'd start patching. And then most things would get patched over time. But it never all gets patched, right? If you run a web server and you look in your logs, you still see code red sweep through a couple times a year. Or a couple times a month, pardon me. And it never was zero to begin with. The people finding the O days make sure they're all always systems getting hacked and we don't know what's going on with them. It's alien technology that we don't know about. So what's interesting about this is we can start thinking in terms of not just the rate of occurrence of security incidents, but we can start minimizing the consequences of them by reducing connections between systems so that when one gets owned, it doesn't cascade into a failure of our whole network. Because we can spot which are the strategic connections, the strategic trust connections between systems. All right. So we're talking about minimizing the consequences of security incidents, not just reducing their occurrence. Isolating things better and with more confidence than we could before because we can spot some of these relationships. Hopefully this is good also for spotting single points of failure in our defenses. The whole, well, if one of these systems gets hacked, they all are a problem. Hopefully this is good for spotting those things. And then hopefully it's also giving us clear understanding of the effects of the security decisions we make. So again, we're able to start thinking about defending against attacks we don't know about yet. We don't care how system X gets compromised. We just want to know that when it does, what are the consequences to us. And we can also start combining this data with information from vulnerability scanners. So we can take our Nessus output and color the hosts on those graphs differently. Depending on what vulnerabilities they have, things like that. So again, there's no shortage of security information out there. The problem is trying to make it easier to synthesize it together and to use it intelligently. And we've got plenty of work left for me to do. I need to start fixing bugs in the code that I've written. I need to reimplement the matrix multiplication stuff. I currently have been doing that in the language J, which is very confusing. I don't know if any of you speak APL. J is a sort of next generation APL. I need to port that to Perl so that humans can read it. And I basically am going to just keep releasing scripts for doing certain kinds of pictures. And that's going to be ways of slicing and dicing that information that we've gathered in more interesting ways. And we've got just libraries full of graph theory that we can take advantage of and maybe use. People have been proving theorems for centuries. And these actually suddenly have applications to making security decisions. That transitive closure equation is a nice one for us. So some credits. I use GraphVis. I worship Afterglow. Here are two books that I would strongly recommend. The Graphs and Networks book is all you need to know about graph theory. The Algorithms book is a way of traversing those graphs. There's lots of good stuff in there. There are some tools that are not bundled on the CD. OWNR, Medusa, FGDump. Those are available from foofus.net. Greets to my peoples. And everybody likes a prize. So valuable prizes await people who solve the following. If you have problems right now, Medusa does not run under SigWin. If you get Medusa to run under SigWin and explain to us how it was done, we will do something nice for you. Let me know. Also, I have been trying to use the LSA enumerate accounts with user right API call to enumerate users. The SDK used to say you could do that. And I know that sounds like a crazy idea. Just enumerating accounts with an API called enumerate accounts. But it doesn't work. It doesn't work the way it's supposed to, at least. It doesn't work the way the docs say. Now, I noticed about a week before I came here that Microsoft has revised the docs. And it no longer says explicitly that you can do that. It sort of hints that you can. But they're being a little bit cagier about it. 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. Again, something nice will happen to you. And that's, whoops. Should take me to foofus.net. So that is the material that I came with. I note that I am actually five minutes, I believe, ahead of schedule. And so I would love to take questions. I apologize for the delays at the start. And I also apologize that I couldn't show more interesting graphs. Porting from one computer to another all of a sudden was an unexpected thing. Special thanks to, this is foofus of foofus.com. It's amazing, first off, that there are two people with this handle. And then that we should meet at DEF CON is doubly amazing. But he loaned me his laptop. Thank you, man. If there are questions, I would love to entertain them. If not, I recognize it's DEF CON on a Sunday. Everybody's half asleep. Yes, sir. No, go ahead. Let's let him and then you're next. Yes. . Right. . . Okay. So the question is, can we use these same principles at design time? I think the principles are very applicable. The problem is what I'm, well, usually when I get to look at a system, it's already out there in the world. So I haven't done that work. Certainly you could draw, certainly you could draw connectivity graphs of things that don't yet exist. The, the, I guess the utility that I've perceived in what I'm doing is the ability to, you know, to spot connections and things that do exist. So at design time, you're doing it basically, it would be an on paper exercise. I think you could definitely use this for weighting some of the conclusions that you draw in threat modeling. But it's, you know, until it exists, it's not really rigorous because even the best plan can be bundled in implementation. And when you're talking at design time, you're only talking about planning stuff. All right. Yes, sir. Yeah. So have you thought about taking your graph data and piping it into some really cool, like, interactive graph exploiter? You know, like, operation sorts of tools. So the Dan Kaminski, we're going to do video of TrustGraph. Yeah, exactly. I have. I've played with LGL a little bit and I've done a sort of 3D fly-through look. Most of this I do for putting in documentation though. And so two-dimensional static representation has been my favorite. It's totally compatible with that. The dot language is very flexible and you can represent that in a variety of different things. I've been using graph viz, but if you like fancy twinkles, go for it. Yes, sir. Have you considered, you know, like, you know, like, you know, like, you know, like, doing directed graphs where you represent the undirected graph with two directions and having different weights to represent things like fireballs and stuff like that? Yes. So as I mentioned before, all the graphs that I'm drawing are undirected, which means every connection goes two ways. It is possible to think in terms of one-way connections. What I'm focusing on right now is transitive trust relationships or implied trust relationships. Most of those are two-way. Yeah. So I haven't bothered with it. But yeah, in terms of the dot syntax, all you do is instead of saying graph, you say digraph and you draw your edges differently. They have direction. Okay. So the facility exists. It just hasn't been something that I've focused on yet. Well, what about weighting the cost to go through and then trying to analyze that to see how hard is it to get to a particular node from, say, the internet? Yeah. That is interesting stuff and I encourage you to collaborate with me on this research. Cool. Well, one thing there that if we look back at this tree example, one of the interesting things here is that the graphs that I'm looking at are what I would call highly cyclic graphs. There are usually sort of loops that you can go through and multiple paths between things. And one of the things that I'm interested in doing is implementing like an open shortest path first algorithm so that we can do things like weight. What is the quickest way from point A to point B on the graph? I'm not doing that yet, but that is something that I certainly intend on doing. Again, those are all algorithms that exist. I just have to port them to my model of the data. Can you draw a correlation matrix instead of an adjacency matrix? Maybe. I'm not smart with math. If you want to talk to me later, I'd love to learn what that is. Okay. Can I draw a correlation matrix instead of an adjacency matrix? I assume I can. Yes. Smarter person says yes. I don't know why. I don't know what it is though. All right. Thank you very much. You've been very patient.