SlideShare a Scribd company logo
Mobile Browser Content Handling
           Potential Risks and Mitigations
           Dan Cornell




© Copyright 2011 Denim Group - All Rights Reserved
My Background
 • Dan Cornell, Founder and CTO of Denim Group
 • Software developer by background (Java, .NET, etc)
 • OWASP San Antonio, Global Membership Committee

 • Denim Group
         – Build software with special security, performance, reliability
           requirements
         – Help organizations deal with the risk associated with their software
                  • Code reviews and application assessments
                  • SDLC consulting
                  • Secure development training

© Copyright 2011 Denim Group - All Rights Reserved                                1
Mobile Browser Content Handling
    • Many mobile platforms allow you to designate applications to handle
      content found in web pages
            – By URI protocol
            – By content type


    • Provide a “premium” experience for users who have the target app
      installed

    • Examples:
            – tel:// URLs initiating phone calls
            – maps:// URLs to display maps




© Copyright 2011 Denim Group - All Rights Reserved                          2
iPhone/iPad URL Schemes
 • iOS applications can
   be set up to “handle”
   certain URL schemes
 • Defined in the
   application’s Info.plist
 • Binary format:
   annoying



© Copyright 2011 Denim Group - All Rights Reserved   3
Decoding plist Files
                                                     • plutil -convert xml1 Info.plist
                                                     • Much nicer




© Copyright 2011 Denim Group - All Rights Reserved                                       4
iOS URL Handlers
 • XPath: Look for:
 /plist/dict/array/dict[key='CFBundleURLSchemes']/array/string
 • Now you know the URL Schemes the app handles

 • SANS blog post on this issue in iOS:
         – http://software-security.sans.org/blog/2010/11/08/insecure-handling-url-schemes-
           apples-
           ios/?utm_source%253Drss%2526utm_medium%253Drss%2526utm_campaign%2
           53Dinsecure-handling-url-schemes-apples-ios
         – Too long to type? http://bit.ly/ezqdK9




© Copyright 2011 Denim Group - All Rights Reserved                                            5
Android Intents
 • Intents are facilities for late-binding messaging between applications
         – http://developer.android.com/guide/topics/intents/intents-filters.html


 • One use is to allow applications to register to receive messages from
   the Browser when certain types of content are received
         – Like iOS URL Schemes but an even more comprehensive IPC mechanism




© Copyright 2011 Denim Group - All Rights Reserved                                  6
What’s Up With My Android XML Files?
                                                     • Binary encoding

                                                     • Use axml2xml.pl to
                                                       convert them to text




                                                     http://code.google.com/p/android-random/downloads/detail?name=axml2xml.pl



© Copyright 2011 Denim Group - All Rights Reserved                                                                               7
Much Better
 • Now we can see
   <intent-filter> tags




© Copyright 2011 Denim Group - All Rights Reserved   8
Intent Filter Example
 <intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data android:scheme="danco" />
 </intent-filter>



 • Action: What to do?
 • Data: Scheme is URI “protocol” to handle
 • Category BROWSABLE: Allow this Action to be
   initiated by the browser
© Copyright 2011 Denim Group - All Rights Reserved                  9
Intent Filter Demo – Manual Launch, HTML Page




© Copyright 2011 Denim Group - All Rights Reserved   10
Intent Filter Demo – Anchor Launch, IFrame
 Launch




© Copyright 2011 Denim Group - All Rights Reserved   11
I’m a Security Tester. Why Do I Care?
 • URL handlers are remotely-accessible attack surface

 • This is a way for you to “reach out and touch” applications installed on
   a device if you can get a user to navigate to a malicious page
 • Send in arbitrary URLs via links or (easier) embedded IFRAMEs

 • Example: iOS Skype application used to automatically launch the
   Skype application and initiate a call when it encountered a skype://
   URL
         – Apple’s native Phone handle for tel:// URLs would confirm before a call was made




© Copyright 2011 Denim Group - All Rights Reserved                                            12
I’m a Developer. Why Do I Care?
 • See the previous slide. Bad guys care. So should you. Please.

 • Content passed in via these handlers must be treated as untrusted
         – Positively validate
         – Enforce proper logic restrictions


 • All:
         – Should a malicious web page be able to cause this behavior?
                  • Make phone call, transmit location, take photo, start audio recording, etc
 • iOS:
         – Validate inputs to handleOpenURL: message
 • Android:
         – Validate data brought in from Action.getIntent() method
© Copyright 2011 Denim Group - All Rights Reserved                                               13
Online
 • Code, slides and videos online:

         www.smartphonesdumbapps.com




