Thank you. My name is David Byrne. I'm a security consultant with Trustwave. We're a security and compliance consulting firm. We also have a full offering of managed security services. I'm in the app pen testing group. I spend most of my days attacking websites, but our group also does other types of app pen tests. We do security code reviews and training for developers on secure coding techniques. Before Trustwave, I was the security architect at Dish Network, which is how I know Eric. Hi. My name is Eric Dupre. I am a member of the IT security team at Dish Network. A significant portion of my responsibilities at Dish Network involve web application security, including pen testing of internally developed applications. I'm also the co-chapter leader of the Denver chapter of the Open Web Application Security Project, or OWASP. All right. So I'm guessing most of you know that Grindle is an open source web application security scanner, which is why you're here. I've been writing it over the last year. Earlier this year, Eric joined and started helping with testing, porting it to other platforms, and made a really nice live boot CD that is the basis for our demonstration later in the presentation. Commercial app scanners have been available for quite a while. They're pretty well established in the market, brands that I'm sure most of you are familiar with. But the selection of open source automated tools has been a lot more limited, which was my main motivation in writing Grindle. There are several goals that I had from the beginning. I wanted to be more open source. I'm a multi-platform, so I wrote the tool in Java, which obviously is available on just about every platform that's out there. But I wanted to avoid this slow, clunky look and feel that you see with a lot of multi-platform GUIs. So I used the standard widget toolkit, which allows a single Java code base to make native GUI calls across multiple platforms. So for example, this is what Grindle looks like on Windows Vista, on an XP, on a Macintosh, and in a little bit you'll see what it looks like on Linux. It's kind of a pet peeve. I don't mind when I go to download a tool and then I have to download a secondary library and then maybe go to another website and download some other tool that it makes calls to. So I wanted to make sure that Grindle was very simple to install. It's just a single distribution or single download, no install required really. The only requirement is Java 5, which has been out for four years next month. I think it's safe to assume most of you have it. If for some bizarre reason you're still running Java 4, it's time to upgrade. I also wanted a tool that would be useful. It's useful to a wide audience, anyone ranging from an IT security manager who might have a high-level understanding of app security but really doesn't need to understand how to test for specific vulnerabilities, but then also something that was useful to someone like myself, a professional pen tester who's fully capable of performing manual tests but can benefit from some of the automation, especially areas regarding application mapping and information leakage, which can be very time-intensive to test for on a manual basis but still are very accurate to test for automated. Finally, I wanted to make sure that Grindle was safe to use. Finally, Grindle is a vulnerability discovery tool, not an exploitation framework. There are some tools already out there that do a good job at exploiting specific classes of web app vulnerabilities, but to write a generalized platform would be an enormous undertaking. That's just not what Grindle is. Before I talk much about the features of Grindle, I want to discuss quality a little bit. When I first started working on Grindle, my dream was that it would be so beautifully perfect in how it discovered vulnerabilities that instead of releasing it publicly, I was going to go out and get half a dozen jobs doing manual pen tests, but instead spend all day running automated scans and just raking in the money. Oddly, it really hasn't worked out that way yet. I still think that Grindle is a good tool, but it's not the same level of quality as what you'd see on a commercial scanner. There are several reasons for this. The commercial tools have been available for a number of years, they have large development staffs, and I would imagine that they usually have multi-million dollar research and development budgets. Grindle, of course, is a good tool. has none of these things. Despite that, I still think that it's a viable open source alternative, and this is something I really struggled with when I was first writing it, because I know that there are things, even in the current version, that I can improve on, and there are things that I want to add to it, and that will happen in time, but I came to the conclusion that eventually I needed to release it, because the only way it's going to continue to improve is if it gets exposure to a wide variety of websites, both secure and insecure. And the only way that's going to happen is if it's released publicly. And the same thing is true for commercial tools, too. The more they're used, the more exposure they get, the better the tool can become. So there's a number of ways that people can help with Grindle if you're interested. If someone wants to contribute code, that would be phenomenal. I'd be ecstatic, but realistically, I know that that's a pretty significant investment of time that most people can't make. Simply providing feedback on things like bugs, false positives, false negatives, ideas for new features is also greatly appreciated. Keep in mind that I don't get paid anything for writing Grindle, and I have a real job and a family that needs to take priority, so I can't always respond quickly to emails, but I'll certainly try whenever possible. Another thing is that if you're using Grindle to scan a commercial software package or to test an open source tool, pretty much any, if you're scanning any kind of application that's publicly available, and you find a vulnerability, let me know. I'm kind of interested in collecting vulnerabilities that have been discovered by the tool. One of the advantages of making Grindle open source is that there's a lot of libraries that become available that for a commercial product would have to be either written from scratch or purchased as some part of a toolkit. Just to mention a few by name that were particularly helpful, the Apache HTTP components library is, in my opinion, the best Java HTTP library out there. Lobo is an all-Java web browser. Grindle doesn't use Lobo, but a partner project called Cobra is an HTML parsing engine and document object model implementation. Grindle uses a heavily modified version of Cobra, which is useful for things like spidering, testing cross-site scripting, pretty much any time when there's a need to model real-world browser behavior. Along the same lines, Mozilla Rhino is the all-Java version of the Firefox JavaScript engine. Obviously that's used for testing cross-site scripting as well. And then Nikto, I'm guessing most of you are already familiar with Nikto. If you're not, it's a, a tool that's been around for a while. It's based on an even older tool called Whisker. And it's basically designed to identify known web vulnerabilities. So, for example, is the version of Apache out of date? Or are you running a version of Outlook Web Access that's known to be vulnerable to cross-site scripting? It's a collection of almost two and a half thousand tests. Now, Nikto itself is open source, but the database, even though it's plain text, the database of tests is not. However, the creator of Nikto, Sulo, did give permission for it to be used in Grindle. And there are some, actually some advantages to using Grindle to run Nikto tests. For those of you that use Nikto frequently, you'll know what I, I mean when I say that it's prone to false positives. That's almost always because a web server responds with something other than a 404 message for a file not found condition. Could be with a 200 or a redirect. And Nikto tries to handle that, but it's not perfect. Grindle's not perfect either, obviously, but it's logical file not found tracking mechanisms are much more sophisticated, which significantly reduces the false positive rate. There's a lot of features of Grindle that we're not gonna have time to discuss today. And even if we did, it would be kind of boring. So I just want to hit on the, the main features that I, hopefully will whet your appetites and make you interested enough to go and download it, give you an idea of the type of things it can be capable of. In addition to the automated testing modules, which I'll be discussing in just a minute, there's an internal web proxies. And that serves two purposes. One is that it allows a user to guide the web for the client. and automated scan so that as the application is interacted with or as the website's being browsed, Grindle will discover new components and start scanning them for vulnerabilities. The second purpose is to act as an intercepting testing proxy, like a WebScarb or Burp or Paros. Eric will be demonstrating those features along with the request fuzzer, manual requests, and also talk a little bit more about the automatic file not found profiles. Upstream proxy servers are also supported. Authentication isn't supported yet due to a bug in HTTP components, but that'll be fixed in the next version. The number of HTTP requests or connections can be throttled via a few different settings. That's obviously pretty important whenever you're scanning a production environment, just to be sensitive to the needs of prod. Now, any kind of reasonably well-written application and well-provisioned environment should be able to easily handle anything that is sensitive to the needs of prod. There's no single version of, or single instance of Java or Grindle can throw at it, but speaking from experience, trust me when I say that if you're running a scan and anything happens on that web server, you're going to be blamed for it. So by throttling the number of requests and connections, hopefully you can divert blame to where it belongs, which is usually with the operation groups. HTML form-based authentication is supported, which allows for a few different things. One is that the spider can start exploring areas of an application that are not necessarily authentication that are only available via authentication. Also, there's a authentication enforcement test module, and in the next version there will be an authorization enforcement test module. There's a lot of ways that a automated scan can be tweaked and tuned in order to improve performance or the accuracy of the scan, and the, you don't really have to do that. If you want to just do, you know, a quick default scan, but the more familiar you are with the targeted application and the more you're familiar you are with Grindle and with web application security in general, the more you're accurate and the better results you're going to get. And that's true of any tool. It's just, you know, the more knowledge you have, the better you're going to be able to use it. So a few examples of some of the settings include the ability to block specific query parameters for any kind of testing. You can also mark a specific query parameter for, as being irrelevant from a spidering point of view. You can create URL whitelists and blacklists based on regular expressions, which helps prevent the scan from leaking out into other websites or into, you know, web sites. So you can do that. You can do that. You can do parts of an application that should be off limits. And you can also create, or excuse me, identify known session ID names, which obviously helps with the session management testing. So again, this isn't a complete list of all the test modules that Grindle has, but it's just kind of the highlights, things that I think will, are a little more interesting. There are several spidering modules. The HTML tag requester is traditional spider, basically. It will look for tags with a source or href attribute value. Tags are tested, can be, is configurable by the user. And then the URL that it points at is requested. Now, there's a certain amount of risk associated with this. The RFC 2616, if you want to look it up, explicitly states that a get method, which is what's used to request source or href attributes, should only be used to request data. It should never modify data back on the server. Despite that, it's not uncommon to find web apps that will use a get to modify data. Google found this out the hard way when they released their desktop caching engine a few years ago. And fairly quickly, they started receiving complaints because the prefetching logic of the caching engine was going out and requesting URLs of applications that users were logged into, and it was modifying data, or, you know, in some cases, even deleting data on those apps. Last year, I was speaking with a, someone that works on one of the, the best known commercial app scanning tools, and I asked him how they handled this. And at the time, I didn't really mention that I was working on an open source scanner, which I feel a little bad about now, but it's the type of information that I'm pretty sure they would openly give to any potential customer. His answer was basically a very polite too bad. And I agree with him. He had several points. One was that it's impossible to anticipate every kind of bad application design for an automated tool. There's just too many ways that you can screw something up. And if you're scanning a application that's really fragile and poorly designed, there's no way that you should be doing it in a production environment. And if you're doing it in tests, then you should be able to recover fairly easily from any kind of problem like this. And if, if you come across something like this after an automated scan, then you're gonna know the application is poorly designed. We need to go back and change this. Something that he didn't mention is that, at least in my opinion, a developer who's gonna make this kind of mistake using a get to modify data is extremely unlikely to protect the same query against cross-site request forgery, which is a much, much bigger issue than simply modifying some data on a, on a, on a, on a, on a, on a, on a, on a, on a, on a web server via automated scan. So there's a couple ways that this can be avoided. One is that you can use a URL blacklist to prevent the scan from visiting parts of a, of a website that are, that are problematic. But that requires a fairly in-depth knowledge of the application and can be time consuming. A better option is just to ditch the spider completely and use the internal proxy server to guide the scan, so that when you get to a page that says something like, click here to delete the database, don't click there. And Grindle's only going to test areas, you know, areas of the application that you're actively requesting. It's not going to go out and, and start testing just URLs that are, are only in an HTML response, unless you enable the spider. The form baseline module will basically try to guess at how an HTML form should be filled out and then submit it to the server. There's actually even more risk associated with this one because a form can generate a post message. And posts can legitimately modify data on a server. However, the module allows you to select which methods are used, and so, you know, if you want to play it safe, just don't enable post. Search Engine Recon can be pretty useful. It's not uncommon when I'm performing a pen test to, an, an authenticated pen test, to come up against a website where I'm basically just seeing the login page and maybe some help pages or something like that. Very, basically very little to, to test. But when I go to a search engine, I find that some other website has linked to content on the site that I'm testing. A search engine has picked that up and then indexed it, which, you know, obviously allows it to be tested. This search, test module, I'm going to go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead and go ahead enable it if you know you have time to wait. So the lesson is don't just randomly start clicking on things. Make sure you understand what the impact is of the modules that you're running. Usually I'll only enable something in our file enumeration if I'm having a lot of problems finding content on a website, or if maybe I have a lot of time left on an engagement and I want to go back and just double check that there's nothing hidden or unusual that I could have found. There's a number of session management test modules. One of them will test the session ID strength, so it will look for repeated session ID values coming back from the server either in the cookie value or in a query parameter value. It will also check the level of entropy or randomness between values that come from the server and obviously report on it if there's an insufficient amount. Session IDs should never be stored in a URL for a number of reasons, so there's a module that will test for that and report it. Session fixation is a vulnerability that allows an attacker to trick a user into using a session ID that's known to the attacker. There's a number of ways this can happen. There's a module that will test for the common ones. The authentication enforcement module I mentioned briefly earlier, it's marked as experimental because it's not as accurate as I would like to see it. Basically it will look for transactions that are sent, requests that are sent authenticated, and that... A similar request will be sent to the server. The request was never sent unauthenticated. The session IDs are stripped out either from the cookies or from a query parameter, and the request is resent. And if the two responses appear to be the same, then it's assumed that authentication bypass is possible. Now, that's not always a problem. It could be just a cascading style sheet or something like that, but it's, you know, there's always a possibility that sensitive information is leaked even in obscure formats, so it's something that needs to be manually checked in order to confirm whether it's important or not. There are two cross-site scripting modules. One of them is for testing query parameters, which is where you usually see cross-site scripting. Another is for testing file names. Some web platforms, WebLogic in particular had a problem with this for a while, will repeat the file name verbatim inside of a file not found message, and if the file name contains JavaScript, then it's executed by the browser. Both of the modules use the same code, but in a different way. Both of the modules use essentially the same technique for testing cross-site scripting. The, it will see the input mechanism, whether it's a file name or a input parameter, with a random token. And if the token is observed in the response from the server, then the context is identified. It could be an HTTP header value. It could be an HTML tag attribute value or tag attribute name. It could be inside of an HTML comment block. There's over a dozen different contexts in all that can be identified. Now, technically, this isn't part of the cross-site scripting module. It's just a tool. It's underlying functionality. Once a context is, an output context is identified, it's tagged as an input-output flow. That can be tested for a number of different modules. For example, carriage return line feed injection. By knowing what the output context is, the cross-site scripting module knows how to escape from it. So, for example, if it's in a text area block, it knows that before, that any attacks need to be preceded by a closed text area tag. There are a number of formats that a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, all of that is sent. Oh, sorry. Backing up real quick. Before an actual attack is sent, that a series of requests containing characters that are commonly used in cross-site scripting attacks but may, that may be filtered are sent. So for example, greater than, less than, semi, single-quote, double-quote and so on. Any attacks that contain filtered characters are obviously not sent, which significantly improves the testing efficiency. There are a number of formats that attacks can be sent in. Basically there's just ways to try and evade cross-site scripting filters. It could be unusual ways of inserting executable content into a document. It could be different encoding formats that might bypass the filters. When a response is received, the HTML is parsed into the document object model, and every piece of executable content is run. So, for example, event handlers, on click, on load, on error, are all executed. Script blocks are executed. Some simple, and I would say rather naive, cross-site scripting filters will look for specific text strings, such as methods or functions like alert, or maybe document.cookie, to filter on. Now, that's a really bad way of protecting you against cross-site scripting. An experienced penetration tester is going to be able to quickly recognize that it was, the attack failed simply because of a rather simple filter. It's a little more difficult for an automated tool, so Grindle uses a fake method called testXSS, which is an extension to the document object model that it uses. Whenever testXSS is called, the test modules know that the cross-site scripting attack was successful. There's a similar mechanism that's used for intercepting external script file references using a script tag and a source attribute. So using that technique, as opposed to something like regular expressions, can significantly improve the accuracy of it, because it's, since it's acting as a browser, it's very low possibility for false positives. There are two SQL injection modules. One of them is error-based, the simplest way of testing for SQL injection. Throw a single quote onto the end of an input parameter and look for an error message in the response. It doesn't necessarily, it doesn't always mean that there is SQL injection possible, but nine times out of 10, there will be. And at the very least, there's some sort of information leakage from the error message. Grindle has a collection of regular expressions that match patterns of, of, of, of, of, of, Error messages from all the common databases, even DB2 and Access are in there, and also database drivers like JDBC or OLEDB. The SQL tautologies module is marked as experimental, again, because the accuracy isn't quite what I would like it to be. Testing for SQL injection using tautologies is well beyond the scope of this presentation. But basically, from an automated point of view, you have to answer the question, does response A look more like response B or response C? Something that's very easy for a human to do. Humans are going to be able to read the text and understand it. A human will be able to pick up on subtle visual cues that would be difficult for a program to identify. So there are some techniques that I'm working on that will significantly improve this in terms of being able to score the difference between two different responses. And I'm optimistic that by the next release of Grindelist, we'll be out of the experimental phase. And it still works. Just because it's marked as experimental doesn't mean that it's broken. It just means that I know there are... There are significant changes that will be made, or at least important changes made in the next version. A number of miscellaneous text. Carriage return line feed injection is very similar to cross-site scripting, except that instead of injecting into the HTML body, you're injecting into the HTTP response headers. Cross-site request forgery is pretty difficult to test for on an automated basis, mostly because it usually doesn't matter. For example, the Google search engine is vulnerable to cross-site request forgery, but nobody cares, except from a forensics point of view. There are a few things that I'm going to be tweaking on this module to make it more accurate. But in the end, it's going to require manual investigation to determine, is this form truly important enough to need protection from cross-site request forgery? The directory traversal module is very similar in its approach to identifying vulnerabilities as the SQL tautology module. And so I expect that both of them will leave the experimental status about the same time. Generic fuzzing module can be pretty useful. It takes a while to run, but it's not like you have to sit there and watch it the whole time. It takes a set of predefined strings that either could be default or user defined, and appends them to the end of every input parameter that's observed by the scan. The response is checked to see if it's a 500 response code, which indicates there was some kind of problem on the server. In this context, it usually means that there was a problem with input validation. It also checks the response for platform error messages. That includes the database error message patterns that I mentioned earlier. But also Grendel has a collection of patterns that match common web platforms like .NETs, PHP, ColdFusion, and so on. The platform, there's a number of information leakage modules. Just a few of them include the platform error messages module. Basically uses the same collection of patterns that I just mentioned, and, except it passively applies them to each error message. transaction. The advantage is that when you're able to identify an error message state like this, sometimes it can reveal a vulnerability, but at the very least it will help to identify the inner functionings of a certain part of the application. And sometimes those error messages can be inside of HTML comments, which obviously is very time-consuming to look at every single comment on a manual basis. The robots.txt module is, well, robots.txt is intended to guide a search engine as to where content should and should not be indexed. Some people mistakenly use it as a security control to try and hide areas of a website, say like an admin interface. It's a bad idea, though, because it actually reveals the existence of that interface. The comment lister just lists out the HTML and JavaScript comments that are identified. Every once in a while you find something useful in them. For example, once I found some database credentials that had been put in there during the development phase but never removed when it went to prod. A couple of web server configuration tests. Cross-site tracing is possible when the trace or track methods are enabled, which they usually are by default. Proxy detection. Sometimes a web server can be misconfigured to act as a proxy server, especially with mod proxy on Apache. And if that is present in a perimeter environment, it can be particularly dangerous. There's a number of application mapping functionality. And again, this is mostly useful for a penetration tester, sort of as an automated form of reconnaissance. I already mentioned input-output flows regarding testing for cross-site scripting. There's a module that will list every input-output flow that's detected, regardless of whether a vulnerability is associated with it. And that allows an tester to go back and manually check each of those flows for vulnerabilities like cross-site scripting or carriage return line feed injection. There's a module that will make an offline website mirror, which is useful for manual investigation. And I already mentioned NICTO. So with that, Eric's going to give a demonstration of the tool. Eric Boehmer, Digital Services Manager at NICTO, is the head of CCT's So first a few notes about the demonstration environment. It's a Slack 6 based live CD, and the server target for our scans is a typical LAMP stack, Linux, Apache, MySQL, PHP. On top of that is running an older version of the Zen Cart open source source shopping cart application circa February 2004. There's a couple reasons we chose this particular application. One is that it contains a wide variety of known security vulnerabilities. And secondly, because while we considered using a design vulnerable application, like I personally think that the Foundstone Hack Me series is really great, we specifically chose instead to use a real world application. And Zen Cart is very commonly deployed on the internet, was back then, and is still today. So the client that we're going to be using to test the intercepting proxy, or to demonstrate it, is the Mozilla Firefox Web Browser 3.0. So let me go ahead and flip to my virtual machine. This is GrendelScan. And while we don't have any, in the interest of time, we're not going to go through a fully automated scan. I wanted to point out that it's very easy to do one. All that's necessary is to enter your base URL here, add it, and then go into the test module selection tab. There are some default tests enabled, but you can change them to whichever test you want to run, and you must enable at least one spider if you want to do a fully automated scan. And then just start the scan. So easy enough, but in my case I'm going to demonstrate the intercepting proxy and performing a guided scan. So I'm going to open up some settings that I previously configured. And first thing to note is that it's configured to bind to local host on TCP port 8008. I've configured my web browser for the same. In the test module configuration, I'm going to go ahead and configure SQL injection, error-based as well as the cross-site tracing module. And then I'm going to go ahead and start the scan. And yeah. So in the scan status window, the first thing you'll note is that it's performing some tests for logical 404 responses. And what this means is that Grendel is creating a number of requests to the server using randomly generated file names, and then a variety of platform-specific file extensions. And the reason it's doing this is to create known file-not-found conditions in each one of those platforms. And based on how the server responds to the file-not-found condition, whether the HTTP status code is 404 or something else, we'll use that to determine how we judge the other responses coming back from the server in the future. So what it's saying here is that the scan queues are empty, but more content can be supplied through the internal proxy. So what it's saying here is that so what I'm going to go ahead and do is flip over to my web browser here and open up ZenCart application. And now I'm using the internal proxy. And you'll notice that there are some hidden fields shown here. Normally they're hidden. Now they're converted by the proxy dynamically to text fields. That's a setting. And I'm going to select one of these products. I can browse through the application normally. When I make a request, that request is then submitted through the proxy. The proxy will automatically test it. For vulnerabilities, according to the module parameters I've configured. And in this case you can see it's already discovered a possible SQL injection vulnerability in the page I requested. So we can view the details of these transactions. I'm going to go into the transactions tab for that. And I'm going to change the view settings to show all the transactions, except the 404 detection ones. And let's list all those other transactions. I'm going to go ahead and go into the details of this one, 296. Which is my product request. And this is the transaction viewer. Excuse me. And the request and response are shown here. You can view either in parsed or in raw mode. And the request or response bodies, you can view in rendered HTML, or in text, or in an internal hex viewer. So, I'm going to go back to the transaction, and this time I want to right-click on the transaction, and I've got some options. I want to send it to the manual requester. So I'm going to say send a manual request, and immediately the dialog pops up. This is basically the same view, except now I can edit any of these items in the request. And then I can hit execute to then send, once I've got it the way I like it, I can hit execute to send it to the server. And then I can view the response here. So the proxy settings tab, pretty simple. It configures the behavior of the proxy. There's the HTML form fields I mentioned, reveal hidden fields. And internal proxy settings, I can change the bind address, or the bind port, or the number of threads, and I can stop and I can restart the proxy in this interface. The interception settings. So, as David mentioned, where an inter, a grandal scan is an intercepting proxy. So I can enable a request interception here. And this is a regular expression based rule set to determine whether or not I intercept a certain request. So, there's an element of the request listed here under component. And then the value. And then, this is the regular expression part. And then whether I intercept or don't intercept the request, based on that match. So what, what happens here is it's logically ended together. Any, any request where all of the intercept rules match, and no, all of the intercept rules and none of the don't intercept rules match, will be intercepted. So just to demonstrate, I'm gonna go back to the web browser. And I'm just going to request another item here. And you'll notice that now it's popped up a request intercept dialog. And again here I can edit any of these, anything here in the either parsed or raw mode. And then I can accept the changes, and it'll submit that to the web server. So going back to the transactions tab, I want to demonstrate the, the manual fuzzer feature here. So I'm gonna right click on this transaction again and send it, this time I'll set it to be used as a fuzz template. And, in the fuzz template, this is the, the base for the request that I'm going to send as my, in my fuzzer. I want to change the product id in this case. I want a fuzz product id, so instead of 106 I want to use a bunch of different other values here. So I'm going to replace the value with a token which is fuzz with two percent signs on either side. Like that, if you can see it. And that's where I'm going to send the request. And what I'm gonna do is I'm gonna go back to this first This is called the insertion point. This is where my fuzz value is going to be inserted. So hit OK. And then I'm going to define a fuzz vector. In this case, these are numbers, so I want to use a numeric sequence. Begin with 1, go to 100, increment 1, ascending. So fuzz criteria is the next part. Here, I've got it set to check against the platform error messages that David mentioned earlier, which can be useful. This will define this rule here. The response code is one of the elements I can choose. But basically, if this component matches, I'm going to display, or optionally, it doesn't match. If this rule matches, I'm going to display it in the table listed below. So in this case, I wanted to say where the response code to my request is 200. We'll define it as a match. And so I'll go ahead and add that, and then start the fuzzer. And you'll notice that it's making requests of the web server with products ID from 1 and incrementing all the way up to 100. All of these have an HTTP response code of 200. So. So I can view the details of any of these transactions the same as I could before in the transaction viewer. So I'm just going to double click. And you can see there's my response. And there's the product that happens to match this particular product ID of 9. So now that I've gone through the interface, I want to show you a report that we've previously, previously run, a more complete scan. And here are some vulnerabilities that the scan was able to detect in the application. This one, for instance, is carriage return line feed injection. In any of the findings, we go into the severity of the finding, URL where it was discovered, a description of the vulnerability. In this case, so this is carriage return line feed injection. We've injected %0D, %0A, which is a carriage return and then a line feed, at the end of a parameter. And then a header of our choice that we want to appear in the output. If that was successful, then we've got successful carriage return line feed injection. So it looks like we found it here. We've got our carriage return line feed. Let me look at the transaction use just to verify that that's real. And indeed, there's our carriage return in our line feed. And you can see that the new header of our choice was inserted in the response. So we've also got a recommendation for mediation. So how would you fix that? Another example here is SQL injection. So obviously, pretty high severity. And as a lot of you know, we just put a single quote in. And we're going to do that. And we're going to do that. The details of this request, you can see, here's our single quote, %27. And then in the response, I'm going to go to the end of it, we can see, here's the MySQL error. And this is definitely vulnerable to SQL injection. So again, impact, recommendation, and a reference for finding out more about this kind of vulnerability. So when comparing an automated web scanner with a manual penetration test, automated web scanners actually do have some advantages here. The first is that the training requirements are pretty minimal. It doesn't require a lot of applications, securities, and specific knowledge to start a test. Also, the number of man hours, pretty few. Even if a test takes several hours to complete, or a scan takes several hours to complete, the scan can be started. And you can walk away and come back, usually, to a finished report. The upfront cost is typically significantly lower with an automated web scanner. Well, not necessarily significantly lower, but somewhat lower, especially the incremental cost is what I'm going to talk about here. I'm getting at. Frequently, the license, you might be able to buy a one-seat license, which you can use in multiple applications, as opposed to a penetration test, which is targeted at an individual application. So I mentioned some advantages. You'll note that one advantage I did not list in favor of automated scanners is accuracy. And there's a good reason for that. There's a pretty significant class of vulnerabilities that automated web scanners have. And the first of which are logic flaws. So one example that's been known for a while is if your shopping cart accepts negative quantities of a product to be put into your cart. And say, for example, I can put negative 8 of a certain item into my cart that costs $100 each. I could get negative $800, or essentially an $800 credit, into my shopping cart before I check out. A web scanner is not going to be able to find this vulnerability, because it's not able to understand the logic involved, or what that number really even means. Another example is design flaws. So if you have a password recovery question, a secret question used to recover your password, and the question is, what was the make of your first car? Now, that's a really terrible question. The reason is because there's relatively few automakers. You can iterate through an entire list relatively quickly with relatively few requests and come up with the correct answer. Again, automated scanner is not going to be able to detect this. It doesn't understand the English language, isn't able to parse that kind of a question, or know it's bad. Abstract information leakage. So a year ago, the Macworld Expo had a good example of this, where on the registration page, there were coupon codes. And coupon codes were the ones that you had to use. And coupon codes were worth a discount to potentially several hundred dollars discount off of the price of admission. And so it happened that in the JavaScript source code to the web page, there was a number of MD5 hashes listed there. And these MD5 hashes were for valid coupon codes for client-side validation. And it was possible to brute force through the entire list and check against the MD5 and find out which coupon codes were valid and then submit one. Obviously, a serious vulnerability. But scanners are not going to be able to detect this. So we've gone over. They really can't understand application logic or data, understand how your application is functioning. Whereas a human penetration tester is typically going to be able to figure that out and understand things that the scanner would not. Also, scanners generate typically far more traffic than a manual test. So if you're looking to conduct a test with stealth, automated scanners, probably not your best choice. I want to talk about this a little bit more, because as a pen tester, it's kind of a pet peeve of mine. It's easy to dismiss the kind of vulnerabilities that Eric was discussing as not very common or something that's relegated to code that was written in the 90s. That's not true. We're talking a couple days ago about web app firewalls. And a coworker of mine commented on how you can't filter out stupid. And you can't scan for stupid, either. This is an exploit from a pen test that I did earlier this year. Can you spot what I'm doing here? The default is free purchase equals no. And when you change it to yes, it does exactly what you think it would. In fairness, this is not an extremely complicated vulnerability. It's something that even a novice pen tester should be able to find. A better example comes from a test that a colleague of mine did last year. And what he found was that given an employee's name, he could go to different parts of an application and query information about that employee. Most of those queries, in order to get to the data, required some other kind of secondary information, like an employee ID number. But what the tester found was that all of that information was available from somewhere else in the app. So in the end, he was able to walk away with the employee's home address, the home phone number, social security number, employee ID number. And some other sensitive information. He shouldn't have been able to get access to any of that with the account that he had. And this wasn't because of SQL injection. It wasn't some kind of session hijack. It was a design flaw, because each query was designed ignoring the behavior in the rest of the application. And this type of vulnerability we see all the time. It's very common in applications. Usually in the context of compliance, I often hear discussions or read about whether or not an automated scan qualifies as a pen test. From a security point of view, the answer is absolutely not, and it's ridiculous to assert otherwise. We've already talked about entire classes of vulnerabilities that are theoretically impossible for an automated scan to discover until we have Hal-like intelligence in our software. But beyond that, there are a lot of vulnerabilities that, while I can imagine a way of writing a test module to find them, it's just not going to happen. Earlier this year, I was doing a test, and I noticed that when square brackets were a pended to a specific query parameter, the response from the server was subtly different. In doing a little bit of research and some more experimenting, I found out that the application was based on a somewhat obscure web platform written in Perl. And eventually, I was able to write an exploit that allowed arbitrary Perl code to be executed on the web server. That's a pretty significant finding. And again, I can imagine a way of writing a test module for it, but it's a fairly obscure platform. And even if you had the resources to write tests for every or even many different obscure software that's used out on the internet, you ended up with a tool that was so bloated and so slow, no one would want to use it. Just about every application that I test has something about it that makes it unique enough that some of its behavior would be missed by an automated scanner. Whether it's functionality that's somewhat non-standard and written specifically for the application, or it's using some piece of software that, you know, maybe people have heard of but isn't common enough to justify many, if any, test modules. The only time that you're going to get really good code coverage from an automated scanner is if the application is just plain vanilla, doesn't have anything that's very complicated, and is based on a very common and simple web platform like PHP or classic ASP. And that doesn't really even get into the accuracy aspect of scanners. It's just a little bit more complicated. And that's a lot of times when, when things like SQL injection and cross-site scripting are missed just because it's not a human. My wife used to be an interpreter and a translator, and she made a really good analogy comparing automated app scanners with automated translation software. I think we've probably all used Google or Babelfish to translate a website, and it does a decent job. You know, you can usually understand what it's getting at. But you never dream of using them or even a more expensive piece of commercial software for translating something that was complicated, like a piece of literature or something where the meaning was very sensitive, like a legal document or maybe even a car manual. Apparently sometimes you can't even rely on it to translate a single word. If you can't read this, it's a sign that says translate server error, when it should read restaurant. Even a Chinese to English dictionary would have gotten that one right. Now that you're laughing at my jokes, I'm losing my train of thought. So obviously I think that there is a lot of stuff that's going on. There's a legitimate use for automated scanners, otherwise I wouldn't have bothered writing Rindle. I think a good example is that, say, a corporate information directory, basically an internal phone book. Security is important there. It would be a very appealing target for persistent cross-site scripting by an internal attacker. It's probably used widely by most of the employees for the organization, and it certainly is going to be much more trusted than some random website out on the internet. But very few organizations are going to have the resources to perform an automated, or excuse me. A manual penetration test against that. So by running an automated scan, you get some degree of comfort that at least the simple vulnerabilities have been identified and remediated, and that any successful attack is going to require some degree of sophistication. That leaves your budget for testing important applications, like those that handle credit card data, or financial records, human resource information, things like that. So I want to go over the product roadmap real quick. This is not a complete list of new features, just the highlights. Version 1.1 should be out around Thanksgiving of this year. You'll be able to preview the scan results before it's completed, which is especially useful if you're doing a manual test alongside. HTTP-based authentication will be supported. I really wanted to have this ready in time for DEF CON. It just didn't happen. However, very few web apps these days use HTTP authentication. Almost all of them use HTML form-based authentication with some kind of cookie or parameter-based session tracking. On top of it, multi-part MIMECOST and Postbodies will also be supported. That's a little bit bigger of a deal. Most of the time that I was writing Grindle, this wasn't supported by the version of HTTP components that I was using, but it is now, so I need to go back and change it. However, the default for Posts is URL encoding, and that's far more common. Usually the MIME encoding is used for uploads or some kind of binary data transfer. The fuzzer is going to have a number of enhancements. That's the manual fuzzer. The manual fuzzer that Eric was demonstrating will be a number of new fuzz vectors. You'll also be able to identify a specific response as normal, and then anything that significantly deviates from normal, from the fuzzing, is reported. And of course you'll be able to set a threshold to determine that. You'll also be able to have the fuzzer guess at what a normal response is, so that if 90% of the responses look the same, the 10% that don't will be listed. You'll be able to start a scan from the command line, which will be useful for scheduling or for performing bulk scans from a script. There will also be a lightweight interface mode, which will be useful for users that just want to perform an automated scan. They don't really need to see all the advanced configuration options. Certainly don't need any of the manual testing features during the scan. A few of the new test modules. Authorization enforcement. I know it's going to be experimental from the beginning, just because it's going to take a while to properly tweak and tune. Basically it will look for requests that were sent by user A, never by user B, but then try to explicitly request the content. As user B, and see if the responses look the same. Parameter incrementing will look for something like product that equals 10, and then try to request equals 11 and equals 9. You'll be able to set bounds to prevent it from ballooning out of control. SSL configuration testing. Do you have SSL version 2 enabled? Are you running weak SSL cipher suites? Error-based username enumeration. Does a valid username and an invalid password result in the same error message as the error message as an invalid username? It shouldn't, but oftentimes it does. 1.2 will be out late spring, early summer of next year. Automated AJAX navigation will be one of the test modules for spidering. Right now, Grendel can't automatically crawl a site that uses AJAX or JSON or something like that, just because the interface that's presented is significantly different than traditional HTML. You can still test those sites just fine by using the internal browser, and Grendel will just start testing queries as they're sent. The foundation for AJAX navigation is already there. We have the JavaScript engine, the DOM implementation is solid, and that's really what's needed to implement browser behavior and mimic it. PDF and XML report formats will be supported, as will one-time passwords like RSA secure ID. Authentication domains and using client-side SSL certificates for authentication. You'll also be able to stop a scan, save it, exit the program, start it back up, and resume the scan where you left off. The website is grendel-scan.com. It'll work without the dash also. You can download the presentation materials, the tool of course, and the ISO for the demonstration environment. That's all. Let's see. Do we have any time? No. We have no time for questions. Room 105 is where we'll be. Thank you very much.