Hi, everybody. Before we actually get into this speech, I wanted to give a quick explanation. Dr. Zage and Dolores Zage are supposed to be up here with me. They sent me an email on Friday saying, hey, by the way, we're not showing up. I was like, well, okay. I was like, why aren't you showing up? They're like, oh, our son's got to move to Sandia National Lab, so we're going to help him. You know, DEF CON's not a big thing, so you can handle it. You're a grad student. So I was like, okay, well. So basically I added their email addresses at the last minute. So just, you know, that was the advice I got from some of the DEF CON goons. So, you know, you guys want to email them, whatever, any of this stuff. But also then they sent me yesterday. I was like, well, you know, this is based on 20 years of metrics research. And I did a lot of the security side of things, but not as much the metrics side of things. So I said, so how am I supposed to, you know, really do a good job explaining this? So they sent me their research papers. So then I was like, okay, 20 years of research papers. So I went through what I could, took notes, and, you know, basically get through the speech the best we can. And it was a lot of fun. And I was able to answer your questions to the best of my ability. I have a pretty good understanding. But like I said, I would have preferred for them to be up here with me. But, you know, the speech must go on. So the presentation outline, we're going to do a quick overview of S-squared ERC. It used to be CERC. It used to be the Software Engineering Research Center. Now it's the Security and Software Engineering Research Center. And then, you know, get on to the actual metrics and the vulnerability analysis. Let me get through these. Okay. I've got some notes. This is going to be the first DEF CON speech that I actually have to take notes to. So basically it's a National Science Foundation University Cooperative Research Center that, you know, it's funded by them. It has a ton of universities, 10 plus, 50 researchers. It's all collaborative. We have projects. You know, any company or you have government agencies, everybody else sponsors their projects, sponsors us to do research projects for them. The participating universities, I'm not going to read them off to you. You can see them. They're in the slides. They're on the CD. We have a ton of industrial affiliates. This is not really stuff that I care about as much. Okay. Then here's the design metrics timeline. Like I said, it's about 20 years of metrics research. So it started in 1986. And I believe it all came out of Purdue University. It was Dr. Wayne's age, his baby. From what I could tell, the first research paper they sent me was from Purdue. So I'm guessing that's where he did this research at. Let's go ahead. Okay. I guess we're going to click through. And this is really annoying. Okay. They got an Alexander Schwarzkopf Award for their research. Basically, I'm guessing they wanted that in here. To say, hey, it's credible. Like I said, this is their content. So I have to basically stumble through some of it. Okay. Here's some of the actually get to the good stuff. Overview of the design metrics. D2V, D2I. D2V is the external view of design complexity. And D2I is going to be the internal view of design complexity. Which is, you know, that's pretty much what we're looking, talking about faults in software. The more complex something gets, the more error prone it's going to be. So this is basically, when they started this stuff, it's all goes back to, it was all just reliability. This is, you know, 20 years ago, nobody really seemed to care about security. But they did care, you know, they didn't want their software crashing or, you know, if you have navigation system or whatever else. You know, you don't want that thing going down. So it was all, reliability was the focus for software when this research started. We look for outliers. Pretty much, you know, you have these modules that come up as very error prone. Fault prone. That's what we're looking for. And there's all the people that have funded us. This actual project to actually take the reliability metrics and apply them to security was funded by Army Research Labs. So let's get through. We've computed metrics on university based projects. Computer Science Corporation, Stanfin, systems from Army Research Labs. Harris's Rock Project, Magnavox, PBX system, Northrop Grumman. The stuff that I was actually part of. Is all the open source projects. So I didn't do metrics on these. These are Wayne and Delores. Now, on the results for the actual reliability metrics. They have correctly identified, in the worst case scenario, 76% of the defect prone modules. Now that's in the worst case scenario. That means, you know, the worst time you ran it was 76. It's almost always higher than that. Generally closer to 80 or 90%. So now we're getting into some definitions of our external metric D sub E. As you can see, D sub E is inflows times outflows plus fan in and fan out. I'm going to go ahead and go over that nomenclature. Because I'm not sure how standard it is. That's what I got from their papers. Inflows is basically any data coming into a module. It doesn't matter. It could be parameter passing, global data, reading a file. Any data coming in is going to be an inflow. So then an outflow is any data coming out of a module. So let's say like a file change. If your module writes to a file, that would actually be considered an outflow. Or it could be passing something out. Anything that's coming out of that module is outflow. Fan in are going to be the modules that actually use the module focus. By module focus, it's the module you're trying to run primitives on. And I guess I should, just to make sure, define what I mean by module focus. A module is any addressable, callable piece of code. Because since, you know, on this reliability metrics, it's not limited to C or Java or Ada or Perl or any other language. So, you know, because languages are so different, we're just saying a module is a callable piece of code. So anytime I say module in this speech, that's what I'm referring to. So then fan in, like I said, is modules. Account of the modules that use the module focus. So if you're saying we want to detect. Reliability in this module. How many modules call it? So that would be your fan in. Then your fan out would be how many modules does it call? So then as you can see here, we've got a, you know, basically, it's actually kind of simple. You know, once you have it all defined. You have two plus two plus three times. And then you get your, you know, your result is 23. So let's go ahead and. We're going to break that down to each part. In flows, out flows. Fan in, fan out. Then we have an internal metric. Which is, let's get through here. That's actually a measure of the internal complexity. Of a module. And what the equation for that is, you have your central calls. Your data structure manipulations. And your input output. Now W1, W2, W3, that's what I was confused about. Went back to the research paper. All those are is weight. So if you wanted to give more focus to data structure manipulations. Then you could give W2 a weight of two. Or a weight of three. So for all of our metrics. Unless if the actual, you know, the people funding us to run metrics. Request a specific weight. W1, W2, W3 is always one. Army research labs. The smart project. The values of W1, W2, W3 were always one. Just to make that clear. So then, let's get. Sorry guys. So extending design metrics technology to a software security engineering process. Really what we're trying to say is. Like how do these actually apply, you know, reliability metrics to security. And looking at defect rates. A deployed software package of one million lines of code has 6,000 defects. So let's say if we assumed 1% of those defects are security vulnerabilities. There are at least 60 different opportunities for someone to attack a system that is a million lines of code. So really what we're saying is that. And I'll get into this a little bit later. Is that the reliability faults. You're going to have security faults within those. So, you know, the majority is going to be. You have a ton of reliability faults. Then a small number of those will actually be actual security faults. Let's get through here. And this is where I'm talking about. So you have your defects. And within that. Some of that's actually exploitable. And that's kind of what we're. What we set out to prove. When we did this project for the Army is to say that. Yeah, these metrics that we've been using. You know, proven over 20 years for reliability. Can actually find security faults. So when you look at the parallels. You know, you have a fault prone component. It's likely to contain faults. On the security side. Vulnerability prone component. Which is likely to contain vulnerabilities. A failure prone component. Is probably going to have failures in the field. That's the things you really want to get. Because that means your stuff is going to crash. So when we look at the security side. We say, well, then you're going to have attack prone components. Which means it's actually likely to get attacked in the field. And when we actually did an analysis. On a large commercial telecommunication system. We found the presence of security faults. Did correlate strongly. With the presence of the general category. Of reliability faults. So when we saw that. That was kind of before this project. And that really led us to believe. Well, we can use these metrics. That, you know, have been used for stability. And actually take our error prone modules. Are most likely going to be, you know. Vulnerability prone components. So our project. Sorry. Project objectives. We wanted to investigate the overlap. Like I was saying. And see, like, how much overlap is there. And will our system actually find, you know. Vulnerable pieces of code. There's our systems that we did. Firefox. Open Solaris. Open SSH. And Drupal. And Apache. So pretty much we considered. It would be really good. If 50% of the components contained. Documented vulnerabilities. Would be identified. And what I mean by that is. You have like CWEs. Or CVEs. You know, basically everybody here that does security knows. You know, you have patches. And so you actually have the stuff get reported. For the most part. So you have reported vulnerabilities. So what we did is gather all those reported vulnerabilities. On these products. And then run the metrics. On the specific versions. And say, okay. Were we actually able to identify. These, you know. Error. Sorry. Vulnerability prone components. So that's the whole process basically. Is you take your system. Then you build a list of all your vulnerabilities. What version of the code it was. And this is where I actually. My big part in this research project. Was I would take a report of a vulnerability. And then say, okay. Well what is actually causing that vulnerability. What's the actual vulnerable piece of code. Because that's really what you need to know. Because when you're doing your metrics. And it gives you a specific module. You have to make sure. You have to know where the vulnerabilities was. Or else you can't say if it actually identified it or not. I mean if it says, hey Apache has a buffer overflow. But doesn't tell you exactly what module. The buffer overflow is in. That doesn't do you any good. So that was really my part. Was to find exactly where. Those vulnerabilities were. So then when they run the metrics code. We could then say, okay. Will the metrics actually identify all these. So there we have, you know. These are our CWEs. How many that we collected. For the different versions. We did open Solaris. I'm not sure what the version was on that. Firefox we had 2.001. 2.002. 2.005. Open SSH. Excuse me. Have the version numbers in just a second. So everybody knows what Apache is. I don't really need to go over this. For the vulnerabilities. On version 1.3.1. We had 144 files. 8 vulnerabilities identified. With the metrics. We actually had 87.5%. Or 7 out of 8. Vulnerable modules. Were identified in the top 10%. Which is a huge win for us. Because that's saying. If you are a code auditor. And you want to know. Where to look. And that's a huge win to tell you. Hey this is the top 10%. And that's actually where the vulnerabilities were. And that's pretty good. At least in my opinion. So there's a graph of. Actual some of the output. It shows. Hey these are the modules. That are likely to be vulnerability prone. Open Solaris. I think. Everybody knows. What that is. So we had 22,600 files. 23 module updates from vulnerabilities. Totaling 37 changes. Five is the largest number of changes. On one module. So we wanted to identify 23 modules. Out of 22,600 modules. In files. Which is approximately 1 in 10,000. So yeah. Pretty tricky. So Dolores wrote some. Code for this. She calls her divide and conquer. Let's see. There we go. So we actually got. She had that code to work. And pick apart. Because I guess there's a lot of weird stuff in there. That was messing up her preprocessor engine. But once she got that working. We had 60%. Or 3 out of 5 vulnerable modules. And 69%. Or 9 out of 13 changes were identified. Which is pretty good. And we did a lot of work. We did a lot of work on the reliability numbers. But for a system that complex. With that much code. Still felt it was pretty good results. Firefox. Again another description. Everybody knows what Firefox is. So we did a general analysis. We did a lot more on this one. They were a lot more interested in Firefox. The army was. So actually did multiple versions. Instead of just one specific version. And we had at least 51%. And at most 86% of reported vulnerabilities. Were in data handling. So the data structure manipulation. Which we talked about earlier. That was the best predictor of vulnerabilities. In Firefox. So for that. What you would want to. Or what we ended up finding. Is that that would be. One of the times. We thought if you're going to analyze web browsers. Then you would want to give more weight. To the DSM. Than to anything else. Open SSH. Everybody knows what that is. We had 3.8 P1. 31 vulnerable modules. Were identified. 18 of the 31 vulnerable modules. Were in the top 10%. Which is again. I say pretty good. It makes your life a lot easier. If you're looking for security bugs. If you can say the top 10% was actually accurate. And the tough thing with this research also. Is that there could be. Still unknown vulnerabilities in software. So when it gives you a top 10. Vulnerable module. We're kind of. Basically all we can actually look at. Is the ones that have been identified. So there could be. Our numbers could actually be higher. If there's unknown vulnerabilities in that top 10%. That we could actually have much better numbers. But we don't know. We didn't actually do source code auditing. And say okay. Let's try to find exploits in Open SSH. Or Apache or anything like that. To see if we could find those. Then we get over to Drupal. And that's. It's actually. New research is going on right now. With a grad student named Zili. And Drupal's in PHP. So again a different language. The other ones were all C, C++. And everybody knows what it is. So anyways. What we ended up finding with Drupal. Well some of my work is. Dolores ended up naming it the Drupal Vulnerability Miner. But it was a lot easier than Firefox. Where I was manually collecting this stuff. I actually just wrote a Perl tool. That we called the Drupal Vulnerability Miner. And the Drupal community. Has an actual security site. That's really good about reporting the vulnerabilities. And where exactly the vulnerabilities are. And how they were caused. So that whole thing. The Drupal Vulnerability Miner goes out. And is able to just parse through that data. And automatically generate. What we needed. We have these Excel spreadsheets that show. This is the vulnerability. This is where it was in code. This is what caused it. So then when we go with our metrics. Then we compare the two. So that was just something that I did. That made things a lot faster. And on our PHP source code analysis. We're still designing. I'm not. But Dolores is still designing the PHP to XML tool. So that she can. Because basically we have this XML definition. It's a generic definition. So then let's see. You want to take that. Instead of actually like. Scanning through Pearl. You actually have a parser. That converts it into a standard XML definition. And then the metrics are run on that. So then basically. If we need to add a new language for our metrics. We just write a new. Basically a parser. That converts it over to this XML definition. So that way we're not language specific. I think they said. Maybe it was eight or ten years ago. One of the government people came to them. We need you to do Ada. Okay well we did do C. This is the whole idea behind this. Making it a little more generic. So after showing all that stuff. On this project. The benefits that we felt. Like I said earlier. Is to know where your vulnerabilities reside. If you're doing. Especially if you're on a team. And you're trying to find. If there are vulnerabilities in your code. And you want it. You're trying to audit the source. It's very helpful to know. Where to start looking first. Now of course you're skilled. We've talked to people from different sponsors. That have their actual. Skilled source code auditors. And those guys are like. Oh we know where to look. And we're pretty good at it. But this was still helpful to them. They said it is beneficial. There's things that they may not. Because they kind of have a pattern. Of what they look for. There may be stuff they don't usually look for. And this helps with that. So pretty much being able to. Analyze all these different technologies. Like you have your web server. Open SSH etc. You can cover all these different systems. And that's one of the big benefits we felt. A lot of these scanners out there. Will say hey I can look at C code. And especially a lot of your static analysis. That just says. I can find buffer overflows in C. And that it's a specific thing. That it's looking for. A very specific pattern. It's very limited. So with ours we're trying to say. We can take all these different languages. Any language out there. We could do metrics on it. And we feel that's a really big benefit. Because if you have. You code in C. And you have a C scanner. And that works for you. But then let's say. All of a sudden for some reason. It's not. So you could actually. Get the XML definition into our system. Run metrics on it. And it would show you the fault. And vulnerability prone modules. So our next research steps. Is basically to continue analysis. Of open source systems. We're trying to find other primitives. To identify other security weaknesses. Because like I said. We didn't identify 100%. So we think there should be metrics out there. That will help to better. Find all those vulnerabilities. And one thing. They said when I was out here to ask. Is if anybody has any systems they want analyzed. Then that would be something too. You could contact them. And if you have some source code. They've worked with all different agencies. And companies. So NDAs and clearances. And all that stuff is no problem. For anybody that has those. And actually that's it. Go on to questions.