1 00:00:09,700 --> 00:00:10,220 Closer? 2 00:00:10,540 --> 00:00:10,840 Yes! 3 00:00:11,280 --> 00:00:12,120 Alright, thanks. 4 00:00:13,040 --> 00:00:18,040 Web application security, I'm here to talk about, well first, I've been working web application 5 00:00:18,040 --> 00:00:19,380 security for about three years. 6 00:00:19,880 --> 00:00:24,080 Some of the things I've seen, how to get into different systems on a purely web application 7 00:00:24,080 --> 00:00:27,180 level, not the web server, more like the CGI's on top of it. 8 00:00:27,180 --> 00:00:30,440 So, I'll just briefly go over what a web application is. 9 00:00:30,760 --> 00:00:38,580 Web application is basically a CGI, they're message boards, web mail, guest books, auctions, 10 00:00:38,660 --> 00:00:44,160 online banking, stock quotes, the biggest companies run these things, they're everywhere. 11 00:00:44,380 --> 00:00:48,060 You see them, if you go on the web and do just about anything, chances are you're working 12 00:00:48,060 --> 00:00:48,840 on a web application. 13 00:00:49,100 --> 00:00:56,760 So what as security folks do we see and how to break them down, how to circumvent the 14 00:00:56,760 --> 00:00:57,080 security. 15 00:00:57,080 --> 00:00:59,680 So that's what I'll be covering. 16 00:01:02,080 --> 00:01:06,520 So the scope of the topic I'm going to try to keep to on the client side of the connection. 17 00:01:06,980 --> 00:01:11,380 Web application security does deal with the actual exploitation of the system, however 18 00:01:11,380 --> 00:01:15,000 RFP or many other people cover it a lot better than I do. 19 00:01:15,100 --> 00:01:19,380 So this is sticking to basic client level, attacking the browsers, attacking the cookies 20 00:01:19,380 --> 00:01:20,940 and things of that nature. 21 00:01:21,120 --> 00:01:25,980 However, if you guys have like system things you want to ask, also if you guys have any 22 00:01:25,980 --> 00:01:28,080 questions, anytime, go for it. 23 00:01:30,240 --> 00:01:41,680 So who uses web applications, eBay, Yahoo, Microsoft Hotmail, E-Trade, anybody got some 24 00:01:41,680 --> 00:01:41,820 more? 25 00:01:42,980 --> 00:01:43,720 All right. 26 00:01:46,780 --> 00:01:47,660 What was that? 27 00:01:51,420 --> 00:01:55,700 Right, there's a web application too, like say like Linksys routers and stuff like that. 28 00:01:55,800 --> 00:01:55,960 I don't know if you guys are familiar with that. 29 00:01:55,980 --> 00:01:56,940 That would be a web application. 30 00:02:02,740 --> 00:02:05,220 Right, at least like distance learning and things like that? 31 00:02:09,980 --> 00:02:10,960 Right, right, right. 32 00:02:16,520 --> 00:02:18,100 Or like All Advantage or something? 33 00:02:18,560 --> 00:02:19,000 Yeah. 34 00:02:19,660 --> 00:02:20,100 Yeah. 35 00:02:20,680 --> 00:02:21,120 Yeah. 36 00:02:21,500 --> 00:02:21,740 Yeah. 37 00:02:21,920 --> 00:02:21,960 Yeah. 38 00:02:23,260 --> 00:02:23,580 Yeah. 39 00:02:25,280 --> 00:02:25,660 Yeah. 40 00:02:28,180 --> 00:02:28,580 Yeah. 41 00:02:28,580 --> 00:02:29,200 All right. 42 00:02:29,200 --> 00:02:29,380 Yeah. 43 00:02:29,380 --> 00:02:29,600 Yeah. 44 00:02:29,600 --> 00:02:29,620 Yeah. 45 00:02:29,620 --> 00:02:32,400 I'm not sure exactly if I follow but if you have questions on it. 46 00:02:32,580 --> 00:02:32,980 So... 47 00:02:32,980 --> 00:02:33,600 ? 48 00:02:37,620 --> 00:02:38,220 Porn sites? 49 00:02:38,380 --> 00:02:38,540 Okay. 50 00:02:43,580 --> 00:02:44,040 Let's see. 51 00:02:45,080 --> 00:02:49,140 From a security standpoint, when you're auditing a system, or I'm attacking a system, generally 52 00:02:49,140 --> 00:02:52,420 there's three main types when I'm trying to profile a system as far as learning about 53 00:02:52,420 --> 00:02:53,160 it and what I'm seeing. 54 00:02:54,180 --> 00:02:55,640 There's the CGP. 55 00:02:55,640 --> 00:03:02,360 or the web applications that allow the user to input HTML and get an echo of HTML back 56 00:03:02,360 --> 00:03:06,420 where it means it might be filtered, but it still comes back as HTML. It's actually allowable. 57 00:03:06,520 --> 00:03:10,180 See it in chat rooms and message boards and things of that nature where it stays HTML. 58 00:03:10,660 --> 00:03:15,920 The other ones are the ones that do not allow HTML at all. The ones that strip it out blatantly 59 00:03:15,920 --> 00:03:22,880 for whatever reason, you know. We'll figure out why later. And the other ones are systems 60 00:03:22,880 --> 00:03:28,200 that use their own subset of HTML. I won't cover this too much, but you'll come across, like, 61 00:03:28,200 --> 00:03:31,140 chat rooms and message boards and stuff like that where you want to change the formatting 62 00:03:31,560 --> 00:03:36,560 of the web application. You have to use their own subset of tags. And there's also the ones 63 00:03:36,560 --> 00:03:43,060 I'll briefly cover on the ones that use Java-based engines to run it. The chat rooms, like, you know, 64 00:03:43,060 --> 00:03:46,920 Java-based client that connects to IRC or something like that. There's a lot of them 65 00:03:46,920 --> 00:03:50,200 out there, but I won't cover those too much because they're kind of their own embedded app. 66 00:03:52,140 --> 00:03:52,860 Q&A 67 00:03:52,860 --> 00:03:59,020 So, when you have a CGI, what kind of things are you exposed to by putting it up on the 68 00:03:59,020 --> 00:04:06,060 web where everyone can look at it? There's system exploits on the system itself. You 69 00:04:06,060 --> 00:04:11,520 can, there's browser redirects for the user. If you can find it and implement a CGI bug, 70 00:04:11,760 --> 00:04:15,980 you could throw an entire site to another site, say, a portal site. That would be kind 71 00:04:15,980 --> 00:04:21,200 of fun. There's page spoofing where we've seen instances 72 00:04:21,200 --> 00:04:21,880 of... 73 00:04:22,500 --> 00:04:22,840 Q&A 74 00:04:22,840 --> 00:04:27,600 of a bug being exploited in a system where the user gets a fake login page and then 75 00:04:27,600 --> 00:04:33,440 willingly give up their username and password. There's also theft of their cookie file on 76 00:04:33,440 --> 00:04:39,920 that domain, which could give up their authentication for that particular session. And there's also 77 00:04:40,640 --> 00:04:44,660 things you can, you can get user information and you can also track the user, even though 78 00:04:44,660 --> 00:04:49,800 it's not really your site. So, we can cover, anybody have a question so far? 79 00:04:50,060 --> 00:04:50,620 Q&A 80 00:04:50,620 --> 00:04:51,580 Q&A 81 00:04:51,580 --> 00:04:51,600 Q&A 82 00:04:51,600 --> 00:04:53,540 Well, I'm sorry, what was your question? 83 00:04:54,860 --> 00:04:55,820 No, Sure. 84 00:04:56,240 --> 00:04:57,160 Q&A 85 00:04:57,160 --> 00:04:57,420 No, I'm just 86 00:04:57,420 --> 00:05:02,600 Okay. First, we'll cover the systems that allow the HTML. 87 00:05:03,400 --> 00:05:03,920 Q&A 88 00:05:04,560 --> 00:05:05,320 Let's see here. 89 00:05:07,040 --> 00:05:13,880 Let's go over basic cookie security because lohot of sites, they use cookies for simple 90 00:05:13,880 --> 00:05:18,900 authentication and reauthentication as they move through the sites. Also, like, for shopping 91 00:05:18,900 --> 00:05:21,580 carts and things like that where the cookie actually keeps track of local procedence here. 92 00:05:21,600 --> 00:05:28,480 the actual session. Basic cookie security is a particular website should not have access 93 00:05:28,480 --> 00:05:33,220 to any cookies or only should have access to cookies for its particular domain. It shouldn't 94 00:05:33,220 --> 00:05:39,060 get access to cookies from another domain. However, nice people at Microsoft with that 95 00:05:39,060 --> 00:05:45,200 latest IE bug kind of destroyed that one. But basically that's the security implementation. 96 00:05:48,740 --> 00:05:57,120 Let's see. So let's say you found a wireless coverage. Okay, what is JavaScript now? What 97 00:05:57,120 --> 00:06:01,520 does JavaScript have access to? JavaScript, when you're implementing it to the system, 98 00:06:01,660 --> 00:06:05,460 into like a chat room or a message board or something like that, what does it actually 99 00:06:05,460 --> 00:06:09,240 have access to? Well, it has access to all the browser information. It has access to 100 00:06:09,240 --> 00:06:15,120 the IPs of the user, all the plug-ins and the paths to the plug-ins, just about every 101 00:06:15,120 --> 00:06:18,740 thing that they're using. It also has access to the cookie files and their environmental 102 00:06:18,740 --> 00:06:24,580 variables. The important one that it has access is to the domain that JavaScript is executing 103 00:06:24,580 --> 00:06:31,920 on. It has access to the cookies on that domain. Now, the trick would be for a supposed hacker 104 00:06:31,920 --> 00:06:37,620 or malicious user is to try to get the user's cookies off the domain into another domain. 105 00:06:37,880 --> 00:06:44,000 Okay, so I'll show you how a lot of how that's accomplished. How that is accomplished is 106 00:06:45,340 --> 00:06:52,300 if a user was to put HTML and JavaScript into a message board and you were to go read 107 00:06:52,300 --> 00:06:58,340 that message, the JavaScript would execute in your browser environment. Okay, you would 108 00:06:58,340 --> 00:07:04,820 be able to grab the domain cookie string and append it to some HTML mechanism that 109 00:07:04,820 --> 00:07:09,800 would send a get request off the domain to somewhere else. For instance, you could change 110 00:07:09,800 --> 00:07:15,100 the source of an image on that page and append it to another domain. You could change the 111 00:07:15,100 --> 00:07:20,700 URL to the end, so a get request would go to another server off the domain and you'd 112 00:07:20,700 --> 00:07:32,260 get the actual cookie string. I hope that's clear. Okay. Anybody have any questions on 113 00:07:32,260 --> 00:07:34,340 that so I know what I did to get clear? Yes. 114 00:07:38,400 --> 00:07:44,400 Okay, I guess the flaw would lie in JavaScript. 115 00:07:45,100 --> 00:08:05,020 Okay, if you're able to put JavaScript into a system and users would read it, okay, if a user would read it, the code would grab the string and say, make it real simple, open a new window with the attacker's domain and append it to it with a CGI and append the cookie data to the CGI variable. 116 00:08:05,020 --> 00:08:15,380 So, it would do a get request with the cookie value off of the CGI. So, basically, the whole cookie value gets passed to the CGI off the domain. 117 00:08:19,680 --> 00:08:31,220 It's for authentication. That seems to be one of the more widespread ones. If you're able to get the user's cookies, you can replace your cookie with theirs and in essence become them. 118 00:08:31,480 --> 00:08:35,000 So, if an active E-Trade user was... 119 00:08:35,020 --> 00:08:41,040 running, grab their cookie file, replace it with yours, and guess what? You get to trade stocks in their account. 120 00:08:44,540 --> 00:09:02,860 So, now, in a lot of systems, they'll have, I guess, HTML, JavaScript filters to try to clean up the problem, but still have to allow, I know, for whatever formatted reason, to keep HTML and JavaScript in the HTML itself for their users' features. 121 00:09:04,080 --> 00:09:04,520 So, 122 00:09:04,520 --> 00:09:05,000 so, 123 00:09:06,680 --> 00:09:09,620 I'll talk about some of the ways to get around it or how you test it. 124 00:09:10,720 --> 00:09:20,480 The basic, basic, basic tags you're doing, when you're running off CGI, what you don't want to allow into your system to be able for the user to pass into the message board are the following tags. 125 00:09:21,480 --> 00:09:25,200 You don't want to have the P tag go in. I'll explain these why later. 126 00:09:25,380 --> 00:09:32,760 You don't have the applet tag come in, the embed, script, layer, frameset, frame, HTML, body, style, meta, or object. 127 00:09:33,040 --> 00:09:34,660 There's a lot of them you have to filter. 128 00:09:35,260 --> 00:09:47,320 If you, like, for instance, if you allow the applet tag into the system, into a system that allows HTML, they can load a, whatever Java applet you want, and do whatever to them on somebody else's domain. 129 00:09:47,660 --> 00:09:58,280 You know, imagine if somebody, you know, like Microsoft Hotmail, you email somebody a message with a, with an applet, and it loads, and then you have access to their, everything on their domain with a Java applet. 130 00:09:58,560 --> 00:10:04,080 The same thing goes for, you know, the style tag, embed, anything of that nature. 131 00:10:04,160 --> 00:10:05,000 So, those tags. 132 00:10:05,020 --> 00:10:07,360 You actually have to strip out, even though you're allowing HTML. 133 00:10:07,720 --> 00:10:13,220 Nothing good can happen when you're, when you're using those tags. 134 00:10:17,440 --> 00:10:24,220 So, the script tag, the P tag, there's a known, there's a known exploit that's been posted to BugTrack. 135 00:10:24,340 --> 00:10:33,280 I think Georgie Ganinski found it, where you can actually add a VB expression that actually execute JavaScript without actually having any JavaScript. 136 00:10:33,280 --> 00:10:36,960 Looking things in it, so nobody knows really the filter for it. 137 00:10:37,000 --> 00:10:38,620 You'll find it on BugTrack and things like that. 138 00:10:40,320 --> 00:10:46,320 Which brings right into the, the things that you can check in your own CGI's or other people's CGI's. 139 00:10:46,520 --> 00:10:46,940 Thank you. 140 00:10:51,740 --> 00:10:52,620 I'm sorry. 141 00:10:53,280 --> 00:10:54,500 I just want to comment. 142 00:10:54,640 --> 00:11:02,340 One of the original reasons why URL came out as a philosophy or a tool was that you had one address. 143 00:11:03,280 --> 00:11:08,900 Pretty much the system for this is the request you're giving to the server, then it's going to give you something back. 144 00:11:09,100 --> 00:11:09,180 Right. 145 00:11:09,400 --> 00:11:17,920 And we've seen on four of those things, and cookies, that this constraint is everything you need for messages to get into the URL, has been violated. 146 00:11:18,840 --> 00:11:30,620 Do you think that there needs to be some kind of use of it for browsers that allows us to continue to see what we're sending, what we're providing, and perhaps get that information accessible? 147 00:11:31,120 --> 00:11:32,300 The question was, 148 00:11:32,300 --> 00:11:45,660 do I think that more security should be in place for, say, forms of values being passed to the CGR to the web server, as far as, should it show you what you're actually sending them? 149 00:11:45,780 --> 00:11:49,760 I think yes, but no one's seen it so far. 150 00:11:49,820 --> 00:11:53,400 Basically, I guess the idea of the web is to try to make it user friendly, but yeah, I think so. 151 00:11:54,340 --> 00:11:59,680 I'd like to be able to know immediately what, you know, cookie data I'm sending without actually having to look in the cookie file. 152 00:12:00,180 --> 00:12:01,140 That'd be my preference. 153 00:12:01,340 --> 00:12:01,800 Thank you. 154 00:12:03,680 --> 00:12:09,440 So, when you're testing a system, if you're actually auditing your own systems or somebody else's systems, what can you actually test against? 155 00:12:09,540 --> 00:12:13,940 What actually are the exploits to get past the, I guess, the string filters and things like that? 156 00:12:14,160 --> 00:12:19,540 One very simple one is the script tag, if anybody's, you know, everybody should be familiar with HTML and JavaScript. 157 00:12:19,700 --> 00:12:23,560 The actual script tag, when you put an expression in there, you submit it to the system. 158 00:12:23,640 --> 00:12:31,900 You can even try it like on, like a lot of search engines will allow you to put, right into their search function, put a script tag in, and it brings 159 00:12:31,900 --> 00:12:33,380 back a script tag and it executes. 160 00:12:33,580 --> 00:12:35,360 Major no-no to have on your major site. 161 00:12:37,100 --> 00:12:42,620 Another way to, so what major sites do is they, they filter for the script tag itself. 162 00:12:42,840 --> 00:12:45,800 They'll strip it out, replace it with whatever. 163 00:12:45,980 --> 00:12:50,660 They'll strip it out completely or replace it with something, which is a good tactic and you should all use. 164 00:12:52,660 --> 00:13:01,880 Another way to get around that would be to, when you're submitting the, to the search engine itself a string, instead of just one single string, and then you have a string, it'll take that string out. 165 00:13:01,880 --> 00:13:05,580 singular line, throw a carriage return in it, because it's actually a character, and 166 00:13:05,580 --> 00:13:07,060 it will actually, a lot of times, beat. 167 00:13:07,260 --> 00:13:11,100 They won't escape the carriage return, so it will actually beat the filters and still 168 00:13:11,100 --> 00:13:13,560 get by and echo back. 169 00:13:17,080 --> 00:13:17,600 Let's see. 170 00:13:18,160 --> 00:13:19,020 Let me show you. 171 00:13:35,500 --> 00:13:37,380 Okay, you see the script tag way up there? 172 00:13:37,680 --> 00:13:39,340 That's the most basic one. 173 00:13:40,020 --> 00:13:43,540 Try that into a lot of places, and that will work. 174 00:13:44,400 --> 00:13:48,760 So basically, what you can do is, if you know somebody's active on a session, say, like 175 00:13:48,760 --> 00:13:52,060 anywhere, like on Hotmail or something like that, and you email them, I'm not saying it 176 00:13:52,060 --> 00:13:59,400 works in Hotmail, but you email them an HTML mail with the script tag in it, and it executes, 177 00:13:59,560 --> 00:14:01,860 you have access to everything that Hotmail actually has. 178 00:14:01,880 --> 00:14:02,400 It has access to. 179 00:14:04,380 --> 00:14:07,400 The second one from the top is what I call image sourcing. 180 00:14:16,120 --> 00:14:22,640 Basically, what the idea is, the JavaScript colon and then the JavaScript expression will 181 00:14:22,640 --> 00:14:25,520 actually execute inside of Netscape and run. 182 00:14:26,000 --> 00:14:29,620 It doesn't actually look like JavaScript, but it actually works. 183 00:14:29,920 --> 00:14:31,800 So sites will have to. 184 00:14:32,940 --> 00:14:38,180 Look for the JavaScript keyword and, like, separate it somehow or do whatever they want 185 00:14:38,180 --> 00:14:42,080 to do so it doesn't execute anything other than what it originally looks like before 186 00:14:42,080 --> 00:14:43,320 it gets echoed back to the user. 187 00:14:43,420 --> 00:14:44,060 It has to be done. 188 00:14:46,020 --> 00:14:50,780 And the ones below it were actually Netscape's code names for JavaScript while they were 189 00:14:50,780 --> 00:14:51,400 developing it. 190 00:14:51,500 --> 00:14:58,740 Mocha and LiveScript in replace of JavaScript will also work, which is quite nice of Netscape 191 00:14:58,740 --> 00:14:59,520 not to tell us about. 192 00:15:01,140 --> 00:15:07,280 So basically those, in all systems that allow HTML, have to strip those out before they 193 00:15:07,280 --> 00:15:10,240 get echoed back to the user, otherwise, you know, security breakdown again. 194 00:15:10,820 --> 00:15:13,600 The singular line break below that is what I was talking about before. 195 00:15:13,960 --> 00:15:16,720 That will still execute in Netscape and beat a lot of filters. 196 00:15:19,080 --> 00:15:23,980 The multi-line break, so, you know, trying these against systems, they'll get smart and 197 00:15:23,980 --> 00:15:26,260 wise up and start escaping the carriage returns. 198 00:15:26,500 --> 00:15:28,640 Well, you can multi-carriage return it and it still works. 199 00:15:28,800 --> 00:15:29,500 So you can do that. 200 00:15:29,500 --> 00:15:31,000 You can escape the whole thing. 201 00:15:31,360 --> 00:15:35,680 So we begin to start to see the thing where HTML and JavaScript start not to look like 202 00:15:35,680 --> 00:15:36,480 HTML and JavaScript. 203 00:15:36,660 --> 00:15:38,760 It looks visually broken, but it still works. 204 00:15:38,780 --> 00:15:42,260 So you still have to, you know, clean it up before it gets echoed back to the user. 205 00:15:43,500 --> 00:15:50,080 The one just below it, HTML Entity String Break, this is one that's like an HTML entity 206 00:15:50,080 --> 00:15:53,580 of just like a weird character you want to display. 207 00:15:54,400 --> 00:15:55,800 I'm sorry, you have a question? 208 00:16:04,060 --> 00:16:04,460 Yeah. 209 00:16:08,260 --> 00:16:10,640 I haven't seen any commercially available ones. 210 00:16:10,780 --> 00:16:14,460 Most companies that I deal with have been writing their own for their own developers. 211 00:16:14,720 --> 00:16:19,020 Which means that they want to strip like things like this out. 212 00:16:19,200 --> 00:16:23,100 And they'll write their own libraries and have all user input variables filter through 213 00:16:23,100 --> 00:16:23,340 them. 214 00:16:23,580 --> 00:16:27,580 And then they can use them, or they'll just blatantly rip out every instance of HTML. 215 00:16:27,640 --> 00:16:29,320 I haven't seen any commercial products that do this. 216 00:16:29,380 --> 00:16:29,480 So I'm not sure what you're talking about. 217 00:16:29,500 --> 00:16:31,500 everybody's kind of on their own until someone figures one out. 218 00:16:33,860 --> 00:16:44,400 The HTML entity string, the ampersand, pound sign, zero, nine, semicolon, it's just a, 219 00:16:44,540 --> 00:16:49,600 I think that's like a tab or something in ASCII, and the whole ASCII set is available 220 00:16:49,600 --> 00:16:54,180 in Netscape so you can make all the weird characters show up, but I found that that 221 00:16:54,180 --> 00:17:01,160 particular string, nine through 12, actually breaks it up and will still execute, so it'll 222 00:17:01,160 --> 00:17:02,980 bypass the implemented filters once again. 223 00:17:03,220 --> 00:17:05,420 So things like that will work. 224 00:17:05,580 --> 00:17:10,100 So basically what happens is when you throw that into the system and you view source on 225 00:17:10,100 --> 00:17:15,560 it, that will actually not look like that, but it'll be separated but still work. 226 00:17:19,460 --> 00:17:23,700 All these require the 3-minute lifespan, what if they just strip out the 3-minute? 227 00:17:23,700 --> 00:17:28,540 Right, that's the most effective way I've seen so far on a system that does not want 228 00:17:28,540 --> 00:17:29,880 to allow HTML into the system. 229 00:17:30,000 --> 00:17:32,760 You rip out the less than and greater than signs and also the quotes. 230 00:17:33,760 --> 00:17:37,460 And you lose all HTML functionality, yet you get all your security back. 231 00:17:37,980 --> 00:17:43,480 But you can still, if the application allows you to insert an image, you can still 232 00:17:43,480 --> 00:17:44,960 be able to use the other jobs? 233 00:17:45,100 --> 00:17:45,660 Yes, you will. 234 00:17:46,440 --> 00:17:48,960 So, you know, most chat rooms, most of the boards do allow that. 235 00:17:49,660 --> 00:17:50,060 Yeah. 236 00:17:51,640 --> 00:17:52,860 The one just below it. 237 00:17:53,260 --> 00:17:53,660 Yeah. 238 00:17:53,660 --> 00:17:53,680 Yeah. 239 00:17:53,700 --> 00:17:54,440 The HTML entity. 240 00:17:56,360 --> 00:17:59,820 I did have to figure out why this works, but I found it one day and it works. 241 00:18:02,180 --> 00:18:09,100 The ampersand, I guess, open curly brace, and the syntax has to be perfect for it to 242 00:18:09,100 --> 00:18:10,400 work, and it only works in Netscape. 243 00:18:11,920 --> 00:18:16,720 The ampersand curly brace open has to be filtered for, otherwise JavaScript will execute any 244 00:18:16,720 --> 00:18:17,920 expression that you throw in there. 245 00:18:18,660 --> 00:18:22,800 So it might be a good one to remember because it's posted out there. 246 00:18:22,800 --> 00:18:24,420 But it's hard to find. 247 00:18:28,920 --> 00:18:29,600 Oh, sure. 248 00:18:30,040 --> 00:18:32,120 She asked me to repeat the question before I answer. 249 00:18:34,240 --> 00:18:34,700 Sorry. 250 00:18:40,660 --> 00:18:41,120 Okay. 251 00:18:42,700 --> 00:18:50,420 When I'm auditing a system, what I'm generally looking for is I'm looking at the URL, I'm 252 00:18:50,420 --> 00:18:52,600 looking at all the source code in the web page. 253 00:18:52,600 --> 00:18:54,120 Looking at all the form values. 254 00:18:54,260 --> 00:18:56,000 Looking at all the link URL values. 255 00:18:56,120 --> 00:18:58,840 Anything that has a CGI and all the variables to it. 256 00:18:58,960 --> 00:19:00,280 And seeing what values it's taking. 257 00:19:00,340 --> 00:19:01,100 If it's taking any. 258 00:19:01,740 --> 00:19:04,960 And, you know, like shopping carts are notorious for this. 259 00:19:05,100 --> 00:19:07,800 When you're buying an item, it'll have price equals. 260 00:19:08,840 --> 00:19:09,680 And then you submit. 261 00:19:10,240 --> 00:19:10,600 Right? 262 00:19:10,760 --> 00:19:14,760 So what stops me from, you know, I'll buy like my, you know, like Sony Viya here from, 263 00:19:14,860 --> 00:19:15,540 you know, 3,000. 264 00:19:15,580 --> 00:19:16,540 I'll just make it five bucks. 265 00:19:19,080 --> 00:19:21,600 Many, many sites put this in there. 266 00:19:21,720 --> 00:19:22,580 And trust me. 267 00:19:22,580 --> 00:19:22,600 I'll pay them right? 268 00:19:22,600 --> 00:19:23,520 That's the value that I give it. 269 00:19:23,540 --> 00:19:25,220 And I bought a laptop for five dollars. 270 00:19:25,460 --> 00:19:25,720 So. 271 00:19:26,400 --> 00:19:27,520 How do you build that? 272 00:19:29,000 --> 00:19:30,160 I didn't get that question. 273 00:19:31,420 --> 00:19:32,480 How do you build that? 274 00:19:33,220 --> 00:19:33,900 Take the fifth. 275 00:19:37,640 --> 00:19:38,880 Also, all the strings. 276 00:19:39,220 --> 00:19:43,480 A lot of times developers will put strings inside of URL variables and stuff that you 277 00:19:43,480 --> 00:19:46,380 actually get thrown up on the page, for instance, like ads and things like that. 278 00:19:46,960 --> 00:19:48,480 So a lot of times they don't filter those. 279 00:19:48,580 --> 00:19:49,940 So you might want to play with the strings also. 280 00:19:50,180 --> 00:19:52,440 And see what actual variables are getting filtered. 281 00:19:52,560 --> 00:20:01,300 what aren't. You can change it to anything. Change it to JavaScript, HTML, put a negative 282 00:20:01,300 --> 00:20:10,780 999 in there and crash the CGI. Many, many things. Also, what I had to mention is many 283 00:20:11,680 --> 00:20:15,300 CGI's, when they're doing authentication for the users that aren't using cookies, they'll 284 00:20:15,300 --> 00:20:20,540 use a login equals. Like for portfolios and things like that. So if you actually just 285 00:20:20,540 --> 00:20:23,900 change the login to a different username, you'll get their portfolio. Don't do this. 286 00:20:25,080 --> 00:20:33,600 People are looking. Now, basically you've seen a lot of the exploits. There are more. 287 00:20:34,520 --> 00:20:39,540 But as of yet, no one's put out a good security auditor yet. I've heard rumor of them, but 288 00:20:39,540 --> 00:20:48,760 haven't seen any that good. So how to protect and defend. Do not trust any of the input 289 00:20:48,760 --> 00:20:50,400 that the user is going to give you. 290 00:20:50,540 --> 00:20:54,740 From the website, I don't care if it's the browser information, their username and password, 291 00:20:54,900 --> 00:20:59,480 anything. Do not trust anything that they're giving you. Check everything, strip everything. 292 00:21:00,400 --> 00:21:05,740 Because people are doing this with a lot of free time. And testing every single value 293 00:21:05,740 --> 00:21:09,400 they could put into every variable and just seeing what your CGI does. So you have to 294 00:21:09,400 --> 00:21:17,100 account for everything. One rule of thumb when you're developing a CGI, never, ever, 295 00:21:17,140 --> 00:21:20,520 ever allow JavaScript, Java, or any plug-in. 296 00:21:21,940 --> 00:21:28,740 So that means if your users are able to put JavaScript, Java, or a plug-in on your system, 297 00:21:28,820 --> 00:21:33,280 you've got to disallow it because it will do very bad things. For instance, Flash has 298 00:21:33,280 --> 00:21:39,020 JavaScript in it as far as a sub-language with lingo. And they have full JavaScript 299 00:21:39,020 --> 00:21:42,540 functionality from inside of Flash. So you might think, okay, I've got everything all 300 00:21:43,220 --> 00:21:46,680 blocked and you're allowing them to use Flash. And all of a sudden, no. Your whole entire 301 00:21:46,680 --> 00:21:48,360 user base shifted to somewhere else. 302 00:21:52,200 --> 00:21:59,000 Also, if you're really security paranoid and you're running, say, business.com, and 303 00:21:59,000 --> 00:22:02,520 you have to allow some of these things to go through and you're really paranoid that 304 00:22:02,520 --> 00:22:05,580 you're not going to get everything right, like say for your message board or your chat 305 00:22:05,580 --> 00:22:09,520 room, you want to keep pretty good security for the cookies themselves, host it on a different 306 00:22:09,520 --> 00:22:14,460 top-level domain. Instead of business.com, go through business.net. That's the way all 307 00:22:14,460 --> 00:22:19,420 your .com cookies are held safe for the moment until you move them back over to business.com. 308 00:22:19,420 --> 00:22:22,160 It's a method I've seen work pretty effective in the past. 309 00:22:25,100 --> 00:22:30,720 Again, somebody asked the question how to defend. If you're in a workload type environment, 310 00:22:30,820 --> 00:22:38,320 create libraries to do HTML stripping that all your developers can use and funnel all 311 00:22:38,320 --> 00:22:42,540 the user input variables through and get them back out so they know all the variables are 312 00:22:42,540 --> 00:22:47,100 safe to use, both in the user's environment and out of the user's environment. 313 00:22:47,440 --> 00:22:47,500 Okay. 314 00:22:49,420 --> 00:22:54,160 Also, one more authentication scheme that I've seen a lot of people use is when you're 315 00:22:54,160 --> 00:22:58,520 doing cookie-based authentication and you're doing a session ID with a, you know, you're 316 00:22:58,520 --> 00:23:02,420 hashing the username and password with a random variable or something, you can actually 317 00:23:03,120 --> 00:23:08,460 rehash another variable. Let's say I've got a form submittal. You put a hidden variable 318 00:23:08,460 --> 00:23:13,080 inside the form that you're submitting to the CGI with a hash of their cookie, okay? 319 00:23:13,180 --> 00:23:18,560 That means no one else is going to be able to submit the form off of your site. I don't 320 00:23:18,560 --> 00:23:22,460 know if that's quite clear. It's kind of like tagging the web page of, you know, sorts. 321 00:23:24,460 --> 00:23:33,340 So, well, let's say I'll use Hotmail, for instance. Let's say they're doing a session-based 322 00:23:33,340 --> 00:23:41,360 ID, session-based authentication, and you don't want people logging into Hotmail from 323 00:23:41,360 --> 00:23:48,060 places other than Hotmail. So, what you would theoretically do is run a hash on their 324 00:23:48,540 --> 00:23:54,940 cookie that's in their system and tag it as a hidden variable inside your login page. 325 00:23:55,160 --> 00:23:59,360 That way, if you move it to somewhere else and try to submit again with different values, 326 00:23:59,640 --> 00:24:02,620 it will fail because the hash won't match. 327 00:24:08,520 --> 00:24:11,160 The hash has to be server-generated otherwise it defeats the purpose. 328 00:24:20,560 --> 00:24:21,000 Right. 329 00:24:23,780 --> 00:24:29,840 Yeah, the question was you'll pass different or multiple variables off pages as you go 330 00:24:29,840 --> 00:24:33,420 through, so it's important to check every single variable as you're going through the 331 00:24:33,420 --> 00:24:39,220 site. So, basically, you have to crawl the whole site and be thorough. Any other questions? 332 00:24:39,520 --> 00:24:39,680 Oh. 333 00:25:04,480 --> 00:25:09,140 The question was, would I feel that this is a problem of, I guess, lazy developers 334 00:25:09,140 --> 00:25:13,260 not looking, doing correct string matches or not being very security conscious in general? 335 00:25:14,120 --> 00:25:17,960 Basically, I would say yes and no. One, I would say yes, they're lazy programmers. 336 00:25:17,960 --> 00:25:23,420 They're not looking at BugTrack or the other sources for the known exploits. Two, no, 337 00:25:23,480 --> 00:25:26,580 they aren't because they don't know them all. So, they can't filter for something 338 00:25:26,580 --> 00:25:27,540 that they didn't know existed. 339 00:25:35,200 --> 00:25:43,360 Yes, it does. That's why HTML email pretty much exists. I'm sorry. He asked, does HTML 340 00:25:43,360 --> 00:25:47,840 mail execute JavaScript? Yeah, it can. That's, you know, you'll see in the news all those 341 00:25:47,960 --> 00:25:50,660 HTML mail exploits and stuff like that. That's that. 342 00:25:53,140 --> 00:25:58,180 Those I haven't played with firsthand, but problems with those probably could and do 343 00:25:58,180 --> 00:26:01,140 exist. So, any other questions? 344 00:26:02,540 --> 00:26:05,520 Are there any tools out there that help you ? 345 00:26:08,820 --> 00:26:12,740 I know of, like, a couple, but I wouldn't classify them as good yet. They're looking 346 00:26:12,740 --> 00:26:17,940 for, basically, the tools that I've seen are looking on a, they're looking for, like, 347 00:26:17,940 --> 00:26:22,920 auto-auditing commercially available applications. Most bigger systems where these are going 348 00:26:22,920 --> 00:26:29,060 to be needed the most are not something that you can write an immediate big software package 349 00:26:29,060 --> 00:26:33,720 for because they're proprietary and you have to do it manually now unless somebody comes 350 00:26:33,720 --> 00:26:35,500 up with something pretty good, and I haven't seen that yet. 351 00:26:48,400 --> 00:26:48,840 . 352 00:26:59,120 --> 00:27:04,720 No, basically, you would, his question was about how to, you know, defeating the hashing. 353 00:27:04,820 --> 00:27:08,440 I guess it wasn't quite clear on that. You hash a variable, like a random, something 354 00:27:08,440 --> 00:27:14,760 random on the page and also part of their session with only a hash that you possess. 355 00:27:14,900 --> 00:27:16,480 You have to keep your hash kind of, you know, private. 356 00:27:16,480 --> 00:27:21,780 And do it that way. Not, you have to use something on the server side that only the 357 00:27:21,780 --> 00:27:27,100 user has and the site has. So it has to be done well. I'd probably not explain it well 358 00:27:27,100 --> 00:27:31,460 as, like, applied cryptography would, but you can hash the page and have it work well. 359 00:27:32,700 --> 00:27:33,100 . 360 00:27:37,180 --> 00:27:41,340 Well, that's the idea. That's the idea of hashing. You can't go backwards. At least 361 00:27:41,340 --> 00:27:43,160 I can't. . 362 00:27:45,780 --> 00:27:46,940 Any other questions? Go ahead. 363 00:27:48,300 --> 00:27:48,700 . 364 00:27:51,560 --> 00:27:58,020 If you turn off the, the, the, his question was if you turn off JavaScript and Java, 365 00:27:58,160 --> 00:28:02,600 will the image sourcing one work? No, it won't. All JavaScript is pretty much turned 366 00:28:02,600 --> 00:28:05,960 off, but that makes for a pretty lousy web environment and everything breaks on the 367 00:28:05,960 --> 00:28:11,860 web as those who run it have seen. Any other questions? 368 00:28:12,740 --> 00:28:13,140 . 369 00:28:14,160 --> 00:28:17,100 All right, I guess that's it. Thank you. Oh, okay. 370 00:28:17,820 --> 00:28:18,260 . 371 00:28:25,520 --> 00:28:30,200 How hard is it to, what, how I feel about crypting the browser session and or the data 372 00:28:30,200 --> 00:28:40,000 being passed, right? I would say I would like it all encrypted. However, I guess the, 373 00:28:41,100 --> 00:28:44,860 the RSA licensing gets pretty expensive from time to time. I mean, you have to get a license 374 00:28:44,860 --> 00:28:47,860 for every single server, so it gets pretty expensive. That's why they only do it on, 375 00:28:48,300 --> 00:28:51,740 you know, purchases and stuff like that. But I would like to see all of it, but we 376 00:28:51,740 --> 00:28:52,200 don't have it yet. 377 00:28:53,900 --> 00:28:54,220 . 378 00:28:55,760 --> 00:28:56,080 . 379 00:28:56,080 --> 00:28:56,140 . 380 00:28:56,700 --> 00:28:57,020 . 381 00:28:58,380 --> 00:28:58,700 . 382 00:28:59,500 --> 00:28:59,820 . 383 00:29:01,000 --> 00:29:01,320 . 384 00:29:01,320 --> 00:29:01,380 . 385 00:29:01,380 --> 00:29:01,400 . 386 00:29:01,400 --> 00:29:01,420 . 387 00:29:01,420 --> 00:29:01,640 . 388 00:29:06,120 --> 00:29:06,440 . 389 00:29:06,440 --> 00:29:06,860 . 390 00:29:11,060 --> 00:29:11,100 . 391 00:29:23,160 --> 00:29:23,200 . 392 00:29:23,640 --> 00:29:23,680 . 393 00:29:25,520 --> 00:29:25,560 . 394 00:29:25,560 --> 00:29:25,580 . 395 00:29:25,740 --> 00:29:25,780 . 396 00:29:25,780 --> 00:29:25,860 . 397 00:29:26,000 --> 00:29:26,040 . 398 00:29:26,040 --> 00:29:26,060 . 399 00:29:30,120 --> 00:29:30,160 . 400 00:29:30,220 --> 00:29:30,260 . 401 00:29:30,780 --> 00:29:30,820 . 402 00:29:30,820 --> 00:29:30,840 . 403 00:29:30,840 --> 00:29:30,860 . 404 00:29:30,860 --> 00:29:30,880 . 405 00:29:30,880 --> 00:29:30,900 . 406 00:29:30,900 --> 00:29:30,920 . 407 00:29:30,920 --> 00:29:30,960 . 408 00:29:30,960 --> 00:29:30,980 . 409 00:29:30,980 --> 00:29:31,000 . 410 00:29:31,000 --> 00:29:31,020 . 411 00:29:31,020 --> 00:29:31,040 . 412 00:29:31,040 --> 00:29:31,060 . 413 00:29:31,060 --> 00:29:31,080 . 414 00:29:31,080 --> 00:29:31,100 . 415 00:29:33,120 --> 00:29:33,160 . 416 00:29:33,440 --> 00:29:33,480 . 417 00:29:33,480 --> 00:29:35,380 is he could claim to be whoever he wants 418 00:29:35,380 --> 00:29:37,120 and there's no checking on the client side end. 419 00:29:37,520 --> 00:29:38,480 So, yeah, you're right. 420 00:29:40,060 --> 00:29:42,760 Also, actually, I didn't get to ask Jennifer Granik one question. 421 00:29:42,840 --> 00:29:43,680 I don't know if she's here or not, 422 00:29:43,760 --> 00:29:47,700 but basically I wonder if viewing the source of a web page 423 00:29:47,700 --> 00:29:50,700 would fall under unauthorized access of a source code 424 00:29:50,700 --> 00:29:51,580 of an interpreted page 425 00:29:55,240 --> 00:29:59,620 or, I guess, fall under reverse engineering of the DMCA. 426 00:30:01,040 --> 00:30:03,100 Would viewing the source code of a web page fall under that? 427 00:30:03,480 --> 00:30:03,920 I don't know. Maybe. 428 00:30:08,500 --> 00:30:09,720 Unless there's any other question. 429 00:30:09,840 --> 00:30:10,200 I guess I... 430 00:30:10,200 --> 00:30:11,180 Oh, I'm sorry. 431 00:30:12,340 --> 00:30:15,840 Yeah, I'm a government employee and I put out a website 432 00:30:15,840 --> 00:30:18,200 and a bunch of users are saying, 433 00:30:18,460 --> 00:30:21,260 I'm not using your website because you're using it on the script 434 00:30:21,260 --> 00:30:21,980 and it's my inside. 435 00:30:22,440 --> 00:30:22,900 Okay. 436 00:30:23,020 --> 00:30:25,420 Besides stealing cookies, is there anything I'm missing 437 00:30:25,420 --> 00:30:27,380 that I don't understand about this? 438 00:30:27,640 --> 00:30:29,300 Well, let's say, I guess, 439 00:30:29,840 --> 00:30:32,820 some people want to direct traffic away from your site to somewhere else 440 00:30:32,820 --> 00:30:33,460 and they put... 441 00:30:33,480 --> 00:30:34,320 If you post something on your site, 442 00:30:34,380 --> 00:30:36,620 that means all your visitors that go to your site 443 00:30:36,620 --> 00:30:38,060 get forwarded to somewhere else. 444 00:30:38,500 --> 00:30:40,040 That would be one other thing. 445 00:30:40,500 --> 00:30:41,920 If they can't put... 446 00:30:42,660 --> 00:30:46,660 Well, if you're the only one posting the information on your site, 447 00:30:46,760 --> 00:30:47,420 then you're pretty much clean. 448 00:30:47,480 --> 00:30:49,000 That means everything that you do is your fault. 449 00:30:49,440 --> 00:30:49,760 So... 450 00:30:51,900 --> 00:30:52,440 All right. 451 00:30:53,240 --> 00:30:53,640 Yeah. 452 00:30:56,540 --> 00:31:03,280 Is there a way to hide or to sort of... 453 00:31:05,060 --> 00:31:08,360 disguise the URL of the page that you're visiting 454 00:31:08,360 --> 00:31:10,060 in the location bar 455 00:31:10,060 --> 00:31:12,420 by using sort of a parent frame on that? 456 00:31:14,300 --> 00:31:15,560 The parent frame is... 457 00:31:15,560 --> 00:31:18,420 He's asking a way to hide the URL if I know any ways. 458 00:31:18,680 --> 00:31:20,760 I haven't seen any really good ways to do it. 459 00:31:20,820 --> 00:31:25,260 I say the parent frame technique works quite well. 460 00:31:25,400 --> 00:31:27,340 I haven't seen any other really good ways. 461 00:31:27,560 --> 00:31:29,120 I have seen... 462 00:31:30,840 --> 00:31:32,640 Begin to load a page and then stop the load. 463 00:31:32,640 --> 00:31:35,900 And then he kind of gets a URL that way. 464 00:31:35,960 --> 00:31:37,200 But I haven't seen any really good ways. 465 00:31:37,240 --> 00:31:37,800 That's kind of weak. 466 00:31:56,580 --> 00:31:58,940 The question was, you can actually... 467 00:31:58,940 --> 00:32:00,620 Yeah, I forgot to mention that one. 468 00:32:00,620 --> 00:32:01,180 It's a pretty good one. 469 00:32:02,640 --> 00:32:06,120 A lot of, I guess, browsers and search engines 470 00:32:06,120 --> 00:32:09,480 will take not only ASCII as a domain name, 471 00:32:09,580 --> 00:32:10,300 but you can actually... 472 00:32:10,300 --> 00:32:11,260 Or, like, IP addresses. 473 00:32:11,520 --> 00:32:14,440 You can actually re-encode them in URL encode 474 00:32:14,440 --> 00:32:16,320 and get those to work. 475 00:32:16,400 --> 00:32:17,360 Or you can get Hex to work. 476 00:32:17,440 --> 00:32:19,140 I've seen Okta work and everything like that. 477 00:32:19,360 --> 00:32:23,040 So those are actually good filter-passing mechanisms. 478 00:32:30,420 --> 00:32:31,500 The question was, 479 00:32:32,060 --> 00:32:32,500 using... 480 00:32:32,640 --> 00:32:33,080 Hidden iframes. 481 00:32:33,220 --> 00:32:33,580 Yeah. 482 00:32:34,260 --> 00:32:35,060 Hidden iframes. 483 00:32:35,120 --> 00:32:36,640 You can use hidden layers and do it that way. 484 00:32:36,760 --> 00:32:37,360 Lots of ways. 485 00:32:38,080 --> 00:32:38,880 So, yeah. 486 00:32:39,020 --> 00:32:42,260 Again, don't allow people inputting layers on your page. 487 00:32:42,580 --> 00:32:43,660 Bad, bad, bad news. 488 00:32:48,180 --> 00:32:48,700 Any more? 489 00:32:48,840 --> 00:32:49,500 Oh, okay. 490 00:32:52,660 --> 00:32:53,680 The P tag. 491 00:32:53,880 --> 00:32:54,400 I can't... 492 00:32:54,400 --> 00:32:56,260 Sorry, I don't have, like, 493 00:32:56,340 --> 00:32:58,440 the perfect syntax memorized to type it out for you. 494 00:32:58,620 --> 00:33:00,720 However, there's a... 495 00:33:00,720 --> 00:33:01,660 I guess in VBScript, 496 00:33:01,740 --> 00:33:02,300 there's a left... 497 00:33:02,300 --> 00:33:03,640 left colon expression. 498 00:33:04,020 --> 00:33:05,580 You can search for that under the P tag. 499 00:33:05,760 --> 00:33:08,600 I think Georgie Ganinsky on his site has it posted. 500 00:33:08,840 --> 00:33:11,640 But it's a VBScript expression that will execute. 501 00:33:12,440 --> 00:33:14,700 Also, style has one similar like that. 502 00:33:14,780 --> 00:33:16,540 On a style tag, you have type equals, 503 00:33:16,660 --> 00:33:19,060 and you can put JavaScript and stuff in between it, 504 00:33:19,080 --> 00:33:20,900 in between the beginning and style tags. 505 00:33:21,240 --> 00:33:23,600 And, once again, JavaScript's into the system. 506 00:33:24,300 --> 00:33:25,580 JavaScript's pretty much a cockroach. 507 00:33:25,600 --> 00:33:26,320 You have to exterminate it. 508 00:33:27,040 --> 00:33:27,440 Okay. 509 00:33:32,820 --> 00:33:33,400 I'm sorry. 510 00:33:33,500 --> 00:33:33,720 I missed that. 511 00:33:36,380 --> 00:33:38,520 I really don't know XML all that well, 512 00:33:38,580 --> 00:33:39,820 but from what I read from the specs, 513 00:33:40,000 --> 00:33:40,860 it seems it's... 514 00:33:40,860 --> 00:33:41,880 Like, for instance, 515 00:33:42,060 --> 00:33:43,360 the ones that look, you know, 516 00:33:43,380 --> 00:33:46,500 broken visually don't work under XML 517 00:33:46,500 --> 00:33:47,940 because it's very specific, 518 00:33:48,000 --> 00:33:49,980 meaning the programming is not forgiving 519 00:33:49,980 --> 00:33:50,880 when you make a mistake. 520 00:33:51,380 --> 00:33:51,780 So... 521 00:33:53,420 --> 00:33:54,200 Any other questions? 522 00:33:56,480 --> 00:33:57,700 What time do we have? 523 00:33:59,220 --> 00:34:00,020 Probably so. 524 00:34:00,440 --> 00:34:00,980 Sound lovely. 525 00:34:03,480 --> 00:34:04,760 That's all I got, so... 526 00:34:08,160 --> 00:34:08,960 Thank you.