Securing your Mobile Applications. Karson Chan Security Consultant



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

KASPERSKY SECURITY INTELLIGENCE SERVICES. EXPERT SERVICES.

ETHICAL HACKING APPLICATIO WIRELESS110 00NETWORK APPLICATION MOBILE MOBILE0001

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

Securing Your Web Application against security vulnerabilities. Ong Khai Wei, IT Specialist, Development Tools (Rational) IBM Software Group

Enterprise Application Security Workshop Series

Where every interaction matters.

05.0 Application Development

The Top Web Application Attacks: Are you vulnerable?

Cloud Security:Threats & Mitgations

How to start a software security initiative within your organization: a maturity based and metrics driven approach OWASP

How Security Testing can ensure Your Mobile Application Security. Yohannes, CEHv8, ECSAv8, ISE, OSCP(PWK) Information Security Consultant

Network Test Labs (NTL) Software Testing Services for igaming

Passing PCI Compliance How to Address the Application Security Mandates

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

Mobile Application Security

Elevation of Mobile Security Risks in the Enterprise Threat Landscape

PCI COMPLIANCE REQUIREMENTS COMPLIANCE CALENDAR

What s Wrong with Information Security Today? You are looking in the wrong places for the wrong things.

Rational AppScan & Ounce Products

Information Security Services

WEB SITE SECURITY. Jeff Aliber Verizon Digital Media Services

Defending Behind The Device Mobile Application Risks

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

Building a Mobile App Security Risk Management Program. Copyright 2012, Security Risk Advisors, Inc. All Rights Reserved

CYBERTRON NETWORK SOLUTIONS

Society for Information Management

Threat Intelligence Pty Ltd Specialist Security Training Catalogue

Redhawk Network Security, LLC Layton Ave., Suite One, Bend, OR

Detecting Web Application Vulnerabilities Using Open Source Means. OWASP 3rd Free / Libre / Open Source Software (FLOSS) Conference 27/5/2008

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

PCI-DSS and Application Security Achieving PCI DSS Compliance with Seeker

10 Smart Ideas for. Keeping Data Safe. From Hackers

Cyber Exploits: Improving Defenses Against Penetration Attempts

Guideline on Safe BYOD Management

WEB SECURITY CONCERNS THAT WEB VULNERABILITY SCANNING CAN IDENTIFY

IT Security & Compliance. On Time. On Budget. On Demand.

3. Broken Account and Session Management. 4. Cross-Site Scripting (XSS) Flaws. Web browsers execute code sent from websites. Account Management

Arrow ECS University 2015 Radware Hybrid Cloud WAF Service. 9 Ottobre 2015

Mobile Application Security Sharing Session May 2013

Device Hardening, Vulnerability Remediation and Mitigation for Security Compliance

EC-Council CAST CENTER FOR ADVANCED SECURITY TRAINING. CAST 619 Advanced SQLi Attacks and Countermeasures. Make The Difference CAST.

OWASP Top Ten Tools and Tactics

BUILDING AN OFFENSIVE SECURITY PROGRAM BUILDING AN OFFENSIVE SECURITY PROGRAM

Reducing Application Vulnerabilities by Security Engineering

PREVENTING ZERO-DAY ATTACKS IN MOBILE DEVICES

THE SMARTEST WAY TO PROTECT WEBSITES AND WEB APPS FROM ATTACKS

Penta Security 3rd Generation Web Application Firewall No Signature Required.

Defending Against Data Beaches: Internal Controls for Cybersecurity

Adobe Systems Incorporated

Kenna Platform Security. A technical overview of the comprehensive security measures Kenna uses to protect your data

Compliance. Review. Our Compliance Review is based on an in-depth analysis and evaluation of your organization's:

How to Secure Your Environment

A Case for Managed Security

How to complete the Secure Internet Site Declaration (SISD) form

Defending Against Attacks by Modeling Threat Behaviors

locuz.com Professional Services Security Audit Services

ensuring security the way how we do it

Threat Modeling. Frank Piessens ) KATHOLIEKE UNIVERSITEIT LEUVEN

