1 00:00:11,860 --> 00:00:18,500 In case it's a little too early, the talk we're having right now is HTTP IDS Evasions Revisited. 2 00:00:19,000 --> 00:00:21,980 I'm Dan Rolker, and I guess we'll get started now a little bit. 3 00:00:22,560 --> 00:00:24,760 You may be asking yourself, who is this guy? 4 00:00:24,960 --> 00:00:27,780 Well, just a quick background on what I've done. 5 00:00:27,780 --> 00:00:33,740 Currently, I work at Sourcefire Incorporated, basically the corporation behind Snort now. 6 00:00:33,980 --> 00:00:38,940 I came on board with Mark Norton to redesign the Snort engine for high-speed networks. 7 00:00:39,380 --> 00:00:41,600 We came on board, did that in about two months, 8 00:00:41,760 --> 00:00:46,340 and you guys might have seen that in the release of Snort 2.0 in September-October timeframe. 9 00:00:48,420 --> 00:00:52,800 What I did after that basically is working on some protocol decoders for Snort, 10 00:00:52,900 --> 00:00:56,800 most notably a new HTTP decoder that's going to be coming out 11 00:00:56,800 --> 00:00:57,760 in the next couple of weeks. 12 00:00:57,780 --> 00:00:59,760 Next month or two, but don't quote me on that. 13 00:01:01,900 --> 00:01:03,460 I've been working on a couple of those things. 14 00:01:03,700 --> 00:01:06,740 Before that, I was also lead developer on the Dragon IDS. 15 00:01:06,900 --> 00:01:12,560 I did, again, some application protocol decoders and high-speed packet capture event correlation 16 00:01:13,040 --> 00:01:14,000 with Randy Taylor. 17 00:01:15,020 --> 00:01:19,580 I've been working with application protocol decoders for a couple years now, two, three years. 18 00:01:19,800 --> 00:01:23,240 I want to give some of the knowledge I've learned over the last couple of years 19 00:01:23,240 --> 00:01:24,400 and bring it over to you guys. 20 00:01:24,760 --> 00:01:27,680 How many of you in the audience are actually involved 21 00:01:27,780 --> 00:01:32,800 with IDS either in developing IDSs, employing IDSs, managing IDSs? 22 00:01:32,840 --> 00:01:33,840 How many people in here? 23 00:01:34,320 --> 00:01:37,940 All right, how many of you guys actually compare the differences between the IDSs, 24 00:01:37,960 --> 00:01:39,140 try out different tests? 25 00:01:39,360 --> 00:01:40,520 All right, good. 26 00:01:40,820 --> 00:01:44,320 Well, I hope you'll be able to take some information away with you today 27 00:01:44,320 --> 00:01:46,520 with some tools that I'll be releasing after the talk. 28 00:01:47,040 --> 00:01:50,220 They're actually probably on the DEF CON website now, or if you want to, 29 00:01:50,260 --> 00:01:53,900 you can download the most recent versions at idsresearch.org. 30 00:01:55,220 --> 00:01:57,420 You may be asking yourself, who are these strange-looking people 31 00:01:57,420 --> 00:01:58,440 in the front row seats are? 32 00:01:58,860 --> 00:02:03,480 Well, they work at SourceFire, too, but they have free snort T-shirts available 33 00:02:03,480 --> 00:02:07,480 for people afterwards, so if you want to talk to some of these guys up here, 34 00:02:07,560 --> 00:02:08,540 why don't you raise your hand. 35 00:02:09,620 --> 00:02:12,480 If you didn't bring any snort T-shirts, I'm sure they could, you know, 36 00:02:12,540 --> 00:02:15,600 give them your name and mailing address, I'm sure they can send you some. 37 00:02:15,880 --> 00:02:19,740 So anyway, I just wanted to plug that so hopefully my expenses will now be paid. 38 00:02:22,420 --> 00:02:26,360 So before we begin, anyone with a laptop or maybe just a really great memory, 39 00:02:27,420 --> 00:02:29,760 what we may want to do here is pull up, if you're running Linux, 40 00:02:29,920 --> 00:02:32,220 do a man ASCII to pull up an ASCII map. 41 00:02:32,600 --> 00:02:35,220 A lot of the URL encodings that we're going to be doing, 42 00:02:35,340 --> 00:02:39,620 it's going to be easier for you to reference what we're encoding 43 00:02:39,620 --> 00:02:41,260 and all that kind of stuff. 44 00:02:41,540 --> 00:02:44,080 So if you do have something available, if you're just running Windows 45 00:02:44,080 --> 00:02:46,340 and you trust the DEF CON wireless networks, 46 00:02:46,800 --> 00:02:50,780 then you can Google for like an ASCII map as well and pull that stuff up. 47 00:02:51,180 --> 00:02:56,700 So once we actually start going through the different URL encoding types, we'll, you know, 48 00:02:57,420 --> 00:02:58,500 you'll find that pretty handy. 49 00:03:00,520 --> 00:03:03,620 Go through a quick presentation outline here. 50 00:03:04,300 --> 00:03:08,080 We're going to talk a little bit about the history on HTTP IDS evasions. 51 00:03:08,560 --> 00:03:09,600 Why were they important? 52 00:03:09,880 --> 00:03:13,500 What tools were developed that, you know, kind of started this all out? 53 00:03:13,960 --> 00:03:18,220 We're going to talk a little bit about evolution of the IDS and HTTP evasions. 54 00:03:18,780 --> 00:03:22,200 We're going to look at both, probably the two main types of IDSs, 55 00:03:22,300 --> 00:03:27,080 protocol analysis IDSs, pattern matching IDSs, where they started to, how they 56 00:03:27,420 --> 00:03:32,000 evolved with HTTP evasions and where they are now and where does that actually 57 00:03:32,000 --> 00:03:33,700 leave HTTP evasions currently. 58 00:03:34,540 --> 00:03:38,380 Then we're going to talk about two general types of application layer evasions. 59 00:03:38,660 --> 00:03:43,100 I want to kind of talk about the general types because I'm hoping that, for one, 60 00:03:43,180 --> 00:03:46,320 they're easier to understand than some of the more detailed applications we're 61 00:03:46,320 --> 00:03:48,900 going to talk about. But also, if you understand these general 62 00:03:48,900 --> 00:03:53,720 types of application layer evasion, you'll be able to do your own IDS evasions, 63 00:03:53,720 --> 00:03:56,540 look at protocols yourself, try and figure out how you can, 64 00:03:56,540 --> 00:03:59,520 you know, mangle some of the different options there. 65 00:03:59,780 --> 00:04:02,960 So we're going to talk about these two. And the two we're going to discuss in this 66 00:04:02,960 --> 00:04:07,740 presentation is invalid protocol parsing, which is, anyone familiar with the tool 67 00:04:07,740 --> 00:04:10,240 sidestep by Robert Graham? A couple people. 68 00:04:10,560 --> 00:04:15,480 Well, basically, that tool helped bring about this type of application layer evasion. 69 00:04:15,860 --> 00:04:19,380 Basically, it works like, you know, if you can fool the IDS into thinking that a certain 70 00:04:19,380 --> 00:04:24,260 protocol field is like something else, then you've effectively evaded the IDS. 71 00:04:24,300 --> 00:04:25,760 Like, for example, if you, 72 00:04:26,540 --> 00:04:31,740 you're parsing the HTTP protocol and you think the HTTP version is actually the URL, 73 00:04:32,040 --> 00:04:35,260 then, you know, you're not going to decode it correctly and you're not going to be able to match 74 00:04:35,260 --> 00:04:41,320 on malicious URLs. The second type we're going to talk about is invalid protocol field decoding. 75 00:04:41,700 --> 00:04:46,680 This means basically, even if you parse the protocol field correctly, if you don't know what 76 00:04:47,260 --> 00:04:51,700 data is actually in that protocol field, then you won't be able to find what you're looking for. 77 00:04:51,900 --> 00:04:56,320 For instance, if you're looking at the SNMP protocol and you don't really understand ASN1 78 00:04:56,320 --> 00:04:56,420 and 79 00:04:56,540 --> 00:04:58,880 you don't really understand how to decode it, then you're not going to be able to match certain things. 80 00:04:59,720 --> 00:05:00,920 Same thing with the URL. 81 00:05:01,240 --> 00:05:04,160 You know, if you just do a basic hex encoding on the whole thing, 82 00:05:04,280 --> 00:05:08,040 but you're expecting to see plain text, like you're expecting to see CGI and 83 00:05:08,040 --> 00:05:11,920 PHF, but instead you're seeing, like, percent, you know, this, percent that, 84 00:05:12,100 --> 00:05:13,520 you're not going to be able to detect it. 85 00:05:13,660 --> 00:05:17,140 So that's the general types of application layer evasion that we're going to talk about. 86 00:05:17,780 --> 00:05:21,660 Then we're going to go through the two types and talk about practical applications. 87 00:05:22,680 --> 00:05:25,880 For the protocol field decoding, we're going to talk about nine types of URL 88 00:05:25,880 --> 00:05:28,180 encoding. You know, we're going to start out pretty 89 00:05:28,180 --> 00:05:30,760 easy with the hex encoding and just get a little more complex. 90 00:05:31,640 --> 00:05:34,900 Pretty much all these URL encodings, except for two, 91 00:05:35,340 --> 00:05:38,600 two of the encodings are valid on both Apache and IIS, 92 00:05:38,720 --> 00:05:40,860 but the rest are really thanks to Microsoft. 93 00:05:41,220 --> 00:05:46,100 And, you know, so a lot of those, it kind of adds a little more complexity into that. 94 00:05:46,960 --> 00:05:49,180 So we're going to go through all those, give you some examples. 95 00:05:49,560 --> 00:05:53,520 Hopefully you'll be able to take away from the talk all these different types of encodings. 96 00:05:53,720 --> 00:05:55,620 But, you know, if you're still a little 97 00:05:55,880 --> 00:05:58,540 over from last night, you can always look at the tools I'm 98 00:05:58,540 --> 00:06:00,980 releasing because they cover all these encodings as well. 99 00:06:01,160 --> 00:06:02,840 So, you know, you'll have a little help with that. 100 00:06:03,960 --> 00:06:07,040 From there, we're going to move into the invalid protocol parsing. 101 00:06:07,080 --> 00:06:10,320 We're going to talk about some new evasions like request pipeline evasions, 102 00:06:10,340 --> 00:06:14,080 how that works, and we're going to talk about some parameter content encoding evasions. 103 00:06:14,540 --> 00:06:18,880 You know, for those things where you're accessing, like, the database and you have 104 00:06:18,880 --> 00:06:22,680 some malicious parameters or you're trying to exploit some CGI errors, again, 105 00:06:22,740 --> 00:06:25,860 in the parameter field, you know, you want to make sure that the IDS 106 00:06:25,880 --> 00:06:27,780 can't see that if you're trying to evade it. 107 00:06:28,200 --> 00:06:33,020 So, you know, this evasion really goes through and helps you with that. 108 00:06:33,600 --> 00:06:35,480 And then after that, it's basically tool time. 109 00:06:35,580 --> 00:06:38,040 We'll talk about the different tools that are being released with this talk. 110 00:06:39,200 --> 00:06:40,720 So I guess let's get us started here. 111 00:06:41,120 --> 00:06:45,640 A little history on HTTP IDS evasions. Web attacks are some of the most common 112 00:06:45,640 --> 00:06:49,480 and effective attacks in the matrix. Yeah, I know Trinity used an SSH exploit 113 00:06:49,480 --> 00:06:53,600 to shut down the emergency power grid, but trust me, these are web attacks come 114 00:06:53,600 --> 00:06:55,860 in all forms and sizes. You know, you just don't have to wait 115 00:06:55,880 --> 00:06:59,680 around for your favorite web server to come out with a buffer overflow for someone 116 00:06:59,680 --> 00:07:01,920 to discover that. Lots of different ways you can do it. 117 00:07:01,960 --> 00:07:06,400 You got CGI errors, you got database hacking, you know, got a lot of different 118 00:07:06,400 --> 00:07:09,840 ways you can handle this cross-site scripting attacks, all that kind of stuff. 119 00:07:10,120 --> 00:07:15,100 So web attacks, you know, not only do most every, like, companies, governments, banks, 120 00:07:15,320 --> 00:07:17,360 they all have some sort of web server available. 121 00:07:17,500 --> 00:07:20,960 And so these are really some of the most common and effective attacks that you can, 122 00:07:21,760 --> 00:07:25,060 you know, do. And because of this, IDS is really, really, 123 00:07:25,120 --> 00:07:25,860 really, really, really, really, really, really, really, really, really, really, really, 124 00:07:25,860 --> 00:07:27,020 really, really, really, really, really, really helpful to catch these things. 125 00:07:27,260 --> 00:07:30,220 Because, you know, otherwise you look kind of foolish if they go into bake-offs 126 00:07:30,220 --> 00:07:32,900 and someone runs a web attack that they should catch. 127 00:07:33,000 --> 00:07:34,940 But, hey, guess what? I didn't, you know. 128 00:07:35,080 --> 00:07:39,380 Most of the web attacks, if you've been noticing recently, when they come out, 129 00:07:39,400 --> 00:07:42,840 it takes about two days before it gets turned into a worm that shuts the internet 130 00:07:42,840 --> 00:07:46,480 down for a couple hours. So, you know, we want to make sure we can catch those things. 131 00:07:48,820 --> 00:07:53,120 Okay, now we're going to talk about, you know, a little bit of the tools that help 132 00:07:53,120 --> 00:07:55,000 bring about HTTP IDS evasions. 133 00:07:55,860 --> 00:07:58,980 through this talk without mentioning whisker this was perhaps the most the 134 00:07:58,980 --> 00:08:03,060 first and most effective web scanner than employed IDS evasion techniques I 135 00:08:03,060 --> 00:08:08,660 think there's about 10 or so when when whisker was released with the IDS 136 00:08:08,660 --> 00:08:12,440 evasions it really shut down some IDS companies they're really scrambling to 137 00:08:12,440 --> 00:08:16,820 catch the same old attacks they had always caught before you know I did a 138 00:08:16,820 --> 00:08:20,940 little work with the dragon to help with that and you know it's just a lot a lot 139 00:08:20,940 --> 00:08:26,360 of the IDS vendors really had to catch up with that the the whisker IDS really 140 00:08:26,360 --> 00:08:29,640 played off and I want to make this distinction between whisker and sidestep 141 00:08:29,640 --> 00:08:34,720 whisker really played off of either web server quirks our quirks within the IDS 142 00:08:34,720 --> 00:08:39,180 is HTTP decoders for instance like one of the whisker attacks is that you 143 00:08:39,180 --> 00:08:45,080 basically embed like a capital HTTP slash you know version in the URL that was 144 00:08:45,080 --> 00:08:49,500 done in hopes that the IDS would look just for that string HTTP slash and then 145 00:08:49,500 --> 00:08:50,900 say okay well I found that so I 146 00:08:50,900 --> 00:08:54,600 think the URLs here that falls kind of into the invalid protocol parsing 147 00:08:54,600 --> 00:08:59,260 evasion we had you know I discussed a little bit earlier and but a lot of the 148 00:08:59,260 --> 00:09:02,380 other ones also just had to do with web quirks like for instance Apache would 149 00:09:02,380 --> 00:09:07,120 accept a tab instead of a space as well to separate the git request and the URL 150 00:09:07,120 --> 00:09:11,960 and the URL and the HTTP version so you know they're very effective attacks but 151 00:09:11,960 --> 00:09:16,720 they are much different than the tool sidestep I bring up sidestep here even 152 00:09:16,720 --> 00:09:20,200 though it's not known for web attacks or HTTP evasions 153 00:09:20,200 --> 00:09:20,480 you 154 00:09:20,900 --> 00:09:29,060 When the tool was released, it really brought about a very good idea and a very influential idea in how to evade IDSs. 155 00:09:29,260 --> 00:09:35,520 Basically, Robert Graham used the application protocols against the IDSs. 156 00:09:35,720 --> 00:09:41,280 It wasn't working off of quirks or the actual protocol decoders themselves in the IDS, 157 00:09:41,400 --> 00:09:47,760 but it actually really delved into the application layer protocol and exploited, I guess I could say that, 158 00:09:47,760 --> 00:09:51,400 with some of the lesser-known characteristics of that protocol. 159 00:09:52,240 --> 00:09:58,540 The two types of evasions we're going to talk about really kind of stem from the sidestep type of evasion. 160 00:09:58,940 --> 00:10:02,520 Basically, we got the request pipeline and the parameter encoding, 161 00:10:02,760 --> 00:10:07,020 and they really come from this because they're utilizing aspects of the HTTP protocol. 162 00:10:08,540 --> 00:10:10,000 Let me see here. 163 00:10:10,240 --> 00:10:12,220 So basically moving on. 164 00:10:13,000 --> 00:10:15,560 Evolution of IDS and HTTP evasions. 165 00:10:15,680 --> 00:10:17,100 We'll start from the beginning here. 166 00:10:17,800 --> 00:10:22,140 You basically have two different types of IDSs, main ones anyway. 167 00:10:22,420 --> 00:10:25,600 You got the kind that protocol analysis will catch your attack, 168 00:10:25,840 --> 00:10:30,500 and you got the kind that, say, pattern matching will detect what you want to. 169 00:10:30,900 --> 00:10:36,280 At the beginning, they behaved kind of similar before any evasions came out. 170 00:10:36,480 --> 00:10:41,040 For instance, URLs at that time weren't encoded with any type of encoding, 171 00:10:41,300 --> 00:10:46,900 so the protocol analysis IDSs would work by parsing the protocol, finding the URL, 172 00:10:47,760 --> 00:10:49,540 and pattern matching to look for malicious URLs, 173 00:10:49,840 --> 00:10:53,740 whereas the pattern matching IDSs just, like, searched the whole payload 174 00:10:53,740 --> 00:10:57,860 to see if there were any malicious URL contents anywhere in the payload. 175 00:10:58,440 --> 00:11:02,520 However, when the evasions did come out, there was a stark contrast between the two. 176 00:11:02,660 --> 00:11:05,200 The protocol analysis IDSs were one step ahead 177 00:11:05,200 --> 00:11:08,200 because all of a sudden they had already been parsing the protocol, 178 00:11:08,440 --> 00:11:13,000 so all they had to do was implement the encoding algorithms to decode those encodings correctly, 179 00:11:13,300 --> 00:11:17,540 whereas pattern matching IDSs actually had to now write a protocol decoder for, 180 00:11:17,760 --> 00:11:21,960 the protocol being evaded, then had to implement the encoding methodologies. 181 00:11:22,300 --> 00:11:26,180 And once that was done and given a couple years, the two again converged, 182 00:11:26,200 --> 00:11:27,700 and they behave very similarly now. 183 00:11:28,200 --> 00:11:30,400 So that means that since they behave similarly, 184 00:11:30,700 --> 00:11:34,360 we'll be able to use the types of evasions I'm discussing here against both types. 185 00:11:35,960 --> 00:11:38,580 Current state of IDS HTTP evasions. 186 00:11:38,840 --> 00:11:40,040 Where's the technology now? 187 00:11:40,220 --> 00:11:41,980 It's been kind of stagnant for a couple years. 188 00:11:42,580 --> 00:11:44,980 What does that mean for the evasions we're going to talk about? 189 00:11:45,320 --> 00:11:47,580 It means basically we can use these against both. 190 00:11:47,760 --> 00:11:48,840 Different types of IDSs. 191 00:11:49,220 --> 00:11:51,520 So just kind of keep that in mind. 192 00:11:51,560 --> 00:11:54,200 These should work against, to give you some specific examples, 193 00:11:54,460 --> 00:11:57,740 like you could use them against real secure, Snort, Dragon, 194 00:11:57,940 --> 00:12:02,420 any of the other open source IDSs as well. 195 00:12:04,160 --> 00:12:06,680 All right, so we're going to talk a little bit more now 196 00:12:06,680 --> 00:12:09,060 about the two general types of application layer evading. 197 00:12:10,400 --> 00:12:11,700 Invalid protocol parsing. 198 00:12:12,120 --> 00:12:14,000 Like I said, that stems from sidestep, 199 00:12:14,120 --> 00:12:17,740 and it really comes from the fact that most IDSs, 200 00:12:17,760 --> 00:12:21,820 they're not exactly pros in protocol analysis. 201 00:12:22,420 --> 00:12:25,180 What you do for this type of evasion 202 00:12:25,180 --> 00:12:27,880 is really research an application protocol. 203 00:12:28,280 --> 00:12:32,480 Look for areas of the protocol that you think are a little obscure 204 00:12:32,480 --> 00:12:34,520 and test it out against your IDS 205 00:12:34,520 --> 00:12:36,000 to see if it actually interprets those correctly. 206 00:12:36,720 --> 00:12:39,780 These are very effective evasions 207 00:12:39,780 --> 00:12:41,480 because it's not trivially fixed. 208 00:12:41,800 --> 00:12:44,020 Basically, if one of these comes out, 209 00:12:44,060 --> 00:12:47,360 a lot of times IDSs have to completely redesign and reimplement. 210 00:12:47,360 --> 00:12:48,520 The protocol decoder, 211 00:12:48,560 --> 00:12:52,300 because there's some fundamental flaws in their parsing algorithm. 212 00:12:52,780 --> 00:12:54,540 These are very effective. 213 00:12:55,020 --> 00:12:57,220 The invalid protocol field decoding. 214 00:12:57,680 --> 00:12:58,800 It's like I said before, 215 00:12:59,040 --> 00:13:02,980 it's basically even though an IDS parses that field, 216 00:13:03,140 --> 00:13:04,620 finds the field correctly, 217 00:13:04,860 --> 00:13:07,020 if it doesn't know the data that's there, 218 00:13:07,240 --> 00:13:08,960 then it can't interpret it correctly. 219 00:13:09,420 --> 00:13:11,460 For instance, one of the things we'll be talking about 220 00:13:11,460 --> 00:13:14,020 is what happens when you do a post request 221 00:13:14,020 --> 00:13:16,700 and you encode the post payload, 222 00:13:16,700 --> 00:13:18,620 you encode the payload with Base64 encoding. 223 00:13:19,160 --> 00:13:22,260 Does your IDS go down to the payload, 224 00:13:22,460 --> 00:13:24,360 decode that using a Base64 algorithm, 225 00:13:24,580 --> 00:13:25,660 and then match against it? 226 00:13:25,820 --> 00:13:26,580 Probably not. 227 00:13:27,660 --> 00:13:29,580 That's how the protocol field decoding works. 228 00:13:29,700 --> 00:13:30,660 They're both very effective. 229 00:13:31,460 --> 00:13:33,280 However, the invalid protocol parsing 230 00:13:33,280 --> 00:13:34,920 is probably the more serious of the two 231 00:13:34,920 --> 00:13:37,980 because those really, in general, 232 00:13:38,500 --> 00:13:42,500 mean some kind of redesign on the IDS's protocol decoder. 233 00:13:44,600 --> 00:13:46,680 All right, so now we get into the more practical. 234 00:13:46,700 --> 00:13:47,940 The more practical application side of this. 235 00:13:48,360 --> 00:13:50,580 If you haven't got that ASCII map out in front of you, 236 00:13:51,640 --> 00:13:52,100 don't worry. 237 00:13:52,200 --> 00:13:54,080 I'm going to be helping you out a little bit with this. 238 00:13:56,440 --> 00:13:57,500 We're going to talk about this. 239 00:13:57,580 --> 00:13:59,440 We're going to try and get through these URL encodings. 240 00:14:00,040 --> 00:14:02,260 Hopefully, I'm going to try and go through them fairly quickly 241 00:14:02,260 --> 00:14:04,300 because they're not the most exciting things 242 00:14:04,300 --> 00:14:06,280 for me to talk about or for you to listen to. 243 00:14:07,340 --> 00:14:09,340 Hopefully, you'll be able to get the main gist 244 00:14:09,340 --> 00:14:10,060 from the presentation. 245 00:14:11,440 --> 00:14:14,000 Again, given what I'm going to bring up in this talk, 246 00:14:14,260 --> 00:14:16,680 you should have the tools to go do additional research, 247 00:14:16,680 --> 00:14:17,700 research on your own in the web, 248 00:14:17,740 --> 00:14:20,420 and know what to look for and tools to try out, 249 00:14:20,480 --> 00:14:21,060 things like that. 250 00:14:22,200 --> 00:14:23,600 We'll start out right now, I guess. 251 00:14:23,840 --> 00:14:25,200 First one we're going to start out with, 252 00:14:25,320 --> 00:14:26,100 we're going to start out simple 253 00:14:26,100 --> 00:14:27,440 and then get more and more complex, 254 00:14:27,760 --> 00:14:29,220 is your good old hex encoding. 255 00:14:29,700 --> 00:14:30,780 It's been around for years. 256 00:14:31,160 --> 00:14:33,260 It's been an HTTP standard for years. 257 00:14:33,660 --> 00:14:36,120 Most IDS's all handle this, 258 00:14:36,240 --> 00:14:38,260 and most web servers all handle this as well. 259 00:14:38,540 --> 00:14:40,280 This is pretty much a universal encoding. 260 00:14:40,740 --> 00:14:42,600 Is it that effective against IDS's? 261 00:14:42,800 --> 00:14:44,660 Not at all, but I want to start here 262 00:14:44,660 --> 00:14:46,080 because some of the later encodings 263 00:14:46,080 --> 00:14:46,660 we're going to talk about 264 00:14:46,680 --> 00:14:48,380 utilize this type of encoding. 265 00:14:49,360 --> 00:14:51,900 Basically, the concept behind this is 266 00:14:51,900 --> 00:14:53,560 you look up in your ASCII map 267 00:14:53,560 --> 00:14:54,940 the character you want to encode. 268 00:14:55,080 --> 00:14:56,580 You look up the hexadecimal value, 269 00:14:56,660 --> 00:14:57,940 not the octal or the decimal, 270 00:14:58,140 --> 00:14:59,080 but the hexadecimal. 271 00:14:59,700 --> 00:15:01,900 For example, what we're going to probably be using 272 00:15:01,900 --> 00:15:04,080 throughout this presentation is the capital letter A. 273 00:15:04,360 --> 00:15:06,340 The hexadecimal value for that is 41. 274 00:15:07,440 --> 00:15:09,680 How hex encoding works is in the URL, 275 00:15:09,820 --> 00:15:11,420 you escape it with a percent, 276 00:15:11,580 --> 00:15:13,180 and then you put the characters four and one. 277 00:15:13,560 --> 00:15:15,400 When that gets sent over to the web server 278 00:15:15,400 --> 00:15:17,160 or an IDS intercepts that, 279 00:15:17,300 --> 00:15:20,200 it sees the percent 41, knows what to do with it, 280 00:15:20,240 --> 00:15:22,060 and decodes that into a capital letter A. 281 00:15:23,960 --> 00:15:25,780 Pay attention a little bit to this encoding, though, 282 00:15:25,840 --> 00:15:27,600 because we are, like I said, going to use it through 283 00:15:27,600 --> 00:15:29,320 probably the next four different types of encoding. 284 00:15:29,600 --> 00:15:31,980 You guys should probably be familiar with this, 285 00:15:32,020 --> 00:15:34,820 especially those of you that are more in the IDS field. 286 00:15:36,180 --> 00:15:37,600 Next one we're going to talk about here 287 00:15:37,600 --> 00:15:38,940 is the double percent hex encoding. 288 00:15:39,280 --> 00:15:42,780 You probably saw this with some of the bug tracks 289 00:15:42,780 --> 00:15:45,180 that came out about it a couple years ago. 290 00:15:45,400 --> 00:15:48,360 Basically, this is the same as the normal hex encoding, 291 00:15:48,660 --> 00:15:50,880 except you're encoding the percent first, 292 00:15:51,080 --> 00:15:52,400 and then you follow that percent 293 00:15:52,400 --> 00:15:57,080 by the hexadecimal values of the bytes you want to encode. 294 00:15:57,360 --> 00:16:00,000 For example, if you got that ASCII map out in front of you, 295 00:16:00,060 --> 00:16:02,680 you look up percent, its hexadecimal value is 25. 296 00:16:03,300 --> 00:16:05,440 In order to regularly hex encode that, 297 00:16:05,540 --> 00:16:06,540 you do a percent 25. 298 00:16:07,160 --> 00:16:10,920 You then follow that by the bytes you want to encode. 299 00:16:11,160 --> 00:16:14,080 In this case, A, again, the hexadecimal value is 41, 300 00:16:14,440 --> 00:16:15,380 so you got percent 25. 301 00:16:15,400 --> 00:16:19,940 Thanks to Microsoft IIS, you got a double decode. 302 00:16:20,200 --> 00:16:22,780 It goes through it once, and then it goes through it again. 303 00:16:23,440 --> 00:16:25,060 As you see on the first pass, 304 00:16:25,220 --> 00:16:27,460 the percent 25 gets turned into a percent, 305 00:16:27,720 --> 00:16:28,800 and then on the second pass, 306 00:16:28,900 --> 00:16:30,780 the percent 41 gets turned into an A. 307 00:16:33,300 --> 00:16:34,560 Double-nibble hex encoding. 308 00:16:36,140 --> 00:16:38,320 Again, this was working on Microsoft IIS. 309 00:16:39,820 --> 00:16:42,800 Basically how this works is each hexadecimal nibble 310 00:16:42,800 --> 00:16:44,540 of the byte we want to encode 311 00:16:44,540 --> 00:16:46,980 is itself encoded using the normal hex encoding method. 312 00:16:47,280 --> 00:16:49,280 How many of you wanted to wonder how many encodings 313 00:16:49,280 --> 00:16:50,240 I could get in one sentence? 314 00:16:52,720 --> 00:16:54,160 Basically what that means is, 315 00:16:54,240 --> 00:16:56,120 to go back to our example with the A, 316 00:16:56,320 --> 00:16:58,440 we basically got the hexadecimal 41. 317 00:16:59,000 --> 00:17:01,540 In order to encode this using the double-nibble hex encoding, 318 00:17:01,900 --> 00:17:03,540 we look up 4 in the ASCII map. 319 00:17:03,880 --> 00:17:05,680 Its hexadecimal value is 34. 320 00:17:05,960 --> 00:17:06,840 We look up the 1. 321 00:17:07,000 --> 00:17:08,220 Its hexadecimal value is 31. 322 00:17:08,660 --> 00:17:11,040 We encode those using the normal hex encoding, 323 00:17:11,340 --> 00:17:13,700 so percent 34 and percent 31. 324 00:17:13,700 --> 00:17:15,740 We make sure we put that other percent 325 00:17:15,740 --> 00:17:16,700 right out in front of it, 326 00:17:16,780 --> 00:17:17,740 so on the second pass, 327 00:17:17,920 --> 00:17:18,660 it'll pick that up. 328 00:17:19,580 --> 00:17:20,880 On the first pass, 329 00:17:21,060 --> 00:17:23,360 the percent 34 gets turned back into the 4, 330 00:17:23,440 --> 00:17:24,540 31 to the 1, 331 00:17:24,740 --> 00:17:26,240 which leaves us with percent 41, 332 00:17:26,440 --> 00:17:28,080 and then percent 41 turns into A. 333 00:17:29,760 --> 00:17:31,120 Okay, first nibble hex encoding. 334 00:17:31,360 --> 00:17:32,500 Anyone want to guess what web server? 335 00:17:33,320 --> 00:17:33,880 That's right. 336 00:17:35,000 --> 00:17:35,880 Microsoft IIS. 337 00:17:36,720 --> 00:17:38,100 This encoding is very similar 338 00:17:38,100 --> 00:17:39,180 to the double-nibble encoding, 339 00:17:39,880 --> 00:17:41,100 except the only difference is 340 00:17:41,100 --> 00:17:42,660 only the first nibble is encoded. 341 00:17:42,660 --> 00:17:43,580 So in this case, 342 00:17:43,660 --> 00:17:45,360 the first nibble of A is a 4, 343 00:17:45,540 --> 00:17:47,140 so we encode that with the percent 34 344 00:17:47,140 --> 00:17:49,460 and just leave the 1 as 1. 345 00:17:49,680 --> 00:17:52,100 So you get the percent, percent 34, 1, 346 00:17:52,640 --> 00:17:54,200 which turns in, first pass, 347 00:17:55,480 --> 00:17:57,280 percent 34 turns into 4, 348 00:17:57,460 --> 00:17:58,760 leaves us with percent 41, 349 00:17:58,920 --> 00:18:00,780 which by now hopefully everyone knows 350 00:18:00,780 --> 00:18:02,780 that percent 41 turns into A. 351 00:18:03,100 --> 00:18:03,580 All right. 352 00:18:04,320 --> 00:18:06,420 Second nibble hex encoding, IIS. 353 00:18:07,000 --> 00:18:08,680 Just like the last one we talked about, 354 00:18:08,740 --> 00:18:10,920 except the second nibble is encoded, 355 00:18:10,920 --> 00:18:12,980 and the first one is just left alone. 356 00:18:13,160 --> 00:18:15,460 So we got the percent 4 and then the percent 31 357 00:18:16,020 --> 00:18:19,260 because the hexadecimal value for that is 31. 358 00:18:19,680 --> 00:18:20,680 On the first pass, 359 00:18:20,860 --> 00:18:23,040 the 31 turns into A1, 360 00:18:23,160 --> 00:18:24,360 leaving percent 41, 361 00:18:24,840 --> 00:18:25,660 which leaves that. 362 00:18:26,820 --> 00:18:28,060 Okay, quick break in coding. 363 00:18:28,260 --> 00:18:29,640 I'm just going to try and make a joke here, 364 00:18:29,660 --> 00:18:30,420 break it up a little bit. 365 00:18:31,020 --> 00:18:31,620 So anyway, 366 00:18:31,920 --> 00:18:34,180 I guess I didn't go over so well. 367 00:18:36,240 --> 00:18:37,040 So anyway, 368 00:18:37,260 --> 00:18:39,460 but we got about four more URL encodings to go. 369 00:18:39,580 --> 00:18:40,900 It gets a little worse next time. 370 00:18:40,900 --> 00:18:41,600 We'll see how it gets better. 371 00:18:42,360 --> 00:18:43,340 After these encodings, 372 00:18:43,440 --> 00:18:45,560 then we're going to go into the invalid protocol parsings, 373 00:18:45,620 --> 00:18:46,640 which are a little more, 374 00:18:47,180 --> 00:18:48,560 a little easier to understand 375 00:18:48,560 --> 00:18:50,160 and not so much into the bits and the bytes. 376 00:18:51,600 --> 00:18:52,640 Okay, UTF-8 encoding. 377 00:18:53,000 --> 00:18:54,920 I'm going to try and go through this fairly quickly. 378 00:18:55,440 --> 00:18:57,700 If this is the first time you've heard of UTF-8 379 00:18:57,700 --> 00:18:58,960 or tried to decode it yourself, 380 00:18:59,340 --> 00:19:01,500 you're probably not going to get all of it 381 00:19:01,500 --> 00:19:02,440 in this presentation, 382 00:19:02,720 --> 00:19:03,480 but, you know, 383 00:19:03,520 --> 00:19:04,880 go to unicode.org, 384 00:19:04,960 --> 00:19:05,660 things like that, 385 00:19:05,760 --> 00:19:07,260 and you'll be able to learn more about it 386 00:19:07,260 --> 00:19:07,880 if you're interested. 387 00:19:08,960 --> 00:19:09,320 Basically, 388 00:19:09,320 --> 00:19:12,240 UTF-8 is a way to encode values 389 00:19:12,240 --> 00:19:14,880 that are greater than a single byte value of 255. 390 00:19:16,420 --> 00:19:17,180 So, you know, 391 00:19:17,220 --> 00:19:17,940 UTF-8, 392 00:19:17,980 --> 00:19:20,800 most web servers will accept up to values of 65, 393 00:19:21,360 --> 00:19:22,120 64K, you know, 394 00:19:22,160 --> 00:19:23,380 65,000, 535. 395 00:19:25,000 --> 00:19:27,960 We're going to talk about two UTF-8 byte sequences here, 396 00:19:28,060 --> 00:19:28,880 the two byte sequence. 397 00:19:29,640 --> 00:19:32,420 How the UTF-8 encoding works 398 00:19:32,420 --> 00:19:34,160 is that the first byte in the sequence 399 00:19:34,680 --> 00:19:36,940 contains the high order bits 400 00:19:36,940 --> 00:19:39,040 contain the number of bytes 401 00:19:39,320 --> 00:19:39,900 for the whole sequence. 402 00:19:40,260 --> 00:19:41,780 So, as you see in the two byte sequence, 403 00:19:42,040 --> 00:19:44,680 the first two high bits are set, 404 00:19:44,760 --> 00:19:45,460 followed by a zero. 405 00:19:45,680 --> 00:19:47,120 What that tells the algorithm is 406 00:19:47,120 --> 00:19:48,180 this is a two byte sequence. 407 00:19:48,640 --> 00:19:50,340 The bits after the zero, 408 00:19:50,920 --> 00:19:51,560 you know, 409 00:19:51,560 --> 00:19:52,620 are part of the value 410 00:19:52,620 --> 00:19:54,520 of what we're going to be decoding. 411 00:19:54,700 --> 00:19:56,620 And then with the extension byte after that 412 00:19:56,620 --> 00:19:57,640 has the high bits set, 413 00:19:57,740 --> 00:19:58,420 followed by a zero, 414 00:19:58,540 --> 00:19:59,760 so you have six more bits. 415 00:20:00,040 --> 00:20:01,100 You add those together, 416 00:20:01,320 --> 00:20:02,400 you get 11 bits total, 417 00:20:02,660 --> 00:20:05,020 which a two byte UTF-8 sequence 418 00:20:05,020 --> 00:20:07,040 will give you a max hexadecimal value 419 00:20:07,040 --> 00:20:08,560 of X7FF. 420 00:20:09,100 --> 00:20:11,000 Three byte sequence, very similar. 421 00:20:11,340 --> 00:20:13,540 Again, you basically got the three bits, 422 00:20:13,620 --> 00:20:14,520 one, two, three, 423 00:20:14,580 --> 00:20:16,240 that tells you it's a three byte sequence 424 00:20:16,240 --> 00:20:17,280 followed by a zero. 425 00:20:18,100 --> 00:20:20,100 So you got four bits in the first one, 426 00:20:20,260 --> 00:20:21,260 six bits in the second, 427 00:20:21,320 --> 00:20:22,460 six bits in the third. 428 00:20:22,600 --> 00:20:24,620 So together, that gives you 16 bits 429 00:20:24,620 --> 00:20:27,020 for a max hexadecimal value 430 00:20:27,020 --> 00:20:28,780 of FFFF. 431 00:20:30,840 --> 00:20:32,460 And the final showdown here. 432 00:20:32,920 --> 00:20:35,060 UTF-8 encoding is supported by both 433 00:20:35,060 --> 00:20:36,900 the Apache and IIS web servers. 434 00:20:37,360 --> 00:20:38,000 You know, 435 00:20:38,020 --> 00:20:38,420 kind of, 436 00:20:38,560 --> 00:20:39,460 breaking out of the mold here, 437 00:20:39,520 --> 00:20:40,260 not just IIS, 438 00:20:40,300 --> 00:20:41,240 but getting Apache in there. 439 00:20:41,540 --> 00:20:43,540 And just wanted to let you guys know 440 00:20:43,540 --> 00:20:45,340 the new UTF-8 and Unicode standards 441 00:20:45,340 --> 00:20:48,480 don't really allow you to encode ASCII characters 442 00:20:48,480 --> 00:20:50,320 in multi-byte UTF-8 sequences. 443 00:20:50,940 --> 00:20:53,280 The current versions of Apache now follow this, 444 00:20:53,440 --> 00:20:55,740 but IIS still I don't think does. 445 00:20:56,220 --> 00:20:58,080 So we're going to do a quick example here. 446 00:20:58,240 --> 00:21:00,100 Again, this is going to be our example of A, 447 00:21:00,360 --> 00:21:01,780 which turns into, you know, 448 00:21:01,820 --> 00:21:02,780 hexadecimal value 41. 449 00:21:03,380 --> 00:21:06,140 So what this looks like first in UTF-8 450 00:21:06,140 --> 00:21:08,240 is percent C1, percent 81. 451 00:21:08,240 --> 00:21:11,000 Remember, any time you want to encode an ASCII character 452 00:21:11,000 --> 00:21:12,400 in a URL, 453 00:21:12,620 --> 00:21:14,200 you've got to usually escape it with a percent. 454 00:21:14,460 --> 00:21:15,460 So in this case, 455 00:21:15,560 --> 00:21:16,620 the C1 turns into, 456 00:21:16,760 --> 00:21:18,040 as you see here, 457 00:21:19,600 --> 00:21:20,760 the first byte there, 458 00:21:20,840 --> 00:21:21,680 the second byte there. 459 00:21:22,280 --> 00:21:23,740 And if you go one more, 460 00:21:23,960 --> 00:21:26,240 basically I'm exiting out the bits 461 00:21:26,240 --> 00:21:29,080 that are for the UTF-8 encoding 462 00:21:29,080 --> 00:21:30,540 so you know what to do, 463 00:21:30,680 --> 00:21:34,140 which leaves us then with the 100001, 464 00:21:34,260 --> 00:21:36,940 which is a hexadecimal value of 41, 465 00:21:36,940 --> 00:21:37,820 which equals A. 466 00:21:38,260 --> 00:21:39,480 I know that's pretty fast, 467 00:21:39,620 --> 00:21:41,660 but if you're really that interested in Unicode, 468 00:21:41,760 --> 00:21:42,440 UTF-8, 469 00:21:42,540 --> 00:21:45,160 you can Google your heart out. 470 00:21:45,980 --> 00:21:48,420 All right, back to Microsoft IIS again. 471 00:21:48,640 --> 00:21:49,700 Remember how I told you 472 00:21:49,700 --> 00:21:51,020 you had to escape bytes with percent? 473 00:21:51,380 --> 00:21:52,060 Well, guess what? 474 00:21:52,140 --> 00:21:53,820 You really don't have to do that with Microsoft. 475 00:21:54,220 --> 00:21:57,000 All you really have to do is send the byte. 476 00:21:57,180 --> 00:21:57,980 So for example, 477 00:21:58,180 --> 00:22:00,140 the UTF-8 sequence we just talked about, 478 00:22:00,260 --> 00:22:02,840 which was C181, 479 00:22:03,680 --> 00:22:05,960 all you do is you send the byte C1, 480 00:22:05,960 --> 00:22:07,840 followed by the byte 81. 481 00:22:08,820 --> 00:22:10,700 And IIS will interpret that. 482 00:22:11,060 --> 00:22:12,660 What makes it kind of cool as well 483 00:22:12,660 --> 00:22:15,580 is that you can encode the first byte with a percent. 484 00:22:15,740 --> 00:22:17,260 So you could send like percent C1, 485 00:22:17,420 --> 00:22:20,280 and then you could send just the bare byte 81. 486 00:22:21,140 --> 00:22:23,980 A lot of IDSs don't really mix and match these things, 487 00:22:24,060 --> 00:22:28,580 so we'll get to a mismatch encoding a little bit later, 488 00:22:28,700 --> 00:22:31,420 but that's something to keep in mind 489 00:22:31,420 --> 00:22:33,160 because when you mix these encodings up, 490 00:22:33,220 --> 00:22:34,940 it really works well against different IDSs. 491 00:22:36,700 --> 00:22:38,340 All right, percent U encoding. 492 00:22:38,380 --> 00:22:40,600 We're almost done with the encodings. 493 00:22:41,060 --> 00:22:43,720 What this is is basically Microsoft's little way 494 00:22:43,720 --> 00:22:47,200 of encoding Unicode code points of up to 64K. 495 00:22:48,260 --> 00:22:51,000 Basically, its syntax is percent U 496 00:22:51,000 --> 00:22:52,160 followed by four bytes, 497 00:22:52,280 --> 00:22:56,760 which equals basically four nibbles or two bytes. 498 00:22:57,480 --> 00:22:59,280 How you kind of encode that is 499 00:22:59,280 --> 00:23:01,000 you actually put the Unicode value. 500 00:23:01,500 --> 00:23:03,380 So for example, if we want to do A, 501 00:23:03,520 --> 00:23:05,240 its value is hexadecimal 41. 502 00:23:05,960 --> 00:23:07,140 You put zeros in front of that, 503 00:23:07,180 --> 00:23:08,580 and you end up with a 41 there. 504 00:23:10,280 --> 00:23:11,080 Don't get confused. 505 00:23:11,120 --> 00:23:12,440 I've seen a lot of people do this. 506 00:23:12,500 --> 00:23:14,300 They see, for example, 507 00:23:14,400 --> 00:23:17,040 we did the UTF-8 encoding with C181. 508 00:23:17,200 --> 00:23:18,260 A lot of people say, 509 00:23:18,420 --> 00:23:20,980 oh, well, that's the code point for A, 510 00:23:21,200 --> 00:23:22,940 so I'll just put C181 in here. 511 00:23:23,040 --> 00:23:25,040 So you'll have like percent U C181. 512 00:23:25,340 --> 00:23:25,920 That's wrong. 513 00:23:27,200 --> 00:23:31,840 What you really put in here is the actual Unicode value, 514 00:23:32,920 --> 00:23:35,100 which this is very effective against Microsoft, 515 00:23:35,960 --> 00:23:37,420 because what they've done for us is 516 00:23:37,940 --> 00:23:39,980 with a certain Unicode code page, 517 00:23:40,160 --> 00:23:41,860 an ASCII character, say A, 518 00:23:42,120 --> 00:23:44,240 may map to like eight different Unicode values. 519 00:23:44,560 --> 00:23:50,620 So you'll have like the value of 41, 100, 102, 104, etc. 520 00:23:51,000 --> 00:23:52,900 So you can actually just put that in there. 521 00:23:53,020 --> 00:23:54,160 So like the same encoding, 522 00:23:54,440 --> 00:23:56,760 percent U0041 equals A, 523 00:23:56,980 --> 00:24:01,420 you could also do like percent U0100 also equals A, 524 00:24:01,520 --> 00:24:04,700 or percent U0102 also equals A. 525 00:24:04,700 --> 00:24:06,360 So you get a lot of those. 526 00:24:06,960 --> 00:24:09,000 You can thank Microsoft for that, 527 00:24:09,120 --> 00:24:12,220 because if you have a different code page as well, 528 00:24:12,480 --> 00:24:14,960 the ASCII characters map to different code points, 529 00:24:15,080 --> 00:24:17,480 so it's pretty convoluted. 530 00:24:18,780 --> 00:24:20,260 And now we're on the last encoding. 531 00:24:20,640 --> 00:24:22,380 This is actually the most interesting one, 532 00:24:22,480 --> 00:24:23,860 because it's, as I said a little bit before, 533 00:24:24,060 --> 00:24:25,400 the mismatch encoding really, 534 00:24:25,560 --> 00:24:28,060 what it does is we take the other eight encodings 535 00:24:28,060 --> 00:24:29,980 we just talked about and put them together. 536 00:24:30,680 --> 00:24:32,580 So basically, at the end here, 537 00:24:32,740 --> 00:24:33,740 you can see I got a little quiz 538 00:24:33,740 --> 00:24:34,740 for anyone that's interested. 539 00:24:34,980 --> 00:24:36,000 You can write that down. 540 00:24:36,100 --> 00:24:37,580 That translates to one letter. 541 00:24:38,400 --> 00:24:40,040 So give it your best shot 542 00:24:40,040 --> 00:24:41,520 and see what you can translate it down to. 543 00:24:41,880 --> 00:24:44,800 And if you want to double-check with me afterwards or whatever, 544 00:24:44,880 --> 00:24:47,100 just come up and ask me. 545 00:24:47,700 --> 00:24:49,080 So mismatch encodings, 546 00:24:49,620 --> 00:24:51,900 they're very effective against IDSs 547 00:24:51,900 --> 00:24:54,640 and just most IDS analysts, 548 00:24:54,840 --> 00:24:56,400 even if they catch the packet, 549 00:24:56,680 --> 00:24:57,960 you think they could decode that? 550 00:24:58,100 --> 00:24:58,740 Probably not. 551 00:24:59,140 --> 00:25:01,000 So anyway, just keep that in mind. 552 00:25:02,260 --> 00:25:02,800 All right. 553 00:25:02,800 --> 00:25:04,100 So we're done with the encodings now. 554 00:25:04,220 --> 00:25:04,600 We're going to be, 555 00:25:04,700 --> 00:25:07,780 we're on to the invalid protocol parsing practical applications. 556 00:25:08,240 --> 00:25:11,720 To me, these are actually the more interesting IDS evasion types 557 00:25:11,720 --> 00:25:13,700 because they're a little more general. 558 00:25:13,820 --> 00:25:15,500 I think a lot of people can understand them, 559 00:25:15,600 --> 00:25:18,240 and they're very, very effective against IDSs. 560 00:25:18,360 --> 00:25:19,700 If your IDS doesn't catch it, 561 00:25:19,740 --> 00:25:21,700 then they're pretty much going to have to, you know, 562 00:25:21,700 --> 00:25:24,080 really think about how they want to redesign the protocol decoder. 563 00:25:24,720 --> 00:25:27,320 So we're going to talk about two types that I mentioned previously, 564 00:25:27,620 --> 00:25:29,220 the request pipeline evasions 565 00:25:29,220 --> 00:25:31,560 and the parameter content encoding evasions. 566 00:25:31,560 --> 00:25:34,560 And, you know, both of these, like I said, are pretty effective. 567 00:25:35,200 --> 00:25:35,940 Request pipeline. 568 00:25:36,180 --> 00:25:37,220 So what is a request pipeline? 569 00:25:37,640 --> 00:25:38,240 Anyone know? 570 00:25:38,380 --> 00:25:39,540 Raise your hand if you know. 571 00:25:39,700 --> 00:25:40,640 Request pipeline, anyone? 572 00:25:41,120 --> 00:25:41,600 Okay. 573 00:25:41,620 --> 00:25:45,160 Well, basically, it's a new feature in HTTP 1.1. 574 00:25:45,400 --> 00:25:47,400 It basically allows your web client 575 00:25:47,400 --> 00:25:51,180 to send multiple requests in a single packet. 576 00:25:51,700 --> 00:25:53,440 This is different from the keepalive option 577 00:25:53,440 --> 00:25:54,940 because with the keepalive, 578 00:25:54,940 --> 00:25:57,320 you could send a request with the keepalive header, 579 00:25:57,480 --> 00:25:59,640 and the web server will keep that connection over, 580 00:25:59,820 --> 00:26:01,060 then, you know, open, 581 00:26:01,060 --> 00:26:03,640 so then you can send another request, like, a couple minutes later. 582 00:26:03,920 --> 00:26:06,200 This is different because you actually send the request 583 00:26:06,200 --> 00:26:07,220 in the same packet. 584 00:26:08,040 --> 00:26:10,300 So, you know, as we look at that, 585 00:26:10,380 --> 00:26:13,020 it's actually very effective in evading IDSs. 586 00:26:13,180 --> 00:26:13,960 How does it work? 587 00:26:14,300 --> 00:26:16,400 Well, most IDSs, they only assume 588 00:26:16,400 --> 00:26:20,220 that one HTTP request packet is going to contain one URL. 589 00:26:20,600 --> 00:26:22,460 But with request pipeline evasions, 590 00:26:22,460 --> 00:26:23,480 that's not the case anymore. 591 00:26:23,740 --> 00:26:25,860 You can put as many in there as you want to. 592 00:26:26,660 --> 00:26:27,920 So how does this work, then? 593 00:26:28,020 --> 00:26:30,300 For the first couple URL requests, we say, 594 00:26:30,300 --> 00:26:32,880 okay, we'll send some pretty benign, you know, 595 00:26:32,900 --> 00:26:35,100 benign requests, like we'll do, 596 00:26:35,240 --> 00:26:37,260 we'll look at the, like, slash, the index, 597 00:26:37,420 --> 00:26:38,320 we'll look at the content, 598 00:26:38,640 --> 00:26:41,440 maybe download the logo, GIF, or whatever we want to do. 599 00:26:41,600 --> 00:26:43,160 And then the last URL request, 600 00:26:43,500 --> 00:26:46,080 you basically put the malicious URL you want to access. 601 00:26:46,580 --> 00:26:47,960 If you leave it in plain text, 602 00:26:48,240 --> 00:26:49,520 it's probably not going to work for you 603 00:26:49,520 --> 00:26:51,320 because a lot of IDSs at this point, 604 00:26:51,440 --> 00:26:53,920 what they do is just do pattern matching still 605 00:26:53,920 --> 00:26:56,160 over the whole packet for certain malicious contents. 606 00:26:56,520 --> 00:26:58,900 So what you want to do is just encode 607 00:26:58,900 --> 00:27:01,700 that last malicious URL with your favorite type of encoding. 608 00:27:02,320 --> 00:27:04,160 Hex encoding works just fine, you know, 609 00:27:04,180 --> 00:27:05,740 and it's universal for all web servers. 610 00:27:05,960 --> 00:27:07,440 So you kind of encode it like that, 611 00:27:07,540 --> 00:27:10,580 and most IDSs won't ever decode that URL. 612 00:27:12,320 --> 00:27:13,980 So here's kind of an example here. 613 00:27:14,060 --> 00:27:15,780 As you see, we got the benign request. 614 00:27:16,480 --> 00:27:18,420 Always remember, when you're doing request pipeline, 615 00:27:18,800 --> 00:27:21,260 you have to have the HTTP 1.1 version, 616 00:27:21,440 --> 00:27:24,300 and because of that, you always have to have the host header 617 00:27:24,300 --> 00:27:27,180 because that's mandatory in the HTTP 1.1 protocol. 618 00:27:27,560 --> 00:27:28,880 So if you don't put the host header, 619 00:27:28,900 --> 00:27:31,180 it's in there, odds are the web server's going to say, 620 00:27:31,260 --> 00:27:32,280 I don't know what you're talking about. 621 00:27:32,660 --> 00:27:34,980 So remember to put the host parameter in there. 622 00:27:35,180 --> 00:27:37,980 So as you see, we, you know, just access the index, 623 00:27:38,180 --> 00:27:39,380 the content.html, 624 00:27:39,920 --> 00:27:42,000 and then we basically encode our last one. 625 00:27:42,680 --> 00:27:46,980 If an IDS happens to be looking for the content cgi-bin-phf, 626 00:27:47,080 --> 00:27:48,700 they're not going to find it there. 627 00:27:48,820 --> 00:27:50,200 Instead, they'll just see a bunch of percents. 628 00:27:50,580 --> 00:27:52,940 So that's what that encoding turns into, 629 00:27:53,040 --> 00:27:55,920 cgi-bin-phf, and you can access things like that. 630 00:27:58,160 --> 00:27:58,560 Okay. 631 00:28:04,340 --> 00:28:06,080 Parameter content encoding evasions. 632 00:28:07,120 --> 00:28:08,800 This evasion's particularly effective 633 00:28:08,800 --> 00:28:10,800 when you're doing any sort of parameter type, 634 00:28:10,920 --> 00:28:12,120 you know, malicious parameters. 635 00:28:12,620 --> 00:28:14,440 If you're doing database hacking, you know, 636 00:28:14,440 --> 00:28:16,320 you're putting in some select statements 637 00:28:16,320 --> 00:28:18,040 that aren't really that good, 638 00:28:18,120 --> 00:28:20,400 like select all credit card numbers or whatever, 639 00:28:20,620 --> 00:28:22,400 you know, things like that, you want to make sure 640 00:28:22,400 --> 00:28:24,120 if you're trying to evade an IDS 641 00:28:24,120 --> 00:28:26,100 that that's not in plain text. 642 00:28:26,960 --> 00:28:28,660 This also works well for, like, you know, 643 00:28:28,660 --> 00:28:31,460 again, cgi input errors with the parameters at the end, 644 00:28:31,540 --> 00:28:34,140 or if you're, you know, finding an unpatched IS server, 645 00:28:34,420 --> 00:28:35,500 there's still some out there. 646 00:28:36,040 --> 00:28:38,820 You know, you can use your command.exe 647 00:28:38,820 --> 00:28:39,860 with the parameter types. 648 00:28:41,220 --> 00:28:42,520 So how does this one work? 649 00:28:43,040 --> 00:28:44,840 Well, instead of doing a git request 650 00:28:44,840 --> 00:28:47,720 and putting the parameters after the question mark 651 00:28:47,720 --> 00:28:50,780 and encoding that with whatever URL encoding you want to do, 652 00:28:50,860 --> 00:28:53,880 because most IDSs decode the URL 653 00:28:53,880 --> 00:28:56,160 and the parameter URL field, too, 654 00:28:56,220 --> 00:28:57,760 so you can't really get away with that anymore. 655 00:28:57,760 --> 00:29:00,320 What you do now is you actually change that git request 656 00:29:00,320 --> 00:29:01,320 into a POST request, 657 00:29:01,920 --> 00:29:05,100 and you put the parameters down after the header section 658 00:29:05,100 --> 00:29:06,460 into the HTTP payload. 659 00:29:07,260 --> 00:29:09,320 So we've moved the parameters down to the payload, 660 00:29:09,480 --> 00:29:10,840 but again, it's still in plain text. 661 00:29:11,140 --> 00:29:13,240 So an IDS most likely is going to find 662 00:29:13,240 --> 00:29:15,040 that malicious content that it's looking for. 663 00:29:15,240 --> 00:29:16,540 So we make it a little tougher 664 00:29:16,540 --> 00:29:19,640 by using the content encoding header in the POST request 665 00:29:20,080 --> 00:29:21,960 and, you know, picking your favorite type of encoding, 666 00:29:22,180 --> 00:29:23,340 like you could either zip it 667 00:29:23,340 --> 00:29:25,420 or you could, like, base64 encode it, 668 00:29:25,440 --> 00:29:26,600 or whatever you want to do, 669 00:29:26,600 --> 00:29:30,680 and then run your parameters through base64 encoding, 670 00:29:30,960 --> 00:29:32,960 like, you know, on whatever you want to do there, 671 00:29:33,140 --> 00:29:35,020 and then putting that into the payload. 672 00:29:35,360 --> 00:29:37,920 So what an IDS now has to do is say, 673 00:29:37,980 --> 00:29:39,020 okay, this is a POST request. 674 00:29:39,420 --> 00:29:41,360 What type of encoding is it using? 675 00:29:41,540 --> 00:29:43,140 And then it goes down to the end of the payload 676 00:29:43,140 --> 00:29:44,020 and decodes that. 677 00:29:45,140 --> 00:29:46,200 IDSs just don't do that, 678 00:29:46,260 --> 00:29:48,400 because right now it would be very time-consuming 679 00:29:48,400 --> 00:29:51,140 and lead to potential DOS attacks against that, you know, 680 00:29:51,160 --> 00:29:52,540 because there's a lot of valid POST traffic 681 00:29:52,540 --> 00:29:55,260 and, you know, it's a little scary. 682 00:29:55,260 --> 00:29:57,060 So this is what it would kind of look like here. 683 00:29:57,140 --> 00:29:59,360 You got the POST CGI BIM PHF. 684 00:30:00,100 --> 00:30:03,080 You know, again, people see that PHF and say, 685 00:30:03,160 --> 00:30:05,380 oh, it's an ATT&CK, but say, for example, 686 00:30:05,400 --> 00:30:07,380 you're accessing, like, a database, like Oracle. 687 00:30:07,860 --> 00:30:11,820 You can't really write a signature for Oracle database access 688 00:30:11,820 --> 00:30:15,940 because there's a lot of valid traffic going across there, 689 00:30:16,020 --> 00:30:18,040 so you'll just get a lot of false positives. 690 00:30:18,340 --> 00:30:22,120 So if you're actually accessing a valid resource on the web, 691 00:30:22,320 --> 00:30:24,860 you're not going to be able to really detect this ATT&CK. 692 00:30:25,340 --> 00:30:27,920 So as you see, we basically set the content encoding. 693 00:30:28,760 --> 00:30:31,140 Base64, we set the content length as 15, 694 00:30:31,540 --> 00:30:34,340 and then the parameter sections to CGI BIM PHF, 695 00:30:34,400 --> 00:30:36,940 for example, you know, QAlias, whatever you want to do. 696 00:30:37,120 --> 00:30:40,300 So, you know, again, IDS will be looking for QAlias. 697 00:30:40,360 --> 00:30:42,320 It's not going to find it there in the Base64 encoding. 698 00:30:44,380 --> 00:30:47,620 All right, so that's kind of the more formal part of this talk. 699 00:30:47,920 --> 00:30:50,080 Now we're going to talk a little bit about the different tools 700 00:30:50,080 --> 00:30:52,540 that there's available for you guys to use. 701 00:30:53,060 --> 00:30:54,240 Basically, there's three different ones. 702 00:30:54,240 --> 00:30:56,460 An encoder.c, you know, 703 00:30:56,460 --> 00:30:58,660 this is going to do all the different encodings we just talked about, 704 00:30:58,760 --> 00:30:59,820 and this is a command line version. 705 00:31:00,080 --> 00:31:02,580 It runs on both Windows and, you know, Star Nix, 706 00:31:02,600 --> 00:31:05,080 whatever you want to do, Linux, BSD, whatever. 707 00:31:06,520 --> 00:31:08,520 And then we got HTTP Chameleon, 708 00:31:08,540 --> 00:31:10,880 which was written by Mark Norton, my colleague. 709 00:31:11,100 --> 00:31:14,420 He basically wrapped up the functionality in encoder.c 710 00:31:14,420 --> 00:31:16,260 with a really nice Windows GUI. 711 00:31:16,340 --> 00:31:18,080 So, you know, it's okay. 712 00:31:18,260 --> 00:31:20,240 I don't, you know, just because you use the GUI 713 00:31:20,240 --> 00:31:21,940 doesn't mean you're less elite than anyone else, 714 00:31:22,020 --> 00:31:23,420 but I actually find it pretty useful, 715 00:31:24,240 --> 00:31:26,140 you know, keeps a lot of the history around, 716 00:31:26,220 --> 00:31:28,200 keeps a lot of different templates that you can use, 717 00:31:28,300 --> 00:31:30,880 and hopefully it'll make it a lot more accessible to everyone. 718 00:31:31,400 --> 00:31:34,940 And then the final one we got is the Microsoft Unicode map.c. 719 00:31:35,380 --> 00:31:38,980 What that basically does is you run that on your Windows box, 720 00:31:39,140 --> 00:31:41,100 your IIS server, whatever you want to do, 721 00:31:41,240 --> 00:31:42,900 and it dumps all the code pages 722 00:31:42,900 --> 00:31:44,580 and the code points that's on your system. 723 00:31:45,580 --> 00:31:47,080 You know, maybe just for your information, 724 00:31:47,220 --> 00:31:50,280 if you kind of want to know what code pages your system's using, 725 00:31:50,800 --> 00:31:53,420 this will also be very useful 726 00:31:53,420 --> 00:31:55,660 when the new Snort HTTP decoder comes out, 727 00:31:55,720 --> 00:31:58,840 because the new configuration allows you to specify 728 00:31:58,840 --> 00:32:00,660 certain code pages and code points 729 00:32:00,660 --> 00:32:02,180 for individual HTTP servers, 730 00:32:02,380 --> 00:32:05,420 so you can make sure you can catch the specific attacks. 731 00:32:05,980 --> 00:32:08,740 You know, for instance, to kind of give you an example about this, 732 00:32:09,440 --> 00:32:13,420 a lot of people try to decode Unicode code points 733 00:32:13,420 --> 00:32:15,920 to Chinese web servers, IIS web servers, 734 00:32:16,440 --> 00:32:18,760 using, like, the American code point mappings, 735 00:32:18,820 --> 00:32:20,580 and, you know, that doesn't work, 736 00:32:20,660 --> 00:32:22,500 because, like, they have a different A equals 737 00:32:22,500 --> 00:32:24,840 different code points on the Chinese web server. 738 00:32:25,220 --> 00:32:27,580 So if, you know, I don't know if any of you guys have, 739 00:32:27,660 --> 00:32:30,300 you're administering or watching different web servers, 740 00:32:30,380 --> 00:32:32,380 like, say, in Hungary or China, America, 741 00:32:32,860 --> 00:32:34,220 you know, it's good to know this, 742 00:32:34,280 --> 00:32:36,760 because a lot of IDSs, all they do is default 743 00:32:36,760 --> 00:32:39,100 to the American code page, 744 00:32:39,680 --> 00:32:41,260 and, you know, it's wrong. 745 00:32:41,500 --> 00:32:43,480 So I just wanted to bring that up. 746 00:32:43,560 --> 00:32:45,540 So we'll talk a little bit now about the tools. 747 00:32:45,760 --> 00:32:47,060 Start off with encoder.c. 748 00:32:47,760 --> 00:32:49,000 This is a command line tool, 749 00:32:49,140 --> 00:32:52,060 allows very fine-grained encoding of HTTP URLs. 750 00:32:52,520 --> 00:32:54,100 You can encode, like, each character 751 00:32:54,100 --> 00:32:55,680 in a different type of encoding you want. 752 00:32:55,760 --> 00:32:57,360 You can throw in directory traversals, 753 00:32:57,380 --> 00:32:59,840 multiple slashes, backslashes, 754 00:33:00,340 --> 00:33:01,140 whatever you want to do. 755 00:33:02,320 --> 00:33:04,420 You know, also, in case you don't have, like, 756 00:33:04,420 --> 00:33:06,620 Netcat on your machine to pipe what this prints out 757 00:33:06,620 --> 00:33:08,380 across the wire, there are some simple 758 00:33:08,380 --> 00:33:10,080 socket support built in, so, you know, 759 00:33:10,100 --> 00:33:12,620 you can just port this program over, 760 00:33:12,700 --> 00:33:13,840 and you'll be able to, you know, 761 00:33:13,840 --> 00:33:15,260 do some research on the web servers 762 00:33:15,260 --> 00:33:16,580 or do some IDS testing. 763 00:33:17,840 --> 00:33:20,060 And I would suggest, though, if you do run Windows 764 00:33:20,060 --> 00:33:21,640 or, you know, like Windows, 765 00:33:22,500 --> 00:33:23,660 use HTTP Chameleon instead. 766 00:33:23,900 --> 00:33:25,580 You know, it's a lot more useful, as you'll see, 767 00:33:25,660 --> 00:33:26,900 because I'll do a little demonstration here 768 00:33:26,900 --> 00:33:27,360 in a little bit. 769 00:33:30,140 --> 00:33:30,580 Okay. 770 00:33:31,620 --> 00:33:32,700 Encoder.c usage. 771 00:33:33,160 --> 00:33:35,320 Basically, you got your three different ways 772 00:33:35,320 --> 00:33:36,400 you can encode text. 773 00:33:36,640 --> 00:33:38,600 You can encode a single character by just doing 774 00:33:38,600 --> 00:33:41,500 slash A with a character or the encoding type. 775 00:33:41,680 --> 00:33:44,120 Slash A in encoder.c happens to be ASCII encoding 776 00:33:44,120 --> 00:33:44,900 or hex encoding. 777 00:33:45,560 --> 00:33:47,160 If you want to encode a whole string, 778 00:33:47,380 --> 00:33:49,680 you basically just put the string in the braces there. 779 00:33:50,260 --> 00:33:51,660 And if you want to do, like, 780 00:33:52,500 --> 00:33:54,480 just outside the range of a normal ASCII character, 781 00:33:54,680 --> 00:33:55,820 like, say you want to encode, like, 782 00:33:55,840 --> 00:33:57,780 you know, 1FF or something, 783 00:33:57,960 --> 00:34:00,060 you just kind of put that in there to the code point. 784 00:34:00,280 --> 00:34:02,080 Remember, this kind of is like C syntax, 785 00:34:02,140 --> 00:34:03,900 so if you're using a hexadecimal value, 786 00:34:04,160 --> 00:34:06,880 put a zero lowercase x in front of that value 787 00:34:06,880 --> 00:34:08,540 to designate that it's actually a hex encoding. 788 00:34:10,780 --> 00:34:12,280 Okay, HTTP Chameleon, 789 00:34:12,300 --> 00:34:13,680 written by a colleague, Mark Norton, 790 00:34:13,740 --> 00:34:15,500 with the Windows GUI. 791 00:34:15,540 --> 00:34:16,760 I think it's much more usable, 792 00:34:16,920 --> 00:34:19,360 and I guess we'll do a quick demonstration here with it 793 00:34:19,360 --> 00:34:21,660 so you guys can kind of check this out. 794 00:34:23,420 --> 00:34:24,440 Okay, this is pretty much 795 00:34:24,440 --> 00:34:25,660 what the GUI looks like here. 796 00:34:26,900 --> 00:34:27,720 As you can see, 797 00:34:27,860 --> 00:34:29,880 got an about box, a help box. 798 00:34:30,100 --> 00:34:31,380 The help's actually pretty advanced, 799 00:34:31,560 --> 00:34:33,940 so, you know, download this at your leisure 800 00:34:33,940 --> 00:34:35,820 and go ahead and read different things. 801 00:34:35,900 --> 00:34:37,100 It kind of gives you some quick starts, 802 00:34:37,980 --> 00:34:39,440 how to use different things, 803 00:34:39,920 --> 00:34:41,420 save some templates for yourself. 804 00:34:41,600 --> 00:34:43,920 It also explains the different types of encodings here. 805 00:34:45,040 --> 00:34:45,640 You know, 806 00:34:46,160 --> 00:34:47,540 and, like, for example, you know, 807 00:34:47,580 --> 00:34:50,260 first nibbles, slash i, you know, etc., 808 00:34:50,260 --> 00:34:50,920 things like that. 809 00:34:52,500 --> 00:34:53,260 This is this way. 810 00:34:54,800 --> 00:34:56,680 You know, we'll take the basic Unicode attack, 811 00:34:56,880 --> 00:34:57,460 years old. 812 00:34:57,960 --> 00:34:59,100 We'll select that one. 813 00:35:00,340 --> 00:35:01,400 Kind of comes down here. 814 00:35:01,740 --> 00:35:03,020 And this is the basic attack. 815 00:35:03,380 --> 00:35:04,700 You know, it's basically a template. 816 00:35:04,800 --> 00:35:06,840 So you can decide how you want to encode this one. 817 00:35:07,100 --> 00:35:09,240 So, for example, you could say, okay, scripts. 818 00:35:09,560 --> 00:35:13,380 I think many IDSs will be able to find that, 819 00:35:13,420 --> 00:35:15,100 and that shouldn't be normal access. 820 00:35:15,580 --> 00:35:16,660 So we could do, like, 821 00:35:16,700 --> 00:35:18,400 a short UTF-8 encoding. 822 00:35:18,520 --> 00:35:19,440 So we'll double-click that. 823 00:35:20,220 --> 00:35:21,900 You know, pops up what I highlighted. 824 00:35:22,500 --> 00:35:24,100 You know, I didn't highlight the whole scripts, 825 00:35:24,160 --> 00:35:25,040 just a little bit of it. 826 00:35:25,200 --> 00:35:26,680 And then, you know, click okay, 827 00:35:26,780 --> 00:35:28,280 and it puts in the encoding for that. 828 00:35:28,980 --> 00:35:30,360 Then, you know, for example, 829 00:35:30,400 --> 00:35:32,020 then we got WinNT system 32. 830 00:35:33,100 --> 00:35:34,780 Let's maybe encode that a little bit, 831 00:35:34,840 --> 00:35:35,640 obscure it up a bit. 832 00:35:36,000 --> 00:35:37,900 Maybe use double hex encoding for that. 833 00:35:38,360 --> 00:35:39,360 Double-click on there. 834 00:35:39,800 --> 00:35:41,160 Comes up, you click okay, 835 00:35:41,320 --> 00:35:42,500 puts that one in there, too. 836 00:35:43,480 --> 00:35:46,000 Then at command.exe, you definitely don't want that in there. 837 00:35:46,320 --> 00:35:47,840 So you do this one, 838 00:35:47,840 --> 00:35:51,380 and maybe do a mismatch encoding on that. 839 00:35:52,460 --> 00:35:53,600 And we'll do the, 840 00:35:53,640 --> 00:35:55,040 say, okay, fine. 841 00:35:55,600 --> 00:35:56,820 All right, so you kind of have that. 842 00:35:56,860 --> 00:35:58,540 Then once you're ready, then you click encode, 843 00:35:58,540 --> 00:36:01,600 and up comes your encoded URL here. 844 00:36:01,840 --> 00:36:04,400 So anyone want to try and read that out for me now? 845 00:36:05,520 --> 00:36:06,140 All right. 846 00:36:06,340 --> 00:36:08,080 So basically, you know, you got all that, 847 00:36:08,180 --> 00:36:09,900 and you're hoping now at this point 848 00:36:09,900 --> 00:36:12,540 that your IDS actually can encode and decode that. 849 00:36:13,940 --> 00:36:16,400 So, you know, now you basically put in your HTTP host, 850 00:36:16,500 --> 00:36:17,400 and you can send the request. 851 00:36:17,840 --> 00:36:20,940 The HTTP response spits out what you got back. 852 00:36:21,100 --> 00:36:23,040 So, you know, you can tell if it was successful or not. 853 00:36:23,520 --> 00:36:24,520 It's kind of interesting, you know, 854 00:36:24,540 --> 00:36:26,360 try it out against, you know, like your home web 855 00:36:26,360 --> 00:36:28,620 or like some of your test web servers or whatever 856 00:36:28,620 --> 00:36:29,520 to see what you can get. 857 00:36:29,920 --> 00:36:31,000 So it kind of works like that. 858 00:36:31,140 --> 00:36:32,860 The other thing that's kind of nice is, 859 00:36:33,200 --> 00:36:33,720 let's see here, 860 00:36:35,940 --> 00:36:37,480 for example, if you do this, 861 00:36:39,320 --> 00:36:40,400 and get this up here, 862 00:36:40,520 --> 00:36:41,120 Unicode Explorer, 863 00:36:43,420 --> 00:36:44,800 I think it still has some problems 864 00:36:44,800 --> 00:36:47,140 with the XP here that I'm running, 865 00:36:47,240 --> 00:36:47,820 which, by the way, 866 00:36:47,840 --> 00:36:49,100 this is my wife's laptop. 867 00:36:49,520 --> 00:36:51,420 The company I work with couldn't give me, 868 00:36:51,440 --> 00:36:52,820 I guess they didn't have any laptops available. 869 00:36:53,020 --> 00:36:55,800 So, you know, it's mad props to GW Law. 870 00:36:57,540 --> 00:36:58,500 So, but basically, 871 00:36:58,900 --> 00:37:00,440 you got a couple different things here, 872 00:37:01,780 --> 00:37:03,380 and see if this will come up here. 873 00:37:05,860 --> 00:37:06,940 Sometimes, sometimes not. 874 00:37:09,860 --> 00:37:10,560 Oh, no. 875 00:37:11,740 --> 00:37:12,900 But, so we got this. 876 00:37:12,960 --> 00:37:13,720 Now I want to explain, 877 00:37:14,420 --> 00:37:15,480 oh, not responding. 878 00:37:17,920 --> 00:37:18,800 Oh, I just, 879 00:37:18,800 --> 00:37:20,980 I just rooted my box. 880 00:37:22,400 --> 00:37:23,380 I'm cool. 881 00:37:24,240 --> 00:37:25,380 So, let's see here. 882 00:37:25,620 --> 00:37:26,880 Okay, wait, Unicode Explorer. 883 00:37:27,120 --> 00:37:28,900 So basically what this does here is 884 00:37:28,900 --> 00:37:30,760 you got your code pages you can select. 885 00:37:31,480 --> 00:37:33,860 These are all the code pages that are currently on XP. 886 00:37:34,800 --> 00:37:35,480 You got, 887 00:37:35,560 --> 00:37:37,620 for example, Latin 1 is what is 888 00:37:37,620 --> 00:37:40,220 the default on all American servers. 889 00:37:40,740 --> 00:37:41,260 So, 890 00:37:42,060 --> 00:37:43,100 click that one. 891 00:37:43,240 --> 00:37:44,740 And basically now you can go ahead and 892 00:37:44,740 --> 00:37:47,500 go and pick your favorite character you want to encode. 893 00:37:47,840 --> 00:37:49,700 Remember I was talking about those different values for A? 894 00:37:50,100 --> 00:37:50,840 Well, there you go. 895 00:37:51,420 --> 00:37:52,920 Not only do you got 0x41, 896 00:37:53,120 --> 00:37:55,020 but you got like, you know, six other ones or whatever. 897 00:37:55,380 --> 00:37:57,140 So, you know, feel free to pick it. 898 00:37:57,280 --> 00:37:57,860 And, you know, 899 00:37:58,820 --> 00:38:00,780 you pick one here, it comes up. 900 00:38:00,900 --> 00:38:03,680 And then, you know, you basically have like a reference as well. 901 00:38:03,760 --> 00:38:04,800 You can say, well, what about, 902 00:38:04,920 --> 00:38:06,680 what other code pages 903 00:38:07,180 --> 00:38:09,400 in the system also refer to 904 00:38:09,820 --> 00:38:11,600 code point 0102 905 00:38:11,600 --> 00:38:13,500 as A. So you can kind of scroll down 906 00:38:13,500 --> 00:38:14,920 here and say, oh, okay, cool. 907 00:38:17,100 --> 00:38:17,460 So, 908 00:38:19,000 --> 00:38:19,620 you know, 909 00:38:19,640 --> 00:38:20,720 so you basically got that. 910 00:38:21,240 --> 00:38:23,280 I wanted to also just kind of give you 911 00:38:23,280 --> 00:38:25,180 an idea here for the request pipeline. 912 00:38:25,760 --> 00:38:26,980 Clear these out here. 913 00:38:28,840 --> 00:38:29,280 Basically, 914 00:38:29,500 --> 00:38:31,780 here we go. I'll actually encode it 915 00:38:31,780 --> 00:38:33,020 first because it's a little easier to read. 916 00:38:33,260 --> 00:38:35,860 As you see here, we got the first URL request, 917 00:38:36,120 --> 00:38:36,580 normal. 918 00:38:37,900 --> 00:38:39,960 We got the second, logo.gif. 919 00:38:40,920 --> 00:38:41,920 And we got the third, 920 00:38:42,020 --> 00:38:43,280 cgi-bin-phf. 921 00:38:43,360 --> 00:38:45,440 Well, remember I was telling you, don't leave that 922 00:38:45,440 --> 00:38:47,760 cgi-bin-phf in print. 923 00:38:47,840 --> 00:38:49,260 It's there. So basically, we're just going to 924 00:38:49,640 --> 00:38:50,400 take it all 925 00:38:52,680 --> 00:38:53,720 and highlight it. 926 00:38:53,900 --> 00:38:55,820 Wait. I don't want that space there. 927 00:38:57,260 --> 00:38:57,860 There we go. 928 00:38:58,520 --> 00:38:59,440 And then we say, 929 00:38:59,920 --> 00:39:01,860 I'll just do a simple hex encoding on this. 930 00:39:03,120 --> 00:39:03,480 Okay. 931 00:39:03,540 --> 00:39:05,120 Looks good. Click okay. 932 00:39:05,460 --> 00:39:07,560 Then encode it. So we're back here. 933 00:39:07,780 --> 00:39:09,360 Everything looks the same except 934 00:39:10,180 --> 00:39:11,400 cgi-bin-phf's gone. 935 00:39:11,720 --> 00:39:13,480 So that's kind of the idea behind it, alright? 936 00:39:14,300 --> 00:39:15,920 So like I said, you know, play around with it. 937 00:39:16,000 --> 00:39:17,720 Send us, you know, if you find something not working, 938 00:39:17,840 --> 00:39:19,080 where you have some troubles with something, 939 00:39:19,660 --> 00:39:21,880 we're probably going to be releasing a new version of it 940 00:39:21,880 --> 00:39:23,620 that will fix some of the problems 941 00:39:23,620 --> 00:39:25,720 in the next week or two, so feel free to check back 942 00:39:25,720 --> 00:39:27,600 at idsresearch.org for the latest. 943 00:39:29,740 --> 00:39:30,780 So let's see here. 944 00:39:31,680 --> 00:39:33,140 So back to the slideshow. 945 00:39:34,820 --> 00:39:35,420 And we're 946 00:39:35,420 --> 00:39:36,700 almost done at this point. 947 00:39:38,800 --> 00:39:39,500 Alright, so 948 00:39:40,660 --> 00:39:41,920 the msunicodemap.c 949 00:39:41,920 --> 00:39:43,680 this basically, you know, like you saw 950 00:39:43,680 --> 00:39:45,740 in the Unicode Explorer that eventually came up, 951 00:39:46,360 --> 00:39:47,100 it basically 952 00:39:47,840 --> 00:39:49,400 tells you what the different code pages are 953 00:39:49,400 --> 00:39:50,100 and the code points. 954 00:39:50,900 --> 00:39:52,840 And slide 37 and we're done. 955 00:39:52,940 --> 00:39:55,620 Maybe a little early, but thanks for being a great audience 956 00:39:55,620 --> 00:39:56,820 and not heckling too much. 957 00:39:57,360 --> 00:39:59,980 You know, download the updated tools at idsresearch.org. 958 00:40:01,120 --> 00:40:01,680 You know, 959 00:40:01,680 --> 00:40:03,140 and I may be releasing some 960 00:40:04,700 --> 00:40:05,780 like some code 961 00:40:05,780 --> 00:40:07,260 for, basically you'll scan a web server 962 00:40:07,820 --> 00:40:08,720 and go through 963 00:40:09,520 --> 00:40:11,660 and tell you what types of encodings work on that 964 00:40:11,660 --> 00:40:13,200 web server, you know, so you can test out, 965 00:40:13,260 --> 00:40:15,040 make your IDS testing a little easier. 966 00:40:15,040 --> 00:40:16,800 So, alright, so 967 00:40:16,800 --> 00:40:17,640 questions anyone? 968 00:40:18,460 --> 00:40:19,520 I got one right up here. 969 00:40:21,100 --> 00:40:22,120 Yep, good job. 970 00:40:22,780 --> 00:40:23,180 Alright. 971 00:40:25,340 --> 00:40:25,740 Nice. 972 00:40:29,800 --> 00:40:30,200 Yeah. 973 00:40:34,800 --> 00:40:35,200 Right. 974 00:40:37,020 --> 00:40:38,260 I guess we'll have to find out. 975 00:40:38,860 --> 00:40:40,540 I can't really talk too much about it, so 976 00:40:40,540 --> 00:40:42,120 sorry you didn't tell me to, you know, 977 00:40:42,120 --> 00:40:43,280 yeah, to talk too much about it. 978 00:40:43,320 --> 00:40:45,280 It should be coming out in the next couple months, so 979 00:40:45,280 --> 00:40:47,620 you know, it's gone through some pretty rigorous testing, 980 00:40:47,720 --> 00:40:48,640 so we'll give it a shot. 981 00:40:50,060 --> 00:40:50,960 And the question here? 982 00:40:51,700 --> 00:40:52,960 In a lot of cases, 983 00:40:53,940 --> 00:40:55,780 encoding is not something 984 00:40:56,300 --> 00:40:57,440 that you would see. 985 00:40:58,880 --> 00:40:59,280 And 986 00:41:00,900 --> 00:41:01,700 how much 987 00:41:01,700 --> 00:41:03,940 are you looking at doing signatures for encoding 988 00:41:03,940 --> 00:41:05,580 versus the signatures 989 00:41:05,580 --> 00:41:07,120 for what, I mean, 990 00:41:07,140 --> 00:41:09,580 basically for, it's silly to talk basically 991 00:41:09,580 --> 00:41:11,560 for a processing environment there, 992 00:41:12,120 --> 00:41:12,980 but it's easy enough to tell 993 00:41:12,980 --> 00:41:14,520 that it's basically for encoding, 994 00:41:14,560 --> 00:41:15,960 and the odds are that it's going to be 995 00:41:15,960 --> 00:41:19,340 Okay, question was, basically, 996 00:41:19,360 --> 00:41:21,580 instead of like actually decoding the URL, 997 00:41:21,780 --> 00:41:23,740 could you just basically, you know, 998 00:41:23,740 --> 00:41:25,480 try and detect that encoding's been used? 999 00:41:25,720 --> 00:41:26,500 It's a good question. 1000 00:41:26,660 --> 00:41:27,740 You definitely can do that. 1001 00:41:27,880 --> 00:41:29,280 The only problem with that is that 1002 00:41:29,740 --> 00:41:32,620 you really won't be able to get the attack that was sent. 1003 00:41:32,780 --> 00:41:34,080 You know, you'll get the alert that says, 1004 00:41:34,200 --> 00:41:35,480 hey, this URL was encoded, 1005 00:41:35,560 --> 00:41:38,920 but unless you're like a decoding expert on like URLs, 1006 00:41:39,140 --> 00:41:40,480 you probably aren't going to know what the, 1007 00:41:42,140 --> 00:41:42,800 brought about. 1008 00:41:43,080 --> 00:41:45,500 So, you know, we actually want to try and do those decodings 1009 00:41:45,500 --> 00:41:45,940 if we can. 1010 00:41:47,000 --> 00:41:48,120 Okay, question over here? 1011 00:41:50,640 --> 00:41:54,880 Yeah, yeah. 1012 00:41:56,920 --> 00:42:01,320 Oh, like how's EtherReal up against that? 1013 00:42:01,640 --> 00:42:03,140 Okay, basically the question was, 1014 00:42:03,280 --> 00:42:05,820 say you capture some of this traffic with EtherReal, 1015 00:42:06,340 --> 00:42:07,700 EtherReal doesn't decode URLs. 1016 00:42:08,380 --> 00:42:10,060 So, you're kind of up on your own. 1017 00:42:10,620 --> 00:42:11,320 Yeah, exactly. 1018 00:42:12,780 --> 00:42:14,100 So, okay, next question. 1019 00:42:15,540 --> 00:42:16,480 Right there in front. 1020 00:42:24,900 --> 00:42:25,980 Okay, question was, 1021 00:42:26,500 --> 00:42:28,300 do these encodings work across HTTPS 1022 00:42:28,940 --> 00:42:30,920 and is there any way that we're going to 1023 00:42:30,920 --> 00:42:33,860 maybe change the HTTP chameleon tool 1024 00:42:33,860 --> 00:42:34,940 and to support that? 1025 00:42:35,060 --> 00:42:36,060 Yeah, we may in the future, 1026 00:42:36,120 --> 00:42:37,380 and yeah, they definitely work over that. 1027 00:42:38,420 --> 00:42:39,840 Anyone know what time it is? 1028 00:42:39,900 --> 00:42:41,160 I want to make sure I'm not going over time. 1029 00:42:42,620 --> 00:42:43,300 What is it? 1030 00:42:44,520 --> 00:42:46,260 Oh, okay, so we got some time. 1031 00:42:46,740 --> 00:42:47,980 All right, more questions? 1032 00:42:48,960 --> 00:42:49,780 This one down here? 1033 00:42:52,900 --> 00:42:54,220 Yeah, this actually 1034 00:42:54,220 --> 00:42:56,180 deprecates some of the double decodings 1035 00:42:56,180 --> 00:42:58,340 for IIS, but not the Unicode code points. 1036 00:42:58,720 --> 00:42:59,680 So, you know, again, 1037 00:42:59,740 --> 00:43:01,160 if your IDS doesn't know the different 1038 00:43:01,700 --> 00:43:03,600 values for the Unicode code points, 1039 00:43:03,620 --> 00:43:04,780 then you'll be evaded that way. 1040 00:43:04,860 --> 00:43:05,680 But yeah, that's a good question. 1041 00:43:05,980 --> 00:43:07,700 By the way, the question was, 1042 00:43:07,700 --> 00:43:09,320 if you use, like, URL scan 1043 00:43:09,320 --> 00:43:10,900 for the IIS web server, 1044 00:43:11,040 --> 00:43:13,020 does it help you with some of the decodings 1045 00:43:13,020 --> 00:43:14,280 and not make them all available? 1046 00:43:14,500 --> 00:43:16,480 And it does not make them all available. 1047 00:43:16,820 --> 00:43:18,440 Question in the back there I thought we had? 1048 00:43:19,460 --> 00:43:19,900 Yeah? 1049 00:43:24,160 --> 00:43:25,740 I haven't tested against that, 1050 00:43:25,780 --> 00:43:26,280 so I don't know. 1051 00:43:26,400 --> 00:43:28,660 He had asked, does the EI 1052 00:43:29,440 --> 00:43:31,520 web scanner stuff work with this? 1053 00:43:31,620 --> 00:43:32,160 I'm not sure. 1054 00:43:33,980 --> 00:43:35,480 Yeah, URL scan 1055 00:43:35,480 --> 00:43:37,580 with IIS actually does deprecate, like, certain 1056 00:43:37,700 --> 00:43:39,660 double decodings, so it kind of just leaves you 1057 00:43:39,660 --> 00:43:41,640 up with the hex encoding, the percent U encoding, 1058 00:43:42,060 --> 00:43:43,180 the UTF-8 encoding, 1059 00:43:43,440 --> 00:43:45,580 the bare byte encoding, and, like, all the multiple 1060 00:43:45,580 --> 00:43:47,140 Unicode code points you can encode. 1061 00:43:48,140 --> 00:43:49,040 Question down here again? 1062 00:43:55,660 --> 00:43:56,860 Okay, like in the tool? 1063 00:43:57,340 --> 00:43:59,480 Okay, question was, if you find, like, 1064 00:43:59,480 --> 00:44:01,340 a really messed up encoded URL, 1065 00:44:01,660 --> 00:44:02,900 could you paste it into the tool, 1066 00:44:03,040 --> 00:44:04,680 and it'll spit out what it was? 1067 00:44:04,760 --> 00:44:06,780 Not at this point, but that is a feature we'd like to add. 1068 00:44:07,700 --> 00:44:09,020 So, okay, question there, too? 1069 00:44:12,860 --> 00:44:13,600 I'm not sure. 1070 00:44:13,660 --> 00:44:15,760 I'm not an expert on, like, configuring IIS, 1071 00:44:15,760 --> 00:44:17,540 and Apache you probably could, 1072 00:44:17,600 --> 00:44:19,220 I'm pretty sure, but I'm not sure about IIS. 1073 00:44:22,580 --> 00:44:22,980 Okay. 1074 00:44:23,520 --> 00:44:24,500 Question over here again. 1075 00:44:25,020 --> 00:44:26,680 Trying to get both sides of the room. 1076 00:44:29,560 --> 00:44:31,080 Yeah, actually there is, because say 1077 00:44:31,080 --> 00:44:33,520 you're trying to access, say, a URL 1078 00:44:33,520 --> 00:44:35,420 that with a HT, like a, 1079 00:44:35,440 --> 00:44:37,200 you're trying to access a web page 1080 00:44:37,700 --> 00:44:38,960 that's Arabic characters. 1081 00:44:39,420 --> 00:44:41,120 The only way you can do that with a URL 1082 00:44:41,120 --> 00:44:43,880 is actually encode it using the valid UTF-8 encoding. 1083 00:44:44,420 --> 00:44:45,660 So, for example, you know, 1084 00:44:45,680 --> 00:44:46,860 or like Hungarian as well, 1085 00:44:46,940 --> 00:44:49,300 if you're trying to use some of the letters 1086 00:44:49,300 --> 00:44:50,620 that aren't in the American alphabet 1087 00:44:50,620 --> 00:44:52,520 or that are actually Unicode code points, 1088 00:44:52,680 --> 00:44:54,300 you would have to encode those certain ones 1089 00:44:54,300 --> 00:44:55,820 in the URL to access it correctly. 1090 00:44:56,340 --> 00:44:57,400 Does that answer your question? 1091 00:44:58,080 --> 00:44:58,440 . 1092 00:45:05,880 --> 00:45:07,180 Yeah, he's wondering, like, 1093 00:45:07,200 --> 00:45:09,300 if he's not really too worried about the decodings 1094 00:45:09,300 --> 00:45:11,580 and, you know, code point encodings, 1095 00:45:11,660 --> 00:45:12,800 then, you know, yeah, 1096 00:45:12,840 --> 00:45:14,740 you can definitely block those at the router 1097 00:45:14,740 --> 00:45:15,740 or however you want to do that. 1098 00:45:15,860 --> 00:45:16,580 Try your best. 1099 00:45:17,860 --> 00:45:18,460 Question there? 1100 00:45:20,540 --> 00:45:20,900 . 1101 00:45:24,560 --> 00:45:25,220 What is it? 1102 00:45:25,780 --> 00:45:26,140 . 1103 00:45:27,520 --> 00:45:28,160 Oh, okay. 1104 00:45:28,280 --> 00:45:30,420 Question was, have I tested this out against 1105 00:45:30,420 --> 00:45:34,140 OpenBSD firewall normalization with that? 1106 00:45:34,280 --> 00:45:35,100 No, I haven't. 1107 00:45:35,100 --> 00:45:37,300 I doubt they incorporate this, though. 1108 00:45:38,280 --> 00:45:39,240 So, but yeah, 1109 00:45:39,320 --> 00:45:40,220 not really sure on that. 1110 00:45:41,560 --> 00:45:42,980 Okay, question over on this side. 1111 00:45:43,860 --> 00:45:44,260 . 1112 00:45:49,540 --> 00:45:50,840 I'm sorry, I didn't really hear you. 1113 00:45:51,140 --> 00:45:51,540 . 1114 00:45:55,760 --> 00:45:56,160 Okay. 1115 00:45:56,160 --> 00:45:57,560 What about them? 1116 00:45:58,260 --> 00:45:58,740 . 1117 00:46:00,740 --> 00:46:03,060 Oh, the browsers actually, you know, 1118 00:46:03,100 --> 00:46:04,360 like, when you get sent back, 1119 00:46:04,400 --> 00:46:06,660 usually the browsers will be able to handle 1120 00:46:06,660 --> 00:46:07,340 Unicode encoding. 1121 00:46:07,680 --> 00:46:09,660 I haven't really tested much out against 1122 00:46:09,660 --> 00:46:11,620 if I actually send all these different types 1123 00:46:11,620 --> 00:46:12,800 of encodings to a browser, 1124 00:46:12,880 --> 00:46:14,580 I've been more server-based, 1125 00:46:14,740 --> 00:46:15,700 but I'm not really sure. 1126 00:46:15,840 --> 00:46:17,060 You're welcome to test that out, though. 1127 00:46:19,040 --> 00:46:20,060 Okay, question here? 1128 00:46:21,620 --> 00:46:22,100 . 1129 00:46:22,860 --> 00:46:23,220 . 1130 00:46:25,180 --> 00:46:26,820 Yeah, it definitely is a flag. 1131 00:46:27,120 --> 00:46:29,580 He had asked, are all these different encodings, 1132 00:46:29,640 --> 00:46:31,000 like, if you see them across the wire, 1133 00:46:31,500 --> 00:46:34,160 you know, aren't these things you want to alert on anyway? 1134 00:46:34,420 --> 00:46:36,420 Yeah, they are definitely things you want to alert on. 1135 00:46:36,540 --> 00:46:37,800 But in the same way, an IDS 1136 00:46:37,800 --> 00:46:39,440 really should decode these things as well, 1137 00:46:39,480 --> 00:46:40,820 so you know, like, what's been accessed. 1138 00:46:41,300 --> 00:46:43,100 Otherwise, like, if you see something like, 1139 00:46:43,760 --> 00:46:45,220 you know, let's see here. 1140 00:46:45,360 --> 00:46:46,500 Oh, I don't have it up anymore. 1141 00:46:46,900 --> 00:46:48,700 But, like, you know, if you see something like that 1142 00:46:48,700 --> 00:46:51,900 CGI then PHF string encoded, 1143 00:46:52,020 --> 00:46:53,400 you're going to have no idea, probably, 1144 00:46:53,520 --> 00:46:55,420 like, what actually was accessed 1145 00:46:55,420 --> 00:46:57,700 and was it a valid URL on your server, even, 1146 00:46:57,800 --> 00:46:58,780 or were you compromised? 1147 00:46:59,320 --> 00:47:00,820 So, but, yeah, okay. 1148 00:47:01,400 --> 00:47:02,340 More questions? 1149 00:47:03,640 --> 00:47:06,000 Okay, and one more after this last question, 1150 00:47:06,060 --> 00:47:06,540 so go ahead. 1151 00:47:06,820 --> 00:47:07,300 . 1152 00:47:11,280 --> 00:47:11,760 . 1153 00:47:13,140 --> 00:47:13,620 . 1154 00:47:13,620 --> 00:47:16,080 These encodings aren't exploits 1155 00:47:16,080 --> 00:47:17,000 in and of themselves. 1156 00:47:17,400 --> 00:47:18,680 These are really IDS events. 1157 00:47:18,700 --> 00:47:19,120 These aren't invasions. 1158 00:47:19,340 --> 00:47:21,440 The only solution to these 1159 00:47:21,440 --> 00:47:23,500 are actually for your IDS to be smart enough 1160 00:47:23,500 --> 00:47:24,640 to handle all these things. 1161 00:47:25,000 --> 00:47:27,760 Otherwise, you're probably not going to 1162 00:47:27,760 --> 00:47:29,600 be able to handle these correctly 1163 00:47:29,600 --> 00:47:30,680 or even detect them 1164 00:47:30,680 --> 00:47:32,220 or anything like that. 1165 00:47:34,020 --> 00:47:36,420 Yeah, and we should be out fairly shortly. 1166 00:47:36,840 --> 00:47:37,860 Okay, last question. 1167 00:47:38,100 --> 00:47:39,540 I'll see if anyone from this side, 1168 00:47:39,740 --> 00:47:41,260 because I've been answering a lot from this side. 1169 00:47:41,460 --> 00:47:42,860 All right, then. Right here. 1170 00:47:43,440 --> 00:47:44,460 Did I already ask? 1171 00:47:45,100 --> 00:47:47,020 Let me get this guy, because he's a new one. 1172 00:47:49,320 --> 00:47:49,680 . 1173 00:47:53,680 --> 00:47:54,040 . 1174 00:47:54,040 --> 00:47:54,400 . 1175 00:47:54,400 --> 00:47:55,080 They already do. 1176 00:47:55,780 --> 00:47:56,460 Yeah, Apache. 1177 00:47:56,600 --> 00:47:58,340 They already support Unicode encodings. 1178 00:47:59,300 --> 00:48:01,000 So, yes, in URLs, yeah. 1179 00:48:01,220 --> 00:48:03,420 But remember, they only use the UTF-8 standard 1180 00:48:03,420 --> 00:48:04,420 that we had talked about, 1181 00:48:04,580 --> 00:48:06,560 not like the %U and all that stuff. 1182 00:48:07,000 --> 00:48:08,580 All right, so that ends the question and answers. 1183 00:48:08,720 --> 00:48:10,140 Thanks a lot, people, for coming out. 1184 00:48:10,180 --> 00:48:12,340 If you want to talk to me afterwards, just come by. 1185 00:48:12,880 --> 00:48:13,680 Thanks a lot. 1186 00:48:14,080 --> 00:48:14,440 . 1187 00:48:18,700 --> 00:48:19,060 . 1188 00:48:19,060 --> 00:48:19,700 . 1189 00:48:21,000 --> 00:48:21,520 . 1190 00:48:21,520 --> 00:48:22,100 . 1191 00:48:22,100 --> 00:48:22,360 . 1192 00:48:22,360 --> 00:48:22,560 . 1193 00:48:22,560 --> 00:48:22,600 . 1194 00:48:22,600 --> 00:48:22,640 . 1195 00:48:22,640 --> 00:48:23,620 . 1196 00:48:23,620 --> 00:48:23,680 . 1197 00:48:23,680 --> 00:48:23,840 .