{"id":459,"date":"2018-01-02T20:17:54","date_gmt":"2018-01-03T01:17:54","guid":{"rendered":"http:\/\/jebware.com\/blog\/?p=459"},"modified":"2018-01-15T16:22:17","modified_gmt":"2018-01-15T21:22:17","slug":"reverse-engineering-the-fake-haven-apps","status":"publish","type":"post","link":"https:\/\/jebware.com\/blog\/?p=459","title":{"rendered":"Reverse-engineering the fake Haven apps"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"wp-image-460 alignright\" src=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-01-02-at-2.49.57-PM.png\" alt=\"\" width=\"319\" height=\"244\" \/><\/p>\n<p>As happens with successful and interesting apps, somebody made impostor copies of <a href=\"https:\/\/github.com\/guardianproject\/haven\">the Guardian Project&#8217;s Haven app<\/a>, which got a lot of press due in part to <a href=\"https:\/\/www.wired.com\/story\/snowden-haven-app-turns-phone-into-home-security-system\/\">Edward Snowden&#8217;s involvement<\/a>.\u00a0 As of this writing, the copycat has a dozen listings on the Play Store, all with little variations in the name.\u00a0\u00a0(Hat tip to <a href=\"https:\/\/twitter.com\/rettiwtkrow\/status\/948243625539928064\">@rettiwtkrow<\/a>, whose tweet was the first I saw of it).<\/p>\n<p>Interestingly, the fake apps have a\u00a0<em>slightly<\/em> different icon from the real app.\u00a0 Below is the real app&#8217;s icon on the left, and the fake app on the right.<\/p>\n<p><a href=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2018\/01\/icons-combined.png\"><img loading=\"lazy\" class=\"size-full wp-image-478 aligncenter\" src=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2018\/01\/icons-combined.png\" alt=\"\" width=\"384\" height=\"192\" \/><\/a>I downloaded half a dozen of these copycats and started reverse-engineering them.\u00a0 The copycats are all the same as each other, only the package name changes.\u00a0 But they&#8217;re all completely different from the real app.\u00a0 I wondered at first if they might have ripped off the real app&#8217;s code since <a href=\"https:\/\/github.com\/guardianproject\/haven\">it&#8217;s open source<\/a>, but no.<\/p>\n<p>When you open the fake, it&#8217;s immediately clear that they&#8217;re just using the name to drive downloads, and the functionality of the app isn&#8217;t even trying to look real.\u00a0 It&#8217;s a run-of-the-mill crapware &#8220;cleaner&#8221; app.<\/p>\n<p>It has a tab bar across the bottom, and each tab is a different tool: &#8220;Charge Booster&#8221;, &#8220;Battery Saver&#8221;, &#8220;CPU Cooler&#8221;, and &#8220;Junk Cleaner&#8221;.\u00a0\u00a0<span class=\"emoji\">\u00a0\u00a0They show some made-up stats about the device, and make promises they can&#8217;t deliver.\u00a0 For the most part, as you run one of these tools, it displays an animation (that isn&#8217;t actually tied to any real work being done), and then a full-screen ad.\u00a0 After one tool, I was presented with a fake Facebook sign-up page.<\/span><\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-461\" src=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2018\/01\/0-first-screen.png\" alt=\"\" width=\"180\" height=\"320\" \/>\u00a0 \u00a0<img loading=\"lazy\" class=\"alignnone wp-image-463\" src=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2018\/01\/ezgif-3-0dd45d83be.gif\" alt=\"\" width=\"180\" height=\"320\" \/>\u00a0 \u00a0<img loading=\"lazy\" class=\"alignnone wp-image-464\" src=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2018\/01\/5-fake-facebook-signup.png\" alt=\"\" width=\"180\" height=\"320\" \/><\/p>\n<p>If you try to apply the &#8220;Ultra Power Saving Mode&#8221; it sends you to the OS settings app to enable &#8220;Allow modify system settings&#8221;.\u00a0 I found this alarming, and assumed this is where I would find the nefarious code.\u00a0 So I decompiled the app and poked around, and was honestly pretty underwhelmed.<\/p>\n<p><a href=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2018\/01\/6-system-settings.png\"><img loading=\"lazy\" class=\"wp-image-467 alignleft\" src=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2018\/01\/6-system-settings.png\" alt=\"\" width=\"180\" height=\"320\" \/><\/a><\/p>\n<p>I should note that the impostor app&#8217;s targetSdk is 24,\u00a0meaning it has to ask for permissions at runtime, which is nice and a little surprising, given that Google <a href=\"https:\/\/android-developers.googleblog.com\/2017\/12\/improving-app-security-and-performance.html\">isn&#8217;t yet forcing developers to do so<\/a>.<\/p>\n<p>Anyway, I need not have worried &#8211;\u00a0after you grant this app the ability to modify system settings, all it does is turn down your screen brightness, disable autorotation, and disable background syncing for other apps.<\/p>\n<p><a href=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2018\/01\/3dDoge.gif\"><img loading=\"lazy\" class=\"wp-image-466 alignright\" src=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2018\/01\/3dDoge.gif\" alt=\"\" width=\"100\" height=\"76\" \/><\/a><\/p>\n<p style=\"text-align: right;\">(such battery savings. many mAh. very wow)<\/p>\n<p><a href=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-01-02-at-3.50.20-PM.png\"><img loading=\"lazy\" class=\"alignleft wp-image-469\" src=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-01-02-at-3.50.20-PM.png\" alt=\"\" width=\"250\" height=\"52\" \/><\/a>Then I got a little worried again when I saw the app has a BroadcastReceiver that runs immediately when the app is installed or updated.\u00a0 This means the app has code that runs in the background even if you never open the app.\u00a0 But again, I shouldn&#8217;t have worried because all it does is try to show a toast message saying &#8220;[app] Is Optimized by Fast Cleaner &amp; Battery Saver.&#8221;<\/p>\n<p>The bottom line is that these copycats appear to be using the Haven name and publicity just to drive downloads, then make a quick buck off of advertising.\u00a0 I couldn&#8217;t find any evidence of anything more sinister than that.<\/p>\n<p>For my last point, let&#8217;s talk about attribution. I can&#8217;t say for <em>sure<\/em>, but I have an educated guess where this came from.\u00a0 There&#8217;s an app which is almost entirely the same code on the Google Play store.\u00a0 Unlike the Haven copycats, this app has accurate\u00a0<a href=\"https:\/\/play.google.com\/store\/apps\/details?id=fast.cleaner.battery.saver\">screenshots on the Play Store<\/a>, and the UI matches the Haven impostors.\u00a0 Either this is the same developer, or it&#8217;s a false flag.\u00a0 I can&#8217;t rule that out, so I&#8217;m not saying this with 100% confidence, but a preponderance of the evidence surely doesn&#8217;t look good for that developer.<\/p>\n<p><a href=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-01-02-at-2.50.19-PM.png\"><img loading=\"lazy\" class=\"aligncenter wp-image-472\" src=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-01-02-at-2.50.19-PM.png\" alt=\"\" width=\"480\" height=\"238\" \/><\/a><\/p>\n<p>I assume Google will be along shortly to remove the offending copycats (and hopefully terminate their ad accounts, and the rest of their apps under both publisher listings).\u00a0 But it&#8217;s an important reminder that copycats exist, and it&#8217;s important to remain vigilant.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As happens with successful and interesting apps, somebody made impostor copies of the Guardian Project&#8217;s Haven app, which got a lot of press due in part to Edward Snowden&#8217;s involvement.\u00a0 As of this writing, the copycat has a dozen listings on the Play Store, all with little variations in the name.\u00a0\u00a0(Hat tip to @rettiwtkrow, whose &hellip; <a href=\"https:\/\/jebware.com\/blog\/?p=459\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Reverse-engineering the fake Haven apps&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"twitterCardType":"summary_large_image","cardImageID":0,"cardImage":"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-01-02-at-2.49.57-PM.png","cardTitle":"","cardDesc":"","cardImageAlt":"","cardPlayer":"","cardPlayerWidth":0,"cardPlayerHeight":0,"cardPlayerStream":"","cardPlayerCodec":""},"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/459"}],"collection":[{"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=459"}],"version-history":[{"count":10,"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/459\/revisions"}],"predecessor-version":[{"id":481,"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/459\/revisions\/481"}],"wp:attachment":[{"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=459"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}