WEB APPLICATION FIREWALLS: DO WE NEED THEM?

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

ITAR Compliance Best Practices Guide

2015 VORMETRIC INSIDER THREAT REPORT

CompTIA Mobile App Security+ Certification Exam (Android Edition) Live exam ADR-001 Beta Exam AD1-001

2012 Data Breach Investigations Report

Practice Good Enterprise Security Management. Presented by Laurence CHAN, MTR Corporation Limited

From Rivals to BFF: WAF & VA Unite OWASP The OWASP Foundation

PCI Assessments 3.0 What Will the Future Bring? Matt Halbleib, SecurityMetrics

Presented by Evan Sylvester, CISSP

End-user Security Analytics Strengthens Protection with ArcSight

External Supplier Control Requirements

Network Security. Intertech Associates, Inc.

SECURITY. Risk & Compliance Services

PCI Data Security Standard 3.0

Managing Vulnerabilities for PCI Compliance White Paper. Christopher S. Harper Managing Director, Agio Security Services

How to achieve PCI DSS Compliance with Checkmarx Source Code Analysis

Cybersecurity and internal audit. August 15, 2014

Hack Proof Your Webapps

Enterprise Cybersecurity: Building an Effective Defense

Protecting against cyber threats and security breaches

Host Hardening. Presented by. Douglas Couch & Nathan Heck Security Analysts for ITaP 1

Cybercrime myths, challenges and how to protect our business. Vladimir Kantchev Managing Partner Service Centrix

Technical Testing. Application, Network and Red Team Testing DATA SHEET. Test your security defenses. Expert Testing, Analysis and Assessments

Business white paper. Missioncritical. defense. Creating a coordinated response to application security attacks

TECHNICAL AUDITS FOR CERTIFYING EUROPEAN CITIZEN COLLECTION SYSTEMS

Making your web application. White paper - August secure

Table of Contents. Page 2/13

900 Walt Whitman Road, Suite 304 Melville, NY Office:

Web application security Executive brief Managing a growing threat: an executive s guide to Web application security.

Mobile Device Mismanagement Vulnerabili*es in MDM Solu*ons and their impact

CORE INSIGHT ENTERPRISE: CSO USE CASES FOR ENTERPRISE SECURITY TESTING AND MEASUREMENT

THE HACKERS NEXT TARGET

Threat Model for Mobile Applications Security & Privacy

I ve been breached! Now what?

Board Portal Security: How to keep one step ahead in an ever-evolving game

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

OWASP AND APPLICATION SECURITY

Integrating Security Testing into Quality Control

Protecting Your Organisation from Targeted Cyber Intrusion

Transcription:

Securing your Mobile Applications Karson Chan Security Consultant

NTT Com Security Threat can come from anywhere that s why we are everywhere 1,000+ Staff Our knowledge is your security 8,000+ Customers 20+ years experience Offices across Europe America & Asia-Pacific Risk and Information Security focus Two decades of deep technology partnerships Consulting, managed and technology services Investing for the long term Global reach/local engagement Public-Approvedv05

Our Information Security Risk Service Offering Governance, Risk Management and Compliance Information Risk Management Risk Insight (Risk Assessment) Security Strategy/Policy Security Control Framework / Standard / Guidelines Information Classification Data Protection Assessment and Planning Identity Management Compliance and Governance Security Standards (ISO/IEC 27001/Cobit5) Industry Best Practices (NIST, ISF, SANS, CIS, OGCIO, AUS DOD, PII) Regulatory Standards (HKMA, SFC, MAS, FISC, PDPO) PCI QSA Assessment and Compliance Business Continuity/ Disaster Recovery Business Continuity Plan Development/Testing Disaster Recovery Plan Development/Testing Incident Response Plan Development/Testing Security Consulting Assessment Services Security Assessment PCI ASV Scan Gap Analysis / Security Audit Penetration Testing Web Application, Mobile Application, Wireless Source Code Review Cloud Security Assessment Security Implementation Services Security Technology Integration Service Staging Commissioning Support Installation and Configuration Review Upgrade Security Operations Incident Response Social Engineering Incident Response Security Incident Drill Test Quality Assurance Security Architecture Review Firewall Policy Review Technology Assessment SIEM Rationalization Emerging Technology Assessment Security Awareness/Training Security Awareness Training for General Users and IT Users Incident Response Training Product and Technical Skill Transfer such as Penetration Testing Phishing Email Awareness Project Management Infrastructure Change Management Project Resourcing Managed Security Services Security Operating Center Device Management Security Monitoring and Notification NTT Com Security Analysis Security Incident Management 3 Security Enrichment advisory and remediation Security Management Lifecycle