© Copyright 2011 Denim Group - All Rights Reserved   14
Questions?
 Dan Cornell
 dan@denimgroup.com
 Twitter: @danielcornell

 www.denimgroup.com
 (210) 572-4400




© Copyright 2011 Denim Group - All Rights Reserved   15

More Related Content

PPTX
How is Your AppSec Program Doing Compared to Others
PDF
Designing Secure Mobile Apps
PDF
Smart Phones Dumb Apps
PDF
Vulnerability Management In An Application Security World
PPTX
Android App
PPTX
How iOS and Android Handle Security Webinar
PDF
Social Networks and Security: What Your Teenager Likely Won't Tell You
PDF
Top Strategies to Capture Security Intelligence for Applications
How is Your AppSec Program Doing Compared to Others
Designing Secure Mobile Apps
Smart Phones Dumb Apps
Vulnerability Management In An Application Security World
Android App
How iOS and Android Handle Security Webinar
Social Networks and Security: What Your Teenager Likely Won't Tell You
Top Strategies to Capture Security Intelligence for Applications

What's hot (20)

PDF
The Permanent Campaign
PDF
Developing Secure Mobile Applications
PDF
Vulnerability Management In An Application Security World: AppSecDC
PDF
The Need For Open Software Security Standards In A Mobile And Cloudy World
PDF
Software Security for Project Managers: What Do You Need To Know?
PDF
What Permissions Does Your Database User REALLY Need?
PDF
The Magic of Symbiotic Security
PDF
Skeletons in the Closet: Securing Inherited Applications
PPTX
Security testing of mobile applications
PPTX
5 Key Ways to Incorporate Security Protection into your Organization’s Mobile...
PPT
Security Best Practices for Mobile Development @ Dreamforce 2013
PPTX
Pentesting iPhone applications
PDF
CIS14: Mobilize Your Workforce with Secure Identity Services
PPTX
Ahmed sallam technical_journey_1992_1999
PPTX
IBM Smarter Business 2012 - IBM Security: Threat landscape
PDF
Mobile security - Intense overview
PPTX
SmartTV Security
PPT
Emerging Threats and Attack Surfaces
PPTX
Intersect
PDF
Enterprise Apps Development 101
The Permanent Campaign
Developing Secure Mobile Applications
Vulnerability Management In An Application Security World: AppSecDC
The Need For Open Software Security Standards In A Mobile And Cloudy World
Software Security for Project Managers: What Do You Need To Know?
What Permissions Does Your Database User REALLY Need?
The Magic of Symbiotic Security
Skeletons in the Closet: Securing Inherited Applications
Security testing of mobile applications
5 Key Ways to Incorporate Security Protection into your Organization’s Mobile...
Security Best Practices for Mobile Development @ Dreamforce 2013
Pentesting iPhone applications
CIS14: Mobilize Your Workforce with Secure Identity Services
Ahmed sallam technical_journey_1992_1999
IBM Smarter Business 2012 - IBM Security: Threat landscape
Mobile security - Intense overview
SmartTV Security
Emerging Threats and Attack Surfaces
Intersect
Enterprise Apps Development 101
Ad

Viewers also liked (11)

