1 00:00:00,000 --> 00:00:07,920 Good morning, ladies and gentlemen. How is everything going? Today, I'm going to show 2 00:00:07,920 --> 00:00:16,800 you a security risk which I discovered is possible on Android system. It's an APK file 3 00:00:16,800 --> 00:00:26,860 infection on Android system. My name is Bob Pan. I'm a Chinese. I wrote Daxujia. Maybe 4 00:00:26,860 --> 00:00:37,620 some of you know me through my work, and I work for China Micro. I focus on the research 5 00:00:37,620 --> 00:00:51,840 on mobile security. I love my job. Yeah. Okay. When Android has been designed, Google certainly 6 00:00:52,710 --> 00:00:54,820 has security in mind. 7 00:00:55,580 --> 00:00:56,360 Now 8 00:00:56,360 --> 00:01:08,080 we start from three announcement that Google made to show Android is safe. Okay. The first 9 00:01:08,870 --> 00:01:18,100 was announced in March 2011 because some bad guys play some bad application on the Google 10 00:01:18,100 --> 00:01:25,520 market. So Google throws a kill switch on Android phones. 11 00:01:25,520 --> 00:01:36,080 And they showed their power by removing 50 in fact blade of bad applications. And then 12 00:01:37,260 --> 00:01:47,460 Christie Bunu from Google made a statement shocked the world. Ms. Christie said Android 13 00:01:47,460 --> 00:01:55,440 is safe. Antivirus companies are scammers. And they should be ashamed of themselves. 14 00:01:55,520 --> 00:02:17,200 themselves. Oh, those are really strong words. And then on February 2002, 2012, sorry. Also, 15 00:02:17,200 --> 00:02:26,500 Google said Android staff says themselves had a new layer to the security of the Android, 16 00:02:26,820 --> 00:02:35,500 the Google bouncer. The Google bouncer performs a set of analysis of everything of the Google 17 00:02:35,500 --> 00:02:44,900 market and the Google said downloading are decreasing. After reading this I am sad. 18 00:02:45,120 --> 00:02:47,180 BY limitation you have to be professional. beş�� 19 00:02:47,180 --> 00:02:56,640 I found Android is safe, no antivirus company I needed, I'm going to lose my job. 20 00:02:56,760 --> 00:02:57,840 Oh, shit. 21 00:03:02,940 --> 00:03:10,720 But after I looked into applications on the market, I found my job is safe 22 00:03:10,720 --> 00:03:23,800 because there are a lot of bad applications still there with a lot of downloads, so Google 23 00:03:23,800 --> 00:03:25,260 Bonsai is inactive. 24 00:03:25,740 --> 00:03:37,780 And this is a blog I published in May 3rd, highlights the list of bad applications and 25 00:03:38,830 --> 00:03:40,140 according to the date. 26 00:03:40,140 --> 00:03:47,920 From China Micro, the malware will be more and more and more this year, why? 27 00:03:48,400 --> 00:03:58,040 Because a famous system like Android will be targeted by real scammers, everyone knows 28 00:03:58,040 --> 00:03:58,220 it. 29 00:04:00,220 --> 00:04:03,000 So where is the challenge? 30 00:04:04,200 --> 00:04:09,040 Experience test, challenge is to explore the system. 31 00:04:09,040 --> 00:04:16,180 And only through exploring the system, we can find a way to protect the system. 32 00:04:16,960 --> 00:04:20,200 So let's look inside the system. 33 00:04:22,400 --> 00:04:30,100 I want to show you what happens to me and how I find the security risk. 34 00:04:31,900 --> 00:04:39,020 Actually, this year on March 1 day, I was playing a game on my computer. 35 00:04:39,040 --> 00:04:48,300 My mobile on my Android phone, and the advertisement popped up on my screen, I had it, so I'm going 36 00:04:48,300 --> 00:04:59,460 to remove it, and then I look inside the APK files, and I found APKs, I signed the 37 00:04:59,460 --> 00:05:04,720 zip files, it contains the Android manifest.xml. 38 00:05:05,200 --> 00:05:08,860 We can find the package name, version, definition. 39 00:05:08,860 --> 00:05:13,060 For the service, activities, receivers, whatever. 40 00:05:13,620 --> 00:05:20,680 And the classes.exe, we can find the code for the DAVIC version machine. 41 00:05:21,840 --> 00:05:28,400 And the meta info photo, we can find the certificate and signature there. 42 00:05:30,420 --> 00:05:35,640 So let's look deeper into the Android manifest file. 43 00:05:36,940 --> 00:05:38,840 It's a Google-defined application. 44 00:05:38,860 --> 00:05:43,820 It's an XML file, Google-defined, but not documented. 45 00:05:44,540 --> 00:05:50,880 So we have to find it by ourselves, we can read the source code there. 46 00:05:51,600 --> 00:06:03,560 And there are many tools can read this, but all of them are limited, and we must do modification 47 00:06:03,560 --> 00:06:07,960 on it to make it suitable for the Android system. 48 00:06:08,860 --> 00:06:16,080 And the DAX file is in DAVIC-executed format, this time Google-defined, and then document. 49 00:06:16,380 --> 00:06:16,600 Yeah. 50 00:06:16,720 --> 00:06:27,660 We can find the format on the Android website, yeah, and a lot of tools can modify it. 51 00:06:28,180 --> 00:06:35,520 I personally like the ASM DAX, it's well-documented and have a nice API. 52 00:06:36,800 --> 00:06:38,800 And smiley-back-smiley. 53 00:06:38,860 --> 00:06:41,560 DAX makers are also good. 54 00:06:42,260 --> 00:06:52,880 When I was modifying an application on my Android phone, using the ASM DAX, I got an 55 00:06:52,880 --> 00:06:54,680 out-of-memory exception. 56 00:06:55,600 --> 00:07:03,860 Then I Googled it, and I found APKs can only use 16 to 32 megabytes of memory. 57 00:07:04,120 --> 00:07:05,460 It is limited. 58 00:07:06,580 --> 00:07:08,620 And it's not enough. 59 00:07:08,800 --> 00:07:08,840 Yeah. 60 00:07:08,860 --> 00:07:15,920 It's not enough for the ASM DAX to modify a DX, so we must do in a clever way. 61 00:07:16,480 --> 00:07:25,500 And as last, I find by start a separated DAVIC version machine, we can bypass the limitation. 62 00:07:27,220 --> 00:07:27,900 Okay. 63 00:07:28,040 --> 00:07:30,640 The last is the meta-info photo. 64 00:07:31,560 --> 00:07:34,920 It is designed by the Sun Microsystem. 65 00:07:35,060 --> 00:07:36,000 Now it's Oracle. 66 00:07:36,220 --> 00:07:38,520 So we can find... 67 00:07:38,520 --> 00:07:42,060 It's a document from the Oracle's website. 68 00:07:42,680 --> 00:07:51,920 And tools like Jarsign from the JDK and the Sun APK from Android source can generate it. 69 00:07:52,480 --> 00:08:00,240 But the Sun APK, we have the source, but it is dependent on the complement only available 70 00:08:00,910 --> 00:08:03,780 on the Oracle Java version machine. 71 00:08:03,980 --> 00:08:08,500 So to make it runable on Android platform, it's not necessary. 72 00:08:08,500 --> 00:08:13,560 We have to do small modification to replace the dependence. 73 00:08:14,340 --> 00:08:14,920 Okay. 74 00:08:16,740 --> 00:08:33,200 I put the previews together and build my advertisement remover, and then I show the remover to my 75 00:08:33,200 --> 00:08:34,020 team-mates. 76 00:08:34,280 --> 00:08:36,220 They said, oh, shit. 77 00:08:36,660 --> 00:08:38,480 If we don't have the remover, we can't use it. 78 00:08:38,480 --> 00:08:44,000 If the bad guy got this technology, they can build a virus. 79 00:08:47,040 --> 00:08:55,240 So I look inside code again and build a proof of sound concept virus. 80 00:08:57,020 --> 00:09:04,660 It can work on Android without root or without any exploit. 81 00:09:05,660 --> 00:09:08,120 So it's time to see. 82 00:09:08,220 --> 00:09:08,460 Okay. 83 00:09:08,480 --> 00:09:10,240 So the magic... 84 00:09:11,800 --> 00:09:19,800 So Tom, the cat, has an Android phone, and he install Hello World on his device. 85 00:09:22,800 --> 00:09:32,300 One day, he get a short message from the mouse Jerry, and Jerry ask Tom to install 86 00:09:33,020 --> 00:09:35,660 a new version of Dropbox. 87 00:09:35,880 --> 00:09:37,480 And Tom downloaded. 88 00:09:38,940 --> 00:09:41,700 Then he install it. 89 00:09:42,920 --> 00:09:43,880 Yeah. 90 00:09:44,020 --> 00:09:46,280 So Dropbox is actually a virus. 91 00:09:46,780 --> 00:09:53,060 It will try to infect us applications on the device. 92 00:09:55,840 --> 00:09:58,560 So let's open the Dropbox. 93 00:10:00,860 --> 00:10:01,820 Yeah. 94 00:10:01,840 --> 00:10:04,300 It's actually just seems... 95 00:10:04,300 --> 00:10:05,500 Looks like... 96 00:10:06,180 --> 00:10:08,020 Same with the original. 97 00:10:08,200 --> 00:10:08,460 Yeah. 98 00:10:08,480 --> 00:10:08,580 Same with the new one. 99 00:10:08,740 --> 00:10:10,700 So let's forget about the Dropbox. 100 00:10:10,920 --> 00:10:21,740 Now Tom get an application update for the Hello World, and it prompt him to uninstall 101 00:10:21,740 --> 00:10:29,140 the previous Hello World, okay, and install the new Hello World. 102 00:10:32,600 --> 00:10:33,280 Okay. 103 00:10:33,380 --> 00:10:35,460 Now let's open the new Hello World. 104 00:10:36,280 --> 00:10:36,620 Yeah. 105 00:10:36,620 --> 00:10:38,980 We got to use this app. 106 00:10:39,140 --> 00:10:40,680 You must pay me bar bar dollar. 107 00:10:40,880 --> 00:10:45,360 I don't want to pay, so I click no, and a school on my screen. 108 00:10:45,560 --> 00:10:46,540 Oh, I hate it. 109 00:10:48,080 --> 00:10:54,700 And then we start again, and we want to use the original Hello World, so we have to pay 110 00:10:54,700 --> 00:10:55,240 for the money. 111 00:10:57,040 --> 00:10:57,600 Okay. 112 00:10:57,640 --> 00:11:05,120 This is actually a virus, and this technology can hijack an APK. 113 00:11:05,200 --> 00:11:05,760 Okay. 114 00:11:06,040 --> 00:11:06,600 Okay. 115 00:11:06,600 --> 00:11:08,520 So to use... 116 00:11:10,780 --> 00:11:23,720 So how this works, I split this into two part, part A and part B. Part A is the payload 117 00:11:23,720 --> 00:11:24,540 of the virus. 118 00:11:24,840 --> 00:11:33,000 Its duty is to extract and load part B. Part B is the payload of the virus. 119 00:11:33,640 --> 00:11:35,660 It will try to find... 120 00:11:35,660 --> 00:11:36,500 Okay. 121 00:11:36,500 --> 00:11:44,800 And then APK inject part A into the APK, and copy itself, the part B, into the APK. 122 00:11:46,860 --> 00:11:57,800 Because the APK is modified, so part B will try to resign the APK, and at last, part B 123 00:11:57,800 --> 00:12:02,700 will promote the user to install the infected APK. 124 00:12:03,600 --> 00:12:04,340 So. 125 00:12:04,340 --> 00:12:15,740 When a virus begins, it starts part A, and part A starts part B. Part B infects another 126 00:12:15,740 --> 00:12:24,400 application, and when another application starts, the virus begins again. 127 00:12:24,680 --> 00:12:28,160 So part A, part B, again and again. 128 00:12:28,340 --> 00:12:28,600 Yes. 129 00:12:28,600 --> 00:12:30,940 This is truly a virus. 130 00:12:32,220 --> 00:12:32,720 Okay. 131 00:12:33,640 --> 00:12:34,320 Thank you. 132 00:12:38,040 --> 00:12:38,960 Thank you. 133 00:12:40,880 --> 00:12:50,840 Today, I flew from China to United States to talk about the security of NGO system. 134 00:12:51,920 --> 00:12:56,360 There are certainly security risk on NGO system. 135 00:12:56,620 --> 00:13:04,200 I hope by talking about the risk, the community can join. 136 00:13:04,300 --> 00:13:13,280 together to solve it. And we are looking forward to work with anybody to make Android safe. 137 00:13:13,880 --> 00:13:14,420 Thank you.