Good morning. We are going to start a little earlier since I have some cool demo for you guys. I presented this in black hat, but I think I will change a little bit of style to DEF CON style. Before I start it, I want to have a quick survey. How many people here for the job reason or for care list reason that at least have hacked one website and gained the data from the back end? Can you raise your hand? Pretty good, cool. My name is Fan and today I'm going to present our next generation web application vulnerability scanner with deep injection, high performance and low false alarm. Everybody knows web application security is a big problem, so we are just going to skip. Most of the database in back end, interestingly enough, Oracle SQL Server, DB2 and MySQL, I think took 90% of the shares, more than that. This is about a pen test tool, first time revealed. It's not a so blind SQL injection tool. I will show you a bit later. Fully automated, powerful and with a bunch of... Pen test policy for different database. Here's a quick glance of how this tool looks like, but I will show you a flash demo very soon. In the left side, you can see is the web URL, then it has the Oracle detected in the back end automatically. The SQL injection type, tables, belongs to this web user. Columns. And even the contents. Right side is the vulnerability report. In short, this is a cross database support pen test tool with 100,000 lines of C++ code. High performance, very flexible, extensible pen test framework, which I will describe later. Very low false alarm, because if you already gain all the data, do you think it's still false alarm? And it's fully automated. So, this is the first step. So, we all know that through the firewall is just not enough with this case. And there's so many things from a database that you can gain. So before I continue, I would like to present the first part of the flash demo for you. So here we have a movie rental program. Pretty cool web application. It's not Netflix, by the way, OK? It just looks like. So there is a movie. You can go to the movie. It's called a Zions movie. But unfortunately it's also a sign of the SQL injection. So you can just paste to the matrix tool. And then right click, scan. Now you can see that it detects the back end is the Oracle and the SQL injection type, the instance name, and the user name. Who connect to the back end database. So you will see that most of the time it's right click, left click style. So now you right click and then get a table content, sorry, get a table count. How many tables belongs to this user? So that's a, I will come to the slides later. Matrix has a very complex sequence to do all the pen test from beginning to the very deep. So now we get the table count is 11. Now if you right click again, the syntax, the menu is different. Now you can get the table names. So all the table name, you can just select a few or select everything. So here, and try to gain a table name in the back end. So there are different ways to gain the table names. Date dictionary. You can also brute force. You can also error based. So, several ways that can count in. So here is the vulnerabilities that is already reported in back end. So that later on we can export to the CSV or whatever. So the get table name phase, it will gain the information with only like about 10 seconds. So with all that iteration, we get is our address, table name. So this is only one way. We'll show you another way which is brute force. Think about how many times you design your tables like user, username, profile, member, order, right? So this is just a common sense. If you want to, so now we already get the table name, another table name is the member. So now we come to the auditing panel, which is, you can choose, there's many policies has been built in to audit the back end database. So since we already know the database type, for example, right now we have default password checking and also the password complexity checking. All the parameter configurations. The dictionary accessibility and the user privileges. This is an important piece, right? And also the SQL area. What's the raw SQL in the back end? All this is done through the web interface. Now I reverse select and then I try to gain all the hash and the name from the back end database. Since the Oracle is hashed, right, the password. But that's okay. The matrix has the building password crack for the Oracle. Which is extremely fast. You can see that my password is pretty good, QAZWSX, but the matrix is even better. So it's cracked on the fly. The password is cracked on the fly. So also you can see that there is default password in there as well. So we will come back to this later. So here we have the cross-site scripting functionality. Okay. Thank you. And here it is. So you can have this functionality and also your own defined abilities. So also you can get a proxy list so that all your traffic can be distributed. It will look like from all over the world. So it's pretty neat to have. Here's the... And here's the hijacking feature, and here's another cool thing, okay? So we'll come back to the slides, come back to normal, okay? So what's the essential fact it's based? Basically, first, parameter defense is just not enough, right, with web-based and the database securities. Database are all different, all different vulnerabilities, different design, but there are many things in common, which I will describe later. And database has to maintain a lot of information in the backend. And the coolest the database, and the cooler it is, and the more information you need to gain. For example, Oracle 10G. Oracle 10G, the flashback, is a good example. If it want to get back to the previous data, it has to think about it from design, right? It has to maintain the SQL that it used before. So think if you can get that SQL, that's useful for you, right, through the web applications. User context, another example. Finally, hard on database is not so easy. At least it's much difficult than just talking, right? Okay. So here's the pentest sequence that it will take. First, just like normal scanner will do, it will detect if it is SQL injectable. But that is far less than enough, right? Then second, just as Nmap will send tens of packets to detect the OS types, right, based on TTL, window size, Matrix will send tens of different requests to determine what's the database type in backend. And I'll show you how. First, you'll send the space. Then, you'll just set the word and what's the version. And then it will get the current database properties such as what web user has connected to the database and what's the instance name, all stuff in versions, and then you can get the basic... Pretty much the whole database dictionary. That's the one thing. But also, like I said, there's other ways to gain. and then you can start dancing because you can do advanced injection and advanced auditing because you already know the context. I will have to skip some of the slides because I have very limited time, 36 slides, but pretty much it's very detailed here, database in common things, roles and privileges for different databases and special spots, there's always interesting part, extended procedures and it can even use to guess, for example, just the UTLTCP, even that can use to guess the SA password, a lot of things that you cannot even, maybe it's beyond your imagination and weak password, port stuff. Here's the mind manager function on the graph. So... So you can either configure your browser to point to the port, which matrix will listen. So matrix will monitor the session and the traffic automatically, and then detect if the URL you are browsing is, sorry, it reminds me more demos. So, it will automatically detect the web URL if it's vulnerable. But of course you can always just directly targeting the web URL and then gain all the vulnerability information. Then you can gain the database dictionary, blind injection, search the interesting tables, and then even do the brute force. You can also audit many things. Authentication, authorization. You can also do the penetration test for specific spots, like privilege escalation and all kinds of stuff. Here's a snapshot. You probably already saw it. So URL type, database name, username, task, get everything. Field name, field count, all fields. You can search for specific spots, like a password, user. So... Okay. For auditing stuff, you can check the password, check configuration weakness, and the versions. Oracle ADI. This is pretty old. The one I was using was better, 10G. So get the user password and hashes, and OS commands. So here's an example here that you already got the... Based on the hash you get, it's cracked on the fly. Because based on the username and the hash, you already can do a rainbow style crack. Penta style. If you do the... Just browsing the browser and using matrix as proxy, then you can hijack the sessions in between. So it can even hijack the SSL. So I will mention that a little bit later. But it can be much easier. For example, here, all the pen tests, it's again, right click style. So here, you can get all the extended procedures. You can run OS command. And doing whatever you want, pretty much. So authentication, current user privileges, password check, system user views, and as I mentioned, the system and DBSNP, password can be pre-generated, right? Because you already know the username. So based on diction, you can generate the hash already. And for Oracle 10G, there's a pretty huge leak. Which is that... The DBSNP password can be get through a simple query. So the reason is that it's not hashed, it's encrypted. And more importantly, the... For 10G, the default installation will put system and the DBSNP share the same password. So once you know the DBSNP password, you will know the system. Think about it. Okay. So... Database configuration. Init parameters. Many parameters auditing. And... For different database, for different context and policies. Configurations. So an important feature about the matrix is that it's extremely extendable. So that if there's a vulnerability release, for example. There's no need to... Change the code. Or 99% of the time. No need to change the code. Just add a configuration file. And then it will automatically add to your pen test policies. So... Raw SQL auditing. An important thing from the web interface, you may very, very interested in what is the SQL running back end. Right? So... To gain the SQLs, to give you much more abilities to gain the things. Okay. So... I always like to use Taiji to describe the two modes of the matrix. One is the Yin mode. Basically passive, right? Very silent. And quiet. But it detects everything for you. If it's acting as a proxy mode. Because you are just browsing, right? And then... Uh-oh. Suddenly, there's a report in back end. And Yang mode. Basically, you already see from the Flash demo. It's direct targeting the web. And... Hard... Multi-threading. Proxy mode. As long as your browser point to it, it's all right to do everything. But here's a very cool SSL man in the middle. I... At least on top of my head, I don't know there's any tool that do that. Does anybody know? To do the hijacking for HTTPS. The reason is that it's supposed to secure the channel, right? But here, Matrix did a special way, which is that it's a special matrix in the middle. So, then, it will assemble the HTTP traffic. It will listen in a local port, 127, and assemble the HTTP traffic to the HTTPS, representing, and send it to remotely, and then get it and disassemble it. From that way, it can audit all the sessions, all the parameters in between, so you can hijack it. In mode. Here's an in mode example. Automatically detect. Okay. MS SQL. Number. SQL injection type. YARN mode, I already described. Get post. And also, you can use proxy to targeting the stuff. Advanced features, like privilege escalation. For example, 9i, DBMS metadata. Pretty much, you can make use of the... Some SQL injection in the procedures to gain more privileges. 10g, DBMS advisor. And even the more SQL stuff, if it's installed, then it will give you much more power to do the special pen test. And there's many things, such as HTML DB, XML DB, and the report servers. This is a specific things, but it's also very interesting. So keep adding the policy, like I said. To gain more and more. It's very important, because you always want to keep the pace. You don't want to have something that's last year or two years ago, and that's not so useful. That's needed, but not so useful. There's also, you can audit some network related or some evil procedures using the outbound SQL injection. Pen test capability, plug-in. I already mentioned. But again, this is one of the key. You can add the policies on the fly. So similar tools. I don't know if it's so similar, but I'll put it here. Evasion techniques. So this is an interesting part, right? If most of the ideas will detect, okay, one equals to one, or some of the patterns. But it's an iteration. Last year in Black Hat, I presented the... The... Defense techniques about SQL injection. So it's quite hard. It's quite hard. I mean, think about it. There's so many variations. I want to get to there. There's also some interesting evasion. For example, you can use soundex. A function equals to something, right? Looks totally different. So that way, to catch that pattern is really difficult. You can also lower down your threads. So it will look... And also distribute by proxies. So that way... So that way, it will look more normal. Defense techniques. Default installation and configuration is usually lame. Dictionary protection. Least privileges. Always bear in mind for application, especially for different applications. And do regularly pen testing and continuous monitoring. So before I come to the next demo, I want to thank you, everyone, for listening. And I have to mention my partner, Xiaorong. He did a really fantastic job. He's really cool. But sorry he couldn't come join me. And special thanks to Alexander for great comments. And one of the big reasons I'm here, which is I want to get your feedback. I want to get your comments so that make it better and better. If you have any suggestions or comments, then to... Send to the info dbappsecurity.com. So we will come to the next demo. We have two minutes, I think. Oh. I have ten? Yes. Oh. Cool. One. Five? Sure. How much do you need? Ten is fine. All right. I... I should not make so hard if I know I have ten. So... Here's another... Web application. JSP books. Selling the book, right? Security book. Looks like. So... Right click. This time it's MS SQL. Number SQL injection. And the database name is web. Username is SA, okay? The vulnerability level is, of course, high. So again, here, you already have 23 tables in backend, not bad. So... Can get the table name. And get a few. Here, the advanced one, you can basically search the table name. Sometimes, if that has, like, 200 tables, you just want to search some of the specific points. So it's getting easier. Now you have quite a few tables, and the customer info looks interesting, right? Customer info. That's always the... I mean, from my point of view, but I'm sure you've seen. So... Now you get a field account, then you can get all the fields. Again, it's a right click style. And coming later, there's the end, there's OS command execution. That's probably one of the few places that you need to use the keyboard to type. Because you need to run OS commands to as you wish. So now you have a few interesting fields, name, password, so customer ID, login name. So we can just gain a field just for demo purpose. So, again, I have to emphasize, all this is through the web application interface. There's no need... Any more information about it. So here is coming for another... Come to another fun part. It will get all the content from the tables. Welcome to the matrix. Okay. So... The speed is quite fast, at least in real speed. Because the engine is optimized... All right. So... Now we can come to another fun part, which is the panel chasing. So now you have all the context, right? What database it is in back end? What's the web user connected? What's the vulnerabilities of the web application? Now you can look at the... Like what's the DSN name? Okay. I don't know why I have my name in here. So... You can also... Another thing is that you can also look at how many evil procedures is available. So that's another thing. Because you first want to see how many things you can do in hand, right? Then you can do more things. So you can see that from the beginning to the end, it's always step-by-step, but helping each other to get deeper and deeper for all the injection. So... Okay. We have read error log. Get protocol. Stop. Okay. You can always get more things, because it just... It will give you from the number of things that you can choose. Okay. So enum error logs. That's not bad, right? Now you have OS command. Type cboot.init file. Okay. So... So the run OS command for you and then tell you everything. So I will let the demo go on, and thank you very much for listening, and I'm taking questions. Thank you. Cool. Thank you, Mike. Yes, sir? Yes. Yes? Male Speaker 2. Number one, does it save state so you can start a session and then terminate it and come back to where you were? Say again. Sorry. Male Speaker 2. Will it save the state of your test? So you start a session and then have the tables and then save it and come back to where Yeah. Good question. There is a project save. So no matter where you are, if you save a project, next time if you restart, it will already in a state in there. Good question. Male Speaker 2. Next question. Does it support various middlewares like ColdFusion with the tick doubling stuff? Yeah. So for middleware, basically right now, the current version is we'll try to inject as much as possible. So it will depend on how middleware process the parameters, et cetera. And also, we are planning to add in more like specific middleware like in the policies for it. Yeah. Any other questions? Yes, sir. Male Speaker 2. Specifically, I did not, but my friend did once. Yeah. Thank you. Male Speaker 2. No, I'm not kidding because we already have... Okay. Yeah, trust me. Okay. Because... We already have a beta tester which is a very big company, so they can test their own applications through the pen test. So I'm so busy with this, so I won't have time to hack stuff. So... Male Speaker 2. Yes, sir. Male Speaker 2. Yeah. We'll have beta test plan like slowly going, yeah. So you can send emails to request it, yeah. Yes? Female Speaker 2. Oh, you mean for the SSL hijacking? Male Speaker 2. Okay. So basically, what it do is that... Actually, I have a SSL Flash, later I can show you. But basically, what it do is that... Because this tool is in your machine, right? So in the 127. So it's your trusted man. So it's like a trusted man in the middle. So then you... So the HTTP, for example, browsing the local. So you can see that... Just like your local port that matches where we're listening. So for example, if you want the HTTPS www.abc.com, then something, then the machine knows that this traffic in this port is talking to that HTTPS. Then it will assemble all your... From your point of view, from browser still looking at the remote website, right? Browsing. Browsing. But actually, in the middle, it will assemble all the HTTPS traffic for you, and then monitoring the sessions, even if that's vulnerabilities or parameter vulnerabilities inside. So that's basically how it works. But I can show you Flash later on. Male Speaker 2. Yeah. It's traceable. So if you turn on hijack, that option, then it will stop there. And then you can change something. Add a parameter and then click send, it will send it, so. Any questions? More questions? All right. Thank you very much for listening. And yeah, send me email if you have any comments.