So thank you very much for coming and not leaving. That means that... Whatever you want. Okay, this is a turbo talk. It's not going to be a one hour long presentation. I think someone screwed up in the schedule. I didn't receive a check, so it is what it is. First of all, there is no agenda in this presentation. No crap about we are going to see this and stuff like that. No art of war stuff in this presentation either. I'm trying to make this campaign of no more free art of war stuff in security presentations. It applies to everything, so come on. Give us a break. No more free campaigns. See the dollar sign at the end? I know that we have to pay bills, but come on, man. Give us stuff for free. Alright. No history of web scanners and no drama, but I think we have saw a little bit in the beginning of the presentation. I'm sorry for that. It's not my fault. My name Efrain Torres. Kind of ten years enjoying IT security. I'm not going to say that I'm a pro. I think that's too high. I'm a proud member of the Metasploit team. This is my address. I'm a proud member of the country of Colombia. How many Colombians are here? Alright, one, two, three, and that's it. Alright, man. Thank you very much. By the way, please visit Colombia. Don't trust CNN. Go there. I'm evidence that if you go there, you will not be kidnapped. Well, not for now. Alright. Thank you. Alright, let's keep going. Okay, the intro. This thing is about the web assessment as Metasploit modules. We are going to run the modules by hand or automated. Still on early stages. Pay me to the crisis. I have to work. I have to work a lot, so my free time is getting smaller. And H.D. Moore in Metasploit in the conference sector in 2008, he said that, well, expect a big announcement soon. This is it. Yeah. I'm getting a hold of this. I was, like, shaking. Now I'm shaking less. Alright. So why I did WMAP. First of all, I struggled with the damn tools that you see nowadays. Let's say that I hate the commercial tools. Sorry, guys, if you are from WebInspect or one of those. Sorry. I don't like it. First of all, you are finding vulnerabilities while browsing an application. It's an easy way to get detected and make mistakes. I prefer just to crawl as a normal user, then wait for a couple of days, then just attack. Okay? And then I can have my data and keep playing with it and I don't have to deal with all the bullshit with the graphical user interface. Sorry for the word, but it is what it is. I also hate that it can only be run on Windows. I needed something that I can run everywhere. And I don't want to be tied to a specific browser, also specifically to the Internet Explorer control. Sometimes you have to check some websites that have, like, malware and well, if you use one of those tools, you will get owned. And it hurts. Second motivation, too much focus on whistles and bells. No more bullshit regarding vulnerability classification and hard-coded risk. I'm tired of seeing that an issue is high, an issue is low, an issue is medium. What the fuck does that mean, man? What the hell, man? And then you go to the client and the client says, well, what is a low? And then you are like, well, low is low, right? But the truth is that when sometimes a high is just a low, and a couple of lows can get you high. What is the real impact? That's why we are playing with Metasploit. This is just a plug-in, so we can jump from the testing part directly to the exploitation methods, okay? How everything is working today. So I say, like, let's do something really cool. That's the damn graphic that I make. So when you play with these tools, with the commercial tools, I like the commercial tools, it's just that I see that they can do better, okay? Now, it's like playing with Lemmings. You just see the damn packets and all the requests just being going through it and they just fall and nothing happens. I cannot take those results and feed them back to the engine. It's a pain in the back. The proxy is kind of like on the side. It's like the ugly child of the family. You know, just want an additional toll. And they say, oh, it is free, so yes, you can use it sometimes. But what is the good way to do it? Well, let's go back to basics. The proxy. The man in the middle proxy. There are tons of proxies out there. Fiddler, Barb, Paros, etc., man. It's awesome, awesome, awesome tools that actually does a much better job than the one above. Okay. Okay, what is the objective of WMAP? Being a simple tool, command line based, a way to testing methods with exploitation methods. You can use it as a scanner, but it's just an extension of the Metasploit framework. And again, something easy to extend and modify. I didn't like the APIs to adjust or add new extensions to some of the frameworks out there. So it takes forever to build something. We just need something easy, okay? Actually, we have to do a campaign like no more difficult tools or no more complex tools. Let's go back to basics, dude. Right? Note, no more web assessment, the more web assessment tools, the better. For example, W3AF is awesome. That's Andres if he's over there or the people that contribute. Thank you very much. SQLMAP is awesome. Bernardo if he's over there or some people that work in the project is around here. Thank you again, too. And each tool has its own limitations. Choose the damn tool you like. It's just a tool. Poor worksman playing his tools. I don't know who said that, but I just copy and paste. . By the way, I left a blank field in the bottom so you can write there whatever you use, okay? I'm not saying that WMAP is the shit, okay? We are just starting. And even if I finish with WMAP, still there are good tools out there. So just put whatever you want there. What is the design? The design is awesome. What I did is just decouple everything. Just separating every single thing that is out there. So I can have multiple spiders or clients or devices that connect to the proxy. The proxy just going to store every single request into the Metasploit database. And then from the Metasploit database, WMAP, that is the plugin, will take that information. It will create a tree of the website and will start launching all the auxiliary modules one by one in the order that makes sense. That's it. Actually, that's the way that the other tools does, but this is simple. So why do we have to pay for that much? Okay. And then we just launch the test to the target and we can take the results because we own those results and we can do whatever it wants. Like put it again into the database or if you have something additional to do, just throw it through the proxy and then you can test it again. Easy. The proxy. The proxy only stores requests in the database. Initially when I started WMAP, I did a small plugin for Fiddler. Fiddler is made by Eric Lawrence from Microsoft. I haven't released the plugin because it's ugly. So still needs some improvement on the GUI because it's Windows. Patch for the patch that I use right now is a patch for a RAD proxy from Elkintuff. And also thank you to Spinbat that has made some additional plugins for a BORP proxy. Okay. But if you have anything that can take the requests and store it in the database, do it, man. This is the schema that you can use to store everything. It's very simple. What else? It's just that I don't see very well over there. That's why I use glasses so I have to check this. Okay. So we have the path, we have the headers, the query, the body, the response headers. The response code and the actual response and when it was created. That's it. If you can put it in that format, you're good to go. Well, this is a small list of the auxiliary models that are located right now in the Metasploit framework. Again, like I told you earlier, this is on early stages. But if you see it, the plugins that are here, the modules, they have the basic functionality that you need to have a good understanding of your target. And also you can use them, modify it a little bit, and create new tests without any problem. So please go to this directory, take one module, just check it out. It's very simple to understand. And all thanks to HD. Okay. It's not me. I'm just reusing his work. Let's start with some explanation with some type of the modules. Because I think the most important parts are the actual modules, not the actual plugin. The plugin just runs all of them on a certain order. And this is just one basic example on how to run a specific WMAP module. Just use it as any other module on the framework. You set the specific variables for the module, the target. Remember that each module can be used as a scanner. You can put a range over there. And we define the port. In this case, we are going to use the WMAP SSL module. So I'm going to say that we are going to use SSL. And let's run it. In this specific example, just worth to mention that I use, what it does is going to query a bunch of certificates. And it's just going to show me the information from them. And it's a very good way to see the virtual hosts. So if you have a bunch of IP addresses that usually happen on the pen test, and you find those weird websites when you say, okay, the web page doesn't show what is the virtual host, this is a good plugin to use. Okay? A good module. The other thing is for this example, I use, well, here it says that it's like the XYZ Demco.com company. But in reality it's one of those banks in America. So what I did is I just run it through a couple of IP addresses and just check the information that it returns. It returns stuff like they are running JBoss and WebSphere. So it's good information to have. Additional stuff for information gathering. In this case, I'm going to show you some the way that another module works. That is the way that we detect directories on a web server. Usually what happens is that the tools that you have out there, they only check for the return code. That sucks, man. Because sometimes, nowadays, they have their own error pages. Well, thank you to HD and my work, we were able to create a small module that has signatures to check the error page. So if it returns whatever code it is, it will really detect if the directory exists or not. The second important part of WMAP is the data storage and reporting. I think the most important part is that with the data, we were used to only work with the data on the way that the developers were supposed to give us access to. In this case, you can store anything you want and put any name on it. That means that if in the future there is someone that devices a new attack technique or a new vulnerability and it requires a specific cool name, then you can put it over there and have that information stored on a tree that you can later reuse for analysis. For example, let's check a little bit about this code. The only thing that it has to do is going to find the report on the first part. It's going to find the report ID. Based on the host, on the port number, and if it uses SSL or not. And then with that report ID, you will be storing all the information that you want on the format that you see displayed. It's basically type, description, that's it. Let's talk now about the WMAP plugin. Basically what it does, it identifies multiple targets from the database that all the requests are stored. We build a target website with that structure. And we run the models in a specific order. Reporting, we already talked about it. And if you see in the bottom of the presentation, that's the initial command to run WMAP. One thing, if we don't have time to run the demo, then the only thing that you have to do is to load the DB WMAP, and then you just say WMAP target to select, and WMAP run, and that's it. Okay? There is no thing to select what plugins you want to use. You can do it in other different ways, but it's very easy to use. That's what I wanted to do. So how WMAP works. Basically, we have a specific mixing where you can define specific types of modules. So we have this type of modules, and what it does is I take the module, I put the type, WMAP, the text, what is the type, and it will launch it at the right time. For example, the first thing that it will do when I run something is that it will run every single module that is defined as a WMAP scan server. Okay? Then it will try to scan every single module. It will run every single module that is for files or directories. Actually, they run kind of at the same time. Then modules that require to execute at every single query, and you see that I have something different that is called unique query, because what it does is it will create a signature of the query that you have a get request or a post request, and I don't want to run it every time only because the value changes. I only need to run it just because I see the same parameters all over again. So I can do that just with the WMAP scan unique query. Then also I have something to scan the body or to work with the body of the request, the headers, and something called generic that is always run at the end. So this is where we can analyze all the information that we have been retrieved, take that information and put it back into the database or feed it back to the proxy. Okay? One basic example is the WMAP generic email extract. This is the only type of modules on the framework that you cannot run it interactively or through the command line, because the only input that it takes is the database. And this just extracts all the email addresses, so you can take it and use some social engineering with the emailer and using the tools that Jabra has helped me develop for the framework. Okay, so how to build a WMAP module? Just take a Metasploit module. It doesn't have to be an auxiliary module. It can be any module. Not only HTTP. Just include the mixing type and that's it. So if you see there you just put the type that you need. Run it. Easy, right? Okay, what is the demo? We only have five minutes, okay? So what I did is I took a specific IP address on the internet and I did a small video. But I think you guys deserve respect, so I did something like really a website on the internet, not something that I crafted here because that's kind of cheesy. And let's see how it goes. Where is the full screen? There it goes. Alright. So what we're doing right now, we are loading the plugin. We connect to the database. I'm showing the commands that it has available. We're going to define the targets. So the first thing is we are going to reload them from the database. That's it. Only one. Sorry for the guy from the IP. I'm only browsing his web page, okay? So no attacks were performed. And the thing is then I just print the available targets. And I'm going to select the first one. Actually I selected first before printing, but it works the same. And what I'm going to do right now is I'm going to set the variables that usually are required by the modules. Again, by the modules, not by the WMAP plugins. So these are the modules that are available. You can enable and disable them through a profile too. So check the documentation of the WMAP. And now what I'm going to do is I'm looking at the website structure. This is the most important part. If you guys do a web app assessment you will see that the structure is where the gold is always. Then again, like I said, you set different variables. In this case I'm setting the extension of that I need to play with. Then at that time I receive a call from my wife. And then I have to stop a little bit. I kept going. By the way, I'm going to be a dad. So... Thank you very much. I set the virtual host. That's the other cool thing. Some of the tools don't allow you to play with the virtual host. So you have a lot of range here to play with. I'm checking the domain. For some of the plugins that, for example, perform some brute forcing to identify additional virtual hosts. Then I receive another call from my wife. Yeah. And there it goes. Now I'm going to type wmap run. And...the help. Come on, man. And there it goes. All right. And...then the module stopped. And there it goes. So basically it's going to start running all the crap. That's it. It's easy. Simple. That's it, man. We are not framing...not frying brains here, okay? That's I think what the type of tools that we require. And I'm going to stop the demo here. Okay? Because the time is over. So thank you very much, man.