1 00:00:00,000 --> 00:00:03,440 So I'm Matt Johanson, Matty J, whatever you want to call me. 2 00:00:04,600 --> 00:00:07,000 Oh, I'm Kyle Osborne, or The Cause. 3 00:00:07,400 --> 00:00:10,320 This is Cause, Baby Cause, sure. 4 00:00:13,600 --> 00:00:19,040 Oh, I'm The Cause. A lot of people know me as Jack Bauer now, so that's kind of cool. 5 00:00:19,400 --> 00:00:21,960 The internet's Jack Bauer for the LA Times audience. 6 00:00:22,000 --> 00:00:25,160 And someone joined, I don't know who it is, but someone's on. 7 00:00:26,940 --> 00:00:28,620 Who is it? There he is, cool. 8 00:00:28,620 --> 00:00:31,020 Cool video chatting with us on our Chromebook. 9 00:00:31,560 --> 00:00:35,040 So we both work for White Hat Securities Threat Research Center. 10 00:00:35,200 --> 00:00:37,920 That sounds pretty much as epic as it gets, right? 11 00:00:38,060 --> 00:00:41,080 But we are web app hackers. 12 00:00:43,500 --> 00:00:48,060 Oh, yeah, I'm an application security specialist, blah, blah, blah. 13 00:00:48,440 --> 00:00:54,140 Offensive security, fun stuff, likes to make things scarier than they actually are, 14 00:00:54,240 --> 00:00:55,460 but not FUD-like. 15 00:00:55,840 --> 00:00:58,280 Kyle breaks things. This is our obligatory. 16 00:00:58,620 --> 00:01:04,100 What our company does, we scan websites for vulnerabilities, just past 4,000 sites, very cool. 17 00:01:04,960 --> 00:01:09,020 Don't care. Okay, so the CR-48, this is what started this whole mess. 18 00:01:09,160 --> 00:01:13,740 This is what started our research. Kyle's sitting on Google Plus on it right now. 19 00:01:14,460 --> 00:01:18,820 This is the beta version of the Chromebooks that came out back in the fall of 2010. 20 00:01:19,720 --> 00:01:23,040 Who had a beta CR-48 in the room? Sweet. 21 00:01:23,300 --> 00:01:26,900 Yeah, they were sitting on about 25,000. You have yours right there. All right. 22 00:01:27,140 --> 00:01:28,600 I have an extension I'd like you to have. 23 00:01:28,600 --> 00:01:28,780 I'm going to install. 24 00:01:31,500 --> 00:01:34,180 So they were sitting on about 25,000 of these. 25 00:01:34,260 --> 00:01:34,840 They mailed them out. 26 00:01:34,920 --> 00:01:39,760 They gave White Hat one for us to hack on it, and we wouldn't be here if we didn't, right? 27 00:01:39,880 --> 00:01:41,560 So we found some pretty cool things. 28 00:01:42,440 --> 00:01:46,720 So before the CR-48 came out, Chrome OS was out as an open-source project. 29 00:01:46,860 --> 00:01:49,980 You could install it on whatever machine you were running, whatever VM you were running, 30 00:01:50,060 --> 00:01:50,580 that kind of thing. 31 00:01:50,680 --> 00:01:56,320 But this is the first device that actually was dedicated to it and utilized all of its features, 32 00:01:56,420 --> 00:01:58,100 utilized all the security features that, 33 00:01:58,600 --> 00:01:59,380 like, Google put in place. 34 00:02:02,320 --> 00:02:05,380 Yeah, another thing is that this is no longer a beta product. 35 00:02:05,900 --> 00:02:07,740 These are out in the public. 36 00:02:07,900 --> 00:02:09,120 Samsung put them out as Chromebooks. 37 00:02:09,340 --> 00:02:10,060 Did anyone buy them? 38 00:02:11,080 --> 00:02:11,480 Cool. 39 00:02:11,640 --> 00:02:12,060 A few of you? 40 00:02:12,240 --> 00:02:12,640 Nice. 41 00:02:12,880 --> 00:02:14,360 All right, so yeah, they're out there. 42 00:02:14,480 --> 00:02:15,880 They're in production right now. 43 00:02:17,340 --> 00:02:19,700 So yeah, what we know about Chrome OS, right? 44 00:02:19,820 --> 00:02:21,640 It's a web-based operating system. 45 00:02:22,720 --> 00:02:26,580 We were actually shocked when we opened this laptop that it was just a browser. 46 00:02:26,720 --> 00:02:27,500 It was just Chrome. 47 00:02:27,640 --> 00:02:28,200 We were like, oh. 48 00:02:29,540 --> 00:02:31,140 A machine with Chrome on it. 49 00:02:31,220 --> 00:02:32,080 I already had one of those. 50 00:02:33,100 --> 00:02:35,100 So this is all it is, right? 51 00:02:35,140 --> 00:02:36,000 It's just Chrome. 52 00:02:36,200 --> 00:02:40,260 So in order to get any functionality out of this besides the web browser, 53 00:02:40,300 --> 00:02:41,840 you've got to use the extensions in the web store. 54 00:02:41,920 --> 00:02:44,540 It's kind of like the Apple App Store, but they obviously couldn't call it that. 55 00:02:46,780 --> 00:02:50,560 So because of all of that, nothing is stored locally, right? 56 00:02:50,620 --> 00:02:52,220 The hard drive, you have no access to it. 57 00:02:52,280 --> 00:02:54,720 As a user of this device, you cannot touch the hard drive. 58 00:02:55,520 --> 00:02:57,080 You can't store anything on it. 59 00:02:57,080 --> 00:02:58,360 It's small anyway. 60 00:03:00,480 --> 00:03:01,660 Nothing is really on it. 61 00:03:01,720 --> 00:03:02,620 The file system is there. 62 00:03:02,720 --> 00:03:03,260 It's just Chrome. 63 00:03:04,240 --> 00:03:05,680 So because of that, it's pretty fast. 64 00:03:05,820 --> 00:03:07,420 You open these things up, and they're on. 65 00:03:07,520 --> 00:03:07,900 You're online. 66 00:03:08,180 --> 00:03:08,920 You're on the web browser. 67 00:03:09,280 --> 00:03:15,580 And Google's kind of pushing you towards storing everything in Google Docs or your Google Music, 68 00:03:15,800 --> 00:03:16,520 anything like that. 69 00:03:16,600 --> 00:03:18,120 They're pushing you towards the cloud, right? 70 00:03:18,560 --> 00:03:23,340 So this is what they're putting up against the iPads of the world, right? 71 00:03:23,440 --> 00:03:25,000 This is what they're putting up against Apple. 72 00:03:26,060 --> 00:03:27,060 They're trying to steal the iPads. 73 00:03:27,060 --> 00:03:29,580 They're trying to steal some market share, and it could very well sneak their way into 74 00:03:29,580 --> 00:03:29,920 the market. 75 00:03:30,040 --> 00:03:33,560 The Samsung Chromebook only came out in June. 76 00:03:33,840 --> 00:03:38,060 So even though we've had these CR48s for a while, they've only been available for public 77 00:03:38,060 --> 00:03:39,560 purchase for a few months. 78 00:03:39,740 --> 00:03:43,100 So we don't really know what it's going to look like, if this is going to steal a bunch 79 00:03:43,100 --> 00:03:43,860 of market share or not. 80 00:03:44,920 --> 00:03:49,160 So the analogy that we like to make, I've made it a few times already, is that these 81 00:03:49,160 --> 00:03:51,660 things are kind of like mobile devices but with keyboards, right? 82 00:03:51,760 --> 00:03:54,300 So it's an iPad with a keyboard, but it's just a web browser on it. 83 00:03:55,260 --> 00:03:57,040 So the same way that on those phones. 84 00:03:57,060 --> 00:04:01,480 Like an iPhone or something like that is very locked down, and you can't install anything 85 00:04:01,480 --> 00:04:01,880 on it. 86 00:04:01,940 --> 00:04:05,160 You can't just go ahead and install Microsoft Word on your iPhone, right? 87 00:04:05,260 --> 00:04:05,920 Wouldn't that be cool? 88 00:04:06,220 --> 00:04:10,420 But in order to do anything with it without jailbreaking it, you've got to go to the 89 00:04:10,420 --> 00:04:10,980 app store, right? 90 00:04:11,060 --> 00:04:15,200 So how many people in here have more than three pages of apps on their iPhone in their 91 00:04:15,200 --> 00:04:15,480 pocket? 92 00:04:16,500 --> 00:04:17,680 Okay, a bunch of you, right? 93 00:04:17,740 --> 00:04:18,920 So people go app crazy, right? 94 00:04:19,300 --> 00:04:20,820 You've got to download a bunch of different things. 95 00:04:22,540 --> 00:04:26,480 So those of you who have iPhones and have installed all these apps, how many of you 96 00:04:26,480 --> 00:04:28,560 have seen the permission warning that comes up, right? 97 00:04:28,720 --> 00:04:33,100 This app that you're about to install is going to have access to your GPS location, your 98 00:04:33,100 --> 00:04:36,920 call history, your text messages, your mother's maiden name, your social security number, 99 00:04:37,140 --> 00:04:38,380 all that kind of things, right? 100 00:04:38,580 --> 00:04:40,740 Who's hit cancel because of that pop-up box? 101 00:04:42,140 --> 00:04:43,320 Not enough of you. 102 00:04:43,680 --> 00:04:44,620 This is DEF CON. 103 00:04:44,960 --> 00:04:45,520 Come on. 104 00:04:46,060 --> 00:04:46,620 All right. 105 00:04:46,700 --> 00:04:50,240 So the same thing kind of happens in the Chrome web store when you go to install an extension 106 00:04:50,240 --> 00:04:51,040 on Chrome. 107 00:04:51,340 --> 00:04:55,900 Right below the install button it says what websites that that extension is going to have 108 00:04:55,900 --> 00:04:56,680 access to talk to. 109 00:04:57,660 --> 00:05:00,700 So we'll see some more examples of this in a second. 110 00:05:02,880 --> 00:05:10,520 Another thing we want to point out is that with the app store, there's actually a code 111 00:05:10,520 --> 00:05:15,380 review process, or not necessarily code review, there's an application review process, sort 112 00:05:15,380 --> 00:05:17,680 of like a Q&A sort of deal going on. 113 00:05:18,100 --> 00:05:23,620 It's not a security review as far as I know, but the Chrome web store doesn't have any 114 00:05:23,620 --> 00:05:25,180 sort of Q&A process going on. 115 00:05:25,180 --> 00:05:31,360 So you go immediately from the third-party developer to the Google Chrome web store for 116 00:05:31,360 --> 00:05:32,260 anybody to download. 117 00:05:34,300 --> 00:05:37,460 So a lot of these extensions are developed by third parties, right? 118 00:05:37,520 --> 00:05:40,960 It could just be Zynga or it could just be a person, right? 119 00:05:41,240 --> 00:05:45,720 Google also has a bunch of extensions in there, but we found vulnerability in those too, right? 120 00:05:45,980 --> 00:05:48,960 So what was the other thing I wanted to talk about? 121 00:05:50,560 --> 00:05:51,440 Oh, yeah. 122 00:05:51,540 --> 00:05:55,160 So because of the lack of review process in the Chrome web store. 123 00:05:55,160 --> 00:06:00,440 You can look it up right now, there's an extension called Cookie Stealer, I promise we didn't 124 00:06:00,440 --> 00:06:04,780 make it, but it's called Cookie Stealer and that's what it does and it's available for 125 00:06:04,780 --> 00:06:05,020 download. 126 00:06:05,260 --> 00:06:05,640 Go ahead. 127 00:06:08,320 --> 00:06:12,500 We're going to demonstrate a malicious extension that we developed later on in the talk. 128 00:06:13,080 --> 00:06:14,980 It's called, we named it Malicious Extension. 129 00:06:17,220 --> 00:06:20,640 With no legitimate purpose whatsoever. 130 00:06:21,120 --> 00:06:22,180 I did upload it. 131 00:06:22,360 --> 00:06:24,440 And it got into the web store, no problem, right? 132 00:06:24,440 --> 00:06:25,220 You could have downloaded it. 133 00:06:28,640 --> 00:06:29,680 It's not there anymore. 134 00:06:29,680 --> 00:06:30,540 He took it down right away. 135 00:06:31,120 --> 00:06:32,760 I only let a few people download it. 136 00:06:33,680 --> 00:06:35,960 We put the icon as a picture of Justin Bieber. 137 00:06:39,480 --> 00:06:41,160 It had four million downloads. 138 00:06:41,360 --> 00:06:41,500 Okay. 139 00:06:41,600 --> 00:06:43,280 So what does a hacker see, right? 140 00:06:43,380 --> 00:06:47,840 So we're looking at this web store as web hackers like, ah, heaven, right. 141 00:06:47,940 --> 00:06:52,040 This is a brand new attack service for us, this is months old, it's not even years old 142 00:06:52,040 --> 00:06:52,540 yet, right? 143 00:06:52,540 --> 00:06:58,640 So I'm sure this room, more than anyone knows, early on in the product life cycle, where 144 00:06:58,640 --> 00:06:59,680 does security come into play? 145 00:07:01,240 --> 00:07:02,560 Just non-existent, right? 146 00:07:02,640 --> 00:07:06,240 So it's not making money early on, it's costing money, right? 147 00:07:06,300 --> 00:07:08,200 So a lot of these extensions are just coming out now. 148 00:07:09,040 --> 00:07:14,240 So of course they're going to have security holes in them because that's what we find. 149 00:07:14,240 --> 00:07:19,500 And especially now because it's all just HTML5 and JavaScript, so why do you need 150 00:07:19,500 --> 00:07:22,280 to worry about security in HTML5 and JavaScript? 151 00:07:22,280 --> 00:07:22,520 Yeah. 152 00:07:23,340 --> 00:07:29,560 You do most of that stuff server side, there are not very many attacks that a server can't 153 00:07:29,560 --> 00:07:33,340 block that get reflected back to the user with HTML5 and JavaScript. 154 00:07:34,040 --> 00:07:37,740 So the other cool thing about a lot of these Chrome extensions, it makes them different 155 00:07:37,740 --> 00:07:41,640 than a lot of the Firefox or Safari or Internet Explorer add-ons and things like that, is 156 00:07:41,640 --> 00:07:43,460 these are just little mini websites, right? 157 00:07:43,760 --> 00:07:48,600 They're just used to help increase functionality of these Chromebooks especially, but the Chrome 158 00:07:48,600 --> 00:07:49,220 browser, right? 159 00:07:49,260 --> 00:07:51,940 You can install any of these on your machine right now. 160 00:07:52,580 --> 00:07:56,160 A lot of them just take up very little screen real estate, which is really important on 161 00:07:56,160 --> 00:07:56,540 a netbook. 162 00:07:56,620 --> 00:07:58,360 If any of you use netbooks, really important, right? 163 00:07:58,480 --> 00:08:01,840 So let's just get right to what started the whole mess. 164 00:08:02,100 --> 00:08:05,000 So this is kind of like their version of Notepad, right? 165 00:08:05,040 --> 00:08:05,640 It's called Scratchpad. 166 00:08:05,760 --> 00:08:06,640 It's just a note-taking application. 167 00:08:07,020 --> 00:08:08,080 It was pre-installed. 168 00:08:08,140 --> 00:08:09,960 It was the very first one on the CR48. 169 00:08:10,380 --> 00:08:11,120 Who's used it? 170 00:08:11,320 --> 00:08:12,500 Who's seen it, used it? 171 00:08:12,560 --> 00:08:13,940 Who has CR48 Scratchpad, right? 172 00:08:14,100 --> 00:08:14,660 All right, cool. 173 00:08:14,780 --> 00:08:20,500 So it's a little nifty note-taking thing, and the other feature that's cool about it 174 00:08:20,500 --> 00:08:22,440 is that it automatically syncs to your Google Docs. 175 00:08:22,440 --> 00:08:26,180 So if you have a Google Docs account in a folder called Scratchpad, right, so when you're 176 00:08:26,180 --> 00:08:28,980 writing up your shopping list or your to-do list or whatever you're doing in this little 177 00:08:28,980 --> 00:08:34,040 tiny mini website in the bottom of your screen, it syncs to your Google Docs account. 178 00:08:36,300 --> 00:08:40,820 Another feature of Google Docs that we've used in this exploit was that you can actually 179 00:08:40,820 --> 00:08:47,060 share a document or a folder with someone else who's using Google Docs, and they don't 180 00:08:47,060 --> 00:08:52,120 have to give you permission to get that folder or document, right, which has been, I guess, 181 00:08:52,440 --> 00:08:57,840 mostly okay because Google Docs is pretty well protected, but the Scratchpad extension 182 00:08:57,840 --> 00:08:58,820 was not, right? 183 00:08:58,940 --> 00:09:03,220 So we, you know, we could go ahead and share our malicious document, which you'll see in 184 00:09:03,220 --> 00:09:03,520 a second. 185 00:09:05,040 --> 00:09:06,620 Do you have anything you want to say before we go? 186 00:09:06,620 --> 00:09:06,700 Right. 187 00:09:07,000 --> 00:09:12,340 So just the key points that we wanted to push is that it comes default. 188 00:09:13,000 --> 00:09:15,200 Everybody that has Chrome OS has it. 189 00:09:15,820 --> 00:09:17,320 You can install it on Chrome. 190 00:09:19,160 --> 00:09:19,840 What was it? 191 00:09:20,480 --> 00:09:22,420 You're authenticated to your Google account to use it, right? 192 00:09:22,440 --> 00:09:27,340 The main feature of it is that it syncs to your Google Docs accounts. 193 00:09:27,480 --> 00:09:28,480 You're definitely authenticated. 194 00:09:28,600 --> 00:09:29,320 Everyone has it. 195 00:09:29,380 --> 00:09:34,560 It's on every single one of these Chromebooks, and you don't need permission to receive anything. 196 00:09:34,720 --> 00:09:38,740 And then on top of that, Google Documents lets you share across or lets you share to 197 00:09:38,740 --> 00:09:43,240 anybody without notifying them or allowing them to accept it. 198 00:09:43,300 --> 00:09:48,980 It just automatically goes into their documents completely stealthy if you want to. 199 00:09:49,180 --> 00:09:51,960 So not only do they not need to give you permission. 200 00:09:51,960 --> 00:09:56,940 There's a nice convenient checkbox when you share a document that says, turn off email 201 00:09:56,940 --> 00:09:58,180 notification to the person. 202 00:09:59,940 --> 00:10:02,880 So we can go ahead and share the document without the permission, and they'll never 203 00:10:02,880 --> 00:10:03,920 even know that it happened, right? 204 00:10:04,020 --> 00:10:05,560 And this automatically syncs to Scratchpad. 205 00:10:06,460 --> 00:10:10,360 So Google fixed this cross-site scripting bug right away, but I found it within half 206 00:10:10,360 --> 00:10:11,560 an hour of opening the CR48. 207 00:10:11,740 --> 00:10:13,500 It was the very first extension I opened. 208 00:10:13,740 --> 00:10:14,720 I threw in a tag. 209 00:10:14,860 --> 00:10:15,560 No sort of filter. 210 00:10:15,680 --> 00:10:17,940 I didn't do any crazy webhacker stuff. 211 00:10:18,220 --> 00:10:19,360 I threw in a tag. 212 00:10:19,400 --> 00:10:20,100 It didn't handle it. 213 00:10:20,200 --> 00:10:21,940 And we were like, oh, what can we do? 214 00:10:21,940 --> 00:10:22,380 What can we do with this? 215 00:10:22,540 --> 00:10:25,800 So at first we were trying to steal OAuth tokens that it was using and things, but then 216 00:10:25,800 --> 00:10:30,660 we just realized that it was talking directly to docs.google.com and www.google.com. 217 00:10:30,780 --> 00:10:31,780 So we were able to do some cool stuff. 218 00:10:32,160 --> 00:10:34,120 So we have a video since they fixed it right away. 219 00:10:36,640 --> 00:10:37,160 All right. 220 00:10:37,200 --> 00:10:41,880 So this is in fall 2010. 221 00:10:42,580 --> 00:10:44,880 There are about 30,000 users at the time. 222 00:10:46,020 --> 00:10:49,220 Those are either Chrome users or Chrome OS users that come default. 223 00:10:49,700 --> 00:10:50,660 In the bottom right. 224 00:10:50,660 --> 00:10:53,960 You can actually see the little yellow box there. 225 00:10:54,040 --> 00:10:59,740 That is the permissions it gives you that it needs to actually function, which is access 226 00:10:59,740 --> 00:11:06,460 to google.com and docs.google.com and your browser history and your browser history 227 00:11:06,460 --> 00:11:07,080 for some reason. 228 00:11:07,120 --> 00:11:07,420 Cool. 229 00:11:07,780 --> 00:11:12,980 So we're going to go ahead and show intended functionality, which is actually just adding 230 00:11:12,980 --> 00:11:14,240 a document and syncing it. 231 00:11:14,340 --> 00:11:16,580 So this is a regular user's account. 232 00:11:17,100 --> 00:11:18,340 No big deal here. 233 00:11:18,540 --> 00:11:19,080 The victim. 234 00:11:19,280 --> 00:11:19,760 Right there. 235 00:11:20,660 --> 00:11:23,140 There's actually a scratch pad folder on the left if you can see that. 236 00:11:24,680 --> 00:11:27,080 And that's actually where all your documents are stored. 237 00:11:27,180 --> 00:11:30,340 And that's important to remember that it's in that scratch pad folder because we're going 238 00:11:30,340 --> 00:11:33,760 to be utilizing that feature to attack this victim. 239 00:11:34,540 --> 00:11:37,860 So we're going to go ahead and move over to the attacker's docs. 240 00:11:38,140 --> 00:11:44,320 And you can see there's an inject right there that, a document right there that has HTML 241 00:11:44,320 --> 00:11:45,340 and JavaScript in it. 242 00:11:45,600 --> 00:11:48,860 Now that's completely sane inside of docs.google.com. 243 00:11:49,000 --> 00:11:49,760 It's not being rendered. 244 00:11:50,660 --> 00:11:51,160 It's not being executed. 245 00:11:51,460 --> 00:11:53,200 It's just the title of the document. 246 00:11:54,940 --> 00:11:56,880 Can you guys see the URL that we're calling? 247 00:12:00,280 --> 00:12:04,720 So we're basically using an on mouse over event just for illustration purposes. 248 00:12:05,000 --> 00:12:05,940 This could all happen automatically. 249 00:12:06,180 --> 00:12:08,300 But we're going to use an on mouse over event to fire our JavaScript. 250 00:12:08,500 --> 00:12:13,500 And it calls out to an external JavaScript file on Kyle's domain, Iamawesome.com. 251 00:12:14,780 --> 00:12:16,040 That's the external JavaScript file. 252 00:12:16,040 --> 00:12:16,400 It expired. 253 00:12:16,600 --> 00:12:17,820 So if you want to go buy it. 254 00:12:18,800 --> 00:12:20,640 I guess I could have sold it here and made it. 255 00:12:20,640 --> 00:12:20,940 That's some money. 256 00:12:23,020 --> 00:12:24,920 So now we're going to share it. 257 00:12:25,780 --> 00:12:28,420 So we're actually going to be sharing the scratch pad folder. 258 00:12:28,720 --> 00:12:34,000 Now when we share the scratch pad folder from the attacker to the victim, the full folder 259 00:12:34,000 --> 00:12:35,220 actually gets moved over. 260 00:12:35,560 --> 00:12:42,460 So right here we go ahead and throw the user ID or the user name, the victim's email address 261 00:12:42,460 --> 00:12:42,920 into there. 262 00:12:43,020 --> 00:12:46,720 And we uncheck that little nifty check box that says. 263 00:12:47,920 --> 00:12:50,160 Send email notification. 264 00:12:51,240 --> 00:12:54,920 So we can just simply share it to the user without any sort of notification. 265 00:12:56,380 --> 00:12:57,840 So go ahead and share it. 266 00:12:57,900 --> 00:13:00,980 We'll zoom back right over to the victim's account. 267 00:13:01,300 --> 00:13:05,480 And in just a second, his Google account will sync with a shared scratch pad folder. 268 00:13:05,740 --> 00:13:06,220 There it is. 269 00:13:06,360 --> 00:13:08,900 And then in just a second, it's going to sync with scratch pad. 270 00:13:09,720 --> 00:13:11,900 And now this is just an on mouse over event. 271 00:13:12,120 --> 00:13:14,860 So just a link with a JavaScript event. 272 00:13:14,980 --> 00:13:16,000 We can make this all automated. 273 00:13:16,580 --> 00:13:18,920 There's no reason that we couldn't just make it pop. 274 00:13:18,920 --> 00:13:24,700 So what we're doing here, we sourced in that JavaScript file into this completely sane 275 00:13:24,700 --> 00:13:27,920 extension, this extension provided by Google. 276 00:13:28,140 --> 00:13:30,340 And we have now taken over the extension. 277 00:13:30,880 --> 00:13:34,460 So we made some nifty buttons out of JavaScript that do exactly what they say on them. 278 00:13:34,800 --> 00:13:34,860 Right. 279 00:13:34,920 --> 00:13:37,160 For the purpose of the demonstration, there are buttons. 280 00:13:39,160 --> 00:13:40,520 Automation is pretty basic. 281 00:13:40,680 --> 00:13:43,420 So the first button actually grabs your Google contacts. 282 00:13:43,940 --> 00:13:48,120 Because you're logged into Google and scratch pad needs to access Google.com. 283 00:13:48,120 --> 00:13:51,360 We can just pull down Google.com slash contacts. 284 00:13:51,960 --> 00:13:57,860 So I can have scratch pad just make a request, pull down the export functionality, pull all 285 00:13:57,860 --> 00:14:00,420 down as nicely formatted CSV format. 286 00:14:00,620 --> 00:14:01,400 Thank you, Google. 287 00:14:01,700 --> 00:14:03,640 And then I can wrap that up. 288 00:14:03,840 --> 00:14:03,860 It's parsable. 289 00:14:03,960 --> 00:14:05,040 It's very parsable. 290 00:14:05,280 --> 00:14:09,840 Then I can just wrap that up and spit it back out, send it back to the attacker without 291 00:14:09,840 --> 00:14:11,040 the user ever really noticing. 292 00:14:11,760 --> 00:14:17,020 Another bit of functionality that scratch pad app has, because it has access to docs.google.com 293 00:14:17,020 --> 00:14:23,480 and www.google.com, I can actually spawn a tab with one of those host names in it. 294 00:14:23,600 --> 00:14:26,920 And then I can inject JavaScript into that frame. 295 00:14:27,480 --> 00:14:30,180 There's a nifty built-in function called execute script. 296 00:14:30,680 --> 00:14:30,940 Yep. 297 00:14:31,000 --> 00:14:32,460 Tabs that execute scripts. 298 00:14:33,100 --> 00:14:33,960 In the API. 299 00:14:34,260 --> 00:14:34,580 There we go. 300 00:14:34,680 --> 00:14:39,980 So it's great because now we can effectively inject JavaScript to any web page 301 00:14:39,980 --> 00:14:40,420 we want. 302 00:14:40,560 --> 00:14:46,220 And in the scope of this app, it's only docs.google.com and www.google.com, but we 303 00:14:46,220 --> 00:14:52,300 can effectively inject our own JavaScript into these web pages without any sort of 304 00:14:52,300 --> 00:14:53,460 vulnerability in these web pages. 305 00:14:53,660 --> 00:14:57,480 So there's no cross-site scripting that we know of in google.com that we're utilizing 306 00:14:57,480 --> 00:14:57,820 here. 307 00:14:58,060 --> 00:15:03,840 We've simply just injected the JavaScript directly into the DOM via these extensions. 308 00:15:04,360 --> 00:15:08,240 And so you can see on the screen we just, you know, stereotypical alert box with a cookie 309 00:15:08,240 --> 00:15:08,480 in it. 310 00:15:09,680 --> 00:15:15,860 So what we could have done here is shared a malicious folder, a malicious document with 311 00:15:15,860 --> 00:15:19,720 someone that we knew that was using Scratchpad, automatically execute JavaScript in 312 00:15:19,720 --> 00:15:24,680 the context of it, grab your whole address book and your session, and then force you 313 00:15:24,680 --> 00:15:29,040 to share that same document with everyone in your address book and so on and so forth, 314 00:15:29,220 --> 00:15:31,820 and let's go ahead and not notify anyone that we did this. 315 00:15:32,700 --> 00:15:37,100 So it was potentially a zero-click silent worm, right? 316 00:15:37,220 --> 00:15:40,520 So we can go ahead and just go steal every session of anyone who was using Scratchpad 317 00:15:40,520 --> 00:15:40,980 at the time. 318 00:15:41,620 --> 00:15:45,380 One click if you had to open the extension, but this all could happen automatically if 319 00:15:45,380 --> 00:15:46,080 the extension was open. 320 00:15:48,420 --> 00:15:49,700 So how do we do this, right? 321 00:15:49,780 --> 00:15:52,000 So we've been talking about permissions a little bit here and there, right? 322 00:15:52,080 --> 00:15:56,640 So if you guys have played around with Chrome extensions at all, when you have them installed 323 00:15:56,640 --> 00:16:03,640 locally, the permissions are actually set in a file called manifest.json, and basically 324 00:16:03,640 --> 00:16:06,760 it just tells you what websites this extension can talk to. 325 00:16:08,260 --> 00:16:14,120 Scratchpad could talk to docs.google and www.google, but of course it can, right? 326 00:16:14,200 --> 00:16:15,180 So like, if you install... 327 00:16:15,380 --> 00:16:19,560 A Google Document note-taking app, of course it's going to be able to talk to Google Documents. 328 00:16:19,680 --> 00:16:22,700 Why would that stop me from installing it? 329 00:16:24,540 --> 00:16:28,880 But the cool thing here is that not only do... 330 00:16:28,880 --> 00:16:30,840 Well, the permissions are set by the third-party developer, right? 331 00:16:30,920 --> 00:16:32,540 So if they don't know any better, what do they default to? 332 00:16:33,960 --> 00:16:35,000 Talk to every website. 333 00:16:35,640 --> 00:16:38,860 You know, I don't want to deal with this later and break something. 334 00:16:39,300 --> 00:16:45,240 So we've seen some extensions out there that have these wide open permissions, just basically 335 00:16:45,380 --> 00:16:48,160 star, can talk to star, that don't need it. 336 00:16:48,580 --> 00:16:52,720 But the other kind of scary thing is that some extensions need that permission. 337 00:16:54,240 --> 00:16:56,520 Something like an RSS reader, right? 338 00:16:56,800 --> 00:17:01,120 Is there any way to blacklist or whitelist an RSS reader for what websites it's going 339 00:17:01,120 --> 00:17:01,880 to be able to talk to? 340 00:17:01,980 --> 00:17:06,440 So if you have an RSS reader extension, it's going to need to talk to every possible website 341 00:17:06,440 --> 00:17:07,940 that's going to have an RSS feed on it. 342 00:17:08,020 --> 00:17:11,120 So it's going to have wide open permissions. 343 00:17:13,200 --> 00:17:15,360 And again, Google does not check these extensions. 344 00:17:15,380 --> 00:17:15,800 So if you have an RSS reader extension, it's going to have an RSS feed on it, and it's 345 00:17:15,800 --> 00:17:17,680 And again, Google does not check these extensions or the permissions that are set by the third-party 346 00:17:17,680 --> 00:17:19,680 developer before they're uploaded to the web store. 347 00:17:21,660 --> 00:17:22,200 All right. 348 00:17:22,220 --> 00:17:27,800 So a quick overview of the APIs that, as an attacker, I found interesting. 349 00:17:28,160 --> 00:17:33,820 So the first three, bookmarks, cookies, history, those basically allow me to access, 350 00:17:34,120 --> 00:17:37,900 edit, delete, insert bookmarks, cookies, and history. 351 00:17:38,080 --> 00:17:44,580 This is great because I can kind of pull down your whole history, all your bookmarks, all 352 00:17:44,580 --> 00:17:45,060 your cookies. 353 00:17:45,380 --> 00:17:49,780 And then if I want to make trends, I can figure out which websites you go to most often. 354 00:17:49,820 --> 00:17:52,360 I can stage attacks based on that information. 355 00:17:52,760 --> 00:17:57,560 Or if I have direct API access to all of your cookies, I can just pull down all of 356 00:17:57,560 --> 00:18:01,520 your cookies and impersonate you on every website that you're currently logged in and 357 00:18:01,520 --> 00:18:02,240 have a session with. 358 00:18:04,520 --> 00:18:05,840 Now, windows and tabs. 359 00:18:06,080 --> 00:18:09,320 Windows and tabs, pretty much all the extensions have this. 360 00:18:09,420 --> 00:18:14,660 This is basically the API that allows them to create pop-ups, create new tabs, and create 361 00:18:14,660 --> 00:18:15,220 new windows. 362 00:18:15,780 --> 00:18:16,880 It's pretty standard. 363 00:18:17,040 --> 00:18:18,000 This is also the... 364 00:18:18,000 --> 00:18:18,580 Or talk to... 365 00:18:18,580 --> 00:18:19,080 I'm sorry. 366 00:18:19,160 --> 00:18:21,600 Or talk to any currently open tab or window, right? 367 00:18:21,680 --> 00:18:25,160 So if an extension needs to talk to a website that you're currently open, it doesn't need 368 00:18:25,160 --> 00:18:26,560 to pop something up or let you know. 369 00:18:26,760 --> 00:18:31,180 And this is the awesome one because this is the one that has the functionality of 370 00:18:32,660 --> 00:18:33,540 tabs.executescript. 371 00:18:34,980 --> 00:18:41,540 So most of the extensions utilize this API, and most of them have the ability to call 372 00:18:42,040 --> 00:18:43,540 the execute script functionality. 373 00:18:44,900 --> 00:18:45,360 And that's great. 374 00:18:45,360 --> 00:18:50,320 And that's great because if most of them have it, it just means it's that much easier for 375 00:18:50,320 --> 00:18:54,060 us to inject code into websites that we feel necessary to. 376 00:18:54,560 --> 00:18:59,340 So down at the bottom there, you see that's a screenshot of what the manifest.json file, 377 00:18:59,580 --> 00:19:01,060 like a sample manifest.json file. 378 00:19:01,740 --> 00:19:05,720 It just had permission to, you know, storage, notification, tabs. 379 00:19:05,840 --> 00:19:06,860 Tabs is what we're talking about. 380 00:19:06,920 --> 00:19:07,240 That's cool. 381 00:19:08,200 --> 00:19:12,620 And then you'll see a sample wide open permission kind of regex, right? 382 00:19:12,700 --> 00:19:15,320 So it can match on any protocol, any domain. 383 00:19:15,320 --> 00:19:15,720 Any path. 384 00:19:16,880 --> 00:19:19,400 Any protocol is kind of tricky here. 385 00:19:19,520 --> 00:19:20,620 It's not actually any protocol. 386 00:19:20,900 --> 00:19:22,520 It's either HTTP or HTTPS. 387 00:19:23,180 --> 00:19:25,580 So even though it's a star, it's just those two things. 388 00:19:25,640 --> 00:19:28,840 We can't start, like, initiating FTP connections and stuff like that through these things. 389 00:19:29,080 --> 00:19:31,820 And you see that that's seen very often. 390 00:19:31,920 --> 00:19:35,220 There are extensions in the wild right now with that, with cross-site scripting. 391 00:19:35,300 --> 00:19:41,380 Every once in a while, I pull down the top 1,000 featured or most popular extensions. 392 00:19:41,800 --> 00:19:44,920 I go through and I parse the manifest.json files. 393 00:19:45,320 --> 00:19:48,720 And there's a good percent that have exactly that. 394 00:19:48,880 --> 00:19:53,280 And of those, I can usually find a few that have vulnerabilities. 395 00:19:55,480 --> 00:19:57,360 So what are we looking for now, right? 396 00:19:57,420 --> 00:20:01,480 As web hackers, we're not looking for buffer overflows or anything like that in your software security. 397 00:20:01,860 --> 00:20:02,620 It was perfect, right? 398 00:20:02,740 --> 00:20:06,520 I was given, we were given this talk at the executive briefing at Black Hat. 399 00:20:06,600 --> 00:20:08,180 It was a little quick, a couple minute of it. 400 00:20:09,500 --> 00:20:11,220 And this guy was talking before me. 401 00:20:11,300 --> 00:20:14,300 And he was talking about, I couldn't have asked for a better person to be talking before me. 402 00:20:14,300 --> 00:20:18,240 He went up there and he was talking about all new ASLR and DEP and all this kind of stuff. 403 00:20:18,680 --> 00:20:23,320 Comparing Windows 7 and OS X and the latest and who's more secure, this, that, and the other thing. 404 00:20:23,420 --> 00:20:25,560 He gave this whole talk about that. 405 00:20:25,740 --> 00:20:27,480 And I got up there and introduced ourselves. 406 00:20:27,660 --> 00:20:32,020 And I said, and this is exactly why we don't care what he just talked about. 407 00:20:32,840 --> 00:20:36,360 We don't give a shit about ASLR, DEP, anything like that. 408 00:20:37,120 --> 00:20:39,980 We're talking about everything in the web now. 409 00:20:40,060 --> 00:20:41,380 I don't care about what's on your hard drive. 410 00:20:41,940 --> 00:20:43,680 These machines don't store anything locally. 411 00:20:44,300 --> 00:20:47,300 Even if they did, you're storing everything in the cloud anyway, right? 412 00:20:47,440 --> 00:20:49,280 Like, we were just able to hijack everyone's Google account. 413 00:20:49,420 --> 00:20:50,700 How many people live in Google? 414 00:20:50,860 --> 00:20:51,520 I know I do. 415 00:20:52,760 --> 00:20:53,600 It's all my email. 416 00:20:53,740 --> 00:20:54,520 We were cracking up. 417 00:20:54,620 --> 00:20:58,460 We were using Google Docs to pass outlines for this talk back and forth to each other. 418 00:20:58,900 --> 00:21:00,540 That we just found a vulnerability in it. 419 00:21:01,000 --> 00:21:06,860 While we were testing Scratchpad, I also shared extensions to Matt that he was not happy about. 420 00:21:07,200 --> 00:21:08,360 Or shared titles. 421 00:21:09,440 --> 00:21:09,840 Yeah. 422 00:21:10,140 --> 00:21:13,860 So, you know, we're looking for a new set of usual suspects, right? 423 00:21:13,860 --> 00:21:18,060 We're not looking for insecure software on your hard drive or anything like that. 424 00:21:18,140 --> 00:21:24,040 We're looking for extensions that are going to take input from somewhere and display it back on the screen for cross-site scripting vulnerabilities. 425 00:21:24,420 --> 00:21:32,080 We're going to look for extensions that perform some sort of sensitive administrative function for you conveniently on some website for CSRF vulnerabilities. 426 00:21:32,400 --> 00:21:39,000 We're going to look for, and we'll show it in a second, we're going to look for extensions that talk to a database for SQL injection vulnerabilities, right? 427 00:21:39,040 --> 00:21:41,400 These are web hacks that everyone's known about for decades. 428 00:21:41,860 --> 00:21:43,840 And, you know, we're not doing anything fancy. 429 00:21:43,860 --> 00:21:51,140 You know, I don't want to write crazy buffer overflows, ASLR bypasses, anything like that. 430 00:21:51,220 --> 00:21:53,580 We're just writing JavaScript and we're doing some pretty cool stuff. 431 00:21:54,320 --> 00:22:01,420 So, you know, the other unique thing about these extensions is if you find cross-site scripting on a website, you can attack the users of that website. 432 00:22:01,700 --> 00:22:07,440 If you find cross-site scripting on an extension with wide open permissions, you can potentially attack the users of every website that that user is using. 433 00:22:07,660 --> 00:22:08,640 That's completely different. 434 00:22:08,920 --> 00:22:11,040 You know, we're not seeing that a lot today. 435 00:22:11,120 --> 00:22:12,220 This is kind of new. 436 00:22:13,980 --> 00:22:16,420 So we have a direct quote from Kyle here. 437 00:22:19,100 --> 00:22:27,140 Why are we going to spend all this time, like I was saying, why are we going to spend all this time trying to learn assembly code or anything like that when JavaScript is really easy? 438 00:22:27,260 --> 00:22:28,880 So says this small child. 439 00:22:30,880 --> 00:22:32,640 That is a quote that I said. 440 00:22:35,600 --> 00:22:39,120 So cross-site scripting is going to give you everything, you know, we want and more, right? 441 00:22:39,200 --> 00:22:40,120 Exploit development is hard. 442 00:22:40,280 --> 00:22:42,420 Like I don't have time to learn it. 443 00:22:42,440 --> 00:22:43,780 I'm not smart enough to learn it. 444 00:22:44,620 --> 00:22:47,060 Kyle agrees that I'm not smart enough to learn it. 445 00:22:47,400 --> 00:22:51,700 And all these APIs are really easy and, you know, callable by JavaScript. 446 00:22:51,920 --> 00:22:58,960 You know, maybe we can get like a memory-based malware key logger in this system if it really felt like trying to break the sandbox or something like that. 447 00:22:59,040 --> 00:23:01,440 I mean, no one even showed up at CanSec West to try to break the sandbox. 448 00:23:02,360 --> 00:23:04,200 That's not what I'm going to spend my time doing. 449 00:23:04,280 --> 00:23:05,880 The return on investment isn't worth it there. 450 00:23:06,160 --> 00:23:06,480 All right. 451 00:23:06,520 --> 00:23:11,280 The impact is so high with these vulnerabilities, but the learning curve is so low. 452 00:23:11,380 --> 00:23:13,340 It's really just JavaScript. 453 00:23:13,340 --> 00:23:18,300 Most of the attacks can be done in two to five lines of JavaScript. 454 00:23:18,600 --> 00:23:26,620 And it would be pointless to really do any sort of in-memory malware because as soon as you reboot the machine, it's lost. 455 00:23:26,840 --> 00:23:30,580 Your attack window is probably a shorter amount of time. 456 00:23:30,920 --> 00:23:35,920 And you can't really do much once you get the code execution. 457 00:23:36,180 --> 00:23:40,900 The hard drive is read-only besides your home directory, but nothing in your home directory is executable. 458 00:23:41,040 --> 00:23:43,040 So you can't even maintain that. 459 00:23:43,040 --> 00:23:46,080 You can't maintain persistence with native code execution. 460 00:23:46,840 --> 00:23:55,560 See, the other thing that we haven't seen yet that we're seeing here is that if we're going to fix this besides fixing just the cross-site scripting holes, 461 00:23:55,920 --> 00:23:58,720 a lot of the sanitization might have to happen client-side, right? 462 00:23:58,760 --> 00:24:00,440 These extensions are locally, right? 463 00:24:00,520 --> 00:24:05,680 So usually when you fix cross-site scripting, you're doing some sort of input validation or outputting coding on the server side. 464 00:24:06,200 --> 00:24:09,100 What if these extensions don't talk to a server at any point, right? 465 00:24:09,200 --> 00:24:13,020 And, like, they're just grabbing information locally, things like that. 466 00:24:13,040 --> 00:24:16,620 You know, then the sanitization might have to happen client-side. 467 00:24:16,760 --> 00:24:17,660 That's crazy. 468 00:24:17,880 --> 00:24:19,020 We don't even know what that's going to look like. 469 00:24:19,680 --> 00:24:21,200 So let's get to another fun demo. 470 00:24:21,440 --> 00:24:21,620 Cool. 471 00:24:23,320 --> 00:24:32,580 So this is a purposely malicious extension that we threw together just to demonstrate the vulnerabilities. 472 00:24:32,740 --> 00:24:38,040 This extension pretty much has the same permission levels as the Scratchpad extension does. 473 00:24:38,580 --> 00:24:40,800 It's a nicely named malicious extension. 474 00:24:42,180 --> 00:24:45,000 So anything we do here we could have done with Scratchpad. 475 00:24:45,920 --> 00:24:49,180 Can't do it anymore because Google fixed it, so that would be a deal. 476 00:24:49,360 --> 00:24:50,360 Actually, I take that back. 477 00:24:50,820 --> 00:24:55,640 The only difference between a Scratchpad extension is that instead of having only access to Google.com, 478 00:24:55,840 --> 00:24:59,460 we have access to star colon slash slash star. 479 00:24:59,560 --> 00:25:06,040 We can access any domain, any host name, any protocol, and that's actually very common. 480 00:25:06,660 --> 00:25:09,740 Yeah, like we said, there are extensions out there, RSS readers, things like that. 481 00:25:09,740 --> 00:25:14,700 I think at the time, the top-rated RSS reader and the top-used RSS reader had an XSX bug in it 482 00:25:14,700 --> 00:25:18,240 and had permission to talk to every website when we found it back in December. 483 00:25:18,840 --> 00:25:21,020 But this is just a little easier to demonstrate. 484 00:25:21,640 --> 00:25:24,740 So with this extension here, I'll go ahead and maximize. 485 00:25:25,660 --> 00:25:26,540 Oh, great, okay. 486 00:25:27,540 --> 00:25:30,460 So with this extension here, we just have the nice little buttons again. 487 00:25:30,520 --> 00:25:32,120 Of course, we've seen the Google contacts. 488 00:25:32,580 --> 00:25:34,920 We can just pull that up, and there you go. 489 00:25:35,000 --> 00:25:37,220 There's your Google contacts in a nice CSV format. 490 00:25:37,220 --> 00:25:40,640 Now this is a fun one. 491 00:25:40,980 --> 00:25:42,120 Did you update this? 492 00:25:42,320 --> 00:25:42,720 Yeah, we did. 493 00:25:42,880 --> 00:25:42,920 Yeah. 494 00:25:43,020 --> 00:25:46,400 So who wants to come up on stage and type their phone number in? 495 00:25:46,580 --> 00:25:46,960 Wedgie. 496 00:25:47,880 --> 00:25:48,520 Come on. 497 00:25:49,740 --> 00:25:51,440 I promise it's a password field. 498 00:25:51,600 --> 00:25:52,120 No one will see it. 499 00:25:55,740 --> 00:25:57,660 One, the area code, and your number. 500 00:26:00,320 --> 00:26:01,200 No, no. 501 00:26:03,680 --> 00:26:07,200 So what we're doing here is since this extension has permission to the whole website, 502 00:26:07,200 --> 00:26:09,240 it also has permission to Google Voice, right? 503 00:26:09,380 --> 00:26:16,760 So we're actually able to hijack that, parse Google Voice for its CSRF token on the fly, 504 00:26:16,960 --> 00:26:19,500 and then spoof a text message. 505 00:26:19,760 --> 00:26:22,420 Actually, I changed it, so it's no longer a text message. 506 00:26:22,520 --> 00:26:24,060 I'm actually spoofing a phone call. 507 00:26:24,320 --> 00:26:28,700 So if as a user I wanted to get someone to call someone, 508 00:26:29,220 --> 00:26:35,640 I would have Matt, within a vulnerable injection or a vulnerable extension, 509 00:26:35,640 --> 00:26:40,820 I would pop his extension, then I would force a phone call to his phone, 510 00:26:41,260 --> 00:26:43,360 and then that would call whoever I want it to be. 511 00:26:43,660 --> 00:26:48,020 Our last one was also a text message, but it's not limited to that. 512 00:26:48,160 --> 00:26:49,580 We can pull down your call history. 513 00:26:49,760 --> 00:26:51,500 We can pull down your text message history. 514 00:26:51,660 --> 00:26:52,840 We can pull down your voice mails. 515 00:26:52,920 --> 00:26:55,420 It's really not limited at all. 516 00:26:55,720 --> 00:26:56,140 Did your phone ring? 517 00:26:57,060 --> 00:26:57,620 Not yet. 518 00:26:57,820 --> 00:26:59,060 Oh, well, mine rang. 519 00:26:59,720 --> 00:27:01,080 I don't have Google Voice on my phone. 520 00:27:01,460 --> 00:27:03,040 No, because it calls my phone and then calls you. 521 00:27:03,040 --> 00:27:04,780 It's using the victim's Google Voice account. 522 00:27:05,040 --> 00:27:05,440 Yeah. 523 00:27:05,640 --> 00:27:05,920 It doesn't want to call you. 524 00:27:06,040 --> 00:27:10,300 So you actually, as an attacker, you were just using my Google Voice account, 525 00:27:10,540 --> 00:27:13,720 which then called you, and that could all be automated again. 526 00:27:13,840 --> 00:27:15,720 It's just like buttons because they're pretty. 527 00:27:15,940 --> 00:27:17,140 The demo gods are not smiling. 528 00:27:17,380 --> 00:27:17,860 No. 529 00:27:18,020 --> 00:27:23,480 Anyway, so another fun one, which is execute alert, which execute JavaScript, 530 00:27:23,740 --> 00:27:25,320 same thing with Google.com. 531 00:27:25,440 --> 00:27:28,440 So we're just going to go ahead, okay, Google.com, Facebook, 532 00:27:28,680 --> 00:27:32,820 JavaScript injected, Twitter, Yahoo, 533 00:27:33,180 --> 00:27:35,620 and Chase is still giving me a call. 534 00:27:35,620 --> 00:27:38,260 They're giving some air. 535 00:27:38,400 --> 00:27:43,120 So let's just go ahead and pretend there's an alert box there. 536 00:27:43,380 --> 00:27:43,880 Oh, hey, proceed. 537 00:27:44,520 --> 00:27:45,760 Will it actually work? 538 00:27:45,820 --> 00:27:46,360 I don't think that works. 539 00:27:48,860 --> 00:27:49,720 Oh, look it. 540 00:27:49,720 --> 00:27:50,240 That didn't even work. 541 00:27:50,320 --> 00:27:50,600 There we go. 542 00:27:50,800 --> 00:27:53,340 So these websites don't have any vulnerabilities in them. 543 00:27:53,520 --> 00:27:54,180 Well, they probably do. 544 00:27:54,360 --> 00:27:56,500 Well, I'm sure they do. 545 00:27:56,580 --> 00:27:57,060 It's Chase. 546 00:27:57,240 --> 00:27:58,660 We don't have permission to test that. 547 00:27:58,820 --> 00:28:04,520 We haven't exposed or utilized any vulnerabilities in these websites. 548 00:28:04,520 --> 00:28:06,440 We're just injecting code to them. 549 00:28:06,520 --> 00:28:09,640 So we can go one step further. 550 00:28:09,780 --> 00:28:12,700 Instead of alert, why don't we just inject a JavaScript key logger? 551 00:28:12,960 --> 00:28:14,760 I mean, there's your in-memory malware. 552 00:28:15,160 --> 00:28:18,000 You now have a key logger in every page that you go to. 553 00:28:20,320 --> 00:28:22,040 And it's not just spawning tabs. 554 00:28:22,300 --> 00:28:26,920 I can contact tabs that are already open and inject as much or whatever I want. 555 00:28:26,960 --> 00:28:28,380 We can listen for what tabs you're opening. 556 00:28:28,540 --> 00:28:32,260 We can view your history, right, via the history API. 557 00:28:32,920 --> 00:28:34,040 We can watch I Love Lucy. 558 00:28:34,040 --> 00:28:35,200 Yeah, I Love Lucy. 559 00:28:35,460 --> 00:28:37,760 All right. 560 00:28:37,820 --> 00:28:43,300 So then another fun one, which hopefully doesn't kernel panic your Mac again. 561 00:28:43,440 --> 00:28:44,620 I kernel panicked my Mac earlier. 562 00:28:44,800 --> 00:28:45,180 Let's... 563 00:28:47,980 --> 00:28:50,540 So we can actually do XHR scans. 564 00:28:51,100 --> 00:28:56,380 Because we have access to colon, star, dot, star, whatever, we have access to everything, 565 00:28:56,600 --> 00:28:57,960 this also includes IP addresses. 566 00:28:58,120 --> 00:29:03,680 So we can actually use XHR requests to scan your local subnet 567 00:29:04,360 --> 00:29:06,700 and look for anything listening on port 80. 568 00:29:07,920 --> 00:29:11,100 So we'll go ahead and do this on this one, and we'll see if anything pops up 569 00:29:11,580 --> 00:29:13,980 and hope to God that it doesn't die. 570 00:29:13,980 --> 00:29:15,060 Oh, your button doesn't work. 571 00:29:15,280 --> 00:29:16,200 My button doesn't work. 572 00:29:18,180 --> 00:29:19,280 Oh, that's sad. 573 00:29:23,240 --> 00:29:24,520 No, we can do all different things. 574 00:29:24,540 --> 00:29:27,680 Yeah, we can basically do any port that's not restricted by the browser. 575 00:29:27,800 --> 00:29:29,520 So the browser has it hard-coded. 576 00:29:29,600 --> 00:29:32,400 You can't access, like, port 20 through 25. 577 00:29:32,600 --> 00:29:33,660 You can't do... 578 00:29:34,040 --> 00:29:36,780 Like, IRC, you can't do SMB stuff. 579 00:29:36,980 --> 00:29:40,960 So you wouldn't be able to do SMB scanning in the network to look for Windows hosts, 580 00:29:41,060 --> 00:29:48,400 but you could pull down a local list of web servers in your local area network. 581 00:29:48,680 --> 00:29:53,860 So I could potentially fingerprint your internal network by taking over one of your extensions, 582 00:29:54,260 --> 00:29:57,240 scan your internal network, look for fancy things. 583 00:29:57,300 --> 00:29:59,760 Say you have Jira listening or you have... 584 00:29:59,760 --> 00:30:02,420 Maybe there's printers there that I can take advantage of. 585 00:30:02,520 --> 00:30:03,800 Who was at our Black Hat talk? 586 00:30:03,800 --> 00:30:04,380 Anyone? 587 00:30:05,020 --> 00:30:05,380 No? 588 00:30:05,500 --> 00:30:05,960 Okay, cool. 589 00:30:06,260 --> 00:30:06,460 That's fine. 590 00:30:06,540 --> 00:30:06,720 Yeah. 591 00:30:06,780 --> 00:30:07,060 All right. 592 00:30:07,120 --> 00:30:07,300 Okay. 593 00:30:07,460 --> 00:30:08,880 So we found a printer. 594 00:30:08,980 --> 00:30:11,920 We did the XHR scan, and there was a printer listening that we could have printed up from 595 00:30:11,920 --> 00:30:14,260 on the podium at Black Hat when we did that. 596 00:30:14,360 --> 00:30:15,560 It was pretty awesome. 597 00:30:15,880 --> 00:30:16,500 Let's see. 598 00:30:16,680 --> 00:30:18,080 I don't know why this isn't working now. 599 00:30:18,660 --> 00:30:19,640 It's probably somewhere. 600 00:30:19,860 --> 00:30:21,300 There may not even be anything. 601 00:30:21,460 --> 00:30:22,160 I bet they have it all. 602 00:30:22,180 --> 00:30:22,540 Oh, yeah. 603 00:30:22,660 --> 00:30:23,360 We might be segregated. 604 00:30:23,860 --> 00:30:24,220 Anyway. 605 00:30:24,640 --> 00:30:29,980 So it's kind of cool because you can see it do its little thing here, and it scans 606 00:30:29,980 --> 00:30:30,720 really fast. 607 00:30:30,920 --> 00:30:32,080 Like, it scanned all... 608 00:30:32,080 --> 00:30:33,780 It made all those requests at the same time. 609 00:30:35,220 --> 00:30:37,120 And it's a very quick scan. 610 00:30:37,200 --> 00:30:41,560 And we can pull back not only the fact that the host is up, because we have access to 611 00:30:41,560 --> 00:30:46,100 the content on all the pages we're requesting, we can pull back the full HTML page and the 612 00:30:46,100 --> 00:30:46,360 headers. 613 00:30:46,540 --> 00:30:51,760 So if you do have, like, Jira or some wiki or ticketing system on your internal network, 614 00:30:52,000 --> 00:30:55,920 we can pull that back, parse that page, and find out exactly what it is. 615 00:30:56,040 --> 00:30:59,760 And then from there, we can, as an attacker, go, okay, great. 616 00:30:59,840 --> 00:31:00,800 You have Jira. 617 00:31:00,960 --> 00:31:02,640 I have a Jira zero day. 618 00:31:03,180 --> 00:31:03,760 From here... 619 00:31:03,780 --> 00:31:10,880 From your web browser, I'm actually going to own your Jira server, load up a meterpreter 620 00:31:10,880 --> 00:31:15,160 session, and suddenly I have a real shell from your Jira server that I attacked from 621 00:31:15,160 --> 00:31:19,800 your browser calling out back to me, and I have a real shell on a server inside your 622 00:31:19,800 --> 00:31:20,080 network. 623 00:31:21,420 --> 00:31:21,820 So... 624 00:31:22,360 --> 00:31:23,380 Who uses LastPass? 625 00:31:24,400 --> 00:31:25,580 Who's heard of it, uses it? 626 00:31:25,960 --> 00:31:26,360 Okay. 627 00:31:26,780 --> 00:31:27,180 Handful. 628 00:31:27,360 --> 00:31:29,560 For those of you who don't know what it is, it's a password manager. 629 00:31:29,820 --> 00:31:30,000 Right? 630 00:31:30,060 --> 00:31:33,680 So us as security guys, we're always telling people, hey, you need to use different passwords. 631 00:31:33,680 --> 00:31:34,480 For everything, right? 632 00:31:34,540 --> 00:31:37,660 Oh, use a different password for every website that you go to and remember them all. 633 00:31:37,840 --> 00:31:38,320 All right? 634 00:31:38,320 --> 00:31:43,660 So, you know, this LastPass is actually a website that helps that make, makes that a 635 00:31:43,660 --> 00:31:44,520 little bit more user-friendly. 636 00:31:44,780 --> 00:31:45,180 Right? 637 00:31:45,260 --> 00:31:49,240 So you go there, you make one password for LastPass, it generates passwords for all 638 00:31:49,240 --> 00:31:51,060 your different sites, stores them securely. 639 00:31:51,280 --> 00:31:52,640 It actually is a really awesome service. 640 00:31:52,800 --> 00:31:56,060 Kyle used it, and that's why we found the vulnerability in it. 641 00:31:57,140 --> 00:31:58,600 They have an extension in Chrome. 642 00:31:59,060 --> 00:32:03,020 It had cross-site scripting in it when we first were testing it, but they fixed it right 643 00:32:03,020 --> 00:32:03,120 away. 644 00:32:03,260 --> 00:32:04,560 They've actually been really awesome to work with. 645 00:32:04,700 --> 00:32:05,980 So there's no vulnerability in it right now. 646 00:32:06,340 --> 00:32:12,660 So this is kind of our demo of, like, we can own an extension that has no vulnerability 647 00:32:12,660 --> 00:32:16,600 in it that's doing absolutely everything correctly, and it's pretty cool. 648 00:32:17,080 --> 00:32:17,400 Right. 649 00:32:17,580 --> 00:32:23,740 So when I was testing the LastPass extension, I did find a vulnerability, some pretty hard 650 00:32:23,740 --> 00:32:26,900 to manage, on drag, whatever. 651 00:32:27,840 --> 00:32:32,140 They fixed that pretty immediately, but I realized as I was testing it, there's this 652 00:32:32,140 --> 00:32:33,000 functionality of the extension. 653 00:32:33,020 --> 00:32:39,120 As long as you're logged into the extension, it'll automatically log you into the LastPass 654 00:32:39,120 --> 00:32:39,440 website. 655 00:32:40,120 --> 00:32:43,520 So if you're logged into the extension, like, you are, I mean, you're going to be logged 656 00:32:43,520 --> 00:32:45,120 into the extension if you're browsing the net. 657 00:32:45,280 --> 00:32:48,580 You want to be able to access your Gmail account without being logged in. 658 00:32:48,660 --> 00:32:50,400 You don't want to have to re-authenticate. 659 00:32:50,640 --> 00:32:54,520 So you've always got the little red square up there saying that you're logged in. 660 00:32:55,220 --> 00:33:00,880 So when that's the case, you can go to LastPass.com, and it'll automatically log you into 661 00:33:00,880 --> 00:33:01,720 LastPass.com. 662 00:33:02,200 --> 00:33:07,420 It does this because the extension notices that you went to LastPass.com, and it kind 663 00:33:07,420 --> 00:33:09,840 of handles the login process for you. 664 00:33:09,940 --> 00:33:14,040 It lets the server know that you're actually logged in, and then it passes your local crypto 665 00:33:14,040 --> 00:33:19,460 key from LastPass to the web browser, or to the frame. 666 00:33:20,280 --> 00:33:23,460 So real quick, LastPass, like Matt was saying, great service. 667 00:33:23,540 --> 00:33:25,280 It handles all of your encryption locally. 668 00:33:25,520 --> 00:33:28,120 So your database that you send them is all encrypted. 669 00:33:28,280 --> 00:33:31,580 It's not in clear text, and your password is never actually sent to them. 670 00:33:31,580 --> 00:33:32,980 It's all stored locally. 671 00:33:34,240 --> 00:33:35,560 It's all in the DOM. 672 00:33:35,640 --> 00:33:39,460 It's all encrypted in the DOM with a representation of your password. 673 00:33:40,140 --> 00:33:44,140 So anyway, it passes that local key to that frame. 674 00:33:44,380 --> 00:33:52,660 Now, we can take advantage of this, this automation, because if we say we own an RSS 675 00:33:52,660 --> 00:33:58,620 reader, just Joe Schmoe RSS reader, some third-party developer that doesn't really 676 00:33:58,620 --> 00:34:01,560 know anything about security, but makes some great extensions. 677 00:34:01,580 --> 00:34:06,240 And say has, like, 500,000 downloads in the App Store right now. 678 00:34:08,200 --> 00:34:10,700 We can spawn a tab for LastPass. 679 00:34:11,500 --> 00:34:17,040 Where, of course, you know, not speaking of any actual top-rated RSS reader with a 680 00:34:17,040 --> 00:34:19,260 vulnerability in it currently, or anything like that. 681 00:34:20,500 --> 00:34:23,040 So we can spawn a new window with LastPass. 682 00:34:23,320 --> 00:34:28,620 And what this does is the LastPass extension then goes in, and it notices that window. 683 00:34:28,760 --> 00:34:31,560 So it thinks that you opened that window and that you logged in. 684 00:34:31,580 --> 00:34:33,000 And you want to go to LastPass.com. 685 00:34:33,220 --> 00:34:36,220 So it automatically logs you in to your online vault. 686 00:34:36,420 --> 00:34:40,940 And, you know, you can change settings there and all that and access all your passwords. 687 00:34:41,580 --> 00:34:42,800 And that's great. 688 00:34:43,220 --> 00:34:48,420 But instead of allowing the user to do that, we're going to have the extension automatically 689 00:34:48,420 --> 00:34:54,440 open this window, allow the extension to log you in, and then inject JavaScript to pull 690 00:34:54,440 --> 00:34:55,460 out your crypto key. 691 00:34:55,680 --> 00:34:58,840 So now I've got your private key to decrypt your database. 692 00:34:59,740 --> 00:35:01,520 Then I'm going to just, you know. 693 00:35:01,580 --> 00:35:03,660 Grab your database because I can do that. 694 00:35:04,200 --> 00:35:05,300 It's very trivial. 695 00:35:05,520 --> 00:35:07,060 And we're going to demonstrate it right now. 696 00:35:07,460 --> 00:35:11,560 We could just decrypt it locally in our hacker den at home. 697 00:35:13,380 --> 00:35:19,560 It's like a man cave but with more green lights and Neo. 698 00:35:20,320 --> 00:35:21,880 So we're logged in right now. 699 00:35:22,460 --> 00:35:24,200 We've got recently used. 700 00:35:24,400 --> 00:35:26,320 So, okay, Google and a bank. 701 00:35:26,620 --> 00:35:31,460 So if we go ahead and click grab LastPass database. 702 00:35:32,040 --> 00:35:33,280 It's going to spawn it up. 703 00:35:33,340 --> 00:35:35,100 It's going to automatically load it up. 704 00:35:35,200 --> 00:35:36,020 So we're logged in. 705 00:35:36,100 --> 00:35:37,320 No prompt from the user. 706 00:35:37,500 --> 00:35:40,020 In just a second, it's going to, you know, change. 707 00:35:40,260 --> 00:35:40,880 So, okay. 708 00:35:40,960 --> 00:35:43,520 So here is your actual crypto key up there. 709 00:35:43,640 --> 00:35:45,760 There's a weird way of passing it between the extension. 710 00:35:46,160 --> 00:35:52,580 Now I grabbed your database and then I just decrypted it on the fly and threw it right 711 00:35:52,580 --> 00:35:52,840 there. 712 00:35:53,380 --> 00:35:59,120 So what we can do with this is we can just grab the database, send it back to us with 713 00:35:59,120 --> 00:35:59,560 your key. 714 00:35:59,560 --> 00:36:02,740 And then suddenly I've literally got the keys to the kingdom. 715 00:36:03,240 --> 00:36:08,540 I don't know about you guys, but I put way too much information in my LastPass extension. 716 00:36:08,860 --> 00:36:12,900 I've been using it for about two months and I probably have close to about 50 sites or 717 00:36:12,900 --> 00:36:19,740 more that I just use because I'm slowly switching away from my weaker passwords to the really 718 00:36:20,140 --> 00:36:21,400 long random stuff. 719 00:36:21,640 --> 00:36:26,220 But that doesn't matter if an attacker can just come in and literally steal my LastPass 720 00:36:26,220 --> 00:36:27,860 database and cryptographic key. 721 00:36:28,660 --> 00:36:29,780 That's my password, too. 722 00:36:30,200 --> 00:36:35,220 So we did this at Black Hat and we didn't actually write this as not really my password. 723 00:36:35,300 --> 00:36:36,320 DEF CON, don't try to log in. 724 00:36:37,720 --> 00:36:40,680 And someone logged in and sent us an email. 725 00:36:42,920 --> 00:36:47,360 They were very nice and they didn't change the password on us and lock us out, but we 726 00:36:47,360 --> 00:36:48,020 didn't trust you guys. 727 00:36:48,560 --> 00:36:49,440 You look shifty. 728 00:36:50,360 --> 00:36:51,560 All you evil hackers. 729 00:36:52,660 --> 00:36:57,840 Anyway, so the important thing to know about this is that there's no vulnerability to 730 00:36:57,840 --> 00:36:59,140 LastPass at the moment. 731 00:36:59,760 --> 00:37:03,920 We're not taking advantage of anything that LastPass is. 732 00:37:04,820 --> 00:37:07,400 No cross-site scripting that we know about. 733 00:37:07,620 --> 00:37:09,040 What we did find, they fixed immediately. 734 00:37:10,620 --> 00:37:13,420 The extension itself is not vulnerable anymore. 735 00:37:13,980 --> 00:37:16,540 And actually, this functionality is no longer there. 736 00:37:17,160 --> 00:37:20,280 They made it so you actually have to click it from within the extension. 737 00:37:22,500 --> 00:37:25,840 It's still ownable, but the extension doesn't automatically log you in. 738 00:37:26,000 --> 00:37:27,820 But if you are logged in, we can still own it. 739 00:37:27,820 --> 00:37:31,640 So it's not as automatic and cool as what our demo was, but it's still ownable. 740 00:37:31,740 --> 00:37:34,580 And that is the last version of LastPass. 741 00:37:35,640 --> 00:37:37,240 So you're all safe now, I promise. 742 00:37:38,020 --> 00:37:38,940 So we're running out of time. 743 00:37:39,020 --> 00:37:40,220 So let's try to fly through some of this. 744 00:37:40,280 --> 00:37:41,720 So how many of you guys know what Beef is? 745 00:37:42,640 --> 00:37:43,320 You've heard of it. 746 00:37:43,500 --> 00:37:44,540 I'm hoping some of you. 747 00:37:44,660 --> 00:37:44,840 All right. 748 00:37:45,280 --> 00:37:46,900 How many of you know what Metasploit is? 749 00:37:47,220 --> 00:37:48,180 Hoping a lot more than you. 750 00:37:48,280 --> 00:37:48,660 Okay, cool. 751 00:37:48,740 --> 00:37:51,260 So Beef is kind of like the Metasploit of the web, web app, right? 752 00:37:51,440 --> 00:37:55,880 So you can store a lot of preloaded kind of payloads and things like that to do cool stuff 753 00:37:56,380 --> 00:37:57,800 and help making it work. 754 00:37:57,800 --> 00:37:59,040 Hacking websites easier, right? 755 00:37:59,080 --> 00:38:04,140 So if you find a cross-site scripting vulnerability in a website, instead of just hoping that 756 00:38:04,140 --> 00:38:08,220 your JavaScript does what you wanted it to do the first time that you pass this injection, 757 00:38:08,900 --> 00:38:13,000 you can pass it a Beef hook, which is what it's called, and it actually maintains access 758 00:38:13,000 --> 00:38:15,080 and you can just replay attacks over and over again. 759 00:38:15,240 --> 00:38:17,660 So it makes everything that we did just really, really easy. 760 00:38:18,020 --> 00:38:18,520 All right. 761 00:38:18,600 --> 00:38:24,940 So I made this even easier, and I pretty much just took all of the demo functionality I 762 00:38:24,940 --> 00:38:26,740 did and I threw them into Beef extensions. 763 00:38:27,260 --> 00:38:27,700 Beef. 764 00:38:27,800 --> 00:38:27,980 Beef modules. 765 00:38:28,260 --> 00:38:33,800 So now when you own an app, all you got to do is hook Beef, and suddenly you have Beef 766 00:38:33,800 --> 00:38:34,580 inside the extension. 767 00:38:34,720 --> 00:38:37,520 You can maintain access and you can send commands as you want. 768 00:38:37,700 --> 00:38:37,940 Go ahead. 769 00:38:38,000 --> 00:38:38,460 Say your quote. 770 00:38:39,580 --> 00:38:40,500 I'm not there yet. 771 00:38:41,020 --> 00:38:44,680 So first, check permissions, like if you don't know what extension you're in for whatever 772 00:38:44,680 --> 00:38:45,060 reason. 773 00:38:45,880 --> 00:38:51,340 All the extensions we tested are all local, so we don't really need to check the extensions, 774 00:38:51,520 --> 00:38:55,600 but if somehow you manage to own an extension that you're not really familiar with, you 775 00:38:55,600 --> 00:38:57,760 can hit this module and it'll give you. 776 00:38:57,760 --> 00:38:58,660 It'll give you all that information. 777 00:38:59,420 --> 00:39:00,240 Execute tabs. 778 00:39:00,520 --> 00:39:02,880 Execute arbitrary JavaScript inside of all tabs. 779 00:39:03,080 --> 00:39:05,580 So if you want to inject a key logger, it's pretty simple. 780 00:39:06,040 --> 00:39:08,480 And my favorite, inject Beef. 781 00:39:09,320 --> 00:39:15,740 So basically, if you have tabs open and I want inside of those tabs, instead of doing 782 00:39:15,740 --> 00:39:19,360 execute tab, I can just inject Beef into those tabs. 783 00:39:19,600 --> 00:39:25,720 So I suddenly go from one Beef session to 50 Beef sessions because you have 50 tabs 784 00:39:25,720 --> 00:39:26,080 open. 785 00:39:26,080 --> 00:39:31,940 So now, not only am I inside your extension, but I'm actually inside bankofamerica.com. 786 00:39:32,100 --> 00:39:33,340 I'm inside your PayPal account. 787 00:39:33,540 --> 00:39:39,400 I'm inside of every website or every tab that you currently have opened and it's very simple. 788 00:39:39,580 --> 00:39:39,600 Go ahead. 789 00:39:39,600 --> 00:39:40,080 Do your quote. 790 00:39:41,140 --> 00:39:41,840 Yo, dog. 791 00:39:42,020 --> 00:39:43,060 I heard you like Beef. 792 00:39:43,320 --> 00:39:46,300 So I put Beef in your Beef so you can Beef while you Beef. 793 00:39:46,900 --> 00:39:47,340 Perfect. 794 00:39:47,740 --> 00:39:50,340 And the other three just do kind of what the other demos that we had. 795 00:39:50,600 --> 00:39:50,920 Yeah. 796 00:39:50,920 --> 00:39:55,440 So basically, our main point that we're trying to push here is that this is kind of the same 797 00:39:55,440 --> 00:39:56,060 problem we've been dealing with. 798 00:39:56,080 --> 00:39:56,600 We've been dealing with it forever. 799 00:39:56,840 --> 00:39:57,680 We're just, it looks different. 800 00:39:57,820 --> 00:39:57,980 Right? 801 00:39:58,060 --> 00:40:02,600 So this isn't the end all be all of security, but it's definitely a step in our direction. 802 00:40:03,960 --> 00:40:07,920 It eliminates a lot of modern malware and viruses because you can't talk to the hard drive, 803 00:40:08,080 --> 00:40:12,660 but that doesn't mean that we still don't want the information that you're storing on 804 00:40:12,660 --> 00:40:13,240 the internet now. 805 00:40:13,360 --> 00:40:16,540 And if you're using one of these devices, you're being pushed very heavily to store 806 00:40:16,540 --> 00:40:20,460 a lot of information on the internet in order to get functionality of these. 807 00:40:20,620 --> 00:40:25,720 So like I said, we're not looking for these buffer overflows, underflows, any sort of 808 00:40:25,720 --> 00:40:26,440 stuff like that. 809 00:40:26,600 --> 00:40:31,540 We're just looking for cross-site scripting, which is the most widely seen vulnerability 810 00:40:31,540 --> 00:40:32,740 on the web today. 811 00:40:33,360 --> 00:40:33,480 Yeah. 812 00:40:33,560 --> 00:40:38,660 And since you're literally taking the desktop out of the desktop operating system, you have 813 00:40:38,660 --> 00:40:43,060 to rebuild all the functionality that you're used to with your desktop operating system. 814 00:40:43,760 --> 00:40:48,280 You don't have a calculator anymore, so you have to download a calculator extension. 815 00:40:48,560 --> 00:40:53,000 You don't have a mail client, so you have to use some mail client or notification system 816 00:40:53,000 --> 00:40:55,500 to recreate that. 817 00:40:56,140 --> 00:41:01,160 So one of the first things that people ask as soon as I tell them about any of this 818 00:41:01,160 --> 00:41:02,340 research is, what about the sandbox? 819 00:41:02,540 --> 00:41:03,620 I hear about this Chrome sandbox. 820 00:41:03,980 --> 00:41:05,060 Did you guys break it? 821 00:41:05,120 --> 00:41:07,400 Did you guys break the Chrome sandbox? 822 00:41:07,520 --> 00:41:08,500 Oh my God, right? 823 00:41:09,740 --> 00:41:10,600 We didn't break it. 824 00:41:10,620 --> 00:41:11,220 We just went around it. 825 00:41:11,260 --> 00:41:13,540 These extensions actually live outside of the sandbox. 826 00:41:14,020 --> 00:41:18,360 So what the sandbox does, for anyone who's not familiar, is it isolates each tab from 827 00:41:18,360 --> 00:41:21,760 any other tab that's open and also isolates that tab from the hard drive. 828 00:41:21,920 --> 00:41:25,480 So that's why it eliminates a lot of the modern malware and viruses. 829 00:41:25,500 --> 00:41:31,860 But these extensions actually control their own kind of intertabular communication. 830 00:41:32,340 --> 00:41:34,820 Again, I made that word up, and I think it's awesome. 831 00:41:35,100 --> 00:41:35,620 Intertabular. 832 00:41:35,700 --> 00:41:36,520 Intertabular, right? 833 00:41:37,200 --> 00:41:42,980 So these extensions completely control the communication on their own, set the permissions 834 00:41:42,980 --> 00:41:45,020 that are set locally, and they live outside the sandbox. 835 00:41:45,380 --> 00:41:49,160 So instead of breaking it, we're walking right around it. 836 00:41:49,600 --> 00:41:52,820 We pour water in your sandbox and make it all muddy. 837 00:41:53,140 --> 00:41:55,420 So again, just to harp on this. 838 00:41:55,500 --> 00:41:57,980 These permissions are set by the third-party developer. 839 00:41:58,340 --> 00:42:00,520 They're not set by Google, and they're not checked by Google. 840 00:42:01,500 --> 00:42:06,240 But a lot of that stuff that Google did put in place has made some awesome improvements 841 00:42:06,240 --> 00:42:06,680 in security. 842 00:42:07,260 --> 00:42:09,620 We're just kind of here to say, hey, that's not it. 843 00:42:09,780 --> 00:42:11,900 That's not the end-all, be-all. 844 00:42:12,100 --> 00:42:16,100 One other really cool thing that they did, the Chrome Web Store is explicitly... 845 00:42:16,100 --> 00:42:19,720 We're not allowed to attack the Chrome Web Store via any extension. 846 00:42:20,000 --> 00:42:24,460 It's actually hard-coded into the Chrome source that you cannot... 847 00:42:24,460 --> 00:42:27,400 None of the extensions can interact with the Chrome Web Store. 848 00:42:27,720 --> 00:42:32,700 And the reason they did this is because if we could, we could force you to install an extension. 849 00:42:33,120 --> 00:42:35,140 So we can kind of do a privilege escalation, right? 850 00:42:35,200 --> 00:42:38,940 So if you had a scratchpad installed with a vulnerability that could talk to docs.google, 851 00:42:39,020 --> 00:42:41,800 and we could force you to install an extension with wider permissions, 852 00:42:42,120 --> 00:42:43,140 then we could do some more stuff. 853 00:42:43,300 --> 00:42:43,860 But we can't do that. 854 00:42:43,920 --> 00:42:45,860 They thought of that way before we did. 855 00:42:47,200 --> 00:42:47,560 However... 856 00:42:48,120 --> 00:42:51,620 So we're going to fly past this because we didn't do too much research on it. 857 00:42:51,620 --> 00:42:56,360 But nifty new feature of Google, the market.android.com. 858 00:42:56,460 --> 00:42:56,980 Who's used it? 859 00:42:57,120 --> 00:42:58,080 Who knows what it is? 860 00:42:58,340 --> 00:42:58,960 Okay, cool. 861 00:42:59,040 --> 00:42:59,480 A bunch of you. 862 00:42:59,580 --> 00:43:03,100 So you can install apps on your Android phone from the Internet. 863 00:43:04,000 --> 00:43:05,140 That's not blacklisted. 864 00:43:05,380 --> 00:43:09,220 So we can actually force install apps onto your phone via cross-site scripting. 865 00:43:09,220 --> 00:43:11,960 And because it's part of Google services, as soon as you go to that website, 866 00:43:12,200 --> 00:43:18,420 you're automatically logged on, and your phone is listed in these sync devices. 867 00:43:18,600 --> 00:43:21,380 So we could literally open up a tab. 868 00:43:21,380 --> 00:43:28,200 Spit some JavaScript at it, and force you to download and install our own malicious extension. 869 00:43:28,480 --> 00:43:30,620 Again, probably a Justin Beaver wallpaper. 870 00:43:31,340 --> 00:43:36,000 And then we can just harvest information off of your phone without you ever knowing 871 00:43:36,000 --> 00:43:38,060 because it doesn't really prompt you on your phone. 872 00:43:38,140 --> 00:43:40,320 It doesn't tell you that something's about to be installed. 873 00:43:40,600 --> 00:43:44,480 It just tells you Justin Beaver Live has been installed. 874 00:43:45,340 --> 00:43:45,880 Yes. 875 00:43:45,900 --> 00:43:46,440 Yes. 876 00:43:47,800 --> 00:43:48,580 Thank you. 877 00:43:48,600 --> 00:43:49,380 Finally got it. 878 00:43:49,440 --> 00:43:49,580 Yeah. 879 00:43:49,580 --> 00:43:51,980 So just in discussion with the Google security team, 880 00:43:52,040 --> 00:43:53,620 we've been talking to them this whole time. 881 00:43:53,720 --> 00:43:54,360 They're really cool guys. 882 00:43:55,000 --> 00:43:58,060 One of the ideas that they have for kind of fixing this in the future 883 00:43:59,380 --> 00:44:03,340 is creating more restrictive APIs for common use cases, things like RSS readers. 884 00:44:03,540 --> 00:44:06,020 They're going to eliminate a lot of the risk involved with that. 885 00:44:06,120 --> 00:44:10,860 They're going to try to create APIs for extensions that absolutely need to use 886 00:44:10,860 --> 00:44:13,540 this wide open permission set in order to function properly. 887 00:44:13,820 --> 00:44:19,500 This unfortunately does not eliminate the threat of a developer not knowing anybody. 888 00:44:19,500 --> 00:44:21,380 They're going to do better in creating an extension with wide open permissions. 889 00:44:21,800 --> 00:44:24,100 So it's just for common use case APIs. 890 00:44:24,300 --> 00:44:27,300 So it's not going to eliminate it, but it could reduce it. 891 00:44:29,300 --> 00:44:29,840 That's it. 892 00:44:30,220 --> 00:44:32,780 I have one more thing to note. 893 00:44:33,000 --> 00:44:33,380 Go ahead. 894 00:44:33,480 --> 00:44:33,800 Clap. 895 00:44:34,000 --> 00:44:34,240 Clap. 896 00:44:42,680 --> 00:44:43,600 All right. 897 00:44:43,620 --> 00:44:48,680 One more thing that we wanted to note is that all of this is the same for Chrome browser. 898 00:44:48,680 --> 00:44:51,040 The only difference between Chrome OS and Chrome browser 899 00:44:51,040 --> 00:44:54,980 is that Chrome browser on a Windows, Mac, Linux machine 900 00:44:54,980 --> 00:44:56,100 is just another browser. 901 00:44:58,620 --> 00:45:02,140 So you're probably not going to be installing tons and tons of extensions 902 00:45:02,680 --> 00:45:04,400 unlike the Chrome OS. 903 00:45:05,440 --> 00:45:07,560 One other thing to note is unlike Chrome OS, 904 00:45:07,760 --> 00:45:11,820 the Chrome browser can install extensions with binaries on them, plug-ins. 905 00:45:12,000 --> 00:45:16,320 So LastPass actually has the ability to sync your LastPass logged in status 906 00:45:16,320 --> 00:45:17,740 among your other browsers, 907 00:45:18,680 --> 00:45:18,900 which is a binary. 908 00:45:19,980 --> 00:45:23,700 We can actually interact with some of those binaries with JavaScript. 909 00:45:24,020 --> 00:45:26,120 And I haven't looked into a whole lot of it, 910 00:45:26,220 --> 00:45:28,440 but with LastPass alone, 911 00:45:28,620 --> 00:45:31,740 there's functionality to read arbitrary files on the file system. 912 00:45:32,180 --> 00:45:34,360 So if I owned your LastPass extension, 913 00:45:34,700 --> 00:45:37,100 not only do I own everything in LastPass, 914 00:45:37,320 --> 00:45:40,940 I can read random files from your hard drive as I feel. 915 00:45:41,580 --> 00:45:42,060 Cool. 916 00:45:42,660 --> 00:45:43,360 Thanks, guys. 917 00:45:44,180 --> 00:45:45,280 We'll be in the Q&A. 918 00:45:45,400 --> 00:45:47,060 We'll be across the hall if you want to talk to us.