Agenda 1. What is Offensive Security 2. Recent Security Breaches 3. Application Security: Latest Trends 4. Mobile Application Threat Model 5. Mobile Application Attack Surface 6. Coffee Break 7. Demo 8. Q&A 4

Offensive Security What is it? It s largely proactive To defend against ever changing threats, it helps to be able to think like the bad guys do It s not a replacement for reactive and defensive security. It complements them You have already put defenses in place. How would they fare against a real attack? Provides an indication of how secure you really are Black Box, White Box, and hybrid penetration testing People Process Technology Offensive Security Testing 5

Offensive Security The Approach Penetration Testing Web Application Assessment Mobile App Assessment Wireless (802.11) Anything with in IP Code Review Threat Modeling Code Analysis Secure Coding Workshop 6

The Different between Vulnerability Assessment and Penetration Test Vulnerability Assessment Automatic assessment Reveals isolated vulnerabilities No human intelligence Fast and efficient to identify most of vulnerabilities Not able to address logic flaw Vulnerabilities are possible false positive Penetration Test Manual assessment Human intelligence Able to address logic flaw Identifies what data was actually compromised Show how damaging a flaw could be in a real attack rather than find every flaw in a system 7

Penetration Testing Traditional Testing Single Vector Only identify vulnerabilities for single vector Scenario Based Testing multiple disciplines simultaneously Shows potential breaches through combined vulnerabilities Simulate an APT threat in order to test if your APT defense is effective 8

Multiple Vectors Network Hacking Web Applications Wireless Mobile Devices Malicious USB Email Phishing Physical Infiltration Social Engineering 9

Web Application Security Information Security Strategy Risk Analysis, PCI DSS, Compliance Governance Standards & Fundamentals Guidelines and Procedures Checklists Concepts & Processes Topology / Infrastructure Hardening/ Patch Management Secure Application Development Software security specifications Secure Design Secure coding training Coding guidelines Tool based code analysis Advanced-Security Whitelist/ Blacklist Proxy DOS Protection Web Application Firewall SSL Termination/ Offload XML/SOAP-Firewall Authentication/SSO Management Operating Maintaining Administration Incident-Handling Managed Services Standards, Guidelines and Tools Secure Development Life Cycle Application Protection Tools Security Management, Operation and Services VA, Code Review, Technical Audit & Pen Tests

Application Security: Disruption from operation to business loss Old Days -> Bugs, impact to business operation and within company Nowadays -> Cybercrime, business and brand damage 11

Major Security Breaches 1. Home Depot (Sept 2014) Criminals used unique, custom-built malware to steal credit card numbers from Home Depot s point-of-sale systems, may have affected 56 million credit and debit cards in Canada and the U.S. 2. Celebrity Photo Leakage (Aug 2014) a collection of almost 200 private pictures of various celebrities leaked 3. ebay (May 2014) Possibly 112 million customers password has been stolen 12

Major Security Breaches - Mobile Application 1. Fake Flappy Bird App Planted by Hackers to Steal Photos from Device 2. Instagram s Android users risk having their accounts hijacked According to Gartner, over the next year and through the end of 2015, more than three-quarters of mobile apps will fail "basic security tests. 13

Breaches Statictics Source: Verizon DBIR 2013 14

Attack Methods Source: Verizon DBIR 2013 15

Application Security: Latest Trends 1. Single Vector to Multiple Vectors Attack 2. Mobile App Security 16

Latest Trend 1: A Multiple Vector Attack An attacker will usually try the external vectors first (web applications, network infrastructure) but may not be successful If they are determined enough, then a multi-vector attack would come next Target Company 17

