1 00:00:00,000 --> 00:00:02,160 This is Greater Than One, and I'm Brendan. 2 00:00:03,120 --> 00:00:04,260 So, who am I? 3 00:00:05,560 --> 00:00:07,340 I'm just some random hacker from the Midwest. 4 00:00:07,700 --> 00:00:09,100 You probably haven't heard of me. 5 00:00:09,140 --> 00:00:13,640 Last year, I gave a talk at Black Hat about hacking Xerox copiers, printers, multifunction devices. 6 00:00:14,540 --> 00:00:16,240 If you didn't see it, you don't know who I am. 7 00:00:17,840 --> 00:00:19,100 Why am I doing this? 8 00:00:19,260 --> 00:00:24,280 I'm doing this because the financial sector is obviously a very big, very important sector. 9 00:00:24,280 --> 00:00:30,020 And, over the past year, they've done this tremendous shift in the way they're authenticating their users, 10 00:00:30,200 --> 00:00:31,920 and nobody's talking about it. 11 00:00:32,020 --> 00:00:35,280 I don't know if no one noticed, or if people noticed and just didn't look at it, 12 00:00:35,360 --> 00:00:37,560 but no one's talking about this, and it's important. 13 00:00:38,620 --> 00:00:40,000 What is the goal of this presentation? 14 00:00:40,500 --> 00:00:43,900 The goal is, at the end of this, for every person in the audience to say, 15 00:00:44,080 --> 00:00:45,740 that's simple, I could have done that. 16 00:00:46,200 --> 00:00:46,960 That's my goal. 17 00:00:47,060 --> 00:00:47,820 This is simple stuff. 18 00:00:48,120 --> 00:00:52,300 We're going to talk about it, and I hope you all have the same understanding that I do when we get out of this. 19 00:00:52,980 --> 00:00:54,040 And, as a disclaimer, 20 00:00:54,280 --> 00:00:55,460 I am not targeting anyone. 21 00:00:55,680 --> 00:01:00,680 I'm not specifically targeting any sites, any banks, or financial institutions, 22 00:01:00,780 --> 00:01:02,460 or any technology vendors. 23 00:01:02,940 --> 00:01:04,780 It's my opinion that they all kind of suck. 24 00:01:05,360 --> 00:01:09,100 Some suck more than others, but I don't think anyone's doing it right. 25 00:01:11,160 --> 00:01:13,580 All right, so we're going to do some background information. 26 00:01:13,800 --> 00:01:15,380 I'm going to discuss control types. 27 00:01:15,580 --> 00:01:18,220 We're going to look in depth at three of the main technologies, 28 00:01:18,440 --> 00:01:21,560 device fingerprinting, one-time passwords, knowledge-based archives, 29 00:01:22,080 --> 00:01:23,560 get that code and demo in, 30 00:01:24,280 --> 00:01:25,780 conclusions, which is me just ranting. 31 00:01:27,020 --> 00:01:30,400 All right, so who here uses internet banking, internet bill pay, 32 00:01:31,060 --> 00:01:36,760 checks or pays, a car loan or mortgage, retirement, 401k, any type of financial services? 33 00:01:37,460 --> 00:01:38,320 A lot of you. 34 00:01:38,940 --> 00:01:40,820 Obviously, a lot of people in America do this. 35 00:01:40,880 --> 00:01:45,820 We're not quite up to the penetration rate that Europe or places like Korea and Japan are, 36 00:01:45,920 --> 00:01:50,580 but a lot of people use these services and have come to rely on these services. 37 00:01:50,900 --> 00:01:54,140 Hopefully, you that do internet banking or internet financial transactions, 38 00:01:54,140 --> 00:01:56,440 are going to recognize some of the things I'm talking about. 39 00:01:57,560 --> 00:02:00,180 So to understand why I'm talking about this, 40 00:02:00,240 --> 00:02:01,940 we need to understand what's driving the industry. 41 00:02:02,140 --> 00:02:06,120 And this is FFIEC, Federal Financial Institution Examination Council. 42 00:02:06,480 --> 00:02:10,180 It's a federal governing body that about a year and a half ago 43 00:02:10,180 --> 00:02:13,720 came out with a document called Authentication in an Internet Banking Environment. 44 00:02:14,080 --> 00:02:19,380 This is a regulation that applies to all financial institutions that the FFIEC governs. 45 00:02:19,980 --> 00:02:21,600 It's a pretty brief document. 46 00:02:21,720 --> 00:02:23,640 You can find it at FFIEC.gov. 47 00:02:24,140 --> 00:02:24,780 Or just Google it. 48 00:02:25,200 --> 00:02:28,920 I'm going to talk about one key paragraph, the thesis statement of this document. 49 00:02:29,720 --> 00:02:33,520 The agencies consider single factor authentication is the only mechanism 50 00:02:33,520 --> 00:02:38,180 to be inadequate for high risk transactions involving access to customer information 51 00:02:38,180 --> 00:02:40,500 or the movement of funds to other parties. 52 00:02:41,080 --> 00:02:43,740 Account fraud and identity theft are frequently the result 53 00:02:43,740 --> 00:02:46,080 of single factor authentication exploitation. 54 00:02:46,760 --> 00:02:47,720 That's the conclusion. 55 00:02:48,260 --> 00:02:49,760 So that's a loaded paragraph. 56 00:02:50,180 --> 00:02:51,980 So there's a couple of key points. 57 00:02:52,120 --> 00:02:54,120 Number one, access to customer information. 58 00:02:54,120 --> 00:02:55,260 Number two, the information or movement of funds. 59 00:02:55,560 --> 00:02:58,680 That's pretty much every screen in an internet banking application. 60 00:02:59,340 --> 00:03:02,520 Other than maybe the help screen, that's every screen that's in there. 61 00:03:03,640 --> 00:03:07,220 It's important to note this does not mandate two factor auth. 62 00:03:07,420 --> 00:03:09,560 It only says single factor isn't good enough. 63 00:03:10,200 --> 00:03:12,700 That's where I get the title of my talk, greater than one. 64 00:03:13,180 --> 00:03:17,860 So banks aren't deploying strict two factor authentication in the classical model. 65 00:03:18,020 --> 00:03:20,340 Something you know, something you have, something you are. 66 00:03:20,520 --> 00:03:22,820 They're doing what I call one and a half factor. 67 00:03:23,520 --> 00:03:24,100 It's not the same as two factor authentication. 68 00:03:24,120 --> 00:03:25,880 A little more than one, but it's not quite two. 69 00:03:26,480 --> 00:03:28,700 Why aren't they doing the other two factors? 70 00:03:29,120 --> 00:03:30,320 Simple, cost. 71 00:03:30,840 --> 00:03:34,540 Hardware tokens are expensive and they're easily lost, stolen, or broken. 72 00:03:35,020 --> 00:03:37,620 They can go anywhere from 35 to 75 bucks a pop. 73 00:03:37,840 --> 00:03:43,980 You multiply that by 100,000 or a million retail users, that's a huge cost for a bank 74 00:03:43,980 --> 00:03:47,000 to bear and that's why they're not doing it. 75 00:03:47,720 --> 00:03:50,100 Biometrics for the end user, that's out of the question. 76 00:03:50,100 --> 00:03:54,280 If my mother got a retinal scanner in the mail and had to hook it up to her computer 77 00:03:54,280 --> 00:03:57,260 to log into her online banking, it wouldn't work. 78 00:03:57,460 --> 00:03:59,980 Right now biometrics are just out of the question. 79 00:04:01,520 --> 00:04:04,520 These are the control types that you're seeing in the industry right now. 80 00:04:04,640 --> 00:04:09,120 You're seeing mutual authentication, device fingerprinting, out of band off, one time 81 00:04:09,120 --> 00:04:10,860 passwords and knowledge base archives. 82 00:04:12,680 --> 00:04:17,280 Mutual auth, this is not what most security people would consider true mutual authentication. 83 00:04:17,620 --> 00:04:20,080 This is not device to device authentication. 84 00:04:20,080 --> 00:04:26,060 Like in the wireless world where we'd have 8021X with EAPTLS and the wireless client 85 00:04:26,060 --> 00:04:29,800 authenticates the server, the server re-authenticates the client, that's not what this is. 86 00:04:29,960 --> 00:04:32,260 This is site to user mutual authentication. 87 00:04:32,660 --> 00:04:37,800 The site itself is trying to prove to the user you're on the legitimate site, it's 88 00:04:37,800 --> 00:04:39,720 safe to enter your password and log in. 89 00:04:40,640 --> 00:04:42,960 Device fingerprinting, this happens in a couple of ways. 90 00:04:43,860 --> 00:04:48,400 Persistent cookies, a cookie with a hash value in it that's stored on the user's PC with 91 00:04:48,400 --> 00:04:49,320 a long TTL. 92 00:04:49,320 --> 00:04:51,300 Something like 3, 6, or 12 months. 93 00:04:51,620 --> 00:04:56,300 When the user logs in and they see that cookie it looks up the hash value and compares it 94 00:04:56,300 --> 00:04:56,900 to the user name. 95 00:04:57,040 --> 00:04:59,700 If it matches you're a trusted device, I've seen you before. 96 00:05:00,360 --> 00:05:05,400 They're pulling information from HTTP headers from your browser and they do device interrogation 97 00:05:05,400 --> 00:05:06,600 which we're going to talk about in depth. 98 00:05:08,000 --> 00:05:11,820 Out of band off, they're calling it out of band off but as far as I'm concerned it's 99 00:05:11,820 --> 00:05:13,160 not true out of band off. 100 00:05:13,420 --> 00:05:16,380 Only delivery of the authentication credential is out of band. 101 00:05:16,920 --> 00:05:17,800 Authentication itself. 102 00:05:17,800 --> 00:05:19,500 Authentication itself still happens in band. 103 00:05:19,760 --> 00:05:23,100 It's still through an HTTP session you're authenticating to a website. 104 00:05:24,060 --> 00:05:29,300 Generally it's email delivery, SMS text message to your cell phone, or in some cases your 105 00:05:29,300 --> 00:05:31,760 phone rings and a little automated voice reads you a pin number. 106 00:05:32,860 --> 00:05:38,200 One time passwords, the most common method is coupled with out of band authentication 107 00:05:38,200 --> 00:05:42,760 where they generate some sort of dynamic single use password or pin and they email it to you 108 00:05:42,760 --> 00:05:43,780 or they send it to your cell phone. 109 00:05:44,460 --> 00:05:47,560 You may see a little bit of static pre-issued one time pads. 110 00:05:47,560 --> 00:05:49,980 It's kind of old school and not a lot of banks are doing it. 111 00:05:50,460 --> 00:05:55,500 This is not to be confused with something that's algorithmic like an RSA secure ID token where 112 00:05:56,020 --> 00:05:58,280 the password changes every 60 seconds. 113 00:05:58,520 --> 00:05:59,760 That's not what we're talking about. 114 00:06:01,340 --> 00:06:05,780 Knowledge base archives, not very popular but there are a couple banks using them. 115 00:06:05,960 --> 00:06:09,540 These are questions based on information gleaned from public records databases. 116 00:06:10,180 --> 00:06:16,020 An example may be in 2002 did you buy a Honda Accord, Toyota Camry, Ford Taurus, none of 117 00:06:16,020 --> 00:06:16,300 the above. 118 00:06:18,040 --> 00:06:22,320 The important thing to understand when we're talking about these control types is the difference 119 00:06:22,320 --> 00:06:24,580 between bolt on versus built in. 120 00:06:24,860 --> 00:06:29,420 These are not built into the application themselves by the application developers. 121 00:06:29,960 --> 00:06:35,040 These are third party products that are somehow integrated or bolted onto the front of an 122 00:06:35,040 --> 00:06:39,540 existing application and they try and get it to integrate to become a single authentication 123 00:06:39,540 --> 00:06:40,080 process. 124 00:06:40,660 --> 00:06:42,580 There's a couple of problems with this. 125 00:06:42,980 --> 00:06:47,420 You get increased attack surface by adding additional code that can be accessed on a 126 00:06:47,560 --> 00:06:47,920 You can't have a single authentication process that's authenticated. 127 00:06:48,680 --> 00:06:52,640 Standard authentication process has to be interrupted for this to work, which we're 128 00:06:52,640 --> 00:06:53,100 going to illustrate. 129 00:06:53,420 --> 00:06:57,920 We can exploit the architectural weaknesses of trying to bolt one system onto another. 130 00:06:59,760 --> 00:07:03,780 Simple request response authentication, if you're not familiar with this, you're in 131 00:07:03,780 --> 00:07:04,320 the wrong talk. 132 00:07:04,600 --> 00:07:08,360 We have the client, a web server and a database at its most simple. 133 00:07:09,240 --> 00:07:11,740 You post your user name and password through a login form. 134 00:07:12,040 --> 00:07:16,440 At its most basic, a select query against the database, select username and password to 135 00:07:16,440 --> 00:07:17,540 see if the username and password match. 136 00:07:17,540 --> 00:07:22,360 If the password is accurate, the database responds with a 1 or a 0, yes or no. 137 00:07:22,700 --> 00:07:27,760 If you fail, the web server gives you a generic error message, invalid username or password. 138 00:07:28,400 --> 00:07:31,900 This is important because security people for years have been trying to beat it into 139 00:07:31,900 --> 00:07:32,740 the heads of developers. 140 00:07:33,100 --> 00:07:36,160 Don't just say invalid username or invalid password. 141 00:07:36,340 --> 00:07:39,020 Give a generic error message no matter what they fail. 142 00:07:39,240 --> 00:07:40,660 We finally got that covered. 143 00:07:40,780 --> 00:07:45,580 They finally listened and now all these applications have generic error messages, invalid username 144 00:07:45,580 --> 00:07:46,120 or password. 145 00:07:47,720 --> 00:07:51,480 So, device fingerprinting, the most common deployment of this is a hybrid approach. 146 00:07:51,760 --> 00:07:57,700 It uses picture and passphrase based mutual auth, where you have a security image and 147 00:07:57,700 --> 00:08:02,440 maybe a security word or security phrase that the bank is going to display to you to prove 148 00:08:02,440 --> 00:08:06,020 that they are the real bank and it's safe to enter your password. 149 00:08:06,980 --> 00:08:10,340 One time passwords or challenge questions are very common if you fail. 150 00:08:10,460 --> 00:08:15,020 If we do not recognize your device before I give you that picture to prove that you're 151 00:08:15,020 --> 00:08:16,780 on the real site and let you enter your password. 152 00:08:17,540 --> 00:08:21,420 I need you to answer some challenge questions 153 00:08:21,420 --> 00:08:23,680 or I'm going to send you a one-time password via email 154 00:08:23,680 --> 00:08:24,900 and you've got to type it in. 155 00:08:25,860 --> 00:08:27,720 After this, persistent cookies are set 156 00:08:27,720 --> 00:08:30,060 so that we recognize your device again in the future 157 00:08:30,060 --> 00:08:32,860 and you can bypass the challenge questions or the OTP. 158 00:08:34,460 --> 00:08:36,180 So we're going to do some request analysis 159 00:08:36,180 --> 00:08:38,340 and you can see this in single server 160 00:08:38,340 --> 00:08:39,740 or multiple server deployments. 161 00:08:39,900 --> 00:08:41,880 What I mean by that is sometimes it's integrated 162 00:08:41,880 --> 00:08:45,700 as a single host name, login.xyzbank.com. 163 00:08:45,700 --> 00:08:48,440 In other cases, they actually have a different host name 164 00:08:48,440 --> 00:08:51,900 subbed from the domain, maybe login.bank.com 165 00:08:51,900 --> 00:08:54,180 and newsecurity.bank.com. 166 00:08:55,580 --> 00:08:58,440 So this is what the authentication model now looks like. 167 00:08:58,560 --> 00:09:00,860 You can see our existing authentication infrastructure 168 00:09:00,860 --> 00:09:03,520 at the bottom and on top of it is the new system. 169 00:09:03,700 --> 00:09:06,640 And this holds true whether it's different physical servers 170 00:09:06,640 --> 00:09:09,580 at different host names or just logically separated, 171 00:09:09,880 --> 00:09:11,700 this request flow is still accurate. 172 00:09:12,840 --> 00:09:15,160 So we have our standard enter the username 173 00:09:15,160 --> 00:09:15,680 and then we have our standard enter the username 174 00:09:15,680 --> 00:09:17,400 and the first thing that the old system has to do 175 00:09:17,400 --> 00:09:18,520 is redirect you. 176 00:09:18,620 --> 00:09:20,240 It has to push off to the new system 177 00:09:20,240 --> 00:09:21,660 because we bolted it onto the front. 178 00:09:22,280 --> 00:09:24,000 So now you're talking to the new system 179 00:09:24,000 --> 00:09:25,740 and it needs to know if you're a valid user. 180 00:09:25,880 --> 00:09:27,500 So it has to go look in the old database 181 00:09:27,500 --> 00:09:30,100 to make sure that you're a valid user of the existing system. 182 00:09:30,460 --> 00:09:32,300 This is important because it needs to know 183 00:09:32,300 --> 00:09:34,160 if you're valid to give you challenge questions 184 00:09:34,160 --> 00:09:36,040 and then if you've just registered, 185 00:09:36,140 --> 00:09:38,980 it takes you through a one-time registration process 186 00:09:38,980 --> 00:09:40,820 to get registered on the new system. 187 00:09:41,260 --> 00:09:42,620 I'm not going to talk about that. 188 00:09:42,700 --> 00:09:44,180 I could give a whole talk on weaknesses 189 00:09:44,180 --> 00:09:45,420 in the registration system. 190 00:09:45,680 --> 00:09:46,960 If you're interested, see me after. 191 00:09:49,220 --> 00:09:51,640 The database is going to respond to the new web server 192 00:09:51,640 --> 00:09:53,360 that, yes, he's a valid user. 193 00:09:53,800 --> 00:09:56,080 Now we've got to see if you match our authentication criteria. 194 00:09:56,220 --> 00:09:57,560 Do you have your persistent cookie? 195 00:09:57,660 --> 00:09:59,420 Do you match that device fingerprint? 196 00:09:59,820 --> 00:10:02,340 Now I've got to look in my new database that handles this. 197 00:10:03,700 --> 00:10:05,580 The database is going to respond and say, 198 00:10:05,660 --> 00:10:07,460 no, you're not matching my authentication criteria. 199 00:10:10,160 --> 00:10:12,160 I need to prompt you for challenge questions 200 00:10:12,160 --> 00:10:14,180 or I need you to enter a one-time password. 201 00:10:15,680 --> 00:10:17,580 Now the user answers the challenge question. 202 00:10:17,800 --> 00:10:19,040 You enter the one-time password. 203 00:10:19,160 --> 00:10:20,500 It once again looks up in the database. 204 00:10:20,740 --> 00:10:22,560 Is that the correct answer for that user? 205 00:10:22,740 --> 00:10:25,260 Is that the correct dynamic OTP that we generated? 206 00:10:27,520 --> 00:10:29,040 Server responds, success. 207 00:10:29,500 --> 00:10:32,380 Now we go back to the original authentication process. 208 00:10:35,560 --> 00:10:38,340 Now at this point, the user can actually enter their password 209 00:10:38,340 --> 00:10:41,480 and resume what used to be a very simple authentication process. 210 00:10:42,140 --> 00:10:44,880 I do want to say I'm horrible at Visio and PowerPoint, 211 00:10:44,880 --> 00:10:47,060 so this little slide here took me like 60 minutes, 212 00:10:47,160 --> 00:10:48,360 so I hope you all appreciate it. 213 00:10:53,460 --> 00:10:56,520 We resume authentication, and now the user is finally logged in. 214 00:10:58,180 --> 00:10:59,140 Quick overview. 215 00:10:59,380 --> 00:11:02,340 Post username and the cookie if a persistent cookie exists. 216 00:11:02,660 --> 00:11:04,200 We're going to analyze the device fingerprint. 217 00:11:04,500 --> 00:11:05,700 New authentication challenge. 218 00:11:06,040 --> 00:11:06,820 Answer the challenge. 219 00:11:07,020 --> 00:11:07,940 Go to the old login. 220 00:11:09,920 --> 00:11:12,140 One question I want you guys to think about is 221 00:11:12,140 --> 00:11:14,860 in systems where they're actually using two separate systems, 222 00:11:14,860 --> 00:11:16,300 two separate servers with two separate host names, 223 00:11:16,500 --> 00:11:20,200 how are two different servers with different SSL sessions keeping state? 224 00:11:20,460 --> 00:11:23,300 Your client has a unique SSL tunnel to server A 225 00:11:23,300 --> 00:11:26,200 and a unique SSL connection to server B, 226 00:11:26,320 --> 00:11:29,480 and somehow these servers need to know what state they're in 227 00:11:29,480 --> 00:11:31,140 so you don't go straight to the password 228 00:11:31,140 --> 00:11:34,380 or you haven't entered or passed the authentication process 229 00:11:34,380 --> 00:11:37,420 so it's time for me to redirect you to server B in the new system. 230 00:11:38,040 --> 00:11:39,640 We're going to analyze a post body, 231 00:11:39,760 --> 00:11:41,640 see what they're trying to do and how they're doing it, 232 00:11:41,700 --> 00:11:43,800 and dissect some parameters and values. 233 00:11:45,320 --> 00:11:47,500 I had to black all this out for two reasons. 234 00:11:47,720 --> 00:11:49,640 As I said, I'm not targeting anyone in particular 235 00:11:49,640 --> 00:11:52,280 and I trust no one in this room with who I bank with. 236 00:11:52,780 --> 00:11:56,960 So I'm blacking out the header to see what site I'm actually looking at. 237 00:11:57,060 --> 00:11:59,360 Down here at the bottom at the top, 238 00:11:59,400 --> 00:12:01,940 or I'm sorry, the second phase within the request body itself, 239 00:12:02,180 --> 00:12:04,320 that's some site-specific stuff. 240 00:12:04,620 --> 00:12:06,920 Text user ID, that's my valid login name. 241 00:12:07,000 --> 00:12:07,900 These are my real credentials. 242 00:12:08,160 --> 00:12:09,080 I'm not giving them to you. 243 00:12:10,220 --> 00:12:12,720 The really interesting stuff though is down here at the bottom. 244 00:12:12,800 --> 00:12:14,640 Do you see these parameters that start with FP? 245 00:12:14,860 --> 00:12:17,820 We have FP browser, FP screen, FP software, 246 00:12:18,120 --> 00:12:19,740 FP time zone, FP language, 247 00:12:20,080 --> 00:12:22,600 and then this one really big parameter called PMFP. 248 00:12:23,180 --> 00:12:25,420 Now, notice that all these little FP ones, 249 00:12:25,500 --> 00:12:27,500 the five ones ahead of it, are not populated. 250 00:12:27,740 --> 00:12:29,940 But down here in this PMFP parameter, 251 00:12:30,300 --> 00:12:32,360 we have a really, really long string. 252 00:12:32,500 --> 00:12:35,120 I'm going to show it to you bigger on another slide in a second. 253 00:12:35,620 --> 00:12:36,940 So what they're doing is, 254 00:12:37,040 --> 00:12:39,540 instead of individually populating all these parameters, 255 00:12:39,780 --> 00:12:41,740 they're just concatenating it into one big string 256 00:12:41,740 --> 00:12:44,200 and passing it all as one big long value 257 00:12:44,200 --> 00:12:45,260 to a single parameter. 258 00:12:45,920 --> 00:12:48,280 This is another bank that's using the same system 259 00:12:48,280 --> 00:12:49,680 and does it the other way. 260 00:12:49,940 --> 00:12:52,960 They're all doing the same thing, just variations on a theme. 261 00:12:53,520 --> 00:12:54,960 So you can see at the bottom here, 262 00:12:55,040 --> 00:12:57,260 they are individually populating their parameters, 263 00:12:57,460 --> 00:12:59,900 their FP browser, their FP screen, their FP software. 264 00:13:01,100 --> 00:13:02,560 So here it is bigger. 265 00:13:02,680 --> 00:13:04,440 You can see what it is that they're actually doing. 266 00:13:04,640 --> 00:13:06,720 This is the first bank that concatenated string 267 00:13:06,720 --> 00:13:07,900 with these individual parameters. 268 00:13:08,340 --> 00:13:11,300 So FPUA, what do you think that stands for? 269 00:13:11,860 --> 00:13:13,780 That looks like a user agent to me. 270 00:13:13,780 --> 00:13:15,580 It looks like they're fingerprinting your user agent. 271 00:13:16,560 --> 00:13:19,760 FPSC, and you've got these numbers, 1024, 768, 32. 272 00:13:20,220 --> 00:13:21,460 That's my screen size. 273 00:13:22,960 --> 00:13:26,420 FPSW, we see PDF, we see SWF, we see QT. 274 00:13:26,520 --> 00:13:27,340 What is that? 275 00:13:27,580 --> 00:13:29,560 DSW probably stands for software. 276 00:13:29,580 --> 00:13:30,380 This isn't hard. 277 00:13:31,200 --> 00:13:32,540 TZ, minus 4. 278 00:13:33,000 --> 00:13:35,580 That's my time zone, Greenwich Mean Time minus 4. 279 00:13:37,120 --> 00:13:39,120 FPLN, lang equals ENUS. 280 00:13:39,140 --> 00:13:40,600 That probably stands for language. 281 00:13:40,700 --> 00:13:42,560 This is not hard stuff to figure out. 282 00:13:43,780 --> 00:13:46,720 Here's the second site where they're putting it into individual parameters. 283 00:13:47,180 --> 00:13:48,920 They're doing the exact same thing. 284 00:13:49,060 --> 00:13:50,580 App name, Microsoft Internet Explorer. 285 00:13:51,360 --> 00:13:56,600 Here they're using CPU class, x86, platform Win32, app version. 286 00:13:57,120 --> 00:13:58,420 Again, user agent. 287 00:13:58,520 --> 00:14:01,100 I took out some of the UA stuff because you saw it on the last slide. 288 00:14:01,460 --> 00:14:03,340 And then down here they actually spell it out. 289 00:14:03,460 --> 00:14:07,320 Plugins, Adobe Acrobat plugin, QuickTime plugin, Windows Media Player plugin. 290 00:14:07,560 --> 00:14:10,780 They're using all these individual values to create a fingerprint 291 00:14:10,780 --> 00:14:12,820 that's supposed to be unique to my computer, 292 00:14:12,820 --> 00:14:16,380 to know what my user agent is, my platform, my CPU type, 293 00:14:16,560 --> 00:14:18,980 all the plugins that I have installed that my browser will support. 294 00:14:22,300 --> 00:14:23,140 We'll get to that. 295 00:14:24,180 --> 00:14:27,740 The application is trying to gather information specific to your device 296 00:14:27,740 --> 00:14:28,520 to form a fingerprint. 297 00:14:28,820 --> 00:14:31,420 Now, when I say fingerprint, you should all be thinking unique. 298 00:14:31,780 --> 00:14:35,640 My physical fingerprints are different than his, different than his, different than his. 299 00:14:36,740 --> 00:14:38,900 Well, computers can have the same fingerprints. 300 00:14:39,020 --> 00:14:41,740 Two different systems can match the exact same fingerprint. 301 00:14:41,740 --> 00:14:44,420 So the basic premise of fingerprinting fails 302 00:14:44,420 --> 00:14:47,560 because they are not unique to a device. 303 00:14:47,840 --> 00:14:49,940 Multiple devices can have the same fingerprint. 304 00:14:50,480 --> 00:14:53,760 Furthermore, when we look at all the parameters that are in there, 305 00:14:53,920 --> 00:14:56,760 there's a whole lot of data and a whole lot of possible values. 306 00:14:57,120 --> 00:15:01,420 So objectively, we have a mathematically large possible data set. 307 00:15:01,600 --> 00:15:04,680 But in all probability, when we look at it subjectively, 308 00:15:04,780 --> 00:15:06,780 we have a very small possible data set. 309 00:15:06,940 --> 00:15:08,560 Let me guess, you're running Windows XP, 310 00:15:08,860 --> 00:15:10,200 you're using Internet Explorer, 311 00:15:10,200 --> 00:15:14,980 your screen resolution is 1024x768 or 800x600, 312 00:15:15,220 --> 00:15:16,740 you have an x86 CPU. 313 00:15:17,320 --> 00:15:21,560 You don't have to be the great Carnac to figure out what most users are going to run. 314 00:15:21,820 --> 00:15:24,840 In addition, most users, they buy off-the-shelf hardware. 315 00:15:25,060 --> 00:15:27,360 They buy a Dell, they buy an IBM, they buy an HP. 316 00:15:27,640 --> 00:15:30,920 These come with OSs preloaded and software preconfigured. 317 00:15:31,060 --> 00:15:34,980 There are going to be a very small set of fingerprints 318 00:15:34,980 --> 00:15:39,660 that a very large set of computers are going to match just out of the box. 319 00:15:41,520 --> 00:15:43,560 So how are they gathering this device? 320 00:15:43,680 --> 00:15:45,180 How is this device information? 321 00:15:45,520 --> 00:15:47,460 How is their web server interrogating your device? 322 00:15:47,740 --> 00:15:50,280 It can't just reach through the tubes and feel around 323 00:15:50,280 --> 00:15:53,280 and figure out what your computer config is. 324 00:15:54,280 --> 00:15:55,440 They're using JavaScript. 325 00:15:56,260 --> 00:15:59,900 Client-side JavaScript is the preferred method of most security developers. 326 00:16:01,000 --> 00:16:02,440 Unfortunately, that's a joke, guys. 327 00:16:02,580 --> 00:16:04,320 Client-side JavaScript ad for security. 328 00:16:06,000 --> 00:16:08,920 Well, JavaScript comes down with the HTML and clear text. 329 00:16:08,920 --> 00:16:13,940 Reverse engineering isn't hard when the source code is sitting in front of you in clear text. 330 00:16:15,260 --> 00:16:18,880 This is JavaScript from a very, very large bank 331 00:16:18,880 --> 00:16:20,640 that comes down and they use for authentication. 332 00:16:21,640 --> 00:16:23,440 Complete with developer comments. 333 00:16:23,760 --> 00:16:26,240 This function captures the user agent string. 334 00:16:26,580 --> 00:16:28,540 Fingerprint browser. I wonder what that does. 335 00:16:29,080 --> 00:16:31,580 This function captures the client screen information. 336 00:16:31,900 --> 00:16:34,560 Function fingerprint display. I wonder what that does. 337 00:16:35,380 --> 00:16:36,480 This isn't hard. 338 00:16:36,820 --> 00:16:38,620 They're telling you exactly what they're doing, 339 00:16:38,920 --> 00:16:40,000 exactly how they're doing it, 340 00:16:40,060 --> 00:16:41,640 and then they're commenting the code for you. 341 00:16:43,120 --> 00:16:44,620 So what happens if we fail? 342 00:16:44,720 --> 00:16:46,400 What happens if we fail device fingerprinting? 343 00:16:46,420 --> 00:16:47,560 We're coming from a different machine 344 00:16:47,560 --> 00:16:50,380 or we just got a new machine 345 00:16:50,380 --> 00:16:53,200 and it's been altered enough that our fingerprint doesn't match. 346 00:16:53,520 --> 00:16:55,320 Well, they may hit you with challenge questions 347 00:16:55,320 --> 00:16:57,500 or they may prompt you for a one-time password. 348 00:16:57,900 --> 00:17:00,480 Now, the one-time password is going to be delivered out of band, 349 00:17:00,660 --> 00:17:04,000 most likely via email, possibly text to your cell phone. 350 00:17:04,440 --> 00:17:06,540 But the session ID is not enforced. 351 00:17:06,820 --> 00:17:08,840 I'm not going to say always, because I haven't looked at 352 00:17:08,920 --> 00:17:09,980 every single bank in existence. 353 00:17:10,320 --> 00:17:11,480 But I'm going to say usually. 354 00:17:11,600 --> 00:17:14,440 As a general rule, they don't enforce session ID. 355 00:17:14,700 --> 00:17:17,620 So the session ID of the client and their browser 356 00:17:17,620 --> 00:17:19,740 that requested the one-time password to be sent 357 00:17:19,740 --> 00:17:22,320 does not need to be the same as the session ID 358 00:17:22,320 --> 00:17:24,840 of the client or browser, even the same IP 359 00:17:24,840 --> 00:17:28,400 as the machine that actually completes the authentication process. 360 00:17:29,000 --> 00:17:31,320 These one-time passwords are being generated. 361 00:17:31,520 --> 00:17:33,320 They generally have long TTLs 362 00:17:33,320 --> 00:17:35,940 or they just persist until consumed. 363 00:17:36,260 --> 00:17:38,240 So you can generate a one-time password, 364 00:17:38,920 --> 00:17:41,100 close your browser, go to work the next day, 365 00:17:41,280 --> 00:17:43,220 enter it and complete the authentication process. 366 00:17:43,480 --> 00:17:45,880 They're not enforcing that it's from the same session ID 367 00:17:45,880 --> 00:17:46,880 or even the same IP. 368 00:17:48,400 --> 00:17:50,660 Successful authentication, when we succeed, 369 00:17:50,780 --> 00:17:53,460 we enter our one-time password or we answer our challenge question. 370 00:17:53,880 --> 00:17:55,640 We're going to get our picture and passphrase 371 00:17:55,640 --> 00:17:58,460 for mutual authentication, and the persistent cookie is set. 372 00:17:59,420 --> 00:18:01,800 It's going to ask us, there's usually a little radio button, 373 00:18:01,860 --> 00:18:03,620 are you using a private computer, public computer? 374 00:18:03,840 --> 00:18:06,440 If you select private, it's going to set that persistent cookie 375 00:18:06,440 --> 00:18:08,420 so they get a hash of your fingerprint, 376 00:18:08,920 --> 00:18:10,300 and the next time they recognize you 377 00:18:10,300 --> 00:18:11,460 and you don't get the challenge question. 378 00:18:13,260 --> 00:18:14,460 So let's attack this. 379 00:18:14,540 --> 00:18:17,140 Hopefully you guys are already seeing big weaknesses in this system. 380 00:18:17,860 --> 00:18:19,600 We can fuzz the fingerprinting parameters. 381 00:18:19,980 --> 00:18:22,320 We can determine failure thresholds. 382 00:18:22,420 --> 00:18:24,360 Some banks, like the first one we looked at, 383 00:18:24,440 --> 00:18:26,560 they're concatenating everything into a single string 384 00:18:26,560 --> 00:18:28,120 and they want it to match exactly. 385 00:18:28,520 --> 00:18:31,440 Other ones, like the second set of requests that we looked at, 386 00:18:31,560 --> 00:18:33,400 they have a whole bunch of different parameters 387 00:18:33,400 --> 00:18:35,000 and there's a little bit of wiggle room. 388 00:18:35,180 --> 00:18:38,320 Maybe if you upgrade from IE6 to IE7, 389 00:18:38,320 --> 00:18:39,500 we'll let you in. 390 00:18:40,040 --> 00:18:41,880 Maybe if your time zone changes, 391 00:18:42,080 --> 00:18:44,140 you may be traveling, we'll let you in. 392 00:18:44,340 --> 00:18:47,140 This is site-specific IP address. 393 00:18:47,380 --> 00:18:49,140 In some cases, if your IP matches, 394 00:18:49,360 --> 00:18:50,480 you can always bypass. 395 00:18:50,940 --> 00:18:53,160 In other cases, they may heavily weight IP. 396 00:18:53,300 --> 00:18:55,280 If we haven't seen you coming from this provider again, 397 00:18:55,500 --> 00:18:58,360 this is very easy to figure out on a site-by-site basis 398 00:18:58,360 --> 00:19:01,040 just by using a few proxies, seeing how they're doing it. 399 00:19:01,780 --> 00:19:03,700 The challenge questions, this is important. 400 00:19:03,880 --> 00:19:06,680 There is a total lack of randomization in challenge questions. 401 00:19:07,000 --> 00:19:08,300 It's totally cyclical. 402 00:19:08,320 --> 00:19:10,380 Question one, question two, question three. 403 00:19:10,480 --> 00:19:11,620 One, two, three. 404 00:19:11,860 --> 00:19:13,960 And in fact, you're going to continue to be prompted 405 00:19:13,960 --> 00:19:16,260 for question one until it's been answered. 406 00:19:16,500 --> 00:19:19,300 So get challenge question one. 407 00:19:19,380 --> 00:19:21,220 Don't answer it. Come back in a year. 408 00:19:21,540 --> 00:19:23,520 It's going to prompt you for challenge question one. 409 00:19:23,580 --> 00:19:24,640 There is no randomization. 410 00:19:25,320 --> 00:19:28,000 Question one is your question until it's been answered. 411 00:19:28,140 --> 00:19:30,600 When you answer question three, it goes back to question one. 412 00:19:38,320 --> 00:19:39,260 I had a point there at the bottom. 413 00:19:39,400 --> 00:19:42,020 This makes it trivial to enumerate valid usernames. 414 00:19:42,120 --> 00:19:44,320 Now, some of the banks have actually recognized this piece 415 00:19:44,320 --> 00:19:45,680 since I submitted this talk. 416 00:19:45,880 --> 00:19:46,960 Some are still doing it. 417 00:19:47,080 --> 00:19:50,000 If you enter an invalid username, like no such user, 418 00:19:50,960 --> 00:19:52,580 you won't get a challenge question. 419 00:19:52,840 --> 00:19:54,320 You may just get a generic message. 420 00:19:54,560 --> 00:19:56,560 If you enter a valid username, 421 00:19:56,840 --> 00:19:59,480 you will get prompted for a challenge question. 422 00:19:59,800 --> 00:20:01,960 So now it's trivial to enumerate 423 00:20:01,960 --> 00:20:04,760 who valid users of the system are and who they aren't. 424 00:20:04,860 --> 00:20:06,660 The banks that have started to fix it and say, 425 00:20:06,660 --> 00:20:08,600 well, you know what, we need some dummy challenge questions, 426 00:20:08,680 --> 00:20:10,840 so even if they guess the wrong username, we'll give them that. 427 00:20:11,540 --> 00:20:13,220 There's a very simple timing attack. 428 00:20:13,580 --> 00:20:16,080 I don't know if you guys heard the Hacking MySpace talk 429 00:20:16,080 --> 00:20:18,240 or Harun and Marco from SensePost, 430 00:20:18,280 --> 00:20:19,300 their timing attack talk. 431 00:20:20,040 --> 00:20:21,260 They're both good. Check them out. 432 00:20:22,740 --> 00:20:24,280 This is nothing quite that complex, 433 00:20:24,420 --> 00:20:25,800 but it's a very simple timing attack. 434 00:20:26,040 --> 00:20:27,360 If you remember that earlier slide 435 00:20:27,360 --> 00:20:29,120 where I had that arrow moving around everywhere, 436 00:20:30,300 --> 00:20:32,780 the first thing it does is determine if you're a valid user. 437 00:20:32,940 --> 00:20:34,020 If you're an invalid user, 438 00:20:34,220 --> 00:20:36,580 it's immediately going to give you some fake challenge questions. 439 00:20:36,660 --> 00:20:39,380 If you are a valid user, it's going to take longer. 440 00:20:39,640 --> 00:20:41,920 You don't even need a script to measure this. 441 00:20:42,000 --> 00:20:43,880 You can usually measure it just by watching. 442 00:20:44,020 --> 00:20:45,340 There is a noticeable difference. 443 00:20:45,540 --> 00:20:49,380 It is trivial to enumerate valid usernames on these systems. 444 00:20:50,840 --> 00:20:52,940 So multiple servers and redirects. 445 00:20:52,960 --> 00:20:55,180 So I had you think about the multiple server session 446 00:20:55,180 --> 00:20:58,260 where we have two SSL tunnels to two different servers, 447 00:20:58,340 --> 00:20:59,180 server A and server B. 448 00:20:59,880 --> 00:21:01,580 They're keeping state through the client. 449 00:21:02,240 --> 00:21:03,500 You are the client. 450 00:21:03,780 --> 00:21:06,280 So if two different servers are keeping session state 451 00:21:06,280 --> 00:21:07,080 through my computer, 452 00:21:07,680 --> 00:21:09,660 do you think we can mess with session state? 453 00:21:10,080 --> 00:21:10,520 Probably. 454 00:21:11,680 --> 00:21:13,200 Systems that use a single session, 455 00:21:13,480 --> 00:21:16,960 it's still possible to cause out-of-state session errors 456 00:21:16,960 --> 00:21:21,060 or mess with the session state to achieve a desired effect, 457 00:21:21,200 --> 00:21:23,760 such as forcing one-time passwords to be sent, 458 00:21:23,880 --> 00:21:25,700 maybe again and again and again and again, 459 00:21:25,900 --> 00:21:28,700 or even if the user's device fingerprint matches, 460 00:21:29,380 --> 00:21:31,160 force and challenge questions to show. 461 00:21:31,480 --> 00:21:33,500 So no matter what the system is, 462 00:21:33,600 --> 00:21:35,820 we have some wiggle room where we can play with session state 463 00:21:35,820 --> 00:21:38,220 and cause some undesired behavior within the application. 464 00:21:39,780 --> 00:21:40,580 Mutual authentication. 465 00:21:40,720 --> 00:21:41,860 Once it's all said and done, 466 00:21:41,940 --> 00:21:43,040 you've answered your challenge questions, 467 00:21:43,280 --> 00:21:44,360 you've entered your OTP. 468 00:21:44,580 --> 00:21:45,540 I trust you now. 469 00:21:45,580 --> 00:21:47,000 I'm going to let you enter your password. 470 00:21:47,200 --> 00:21:48,280 But before I do, 471 00:21:48,440 --> 00:21:50,760 I'm showing you a picture and a passphrase 472 00:21:50,760 --> 00:21:52,800 which you have picked out to prove to you 473 00:21:52,800 --> 00:21:54,200 that I'm the real banking website. 474 00:21:54,440 --> 00:21:56,000 It's now safe to enter your password. 475 00:21:56,140 --> 00:21:57,340 You're not on a phishing site. 476 00:21:58,080 --> 00:22:00,920 So they're using the picture as a security credential. 477 00:22:01,200 --> 00:22:04,580 The bank uses that picture as a credential to you, the user, 478 00:22:04,580 --> 00:22:07,620 to show you that you can trust us, we're true, 479 00:22:07,720 --> 00:22:08,680 you're not on a phishing website. 480 00:22:09,060 --> 00:22:10,580 So they have to protect that somehow. 481 00:22:10,800 --> 00:22:13,700 It'd be bad if my credentials just linked to 482 00:22:13,700 --> 00:22:16,200 slash images slash brendan dot jpeg. 483 00:22:16,400 --> 00:22:17,880 That'd be pretty easy to figure out 484 00:22:17,880 --> 00:22:19,020 and you could statically link to that. 485 00:22:19,220 --> 00:22:21,020 So they're trying to obfuscate it. 486 00:22:21,500 --> 00:22:24,440 Two methods, dynamically generated GUIDs, 487 00:22:24,440 --> 00:22:26,140 which are only valid within that session, 488 00:22:26,300 --> 00:22:29,560 or they're using a stream cipher to encrypt the request. 489 00:22:31,120 --> 00:22:32,540 So how can we defeat this? 490 00:22:32,740 --> 00:22:34,160 It's actually pretty simple. 491 00:22:35,340 --> 00:22:36,620 First possible method, 492 00:22:36,860 --> 00:22:38,860 if cracking WPA has taught us anything, 493 00:22:39,120 --> 00:22:41,040 it's that given enough time and enough requests, 494 00:22:41,280 --> 00:22:42,920 we will find collisions and IV numbers 495 00:22:42,920 --> 00:22:46,400 and we can break systems that are using stream ciphers. 496 00:22:46,660 --> 00:22:47,920 But I don't like that. 497 00:22:47,960 --> 00:22:49,920 It takes way too long. We're not doing that. 498 00:22:51,040 --> 00:22:52,660 Man in the middle on the fly replacement. 499 00:22:52,920 --> 00:22:53,820 Yeah, that would work. 500 00:22:53,900 --> 00:22:55,580 We can just flat out man in the middle them. 501 00:22:55,640 --> 00:22:57,440 But once we deliver the image, 502 00:22:57,560 --> 00:22:58,820 we don't know what that image was 503 00:22:58,820 --> 00:23:00,500 because generally we're going to have a script 504 00:23:00,500 --> 00:23:01,520 that's delivering the image. 505 00:23:04,580 --> 00:23:08,300 and how it correlates to a specific user ID. 506 00:23:08,540 --> 00:23:10,820 I don't want to just man in the middle it on the fly once. 507 00:23:10,920 --> 00:23:11,580 I want to know it. 508 00:23:12,160 --> 00:23:13,000 So here's the solution. 509 00:23:13,960 --> 00:23:15,940 They're using clear text alt tags. 510 00:23:16,200 --> 00:23:18,240 So they're wrapping all this encryption 511 00:23:18,240 --> 00:23:20,720 or these dynamically created GUIDs 512 00:23:20,720 --> 00:23:22,720 around the get request to the image, 513 00:23:22,880 --> 00:23:25,000 but right there in clear text on the page 514 00:23:25,000 --> 00:23:26,260 is a little alt tag. 515 00:23:27,260 --> 00:23:30,960 This alt tag is a uniquely indexed database value 516 00:23:30,960 --> 00:23:32,500 tied to a specific image. 517 00:23:32,780 --> 00:23:34,560 They all use a shared image 518 00:23:34,580 --> 00:23:34,880 in their catalog. 519 00:23:35,260 --> 00:23:37,660 Every bank that uses this system 520 00:23:37,660 --> 00:23:40,360 has the exact same pictures in their catalog 521 00:23:40,360 --> 00:23:42,360 with the exact same alt tags. 522 00:23:42,720 --> 00:23:44,540 We don't even need to come up with it. 523 00:23:44,600 --> 00:23:46,000 They're indexing it for us 524 00:23:46,000 --> 00:23:47,560 and then giving it to us in clear text. 525 00:23:49,580 --> 00:23:50,960 Let that sink in. 526 00:23:51,120 --> 00:23:53,000 All banks using this system 527 00:23:53,000 --> 00:23:54,180 use the same catalog 528 00:23:54,180 --> 00:23:56,100 with the same index values 529 00:23:56,100 --> 00:23:57,320 on their alt tags. 530 00:23:57,620 --> 00:23:59,400 So the little choo choo train that says 531 00:23:59,400 --> 00:24:02,020 science and technology number 12345 532 00:24:02,020 --> 00:24:04,180 on bank A is the same picture 533 00:24:04,580 --> 00:24:06,600 on bank B, C, D, all the way to Z. 534 00:24:06,760 --> 00:24:08,080 They're all the same. 535 00:24:08,540 --> 00:24:11,200 So having access to any one app 536 00:24:11,200 --> 00:24:12,380 allows you to suck down 537 00:24:12,380 --> 00:24:13,140 their image catalog 538 00:24:13,140 --> 00:24:15,220 because you can change your security image 539 00:24:15,220 --> 00:24:16,140 if you don't like it. 540 00:24:17,800 --> 00:24:20,040 A hundred bucks will allow you 541 00:24:20,040 --> 00:24:21,220 to open a checking account 542 00:24:21,220 --> 00:24:23,280 and you can probably get free online banking 543 00:24:23,280 --> 00:24:24,860 or free internet bill pay out of it. 544 00:24:25,380 --> 00:24:26,440 Drop a hundred bucks, 545 00:24:26,720 --> 00:24:28,340 log in with your valid credentials, 546 00:24:28,620 --> 00:24:30,660 a little shell script and some wget, 547 00:24:30,820 --> 00:24:32,740 suck down the entire image catalog, 548 00:24:34,580 --> 00:24:36,440 now you know you have the exact same database 549 00:24:36,440 --> 00:24:38,500 locally what every single bank has 550 00:24:38,500 --> 00:24:39,180 on their website. 551 00:24:39,660 --> 00:24:42,480 We have no need to attack the dynamic linking function 552 00:24:42,480 --> 00:24:44,540 because we have a clear text alt tag 553 00:24:44,540 --> 00:24:46,420 and we have our own local image repository. 554 00:24:53,980 --> 00:24:55,240 Yes, they're static. 555 00:25:01,620 --> 00:25:03,420 In my experience, yes. 556 00:25:04,580 --> 00:25:05,740 You can request for a certain JPEG 557 00:25:05,740 --> 00:25:07,220 and it's always the same size. 558 00:25:07,700 --> 00:25:09,000 I got a lot to cover. 559 00:25:09,140 --> 00:25:10,360 I will be around for Q&A 560 00:25:10,360 --> 00:25:11,480 if we can just hold the questions. 561 00:25:17,980 --> 00:25:18,300 Right. 562 00:25:19,080 --> 00:25:20,380 We're going to get to that in the demo, 563 00:25:20,480 --> 00:25:22,100 so please hold the questions. 564 00:25:22,240 --> 00:25:22,940 I don't mean to be rude 565 00:25:22,940 --> 00:25:24,300 and I'll answer all your questions afterwards. 566 00:25:25,580 --> 00:25:27,940 So again, if we go back to the FFIEC document, 567 00:25:28,800 --> 00:25:30,900 this is designed to combat phishing, 568 00:25:30,920 --> 00:25:32,600 transaction fraud and identity theft. 569 00:25:34,580 --> 00:25:36,400 All these banks are spending all this money 570 00:25:36,400 --> 00:25:38,640 and all this effort in implementing these systems. 571 00:25:38,800 --> 00:25:40,620 So how does it measure up to the stated purpose? 572 00:25:42,020 --> 00:25:44,460 Well, phishing is targeted at a specific organization. 573 00:25:45,520 --> 00:25:47,840 The attacker can simply copy the code 574 00:25:47,840 --> 00:25:48,840 from the JavaScript 575 00:25:48,840 --> 00:25:50,920 within the fingerprint from the target site. 576 00:25:51,140 --> 00:25:52,060 That's what I did. 577 00:25:52,160 --> 00:25:54,260 I flat out plagiarized their JavaScript 578 00:25:54,260 --> 00:25:56,540 and threw it in a phony authentication form. 579 00:25:56,740 --> 00:25:57,620 It's clear text. 580 00:25:57,880 --> 00:25:59,600 You have the source. It's documented. 581 00:26:00,480 --> 00:26:01,400 Just grab it. 582 00:26:01,500 --> 00:26:03,340 Just grab it and put it on your page. 583 00:26:04,580 --> 00:26:06,740 As long as the username is correct, 584 00:26:07,000 --> 00:26:08,260 failing a device fingerprint 585 00:26:08,260 --> 00:26:09,640 will present us with challenge questions. 586 00:26:10,000 --> 00:26:12,160 And I talked about how they're not random. 587 00:26:12,240 --> 00:26:13,520 It's always challenge question one. 588 00:26:13,800 --> 00:26:15,600 So the attacker can prompt a user 589 00:26:15,600 --> 00:26:17,140 for the answer to the challenge question 590 00:26:17,140 --> 00:26:20,700 and then just do a simple redirect to the real site. 591 00:26:20,940 --> 00:26:22,340 If the user has 592 00:26:23,080 --> 00:26:24,500 persistent cookie already set, 593 00:26:24,640 --> 00:26:26,060 as many probably do, 594 00:26:26,580 --> 00:26:28,720 they'll bypass the challenge question completely. 595 00:26:28,960 --> 00:26:30,160 And that challenge question 596 00:26:30,160 --> 00:26:31,980 and the answer that you, the attacker, have 597 00:26:32,540 --> 00:26:34,500 is valid until you decide to use it. 598 00:26:34,580 --> 00:26:36,020 So you don't have to even use it right away. 599 00:26:36,140 --> 00:26:38,360 You can go back and use it in a day or a week or an hour. 600 00:26:40,420 --> 00:26:42,540 Spear phishing. This is now easier than ever. 601 00:26:42,600 --> 00:26:44,080 Does everyone know what I mean by spear phishing? 602 00:26:44,660 --> 00:26:46,160 Spear phishing is when you target 603 00:26:46,160 --> 00:26:48,740 an individual user or individual set of users. 604 00:26:48,960 --> 00:26:50,900 You're not just mailing your phishing attempt 605 00:26:50,900 --> 00:26:52,200 to absolutely everybody 606 00:26:52,920 --> 00:26:54,160 that's in some spammer's database. 607 00:26:54,600 --> 00:26:56,760 So because valid account names can be enumerated, 608 00:26:57,220 --> 00:26:58,560 we can put a little bit of thinking. 609 00:26:59,100 --> 00:27:02,100 So if your username is Cubsfan266, 610 00:27:02,700 --> 00:27:04,560 what do you want to guess that your email address 611 00:27:04,580 --> 00:27:06,380 is maybe Cubsfan266 612 00:27:06,380 --> 00:27:08,480 at AOL.com or Hotmail.com 613 00:27:08,480 --> 00:27:09,480 or Yahoo.com? 614 00:27:09,960 --> 00:27:12,020 And because we can brute force, 615 00:27:12,120 --> 00:27:14,340 and not even brute force, more like intelligently guess 616 00:27:14,340 --> 00:27:16,500 device fingerprints, we can get 617 00:27:16,500 --> 00:27:18,420 the security picture 618 00:27:18,420 --> 00:27:20,820 and the security phrase for this user 619 00:27:20,820 --> 00:27:21,800 and send them an email. 620 00:27:22,040 --> 00:27:24,400 So if you get an email that's addressed to you 621 00:27:24,400 --> 00:27:25,740 that looks like it's from your bank 622 00:27:25,740 --> 00:27:27,940 and it has your bank's authentication credentials 623 00:27:27,940 --> 00:27:30,480 which are the image unique to you 624 00:27:30,480 --> 00:27:32,200 and that passphrase unique to you, 625 00:27:32,340 --> 00:27:34,560 you have a much greater likelihood 626 00:27:34,580 --> 00:27:37,180 of actually falling for this targeted phishing attack. 627 00:27:37,460 --> 00:27:39,520 I would guess that your average user 628 00:27:39,520 --> 00:27:40,860 would probably click the link 629 00:27:40,860 --> 00:27:42,260 or probably enter their information 630 00:27:42,260 --> 00:27:44,140 if it looked like it was from their bank 631 00:27:44,140 --> 00:27:46,680 and it had that supposedly secret 632 00:27:46,680 --> 00:27:48,040 picture and passphrase 633 00:27:48,040 --> 00:27:49,620 that only the bank's supposed to know. 634 00:27:51,980 --> 00:27:54,440 This does absolutely nothing to stop fraud. 635 00:27:54,940 --> 00:27:55,900 Absolutely nothing. 636 00:27:56,140 --> 00:27:57,660 All transaction fraud takes place 637 00:27:57,660 --> 00:27:58,940 once you're in the system. 638 00:27:59,460 --> 00:28:01,560 We have the inheritance trust model 639 00:28:01,560 --> 00:28:02,760 within web applications. 640 00:28:04,580 --> 00:28:06,280 Your session ID on the server side 641 00:28:06,280 --> 00:28:07,420 is marked authenticated. 642 00:28:07,580 --> 00:28:08,760 This is how web apps work. 643 00:28:08,960 --> 00:28:10,960 This is why you can go from page to page to page 644 00:28:10,960 --> 00:28:12,780 without getting prompted for a password. 645 00:28:12,980 --> 00:28:14,000 It's just the way they work. 646 00:28:14,280 --> 00:28:16,300 Once you're authenticated, all your transactions 647 00:28:16,300 --> 00:28:17,140 are suddenly valid. 648 00:28:17,500 --> 00:28:19,280 This does not stop transaction fraud 649 00:28:19,280 --> 00:28:20,660 in any way, shape, or form. 650 00:28:22,360 --> 00:28:23,000 Identity theft. 651 00:28:23,400 --> 00:28:24,820 Does it stop identity theft? 652 00:28:26,160 --> 00:28:28,180 Most of these systems are doing data masking 653 00:28:28,180 --> 00:28:29,880 where they're starring out the account number. 654 00:28:29,880 --> 00:28:31,800 Even if Mr. Bad Attacker 655 00:28:31,800 --> 00:28:33,660 does somehow break our impenetrable 656 00:28:33,660 --> 00:28:34,540 security system 657 00:28:34,540 --> 00:28:37,260 and they can actually see the screens 658 00:28:37,260 --> 00:28:38,940 within the application, we're going to go ahead 659 00:28:38,940 --> 00:28:40,100 and star out those account numbers 660 00:28:40,100 --> 00:28:42,260 just so they can't get that user's information. 661 00:28:43,340 --> 00:28:45,460 Who has a checking account with online banking? 662 00:28:48,360 --> 00:28:49,440 There's this little thing 663 00:28:49,440 --> 00:28:50,620 that came out a few years ago. 664 00:28:50,720 --> 00:28:51,620 It's called check images 665 00:28:51,620 --> 00:28:53,900 where checks that you've entered 666 00:28:53,900 --> 00:28:55,500 are shown in your transaction history 667 00:28:55,500 --> 00:28:56,900 and you can actually click them 668 00:28:59,880 --> 00:29:01,020 and it shows the front and back of your check. 669 00:29:02,060 --> 00:29:03,260 Well, what's on a check? 670 00:29:03,880 --> 00:29:04,940 Your account number, 671 00:29:05,120 --> 00:29:06,840 your ABA routing transit number, 672 00:29:07,040 --> 00:29:09,360 your full name, maybe your wife or husband's name, 673 00:29:09,540 --> 00:29:11,200 your full address, 674 00:29:11,500 --> 00:29:13,320 your signature, maybe your phone number 675 00:29:13,320 --> 00:29:15,340 and social security number if you're really stupid. 676 00:29:17,500 --> 00:29:19,720 As an attacker or identity thief, 677 00:29:19,940 --> 00:29:21,700 you can mask that account number 678 00:29:21,700 --> 00:29:23,320 all you want. Start the whole thing out 679 00:29:23,320 --> 00:29:26,020 because one click away is a lot more information 680 00:29:26,020 --> 00:29:28,060 that's going to facilitate identity theft. 681 00:29:28,220 --> 00:29:29,860 You're doing absolutely nothing to stop it. 682 00:29:29,880 --> 00:29:33,140 If you don't have a checking account, 683 00:29:33,340 --> 00:29:34,400 maybe it's just a savings account 684 00:29:34,400 --> 00:29:35,860 or it's a brokerage account 685 00:29:35,860 --> 00:29:37,100 or you pay your mortgage online, 686 00:29:37,900 --> 00:29:38,800 credit cards, 687 00:29:38,940 --> 00:29:41,400 all of these companies have e-statements 688 00:29:41,400 --> 00:29:43,600 where you can print out an electronic copy 689 00:29:43,600 --> 00:29:46,120 of the statement that you get in the mail every month 690 00:29:46,120 --> 00:29:48,320 which has your full account number, 691 00:29:48,520 --> 00:29:49,940 your full legal name, 692 00:29:50,140 --> 00:29:51,320 your street address, 693 00:29:51,680 --> 00:29:52,720 tax forms, 694 00:29:54,800 --> 00:29:56,280 deducting interest payments 695 00:29:56,280 --> 00:29:58,160 on a mortgage maybe 696 00:29:58,160 --> 00:29:59,860 or a 1099 from your savings account 697 00:29:59,880 --> 00:30:03,040 or from your online brokerage account. 698 00:30:03,360 --> 00:30:05,520 The IRS isn't taking a tax form 699 00:30:05,520 --> 00:30:06,700 with a start-out account number. 700 00:30:06,920 --> 00:30:08,840 No, you print out the tax forms online 701 00:30:08,840 --> 00:30:10,240 and there you have your full name, 702 00:30:10,340 --> 00:30:11,060 your full account number, 703 00:30:11,140 --> 00:30:11,660 street address, 704 00:30:11,820 --> 00:30:13,420 and possibly social security number. 705 00:30:13,720 --> 00:30:15,920 So they can mask it on the summary page 706 00:30:15,920 --> 00:30:18,060 all they want, one or two clicks away, 707 00:30:18,260 --> 00:30:20,240 more information, better information 708 00:30:20,240 --> 00:30:21,840 to facilitate identity theft. 709 00:30:23,380 --> 00:30:24,500 One-time passwords. 710 00:30:25,060 --> 00:30:26,080 How am I doing on time? 711 00:30:26,220 --> 00:30:29,080 We covered some of this already, 712 00:30:29,880 --> 00:30:30,440 but the OTP is out of band. 713 00:30:30,620 --> 00:30:31,860 Hardware and soft tokens. 714 00:30:32,940 --> 00:30:34,820 If the app isn't enforcing all phases 715 00:30:34,820 --> 00:30:35,760 within a single session, 716 00:30:35,900 --> 00:30:37,240 we kind of talked about the same issues apply. 717 00:30:38,240 --> 00:30:40,020 Longer non-existent TTLs, 718 00:30:40,020 --> 00:30:43,020 they may be valid for hours, days, weeks, 719 00:30:43,220 --> 00:30:45,160 or just valid until consumed. 720 00:30:46,680 --> 00:30:48,200 OTPs are only most effective 721 00:30:48,200 --> 00:30:49,740 when required for every login 722 00:30:49,740 --> 00:30:51,840 so the user is always entering the OTP 723 00:30:51,840 --> 00:30:54,340 and always overwriting that last database entry. 724 00:30:54,660 --> 00:30:55,880 Otherwise, I don't think 725 00:30:55,880 --> 00:30:56,800 that they're effective at all. 726 00:30:56,860 --> 00:30:57,780 The same weaknesses apply. 727 00:30:59,880 --> 00:31:00,900 They can be met in the middle. 728 00:31:01,040 --> 00:31:01,780 Very simple. 729 00:31:01,900 --> 00:31:04,340 You get the user to give you the one-time password 730 00:31:04,340 --> 00:31:05,880 and you proxy it over to the real server. 731 00:31:06,080 --> 00:31:07,560 You get your persistent cookie set. 732 00:31:07,740 --> 00:31:09,000 Now all of a sudden you can bypass 733 00:31:09,000 --> 00:31:10,320 that new authentication system. 734 00:31:11,200 --> 00:31:13,860 Email or SMS delivery sets a pattern for the user. 735 00:31:13,960 --> 00:31:14,500 This is important. 736 00:31:14,840 --> 00:31:16,080 Anyone that works in security, 737 00:31:16,300 --> 00:31:18,400 over the past 10 years we've been trying to beat it 738 00:31:18,400 --> 00:31:19,400 over the heads of our users. 739 00:31:19,820 --> 00:31:21,540 Don't just click links in emails. 740 00:31:21,780 --> 00:31:23,860 If you get an email from your bank 741 00:31:23,860 --> 00:31:25,520 or it looks like it's from your bank and says, 742 00:31:29,880 --> 00:31:33,160 not only are the banks training users to do this, 743 00:31:33,240 --> 00:31:34,560 they're requiring it. 744 00:31:34,740 --> 00:31:37,280 If you use one-time passwords via email, 745 00:31:37,500 --> 00:31:39,300 you have broken what security people 746 00:31:39,300 --> 00:31:41,500 have been trying to teach users for years. 747 00:31:41,720 --> 00:31:43,600 You're not just enforcing the bad habit, 748 00:31:43,720 --> 00:31:45,180 you are requiring it. 749 00:31:45,300 --> 00:31:47,180 They cannot login unless they do this. 750 00:31:48,700 --> 00:31:50,580 Cross-site request forgery is possible. 751 00:31:50,980 --> 00:31:52,260 I'm going to skip a little bit of that, 752 00:31:52,360 --> 00:31:53,480 but basically with a phishing site 753 00:31:53,480 --> 00:31:56,100 we can use XSRF and generate 754 00:31:56,100 --> 00:31:57,640 a whole lot of these one-time passwords. 755 00:31:58,820 --> 00:31:59,860 So OTPs, 756 00:31:59,880 --> 00:32:01,000 how do they measure up? 757 00:32:01,540 --> 00:32:03,160 Slightly better than fingerprinting 758 00:32:03,160 --> 00:32:05,140 because it's a little more difficult to be transparent. 759 00:32:05,340 --> 00:32:06,760 You can't just forge a device fingerprint 760 00:32:06,760 --> 00:32:08,800 or do the challenge question. 761 00:32:08,980 --> 00:32:10,940 You need the user to stop, check their email, 762 00:32:11,080 --> 00:32:12,180 check their cell phone and enter it. 763 00:32:13,240 --> 00:32:15,500 It trains the user to trust email more. 764 00:32:15,640 --> 00:32:16,480 This is bad. 765 00:32:16,660 --> 00:32:17,860 Please stop doing it. 766 00:32:17,920 --> 00:32:19,740 If anyone here works for a bank, stop it. 767 00:32:19,820 --> 00:32:20,400 You're not helping. 768 00:32:21,800 --> 00:32:23,460 We're training them to click those links 769 00:32:23,460 --> 00:32:25,400 and we're training them that using email 770 00:32:25,400 --> 00:32:27,320 for security purposes is okay. 771 00:32:29,880 --> 00:32:31,800 It does absolutely nothing to stop fraud 772 00:32:31,800 --> 00:32:34,080 or identity theft, just like we talked about. 773 00:32:34,360 --> 00:32:36,180 The inheritance trust model still applies. 774 00:32:36,380 --> 00:32:37,600 Once you're authenticated, 775 00:32:37,720 --> 00:32:39,680 same thing. You're not doing anything. 776 00:32:39,860 --> 00:32:41,860 You're not helping the problem with the stated purpose 777 00:32:41,860 --> 00:32:43,640 of phishing, identity theft, 778 00:32:43,760 --> 00:32:44,620 and transaction fraud. 779 00:32:46,280 --> 00:32:47,360 Knowledge-based archives. 780 00:32:47,780 --> 00:32:49,000 They're not nearly as common. 781 00:32:49,100 --> 00:32:50,920 I have seen a couple, so I'll talk about them real quick. 782 00:32:51,800 --> 00:32:54,220 They're usually used in conjunction with persistent cookies. 783 00:32:54,420 --> 00:32:55,620 Almost all these sites are using 784 00:32:55,620 --> 00:32:57,180 the persistent cookie hash value model. 785 00:32:57,980 --> 00:32:59,860 By definition, public records 786 00:32:59,880 --> 00:33:01,440 are used, and there's always 787 00:33:01,440 --> 00:33:02,880 a skip this question option. 788 00:33:03,920 --> 00:33:05,540 Because they're getting all this information 789 00:33:05,540 --> 00:33:07,540 from public records, it may be something 790 00:33:07,540 --> 00:33:09,480 pretty obscure that you don't know the answer to. 791 00:33:09,620 --> 00:33:11,460 Like, what was the purchase price of the home 792 00:33:11,460 --> 00:33:12,320 you bought in 1982? 793 00:33:13,120 --> 00:33:15,420 I don't know, and I don't want to go 794 00:33:15,420 --> 00:33:17,440 dig through old sales records to figure it out, 795 00:33:17,520 --> 00:33:19,500 so we have this handy little skip this question, 796 00:33:19,620 --> 00:33:20,280 I want another one. 797 00:33:21,480 --> 00:33:24,000 In this case, randomization, and they are random, 798 00:33:24,100 --> 00:33:25,380 this totally works in our favor, 799 00:33:25,480 --> 00:33:27,340 and hopefully you can already figure out why. 800 00:33:27,760 --> 00:33:29,680 Multiple requests for multiple sessions, 801 00:33:29,880 --> 00:33:31,100 and basic pattern analysis. 802 00:33:31,860 --> 00:33:33,500 So here's our challenge question example. 803 00:33:33,820 --> 00:33:36,140 In 2002, did you buy Honda Accord, 804 00:33:36,240 --> 00:33:38,000 Toyota Camry, Ford Taurus, or none of the above? 805 00:33:38,980 --> 00:33:40,280 I'm going to close the browser, 806 00:33:40,380 --> 00:33:41,420 or skip that question, 807 00:33:41,560 --> 00:33:44,120 or come back in a day and just keep skipping 808 00:33:44,120 --> 00:33:45,480 until I get the same question again. 809 00:33:45,980 --> 00:33:48,040 Now it's, in 2002, did you buy 810 00:33:48,040 --> 00:33:49,960 a Nissan Sentra, a Chevy Cavalier, 811 00:33:50,060 --> 00:33:51,340 a Ford Taurus, or none of the above? 812 00:33:52,720 --> 00:33:53,480 I know this! 813 00:33:57,080 --> 00:33:58,440 Randomization works in our favor. 814 00:33:58,500 --> 00:33:59,660 This is basic stuff, guys. 815 00:34:01,520 --> 00:34:02,560 If possible, 816 00:34:02,900 --> 00:34:04,020 this is actually less effective 817 00:34:04,020 --> 00:34:05,100 than stupid challenge questions. 818 00:34:05,700 --> 00:34:07,800 It can be defeated through response analysis 819 00:34:07,800 --> 00:34:09,980 with pretty much zero prior knowledge, 820 00:34:10,140 --> 00:34:12,120 other than guessing a valid user name. 821 00:34:12,900 --> 00:34:14,680 Same shortcomings as other solutions, 822 00:34:14,880 --> 00:34:15,600 just like I said, 823 00:34:15,680 --> 00:34:16,680 we're not stopping phishing, 824 00:34:16,800 --> 00:34:18,560 we are not stopping identity theft, 825 00:34:18,700 --> 00:34:20,280 we are not stopping transaction fraud. 826 00:34:21,540 --> 00:34:24,100 In most cases, this may make identity theft easier, 827 00:34:24,280 --> 00:34:25,880 because you're getting more personal information 828 00:34:25,880 --> 00:34:26,640 about the user, 829 00:34:26,800 --> 00:34:29,020 like maybe the purchase price of their house, 830 00:34:29,880 --> 00:34:31,520 or the type of car they drive, 831 00:34:31,780 --> 00:34:33,240 all these things from public records, 832 00:34:33,400 --> 00:34:35,080 they're giving it to you as a challenge question, 833 00:34:35,520 --> 00:34:37,500 an attacker that's after identity theft, 834 00:34:37,720 --> 00:34:39,220 this is actually facilitating them, 835 00:34:39,240 --> 00:34:39,900 not hindering them. 836 00:34:41,260 --> 00:34:42,340 Is there a better way? 837 00:34:42,600 --> 00:34:43,540 There has to be. 838 00:34:44,220 --> 00:34:45,040 Mutual authentication. 839 00:34:46,520 --> 00:34:48,280 Responses must always be given. 840 00:34:48,540 --> 00:34:50,460 A lot of the banks are starting to do this now, 841 00:34:51,120 --> 00:34:53,320 but some are still not doing it, 842 00:34:53,380 --> 00:34:55,160 where if you enter an invalid user name, 843 00:34:55,280 --> 00:34:56,660 you get a generic error message 844 00:34:56,660 --> 00:34:57,620 versus a challenge question. 845 00:34:59,880 --> 00:35:00,740 Responses must always be given 846 00:35:00,740 --> 00:35:02,220 for the same authentication criteria. 847 00:35:02,740 --> 00:35:05,400 Don't allow the attacker to try multiple times 848 00:35:05,400 --> 00:35:06,240 through multiple sessions 849 00:35:06,240 --> 00:35:07,500 over the course of a couple days 850 00:35:07,500 --> 00:35:10,480 and do some kind of response analysis 851 00:35:10,480 --> 00:35:12,420 to figure out what's true and what's not. 852 00:35:13,260 --> 00:35:14,880 Authentication should be algorithmic. 853 00:35:16,020 --> 00:35:17,140 That's kind of a big one. 854 00:35:17,320 --> 00:35:18,820 If you want to know more about what I mean by that, 855 00:35:18,880 --> 00:35:19,520 come see me after. 856 00:35:21,500 --> 00:35:22,180 Challenge questions. 857 00:35:22,580 --> 00:35:24,180 This is still single factor, people. 858 00:35:24,420 --> 00:35:26,260 You're replacing something the user knows 859 00:35:26,260 --> 00:35:28,560 with two things the user knows. 860 00:35:29,880 --> 00:35:30,800 No single factor. 861 00:35:31,440 --> 00:35:32,840 This is flawed by design. 862 00:35:33,160 --> 00:35:34,740 Users can pick simple questions 863 00:35:34,740 --> 00:35:36,300 with very simple answers. 864 00:35:36,540 --> 00:35:38,340 If everyone remembers a couple years ago 865 00:35:38,340 --> 00:35:39,660 the big Paris Hilton, 866 00:35:39,820 --> 00:35:42,380 her T-Mobile sidekick was hacked, 867 00:35:42,820 --> 00:35:44,500 all they did was guess her username 868 00:35:44,500 --> 00:35:45,940 and her challenge question was 869 00:35:45,940 --> 00:35:46,980 what's the name of your dog? 870 00:35:49,640 --> 00:35:50,560 It's on Google. 871 00:35:51,280 --> 00:35:52,340 About a week later, 872 00:35:52,420 --> 00:35:54,320 Fred Durst from Limp Bizkit got hacked. 873 00:35:54,560 --> 00:35:55,740 His challenge question was 874 00:35:55,740 --> 00:35:56,960 what's your favorite band? 875 00:35:59,880 --> 00:36:00,940 The band he sings for. 876 00:36:01,900 --> 00:36:03,640 Users will pick stupid questions 877 00:36:03,640 --> 00:36:05,600 and they will give them stupid answers. 878 00:36:06,180 --> 00:36:07,440 In some cases, 879 00:36:07,520 --> 00:36:09,200 if your name is Cubsfan266 880 00:36:09,200 --> 00:36:10,520 and you picked a challenge question, 881 00:36:10,720 --> 00:36:11,520 what's your favorite city? 882 00:36:12,040 --> 00:36:13,000 Maybe it's Chicago. 883 00:36:15,360 --> 00:36:17,020 NYCgal123, where did you go to high school? 884 00:36:17,760 --> 00:36:19,280 I'm going to guess New York City maybe. 885 00:36:19,920 --> 00:36:21,640 Based on just usernames 886 00:36:21,640 --> 00:36:23,020 and the fact that users are stupid, 887 00:36:24,100 --> 00:36:25,320 we're not helping anything. 888 00:36:25,480 --> 00:36:26,720 We're just making the problem worse. 889 00:36:28,900 --> 00:36:29,860 Device fingerprinting. 890 00:36:31,020 --> 00:36:31,900 Current implementations 891 00:36:31,900 --> 00:36:34,140 can be bypassed or replicated with ease. 892 00:36:34,320 --> 00:36:35,520 And I'm going to show that in my demo. 893 00:36:35,800 --> 00:36:37,660 Guys, this is client-side JavaScript 894 00:36:37,660 --> 00:36:38,760 that posts. 895 00:36:39,320 --> 00:36:40,300 It's not hard stuff. 896 00:36:41,300 --> 00:36:42,760 Replacing something that the user knows 897 00:36:42,760 --> 00:36:44,500 with something the computer knows? 898 00:36:45,100 --> 00:36:46,340 Still single factor. 899 00:36:46,520 --> 00:36:49,020 And you have no guarantee that the computer 900 00:36:49,020 --> 00:36:49,840 is going to tell the truth. 901 00:36:49,980 --> 00:36:51,700 You're asking it to give you an answer 902 00:36:51,700 --> 00:36:53,460 and it may give you a valid answer or it may not. 903 00:36:55,260 --> 00:36:57,160 Forgiving thresholds on device fingerprinting 904 00:36:57,160 --> 00:36:58,080 and these persistent cookies, 905 00:36:58,280 --> 00:36:59,400 they aren't buying us anything. 906 00:36:59,860 --> 00:37:02,160 So hopefully you guys have been thinking about it 907 00:37:02,160 --> 00:37:03,040 and I haven't mentioned it yet. 908 00:37:03,160 --> 00:37:04,540 What about bots and trojans? 909 00:37:05,400 --> 00:37:07,140 If your box is owned, 910 00:37:07,320 --> 00:37:09,200 will any of this make any difference? 911 00:37:10,020 --> 00:37:10,480 No. 912 00:37:10,700 --> 00:37:13,960 We'll use a keystroke logger to get your username and password. 913 00:37:14,140 --> 00:37:15,380 We'll grab your persistent cookie. 914 00:37:15,500 --> 00:37:16,460 We'll grab your device fingerprint. 915 00:37:16,740 --> 00:37:17,840 You cannot stop us. 916 00:37:18,440 --> 00:37:20,820 Luckily for us and the security community at large, 917 00:37:20,880 --> 00:37:21,900 bots aren't a problem anymore. 918 00:37:22,180 --> 00:37:22,880 They went away. 919 00:37:27,160 --> 00:37:28,040 They prayed for forgiveness. 920 00:37:28,200 --> 00:37:30,100 They have stopped writing malcode. 921 00:37:31,600 --> 00:37:32,120 No. 922 00:37:32,220 --> 00:37:34,700 Anyone that was at internet wars yesterday will know 923 00:37:34,700 --> 00:37:36,300 the problem is worse than ever 924 00:37:36,300 --> 00:37:38,940 and it doesn't look like it's getting better anytime soon. 925 00:37:39,200 --> 00:37:40,340 Bots are still a problem. 926 00:37:40,600 --> 00:37:41,760 People are still owned 927 00:37:41,760 --> 00:37:44,280 and this does absolutely nothing to stop someone 928 00:37:44,280 --> 00:37:45,560 that may be trojan or have a bot. 929 00:37:48,280 --> 00:37:49,520 Stop fingerprinting devices. 930 00:37:49,820 --> 00:37:51,440 Start fingerprinting behaviors. 931 00:37:52,200 --> 00:37:53,840 Behaviors are far more unique 932 00:37:53,840 --> 00:37:56,000 than Dell, IBM, HP, 933 00:37:56,200 --> 00:37:57,140 their standard options. 934 00:37:57,880 --> 00:38:00,180 There's a finite subset of 935 00:38:00,180 --> 00:38:02,340 potentially likely answers 936 00:38:02,340 --> 00:38:03,360 to a device fingerprint. 937 00:38:03,820 --> 00:38:05,600 So stop fingerprinting devices. 938 00:38:06,040 --> 00:38:07,220 Plus the device can lie. 939 00:38:07,460 --> 00:38:09,220 I as an attacker can forge your fingerprint. 940 00:38:09,480 --> 00:38:10,600 There's no guarantee here. 941 00:38:10,920 --> 00:38:13,140 Start looking at how the users are actually using 942 00:38:13,140 --> 00:38:14,880 your application once they're authenticated. 943 00:38:15,620 --> 00:38:18,340 True transaction based behavior analysis 944 00:38:18,340 --> 00:38:19,700 and anomaly detection. 945 00:38:20,080 --> 00:38:21,520 If you always pay between 946 00:38:21,520 --> 00:38:23,740 $50 and $100 a month for your gas bill 947 00:38:23,740 --> 00:38:25,720 and suddenly you're paying $3,000 948 00:38:25,720 --> 00:38:27,020 throw a flag. 949 00:38:27,160 --> 00:38:28,680 That's outside normal usage. 950 00:38:28,960 --> 00:38:31,080 Or normally all you do is 951 00:38:31,080 --> 00:38:32,920 transfer money from checking to savings 952 00:38:32,920 --> 00:38:33,920 or savings to checking. 953 00:38:34,160 --> 00:38:36,120 Now you want to do a wire transfer internationally. 954 00:38:36,600 --> 00:38:38,520 That is outside your usage pattern. 955 00:38:38,880 --> 00:38:40,720 Throw a flag. Prevent the transaction. 956 00:38:41,160 --> 00:38:42,800 Make the customer talk to a human 957 00:38:42,800 --> 00:38:45,260 or go into a branch before you validate that 958 00:38:45,260 --> 00:38:45,900 and let it through. 959 00:38:47,220 --> 00:38:48,720 HTTP header information 960 00:38:48,720 --> 00:38:50,940 does not equal behavior analysis. 961 00:38:51,320 --> 00:38:53,120 There is a very large security vendor 962 00:38:53,120 --> 00:38:54,240 that will say this. 963 00:38:54,400 --> 00:38:56,500 They say they do behavior analysis. 964 00:38:57,160 --> 00:38:58,600 All they're doing is looking at your 965 00:38:58,600 --> 00:38:59,540 HTTP headers. 966 00:39:00,320 --> 00:39:01,880 No, not behavior analysis. 967 00:39:03,380 --> 00:39:04,700 Hurdles for secure implementation. 968 00:39:05,860 --> 00:39:07,740 As altruistic as some of this sounds 969 00:39:07,740 --> 00:39:08,580 I am not naive. 970 00:39:08,960 --> 00:39:10,540 This is not going to be easy. 971 00:39:10,700 --> 00:39:13,040 The sheer volume of data, the number of customers 972 00:39:13,040 --> 00:39:14,020 the amount of transactions 973 00:39:14,020 --> 00:39:16,060 it is going to take some time and effort 974 00:39:16,060 --> 00:39:18,340 to create real behavior fingerprints. 975 00:39:18,780 --> 00:39:20,680 I'm not under any illusions that we can solve 976 00:39:20,680 --> 00:39:21,460 this problem tomorrow. 977 00:39:24,300 --> 00:39:24,800 Exactly. 978 00:39:25,380 --> 00:39:26,960 Bolt on versus built in 979 00:39:27,160 --> 00:39:28,380 this needs to be built into 980 00:39:28,380 --> 00:39:29,820 the application itself. 981 00:39:30,600 --> 00:39:32,400 Stop buying third party products 982 00:39:32,400 --> 00:39:34,600 to fix the problem that your current code sucks. 983 00:39:34,860 --> 00:39:36,420 Get the people that wrote the code 984 00:39:36,420 --> 00:39:37,740 put pressure on the vendor 985 00:39:37,740 --> 00:39:39,360 fix it in the application. 986 00:39:39,720 --> 00:39:41,880 Stop trying to put band-aids out in front. 987 00:39:44,120 --> 00:39:45,100 Use a positive 988 00:39:45,100 --> 00:39:46,020 authentication model. 989 00:39:47,500 --> 00:39:48,460 New transactions 990 00:39:48,460 --> 00:39:50,140 should require stronger auth. 991 00:39:50,320 --> 00:39:52,180 Some sort of intervention, whether it's with a human 992 00:39:52,180 --> 00:39:53,340 or a token 993 00:39:53,340 --> 00:39:55,460 or going into a branch. 994 00:39:57,160 --> 00:39:57,600 Set up new bill pays 995 00:39:57,600 --> 00:39:59,440 or set up a new wire transfer. 996 00:39:59,720 --> 00:40:01,780 New transactions should have a positive 997 00:40:01,780 --> 00:40:02,660 authentication model. 998 00:40:02,920 --> 00:40:04,900 Don't just say your session ID is valid 999 00:40:04,900 --> 00:40:06,920 therefore all transactions are trusted. 1000 00:40:08,460 --> 00:40:10,060 Use hash values to transactions 1001 00:40:10,060 --> 00:40:11,140 to prevent tampering. 1002 00:40:11,900 --> 00:40:14,200 I'd like to talk about this a little more 1003 00:40:14,200 --> 00:40:15,140 but I'm really low on time. 1004 00:40:15,940 --> 00:40:18,080 There are specific trojans and BHOs 1005 00:40:18,080 --> 00:40:19,240 that specifically target 1006 00:40:19,240 --> 00:40:20,460 certain institutions. 1007 00:40:20,760 --> 00:40:22,660 Go out to Sark or Trend Micro or Sophos 1008 00:40:22,660 --> 00:40:24,680 type in a bank name and search through their database. 1009 00:40:27,800 --> 00:40:29,860 They have a sit and wait approach. 1010 00:40:30,080 --> 00:40:31,000 They'll let you log in 1011 00:40:31,000 --> 00:40:32,060 wait until you do a transaction 1012 00:40:32,060 --> 00:40:33,320 change it on the fly. 1013 00:40:34,940 --> 00:40:36,920 Force the user to review and verify 1014 00:40:36,920 --> 00:40:38,400 their login events and transactions. 1015 00:40:38,860 --> 00:40:40,440 At best, the bank may have 1016 00:40:40,440 --> 00:40:42,900 when you log in, your last login time was this. 1017 00:40:42,980 --> 00:40:44,280 Your last login date was this. 1018 00:40:44,480 --> 00:40:45,460 No, print it out. 1019 00:40:45,600 --> 00:40:47,140 Show them all the login events. 1020 00:40:47,340 --> 00:40:49,220 Show them all the transactions that took place 1021 00:40:49,220 --> 00:40:50,120 under their credentials. 1022 00:40:50,380 --> 00:40:52,200 Send it to them in the mail with their statement 1023 00:40:52,200 --> 00:40:53,220 or show it online. 1024 00:40:57,360 --> 00:40:58,780 If it's being abused, 1025 00:40:58,960 --> 00:41:00,360 you don't necessarily know that. 1026 00:41:03,040 --> 00:41:04,880 Hardware tokens have a good record of security. 1027 00:41:05,220 --> 00:41:06,620 We talked about how it's commercially 1028 00:41:07,160 --> 00:41:08,840 unfeasible, but dear lord, 1029 00:41:08,980 --> 00:41:10,760 please let the user opt in. 1030 00:41:10,980 --> 00:41:12,800 If my bank would give me a token 1031 00:41:12,800 --> 00:41:14,380 and all I had to do was pay 50 bucks, 1032 00:41:14,540 --> 00:41:15,040 I'd do it. 1033 00:41:20,300 --> 00:41:22,340 Maybe share the cost with the customer, 1034 00:41:22,440 --> 00:41:24,380 but come on, hardware tokens are good. 1035 00:41:24,580 --> 00:41:26,680 They have a pretty good track record. 1036 00:41:27,160 --> 00:41:27,660 Let's use them. 1037 00:41:27,720 --> 00:41:30,360 If the bank doesn't want to foot the bill for the cost, 1038 00:41:30,500 --> 00:41:31,600 let the user opt in. 1039 00:41:32,940 --> 00:41:34,360 Demo and code, we still have time. 1040 00:41:41,900 --> 00:41:42,680 This is 1041 00:41:42,680 --> 00:41:44,160 dcbank.htm, 1042 00:41:44,180 --> 00:41:45,820 simple HTML form. 1043 00:41:46,000 --> 00:41:48,220 I just took out any company specific information. 1044 00:41:48,500 --> 00:41:51,000 I flat out plagiarized this off the target bank. 1045 00:41:51,300 --> 00:41:52,380 Go to their login page, 1046 00:41:52,580 --> 00:41:54,420 view source, copy and paste. 1047 00:41:54,420 --> 00:41:55,180 There's your webpage. 1048 00:41:56,040 --> 00:41:58,400 You can see where the blinking cursor is, 1049 00:41:58,460 --> 00:41:59,100 action equals. 1050 00:41:59,340 --> 00:42:01,280 I'm posting to my POC code. 1051 00:42:01,420 --> 00:42:04,160 It's poc.cgi, just to show that I am submitting 1052 00:42:04,160 --> 00:42:05,100 to the form I created. 1053 00:42:12,920 --> 00:42:14,600 Down here you see all these script includes. 1054 00:42:14,940 --> 00:42:16,600 Again, I flat out plagiarized 1055 00:42:16,600 --> 00:42:18,560 their JavaScript and used copy and paste 1056 00:42:18,560 --> 00:42:19,280 to the script includes. 1057 00:42:19,540 --> 00:42:21,700 I'm running their scripts on my phishing website. 1058 00:42:22,560 --> 00:42:24,340 Nothing new. Didn't doctor the code at all. 1059 00:42:24,420 --> 00:42:25,580 Just copy and paste their source. 1060 00:42:28,880 --> 00:42:29,760 Here's the code. 1061 00:42:29,960 --> 00:42:31,300 It is a Perl hack job. 1062 00:42:31,640 --> 00:42:34,120 I am using httpcookies and lwp. 1063 00:42:34,460 --> 00:42:36,080 Most of you programmers may notice 1064 00:42:36,080 --> 00:42:37,660 I am not using strict. 1065 00:42:37,940 --> 00:42:39,380 I am not using taint. 1066 00:42:39,560 --> 00:42:41,080 I am not validating my input. 1067 00:42:41,360 --> 00:42:43,040 I am not blessing my object references. 1068 00:42:43,340 --> 00:42:45,920 If you use this code anywhere outside of a test lab, 1069 00:42:46,100 --> 00:42:47,080 you will be owned. 1070 00:42:48,980 --> 00:42:50,200 Right here at the top, 1071 00:42:50,200 --> 00:42:51,460 on line six, target URL. 1072 00:42:51,860 --> 00:42:53,040 That's the bank I'm targeting. 1073 00:42:54,420 --> 00:42:55,720 I have a cookie jar for persistent cookies 1074 00:42:55,720 --> 00:42:57,140 and just putting it to a file. 1075 00:42:57,260 --> 00:42:59,040 If you want it to be temporary or on the fly, 1076 00:42:59,960 --> 00:43:01,820 uncomment line 15 where I just create 1077 00:43:01,820 --> 00:43:03,380 a session-based cookie jar. 1078 00:43:03,800 --> 00:43:05,920 I have a debug file that's actually printing 1079 00:43:05,920 --> 00:43:08,260 requests and responses from both the phished client 1080 00:43:08,260 --> 00:43:09,120 and the real server. 1081 00:43:09,280 --> 00:43:11,320 If you want to go through and look at it. 1082 00:43:13,760 --> 00:43:16,280 First thing we do, print content type text HTML. 1083 00:43:16,500 --> 00:43:17,540 We're doing 200 OK. 1084 00:43:17,680 --> 00:43:19,840 We're impersonating the web server request method. 1085 00:43:20,360 --> 00:43:21,860 I was going to do a get, 1086 00:43:21,960 --> 00:43:23,460 but I didn't have the time. 1087 00:43:24,420 --> 00:43:25,460 I'm basically reading 1088 00:43:26,100 --> 00:43:28,100 environmental variable content length bytes 1089 00:43:28,100 --> 00:43:30,380 from the input and just throwing it in 1090 00:43:30,380 --> 00:43:31,380 a variable called input. 1091 00:43:32,880 --> 00:43:33,520 Victim IP, 1092 00:43:33,860 --> 00:43:36,260 I'm storing that as, again, just querying 1093 00:43:36,260 --> 00:43:37,760 the environmental variable for the remote header 1094 00:43:37,760 --> 00:43:38,580 to get the victim's IP. 1095 00:43:38,880 --> 00:43:40,980 Then I create a little hash here called victim header. 1096 00:43:41,600 --> 00:43:44,040 You can see all I'm doing is loading up my hash 1097 00:43:44,040 --> 00:43:46,640 with environmental variables that the user is giving me 1098 00:43:46,640 --> 00:43:48,220 just by visiting my page. 1099 00:43:48,420 --> 00:43:50,180 HTTP accept, accept language, 1100 00:43:50,320 --> 00:43:52,080 user agent, encoding, character set, 1101 00:43:52,220 --> 00:43:53,780 CPU and HTTP connection. 1102 00:43:54,420 --> 00:43:56,340 Anyone that's ever looked at an HTTP request 1103 00:43:56,340 --> 00:43:57,700 knows what I'm talking about. 1104 00:43:58,980 --> 00:44:00,220 This little piece down here 1105 00:44:00,220 --> 00:44:02,420 on line 48, site specific, they're looking for 1106 00:44:02,420 --> 00:44:03,880 test JavaScript equals OK 1107 00:44:03,880 --> 00:44:05,000 as part of their form. 1108 00:44:05,280 --> 00:44:08,120 If I don't have it, I'm just concatenating it onto the end 1109 00:44:08,120 --> 00:44:09,180 to make my request look valid. 1110 00:44:09,840 --> 00:44:11,900 Then I create a variable called victim FP. 1111 00:44:14,680 --> 00:44:16,520 Victim FP, that's my victim's fingerprint. 1112 00:44:16,940 --> 00:44:18,320 Again, input, I'm just reading 1113 00:44:18,320 --> 00:44:20,620 content length bytes straight out of the request 1114 00:44:20,620 --> 00:44:21,860 and throwing it in a variable. 1115 00:44:22,020 --> 00:44:23,400 No validation, just 1116 00:44:24,420 --> 00:44:26,240 pocket brigade. Grab it over here, hand it off over there. 1117 00:44:27,160 --> 00:44:28,280 Then I call my 1118 00:44:28,280 --> 00:44:30,080 login subroutine. I'm passing my 1119 00:44:30,080 --> 00:44:32,040 login subroutine, my victim header hash 1120 00:44:32,040 --> 00:44:33,260 and my victim FP. 1121 00:44:34,380 --> 00:44:36,120 Here's the login subroutine. 1122 00:44:36,400 --> 00:44:38,320 I'm creating a browser agent and I'm loading 1123 00:44:38,320 --> 00:44:40,200 up the user agent with whatever 1124 00:44:40,200 --> 00:44:42,040 was in the environmental variable that 1125 00:44:42,040 --> 00:44:43,000 the user gave me. 1126 00:44:44,000 --> 00:44:46,080 75 and 76, you can use a 1127 00:44:46,080 --> 00:44:47,840 proxy. I've tested this through a proxy. 1128 00:44:47,960 --> 00:44:50,320 If you don't want it traced, just uncomment 1129 00:44:50,320 --> 00:44:52,320 those lines. It works. Then we create 1130 00:44:52,320 --> 00:44:54,180 a new request. We're using the 1131 00:44:54,420 --> 00:44:55,440 request verb to target URL. 1132 00:44:56,520 --> 00:44:58,320 Here we are again just loading 1133 00:44:58,320 --> 00:45:00,140 up our request headers with 1134 00:45:00,140 --> 00:45:01,640 what we're getting from the victim. 1135 00:45:01,860 --> 00:45:04,160 We're just grabbing it over here, placing it in the 1136 00:45:04,160 --> 00:45:06,100 bucket over here. We're spoofing the 1137 00:45:06,100 --> 00:45:08,200 refer on line 87 and putting in 1138 00:45:08,200 --> 00:45:10,080 content type. Then down here, our 1139 00:45:10,080 --> 00:45:11,900 request content, victim FP, 1140 00:45:12,100 --> 00:45:14,180 the victim fingerprint. We're not even really touching it. 1141 00:45:14,320 --> 00:45:16,220 We're just grabbing it off the login form which 1142 00:45:16,220 --> 00:45:18,180 we stole from the target site and 1143 00:45:18,180 --> 00:45:19,160 just passing it to them again. 1144 00:45:19,740 --> 00:45:21,900 Then we get the response from the browser request 1145 00:45:22,420 --> 00:45:24,180 printing to the debug file the code, the 1146 00:45:24,420 --> 00:45:26,180 message, the header. Then we parse 1147 00:45:26,180 --> 00:45:27,680 the content. Let me go down to that. 1148 00:45:35,280 --> 00:45:36,220 Here's the parse content 1149 00:45:36,220 --> 00:45:38,280 subroutine. I basically throw the 1150 00:45:38,280 --> 00:45:40,160 content to the page in an array and trim off 1151 00:45:40,160 --> 00:45:42,140 the first top of it because I don't care about any of the 1152 00:45:42,140 --> 00:45:44,340 metadata or table structure or anything like that. 1153 00:45:44,500 --> 00:45:45,840 I'm only interested in two things. 1154 00:45:46,740 --> 00:45:48,380 View state, that's a variable that 1155 00:45:48,380 --> 00:45:50,140 I had to use for the specific site 1156 00:45:50,140 --> 00:45:52,500 I'm targeting. They use an ASP.net 1157 00:45:52,500 --> 00:45:53,800 application with view state. 1158 00:45:54,420 --> 00:45:56,400 Most of you who code ASP.net know what I'm 1159 00:45:56,400 --> 00:45:58,300 talking about. I just need to capture 1160 00:45:58,300 --> 00:46:00,400 it and use it depending upon what phase 1161 00:46:00,400 --> 00:46:02,280 I'm in just to stay in sync and in state 1162 00:46:02,280 --> 00:46:04,300 with the server. I create a 1163 00:46:04,300 --> 00:46:06,240 variable called passed and mark it to zero. We haven't 1164 00:46:06,240 --> 00:46:06,960 passed anything yet. 1165 00:46:08,080 --> 00:46:10,360 I parse it and I grab the view state with 1166 00:46:10,360 --> 00:46:12,340 some simple regex and store it in a variable. 1167 00:46:13,480 --> 00:46:14,460 If we see 1168 00:46:14,460 --> 00:46:16,280 within the page complete login, that means 1169 00:46:16,280 --> 00:46:18,200 we have completed device fingerprinting 1170 00:46:18,200 --> 00:46:20,440 and we're ready to phish the user for the password. 1171 00:46:20,660 --> 00:46:22,040 I mark passed equals one. 1172 00:46:22,980 --> 00:46:23,620 Else if, 1173 00:46:23,780 --> 00:46:25,860 your security question, that means we did not 1174 00:46:25,860 --> 00:46:27,580 pass, they're going to prompt me for a security question, 1175 00:46:27,820 --> 00:46:29,520 so I need to grab that security question 1176 00:46:29,520 --> 00:46:32,180 so I can give it to the user and man in the middle of them. 1177 00:46:32,940 --> 00:46:34,320 If passed equals one, 1178 00:46:34,440 --> 00:46:35,840 we're basically grabbing again with 1179 00:46:35,840 --> 00:46:37,620 some simple regex the caption or 1180 00:46:37,620 --> 00:46:39,720 the security phrase associated 1181 00:46:39,720 --> 00:46:41,900 with the image and then down here you can 1182 00:46:41,900 --> 00:46:43,840 see again simple regex. I'm grabbing 1183 00:46:43,840 --> 00:46:46,020 the alt tag because that alt tag is 1184 00:46:46,020 --> 00:46:47,640 going to have a one to one correspondence 1185 00:46:47,640 --> 00:46:49,440 with my local image repository 1186 00:46:49,440 --> 00:46:51,380 on my evil server. 1187 00:46:57,160 --> 00:46:58,000 Alright, so 1188 00:46:58,000 --> 00:47:00,140 first part of the routine, if caption 1189 00:47:00,140 --> 00:47:02,080 and if alt. So again, 1190 00:47:02,160 --> 00:47:04,120 simple if statement. If we did return a caption 1191 00:47:04,120 --> 00:47:05,740 and an alt tag, we know we succeeded. 1192 00:47:06,040 --> 00:47:07,720 So we're printing out just 1193 00:47:08,220 --> 00:47:10,020 some HTML that I threw 1194 00:47:10,020 --> 00:47:11,940 together, printing it to the socket and 1195 00:47:11,940 --> 00:47:13,800 we have our security phrase 1196 00:47:13,800 --> 00:47:15,900 and our image based on the alt tag 1197 00:47:15,900 --> 00:47:17,920 and hopefully you can see it like there on line 1198 00:47:17,920 --> 00:47:20,020 133, image source equals 1199 00:47:20,020 --> 00:47:21,800 alt variable dot jpeg. Simple. 1200 00:47:23,620 --> 00:47:24,220 Here at 1201 00:47:24,220 --> 00:47:25,980 the bottom, just to prove in the demo that 1202 00:47:25,980 --> 00:47:27,220 I am doing this and not lying, 1203 00:47:27,880 --> 00:47:29,740 I'm printing out in the bottom is 1204 00:47:29,740 --> 00:47:31,600 debug info, the contents of my victim 1205 00:47:31,600 --> 00:47:33,820 header hash, as well as 1206 00:47:34,540 --> 00:47:36,140 splitting my input on ampersands. 1207 00:47:36,360 --> 00:47:38,080 Again, I'm just splitting on ampersands, 1208 00:47:38,180 --> 00:47:39,680 I'm not validating my input, so 1209 00:47:40,500 --> 00:47:41,940 don't use this code anywhere other than 1210 00:47:41,940 --> 00:47:42,340 a test lab. 1211 00:47:43,520 --> 00:47:45,880 Down here, just in case we fail, if we get 1212 00:47:45,880 --> 00:47:47,780 returned the security question in our view state, 1213 00:47:47,960 --> 00:47:49,800 we know we failed fingerprinting and we have to 1214 00:47:49,800 --> 00:47:50,840 man in the middle of that password. 1215 00:47:52,880 --> 00:47:53,960 Down here, I'm doing 1216 00:47:53,960 --> 00:47:55,780 the same thing, I'm just grabbing the 1217 00:47:56,580 --> 00:47:58,080 variable for the challenge question, 1218 00:47:58,280 --> 00:47:59,400 throwing it up on the page, 1219 00:47:59,600 --> 00:48:01,920 and debugging my state at the bottom, what my 1220 00:48:01,920 --> 00:48:03,780 victor header is, and what my input 1221 00:48:03,780 --> 00:48:05,900 values are. Simple. 1222 00:48:06,140 --> 00:48:07,860 It's a 250 line Perl hack 1223 00:48:07,860 --> 00:48:09,760 job, anyone that speaks Perl better than me, 1224 00:48:09,880 --> 00:48:11,940 which is probably most of you, could probably do it 1225 00:48:11,940 --> 00:48:13,880 in about 100 lines, but now let's actually 1226 00:48:13,880 --> 00:48:14,260 see it. 1227 00:48:23,700 --> 00:48:26,300 So here's Defcon Bank, this is my 1228 00:48:26,300 --> 00:48:28,200 page I put together, I'm going to do a quick 1229 00:48:28,200 --> 00:48:30,040 view source to show you it's the same source code. 1230 00:48:34,200 --> 00:48:35,760 There it is, posting to my form, 1231 00:48:35,900 --> 00:48:37,960 poc.cgi, right up there at the top. 1232 00:48:38,340 --> 00:48:40,260 Again, totally plagiarized 1233 00:48:40,260 --> 00:48:42,080 from the target site, I did very little 1234 00:48:42,080 --> 00:48:42,680 effort on this. 1235 00:48:44,320 --> 00:48:45,940 Down here at the bottom, you can see 1236 00:48:47,220 --> 00:48:48,260 Let me pause that. 1237 00:48:48,440 --> 00:48:50,240 So this is the first site we looked at 1238 00:48:50,240 --> 00:48:51,260 where they have 1239 00:48:52,180 --> 00:48:53,880 within the code, all these individual 1240 00:48:53,880 --> 00:48:56,120 variables for browser and screen and things like that, 1241 00:48:56,220 --> 00:48:58,260 but they're not using it, they're concatenating 1242 00:48:58,260 --> 00:48:59,540 them all into a single value, 1243 00:48:59,700 --> 00:49:01,600 and passing it as part of a single parameter. 1244 00:49:02,280 --> 00:49:03,340 Can you guys see that? 1245 00:49:03,600 --> 00:49:04,000 No? 1246 00:49:08,900 --> 00:49:10,020 Wow, that's a lot better. 1247 00:49:14,060 --> 00:49:15,420 I hate Windows Media Player. 1248 00:49:17,820 --> 00:49:19,220 Come see me, I'll give it to you. 1249 00:49:22,760 --> 00:49:24,000 Alright, so that's our HTML 1250 00:49:24,000 --> 00:49:26,100 source, I'm going to show you my cookies 1251 00:49:26,100 --> 00:49:27,800 just to show that I have no cookies, 1252 00:49:27,960 --> 00:49:29,960 I don't have a persistent cookie, I'm not spoofing 1253 00:49:29,960 --> 00:49:31,860 this in any way, my cookies are clear 1254 00:49:31,860 --> 00:49:32,340 on Firefox. 1255 00:49:33,760 --> 00:49:34,980 So I'm going to enter my username, 1256 00:49:36,720 --> 00:49:38,060 and I'm posting to my CGI 1257 00:49:38,060 --> 00:49:39,740 that's attacking my target site, 1258 00:49:39,860 --> 00:49:40,380 the man in the middle. 1259 00:49:41,620 --> 00:49:43,840 It's going to hang for a bit, because remember I have to wait for the 1260 00:49:43,840 --> 00:49:45,860 target server to fully respond before I can respond 1261 00:49:45,860 --> 00:49:48,080 to the user. And there's 1262 00:49:48,080 --> 00:49:49,680 my security phrase and image. 1263 00:49:49,840 --> 00:49:51,940 I've changed this, so guys don't try 1264 00:49:52,040 --> 00:49:52,580 and hack me, please. 1265 00:49:53,240 --> 00:49:55,640 So my security phrase is Ninja Attack Kitten, 1266 00:49:55,760 --> 00:49:57,400 and there's my little picture 1267 00:49:57,400 --> 00:49:59,300 based on the alt tag that I have. 1268 00:49:59,500 --> 00:50:01,900 And then it's now time for me to enter my password, 1269 00:50:02,100 --> 00:50:03,940 I've phished the user, I'm showing those 1270 00:50:03,940 --> 00:50:05,260 security credentials, that 1271 00:50:05,720 --> 00:50:07,920 picture and that phrase that proves you're on the real site, 1272 00:50:08,060 --> 00:50:09,680 and then let's look at the debug information 1273 00:50:09,680 --> 00:50:10,740 so you see what I'm doing. 1274 00:50:14,400 --> 00:50:16,080 So there's my user agent string, 1275 00:50:16,180 --> 00:50:17,860 again I'm just dumping the contents of that 1276 00:50:17,860 --> 00:50:18,820 hash called victim header, 1277 00:50:19,420 --> 00:50:21,840 and then down here, this is everything that was 1278 00:50:22,040 --> 00:50:23,940 an input that was passed as part of the post content, 1279 00:50:24,160 --> 00:50:25,740 and as you can see it's very long, 1280 00:50:25,900 --> 00:50:27,780 but there you can see Firefox, I'm running 1281 00:50:27,780 --> 00:50:29,840 Windows NT, there's my user agent, 1282 00:50:30,480 --> 00:50:31,480 keep on scrolling, 1283 00:50:31,700 --> 00:50:33,540 just like we saw on the earlier slides, 1284 00:50:34,980 --> 00:50:35,820 there's the parameter 1285 00:50:37,180 --> 00:50:38,060 PMF, FPSC, 1286 00:50:38,180 --> 00:50:39,100 there's my screen resolution, 1287 00:50:40,080 --> 00:50:41,860 FPSW, there's all my software extensions, 1288 00:50:43,940 --> 00:50:44,380 FPLN, 1289 00:50:44,560 --> 00:50:45,340 there's my language, 1290 00:50:48,080 --> 00:50:49,820 just grabbing it off the login form. 1291 00:50:50,020 --> 00:50:51,980 So now it's safe for me to enter my password and 1292 00:50:52,040 --> 00:50:52,740 the user is compromised. 1293 00:50:53,180 --> 00:50:55,480 Now I'm going to use user agent switcher and 1294 00:50:55,480 --> 00:50:56,400 switch to Opera. 1295 00:50:56,780 --> 00:50:59,460 So I just used user agent switcher, 1296 00:50:59,480 --> 00:51:01,400 I'm sure you've all seen it in Firefox, great little utility, 1297 00:51:01,640 --> 00:51:03,940 I'm now impersonating in Opera 8.5 1298 00:51:03,940 --> 00:51:04,240 browser, 1299 00:51:06,000 --> 00:51:07,840 and we're going to run it again so that we can 1300 00:51:07,840 --> 00:51:09,400 forcibly fail device fingerprinting. 1301 00:51:14,040 --> 00:51:15,000 Enter my username, 1302 00:51:25,380 --> 00:51:26,260 we failed, 1303 00:51:26,380 --> 00:51:27,700 so it's the challenge question, 1304 00:51:27,940 --> 00:51:30,100 I need to answer who is the name of the best man at my wedding, 1305 00:51:30,260 --> 00:51:31,940 you can see in the header it's Opera 1306 00:51:31,940 --> 00:51:33,640 8.5.1 now instead of Firefox, 1307 00:51:34,020 --> 00:51:35,940 you can see it down there in the content 1308 00:51:36,440 --> 00:51:37,840 that it's passing 1309 00:51:37,840 --> 00:51:39,900 Opera as part of the fingerprint, so I have to answer 1310 00:51:39,900 --> 00:51:40,520 my challenge question. 1311 00:51:41,180 --> 00:51:41,760 . 1312 00:51:50,120 --> 00:51:51,700 Voila, there it is, simple. 1313 00:51:53,360 --> 00:51:54,200 There it is, 1314 00:51:54,200 --> 00:51:56,200 I'm using Opera, my browser says 1315 00:51:56,200 --> 00:51:58,320 Opera within the header, it says Opera within 1316 00:51:58,320 --> 00:52:00,420 the fingerprint that I'm 1317 00:52:00,420 --> 00:52:01,960 passing, it is trivial 1318 00:52:02,310 --> 00:52:04,080 to impersonate or bypass 1319 00:52:04,080 --> 00:52:04,820 these things. 1320 00:52:06,840 --> 00:52:08,540 With very little coding skill, 1321 00:52:08,720 --> 00:52:10,400 anything other than view source on 1322 00:52:10,520 --> 00:52:12,300 your actual login form, copying down 1323 00:52:12,300 --> 00:52:14,300 the JavaScript includes, and throwing up a phishing 1324 00:52:14,300 --> 00:52:16,200 site. This does not stop phishing 1325 00:52:16,200 --> 00:52:16,720 at all. 1326 00:52:17,720 --> 00:52:19,000 One minute, oh crap. 1327 00:52:37,080 --> 00:52:38,340 Conclusions, why did I do this? 1328 00:52:38,540 --> 00:52:40,180 I did this because as I said 1329 00:52:40,520 --> 00:52:42,600 earlier, no one's looking at this stuff 1330 00:52:42,600 --> 00:52:44,360 and it's basic. It is easy to 1331 00:52:44,360 --> 00:52:46,340 impersonate, hack, or walk right by 1332 00:52:46,340 --> 00:52:48,320 and this is supposedly what's protecting 1333 00:52:48,320 --> 00:52:50,340 all the financial institutions in the United 1334 00:52:50,340 --> 00:52:52,480 States of America. Guys, this is crap. 1335 00:52:53,820 --> 00:52:54,340 Traditional 1336 00:52:54,340 --> 00:52:56,240 attack vectors, they're still a threat. 1337 00:52:56,780 --> 00:52:58,380 This does nothing to address 1338 00:52:58,380 --> 00:53:00,440 any other vulnerability types. This does 1339 00:53:00,440 --> 00:53:02,400 not address cross-site scripting, it does not 1340 00:53:02,400 --> 00:53:04,400 address SQL injection or any 1341 00:53:04,400 --> 00:53:05,880 other type of command injection attacks. 1342 00:53:06,160 --> 00:53:08,420 But for overflows, this does nothing to help 1343 00:53:08,420 --> 00:53:10,240 the problems that we already have 1344 00:53:10,520 --> 00:53:11,020 in these applications. 1345 00:53:12,280 --> 00:53:14,300 If XSS exists on a site, 1346 00:53:14,460 --> 00:53:16,540 now it's worse than ever because the best 1347 00:53:16,540 --> 00:53:18,120 an attacker used to be able to hope for 1348 00:53:18,120 --> 00:53:20,520 was grabbing the session cookie and being able 1349 00:53:20,520 --> 00:53:22,360 to piggyback on that victim's session. 1350 00:53:22,620 --> 00:53:24,320 Now we grab the persistent cookie 1351 00:53:24,320 --> 00:53:26,300 and we don't even need to worry about device 1352 00:53:26,300 --> 00:53:28,360 fingerprinting. So now XSS, 1353 00:53:28,520 --> 00:53:30,180 if it wasn't scary enough, now it's worse. 1354 00:53:31,400 --> 00:53:32,480 Browser-based vulnerabilities 1355 00:53:32,480 --> 00:53:34,340 are still a problem. There's still vulnerabilities 1356 00:53:34,340 --> 00:53:36,160 in Safari, Firefox, and IE. 1357 00:53:36,520 --> 00:53:38,160 That's still a problem on the client side. 1358 00:53:38,320 --> 00:53:39,660 This doesn't address that either. 1359 00:53:40,520 --> 00:53:42,460 We're putting controls in the wrong 1360 00:53:42,460 --> 00:53:44,260 place. We're just layering more 1361 00:53:44,260 --> 00:53:46,500 attack surface out front prior to 1362 00:53:46,500 --> 00:53:48,340 authentication. We're not addressing the 1363 00:53:48,340 --> 00:53:50,580 real problem, which is once attackers get in, 1364 00:53:50,640 --> 00:53:52,500 and they will get in, they're doing bad 1365 00:53:52,500 --> 00:53:52,880 things. 1366 00:53:54,900 --> 00:53:56,080 Financial industry problems. 1367 00:53:56,560 --> 00:53:58,500 If a customer loses their checkbook 1368 00:53:58,500 --> 00:54:00,020 or credit card in the real world, 1369 00:54:00,180 --> 00:54:02,460 the bank picks up the tab. Even if 1370 00:54:02,460 --> 00:54:04,360 it's due to negligence. If you take out your credit card, 1371 00:54:04,400 --> 00:54:06,340 throw it on the street, and someone uses it for fraud, 1372 00:54:06,460 --> 00:54:07,120 you're covered. 1373 00:54:08,460 --> 00:54:10,320 Online, the issue isn't settled. 1374 00:54:10,520 --> 00:54:12,300 I'm done? Okay, 1375 00:54:12,360 --> 00:54:12,660 I'm done. 1376 00:54:14,760 --> 00:54:16,380 I will be in Q&A 1377 00:54:16,380 --> 00:54:18,000 room one. I can finish up the presentation 1378 00:54:18,340 --> 00:54:20,300 or continue talking 1379 00:54:20,300 --> 00:54:22,640 or answer any questions you have, any accusations. 1380 00:54:22,900 --> 00:54:24,340 You want to see the code or the demo 1381 00:54:24,340 --> 00:54:26,020 closer up, please come see me. 1382 00:54:31,500 --> 00:54:32,400 Thank you all 1383 00:54:32,400 --> 00:54:32,780 very much.