PDF
Security Maturity Models.
PDF
Global Cyber Security Outlook - Deloitte (Hotel_Digital_Security_Seminar_Sept...
PPT
Industry Analysis
DOCX
Strategic group map
PPT
Industry Analysis Presentation
PPT
9. life cycle strategies
PPT
industrial analysis
PPTX
Strategic group mapping
PDF
Beyaz Şapkalı Hacker Eğitimi Yardımcı Ders Notları
PPT
Product life cycle
PPT
Product life cycle
Security Maturity Models.
Global Cyber Security Outlook - Deloitte (Hotel_Digital_Security_Seminar_Sept...
Industry Analysis
Strategic group map
Industry Analysis Presentation
9. life cycle strategies
industrial analysis
Strategic group mapping
Beyaz Şapkalı Hacker Eğitimi Yardımcı Ders Notları
Product life cycle
Product life cycle
Ad

Similar to Mobile Browser Content Handling (20)

PDF
Security Testing Mobile Applications
PDF
Mobile Application Security Code Reviews
PDF
Evaluating iOS Applications
PDF
Pentesting Mobile Applications (Prashant Verma)
PDF
Benchmarking Web Application Scanners for YOUR Organization
PPTX
Android Security Humla Part 1
PPT
Mobile code mining for discovery and exploits nullcongoa2013
PPTX
iOS application (in)security
PPTX
Demystifying the Mobile Container - PART I
PDF
Managing content in_a_mobile_world
PPTX
Android application development fundamentals
PDF
Introduction to android - SpringPeople
PPTX
android development training in mumbai
PPT
Automation In Android & iOS Application Review
PDF
Bringing Government and Enterprise Security Controls to the Android Endpoint
PDF
Securing Android
PPTX
Starting mobile development
PPTX
What Mobile Development Approach Makes Sense
PDF
Hacking and Securing iOS Apps : Part 1
PPTX
Development mobile app cross device
Security Testing Mobile Applications
Mobile Application Security Code Reviews
Evaluating iOS Applications
Pentesting Mobile Applications (Prashant Verma)
Benchmarking Web Application Scanners for YOUR Organization
Android Security Humla Part 1
Mobile code mining for discovery and exploits nullcongoa2013
iOS application (in)security
Demystifying the Mobile Container - PART I
Managing content in_a_mobile_world
Android application development fundamentals
Introduction to android - SpringPeople
android development training in mumbai
Automation In Android & iOS Application Review
Bringing Government and Enterprise Security Controls to the Android Endpoint
Securing Android
Starting mobile development
What Mobile Development Approach Makes Sense
Hacking and Securing iOS Apps : Part 1
Development mobile app cross device

More from Denim Group (20)

PDF
Long-term Impact of Log4J
PDF
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
PDF
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
PDF
Optimizing Security Velocity in Your DevSecOps Pipeline at Scale
PDF
Application Asset Management with ThreadFix
PDF
OWASP San Antonio Meeting 10/2/20
PDF
AppSec Fast and Slow: Your DevSecOps CI/CD Pipeline Isn’t an SSA Program
PDF
Using Collaboration to Make Application Vulnerability Management a Team Sport
PDF
Managing Penetration Testing Programs and Vulnerability Time to Live with Thr...
PDF
Security Champions: Pushing Security Expertise to the Edges of Your Organization
PDF
The As, Bs, and Four Cs of Testing Cloud-Native Applications
PDF
An Updated Take: Threat Modeling for IoT Systems
PPTX
Continuous Authority to Operate (ATO) with ThreadFix – Bringing Commercial In...
PDF
A New View of Your Application Security Program with Snyk and ThreadFix
PDF
Enabling Developers in Your Application Security Program With Coverity and Th...
PDF
AppSec in a World of Digital Transformation
PDF
The As, Bs, and Four Cs of Testing Cloud-Native Applications
PDF
Enabling Developers in Your Application Security Program With Coverity and Th...
PDF
AppSec in a World of Digital Transformation
PDF
Enumerating Enterprise Attack Surface
Long-term Impact of Log4J
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Optimizing Security Velocity in Your DevSecOps Pipeline at Scale
Application Asset Management with ThreadFix
OWASP San Antonio Meeting 10/2/20
AppSec Fast and Slow: Your DevSecOps CI/CD Pipeline Isn’t an SSA Program
Using Collaboration to Make Application Vulnerability Management a Team Sport
Managing Penetration Testing Programs and Vulnerability Time to Live with Thr...
Security Champions: Pushing Security Expertise to the Edges of Your Organization
The As, Bs, and Four Cs of Testing Cloud-Native Applications
An Updated Take: Threat Modeling for IoT Systems
Continuous Authority to Operate (ATO) with ThreadFix – Bringing Commercial In...
A New View of Your Application Security Program with Snyk and ThreadFix
Enabling Developers in Your Application Security Program With Coverity and Th...
AppSec in a World of Digital Transformation
The As, Bs, and Four Cs of Testing Cloud-Native Applications
Enabling Developers in Your Application Security Program With Coverity and Th...
AppSec in a World of Digital Transformation
Enumerating Enterprise Attack Surface

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Encapsulation theory and applications.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPT
Teaching material agriculture food technology
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
NewMind AI Weekly Chronicles - August'25 Week I
Diabetes mellitus diagnosis method based random forest with bat algorithm
Encapsulation theory and applications.pdf
Unlocking AI with Model Context Protocol (MCP)
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Spectral efficient network and resource selection model in 5G networks
Digital-Transformation-Roadmap-for-Companies.pptx
Teaching material agriculture food technology
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
The AUB Centre for AI in Media Proposal.docx
Understanding_Digital_Forensics_Presentation.pptx
Big Data Technologies - Introduction.pptx
Spectroscopy.pptx food analysis technology
Chapter 3 Spatial Domain Image Processing.pdf
Machine learning based COVID-19 study performance prediction
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
NewMind AI Weekly Chronicles - August'25 Week I

Mobile Browser Content Handling

  • 1. Mobile Browser Content Handling Potential Risks and Mitigations Dan Cornell © Copyright 2011 Denim Group - All Rights Reserved
  • 2. My Background • Dan Cornell, Founder and CTO of Denim Group • Software developer by background (Java, .NET, etc) • OWASP San Antonio, Global Membership Committee • Denim Group – Build software with special security, performance, reliability requirements – Help organizations deal with the risk associated with their software • Code reviews and application assessments • SDLC consulting • Secure development training © Copyright 2011 Denim Group - All Rights Reserved 1
  • 3. Mobile Browser Content Handling • Many mobile platforms allow you to designate applications to handle content found in web pages – By URI protocol – By content type • Provide a “premium” experience for users who have the target app installed • Examples: – tel:// URLs initiating phone calls – maps:// URLs to display maps © Copyright 2011 Denim Group - All Rights Reserved 2
  • 4. iPhone/iPad URL Schemes • iOS applications can be set up to “handle” certain URL schemes • Defined in the application’s Info.plist • Binary format: annoying © Copyright 2011 Denim Group - All Rights Reserved 3
  • 5. Decoding plist Files • plutil -convert xml1 Info.plist • Much nicer © Copyright 2011 Denim Group - All Rights Reserved 4
  • 6. iOS URL Handlers • XPath: Look for: /plist/dict/array/dict[key='CFBundleURLSchemes']/array/string • Now you know the URL Schemes the app handles • SANS blog post on this issue in iOS: – http://software-security.sans.org/blog/2010/11/08/insecure-handling-url-schemes- apples- ios/?utm_source%253Drss%2526utm_medium%253Drss%2526utm_campaign%2 53Dinsecure-handling-url-schemes-apples-ios – Too long to type? http://bit.ly/ezqdK9 © Copyright 2011 Denim Group - All Rights Reserved 5
  • 7. Android Intents • Intents are facilities for late-binding messaging between applications – http://developer.android.com/guide/topics/intents/intents-filters.html • One use is to allow applications to register to receive messages from the Browser when certain types of content are received – Like iOS URL Schemes but an even more comprehensive IPC mechanism © Copyright 2011 Denim Group - All Rights Reserved 6
  • 8. What’s Up With My Android XML Files? • Binary encoding • Use axml2xml.pl to convert them to text http://code.google.com/p/android-random/downloads/detail?name=axml2xml.pl © Copyright 2011 Denim Group - All Rights Reserved 7
  • 9. Much Better • Now we can see <intent-filter> tags © Copyright 2011 Denim Group - All Rights Reserved 8
  • 10. Intent Filter Example <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="danco" /> </intent-filter> • Action: What to do? • Data: Scheme is URI “protocol” to handle • Category BROWSABLE: Allow this Action to be initiated by the browser © Copyright 2011 Denim Group - All Rights Reserved 9
  • 11. Intent Filter Demo – Manual Launch, HTML Page © Copyright 2011 Denim Group - All Rights Reserved 10
  • 12. Intent Filter Demo – Anchor Launch, IFrame Launch © Copyright 2011 Denim Group - All Rights Reserved 11
  • 13. I’m a Security Tester. Why Do I Care? • URL handlers are remotely-accessible attack surface • This is a way for you to “reach out and touch” applications installed on a device if you can get a user to navigate to a malicious page • Send in arbitrary URLs via links or (easier) embedded IFRAMEs • Example: iOS Skype application used to automatically launch the Skype application and initiate a call when it encountered a skype:// URL – Apple’s native Phone handle for tel:// URLs would confirm before a call was made © Copyright 2011 Denim Group - All Rights Reserved 12
  • 14. I’m a Developer. Why Do I Care? • See the previous slide. Bad guys care. So should you. Please. • Content passed in via these handlers must be treated as untrusted – Positively validate – Enforce proper logic restrictions • All: – Should a malicious web page be able to cause this behavior? • Make phone call, transmit location, take photo, start audio recording, etc • iOS: – Validate inputs to handleOpenURL: message • Android: – Validate data brought in from Action.getIntent() method © Copyright 2011 Denim Group - All Rights Reserved 13
  • 15. Online • Code, slides and videos online: www.smartphonesdumbapps.com © Copyright 2011 Denim Group - All Rights Reserved 14
  • 16. Questions? Dan Cornell dan@denimgroup.com Twitter: @danielcornell www.denimgroup.com (210) 572-4400 © Copyright 2011 Denim Group - All Rights Reserved 15