A Multiple Vector Attack Analysis of the Attack In the previous example, the attacker combined 3 different attack vectors together: Web Applications Email Phishing Social Engineering This is a real-world example, it happens more than you would think Difficult to spot: Yes. All it takes is one user to fall for it Once reported and handled by incident response teams, the attacker may already be connected to the VPN and carried out his deeds 18

Latest Trend 2: Mobile App Security 19

Mobile Applications - How many do you have? With the ubiquitous usage of smart phones and PDAs the Web Application market has exploded What started primarily as games and productivity aids have developed into business and corporate tools > Evolving from static content to highly interactive user interfaces exchanging data and information of all types > The line between the personal world and the business world is almost non-existent A lack of development standards, frameworks, and language have inadvertently opened up a vast, new targeted threat landscape These threats, and how to deal with them, represent one of today s single largest information Security risks

Some Interesting Statistics Android holds the current market share (around 84.7%) There are other players: > Apple 11.7% > Windows 2.5% > BlackBerry 0.5% > Other 0.7% 73% of organizations have been hacked at least once in the past two years through insecure web applications On average, every web application has an average of 12 vulnerabilities

Differences with Web and Mobile Applications A large number of web application security vulnerabilities are generally associated with a lack of input validation (SQL Injection, XSS, Open Redirects, Remote File Includes, etc) With web applications, attackers generally attack from a pure black-box methodology. In general, greater skill and knowledge around reverse engineering is required for assessing and attacking mobile applications because the code is already in the hands of the attackers 22

Mobile Application Threat Model Mobile Application Mobile Phone Web Services 3 rd Party Libraries Malicious User 23 Android Vulnerabilities Malicious Applications Jailbreak / Rooting File System

Mobile Application Attack Surfaces The Application and Code > Identification and manipulation of client side logic Permissions > Are application components sufficiently protected Data-in-Transit > Is the data protected as it s sent to the server Data-at-Rest > Is the data stored on the device secured The Server > Does the server validate data from the mobile application

The Application and Code Both Android and ios applications can be extracted from the phone in their binary format > Android: Java compiled to DEX VM bytecode > ios: Obj-C compiled to ARM binaries A mixture of techniques is then used to decompose the application: > Analysis of the AndroidManifest.xml File > Static Analysis > File System Analysis > Dynamic Analysis > Reverse Engineering

The Application and Code It s in the attacker s hands Compilation and de-obfuscation introduce a degree of difficulty for an attacker attempting to retrieve the code in its original form, however it s possible for the determined and capable hacker Dynamic analysis allows for an application to be extracted from a mobile device and executed within an emulator Execution within an emulator can highlight exactly what API calls are being executed, and which files on the underlying file system are being accessed

The Application and Code Getting back to the Source Code (Android) classes.dex contains the Java bytecode in Dalvik compatible form Continue to decompile it back into Java source code

The Application and Code Getting back to the Source Code (Android)

The Application and Code Getting back to the Source Code (Android) Other applications haven t been obfuscated at the compilation stage The source code in this case is very close to the original

The Application and Code Getting back to the Source Code (Android) Developers who don t obfuscate their code prior to release are helping the bad guys out Simply by reading through the source code you can determine: > How the application communicates to the server > The types of requests sent to remote servers and their format > If the application interacts with other components on the phone > If the application is writing files to the underlying operating system > Cryptographic Functions > Third party libraries in use All this helps in identifying potential attack surfaces of the application One of the best ways to attack a client-server application is to write your own client to communicate to the server

The Application and Code Getting back to the Source Code (Android) The RequestAuthorizationclass shows exactly how the authentication token is created (along with the secret key)

The Mobile Application Logical Flaws We looked at a popular game which requires purchases of gold to progress further it could probably get quite expensive Upon decompiling the application and navigating through the obfuscated code, we were drawn to this call to a file on the device itself: The gold value is stored in this preferences file on the device A simple edit and you re a millionaire within the game > We had gold but now we have! The server doesn t keep track of this value! > Not stored on the server > Not validates

