1 00:00:00,480 --> 00:00:07,780 I'm Kevin Mahaffey, this is John Herring, and we are going to talk about mobile applications and some of the research we did into them recently. 2 00:00:10,220 --> 00:00:16,700 So really quickly, if any of you guys saw our talk last year, we've spoken for the past few years at DEF CON and Black Hat about mobile security. 3 00:00:17,020 --> 00:00:20,940 Last year we talked about fuzzing and attacking mobile operating systems more at the OS level. 4 00:00:21,080 --> 00:00:23,620 We decided to up-level a little bit and think about applications. 5 00:00:24,060 --> 00:00:25,860 I mean, really in the past year it's been amazing. 6 00:00:25,860 --> 00:00:30,820 We've seen absolute explosion in adoption of smartphones and, more importantly, mobile broadband usage. 7 00:00:31,100 --> 00:00:34,980 So a big part of this is mobile apps, and we said, okay, what's happening in the mobile app ecosystem? 8 00:00:35,360 --> 00:00:37,680 What can we do in the context of security research there? 9 00:00:40,020 --> 00:00:42,300 We're going to start with the vulnerability because that's always fun. 10 00:00:45,020 --> 00:00:52,440 So for those of you who don't know much about Android, Android has a login subsystem that you can use when you're developing applications. 11 00:00:53,100 --> 00:00:55,660 This is just like any other login system. 12 00:00:55,860 --> 00:00:57,160 But this one is Android's. 13 00:00:58,320 --> 00:01:04,440 Specifically, if you want to read logs that are produced by the system, so there's kind of a centralized system logging framework, 14 00:01:04,760 --> 00:01:09,160 you can request the read logs permission, and it allows you to access that. 15 00:01:09,420 --> 00:01:11,280 So this is the background for what we're going to talk about. 16 00:01:11,500 --> 00:01:15,920 And if you're really interested in this sort of vulnerability, 3 p.m. in this room, there's a really good talk you should see as well. 17 00:01:17,800 --> 00:01:23,180 So there is a vulnerability in Android where the location manager service, 18 00:01:23,420 --> 00:01:25,760 which is the service that the Android system uses. 19 00:01:25,860 --> 00:01:30,740 This is to effectively provide your GPS location via cell tower, Wi-Fi, so on and so forth. 20 00:01:31,240 --> 00:01:39,680 And what happened was when you retrieved the location, the location manager service dumped your LAC and cell ID, 21 00:01:39,800 --> 00:01:44,740 which are the two GSM identifiers that can be used to basically determine where you are, into the logs. 22 00:01:45,060 --> 00:01:51,940 So what that means is that any application that has the read logs permission can grab those pieces of data outside of it 23 00:01:51,940 --> 00:01:53,260 and determine where your application is. 24 00:01:53,260 --> 00:02:00,440 And there's a lot of other things we've also seen with respect to applications logging things spuriously 25 00:02:01,460 --> 00:02:03,520 and disclosing all sorts of fun information. 26 00:02:04,840 --> 00:02:07,200 I liken it to dumpster diving on mobile. 27 00:02:09,320 --> 00:02:13,840 So really quickly, I'm sure everyone saw on Monday an interesting example. 28 00:02:14,180 --> 00:02:23,020 Citibank had an announcement about their iPhone application leaking credentials, banking credentials, to parts of the device. 29 00:02:23,260 --> 00:02:28,440 Where in certain circumstances, if a malicious application was exploited, the device could grab the banking credentials. 30 00:02:28,640 --> 00:02:31,140 And there's also a syncing it to your desktop if you synced with iTunes. 31 00:02:31,920 --> 00:02:34,760 We've seen a number of examples of issues like this. 32 00:02:34,900 --> 00:02:40,800 And this really underscores how bad it can be if you're logging information inappropriately. 33 00:02:40,960 --> 00:02:45,140 So imagine you're logging banking credentials to some public part of the device. 34 00:02:45,400 --> 00:02:52,180 Any application that doesn't request any sort of special permissions other than the read logs can grab that data and then you're owned. 35 00:02:54,840 --> 00:02:58,240 So this is an example of a vulnerability we found in the wild. 36 00:02:58,760 --> 00:03:04,700 It basically allowed somebody who's reading the logs on your device to hijack and log into your account. 37 00:03:04,900 --> 00:03:05,540 Not good. 38 00:03:07,820 --> 00:03:15,120 The background on this is a lot of applications log URLs with varying levels of parameterization to the system logs. 39 00:03:15,280 --> 00:03:19,500 So for example, the top log statement you see is what the Android browser does when you type in a URL. 40 00:03:19,680 --> 00:03:21,140 So you can effectively see. 41 00:03:22,180 --> 00:03:23,340 You can see what query was put in there. 42 00:03:24,420 --> 00:03:30,180 And the second thing you see is an example of what the vulnerable app that we found in the wild was actually doing. 43 00:03:30,380 --> 00:03:32,640 It was effectively logging any URL it retrieved. 44 00:03:34,660 --> 00:03:37,440 So some of you will begin to see where the fail happens. 45 00:03:37,740 --> 00:03:42,280 So let's imagine a hypothetical application that has a web view embedded in it. 46 00:03:42,380 --> 00:03:44,460 So it's a mobile application that effectively is just a web browser. 47 00:03:45,580 --> 00:03:50,140 When you start the application, it retrieves the login form from the server. 48 00:03:50,240 --> 00:03:51,640 Server serves the login form. 49 00:03:52,180 --> 00:03:55,420 User goes, you know, tap, tap, tap, enters their email and password. 50 00:03:56,160 --> 00:03:57,380 They click the button. 51 00:03:57,460 --> 00:04:00,560 It posts that information over SSL. 52 00:04:00,620 --> 00:04:02,660 And let's imagine they're using a single sign-on service. 53 00:04:02,960 --> 00:04:07,020 So you have this sign-on service that serves the form and validates the credentials. 54 00:04:07,760 --> 00:04:10,660 Let's assume that the user entered the correct credentials. 55 00:04:10,880 --> 00:04:14,400 And the single sign-on service says, okay, you're authenticated. 56 00:04:14,580 --> 00:04:16,220 Now redirect to the actual application. 57 00:04:16,640 --> 00:04:18,320 Single sign-on service says, hey, go here. 58 00:04:18,720 --> 00:04:20,820 And in order to actually validate the session, 59 00:04:20,820 --> 00:04:26,120 it adds information in the get query string about your session ID and all these secret tokens. 60 00:04:26,680 --> 00:04:29,600 So, you know, good app says, oh, got a redirect. 61 00:04:29,800 --> 00:04:31,180 I'm going to go retrieve this sort of thing. 62 00:04:31,280 --> 00:04:32,460 And you're logged into your account. 63 00:04:32,980 --> 00:04:34,200 You guys see what goes on here? 64 00:04:34,320 --> 00:04:36,220 Let's look at what happens in the logs when this happens. 65 00:04:37,100 --> 00:04:40,400 So we get a get URL, you know, ssotacompany.com. 66 00:04:41,040 --> 00:04:41,800 We post. 67 00:04:42,280 --> 00:04:43,940 And we get our redirect. 68 00:04:44,620 --> 00:04:46,620 That's an interesting secret key that we see in the logs. 69 00:04:46,900 --> 00:04:48,760 So what could you do bad with this? 70 00:04:48,760 --> 00:04:52,940 So imagine a malicious application that effectively is reading the logs on the device. 71 00:04:53,780 --> 00:04:58,080 And it transmits this get query parameter to a server. 72 00:04:59,060 --> 00:05:01,240 Literally all you have to do is paste this in a web browser, 73 00:05:01,300 --> 00:05:02,820 and you're fully authenticated in that user's account. 74 00:05:03,120 --> 00:05:05,960 Just to be clear, imagine if your banking credentials are logged. 75 00:05:06,080 --> 00:05:08,080 You grab this string, drop it in a browser, 76 00:05:08,180 --> 00:05:09,460 and you're logged into their bank account. 77 00:05:10,520 --> 00:05:10,880 Fun. 78 00:05:12,680 --> 00:05:14,200 So, you know, key, key lessons. 79 00:05:14,380 --> 00:05:15,560 You know, we want to orient people to, hey, 80 00:05:15,700 --> 00:05:18,460 if you guys take something away from this talk and you guys are writing mobile apps 81 00:05:18,460 --> 00:05:21,420 or breaking mobile apps, you know, app developers, you know, 82 00:05:21,420 --> 00:05:24,060 seriously, please don't log confidential information. 83 00:05:24,540 --> 00:05:24,940 Bad. 84 00:05:26,160 --> 00:05:28,340 Secondarily, web developers, if you're interacting with mobile apps, 85 00:05:28,520 --> 00:05:31,840 especially if they're sending URLs between applications on a device, 86 00:05:32,760 --> 00:05:34,840 try to pull things out of get query strings. 87 00:05:35,120 --> 00:05:38,840 Maybe put them as post data or set cookie data so that it's not floating around, 88 00:05:38,980 --> 00:05:40,340 or at least it's harder for it to float around. 89 00:05:42,840 --> 00:05:44,920 So we found this really bad thing in the wild. 90 00:05:45,080 --> 00:05:46,100 And we had a couple questions. 91 00:05:46,100 --> 00:05:51,040 One, are there any other apps that are vulnerable to this sort of attack? 92 00:05:51,280 --> 00:05:55,760 And two, are there any applications in the wild that are actually trying to read the logs 93 00:05:55,760 --> 00:05:57,560 and trying to hijack these accounts? 94 00:05:57,820 --> 00:06:01,980 I mean, to be clear, the application we found this vulnerability in 95 00:06:01,980 --> 00:06:03,320 was a pretty serious application. 96 00:06:03,680 --> 00:06:06,940 And you could say there's a lot of incentive for people to attack it. 97 00:06:07,200 --> 00:06:08,620 So we asked this question. 98 00:06:08,760 --> 00:06:11,240 And we, about a few months ago, said, you know, 99 00:06:11,240 --> 00:06:14,180 what if we could basically ask questions of every application in the world 100 00:06:14,180 --> 00:06:16,080 and get a reasonable answer? 101 00:06:16,820 --> 00:06:19,160 So we built something we call the App Genome Project. 102 00:06:20,580 --> 00:06:22,240 Effectively, what the App Genome is. 103 00:06:22,420 --> 00:06:25,840 So basically what we did is we built an engine that allows us to crawl 104 00:06:25,840 --> 00:06:27,560 most of the major application environments. 105 00:06:27,900 --> 00:06:30,760 So, namely, what we're going to be talking about today is Android and iPhone. 106 00:06:31,000 --> 00:06:34,080 So Android Marketplace and the iPhone App Store. 107 00:06:34,480 --> 00:06:36,640 We've seen about 300,000 applications. 108 00:06:36,960 --> 00:06:38,380 The number's growing really, really quickly. 109 00:06:39,160 --> 00:06:41,600 We've deep dived on about 100,000 applications. 110 00:06:41,940 --> 00:06:45,020 And we've basically taken, we'll talk a little bit more about it, 111 00:06:45,060 --> 00:06:46,080 but we've taken this engine that we've built, 112 00:06:46,100 --> 00:06:47,340 and it allows us to actually pull down the data, 113 00:06:47,420 --> 00:06:50,340 and then built in a system that allows us for automated analysis. 114 00:06:50,800 --> 00:06:54,580 And we have a system that we can look at basically metadata application binaries 115 00:06:54,580 --> 00:06:57,960 and create a genome, if you will, of applications, 116 00:06:58,120 --> 00:07:01,900 such that when we say, okay, if this one app has this sort of behavior, 117 00:07:02,060 --> 00:07:05,840 has this sort of code in it, what other apps actually have that? 118 00:07:05,960 --> 00:07:07,880 And we can use that to correlate different types of threats. 119 00:07:08,080 --> 00:07:09,660 So when we understand one type of threat, 120 00:07:09,780 --> 00:07:14,420 imagine we can instantly scan 300,000 apps and see what else is exploiting it in the wild. 121 00:07:14,520 --> 00:07:15,860 So this becomes a superpower. 122 00:07:16,100 --> 00:07:17,300 Powerful security response tool. 123 00:07:18,340 --> 00:07:19,680 So what we're going to talk about today. 124 00:07:20,120 --> 00:07:23,920 First, we're going to talk about why you should think about caring about mobile apps 125 00:07:23,920 --> 00:07:26,440 and then maybe why you should be skeptical about mobile applications. 126 00:07:27,160 --> 00:07:28,460 Secondarily, what are our motivations? 127 00:07:28,600 --> 00:07:29,140 What's the point? 128 00:07:29,280 --> 00:07:31,300 Why are we downloading all these applications? 129 00:07:31,500 --> 00:07:31,900 What are we doing? 130 00:07:32,820 --> 00:07:34,800 Third, we're going to go into how we built it. 131 00:07:34,820 --> 00:07:37,120 We're going to dive a little bit under the hood of, you know, it's pretty cool. 132 00:07:37,840 --> 00:07:39,440 And we're going to look at what we found. 133 00:07:39,940 --> 00:07:41,460 Specifically, I'm going to tell four stories. 134 00:07:41,780 --> 00:07:43,180 And I think they're pretty good stories. 135 00:07:43,180 --> 00:07:49,320 And we're going to talk about how we can use the App Genome Project in a security response context. 136 00:07:49,680 --> 00:07:52,400 So if a lot of you here are disclosing vulnerabilities, 137 00:07:52,960 --> 00:07:57,260 there's a lot of times a big question of when do you disclose publicly. 138 00:07:57,540 --> 00:08:01,160 And a lot of times the answer to that question hinges on whether there's exploitation in the wild. 139 00:08:01,520 --> 00:08:05,720 And, well, we happen to have a giant data set that we can see if things are being exploited in the wild. 140 00:08:06,140 --> 00:08:08,640 And then we're going to make some predictions, hopefully. 141 00:08:10,140 --> 00:08:12,140 So first, why should you care about mobile applications? 142 00:08:13,760 --> 00:08:19,460 So mobile apps, obviously, are becoming pretty standard use in terms of how people are actually interacting with their mobile devices. 143 00:08:19,680 --> 00:08:22,140 I think that we'll see more and more moving to the web over time. 144 00:08:22,260 --> 00:08:23,960 But right now it's all about native mobile applications. 145 00:08:24,400 --> 00:08:29,520 We've seen a pretty interesting trend where there's huge volumes of people downloading applications. 146 00:08:29,760 --> 00:08:31,300 So on average about 22 apps. 147 00:08:31,440 --> 00:08:33,780 But there's people who have hundreds of apps on their phone, literally. 148 00:08:34,000 --> 00:08:38,640 And the thing that we've noticed with that is most people pay very little attention to what they're actually downloading. 149 00:08:38,900 --> 00:08:40,540 So people download apps 10 at a time. 150 00:08:40,560 --> 00:08:41,220 Wow, I got a smartphone. 151 00:08:41,340 --> 00:08:41,740 That's great. 152 00:08:41,740 --> 00:08:45,180 They're not paying attention to the source, the developer, what's actually happening there. 153 00:08:45,280 --> 00:08:49,760 It's just assumed trustworthy, which is not the best assumption to be making. 154 00:08:50,040 --> 00:08:53,500 And more and more apps are actually accessing sensitive information. 155 00:08:53,800 --> 00:08:58,020 So we talked about examples like bank accounts, location, SMS. 156 00:08:58,500 --> 00:09:06,840 And one of the other interesting things we're seeing that Mikko Hypenen spoke on at Black Hat is there's premium rate calls and premium rate SMSs. 157 00:09:07,040 --> 00:09:10,660 So imagine on a desktop environment how you would monetize an attack. 158 00:09:10,740 --> 00:09:11,720 You might steal someone's phone. 159 00:09:11,740 --> 00:09:12,500 You might steal someone's credit card information. 160 00:09:12,680 --> 00:09:14,640 You might turn it into a botnet for spam. 161 00:09:14,960 --> 00:09:18,020 On a mobile device, you actually have an in-band payment mechanism. 162 00:09:18,440 --> 00:09:20,460 Literally you can send a packet and money goes flying. 163 00:09:20,640 --> 00:09:22,020 And that's never been possible before. 164 00:09:22,260 --> 00:09:26,100 So we've seen examples of this where malware will have auto-dialer mechanisms in it. 165 00:09:26,160 --> 00:09:31,180 And it will sit there at night, call Somalia, and ring up a huge, huge cell phone bill for you. 166 00:09:31,240 --> 00:09:31,760 It's not cool. 167 00:09:34,160 --> 00:09:35,800 So why care about mobile apps? 168 00:09:36,240 --> 00:09:39,000 What enables the attacks more easily than ever? 169 00:09:39,160 --> 00:09:40,140 So standardized APIs. 170 00:09:40,820 --> 00:09:44,760 It's very easy to say, okay, I want to grab contact information. 171 00:09:45,080 --> 00:09:47,020 Okay, I'll call that API and grab that information. 172 00:09:47,880 --> 00:09:50,860 It's very scalable in terms of how easy it is to build an attack. 173 00:09:51,340 --> 00:10:01,300 And the capabilities are so rich and deep combined with those APIs that it makes it incredibly easy for one to, after you actually have an exploit, grab data. 174 00:10:01,700 --> 00:10:05,000 So the incentives like we talked about, there's clearly a monetary incentive. 175 00:10:05,220 --> 00:10:07,940 And then there's the sensitive information that's also driving those attacks. 176 00:10:09,400 --> 00:10:11,980 So the question is why won't mobile threats matter? 177 00:10:12,140 --> 00:10:14,040 We're skeptical dudes. 178 00:10:14,200 --> 00:10:15,840 We like skeptical people in general. 179 00:10:15,980 --> 00:10:18,820 And we continually hear from people, wow, mobile is never going to be a problem. 180 00:10:18,900 --> 00:10:19,740 We've got security handled. 181 00:10:20,240 --> 00:10:22,480 First argument, mobile is fragmented, right? 182 00:10:22,640 --> 00:10:30,900 Well, just to set context, when we look at the desktop environment, one of the reasons Windows gets exploited so often is because it's a relatively homogenous environment, right? 183 00:10:30,960 --> 00:10:32,160 And it's a very large footprint. 184 00:10:32,540 --> 00:10:37,840 Well, if you look at how fast mobile device shipments are growing, there's going to be half a billion of these things shipping a year. 185 00:10:37,840 --> 00:10:40,980 Within the next two to three years, there's going to be three Windows. 186 00:10:41,260 --> 00:10:48,280 When you think about the size of the iPhone platform, Android platform, and something like Blackberry alone, literally each of those will be the equivalent of Windows. 187 00:10:48,660 --> 00:10:51,360 So when you think about the attack surface, yes, they're fragmented. 188 00:10:51,580 --> 00:10:53,640 It's like the market just exploded three times. 189 00:10:53,720 --> 00:10:55,720 So there's three opportunities to actually get in there. 190 00:10:56,080 --> 00:10:58,840 And more importantly, everything is homogenous. 191 00:10:59,000 --> 00:11:03,800 So if I have one iPhone exploit, I nail every iOS device, iPads, iPhones. 192 00:11:05,040 --> 00:11:06,540 Another argument, isn't there a sandbox? 193 00:11:06,940 --> 00:11:07,580 You know. 194 00:11:07,840 --> 00:11:09,900 The sandbox, that means it's safe, right? 195 00:11:10,000 --> 00:11:12,120 Well, you can piss in the sandbox, right? 196 00:11:12,260 --> 00:11:16,400 So we'll show you an example of how this works. 197 00:11:16,600 --> 00:11:18,160 And sandbox is a great step. 198 00:11:18,220 --> 00:11:18,800 Don't get me wrong. 199 00:11:18,920 --> 00:11:22,900 We think that mobile OSes are pretty forward thinking in the context of security. 200 00:11:23,120 --> 00:11:24,300 But nothing's perfect. 201 00:11:24,500 --> 00:11:28,060 And the goal of this talk is to help everyone understand how to take the steps to keep people safe. 202 00:11:28,300 --> 00:11:32,100 So, for example, the vulnerability we just talked about is an application level vulnerability. 203 00:11:32,480 --> 00:11:37,260 So even though the system is totally safe, an application is leaking credentials, for example, into the system logs. 204 00:11:37,260 --> 00:11:43,160 And, you know, I think there's a lot more vulnerabilities like this where OS does a great job, 205 00:11:43,280 --> 00:11:45,960 but applications screw something up and game over. 206 00:11:46,260 --> 00:11:46,700 Exactly. 207 00:11:46,840 --> 00:11:51,620 And just finally, in terms of a small attack surface, saying, oh, well, mobile devices have a small attack surface, 208 00:11:51,840 --> 00:11:54,040 it's actually the most rich attack surface we've ever seen. 209 00:11:54,100 --> 00:11:56,800 I mean, look at the different types of exploits in the past couple of years we've seen, 210 00:11:56,880 --> 00:12:02,340 ranging from SMS bugs like Charlie Miller's SMS bug to attacks against push messaging services 211 00:12:02,340 --> 00:12:04,240 and things like the actual app store itself. 212 00:12:04,440 --> 00:12:07,240 And more and more we're seeing web services associated with mobile. 213 00:12:07,240 --> 00:12:10,540 So imagine you, lowest hanging fruit, you nail the web service, 214 00:12:10,580 --> 00:12:13,600 which has a direct connection to the mobile device, use that as the end road. 215 00:12:15,540 --> 00:12:16,640 So what are our motivations? 216 00:12:16,860 --> 00:12:18,080 Why did we go do all this? 217 00:12:18,700 --> 00:12:20,200 Ultimately, our goal is to keep people safe. 218 00:12:20,600 --> 00:12:25,940 We believe that having good data can help everyone here, everyone who sees the research, make good decisions, 219 00:12:26,180 --> 00:12:30,580 whether you're a developer, a network operator, or an IT administrator. 220 00:12:31,300 --> 00:12:34,800 Understanding what is actually out there as opposed to just kind of speculating is a good job. 221 00:12:35,940 --> 00:12:37,220 Secondarily, we want to identify threats. 222 00:12:37,240 --> 00:12:37,680 We want to identify threats in the wild. 223 00:12:37,840 --> 00:12:42,100 Like having a large data set, we can actually go ask very, very probing questions 224 00:12:42,100 --> 00:12:45,620 and figure out what's actually going on. 225 00:12:45,820 --> 00:12:47,700 Third, understanding platform differences. 226 00:12:49,820 --> 00:12:53,600 These two platforms, Android and iPhone particularly, have very different security models. 227 00:12:54,020 --> 00:12:58,000 And if we can understand how that impacts how bad things happen on devices, 228 00:12:58,300 --> 00:13:03,660 that allows us to do a really good job or do a much better job than we could otherwise 229 00:13:03,660 --> 00:13:06,060 in securing them and preventing things before they get too bad. 230 00:13:06,060 --> 00:13:09,720 And the last thing is we want to understand what apps are actually doing, 231 00:13:09,820 --> 00:13:12,840 which is not necessarily the same thing as they say they're doing. 232 00:13:12,980 --> 00:13:14,880 And on a mobile device compared to your computer, 233 00:13:15,000 --> 00:13:18,380 especially a lot of people in this room I imagine are inspecting or reverse engineering 234 00:13:18,380 --> 00:13:20,800 or doing things on a lot of the apps they have on their computer, 235 00:13:21,000 --> 00:13:24,380 you don't have that ability in many cases to do that on your phone. 236 00:13:24,500 --> 00:13:27,140 And we want to basically make it so. 237 00:13:28,980 --> 00:13:29,820 How do we build it? 238 00:13:30,440 --> 00:13:32,300 So a quick architectural overview. 239 00:13:32,300 --> 00:13:37,240 We built a distributed crawler that speaks Android and iPhone, 240 00:13:37,440 --> 00:13:40,920 and effectively what it does is a piece of software we built 241 00:13:40,920 --> 00:13:43,920 that communicates with each app store over its native protocol 242 00:13:45,180 --> 00:13:49,100 and interacts with it in the same way you would download something on your device. 243 00:13:50,140 --> 00:13:52,200 We tried to run this originally in a single thread, 244 00:13:52,340 --> 00:13:56,140 and downloading every mobile app in the world in a single thread takes a really, really long time, 245 00:13:56,240 --> 00:13:57,680 so try not to do that. 246 00:13:57,900 --> 00:14:00,160 So we distributed it out and made it a lot easier. 247 00:14:01,020 --> 00:14:01,420 Secondarily, 248 00:14:02,300 --> 00:14:04,980 we're storing everything we're getting so that we can actually look at trends over time. 249 00:14:05,100 --> 00:14:06,000 We can do offline analysis. 250 00:14:06,380 --> 00:14:07,680 If we find a new vuln, 251 00:14:07,780 --> 00:14:13,140 we can just quickly write up something to figure out if anyone in the wild is vulnerable to it or exploiting it. 252 00:14:13,860 --> 00:14:16,540 Third is we developed some custom analysis tools 253 00:14:17,240 --> 00:14:22,320 because there really aren't too many things that are meant for automated analysis on mobile right now, 254 00:14:22,420 --> 00:14:25,980 so we built some things that allow us to ask questions against the data set in mass. 255 00:14:30,200 --> 00:14:30,620 So, 256 00:14:31,260 --> 00:14:32,040 like I said, 257 00:14:32,300 --> 00:14:33,020 this is a distributed crawler. 258 00:14:34,040 --> 00:14:34,440 Essentially, 259 00:14:34,580 --> 00:14:37,460 it does the same thing that you would do when you're on an app store. 260 00:14:37,760 --> 00:14:38,400 So first, 261 00:14:38,560 --> 00:14:40,160 let's imagine you're browsing applications. 262 00:14:40,520 --> 00:14:41,320 That's the first step. 263 00:14:41,440 --> 00:14:44,540 We're enumerating applications in a given category or in a given set. 264 00:14:45,000 --> 00:14:45,400 Second, 265 00:14:46,120 --> 00:14:46,880 on Apple, 266 00:14:47,060 --> 00:14:47,540 basically, 267 00:14:47,800 --> 00:14:50,340 you would click on an application and retrieve the data. 268 00:14:50,500 --> 00:14:51,000 On Android, 269 00:14:51,140 --> 00:14:53,460 the aside there is it actually does that all on the query, 270 00:14:53,560 --> 00:14:54,480 so it's a little bit more optimized. 271 00:14:54,940 --> 00:14:55,820 And the third is, 272 00:14:55,920 --> 00:14:57,340 once you're on the application page, 273 00:14:57,500 --> 00:14:58,360 we download the application, 274 00:14:59,300 --> 00:15:01,740 and we do this through a distributed job queue. 275 00:15:01,740 --> 00:15:03,160 And everyone's happy. 276 00:15:03,620 --> 00:15:04,680 So the data store, 277 00:15:04,800 --> 00:15:07,120 we are storing all of the application metadata. 278 00:15:07,360 --> 00:15:07,700 Specifically, 279 00:15:07,720 --> 00:15:08,940 this might be description ratings, 280 00:15:09,680 --> 00:15:10,140 version, 281 00:15:10,400 --> 00:15:11,220 so on and so forth. 282 00:15:11,380 --> 00:15:13,080 And we're actually tracking changes over time. 283 00:15:14,000 --> 00:15:14,460 Secondarily, 284 00:15:14,520 --> 00:15:15,380 application binaries. 285 00:15:15,540 --> 00:15:16,700 This is for free applications. 286 00:15:17,200 --> 00:15:20,720 If anyone wants to write me a check to download all the paid applications, 287 00:15:20,860 --> 00:15:21,680 I'll be available afterwards. 288 00:15:21,980 --> 00:15:22,760 I'm very happy. 289 00:15:25,920 --> 00:15:27,520 And we're tracking all of this. 290 00:15:27,640 --> 00:15:29,080 It's quite a big data set. 291 00:15:29,120 --> 00:15:29,360 It's fun. 292 00:15:30,420 --> 00:15:30,880 So, 293 00:15:30,880 --> 00:15:33,100 now that we have all this stuff, 294 00:15:33,280 --> 00:15:33,980 what do we do? 295 00:15:34,140 --> 00:15:35,860 We have a whole bunch of mobile applications. 296 00:15:36,040 --> 00:15:38,380 I can only play so many games of Tetris. 297 00:15:39,700 --> 00:15:40,140 So, 298 00:15:40,200 --> 00:15:42,200 we built some automated analysis tools. 299 00:15:42,860 --> 00:15:47,320 And we started extracting data to figure out what we're doing here. 300 00:15:47,580 --> 00:15:50,280 I'm going to go into detail about specifically what we did on each platform. 301 00:15:50,560 --> 00:15:51,560 But generally speaking, 302 00:15:51,680 --> 00:15:52,740 we're looking at what things, 303 00:15:52,980 --> 00:15:56,640 what APIs and framework constructs on a given platform and app references, 304 00:15:57,300 --> 00:15:59,580 what things are implemented inside of the application. 305 00:15:59,580 --> 00:16:00,620 On Android, 306 00:16:00,860 --> 00:16:02,000 what permissions are in the app. 307 00:16:02,200 --> 00:16:05,940 And then sometimes we can get strings out of the application if we have specific things we're looking for. 308 00:16:07,080 --> 00:16:07,560 So, 309 00:16:07,560 --> 00:16:08,340 what do we do on Android? 310 00:16:10,520 --> 00:16:11,000 So, 311 00:16:11,080 --> 00:16:12,940 Dalvik is not only a fishing village in Iceland. 312 00:16:13,100 --> 00:16:15,500 It's also the VM on Android. 313 00:16:15,700 --> 00:16:16,800 It's actually pretty cool. 314 00:16:18,140 --> 00:16:19,980 It's similar to a JVM. 315 00:16:20,020 --> 00:16:25,080 And it has a lot of differences that frankly don't matter to our analysis right now. 316 00:16:25,240 --> 00:16:26,700 But it's really optimized for mobile. 317 00:16:27,400 --> 00:16:29,560 The application packages for Dalvik, 318 00:16:29,580 --> 00:16:31,260 are called APKs. 319 00:16:31,400 --> 00:16:33,300 They're very, very similar to JARs. 320 00:16:33,480 --> 00:16:36,980 And APKs and JARs are basically just special zip files. 321 00:16:37,160 --> 00:16:38,540 So, they're fairly easy to extract. 322 00:16:39,600 --> 00:16:42,580 The main executable in Dalvik is called classes.dex. 323 00:16:42,760 --> 00:16:44,500 And so that's one of the main things we're looking at. 324 00:16:45,040 --> 00:16:48,880 The other thing of interest in an Android application is called the Android Manifest, 325 00:16:48,980 --> 00:16:53,180 which is a really kind of proprietary binary encoded XML document 326 00:16:53,180 --> 00:16:55,560 that describes the permissions of an application, 327 00:16:55,840 --> 00:16:56,480 its components, 328 00:16:56,620 --> 00:16:57,360 so on and so forth. 329 00:16:58,680 --> 00:16:59,560 Before we get into that, 330 00:16:59,560 --> 00:17:01,480 before we kind of dive into what we did for analysis, 331 00:17:01,680 --> 00:17:04,620 I think a brief background in what the Android security model is. 332 00:17:05,280 --> 00:17:05,700 Specifically, 333 00:17:06,760 --> 00:17:10,240 Android has granular permissions for all of its specific capabilities. 334 00:17:10,640 --> 00:17:11,700 So, up front, 335 00:17:11,840 --> 00:17:13,880 Android declares what your app is going to do, 336 00:17:13,940 --> 00:17:16,280 and it never goes around that, hopefully. 337 00:17:16,540 --> 00:17:18,520 You know, come at 3 to have fun. 338 00:17:20,220 --> 00:17:22,980 Also important is enforcement is at the process level and the VM level. 339 00:17:23,180 --> 00:17:24,920 So if you find an Android VM vulnerability, 340 00:17:26,040 --> 00:17:27,460 usually it means absolutely nothing 341 00:17:27,460 --> 00:17:29,540 because everything is enforced at the Unix process level. 342 00:17:29,560 --> 00:17:34,000 IPC level and what your users' permissions are on the actual device, 343 00:17:34,240 --> 00:17:35,380 which is really interesting. 344 00:17:35,820 --> 00:17:37,240 So what did we do? 345 00:17:37,560 --> 00:17:39,520 As I said, Android has permissions. 346 00:17:39,920 --> 00:17:41,580 And so one, we looked at package permissions. 347 00:17:41,880 --> 00:17:43,860 But simply looking at permissions alone, 348 00:17:44,080 --> 00:17:47,660 all that tells you is if an application wants to access data, 349 00:17:47,800 --> 00:17:49,120 it doesn't tell you what it actually does. 350 00:17:49,400 --> 00:17:51,520 So we also did dex static analysis. 351 00:17:52,000 --> 00:17:55,480 And so one example of question we could ask is, 352 00:17:55,600 --> 00:17:58,940 hey, is this permission requested and is this API referenced? 353 00:17:58,940 --> 00:18:01,760 One example of how we can do that for the phone number, 354 00:18:01,860 --> 00:18:03,680 we can look at the read phone state permission 355 00:18:03,680 --> 00:18:04,680 to retrieve the phone number, 356 00:18:04,780 --> 00:18:07,980 and we look for the telephony manager get line one number API. 357 00:18:09,460 --> 00:18:12,060 And with either one of those missing, 358 00:18:12,200 --> 00:18:14,880 the application is not likely going to actually access the phone number. 359 00:18:15,080 --> 00:18:16,980 Or we can run arbitrary analysis 360 00:18:16,980 --> 00:18:18,960 to ask other interesting questions of the data. 361 00:18:19,780 --> 00:18:22,160 I think it's important to understand what we can do and what we can't do. 362 00:18:23,200 --> 00:18:24,820 For the assumptions right now, 363 00:18:25,760 --> 00:18:28,480 we're assuming that applications don't get around the permission model, 364 00:18:28,940 --> 00:18:30,460 because, for example, if you're rooting the phone, 365 00:18:30,580 --> 00:18:32,860 if you're using local privilege escalation exploits, 366 00:18:32,880 --> 00:18:36,460 you have bigger problems than stealing your phone number, most likely. 367 00:18:37,740 --> 00:18:39,880 Secondarily, capabilities can be implemented outside of Dalvik, 368 00:18:39,920 --> 00:18:41,140 and this is really important to understand, 369 00:18:41,840 --> 00:18:44,480 because you can bring in native code to Android applications, 370 00:18:44,740 --> 00:18:49,060 and you can basically download ARM code from the Internet 371 00:18:49,060 --> 00:18:50,100 and start executing it. 372 00:18:50,320 --> 00:18:52,980 And, of course, in static analysis, we're not going to be looking at that. 373 00:18:53,060 --> 00:18:56,220 But I think it's important that everyone kind of understands what we're looking at here. 374 00:18:56,680 --> 00:18:58,740 So specifically, we're not looking at code download at runtime. 375 00:18:58,940 --> 00:19:00,660 We're not looking at encrypted code. 376 00:19:00,840 --> 00:19:03,260 So, for example, if there's a polymorphic engine or something like that, 377 00:19:03,400 --> 00:19:05,480 the current static analysis that we're doing doesn't look at that. 378 00:19:05,680 --> 00:19:07,560 And we're also not looking at dynamic linkage. 379 00:19:07,680 --> 00:19:10,820 So if you're using reflection or any sort of raw IPC calls, 380 00:19:10,900 --> 00:19:13,060 so Android has this IPC mechanism called Binder, 381 00:19:13,160 --> 00:19:14,860 we're not looking at raw calls there. 382 00:19:15,480 --> 00:19:16,820 At some point, we will get there, 383 00:19:16,940 --> 00:19:19,180 but we're looking at the vast majority of apps 384 00:19:19,180 --> 00:19:21,080 that use the framework as it's built right now. 385 00:19:22,540 --> 00:19:23,400 What do we do on iPhone? 386 00:19:24,540 --> 00:19:28,000 So iPhone, as a lot of you guys know, uses process-level sandboxing, 387 00:19:28,000 --> 00:19:30,320 and the app store enforces APIs. 388 00:19:31,700 --> 00:19:36,020 Unlike Android, you don't usually have acknowledgement of permissions 389 00:19:36,020 --> 00:19:37,340 except for push and location, 390 00:19:37,620 --> 00:19:39,060 where there's a user box that says, 391 00:19:39,160 --> 00:19:40,800 hey, do you want to allow this for this specific application? 392 00:19:42,780 --> 00:19:44,980 What is an iPhone app when you actually download it? 393 00:19:45,120 --> 00:19:47,140 Like an APK, it's just a zip file. 394 00:19:48,420 --> 00:19:50,820 The application binary is typically in a certain place, 395 00:19:51,020 --> 00:19:53,100 and it's an executable format called MachO. 396 00:19:54,100 --> 00:19:56,240 Yeah, it's the same executable format as on OS X. 397 00:19:57,000 --> 00:20:00,280 The MachO, the header is a series of load commands, 398 00:20:00,480 --> 00:20:03,540 so they specify how the binary is segmented in memory, 399 00:20:04,220 --> 00:20:05,760 what frameworks it's linked to at runtime, 400 00:20:05,980 --> 00:20:07,560 whether it's encrypted, and so on and so forth. 401 00:20:08,500 --> 00:20:11,040 There's three segments that we're going to be caring about today, 402 00:20:11,140 --> 00:20:12,280 text, data, and link edit. 403 00:20:13,320 --> 00:20:15,840 Text is where the executable code and read-only constants are. 404 00:20:16,180 --> 00:20:18,180 Data is where we have the writable data 405 00:20:18,180 --> 00:20:20,640 or any sort of things that are initialized but can be mutable. 406 00:20:21,100 --> 00:20:23,120 And link edit is all of our dynamic linker fun. 407 00:20:23,900 --> 00:20:26,140 If any of you guys are used to it, 408 00:20:26,240 --> 00:20:28,100 reverse engineering portable executable format, 409 00:20:29,520 --> 00:20:31,640 the top-level construct is a section, 410 00:20:32,180 --> 00:20:35,880 whereas in MachO, the top-level concept is a segment, 411 00:20:35,980 --> 00:20:37,340 and a segment has many sections. 412 00:20:37,740 --> 00:20:40,220 Totally confusing, but for whatever reason, 413 00:20:40,240 --> 00:20:41,740 they decided to change the terminology on us. 414 00:20:42,700 --> 00:20:44,960 But one of the big problems is once we download apps, 415 00:20:45,040 --> 00:20:46,720 they're encrypted, so what do we do? 416 00:20:47,360 --> 00:20:50,840 I think it's important to look at how the MachO, 417 00:20:52,460 --> 00:20:54,240 basically how the MachO is loaded in the kernel. 418 00:20:55,260 --> 00:20:57,420 So first, there's basically file segmentation, 419 00:20:58,060 --> 00:20:59,980 and the text segment is encrypted in memory. 420 00:21:00,200 --> 00:21:02,120 So what happens when you load an iPhone app? 421 00:21:03,020 --> 00:21:06,660 The kernel effectively decrypts that encrypted segment 422 00:21:06,660 --> 00:21:07,760 and maps that into memory. 423 00:21:08,740 --> 00:21:11,680 But we don't have keys to decrypt that right now. 424 00:21:12,080 --> 00:21:16,360 So if you're interested more in how this loading process works, 425 00:21:16,440 --> 00:21:18,240 I think there's a lot of rich research to be done here. 426 00:21:18,420 --> 00:21:20,960 This is all open source, available right there. 427 00:21:21,340 --> 00:21:23,820 So the question is, we're not decrypting the text segment. 428 00:21:23,820 --> 00:21:24,480 What can we see? 429 00:21:25,220 --> 00:21:26,900 The great thing is we get symbol tables, 430 00:21:27,120 --> 00:21:29,820 and almost every binary I've ever seen 431 00:21:29,820 --> 00:21:31,620 has very gratuitous symbols in it. 432 00:21:32,420 --> 00:21:34,180 So these are all in the linked edit table. 433 00:21:35,240 --> 00:21:36,380 They're all plain text. 434 00:21:36,720 --> 00:21:38,580 And the other thing we can also see is frameworks. 435 00:21:38,940 --> 00:21:42,040 So these are effectively the dynamic libraries. 436 00:21:42,900 --> 00:21:44,200 And we can actually see those, 437 00:21:44,260 --> 00:21:45,780 because those are implemented as MachO load commands, 438 00:21:45,920 --> 00:21:47,140 so we can see that all in plain text too, 439 00:21:47,200 --> 00:21:47,760 which is really nice. 440 00:21:48,220 --> 00:21:49,980 So what do we do to analyze these apps? 441 00:21:50,780 --> 00:21:52,120 First we're looking at the symbol table, 442 00:21:52,240 --> 00:21:53,180 which is defined symbols, 443 00:21:53,180 --> 00:21:55,000 which are things that are classes and methods 444 00:21:55,000 --> 00:21:56,580 you implement in your application. 445 00:21:56,980 --> 00:21:58,840 We also look at undefined references, 446 00:21:59,020 --> 00:22:00,000 so these are the things you're importing 447 00:22:00,000 --> 00:22:01,120 from the platform itself. 448 00:22:01,920 --> 00:22:03,400 And then we're looking at MachO load commands. 449 00:22:03,720 --> 00:22:05,040 And similar to what we said on Android, 450 00:22:05,180 --> 00:22:06,880 we're defining heuristics to say, 451 00:22:07,040 --> 00:22:08,980 hey, how do we know if an application 452 00:22:08,980 --> 00:22:10,340 accesses a device's contacts? 453 00:22:10,600 --> 00:22:12,980 We're looking to a reference to any of the 454 00:22:13,760 --> 00:22:15,060 address book APIs on the device. 455 00:22:15,360 --> 00:22:18,060 And like Android, we can run arbitrary analysis as well. 456 00:22:19,500 --> 00:22:21,320 So to understand what we're looking at 457 00:22:21,320 --> 00:22:22,060 and what we're not looking at, 458 00:22:22,060 --> 00:22:23,600 we're not decrypting the text section. 459 00:22:24,160 --> 00:22:27,040 And because we're not doing that, 460 00:22:27,080 --> 00:22:28,500 we can't look at dynamically loaded code. 461 00:22:28,720 --> 00:22:30,820 So for example, if you're dynamically importing frameworks, 462 00:22:31,800 --> 00:22:34,880 or you're bypassing frameworks to access things via private APIs, 463 00:22:35,140 --> 00:22:36,460 or you're downloading code at runtime, 464 00:22:36,660 --> 00:22:38,780 all of these things are probably going to get you rejected 465 00:22:38,780 --> 00:22:39,500 from the app store anyway. 466 00:22:39,800 --> 00:22:41,900 So it's probably not too impactful, 467 00:22:41,980 --> 00:22:43,340 but these are things we're looking at in the future. 468 00:22:44,600 --> 00:22:46,800 So if you didn't understand anything I said, 469 00:22:46,920 --> 00:22:47,460 here's the summary. 470 00:22:47,880 --> 00:22:50,240 We downloaded a whole bunch of Android and iPhone apps. 471 00:22:50,820 --> 00:22:51,220 Lots. 472 00:22:52,060 --> 00:22:53,200 And we built a whole bunch of analysis tools 473 00:22:53,200 --> 00:22:55,060 so we can ask really probing questions of them 474 00:22:55,060 --> 00:22:56,720 against the data set in mass. 475 00:22:58,360 --> 00:23:00,440 Oh, and we don't want to do it manually 476 00:23:00,440 --> 00:23:02,000 because I don't have nearly enough RedBull 477 00:23:02,000 --> 00:23:03,700 to go through 100,000 applications. 478 00:23:03,920 --> 00:23:04,300 We tried that. 479 00:23:05,960 --> 00:23:07,380 So we're going to go through some results, 480 00:23:07,540 --> 00:23:10,680 and we're going to do this as a series of stories. 481 00:23:11,300 --> 00:23:12,060 It should be fun. 482 00:23:12,320 --> 00:23:13,340 So the first story is, 483 00:23:13,460 --> 00:23:14,620 in the beginning there was data. 484 00:23:18,880 --> 00:23:20,260 So what happened here is 485 00:23:20,260 --> 00:23:21,500 when we first got this data set, 486 00:23:21,500 --> 00:23:22,240 we were really excited, 487 00:23:22,400 --> 00:23:24,740 and we asked a first question of, 488 00:23:24,860 --> 00:23:27,860 are there any applications that are accessing contacts on my device 489 00:23:27,860 --> 00:23:29,100 that maybe shouldn't be? 490 00:23:29,540 --> 00:23:30,280 And we were saying, 491 00:23:30,400 --> 00:23:31,760 oh yeah, we're going to find like 10 applications 492 00:23:31,760 --> 00:23:33,700 that stick out like a sore thumb. 493 00:23:33,920 --> 00:23:35,160 And it turns out that 494 00:23:35,160 --> 00:23:37,000 a very large number of applications 495 00:23:37,000 --> 00:23:38,780 access contacts on both platforms. 496 00:23:38,960 --> 00:23:40,600 And one of the motivations behind this, 497 00:23:40,660 --> 00:23:42,100 a lot of the early variants of malware, 498 00:23:42,240 --> 00:23:43,540 especially on platforms like Symbian, 499 00:23:43,600 --> 00:23:46,000 used SMS and other... 500 00:23:47,420 --> 00:23:48,220 Data spread. 501 00:23:48,360 --> 00:23:49,260 Exactly, data spread. 502 00:23:49,460 --> 00:23:51,480 So SMS, MMS would go through your contacts, 503 00:23:51,500 --> 00:23:52,340 and spread it, 504 00:23:52,360 --> 00:23:55,060 either via Bluetooth or via SMS or MMS. 505 00:23:55,400 --> 00:23:57,120 So we started going through this data, 506 00:23:57,200 --> 00:23:59,840 and we found a whole bunch of sound boards. 507 00:24:00,280 --> 00:24:02,860 You know, why does a sound board access my contacts? 508 00:24:04,320 --> 00:24:05,740 You know, I'd love it to say, 509 00:24:05,800 --> 00:24:06,880 Han Solo, you know, 510 00:24:06,880 --> 00:24:08,960 I've got a bad feeling about this whenever John calls me, 511 00:24:09,020 --> 00:24:10,320 but, you know, why? 512 00:24:11,840 --> 00:24:13,480 So we actually, you know, 513 00:24:13,480 --> 00:24:14,360 this is a disassembly. 514 00:24:14,360 --> 00:24:15,740 It's through a tool called Box Somali. 515 00:24:15,840 --> 00:24:18,180 It's a great set of disassembly tools for Android DEX files. 516 00:24:19,100 --> 00:24:20,880 And we found, you know, we have a smoking gun. 517 00:24:20,880 --> 00:24:22,080 It's accessing the contacts API, 518 00:24:22,280 --> 00:24:23,260 but what's the context? 519 00:24:23,480 --> 00:24:24,820 What's the context of all this? 520 00:24:26,340 --> 00:24:29,000 Well, turns out that it accesses contacts 521 00:24:29,000 --> 00:24:30,420 to set custom ringers. 522 00:24:30,560 --> 00:24:31,900 This is a totally legitimate use case. 523 00:24:32,620 --> 00:24:34,540 And, you know, the key message here is, 524 00:24:34,580 --> 00:24:35,640 if you look at an application, 525 00:24:35,860 --> 00:24:37,380 and it seems weird that it's accessing something, 526 00:24:37,620 --> 00:24:38,440 and you dig in, 527 00:24:38,520 --> 00:24:40,080 a lot of times it's totally legitimate. 528 00:24:40,340 --> 00:24:42,580 And if we look at the actual disassembly output, 529 00:24:42,880 --> 00:24:43,640 you know, this is... 530 00:24:43,640 --> 00:24:45,640 The access to contacts is in a method called 531 00:24:45,640 --> 00:24:47,340 assign ringtone to contact. 532 00:24:47,820 --> 00:24:48,900 Totally makes sense, right? 533 00:24:48,980 --> 00:24:50,360 If I want to add a ringtone to a contact, 534 00:24:50,360 --> 00:24:51,680 you should be able to access my contacts. 535 00:24:52,580 --> 00:24:53,900 So, what's the lesson? 536 00:24:54,800 --> 00:24:57,720 Not all apps that access sensitive data are bad. 537 00:24:57,920 --> 00:24:58,600 Just to be clear, 538 00:24:58,660 --> 00:25:01,240 not all apps that access sensitive data are bad. 539 00:25:01,520 --> 00:25:04,320 Not all apps that access sensitive data are bad. 540 00:25:04,500 --> 00:25:05,960 If you take anything away from this talk, 541 00:25:06,100 --> 00:25:06,740 please remember that. 542 00:25:08,160 --> 00:25:08,960 Story number two. 543 00:25:11,420 --> 00:25:13,520 So, we said, okay, crushing defeat. 544 00:25:13,780 --> 00:25:18,120 We didn't find anything wrong with the soundboard applications. 545 00:25:18,840 --> 00:25:19,820 But what about location? 546 00:25:19,980 --> 00:25:20,340 All right. 547 00:25:20,360 --> 00:25:22,600 So, are there any applications that are kind of using my location 548 00:25:22,600 --> 00:25:24,720 for, you know, purposes that I don't know about? 549 00:25:25,960 --> 00:25:28,460 And what does this say about mobile apps too and the direction? 550 00:25:28,800 --> 00:25:32,680 Nearly 30% of every single mobile app that we saw knows where you are. 551 00:25:32,960 --> 00:25:33,840 It's interesting. 552 00:25:35,540 --> 00:25:37,280 So, we went through a search. 553 00:25:37,640 --> 00:25:39,800 We started looking through Android and iPhone apps 554 00:25:40,180 --> 00:25:41,060 that access the location, 555 00:25:41,180 --> 00:25:41,900 similar to how we did before. 556 00:25:42,020 --> 00:25:44,280 And we went through a whole bunch of apps, 557 00:25:44,340 --> 00:25:46,380 and every single one nearly that we encountered 558 00:25:46,380 --> 00:25:49,100 that didn't seem to have a legitimate use for location, 559 00:25:49,100 --> 00:25:51,060 but that actually accessed your location, 560 00:25:51,260 --> 00:25:53,520 had a third-party advertising SDK in it. 561 00:25:53,760 --> 00:25:54,720 And this was really interesting. 562 00:25:54,820 --> 00:25:56,220 So, we dug in a little bit deeper, 563 00:25:56,280 --> 00:25:57,840 and here's what we saw. 564 00:25:58,000 --> 00:26:00,100 So, one SDK in particular, Quattro Wireless. 565 00:26:01,680 --> 00:26:04,300 In the Android emulator, you can simulate the lat-lon. 566 00:26:04,400 --> 00:26:07,500 So, you know, of course, 3.1337 is where we are. 567 00:26:07,580 --> 00:26:08,920 I think it's somewhere in the middle of the ocean somewhere. 568 00:26:09,780 --> 00:26:11,100 And we Wiresharked it. 569 00:26:11,320 --> 00:26:12,600 And look what we found. 570 00:26:12,720 --> 00:26:17,020 We found an ad request to the Quattro Wireless ad server. 571 00:26:17,420 --> 00:26:19,080 And we have the upload. 572 00:26:19,080 --> 00:26:21,200 It's a poorly-rounded version of our latitude and longitude 573 00:26:21,200 --> 00:26:22,900 sent over to the server. 574 00:26:23,140 --> 00:26:24,320 Oh, yeah, and it's plain text HTTP. 575 00:26:24,660 --> 00:26:25,300 Even better. 576 00:26:25,460 --> 00:26:25,880 Yay. 577 00:26:28,420 --> 00:26:30,680 So, we tried to zoom out a little bit and said, 578 00:26:30,760 --> 00:26:33,000 okay, well, this seems like almost every application 579 00:26:33,000 --> 00:26:35,760 that we encounter has a third-party SDK in it. 580 00:26:36,720 --> 00:26:39,360 Given if an application has a third-party SDK, 581 00:26:39,680 --> 00:26:41,800 how likely is it to access location? 582 00:26:42,280 --> 00:26:44,880 And we looked at that across some of the largest, 583 00:26:45,120 --> 00:26:47,520 you know, the most prevalent SDKs out there. 584 00:26:47,520 --> 00:26:50,520 And we found that, wow, there's a lot of SDKs 585 00:26:51,400 --> 00:26:52,160 that are accessing location. 586 00:26:52,460 --> 00:26:53,920 You notice a lot of these numbers are higher 587 00:26:53,920 --> 00:26:55,140 than the average for the platform. 588 00:26:56,340 --> 00:26:57,800 To put these numbers into context, 589 00:26:58,040 --> 00:26:59,480 I think we have to look a little bit deeper 590 00:26:59,480 --> 00:27:00,380 into how we analyze things. 591 00:27:00,800 --> 00:27:01,780 So, for example, on Android, 592 00:27:02,220 --> 00:27:03,740 if a developer brings in an SDK 593 00:27:03,740 --> 00:27:06,000 but doesn't request the location permissions, 594 00:27:06,480 --> 00:27:08,500 we don't say the app requests location 595 00:27:08,500 --> 00:27:11,140 or accesses your location because it can't. 596 00:27:11,140 --> 00:27:12,600 It doesn't have access to the APIs. 597 00:27:13,520 --> 00:27:15,220 So, you notice the Android numbers 598 00:27:15,220 --> 00:27:17,240 for the SDKs accessing location were lower. 599 00:27:17,240 --> 00:27:19,120 Our analysis takes into this account. 600 00:27:19,380 --> 00:27:21,400 So, if a developer brings in an SDK 601 00:27:21,400 --> 00:27:22,520 that tries to access location 602 00:27:22,520 --> 00:27:24,600 but doesn't actually request the location permission, 603 00:27:24,900 --> 00:27:26,380 you know, the SDK doesn't get location. 604 00:27:26,600 --> 00:27:27,800 And I think it's a big credit 605 00:27:27,800 --> 00:27:29,660 to the permission-based model on Android 606 00:27:29,660 --> 00:27:31,370 and just having user privacy in mind 607 00:27:31,800 --> 00:27:32,580 in developing that. 608 00:27:33,220 --> 00:27:36,200 And on the iPhone, it's fairly interesting. 609 00:27:36,680 --> 00:27:38,740 An application is only allowed to use location 610 00:27:38,740 --> 00:27:40,600 if there's a legitimate, 611 00:27:40,900 --> 00:27:42,000 I don't want to say legitimate, 612 00:27:42,180 --> 00:27:45,440 if there's a benefit to the user for using it. 613 00:27:45,500 --> 00:27:46,900 For example, if Steve likes it, 614 00:27:47,240 --> 00:27:47,920 if Steve likes it, yes. 615 00:27:49,380 --> 00:27:51,760 So, if your app uses location-based information, 616 00:27:52,120 --> 00:27:54,160 this actually came out as an App Store rule 617 00:27:54,160 --> 00:27:55,160 earlier this year, 618 00:27:55,560 --> 00:27:57,220 they will actually reject your application 619 00:27:57,220 --> 00:27:59,800 if it uses location only for ad serving purposes, 620 00:28:00,120 --> 00:28:01,100 which makes sense. 621 00:28:03,180 --> 00:28:04,840 And so, we've kind of looked at 622 00:28:04,840 --> 00:28:06,460 third-party code as a whole, 623 00:28:06,580 --> 00:28:09,660 and it's actually surprisingly prevalent in applications. 624 00:28:11,420 --> 00:28:12,940 And one of the messages we have is 625 00:28:12,940 --> 00:28:15,740 developers, when you're bringing in code, 626 00:28:16,560 --> 00:28:17,780 understand what it's doing, 627 00:28:17,940 --> 00:28:19,220 because a lot of times it's closed source, 628 00:28:19,440 --> 00:28:21,740 and there are a lot of novice developers 629 00:28:21,740 --> 00:28:22,780 developing mobile applications, 630 00:28:22,920 --> 00:28:23,920 and we think this is a great thing, 631 00:28:24,000 --> 00:28:25,380 because it's so easy, 632 00:28:25,460 --> 00:28:28,100 and I don't like wrestling with bad development frameworks. 633 00:28:28,920 --> 00:28:30,760 But it also brings people 634 00:28:30,760 --> 00:28:32,580 who maybe aren't experienced in development, 635 00:28:32,820 --> 00:28:34,640 and they just throw in ads to their code 636 00:28:34,640 --> 00:28:36,200 without thinking about the data they're collecting. 637 00:28:36,900 --> 00:28:40,300 And our message is that we would like developers 638 00:28:40,300 --> 00:28:43,160 to kind of understand the data 639 00:28:43,160 --> 00:28:44,740 they're gathering about their users, 640 00:28:44,740 --> 00:28:47,320 because ultimately, users trust developers. 641 00:28:47,700 --> 00:28:49,760 And as a developer, you want to be responsible 642 00:28:49,760 --> 00:28:50,780 with the data you collect, 643 00:28:50,940 --> 00:28:53,420 and to notify your users about that data you're collecting. 644 00:28:53,580 --> 00:28:55,080 One of the most common things we're seeing 645 00:28:55,080 --> 00:28:56,280 is just first-time developers. 646 00:28:56,480 --> 00:28:58,220 A lot of developers on Android and iPhone 647 00:28:58,220 --> 00:29:00,280 have never written an app before at all in their life, 648 00:29:00,360 --> 00:29:01,280 and introducing vulnerabilities 649 00:29:01,280 --> 00:29:03,300 in terms of poorly written code, 650 00:29:03,440 --> 00:29:04,980 or just bringing in a third-party SDK. 651 00:29:05,460 --> 00:29:07,260 They have no idea really what it does. 652 00:29:07,380 --> 00:29:09,920 They use one small fraction of the functionality 653 00:29:09,920 --> 00:29:11,680 and then expose all this other functionality. 654 00:29:13,480 --> 00:29:16,900 So one SDK in particular we want to tip our hat to them, 655 00:29:17,060 --> 00:29:17,640 AdMob. 656 00:29:17,800 --> 00:29:19,180 They've actually done a really good job 657 00:29:19,180 --> 00:29:21,220 in helping educate their developers 658 00:29:21,220 --> 00:29:22,780 on what data they're accessing. 659 00:29:23,280 --> 00:29:25,800 So specifically, the AdMob SDK 660 00:29:25,800 --> 00:29:28,520 defaults location collection on iPhone to false, 661 00:29:28,720 --> 00:29:30,080 and they encourage their developers 662 00:29:30,080 --> 00:29:32,720 to think about what the ramifications 663 00:29:32,720 --> 00:29:33,720 of gathering location are. 664 00:29:33,840 --> 00:29:37,480 I would love all SDKs to kind of be this up front 665 00:29:37,480 --> 00:29:38,820 and encourage their developers 666 00:29:38,820 --> 00:29:39,780 to think about things this way. 667 00:29:41,680 --> 00:29:43,180 So the lesson we learned here is 668 00:29:43,180 --> 00:29:44,840 developers don't always know what's in their apps. 669 00:29:45,220 --> 00:29:46,780 And we want to encourage people to, 670 00:29:46,880 --> 00:29:48,280 if you're developing mobile applications, 671 00:29:48,460 --> 00:29:50,380 really look closely at what sort of data 672 00:29:50,380 --> 00:29:51,480 you're collecting personally, 673 00:29:51,640 --> 00:29:53,220 and what sort of data maybe third-party libraries 674 00:29:53,220 --> 00:29:54,040 you're bringing in are collecting. 675 00:29:55,200 --> 00:29:55,960 Story number three. 676 00:29:58,540 --> 00:30:01,040 So, okay, we found SDKs, 677 00:30:01,040 --> 00:30:02,940 we found a soundboard app that turned out to be bad. 678 00:30:03,360 --> 00:30:04,580 Are there any things that are just, 679 00:30:04,680 --> 00:30:06,140 you know, somebody might install on my phone 680 00:30:06,140 --> 00:30:07,660 and do bad stuff to me? 681 00:30:07,840 --> 00:30:10,840 And so we said, okay, let's dial up our heuristics 682 00:30:11,680 --> 00:30:11,780 and see what we can do. 683 00:30:11,780 --> 00:30:13,300 Yeah, applications are accessing a ton of data. 684 00:30:13,380 --> 00:30:15,180 What app accesses every permission? 685 00:30:16,540 --> 00:30:19,380 So we found a lot of applications in the market 686 00:30:19,380 --> 00:30:20,960 that are called system utilities, 687 00:30:21,340 --> 00:30:23,160 and that's literally the text and nothing more, 688 00:30:23,320 --> 00:30:25,380 from a developer called RxS. 689 00:30:26,560 --> 00:30:29,480 The application names sound like workout plans, 690 00:30:29,700 --> 00:30:31,760 you know, Android 15x, Android 16x. 691 00:30:32,560 --> 00:30:35,520 And we see inside something shuttling code 692 00:30:35,520 --> 00:30:37,200 to mobilespilogs.com. 693 00:30:37,680 --> 00:30:38,240 And... 694 00:30:39,080 --> 00:30:39,640 Yeah. 695 00:30:41,760 --> 00:30:42,840 I don't know about you, 696 00:30:42,940 --> 00:30:44,360 whenever I see anything going to that URL 697 00:30:44,360 --> 00:30:45,160 I get a little scared. 698 00:30:46,120 --> 00:30:47,480 So, okay, we dug in. 699 00:30:47,540 --> 00:30:48,520 Here's our friend Box Molly. 700 00:30:48,700 --> 00:30:49,100 What happened? 701 00:30:49,480 --> 00:30:52,460 Get SMS details, get contact details, 702 00:30:52,780 --> 00:30:54,780 get URL details, get call contacts. 703 00:30:54,940 --> 00:30:55,740 That's a lot of data. 704 00:30:56,120 --> 00:30:57,620 What else is happening? 705 00:30:57,680 --> 00:30:59,840 Oh, this is mobilespilogs.com. 706 00:31:00,040 --> 00:31:01,800 It's a well-known purveyor 707 00:31:01,800 --> 00:31:04,460 of mobile espionage applications. 708 00:31:07,100 --> 00:31:08,480 And what they do is 709 00:31:08,480 --> 00:31:10,520 in order to install it on somebody's device, 710 00:31:13,020 --> 00:31:14,080 they basically say, 711 00:31:14,160 --> 00:31:14,900 hey, go in the market, 712 00:31:15,000 --> 00:31:16,540 search for these kind of cryptic names, 713 00:31:16,680 --> 00:31:17,980 and install that on somebody's device. 714 00:31:18,260 --> 00:31:19,280 And to be clear, you know, 715 00:31:19,280 --> 00:31:20,660 this is not something that you are likely 716 00:31:20,660 --> 00:31:21,700 going to install yourself. 717 00:31:22,060 --> 00:31:24,900 But these things are in the market 718 00:31:24,900 --> 00:31:26,640 and they're called system utilities. 719 00:31:26,840 --> 00:31:27,800 So if this is on your phone, 720 00:31:27,900 --> 00:31:29,680 you don't really have much recourse 721 00:31:29,680 --> 00:31:30,840 into knowing what it actually is. 722 00:31:32,560 --> 00:31:33,740 Another example on iPhone. 723 00:31:34,360 --> 00:31:37,140 Nicholas at Black Hat DC had a really great talk. 724 00:31:37,140 --> 00:31:39,460 He talked about a spy phone application 725 00:31:39,460 --> 00:31:41,980 and it gathered a whole bunch of applications, 726 00:31:42,340 --> 00:31:44,300 a whole bunch of data on iPhone 727 00:31:44,300 --> 00:31:46,160 using allowed APIs. 728 00:31:47,100 --> 00:31:48,120 And, you know, 729 00:31:48,160 --> 00:31:49,700 the interesting thing on iPhone is 730 00:31:49,700 --> 00:31:51,560 on Android you see the permissions 731 00:31:51,560 --> 00:31:52,720 that an application is accessing, 732 00:31:52,940 --> 00:31:55,340 but on iPhone you get the app or you don't. 733 00:31:55,400 --> 00:31:56,940 You can see location and push, 734 00:31:57,120 --> 00:31:57,760 but that's about it. 735 00:31:58,160 --> 00:31:59,400 I thought the keyboard cache 736 00:31:59,400 --> 00:32:00,780 was one of the coolest parts of that research. 737 00:32:01,040 --> 00:32:01,780 Yeah, it was great. 738 00:32:01,780 --> 00:32:03,040 So the talk's available online. 739 00:32:03,200 --> 00:32:04,260 I highly recommend checking it out. 740 00:32:04,300 --> 00:32:05,060 And the code's on GitHub, 741 00:32:05,220 --> 00:32:06,440 so you can check that out, too. 742 00:32:07,500 --> 00:32:09,840 Also, I don't know if any of you guys saw last week, 743 00:32:10,000 --> 00:32:11,660 there was a 15-year-old developer, 744 00:32:12,180 --> 00:32:13,660 literally a 15-year-old, 745 00:32:13,780 --> 00:32:16,820 that snuck a flashlight app into the iPhone market 746 00:32:17,220 --> 00:32:18,780 with a functional SOX proxy. 747 00:32:19,500 --> 00:32:21,080 Effectively, this turned it into a tethering application. 748 00:32:21,980 --> 00:32:23,540 This was accepted into the App Store. 749 00:32:24,320 --> 00:32:26,040 And, you know, once the Internet's found it, 750 00:32:26,140 --> 00:32:27,100 Apple removed it. 751 00:32:27,320 --> 00:32:28,900 And just to be clear, this is not malicious, 752 00:32:28,980 --> 00:32:31,040 but in terms of the notion that 753 00:32:31,780 --> 00:32:33,420 something is curated or looked at, 754 00:32:33,540 --> 00:32:35,620 the idea of something not being able to make it in, 755 00:32:35,640 --> 00:32:36,460 this is a perfect example. 756 00:32:36,700 --> 00:32:39,080 A flashlight app with advanced code and functionality 757 00:32:39,080 --> 00:32:39,720 made it through. 758 00:32:40,000 --> 00:32:42,120 Potentially millions of people could have downloaded this thing. 759 00:32:43,400 --> 00:32:45,280 So the lesson to be learned here is 760 00:32:45,280 --> 00:32:46,900 apps aren't always upfront about what they do. 761 00:32:47,060 --> 00:32:48,800 It's up to the user to kind of understand 762 00:32:48,800 --> 00:32:51,540 and be a savvy consumer about applications. 763 00:32:53,460 --> 00:32:55,040 Story number four, the orange wallpaper. 764 00:32:56,320 --> 00:32:57,780 So we looked at 765 00:32:57,780 --> 00:32:59,740 a whole bunch of permissions, 766 00:32:59,980 --> 00:33:01,380 but what about kind of more 767 00:33:01,780 --> 00:33:02,720 seemingly innocuous things? 768 00:33:02,940 --> 00:33:05,120 You know, your IMEI, your IMSI, your phone number. 769 00:33:05,520 --> 00:33:07,780 There are actually only a few hundred applications 770 00:33:07,780 --> 00:33:09,400 in the Android market that gather this sort of data. 771 00:33:09,660 --> 00:33:11,780 And we originally diced this data 772 00:33:11,780 --> 00:33:12,820 and said, aren't there any patterns? 773 00:33:13,240 --> 00:33:14,720 And we found that there were two developers 774 00:33:14,720 --> 00:33:17,340 that actually had a near majority 775 00:33:17,340 --> 00:33:18,800 of the applications in the market 776 00:33:18,800 --> 00:33:19,800 that accessed all these capabilities. 777 00:33:20,500 --> 00:33:21,920 And so let's dig in. What did we find? 778 00:33:23,540 --> 00:33:25,460 These are the applications from these two developers. 779 00:33:25,560 --> 00:33:27,260 So guess which one is the most popular. 780 00:33:33,040 --> 00:33:34,920 So let's download one of these applications. 781 00:33:35,420 --> 00:33:36,800 You know, I want to pimp my phone. 782 00:33:37,120 --> 00:33:38,800 So we search for a wallpaper 783 00:33:38,800 --> 00:33:39,920 once we've downloaded the app. 784 00:33:41,060 --> 00:33:41,880 Select our wallpaper. 785 00:33:42,980 --> 00:33:43,920 Phone is pimped. 786 00:33:45,380 --> 00:33:46,920 Wait, so why again 787 00:33:46,920 --> 00:33:47,820 are the wallpaper applications 788 00:33:47,820 --> 00:33:50,100 accessing my phone number, IMSI, and IMEI? 789 00:33:51,700 --> 00:33:53,520 Okay, so good friend Wireshark, 790 00:33:53,580 --> 00:33:54,680 and none of you can read this, 791 00:33:54,840 --> 00:33:56,340 but this is what happened. 792 00:33:57,340 --> 00:33:58,700 We installed the wallpaper app. 793 00:34:00,080 --> 00:34:00,520 Ponies. 794 00:34:01,980 --> 00:34:04,060 Then we saw this HTTP request 795 00:34:04,060 --> 00:34:06,100 in the clear being sent to a server. 796 00:34:06,440 --> 00:34:07,580 My SIM serial number, 797 00:34:07,760 --> 00:34:08,800 my subscriber ID, 798 00:34:09,120 --> 00:34:11,860 my phone number, and my voicemail number. 799 00:34:12,020 --> 00:34:12,460 In the clear. 800 00:34:13,700 --> 00:34:16,040 Wait, why do they need my voicemail number? 801 00:34:16,360 --> 00:34:17,580 Oh, and the interesting thing is 802 00:34:17,580 --> 00:34:18,720 on some Android phones, 803 00:34:18,920 --> 00:34:20,840 you can actually insert your password 804 00:34:20,840 --> 00:34:22,180 into the default voicemail number. 805 00:34:22,680 --> 00:34:24,920 You know, POS POS 1337. 806 00:34:25,300 --> 00:34:26,900 That's not my actual voicemail number. 807 00:34:27,000 --> 00:34:28,000 So you don't have to... 808 00:34:30,320 --> 00:34:31,760 Yeah, I'll change it after this. 809 00:34:31,780 --> 00:34:34,800 Okay, so let's dig in. 810 00:34:34,880 --> 00:34:36,760 We did some disassembly on the application, 811 00:34:37,020 --> 00:34:38,360 and we actually found that 812 00:34:38,900 --> 00:34:40,100 nearly all of these applications 813 00:34:40,100 --> 00:34:41,140 had the same class. 814 00:34:41,480 --> 00:34:42,720 And the great thing about these 815 00:34:42,720 --> 00:34:43,720 kind of app genome projects, 816 00:34:43,800 --> 00:34:45,980 we can ask this question fairly easily. 817 00:34:46,160 --> 00:34:47,680 We don't actually have to go dig in 818 00:34:47,680 --> 00:34:49,780 and manually reverse engineer every application. 819 00:34:49,880 --> 00:34:51,360 We just said, oh, yep, they all have this thing in common. 820 00:34:51,460 --> 00:34:52,040 That's kind of weird. 821 00:34:52,520 --> 00:34:53,920 So what does this service do? 822 00:34:54,880 --> 00:34:57,320 Here's an excerpt from the disassembly 823 00:34:57,320 --> 00:34:59,220 of what actually happened. 824 00:35:03,360 --> 00:35:05,800 I mean, these are all the Android APIs 825 00:35:05,800 --> 00:35:07,880 that access the data we just saw. 826 00:35:09,200 --> 00:35:10,460 So who owns the domain 827 00:35:10,460 --> 00:35:11,820 that the data was being sent to? 828 00:35:13,400 --> 00:35:13,840 Yeah. 829 00:35:15,680 --> 00:35:16,800 But of course, you know, 830 00:35:16,820 --> 00:35:18,180 nobody would ever 831 00:35:18,180 --> 00:35:19,540 download an application 832 00:35:19,540 --> 00:35:20,580 and agree to permissions 833 00:35:20,580 --> 00:35:21,260 without looking, right? 834 00:35:22,620 --> 00:35:23,460 Nobody's ever done that. 835 00:35:24,400 --> 00:35:25,860 Any guesses to how many downloads 836 00:35:26,800 --> 00:35:28,000 these applications had? 837 00:35:29,940 --> 00:35:30,380 No. 838 00:35:34,800 --> 00:35:36,000 Just to be clear, 839 00:35:36,140 --> 00:35:37,300 when we look at this app, 840 00:35:37,400 --> 00:35:38,620 and you can kick to the next slide, 841 00:35:39,780 --> 00:35:41,380 the information being collected 842 00:35:41,380 --> 00:35:42,760 isn't necessarily malicious, 843 00:35:43,020 --> 00:35:43,940 but you have to ask yourself, 844 00:35:44,140 --> 00:35:45,840 do users actually understand 845 00:35:45,840 --> 00:35:46,980 that when they're downloading 846 00:35:46,980 --> 00:35:48,080 a wallpaper application 847 00:35:48,080 --> 00:35:49,380 that their phone number, 848 00:35:49,560 --> 00:35:50,440 their voicemail number, 849 00:35:50,540 --> 00:35:51,400 and potentially their password, 850 00:35:51,520 --> 00:35:53,000 their IMEI and IMZ number, 851 00:35:53,160 --> 00:35:54,440 which can be used to get course location, 852 00:35:54,620 --> 00:35:56,500 is being recorded? I think not. 853 00:36:01,780 --> 00:36:02,440 If this isn't malicious, 854 00:36:02,820 --> 00:36:04,300 you're potentially compromising 855 00:36:04,300 --> 00:36:05,340 the privacy of your users. 856 00:36:05,700 --> 00:36:06,220 Think about this. 857 00:36:06,280 --> 00:36:07,140 If you're at a coffee shop 858 00:36:07,140 --> 00:36:09,120 and you're on a Wi-Fi hotspot 859 00:36:09,120 --> 00:36:10,100 with your Droid, for example, 860 00:36:10,240 --> 00:36:12,460 all this information is being sent in the clear. 861 00:36:12,540 --> 00:36:13,400 If you did this at DEFCON, 862 00:36:13,540 --> 00:36:14,920 your IMZ, all this stuff, 863 00:36:14,980 --> 00:36:15,800 would be up on the wall of sheep. 864 00:36:16,000 --> 00:36:16,880 I mean, it's ridiculous. 865 00:36:17,700 --> 00:36:19,820 And so the claim from the developer 866 00:36:19,820 --> 00:36:21,680 is that the phone number was being collected 867 00:36:21,680 --> 00:36:23,340 to preserve favorites across devices. 868 00:36:31,780 --> 00:36:33,000 They're taking down from the market 869 00:36:33,000 --> 00:36:34,280 until they reach a decision. 870 00:36:34,480 --> 00:36:35,920 So it'll be interesting to see what happens with this. 871 00:36:37,200 --> 00:36:38,720 So what's the lesson here? 872 00:36:40,440 --> 00:36:40,880 Applications, 873 00:36:41,100 --> 00:36:42,380 if they have capabilities, 874 00:36:42,700 --> 00:36:44,620 if they request permissions, 875 00:36:45,060 --> 00:36:46,500 as a user, you should assume 876 00:36:46,500 --> 00:36:47,480 they're actually accessing them. 877 00:36:49,520 --> 00:36:52,120 So summary of the lessons we learned today, 878 00:36:52,300 --> 00:36:53,880 just so if you guys take something home. 879 00:36:54,600 --> 00:36:56,260 First, I really want to underscore 880 00:36:56,260 --> 00:36:57,560 that simply if an app 881 00:36:58,220 --> 00:36:59,240 accesses sensitive data, 882 00:36:59,360 --> 00:37:00,380 it doesn't mean it's bad. 883 00:37:01,780 --> 00:37:02,820 There are totally legitimate reasons, 884 00:37:03,020 --> 00:37:05,140 and actually that's the power of mobile operating systems, 885 00:37:05,200 --> 00:37:06,580 that we can access this sensitive data, 886 00:37:06,680 --> 00:37:07,740 we can have powerful apps, 887 00:37:07,940 --> 00:37:09,780 and it's an interesting question as to 888 00:37:09,780 --> 00:37:12,880 whether a given access to sensitive data 889 00:37:12,880 --> 00:37:15,140 is something you as a user want or not. 890 00:37:16,260 --> 00:37:17,240 Secondarily, developers, 891 00:37:17,560 --> 00:37:19,220 if you're in the audience, 892 00:37:19,460 --> 00:37:22,120 you may not always know what's in your apps, 893 00:37:22,280 --> 00:37:23,100 please pay attention 894 00:37:23,660 --> 00:37:25,340 and only put things 895 00:37:25,340 --> 00:37:26,920 that you actually want in there. 896 00:37:27,340 --> 00:37:28,300 Third, applications, 897 00:37:28,880 --> 00:37:30,380 they're not always upfront about what they do, 898 00:37:31,780 --> 00:37:32,960 they're always to basically extract 899 00:37:32,960 --> 00:37:34,380 what applications are actually doing 900 00:37:34,380 --> 00:37:36,000 and help users understand 901 00:37:36,000 --> 00:37:37,800 what's actually going on under the hood. 902 00:37:38,060 --> 00:37:40,040 And third, be careful what you download. 903 00:37:41,300 --> 00:37:43,640 Applications, Android is a great example, 904 00:37:43,800 --> 00:37:44,940 you can actually see 905 00:37:44,940 --> 00:37:46,040 what an application is doing, 906 00:37:46,180 --> 00:37:47,160 so just look at that 907 00:37:47,160 --> 00:37:49,080 and assume that if an application 908 00:37:49,080 --> 00:37:50,460 accesses something that's for a reason, 909 00:37:51,460 --> 00:37:53,080 and it's up to you as a user 910 00:37:53,080 --> 00:37:55,180 to choose whether you accept that reason or not. 911 00:37:57,240 --> 00:38:00,080 Right, so just imagine what's in the wild. 912 00:38:00,200 --> 00:38:01,040 So hypothetically, 913 00:38:01,780 --> 00:38:02,780 the power of this project, 914 00:38:02,960 --> 00:38:04,020 as Kevin talked about, 915 00:38:04,140 --> 00:38:05,540 is we have a vulnerability, 916 00:38:05,880 --> 00:38:08,060 we now have the ability to ask a question 917 00:38:08,060 --> 00:38:09,580 about all the apps in the marketplace 918 00:38:09,580 --> 00:38:12,280 and say, is this code existent in other places, 919 00:38:12,500 --> 00:38:14,700 is this type of capability existent in other places, 920 00:38:14,860 --> 00:38:16,640 and being able to instantly find this. 921 00:38:16,740 --> 00:38:18,760 So when Kevin and I initially were looking at this stuff, 922 00:38:18,900 --> 00:38:20,460 we saw the one wallpaper app 923 00:38:20,460 --> 00:38:22,300 and we said, oh, 50,000 people had downloaded this, 924 00:38:22,380 --> 00:38:23,000 this looks interesting. 925 00:38:23,160 --> 00:38:25,060 The way we were able to see that it was, what, 926 00:38:25,080 --> 00:38:26,740 76 plus 8 apps in total, 927 00:38:26,860 --> 00:38:29,420 and between 1.1 and 4.6 million downloads, 928 00:38:31,780 --> 00:38:32,320 we were able to then say, 929 00:38:32,420 --> 00:38:34,180 okay, this one piece of data we found, 930 00:38:34,280 --> 00:38:35,840 how do we look at all of the data 931 00:38:35,840 --> 00:38:36,860 and the mobile app environment, 932 00:38:37,140 --> 00:38:38,720 and we think this is going to be the beginning 933 00:38:38,720 --> 00:38:41,180 of some really advanced new security response tools. 934 00:38:41,640 --> 00:38:42,380 Yeah, I mean, 935 00:38:42,400 --> 00:38:45,180 if you ask how you would know 936 00:38:45,180 --> 00:38:46,640 how many applications on Windows 937 00:38:46,640 --> 00:38:49,040 would access a given vulnerability, 938 00:38:50,320 --> 00:38:51,400 it's almost impossible. 939 00:38:52,700 --> 00:38:53,900 So we're going to, 940 00:38:54,540 --> 00:38:55,760 we're just about finished here. 941 00:38:56,260 --> 00:38:58,380 I think three things that are really important, 942 00:38:59,140 --> 00:39:00,860 application models are probably going to remove 943 00:39:01,780 --> 00:39:02,300 a lot of apps from the market, 944 00:39:03,060 --> 00:39:05,600 but as we've seen with a lot of apps we've talked about today, 945 00:39:05,680 --> 00:39:06,480 there's context dependence. 946 00:39:06,940 --> 00:39:09,380 It's hard to say whether something's good or bad, 947 00:39:11,000 --> 00:39:12,860 especially if it looks good today, 948 00:39:13,000 --> 00:39:14,320 and maybe you get, you know, 949 00:39:14,340 --> 00:39:16,480 a whole bunch of people to download it, 950 00:39:16,540 --> 00:39:18,160 and then it turns bad later. 951 00:39:18,280 --> 00:39:19,100 For example, if it updates, 952 00:39:19,180 --> 00:39:21,200 imagine, easiest way to get malware on a million phones 953 00:39:21,200 --> 00:39:22,260 is to release a game for free, 954 00:39:22,380 --> 00:39:23,840 get a million people to download it, 955 00:39:23,900 --> 00:39:25,320 then update it with some bad code, 956 00:39:25,420 --> 00:39:29,140 or flip a bit on the server and execute code dynamically. 957 00:39:29,800 --> 00:39:31,560 And these are going to be some really interesting problems 958 00:39:31,780 --> 00:39:32,580 that we have to deal with with App Store. 959 00:39:32,700 --> 00:39:33,620 And just a final point, 960 00:39:33,680 --> 00:39:36,680 the future of mobile security is not going to be PC like viruses, 961 00:39:36,740 --> 00:39:38,180 it is going to be in this gray area, 962 00:39:38,300 --> 00:39:39,640 and we're going to be seeing more and more of this. 963 00:39:39,800 --> 00:39:41,260 So pay attention to what you download, 964 00:39:41,480 --> 00:39:44,740 developers be responsible about how you're developing your apps, 965 00:39:44,840 --> 00:39:45,620 and administrators, 966 00:39:46,060 --> 00:39:47,440 don't feel like you have to ban apps, 967 00:39:47,560 --> 00:39:49,980 just make sure your users know what is happening 968 00:39:49,980 --> 00:39:52,260 in the context of their mobile experience. 969 00:39:53,480 --> 00:39:54,580 So we want to thank everyone, 970 00:39:54,740 --> 00:39:55,960 and thanks to Google.