1 00:00:00,000 --> 00:00:07,600 We got everybody? All right, let's do this. Okay, guys, I'm Joe McCray. If you've never heard of me, 2 00:00:07,680 --> 00:00:11,640 you're like the rest of the conference. I'm a network pen tester guy. You know, 3 00:00:11,700 --> 00:00:17,840 if anybody has ever heard one of those guys, you know, I'm aka the black guy at security 4 00:00:17,840 --> 00:00:23,000 conferences. Yeah, it's me. It's me. There's like three of us. You know, if you're one of them, 5 00:00:23,000 --> 00:00:32,900 see, I got him. Yes. See? Okay, that's us. That's us. I'm a network pen tester. Who is with me that 6 00:00:32,900 --> 00:00:39,040 web application security is stupid shit? Yes. That was me for years and years and years and 7 00:00:39,040 --> 00:00:43,400 years. I was like cross-site scripting? Who the fuck cares? I get pop-ups when I surf the web 8 00:00:43,400 --> 00:00:52,500 all the time. Just one that says XSS? Eh. Kind of wasn't scaring me. So I realized that I have 9 00:00:52,500 --> 00:00:52,980 been here for a long time. I've been here for a long time. I've been here for a long time. I've 10 00:00:52,980 --> 00:01:04,320 been here, God, since like DEF CON 8. So I'm fucking old. Who's with me? Old? Yes. Okay. 11 00:01:05,280 --> 00:01:10,720 I remember. Okay, let's take me back. My laptop's going to power off, so fuck it. Let's go back. 12 00:01:11,040 --> 00:01:16,760 Who remembers back in the good old days when you would tell the customer all you need to do is 13 00:01:16,760 --> 00:01:21,880 apply a patch? Who remembers that? And customers would say shit to you like it might break 14 00:01:21,880 --> 00:01:22,280 something. 15 00:01:23,440 --> 00:01:27,960 Okay. People didn't apply patches. They would go read, you know, about the patch to figure out 16 00:01:27,960 --> 00:01:33,040 like if it was going to break some important shit. That's what I remember, you know? I remember 17 00:01:33,480 --> 00:01:38,920 we would use ISS because Nessus was like some rogue open source thing. Does anybody remember 18 00:01:38,920 --> 00:01:46,320 that? Back when Nessus was free, who remembers? Nessus used to be free. Yes. So I remember back 19 00:01:46,320 --> 00:01:52,540 in the days, we'd break out our Uber tools. We did something like this. Go with me, guys. Go with 20 00:01:52,980 --> 00:01:59,800 me. So you'd port scan the network. You'd run Nmap, find a bunch of open ports. You'd banner 21 00:01:59,800 --> 00:02:04,480 grab. You'd go, okay, this is what you're running. You'd go out to websites like RootShell. Does 22 00:02:04,480 --> 00:02:12,380 anybody remember RootShell? Yes. So we'd go out, we'd grab our exploit code. We'd own half the 23 00:02:12,380 --> 00:02:17,580 freaking planet. Nobody applied patches back then. So we would go, we would own the whole freaking 24 00:02:17,580 --> 00:02:20,120 planet. We'd write a report that just said, you suck. 25 00:02:20,740 --> 00:02:21,180 Okay. 26 00:02:22,240 --> 00:02:27,680 That was it. That was it. You'd tell the customer, you suck. Really, you suck. Apply a 27 00:02:27,680 --> 00:02:34,400 patch, dumbass. You suck. And that was it. People would be like, wow, he is bad as hell. This guy 28 00:02:34,400 --> 00:02:40,820 is bad. Well, now, pen testing is different. Every, I mean, like, you can't even walk into 29 00:02:40,820 --> 00:02:46,480 Barnes & Noble without tripping over a security book. So everybody's a CISSP. Every customer is 30 00:02:46,480 --> 00:02:50,220 a security consultant trying to tell you how to do the assessment, right? Come on. 31 00:02:51,180 --> 00:02:58,200 Yeah. So we would get paid for telling people that they were dumbasses. Now, they think that 32 00:02:58,200 --> 00:03:04,420 because they read, you know, Hacking Exposed, they're the pen tester now, but they're still 33 00:03:04,420 --> 00:03:13,500 hiring us. So now, they've got 50 million other security things for us to go against, you know, 34 00:03:13,520 --> 00:03:19,420 firewalls, antivirus, intrusion detection, intrusion prevention. They've got everything. There's so 35 00:03:21,180 --> 00:03:26,540 much else to go against. You know, the game has changed. It's not port scan. Who doesn't port scan 36 00:03:26,540 --> 00:03:32,380 anymore? Who's like, why? Who's with me? Okay. I've got one man back there. I don't port scan 37 00:03:32,380 --> 00:03:39,360 anymore. It's pointless. Why? I go through the web app. So I used to be one of those guys who 38 00:03:39,360 --> 00:03:45,020 said, this web app stuff is stupid shit. It's dumb. You know, and then I saw SQL Ninja upload 39 00:03:45,020 --> 00:03:50,440 Netcat via SQL injection, and, bro, it, like, changed my life like Jesus. I was like, that's it. 40 00:03:51,280 --> 00:03:56,000 That's what I want to do. So I switched to the web app. I completely changed. I was just like, 41 00:03:56,060 --> 00:04:00,840 fuck it. I'm going to go learn this web app shit. So let's walk you through the agenda. 42 00:04:01,180 --> 00:04:08,460 Hopefully, my laptop will stay on. I always submit a talk called SQL Injection for Mere Mortals, 43 00:04:08,500 --> 00:04:14,620 where I cover the basics of SQL injection. It never gets accepted. This is like the 15th time 44 00:04:14,620 --> 00:04:20,140 I've given this talk. No one ever wants to learn the basics. So I'm not teaching the basics. 45 00:04:21,180 --> 00:04:26,560 If you don't know SQL, sucks to be you, because I'm not teaching it. If you don't know the basics 46 00:04:26,560 --> 00:04:33,560 of SQL injection, again, sucks to be you. I'm not teaching it. So anyone who does know me knows 47 00:04:33,560 --> 00:04:38,560 that if you buy me rum and coke, hey, teach whatever the hell you want to know. So get me 48 00:04:38,560 --> 00:04:44,080 some rum and coke. I will explain to you any of this shit. By the way, if you guys haven't noticed, 49 00:04:44,180 --> 00:04:50,720 I curse. Just, I am black. I'm not here to clean. I'm a security guy. 50 00:04:51,180 --> 00:04:57,480 I do curse. Okay? Stay with me. All right, guys. We've got three classes of SQL injection, 51 00:04:57,860 --> 00:05:03,660 in-ban, out-of-ban, inferential. So I'm sure everybody can read the slides. Let's get through 52 00:05:03,660 --> 00:05:08,460 this, because I'm going to try and move on to the SQL injection in the real world. 53 00:05:09,420 --> 00:05:15,480 Okay. So in-ban SQL injection is when you're attacking the site, and then you see the error 54 00:05:15,480 --> 00:05:20,700 message. So like here, it says syntax error converting the VARCHAR value of Joe to a column 55 00:05:21,180 --> 00:05:26,620 data type int. So in this case, the error message is right on the screen. You did your 56 00:05:26,620 --> 00:05:33,620 attack, it's in-ban. You see it right where you did it. Out-of-ban is different. You maybe 57 00:05:33,620 --> 00:05:40,400 get the response back over e-mail, over http, or over DNS. So you do the attack, and then 58 00:05:40,400 --> 00:05:46,320 the results of the attack come back over a different means. Please bear with me. I'm 59 00:05:46,320 --> 00:05:51,160 moving quickly. Okay? All right, inferential. Inferential is when you don't get error messages. 60 00:05:51,160 --> 00:05:54,600 messages. You always get developers who tell me stuff like, well, what if I just turn off 61 00:05:54,600 --> 00:05:58,780 verbose error messages? What if I redirect everybody to a custom 404 page? Won't that 62 00:05:58,780 --> 00:06:06,360 stop you? And you kind of look at them like, um, no. So with inferential SQL injection, 63 00:06:06,640 --> 00:06:10,720 you're asking the database a question. You're like, hey, database, if you're running a system 64 00:06:10,720 --> 00:06:15,480 administrator, why don't you wait 10 seconds and then give me the valid page? So you ask 65 00:06:15,480 --> 00:06:20,900 the database the question and he waits a couple of seconds and then he gives you the 66 00:06:20,900 --> 00:06:25,200 valid page. And you're like, oh, cool. So you are running as, you know, DBO or whatever the 67 00:06:25,200 --> 00:06:31,980 case may be. All right. So what about tools? Everybody loves tools. So let's go over some 68 00:06:31,980 --> 00:06:40,780 simple concepts with the tools. One, I don't use closed source tools. Sorry. So with the first 69 00:06:40,780 --> 00:06:46,020 tool, um, I can't even say it. Sorry. A little bit too much alcohol. W poison SQL map. What 70 00:06:46,020 --> 00:06:50,560 pity? W three AF peros SQL ID. These tools identify, 71 00:06:50,900 --> 00:06:57,180 SQL injection. But the thing that I run into is they only identify one or in some cases 72 00:06:57,180 --> 00:07:02,460 two. Okay. So this is that little hint to people. There's three types of SQL injection, 73 00:07:02,760 --> 00:07:09,300 error based union based and blind. So if your tool only identifies one or two types 74 00:07:09,300 --> 00:07:15,480 of SQL injection, is anybody kind of picking up on what I'm inferring here? Come on, come 75 00:07:15,480 --> 00:07:19,380 on. Yes. You will miss something. You will miss something. 76 00:07:20,900 --> 00:07:25,920 Okay. So again, error based is asking the database a question and then gleaning the 77 00:07:26,480 --> 00:07:32,840 answer to your question in an error quest in an error union is joining your own SQL 78 00:07:32,840 --> 00:07:38,320 query to the query that's already there. And then lastly, blind that's asking it like, 79 00:07:38,420 --> 00:07:42,800 okay, well does one equal one database is like, yeah, it does. Does one equal two databases? 80 00:07:42,940 --> 00:07:48,360 Like, no, it doesn't. That's inferential based. All right. So here's my methodology. 81 00:07:48,700 --> 00:07:50,420 Key things that are important for me. 82 00:07:50,900 --> 00:07:55,100 Everybody knows that when you're testing for SQL injection you need to use a tick. Okay. 83 00:07:55,120 --> 00:08:01,440 The single quote. So I always say identify the injection point. You see in the query 84 00:08:01,440 --> 00:08:05,740 string that you can insert your tick. You go, all right, cool. Identify my injection 85 00:08:05,740 --> 00:08:11,020 and then determine the type. Is the point that I'm injecting into, is it an integer 86 00:08:11,020 --> 00:08:15,480 or is it a string? And if I can figure that out, which shouldn't be too hard because, 87 00:08:15,660 --> 00:08:17,800 you know, can we differentiate between numbers and letters? 88 00:08:19,520 --> 00:08:19,940 Yeah. 89 00:08:20,360 --> 00:08:20,780 Okay. 90 00:08:20,900 --> 00:08:26,200 So if you can do that, you can figure out that if it's a number, it's an integer. If 91 00:08:26,200 --> 00:08:32,220 it's got letters, it's a string. So that's determined the injection type. Is it integer 92 00:08:32,220 --> 00:08:35,980 based or is it extreme based? Now, I know that sounds stupid, but the reason that that's 93 00:08:35,980 --> 00:08:40,240 important is because if you can figure that out, that's how you know whether you need 94 00:08:40,240 --> 00:08:44,440 your tick or not, your single quote, for all of the rest of your attacks. 95 00:08:44,780 --> 00:08:50,000 And as corny as it sounds, that's extremely important for IDS evasion and web application 96 00:08:50,000 --> 00:08:51,020 firewall evasion. 97 00:08:52,180 --> 00:08:56,240 So now we start going down into it. How do we attack it? Well, the first thing is to 98 00:08:56,240 --> 00:09:01,640 just go for error based. That's the easiest. If it throws an error, we can look at it and 99 00:09:01,640 --> 00:09:07,700 go, ah, SQL error. Pretty easy. Okay? Sometimes we don't have errors, we have to move on 100 00:09:07,700 --> 00:09:12,680 to union based where we try to append our own query to it. Union joins two queries. 101 00:09:12,980 --> 00:09:15,220 And if none of it works, we go for blind. 102 00:09:16,160 --> 00:09:16,600 Okay. 103 00:09:17,320 --> 00:09:17,920 All right. 104 00:09:17,980 --> 00:09:18,360 Okay. 105 00:09:18,360 --> 00:09:23,320 So I have to focus on manual testing. If none of your tools identify all three types of 106 00:09:23,320 --> 00:09:27,740 SQL injection, you're really going to have to be forced to learn how to test for this 107 00:09:27,740 --> 00:09:35,840 stuff manually. Now, who uses WebGoat? Anybody? WebGoat? Okay. So when I first started using 108 00:09:35,840 --> 00:09:41,080 WebGoat and WebMaven and HackMeBank and HackMeBooks and all these applications that are designed 109 00:09:41,080 --> 00:09:45,580 to teach you web app sec, I was like, wow, this is cool. Then I actually tried to pen 110 00:09:45,580 --> 00:09:47,800 test a real web app. Does anybody go through that one? 111 00:09:48,600 --> 00:09:50,060 It's kind of a little different, right? 112 00:09:50,860 --> 00:09:51,180 Okay. 113 00:09:51,320 --> 00:09:57,080 SQL injection in the real world is difficult. Okay? So that's really kind of why I started 114 00:09:57,080 --> 00:09:59,420 putting this together, because it was all the headaches I went through. 115 00:10:00,240 --> 00:10:05,880 Okay. So integer based injection, so you see page.asp, question mark, that's the parameter, 116 00:10:06,120 --> 00:10:14,300 ID equals 1. Cool. So it's a 1, so now we know it's a ‑‑ this isn't working very 117 00:10:14,300 --> 00:10:18,160 well. So it's a 1, so we know that that's an integer. We don't need our tick. We look 118 00:10:18,160 --> 00:10:23,560 down here at string based SQL injection, ID equals X, so now we know we need to use 119 00:10:23,560 --> 00:10:25,100 our tick. Very important to remember. 120 00:10:25,520 --> 00:10:29,280 So I'm going to move through this kind of quickly because it's a breakout talk. I don't 121 00:10:29,280 --> 00:10:33,180 even have a QA period. I'm supposed to just go 50 minutes. So we're going to move quickly, 122 00:10:33,360 --> 00:10:33,480 okay? 123 00:10:34,540 --> 00:10:41,300 All right. So let's talk with MSSQL syntax. So you're attacking a website, and it's page.asp, 124 00:10:41,400 --> 00:10:46,140 ID equals 1. One of the most common things that people will say is or 1 equals convert 125 00:10:46,140 --> 00:10:47,580 int user. 126 00:10:47,580 --> 00:10:54,200 Now, the database comes back, and he's like, dude, you can't convert the value of user 127 00:10:54,200 --> 00:11:01,400 into an integer. What are you, an idiot? So in that, we get the actual database user. 128 00:11:01,600 --> 00:11:06,780 So see syntax error converting the value of DB user into a column of data type int. 129 00:11:06,960 --> 00:11:13,840 So the database responds by actually answering your question, who is the user, in the error 130 00:11:13,840 --> 00:11:14,240 message. 131 00:11:14,560 --> 00:11:17,380 So some other things that I've learned is to grab 132 00:11:17,380 --> 00:11:20,960 some other things. Grab the database user. Grab the database name. Grab the server name. 133 00:11:21,140 --> 00:11:27,300 Grab the OS version. Just replace, you know, this user DB name, server name. Just replace 134 00:11:27,300 --> 00:11:30,640 that in your injection point. And that will help you. You can get through these things 135 00:11:30,640 --> 00:11:30,980 quickly. 136 00:11:32,380 --> 00:11:38,740 Okay. Union based looks like this. So here you see that ID equals 1. So you add a union 137 00:11:38,740 --> 00:11:45,880 select all 1. Then it comes back, and it tells you, whoa, all queries in an SQL statement 138 00:11:45,880 --> 00:11:47,120 contain in a union operator. 139 00:11:47,120 --> 00:11:52,060 It must have an equal number of expressions in the target list. You have to have the correct 140 00:11:52,060 --> 00:11:52,800 number of columns. 141 00:11:53,660 --> 00:11:59,220 So now what do you do? Okay. Let's try union 1, 2. And you keep getting the error message. 142 00:11:59,480 --> 00:12:04,640 So you keep adding numbers until you finally get no error message. So here you see it's 143 00:12:04,640 --> 00:12:11,480 union select all 1, 2, 3, 4, no error message. So we go, okay. Now I know there's four columns. 144 00:12:11,900 --> 00:12:17,100 So now I can replace one of those columns with the word user. Or to replace one of the 145 00:12:17,100 --> 00:12:22,440 DB name and now we can start extracting data out of it. This is those cases when you don't 146 00:12:22,440 --> 00:12:23,420 have error messages. 147 00:12:26,680 --> 00:12:31,160 Lastly, blind SQL injection. This is where you start asking it really weird questions. 148 00:12:31,340 --> 00:12:37,800 If the database user name is one character, wait ten seconds. If the page comes back immediately, 149 00:12:38,120 --> 00:12:42,740 okay, well I know it's not one character. If the database user is two characters, wait 150 00:12:42,740 --> 00:12:47,600 ten seconds. It comes back immediately. Okay, so I know it's more than two characters. If 151 00:12:47,600 --> 00:12:52,260 the database user name is three characters, wait ten seconds. Then you see that it waits 152 00:12:52,260 --> 00:12:57,520 ten seconds and then the valid page displays, even if it's just the home page. You go, wow. 153 00:12:57,780 --> 00:13:01,280 Okay, so the database user name is three characters. 154 00:13:02,840 --> 00:13:12,280 So we break out our handy-dandy conversion chart, ASCII decimal hex. We say, okay, a 155 00:13:12,280 --> 00:13:12,720 ninety-seven. 156 00:13:12,720 --> 00:13:18,660 A ninety-seven is the letter A. So is the database first letter of the database name 157 00:13:19,180 --> 00:13:23,860 in A? If it is, wait ten seconds. So now you'll see that it's not. And you keep iterating 158 00:13:23,860 --> 00:13:28,580 through it. Is it a ninety-eight, a letter B? No, it's not. Is it a ninety-nine, a 159 00:13:28,580 --> 00:13:33,840 letter C? No, it's not. Is it a letter 100, the letter D? And then it waits ten seconds. 160 00:13:34,100 --> 00:13:38,680 Is anyone picking up on the fact that this is going to take a while? I'm just hoping. 161 00:13:38,740 --> 00:13:42,480 I know it's early. I know it's early. Has anyone realized this is going to take a while? 162 00:13:42,920 --> 00:13:46,700 This is blind SQL injection. Who's with me? This fucking sucks. 163 00:13:48,340 --> 00:13:52,200 This fucking sucks. You don't want to do blind. You want to do error-based first. You want 164 00:13:52,200 --> 00:13:52,960 to read the errors. 165 00:13:54,000 --> 00:13:58,320 Well, okay. If that doesn't work, then we go for a union. And if that doesn't work, 166 00:13:58,420 --> 00:13:59,220 then we go for blind. 167 00:13:59,740 --> 00:14:05,500 So I don't like when guys say, well, I just use SQL map. Do you realize SQL map uses blind 168 00:14:05,500 --> 00:14:09,300 SQL injection? I had a buddy of mine tell me he's on a pen test. So he asked me to 169 00:14:09,300 --> 00:14:12,460 help him with this injection. So we're talking, and I'm, I'm helping him. And he says, well, 170 00:14:13,140 --> 00:14:13,500 how do you do that? 171 00:14:13,500 --> 00:14:15,240 So I see just yours and say, and I'm like, yeah. 172 00:14:15,340 --> 00:14:19,860 And I'm like, okay. I'll help you out. What are you going to use? He goes SQL map. 173 00:14:21,100 --> 00:14:24,620 And you ever have one of those days where you're talking to your buddy and you really 174 00:14:24,620 --> 00:14:28,140 want to tell him some simple shit, but you're like, you know what, this is one of those 175 00:14:28,140 --> 00:14:30,060 lessons that it's better. Learn on your own. 176 00:14:30,680 --> 00:14:31,040 . 177 00:14:33,400 --> 00:14:41,080 Two days later he dumped the entire database. Two fucking days of database queries for him 178 00:14:41,080 --> 00:14:42,460 to dump the entire database. 179 00:14:43,460 --> 00:14:50,940 database. Hello. So that was a good lesson. He doesn't do that anymore. So here we finally 180 00:14:50,940 --> 00:14:56,640 guess the second character is a B. Here we guess the third character is a B. Oh, database 181 00:14:56,640 --> 00:15:02,040 owner. Okay. I'm going to skip my SQL syntax. If you want to know this stuff, catch me outside. 182 00:15:03,720 --> 00:15:10,100 Okay? All right. But real quick on the union. How do I figure out where to throw in, you 183 00:15:10,100 --> 00:15:14,420 know, the word user and all that kind of stuff? What's happening is if the website is saying 184 00:15:14,420 --> 00:15:18,760 ID equals one, union I'll select one, two, three, four, five. Now I get a valid page 185 00:15:18,760 --> 00:15:24,180 so I know there's five columns. I'll change the value one to a negative number. Doing 186 00:15:24,180 --> 00:15:30,040 that will make numbers display on your screen. It looks fucking weird, but it works. So you 187 00:15:30,040 --> 00:15:35,520 change the value to a negative number, and now what happens, or the word null, and then 188 00:15:35,520 --> 00:15:39,000 you'll get the column numbers that echo back data right to the center of the screen. 189 00:15:40,100 --> 00:15:47,280 So it looks like this. So it's a real website. You know, sucks to be them. But I just changed 190 00:15:47,280 --> 00:15:54,180 the word to ID equals null. There's seven columns in the table, but can you see now 191 00:15:54,180 --> 00:15:59,580 that the number six and the number three display right in the middle of the screen? So now 192 00:15:59,580 --> 00:16:09,560 I replace column six and column three with my queries. So now you can see that column 193 00:16:09,560 --> 00:16:09,940 three. 194 00:16:10,100 --> 00:16:15,700 C is user. You guys see the lowercase three, the small three? That's WS user, local host. 195 00:16:15,980 --> 00:16:21,180 You see the at at version. Now it comes back saying, hey, I'm MySQL version 5.045. 196 00:16:22,660 --> 00:16:28,840 So now we're extracting all this data straight to the website. And then the same thing like 197 00:16:28,840 --> 00:16:32,880 I showed you with Microsoft SQL injection. You know, you can just replace them with user, 198 00:16:33,020 --> 00:16:39,120 database, version, data directory. There's a whole bunch more. All right. Now we already 199 00:16:39,120 --> 00:16:39,920 know about the 200 00:16:40,100 --> 00:16:42,080 blind SQL injection, so let's move on through that. 201 00:16:43,460 --> 00:16:50,460 SQL injection in the real world. So I call it, ugh, what the fuck. Pen testing is a pain 202 00:16:50,460 --> 00:16:56,220 in the ass. And if it's not a pain in the ass, you're probably using core impact. So 203 00:16:56,220 --> 00:17:01,260 if you're a real pen tester, it's fucking work. Weird error messages, OK? 204 00:17:01,660 --> 00:17:08,900 So I watch TV while I hack. You know, so I watch a lot of videos and stuff like that. 205 00:17:08,980 --> 00:17:09,180 So. 206 00:17:09,180 --> 00:17:16,140 So is it just me, or is little John a millionaire with only a two-word vocabulary? 207 00:17:18,880 --> 00:17:23,540 Does anybody? This is the shit I think about while I'm hacking. Does anybody? I think. 208 00:17:23,600 --> 00:17:25,680 This is deep thought for me, you know. 209 00:17:26,320 --> 00:17:32,120 So it bothers me. You know, like I'm hacking into banks. I'm breaking into like multi-million 210 00:17:32,120 --> 00:17:38,220 dollar systems and all that kind of stuff. And I don't make seven figures. I've got an 211 00:17:38,220 --> 00:17:43,280 extensive vocabulary comprised of fuck and shit, and all kinds of words I can use. I 212 00:17:43,280 --> 00:17:47,800 can put some long words together, I'm telling ya. And how the hell? OK, well let me move 213 00:17:47,800 --> 00:17:48,460 on to the next slide. 214 00:17:49,420 --> 00:17:58,600 I'm not bitter, we're just gonna own littlejohn.com. So. We're going to littlejohn.com, it's littlejohn.asp, 215 00:17:59,340 --> 00:18:04,740 and it's lil, right? So lil is the parameter. It's a string. So we need the tick, right? 216 00:18:05,500 --> 00:18:06,940 Yes. Yes we do. 217 00:18:07,180 --> 00:18:08,200 So we need the tick. 218 00:18:08,220 --> 00:18:10,320 and here we get this funny error. 219 00:18:11,400 --> 00:18:14,240 Microsoft OLEDB, provider for SQL Server, 220 00:18:14,910 --> 00:18:17,380 incorrect syntax near your right parenthesis. 221 00:18:20,020 --> 00:18:25,180 So about two freaking days goes by 222 00:18:25,180 --> 00:18:28,320 of me Googling everything on these types of errors. 223 00:18:28,930 --> 00:18:30,740 So I get a wild idea. 224 00:18:31,370 --> 00:18:33,520 I append a second parenthesis. 225 00:18:34,720 --> 00:18:36,220 And it fucking works. 226 00:18:38,240 --> 00:18:39,420 Now, who's with me? 227 00:18:39,640 --> 00:18:41,700 You don't give a shit how or why 228 00:18:41,700 --> 00:18:43,500 as long as it works, right? 229 00:18:44,280 --> 00:18:44,680 Okay. 230 00:18:44,900 --> 00:18:47,100 Well, if you do WebGoat and all that kind of stuff, 231 00:18:47,180 --> 00:18:49,300 you put in a tick and the whole damn database drops. 232 00:18:49,720 --> 00:18:51,940 It's not like that in the real world, people. 233 00:18:52,360 --> 00:18:53,080 Not anymore. 234 00:18:53,320 --> 00:18:54,020 That stuff's gone. 235 00:18:55,380 --> 00:18:57,920 So now that I realize that I still need my tick 236 00:18:57,920 --> 00:19:00,120 and I need my right parenthesis for every injection, 237 00:19:01,020 --> 00:19:01,680 I'm cool. 238 00:19:01,980 --> 00:19:03,700 So if you're using an open source tool, 239 00:19:03,800 --> 00:19:05,920 just open up your Perl or Python-based tool 240 00:19:05,920 --> 00:19:07,880 and change that for all the rest 241 00:19:07,880 --> 00:19:08,620 of your injections. 242 00:19:09,740 --> 00:19:10,180 Okay. 243 00:19:10,260 --> 00:19:13,180 So now here we can see or convert int debut name. 244 00:19:13,660 --> 00:19:16,000 And we see that the database name is yeah. 245 00:19:16,900 --> 00:19:17,340 Okay. 246 00:19:17,660 --> 00:19:19,980 Now here we go, you know, int version. 247 00:19:20,240 --> 00:19:21,600 And it comes back and tells us, 248 00:19:21,680 --> 00:19:24,280 hey, we're running Microsoft SQL Server 2005 249 00:19:25,000 --> 00:19:28,040 on Windows NT 5.2, which is Server 2003, 250 00:19:28,500 --> 00:19:29,400 Service Pack 2. 251 00:19:29,700 --> 00:19:30,140 Okay. 252 00:19:30,460 --> 00:19:33,100 So there's a whole lot of yeah and what. 253 00:19:33,220 --> 00:19:34,620 And basically at the end of it, 254 00:19:34,660 --> 00:19:35,880 I just got that little John, 255 00:19:35,960 --> 00:19:37,420 shut the fuck up. 256 00:19:38,600 --> 00:19:39,920 Ah, it just bothered me. 257 00:19:40,360 --> 00:19:40,700 Okay. 258 00:19:40,740 --> 00:19:42,020 So here was my next what the fuck. 259 00:19:42,120 --> 00:19:43,200 This one took me a little while. 260 00:19:44,440 --> 00:19:46,940 So I'm working on this website and it's PHP. 261 00:19:47,240 --> 00:19:48,900 So I do a union all select one, 262 00:19:49,000 --> 00:19:50,140 union all select two. 263 00:19:50,320 --> 00:19:51,740 This is usually where I ask my girlfriend. 264 00:19:51,840 --> 00:19:52,900 I'm like, okay, so what do you think? 265 00:19:53,500 --> 00:19:54,260 I go union. 266 00:19:54,360 --> 00:19:55,460 She's like, yeah, go union, baby. 267 00:19:55,520 --> 00:19:55,900 Go union. 268 00:19:56,300 --> 00:19:56,660 Right? 269 00:19:56,760 --> 00:19:58,340 So I'm like union all one, two. 270 00:19:58,440 --> 00:19:59,160 Then I get this error. 271 00:19:59,340 --> 00:19:59,580 Whoa. 272 00:20:00,300 --> 00:20:03,900 The text, in text, or image cannot be displayed 273 00:20:04,500 --> 00:20:05,220 as distinct. 274 00:20:08,720 --> 00:20:09,460 Who's a programmer? 275 00:20:10,740 --> 00:20:13,020 You guys are way better than me because I'm not. 276 00:20:13,240 --> 00:20:15,620 I was like, I have no fucking idea. 277 00:20:15,880 --> 00:20:18,200 I Googled and Googled and Googled, 278 00:20:18,240 --> 00:20:19,860 called my friends, Googled some more, 279 00:20:19,920 --> 00:20:21,760 called my friends, drank some more rum. 280 00:20:21,880 --> 00:20:22,740 None of it was working. 281 00:20:22,860 --> 00:20:24,240 Those are my usual things, by the way. 282 00:20:24,460 --> 00:20:26,780 And I'm working at it, working at it, working at it. 283 00:20:26,800 --> 00:20:27,400 And I'm like, God. 284 00:20:27,660 --> 00:20:31,240 So finally, one day I'm using that whole Google Translate thing. 285 00:20:31,280 --> 00:20:33,660 And I find this Chinese website where the guy's like, 286 00:20:33,780 --> 00:20:36,080 dude, if you just do a convert text, hello, 287 00:20:37,280 --> 00:20:37,680 it'll, 288 00:20:37,680 --> 00:20:39,840 it'll allow you to keep enumerating past this, 289 00:20:39,860 --> 00:20:40,480 this point. 290 00:20:41,060 --> 00:20:43,000 And I'm like, you've got to be kidding me. 291 00:20:43,980 --> 00:20:44,700 And he's like, yeah. 292 00:20:45,400 --> 00:20:46,380 So I tried it. 293 00:20:46,560 --> 00:20:47,360 Freaking works. 294 00:20:47,940 --> 00:20:48,380 Okay. 295 00:20:48,420 --> 00:20:52,460 The issue is people put things in their database 296 00:20:52,460 --> 00:20:55,820 like favicons, like thumbnails. 297 00:20:56,300 --> 00:20:58,720 So it doesn't come up as just a regular string 298 00:20:58,720 --> 00:20:59,520 or a regular integer. 299 00:21:00,400 --> 00:21:02,180 Couldn't somebody have just put that, you know, 300 00:21:02,200 --> 00:21:03,720 in the first five results of Google? 301 00:21:03,880 --> 00:21:05,160 I mean, damn, can you help a brother out? 302 00:21:06,480 --> 00:21:07,640 So now we go back. 303 00:21:07,680 --> 00:21:09,820 We go back to iterating four, five, six, seven, eight, nine. 304 00:21:09,960 --> 00:21:12,300 Then we come up with, whoa, operand clash. 305 00:21:13,060 --> 00:21:14,920 Text is incompatible with type int. 306 00:21:15,540 --> 00:21:16,840 Another weird freaking database. 307 00:21:17,300 --> 00:21:20,440 You know, the database developer decided to do something cool. 308 00:21:20,620 --> 00:21:21,580 You know how these guys go, right? 309 00:21:21,700 --> 00:21:23,240 They're the smelly guys who, you know, 310 00:21:23,300 --> 00:21:24,780 you have these guys who work with you, right? 311 00:21:25,100 --> 00:21:26,960 The smelly one that you don't let talk to the customer? 312 00:21:27,160 --> 00:21:27,380 Come on. 313 00:21:28,240 --> 00:21:28,560 Right? 314 00:21:28,700 --> 00:21:29,960 So he's back in the server room going, 315 00:21:30,060 --> 00:21:30,920 oh, this is going to be so cool 316 00:21:30,920 --> 00:21:31,940 if I just write these queries this way. 317 00:21:32,040 --> 00:21:32,500 It's that guy. 318 00:21:33,320 --> 00:21:34,820 So you're like, okay, man. 319 00:21:34,940 --> 00:21:36,920 So this one I found that if you actually 320 00:21:36,920 --> 00:21:40,060 just substitute the word null, I can get by that one. 321 00:21:40,200 --> 00:21:41,600 So some quick tips I came up with. 322 00:21:42,660 --> 00:21:45,360 Always use the union with all because of similar 323 00:21:45,360 --> 00:21:46,960 or non-distinct field types. 324 00:21:47,200 --> 00:21:51,400 By default, union tries to get records with type distinct. 325 00:21:52,380 --> 00:21:55,440 Use null in union as much as you can. 326 00:21:55,500 --> 00:21:57,960 It's just a much easier way when you don't know 327 00:21:57,960 --> 00:21:59,180 what the data type is. 328 00:21:59,380 --> 00:22:00,400 Really big help. 329 00:22:02,320 --> 00:22:04,500 I'm going to skip privilege escalation to save time. 330 00:22:04,940 --> 00:22:06,900 But essentially, what's happening, 331 00:22:06,920 --> 00:22:11,240 is you're allowed to make an SQL OLEDB connection 332 00:22:11,900 --> 00:22:15,200 to the database and pass a username and password to it. 333 00:22:15,460 --> 00:22:17,180 Well, because of that, you can actually 334 00:22:17,180 --> 00:22:18,200 brute force the database. 335 00:22:18,520 --> 00:22:20,420 You just keep iterating through usernames 336 00:22:20,420 --> 00:22:21,860 until the connection is authorized. 337 00:22:23,640 --> 00:22:24,120 Okay? 338 00:22:24,240 --> 00:22:25,540 And I'm going to skip this stuff. 339 00:22:25,640 --> 00:22:26,760 If you want to ask me about it outside, 340 00:22:26,900 --> 00:22:28,480 I'll help you out because we're kind of pressed for time 341 00:22:28,480 --> 00:22:29,460 and battery life. 342 00:22:29,860 --> 00:22:31,620 Okay, so essentially you just create, 343 00:22:33,000 --> 00:22:36,300 you'll add the current user to the, 344 00:22:36,920 --> 00:22:38,240 SQL server admins group. 345 00:22:39,460 --> 00:22:40,640 Okay, filter evasion. 346 00:22:40,640 --> 00:22:41,640 Let's talk about the real stuff. 347 00:22:42,800 --> 00:22:44,380 The first thing is client side filtering. 348 00:22:44,580 --> 00:22:46,900 How many of you know that client side filtering sucks ass? 349 00:22:48,340 --> 00:22:50,220 Okay, so we don't need to explain on that one too much. 350 00:22:50,500 --> 00:22:52,000 People who do client side filtering, 351 00:22:52,260 --> 00:22:54,840 it's easy to bypass by just using something like 352 00:22:54,840 --> 00:22:57,900 tamper data or peros or saving the page locally 353 00:22:57,900 --> 00:23:00,060 and changing all that because they're trying to stop you 354 00:23:00,060 --> 00:23:00,540 with JavaScript. 355 00:23:01,040 --> 00:23:03,780 So, you know, I talk to developers and I say, 356 00:23:03,840 --> 00:23:06,140 hey bro, does this pass the common sense test? 357 00:23:07,300 --> 00:23:10,000 All of your security mechanisms you're putting in the browser 358 00:23:10,000 --> 00:23:12,440 and the hacker has control of his browser. 359 00:23:13,600 --> 00:23:15,780 Does that pass the common sense test? 360 00:23:16,540 --> 00:23:18,420 And they kind of look at me like, wow Joe, 361 00:23:18,580 --> 00:23:19,480 you know, I guess that doesn't. 362 00:23:19,540 --> 00:23:20,480 No, it doesn't. 363 00:23:21,840 --> 00:23:23,140 Okay, restrictive blacklist. 364 00:23:23,240 --> 00:23:25,720 Sometimes you'll run into websites that use filtering 365 00:23:25,720 --> 00:23:26,940 and they'll say, okay, well we're going to use 366 00:23:27,540 --> 00:23:28,140 alphanumeric filtering. 367 00:23:28,420 --> 00:23:30,380 So you can't use things like a greater than, 368 00:23:30,440 --> 00:23:31,760 a less than, an equal than sign. 369 00:23:32,060 --> 00:23:34,560 So maybe I can't say or one equals one, 370 00:23:34,640 --> 00:23:35,940 but you can do some cool things like well, 371 00:23:35,940 --> 00:23:37,560 is one like one? 372 00:23:38,860 --> 00:23:39,980 Yes it is. 373 00:23:41,040 --> 00:23:41,480 Okay. 374 00:23:43,160 --> 00:23:44,540 Whoa, that didn't work. 375 00:23:53,140 --> 00:23:55,000 Okay, so signature based IDS. 376 00:23:55,140 --> 00:23:57,300 This is one that everyone always wants to talk about. 377 00:23:57,480 --> 00:23:58,920 How do you bypass the IDS? 378 00:24:00,220 --> 00:24:02,560 So, break out your handy dandy chart because this is 379 00:24:02,560 --> 00:24:04,680 what you're going to need to bypass the intrusion detection system. 380 00:24:05,100 --> 00:24:05,920 So, get started. 381 00:24:05,940 --> 00:24:06,640 Can everyone read snort? 382 00:24:06,760 --> 00:24:07,420 Who speaks snort? 383 00:24:08,120 --> 00:24:09,100 Everyone speaky snort? 384 00:24:09,220 --> 00:24:09,400 Cool. 385 00:24:10,060 --> 00:24:10,480 Okay. 386 00:24:10,540 --> 00:24:16,480 So, alert, TCP, any IP address, any port going to our web servers on our web server ports. 387 00:24:16,660 --> 00:24:20,380 The message we're going to send to the analyst is SQL injection attempt. 388 00:24:20,740 --> 00:24:22,020 Now what are we looking for? 389 00:24:22,120 --> 00:24:26,340 The content is tick or one equals one. 390 00:24:27,100 --> 00:24:28,700 So that's what we're looking for. 391 00:24:29,540 --> 00:24:32,060 Guys, how do we bypass this one? 392 00:24:32,220 --> 00:24:35,500 How about tick or two equals two? 393 00:24:37,900 --> 00:24:38,340 Huh? 394 00:24:38,540 --> 00:24:38,720 Huh? 395 00:24:41,600 --> 00:24:43,820 Okay, simple IDS signatures suck. 396 00:24:44,060 --> 00:24:45,180 And I was an IDS analyst. 397 00:24:45,400 --> 00:24:46,700 I know what I'm talking about. 398 00:24:46,860 --> 00:24:48,800 I wrote a lot of simple IDS signatures. 399 00:24:49,340 --> 00:24:51,520 So, why do we have signatures like this? 400 00:24:51,580 --> 00:24:56,140 You can say two equals two, you can say one is less than two, you can say one is like one. 401 00:24:56,220 --> 00:25:02,020 You can intersperse comments where two slash asterisk asterisk slash or two, the whole bit. 402 00:25:02,840 --> 00:25:03,280 Okay. 403 00:25:03,360 --> 00:25:05,920 We have these kind of signatures to catch automated tools. 404 00:25:05,920 --> 00:25:07,640 These are good signatures, believe it or not. 405 00:25:07,880 --> 00:25:10,720 We catch tools, automated tools, and we catch idiots. 406 00:25:11,020 --> 00:25:14,620 When I was an IDS analyst, I always used to say things to my boss like, we catch idiots. 407 00:25:14,720 --> 00:25:15,900 We catch people who deserve to be caught. 408 00:25:16,160 --> 00:25:17,660 We catch people who don't know how to delete logs. 409 00:25:17,940 --> 00:25:21,320 We catch people who don't know where IIS actually stores logs. 410 00:25:21,780 --> 00:25:22,840 You know, we catch idiots. 411 00:25:23,680 --> 00:25:24,880 Great signature for idiots. 412 00:25:26,620 --> 00:25:28,440 So, my opinion of IDSs. 413 00:25:31,680 --> 00:25:32,060 Okay. 414 00:25:32,720 --> 00:25:33,640 I love this. 415 00:25:33,700 --> 00:25:34,740 I was an IDS analyst. 416 00:25:34,740 --> 00:25:36,640 And we would get an alert and it would be like, I got one. 417 00:25:37,380 --> 00:25:38,380 It's a real hack. 418 00:25:38,520 --> 00:25:39,440 Like, I got one. 419 00:25:40,080 --> 00:25:42,140 50 million false positives all day long. 420 00:25:42,240 --> 00:25:43,600 I got a real hacker today. 421 00:25:43,680 --> 00:25:44,180 Got one. 422 00:25:44,920 --> 00:25:45,660 Got one. 423 00:25:48,100 --> 00:25:48,500 Okay. 424 00:25:48,560 --> 00:25:50,460 Let's move on to a little bit more complex of a signature. 425 00:25:51,440 --> 00:25:57,500 So, in this case, any IP address, any port going to our web servers, and we've got PCRE, 426 00:25:57,640 --> 00:25:59,460 Perl Compatible Regular Expressions. 427 00:25:59,540 --> 00:26:00,880 We're looking for the word and. 428 00:26:01,000 --> 00:26:02,060 We're looking for the word or. 429 00:26:02,060 --> 00:26:04,320 But we're still looking for one equals one. 430 00:26:04,640 --> 00:26:08,760 We're also looking for the comments that people add to the end of their injection. 431 00:26:09,060 --> 00:26:11,720 So, in this case, we bypass that very simply. 432 00:26:11,900 --> 00:26:13,580 So, we'll do a two equals two. 433 00:26:13,980 --> 00:26:19,760 And then instead of the dash dash, percent sign 2D, percent sign 2D is that comments. 434 00:26:19,800 --> 00:26:20,980 It's that hyphen hyphen. 435 00:26:21,220 --> 00:26:23,140 So, again, we've bypassed the signature. 436 00:26:24,480 --> 00:26:24,960 Okay. 437 00:26:25,060 --> 00:26:29,140 So, again, this is another example of a signature that we have for automated tools. 438 00:26:29,440 --> 00:26:30,780 But they're really not good. 439 00:26:30,780 --> 00:26:37,660 Because you can just open up your open source tools, SQL map, SQID, WAPT, or any of these 440 00:26:37,660 --> 00:26:40,120 tools and change your injections to look like this. 441 00:26:40,240 --> 00:26:41,000 That's what I do. 442 00:26:42,880 --> 00:26:43,320 Okay. 443 00:26:43,420 --> 00:26:46,080 So, now we've got some more complex ones. 444 00:26:46,340 --> 00:26:49,760 So, here we're looking for a select statement. 445 00:26:49,940 --> 00:26:51,580 So, select all records from. 446 00:26:52,360 --> 00:26:55,620 And then here we're looking for a union with the dash dash. 447 00:26:55,940 --> 00:26:59,060 So, can you guys see that I just did a or to in. 448 00:26:59,520 --> 00:27:00,760 And then it's just a whole bunch of things. 449 00:27:00,760 --> 00:27:01,200 A bunch of hex. 450 00:27:01,480 --> 00:27:03,860 Well, that hex translates to select user. 451 00:27:04,780 --> 00:27:09,100 So, the entire signature is bypassed because we've encoded it completely in hex. 452 00:27:10,280 --> 00:27:11,420 Same thing with the union. 453 00:27:12,940 --> 00:27:13,380 Okay. 454 00:27:13,600 --> 00:27:16,880 Now, there are some IDSs that can do normalization. 455 00:27:17,140 --> 00:27:18,080 So, we'll talk about that. 456 00:27:18,280 --> 00:27:20,540 If you guys have questions, just kind of grab me outside. 457 00:27:20,880 --> 00:27:25,480 We'll talk about bypassing host that, I mean, intrusion detection systems that do normalization. 458 00:27:25,660 --> 00:27:26,780 Because that's possible as well. 459 00:27:27,740 --> 00:27:28,560 So, here. 460 00:27:28,920 --> 00:27:29,900 In some cases. 461 00:27:29,900 --> 00:27:31,760 Maybe they've got a signature that looks for hex. 462 00:27:31,880 --> 00:27:34,940 But they're not looking for the uppercase and lowercase versions of each letter. 463 00:27:35,540 --> 00:27:38,640 So, you know, a percent sign 73 and a percent sign 53. 464 00:27:38,820 --> 00:27:40,920 That's the capital and the lowercase x. 465 00:27:41,140 --> 00:27:42,460 Well, how do we bypass that? 466 00:27:42,980 --> 00:27:44,260 Use another encoding type. 467 00:27:44,380 --> 00:27:46,320 UTF-7, UTF-8, UTF-16. 468 00:27:46,840 --> 00:27:47,280 Okay. 469 00:27:47,300 --> 00:27:49,140 The attacker has the advantage, guys. 470 00:27:50,880 --> 00:27:51,320 Okay. 471 00:27:51,560 --> 00:27:53,160 Anyone ever heard of PHP IDS? 472 00:27:54,040 --> 00:27:55,320 PHP IDS rocks. 473 00:27:55,680 --> 00:27:55,920 Okay. 474 00:27:55,980 --> 00:27:59,880 So, the best thing about the PHP IDS site is not deploying PHP IDS. 475 00:28:00,780 --> 00:28:02,340 It's what they call the smoke test. 476 00:28:02,800 --> 00:28:07,660 So, what happens is you can try all of your attacks on the smoke test site. 477 00:28:07,820 --> 00:28:13,200 And it tells you what regular expressions for rules that it triggers. 478 00:28:13,600 --> 00:28:20,500 So, what I do is I just keep going on this site and trying all of my different injections and different encodings until it finally tells me. 479 00:28:21,580 --> 00:28:22,740 Just like football, right? 480 00:28:22,840 --> 00:28:23,460 It's good. 481 00:28:25,020 --> 00:28:26,080 So, that's what I know. 482 00:28:26,180 --> 00:28:26,900 That's what I know. 483 00:28:26,980 --> 00:28:29,560 That's the type of injection that I'm going to use against this. 484 00:28:29,560 --> 00:28:30,660 Against this host. 485 00:28:32,280 --> 00:28:32,720 Okay. 486 00:28:32,840 --> 00:28:33,420 All right. 487 00:28:33,460 --> 00:28:34,820 So, signature-based IDS. 488 00:28:34,880 --> 00:28:36,120 It's actually pretty easy to bypass. 489 00:28:37,280 --> 00:28:37,720 Okay. 490 00:28:37,800 --> 00:28:39,080 Web application firewalls. 491 00:28:39,080 --> 00:28:40,740 I'm going to kind of skip through some of this kind of quickly. 492 00:28:40,900 --> 00:28:41,080 Okay. 493 00:28:42,060 --> 00:28:43,980 So, key things that I look for. 494 00:28:45,100 --> 00:28:45,760 Mod security. 495 00:28:46,120 --> 00:28:47,160 Anybody deploy mod security? 496 00:28:48,080 --> 00:28:48,520 Okay. 497 00:28:48,580 --> 00:28:49,080 All right. 498 00:28:49,120 --> 00:28:58,680 Mod security is awesome because if you actually do something scary like read the documentation, it will tell you put slash cmd.exe at the end of the URL. 499 00:28:59,100 --> 00:28:59,540 Okay. 500 00:28:59,560 --> 00:29:03,560 And if you do that, you'll get this 501 method not implemented error. 501 00:29:03,980 --> 00:29:04,460 So, great. 502 00:29:04,620 --> 00:29:06,760 How do you think I fingerprint mod security now? 503 00:29:08,040 --> 00:29:08,900 That helps. 504 00:29:09,440 --> 00:29:19,260 So, other things like web night, which is another open source web application firewall, you'll see in the response HTTP 1.1.999, no hacking. 505 00:29:19,740 --> 00:29:20,260 See? 506 00:29:20,360 --> 00:29:22,960 It's like, don't do that. 507 00:29:24,800 --> 00:29:25,320 Okay. 508 00:29:25,400 --> 00:29:28,560 Well, Gary O'Leary-Steele, he has this awesome unicoding. 509 00:29:28,560 --> 00:29:30,060 Unicode encoding tool. 510 00:29:30,420 --> 00:29:31,340 And it's Ruby based. 511 00:29:31,600 --> 00:29:36,140 So, you can just put in your cross-site scripting or SQL injection and it codes it all in unicode. 512 00:29:36,300 --> 00:29:37,360 So, this is great. 513 00:29:39,720 --> 00:29:42,840 So, in this case, this is another web application firewall. 514 00:29:43,080 --> 00:29:52,800 So, it gives me a 200 okay message, which is great for tricking vulnerability scanners into thinking that the host is okay and not vulnerable. 515 00:29:53,320 --> 00:29:55,440 It just flat out gives another 200 okay. 516 00:29:55,520 --> 00:29:56,600 The scanner just moves on. 517 00:29:56,600 --> 00:30:00,340 But if you actually look in the response, you'll see it says condition intercepted. 518 00:30:00,380 --> 00:30:02,640 So, now you know you're dealing with some sort of filtering device. 519 00:30:03,280 --> 00:30:05,140 So, I was on a bank pen test recently. 520 00:30:06,200 --> 00:30:08,920 And I ran into this little bugger called .NET Defender. 521 00:30:09,460 --> 00:30:10,240 So, I'm like, wow. 522 00:30:11,760 --> 00:30:13,920 .NET Defender has blocked your request. 523 00:30:14,920 --> 00:30:16,120 Joe, you suck. 524 00:30:17,500 --> 00:30:18,380 So, I was like, damn. 525 00:30:20,060 --> 00:30:20,720 Now what? 526 00:30:22,480 --> 00:30:26,580 So, I break out my smoke test. 527 00:30:26,580 --> 00:30:36,000 And lo and behold, conversion error failed when converting in varchar value DBO to data type int. 528 00:30:36,180 --> 00:30:37,800 This thing is running as administrator. 529 00:30:38,180 --> 00:30:39,660 $16 billion bank. 530 00:30:41,660 --> 00:30:42,840 Running as administrator. 531 00:30:43,100 --> 00:30:45,720 But they've got a web application firewall. 532 00:30:45,860 --> 00:30:47,540 So, they're PCI compliant. 533 00:30:49,560 --> 00:30:50,200 . 534 00:30:54,340 --> 00:30:55,240 So, wow. 535 00:30:55,480 --> 00:30:58,420 The web application firewall is stopping the bulk of my attacks. 536 00:30:59,420 --> 00:31:01,140 So, I went for the encoding thing. 537 00:31:02,200 --> 00:31:03,960 So, I used the Gary O'Leary tool. 538 00:31:04,100 --> 00:31:09,880 And now you see that it says, hey, I'm running SQL Server 2005 on Server 2003 Service Pack 2. 539 00:31:10,300 --> 00:31:11,320 So, I said, you know what? 540 00:31:11,800 --> 00:31:12,500 That's cool. 541 00:31:12,660 --> 00:31:13,740 But I want something good. 542 00:31:14,420 --> 00:31:18,300 Why don't you just give me the admin password hash for the database? 543 00:31:19,220 --> 00:31:19,660 . 544 00:31:23,560 --> 00:31:24,820 It's the end of my talk, fellas. 545 00:31:27,400 --> 00:31:27,760 Okay. 546 00:31:28,040 --> 00:31:30,540 So, if you want to learn SQL, some great references. 547 00:31:30,840 --> 00:31:32,300 Go learn, you know, SQL. 548 00:31:32,680 --> 00:31:33,400 Great tutorials. 549 00:31:34,020 --> 00:31:34,600 Cheat sheets. 550 00:31:34,820 --> 00:31:37,500 This guy, Pentest Monkey, I don't know if he's here today. 551 00:31:37,640 --> 00:31:39,300 But if any of you know him, I've never met him. 552 00:31:39,460 --> 00:31:41,820 But he helped me out when I was trying to learn SQL injection. 553 00:31:42,280 --> 00:31:44,160 Gave me some good pointers and all that kind of stuff. 554 00:31:44,300 --> 00:31:48,120 If he's here and you know him, point in my direction, I'm buying that guy a drink. 555 00:31:48,120 --> 00:31:48,420 Thanks. 556 00:31:49,500 --> 00:31:53,240 He's got the best cheat sheets on the Internet for doing SQL injection. 557 00:31:53,600 --> 00:31:55,340 And he's got them for every back-end database. 558 00:31:55,960 --> 00:31:56,100 Okay. 559 00:31:56,120 --> 00:31:58,540 So, MSSQL, MySQL, Oracle, Postgres. 560 00:31:58,720 --> 00:32:02,500 He's even got a freaking Access SQL injection tutorial. 561 00:32:02,720 --> 00:32:03,740 The guy is the shit. 562 00:32:05,080 --> 00:32:05,520 Okay. 563 00:32:05,640 --> 00:32:06,260 All right. 564 00:32:06,460 --> 00:32:07,660 References from me. 565 00:32:08,620 --> 00:32:11,240 Paul Batista's TorCon 9 presentation was really good. 566 00:32:11,320 --> 00:32:12,000 Helped me out a lot. 567 00:32:12,680 --> 00:32:14,220 Brad Warnack, he works at SecureWorks. 568 00:32:14,700 --> 00:32:17,260 He's got a great GIAC paper. 569 00:32:17,720 --> 00:32:18,520 That's really good. 570 00:32:18,960 --> 00:32:19,840 That was helpful. 571 00:32:20,120 --> 00:32:22,040 And lots and lots of Rum and Coke. 572 00:32:22,180 --> 00:32:23,320 That's how I do my thing. 573 00:32:24,500 --> 00:32:24,860 Okay. 574 00:32:24,900 --> 00:32:30,840 If you want to catch up with me, work at Learn Security Online, you know, hey, I'll try my best to help you out. 575 00:32:30,960 --> 00:32:34,580 If you want my slides, it should be on the DEF CON CD or you can e-mail me for them. 576 00:32:34,800 --> 00:32:35,440 I'm on Twitter. 577 00:32:35,600 --> 00:32:38,440 I just don't use it here because it's all on the wall of shame. 578 00:32:39,220 --> 00:32:39,720 You know. 579 00:32:39,800 --> 00:32:41,840 But if you want to holler at me on Twitter, I got your back. 580 00:32:42,080 --> 00:32:42,280 Okay. 581 00:32:42,380 --> 00:32:43,100 I'm on LinkedIn. 582 00:32:43,700 --> 00:32:44,400 Say what's up. 583 00:32:44,960 --> 00:32:45,320 Cool? 584 00:32:46,120 --> 00:32:46,620 All right. 585 00:32:47,460 --> 00:32:48,280 What do you call it? 586 00:32:48,320 --> 00:32:48,980 How much time I got? 587 00:32:49,100 --> 00:32:50,500 You got ten minutes. 588 00:32:50,560 --> 00:32:51,200 I got ten minutes? 589 00:32:51,280 --> 00:32:51,780 Who's got questions? 590 00:32:53,840 --> 00:32:56,620 I wonder what the start money was when you were digging around in that bank. 591 00:32:59,880 --> 00:33:00,520 God, Doug. 592 00:33:00,640 --> 00:33:00,860 Okay. 593 00:33:00,900 --> 00:33:02,100 Well, I can't tell you about that bank. 594 00:33:02,940 --> 00:33:07,980 But we did a really cool bank where we were actually able to move money between accounts and all that. 595 00:33:08,080 --> 00:33:11,380 Who's ever, like, wanted to do that, like change your grades in school and all that kind of stuff? 596 00:33:11,840 --> 00:33:12,880 So that was cool. 597 00:33:12,920 --> 00:33:14,260 We could move money between accounts. 598 00:33:14,340 --> 00:33:16,300 And it was an investment bank, so we could do some cool things. 599 00:33:16,300 --> 00:33:18,980 SQL injection is great for that kind of stuff. 600 00:33:19,060 --> 00:33:20,440 We were able to dump the whole tables. 601 00:33:20,640 --> 00:33:22,700 We could see this particular bank. 602 00:33:22,940 --> 00:33:31,320 I remember the guy who was telling me, the director of information security said, well, if you can get to the SWIFT network or if you can get to these three accounts. 603 00:33:31,620 --> 00:33:36,420 And they're individuals whose account assets were over $200 million each. 604 00:33:36,720 --> 00:33:39,840 He's like, if you can get to their social security numbers, pen test is over. 605 00:33:39,940 --> 00:33:40,280 Good job. 606 00:33:40,520 --> 00:33:44,440 So miraculously, via SQL injection, life is good. 607 00:33:45,460 --> 00:33:45,900 Okay. 608 00:33:45,900 --> 00:33:46,560 Any more of this? 609 00:33:47,420 --> 00:33:48,120 What's up, man? 610 00:33:48,840 --> 00:33:49,280 Yes. 611 00:33:49,800 --> 00:33:53,360 Have you ever found a way to get around prepared statements? 612 00:33:56,440 --> 00:33:57,320 Not really. 613 00:33:58,360 --> 00:33:58,800 Okay. 614 00:33:58,840 --> 00:34:01,640 So the question was, have you ever found a way to get around prepared statements? 615 00:34:01,760 --> 00:34:11,820 So generally what people are going to tell you is if you use parameterized queries or prepared statements, it's really just a matter of input filtering and saying that this is what I'm passing to my database. 616 00:34:12,140 --> 00:34:13,860 I really have not run into that. 617 00:34:13,860 --> 00:34:18,720 Where we were intentionally bypassing or injecting into prepared statements. 618 00:34:18,880 --> 00:34:21,980 What I have run into is injecting into stored procedures. 619 00:34:22,220 --> 00:34:28,220 So people who say that stored procedures is a valid means of preventing SQL injection, they are wrong. 620 00:34:28,460 --> 00:34:29,040 All right. 621 00:34:29,120 --> 00:34:31,220 You know, talk to the left because you ain't right type thing. 622 00:34:31,300 --> 00:34:31,720 Wrong. 623 00:34:31,960 --> 00:34:32,580 Does not work. 624 00:34:32,880 --> 00:34:33,380 Okay. 625 00:34:33,380 --> 00:34:33,580 So. 626 00:34:33,760 --> 00:34:35,380 If they scrub the input. 627 00:34:35,580 --> 00:34:37,040 If they scrub the input. 628 00:34:37,180 --> 00:34:37,480 Great. 629 00:34:37,640 --> 00:34:37,900 Great. 630 00:34:37,940 --> 00:34:40,440 But again, how well are they filtering? 631 00:34:40,520 --> 00:34:42,260 Are they filtering for encoded type data? 632 00:34:42,500 --> 00:34:43,020 No. 633 00:34:43,700 --> 00:34:44,100 You know. 634 00:34:52,600 --> 00:34:53,000 Correct. 635 00:34:59,560 --> 00:35:03,280 Correct, correct. 636 00:35:08,040 --> 00:35:12,420 That would be the smart thing to do, and if I had customers like that, I wouldn't have a job. 637 00:35:12,480 --> 00:35:12,740 Okay. 638 00:35:13,640 --> 00:35:15,300 I mean, it's really that simple. 639 00:35:15,600 --> 00:35:18,620 Data input validation is always going to be huge, right? 640 00:35:18,780 --> 00:35:23,600 So if you're going to say, I'm only going to accept from zero to nine in this field, 641 00:35:23,780 --> 00:35:26,520 I'm not going to accept anything else, no ASCII, no anything, 642 00:35:28,260 --> 00:35:29,960 that's exactly what it would have to be. 643 00:35:30,240 --> 00:35:35,200 But in those cases where you don't know what it is, like I pen tested a car website, 644 00:35:36,240 --> 00:35:38,340 so they had the car model numbers. 645 00:35:38,340 --> 00:35:44,580 So, you know, if it's like a 325i BMW, it's got strings and characters into it. 646 00:35:44,620 --> 00:35:46,240 So some of that kind of stuff is where it gets hairy. 647 00:35:46,660 --> 00:35:47,000 Okay? 648 00:35:47,140 --> 00:35:47,680 Do you have a question? 649 00:35:48,400 --> 00:35:49,580 Yeah, just a matter of fact. 650 00:35:49,920 --> 00:35:55,100 When I write my code, any database for life is a total tri-cache. 651 00:35:55,300 --> 00:35:55,700 Sure. 652 00:35:55,880 --> 00:35:58,060 So I read the sentence and never back up to it. 653 00:35:58,900 --> 00:36:00,400 How do you contest this? 654 00:36:03,020 --> 00:36:05,060 Well, you're going to hire me so we can try it out? 655 00:36:05,320 --> 00:36:08,320 So he's basically telling me, can you say that one more time? 656 00:36:09,120 --> 00:36:16,220 When I write my code, I take great pains to make sure that whatever exception my database fills never gets to you. 657 00:36:17,000 --> 00:36:18,620 I'll be fantastic like that. 658 00:36:18,720 --> 00:36:20,740 Okay, so essentially what you're dealing with is, 659 00:36:20,860 --> 00:36:23,260 you're not saying that you're doing good input validation, 660 00:36:23,460 --> 00:36:27,040 you're ensuring that the attacker doesn't see database errors. 661 00:36:27,640 --> 00:36:31,660 Okay, so in that case, that's when we use union-based SQL injection 662 00:36:31,660 --> 00:36:34,920 and true-false or time-based blind SQL injection. 663 00:36:35,200 --> 00:36:37,580 So you're asking the database, hey, does one equal one? 664 00:36:37,580 --> 00:36:43,240 If the database gives you a valid web page, then yes, he's processing that request. 665 00:36:43,560 --> 00:36:44,940 If you say, hey, does one equal two? 666 00:36:45,140 --> 00:36:48,220 And then it gives you an error page or a custom 404 page. 667 00:36:48,420 --> 00:36:50,120 Again, it processed your request. 668 00:36:50,280 --> 00:36:52,060 Now you know SQL injection is possible. 669 00:36:52,340 --> 00:36:55,520 Another one that's really, really good, Paul Batista shows this technique. 670 00:36:55,800 --> 00:36:57,880 So let's say it says ID equals five. 671 00:36:58,240 --> 00:37:02,020 If you can take that number five, encapsulate it in parentheses, 672 00:37:02,200 --> 00:37:05,420 and say four plus one, and then you get this correct page, 673 00:37:05,680 --> 00:37:07,400 you now know that it's processed. 674 00:37:07,580 --> 00:37:09,080 It's processing your database queries. 675 00:37:09,220 --> 00:37:10,480 It's doing arithmetic operators. 676 00:37:11,040 --> 00:37:15,980 So now we know that SQL injection is possible without error messages. 677 00:37:16,220 --> 00:37:17,360 So it is possible. 678 00:37:17,500 --> 00:37:21,180 The best thing to do is prepared statements, parameterized queries, 679 00:37:21,520 --> 00:37:23,240 use things like ASP.NET. 680 00:37:23,400 --> 00:37:27,300 If you're using classic ASP, do your upgrades to ASP.NET. 681 00:37:27,440 --> 00:37:28,920 That's the kind of stuff that's going to help. 682 00:37:29,220 --> 00:37:30,380 Okay, any other questions? 683 00:37:30,720 --> 00:37:31,240 Yes? 684 00:37:31,500 --> 00:37:33,700 Have you seen any behavior imperfections so far? 685 00:37:35,000 --> 00:37:37,560 I have not run into anomaly-based... 686 00:37:37,580 --> 00:37:40,340 ...detection while I was pen-testing. 687 00:37:40,480 --> 00:37:41,040 I have not. 688 00:37:41,440 --> 00:37:42,980 So I really can't speak on that. 689 00:37:43,340 --> 00:37:45,780 If somebody has something like that that they want to give me, 690 00:37:45,840 --> 00:37:49,760 I've got like probably 30 or 40 vulnerable applications I can put it in front of. 691 00:37:49,880 --> 00:37:51,420 I would love to see what it's like. 692 00:37:51,620 --> 00:37:54,780 But I just can't see behavior-based SQL... 693 00:37:54,780 --> 00:37:59,860 ...behavior-based anomaly-based detection catching things like all of these different encoding types. 694 00:37:59,980 --> 00:38:01,440 I think it would be really, really difficult. 695 00:38:02,220 --> 00:38:06,260 I'm partnering with a couple of web application firewall companies. 696 00:38:07,100 --> 00:38:07,500 ...I'm partnering with a couple of web application firewall companies. 697 00:38:07,580 --> 00:38:08,940 And encoding is where it's at. 698 00:38:09,800 --> 00:38:11,100 That is just where it's at. 699 00:38:11,660 --> 00:38:13,160 Did you just add a question, sir? 700 00:38:13,340 --> 00:38:13,980 Another question. 701 00:38:14,560 --> 00:38:18,320 These technologies that you're doing, one-level one, one-level two... 702 00:38:18,320 --> 00:38:18,820 Sure. 703 00:38:18,940 --> 00:38:20,540 ...which can't be done with variables... 704 00:38:21,480 --> 00:38:22,380 Sure, sure, sure, sure. 705 00:38:24,040 --> 00:38:27,800 ...it seems to me that these kind of constructs are... 706 00:38:30,560 --> 00:38:31,920 ...they are, they are. 707 00:38:32,180 --> 00:38:35,560 Does anybody have anything where they go out and look for those kinds of... 708 00:38:36,140 --> 00:38:41,360 What I've seen that's the best in this kind of thing, and to be honest, I really haven't seen it deployed, is PHP IDS. 709 00:38:42,620 --> 00:38:45,000 ASP.NET has what's called request validate. 710 00:38:45,440 --> 00:38:47,080 And that's been very, very good. 711 00:38:47,380 --> 00:38:48,680 But does anybody know Port Swigger? 712 00:38:49,180 --> 00:38:50,340 You know, they make Burp Suite? 713 00:38:51,340 --> 00:38:52,720 Great, great, great tool. 714 00:38:52,780 --> 00:38:58,380 He has a blog post on parameter name SQL injection as a means of bypassing request validate. 715 00:38:58,720 --> 00:39:04,700 So if it's ID equals five, instead of actually injecting into the five, you're injecting into ID. 716 00:39:04,700 --> 00:39:05,920 The parameter name itself. 717 00:39:06,400 --> 00:39:09,100 So that's a very, very good way for that kind of stuff. 718 00:39:09,260 --> 00:39:09,760 You'll get a... 719 00:39:09,760 --> 00:39:12,500 You're not injecting into the where clause, which is the norm. 720 00:39:12,760 --> 00:39:14,740 You know, you've got a completely broken query. 721 00:39:14,860 --> 00:39:16,580 You have to manufacture the query out of it. 722 00:39:16,660 --> 00:39:18,100 But it's definitely possible. 723 00:39:18,600 --> 00:39:20,740 You know, so again, you're going to do that. 724 00:39:21,160 --> 00:39:24,080 Put your injection in, and then just comment out the rest of it. 725 00:39:24,400 --> 00:39:24,800 Okay? 726 00:39:24,860 --> 00:39:25,280 Yes, sir? 727 00:39:25,940 --> 00:39:26,340 . 728 00:39:30,360 --> 00:39:30,760 Sure. 729 00:39:31,160 --> 00:39:31,560 . 730 00:39:32,820 --> 00:39:33,220 Sure. 731 00:39:35,100 --> 00:39:35,460 . 732 00:39:38,800 --> 00:39:43,060 Dynamic preprocessors in SNORT and normalization of traffic are what we're going to have to talk about out side, 733 00:39:43,180 --> 00:39:47,100 but yes, that's a very good solution, but extremely resource intensive. 734 00:39:47,640 --> 00:39:49,280 And, you know, again, someone with... 735 00:39:49,280 --> 00:39:51,120 It's got a whole server farm and all that kinda stuff. 736 00:39:51,220 --> 00:39:52,720 I just haven't seen it be effective. 737 00:39:53,320 --> 00:39:55,520 You know, and I'm not down in SNORT or any of those guys. 738 00:39:55,640 --> 00:39:56,980 I know Matt and all those guys are here. 739 00:39:57,160 --> 00:39:58,220 I'm not hating on it. 740 00:39:58,280 --> 00:39:59,340 I'm just saying, you know, really... 741 00:39:59,340 --> 00:40:01,480 I don't see customers who deploy it that way. 742 00:40:01,600 --> 00:40:02,500 And then when they do, 743 00:40:02,500 --> 00:40:07,660 do, they're dropping packets all the time, because it's just so much stuff to load all 744 00:40:07,660 --> 00:40:10,160 these dynamic preprocessors. Yes, sir? 745 00:40:25,360 --> 00:40:28,960 I personally haven't. I think the hottest thing right now for… 746 00:40:30,040 --> 00:40:37,060 Okay, so he was talking about Orms. I haven't tested it, so I can't really speak on that 747 00:40:37,060 --> 00:40:42,060 one. Can't really speak on that. I run into a lot of ASP, a lot of PHP, a lot of ASP.net. 748 00:40:42,480 --> 00:40:47,360 The thing that's starting to be new for my business is Ajax and web services. That's 749 00:40:47,360 --> 00:40:50,420 really kind of what I'm running into a lot of. There's new stuff. Yes, sir? 750 00:40:50,660 --> 00:40:55,100 If you get a reference for an input validation, something I can hand to developers 751 00:40:55,100 --> 00:40:58,040 and go, this is the kind of regular device we don't use? 752 00:40:58,540 --> 00:40:58,940 Yes, sir? 753 00:40:58,940 --> 00:41:03,240 Yeah. Are you on LinkedIn or something like that? 754 00:41:03,440 --> 00:41:03,460 Yeah. 755 00:41:03,700 --> 00:41:07,300 Email me. I'll definitely work with you on that. I've got a list of stuff that 756 00:41:07,300 --> 00:41:09,740 I've been giving to developers. That's actually something I should put in the slides, 757 00:41:09,780 --> 00:41:14,240 huh? That would, like, make sense, huh? I guess that passes the common sense test. 758 00:41:15,020 --> 00:41:15,500 Yes, sir? 759 00:41:15,840 --> 00:41:21,900 Is there a tool, like, for trying to figure out what makes or . 760 00:41:25,920 --> 00:41:28,920 Yes, there is. He's asking you, are you trying to figure out what makes or . 761 00:41:28,920 --> 00:41:32,560 Are there any tools for showing you what is in the way? There's a guy, his name is Sandro 762 00:41:32,560 --> 00:41:38,140 Gocci, and another guy named Wendell. Wendell works for Trustwave. Sandro works for, well, 763 00:41:38,180 --> 00:41:43,180 he owns Enable Security. And I've been helping with that. And they've got a project called 764 00:41:43,180 --> 00:41:48,200 WafWoof and WafFun. And it's on Google Code. I should throw that up there. And basically, 765 00:41:48,240 --> 00:41:53,140 what we're doing with that is we are fingerprinting web application firewalls. And now with WafFun, 766 00:41:53,300 --> 00:41:57,780 we're brute forcing web application firewall rule sets. So we'll just keep sending all 767 00:41:57,780 --> 00:42:01,700 these different types of requests and see what types of filtering that we get back 768 00:42:01,700 --> 00:42:06,900 to determine what the web application firewall rule set is. So that's definitely on the way. 769 00:42:07,700 --> 00:42:11,760 We need code monkeys who can help us with that. And we need people who don't mind us 770 00:42:11,760 --> 00:42:16,620 beating up on their website. So if you're like, hey, you know, we're running Imperva, 771 00:42:16,740 --> 00:42:21,420 you know, let us give it the beat down and we'll happily add that to the tool. Yes? 772 00:42:22,060 --> 00:42:22,500 . 773 00:42:27,780 --> 00:42:28,100 Sure. 774 00:42:32,260 --> 00:42:36,520 Okay. That's a pain in the butt. He's talking about escaping. So what's happening 775 00:42:36,520 --> 00:42:42,700 is you're doing your injection, and this is another one of those WTF ones. It'll, you'll 776 00:42:42,700 --> 00:42:48,420 say, or one in select user. And then right at your or, you'll see in the error message 777 00:42:48,420 --> 00:42:55,340 that it's added an extra tick and broken your query. Right. So that's, that's a, you know, 778 00:42:55,380 --> 00:42:57,160 I call that a little poor man's fix, a ghetto fix. 779 00:42:57,160 --> 00:42:59,940 That's a pain in the ass, but it is bypassable. 780 00:43:00,100 --> 00:43:05,680 You can use slashes to negate your tick, and you can use encoding. 781 00:43:06,020 --> 00:43:12,000 Or what's even better is what if you're injecting into an integer and in that case 782 00:43:12,000 --> 00:43:13,680 you don't need your tick at all. 783 00:43:14,500 --> 00:43:17,520 So that's really the two things that I'm using that help me in those cases. 784 00:43:17,520 --> 00:43:18,940 Do we have any other questions? 785 00:43:20,740 --> 00:43:21,380 Yes, sir. 786 00:43:24,600 --> 00:43:29,800 Yeah, yeah. 787 00:43:30,240 --> 00:43:34,960 Biggest things that I'm finding, he was talking about injecting into AJAX, JSON. 788 00:43:35,280 --> 00:43:38,500 Biggest things that I'm finding is you need something that's going to allow you to mess 789 00:43:38,500 --> 00:43:39,800 with that request in and of itself. 790 00:43:40,080 --> 00:43:45,800 So things like SOAP UI, great tool for that because you can actually generate, you know, 791 00:43:45,800 --> 00:43:47,360 the WSDL. 792 00:43:47,360 --> 00:43:49,340 And connect to this web service. 793 00:43:49,600 --> 00:43:50,780 You need things like that. 794 00:43:50,880 --> 00:43:53,240 You need to be able to break the entire request apart. 795 00:43:53,940 --> 00:43:58,860 And worst case scenario, you'll just track the request itself manually with something 796 00:43:58,860 --> 00:44:01,540 like Wireshark and then submit the request on its own. 797 00:44:02,000 --> 00:44:04,720 You know, it's really just a manual, tedious process to be honest. 798 00:44:06,680 --> 00:44:07,080 Okay. 799 00:44:07,180 --> 00:44:07,580 All right. 800 00:44:07,600 --> 00:44:08,280 We've got five minutes. 801 00:44:08,400 --> 00:44:09,060 A couple more questions. 802 00:44:10,940 --> 00:44:11,560 All right. 803 00:44:11,660 --> 00:44:12,200 Hey, guys. 804 00:44:12,240 --> 00:44:13,540 It's my first time speaking at DEF CON. 805 00:44:13,640 --> 00:44:14,720 I've been here like so many years. 806 00:44:14,920 --> 00:44:17,260 I really appreciate you guys hanging out with me. 807 00:44:17,320 --> 00:44:17,340 Thank you. 808 00:44:17,360 --> 00:44:17,960 Thanks a lot. 809 00:44:18,340 --> 00:44:18,780 .