The Mobile Application Logical Flaws Mobile application research, shows that developers are implementing business logic into their applications Developers are often under the impression that if their code is obfuscated, it cannot be decompiled > Thus they decide to implement logic into the applications which should be done on the server side An application that hasn t been obfuscated means that logic flaws can usually be identified quickly!

Permissions Mobile applications are installed with different privilege levels A user s mobile device will usually have applications from unknown developers alongside applications they trust for everyday tasks > For example, their mobile banking application and free games Under the Android security model every application runs in its own process and using a low-privileged user ID Applications can only access their own files by default With this isolation in place, applications are able to communicate via different components These communications between components are a critical area of focus for assessing the security of a mobile application

Permissions Android Applications are typically made up of multiple components: > Activities > Services > Content Providers > Broadcast Receivers Permissions are granted to each component for as long as the application is installed on the device If these components are not properly secured, malicious or other rogue programs can interact with them Most applications that we have looked at recently do not have well defined permissions

Permissions What did we find? Poorly protected components for a number of well known and popular applications > Poorly protected activities (GUI screens) can be launched instead of the intended Activity > Exported Activities can be launched by other applications (think CSRF for mobile applications) > Broadcast messages vulnerable to eavesdropping or DoS(Denial of Service) Our evaluation showed that most Android applications do not adequately place permissions around their components Some applications were found to contain the debug flag. Even though this is removed by default within the Eclipse ID, it still managed to end up in the production application!

Permissions android:debuggable= true If you find the above line in the AndroidManifest.xml file, the application is debuggable and it can be exploited.

Data-In-Transit Most applications will at some point communicate with a server endpoint Confidentiality and strong authentication is a must Authentication: > Verify the entity that the application is communicating with Confidentiality: > Prevent snooping > Man-in-the-middle attacks

Data-At-Rest One of the largest challenges with mobile applications is how they secure data on the device Many popular applications use SQLite database files which are not adequately protected If the device is lost or stolen, it would be trivial for an attacker to pull these databases and view the records On both Android, and ios it s fairly easy to get root access and access application data and configuration files > These files contain usernames, passwords, encryption keys, and other sensitive account information

The Server History Repeats Itself Through our analysis of popular mobile applications, we continued to find old web application vulnerabilities: > Username Enumeration > SQL Injection > Broken session management > Information Disclosure Does the server perform strong validation on these requests Does the server allow the client to make logic decisions (this should be a big NO- NO, but happens all the time) Does the server validate the mobile application > A common tactic is to reverse engineer the mobile application and write a rogue client that communicates with the server > Are clients validated

The Server Harvesting User Information The mobile application communicates to the server over HTTPS (good) and using JSON requests. It looks something like this: The server would then respond to this request, with the user s account information What happens if we change the username parameter?

The Server Harvesting User Information The server responds with the user information for that user This isn t good. There s obviously an authentication problem here HTTP Request HTTP Response

The Server Harvesting User Information This is a serious vulnerability but unfortunately it happens quite a lot All an attacker needs to have is a valid username and by exploiting the vulnerability, he is able to obtain: > The user s mobile phone number > The user s email address Through social engineering he may further his attacks against the user He could also write a script to enumerate valid users within the system and obtain their information This application has been downloaded millions of times!

BREAK

DEMO

Summary > The threat surface of mobile applications differs significantly from that of web applications > Web application security has improved, but 5 year old vulnerabilities are still common > Development of mobile application development guidelines and assessment capabilities are needed > The risk of liability to corporations > Organizations should have a framework for regular assessment and a solution for assuring the security of applications 46

A Holistic Approach to Application Security The ideal way to ensure your applications are secure Threat Modeling Design Stage Identify Attack Surfaces Counter-measures Secure Coding Workshop Code Analysis Vulnerability Assessment Writing Secure Code Tailored to development frameworks Combination of dynamic and static analysis Assess the code Identify vulnerabilities and potential logical issues Catch the low hanging fruit Bi-Yearly / Quarterly Manual Verification Penetration Testing Attacks directed at the application Enumerate attack surfaces Attack each layer of the application architecture 47

Questions?

Thank You