SlideShare a Scribd company logo
David Rook

Windows Phone 7 Security

OWASP AppSec Ireland




Friday, 7 September 2012
if (slide == introduction)
                  System.out.println("I’m David Rook");

 • Application Security Lead, Realex Payments, Dublin
      CISSP, CISA, GCIH and many other acronyms



 • Security Ninja (@securityninja)

 • Speaker at developer and security conferences

 • Microsoft Developer Security MVP

 • SC Magazine Information Security Rising Star 2012

 • Developed and released Agnitio and the WPAA

Friday, 7 September 2012
Agenda


  • Smartphones and apps - big numbers, little security?

  • Windows Phone 7 introduction

  • Windows Phone 7 platform security

  • Windows Phone 7 application security




Friday, 7 September 2012
Mobile device sales 2011



                                                                      472 million

                                                        Smartphones
                                                           31%



                                               Mobile
                                                69%


        1.3 billion


Source: http://www.gartner.com/it/page.jsp?id=1924314
 Friday, 7 September 2012
Smartphone OS market share 2011
                                                        Microsoft
                                                           2%




                                                           RIM
                                                           9%
                                                                 Symbian
                                                                   12%
                                          Android
                                           51%

                                                             iOS
                                                             24%




Source: http://www.gartner.com/it/page.jsp?id=2120015
 Friday, 7 September 2012
Smartphone OS market share 2011


  • Microsoft has 1.9% of the smartphone market share

        • Smaller market share than something called Bada




Friday, 7 September 2012
Smartphone OS market share 2011




Friday, 7 September 2012
Smartphone OS market share 2011


  • Microsoft has 1.9% of the smartphone market share

        • Smaller market share than something called Bada
        • Should I even continue with this talk about Windows Phone 7?
        • Similar approach to Android with many devices available




Friday, 7 September 2012
Smartphone OS market share 2011




Friday, 7 September 2012
Smartphone OS market share 2011


  • Microsoft has 1.9% of the smartphone market share

        • Smaller market share than something called Bada
        • Should I even continue with this talk about Windows Phone 7?
        • Similar approach to Android with many devices available
        • IDC predict that they will have 20% market share by 2015




Friday, 7 September 2012
Smartphone OS market share 2011




Friday, 7 September 2012
Smartphone OS market share 2011


  • Microsoft has 1.9% of the smartphone market share

        • Smaller market share than something called Bada
        • Should I even continue with this talk about Windows Phone 7?
        • Similar approach to Android with many devices available
        • IDC predict that it will have 20% market share by 2015
        • 20% is unlikely but it’s market share will increase in my opinion




Friday, 7 September 2012
Smartphone OS market share 2011




Friday, 7 September 2012
Windows Phone 7 Introduction


  • The smartphone from Microsoft

        • First released in late 2010 with 7 updates since then
        • Based on Windows Embedded Compact v6 and v7
        • Minimum “tough but fair” hardware requirements
        • Apps only available via the Windows Phone Marketplace
        • Specifically aimed at the consumer market not enterprise




Friday, 7 September 2012
Windows Phone 7 Introduction




Friday, 7 September 2012
Windows Phone 7 Introduction


  • .NET Compact Framework

        • Version of the .NET framework for resource constrained devices
        • Some of the same classes and some mobile specific ones
        • Compiler translates your code into Intermediate Language
        • Apps are JIT compiled and executed by the .NET CLR
        • Only managed .NET code allowed in your apps*




Friday, 7 September 2012
Windows Phone 7 Introduction
                           private void button1_Click(object sender, RoutedEventArgs e)
                                   {
                                       MessageBox.Show("Hello OWASP AppSec Ireland!");
                                   }




                                               C# Compiler



                                                 Managed
                                                  Module



                                                 .NET CLR


Friday, 7 September 2012
Windows Phone 7 Introduction


  • Windows Phone 7 Kernel Architecture

        • 32bit OS that runs inside a 4GB virtual address space
        • 2GB allocated to the kernel and 2GB to process executing
        • That isn’t quite true, the process executing only gets 1GB
        • 1GB is for components commonly mapped into all processes




Friday, 7 September 2012
Windows Phone 7 Introduction


  • Windows Phone 7 Kernel Architecture
                                            APPLICATIONS
Space
 User




            TELSHELL.EXE          UDEVICES.EXE    SERVICESD.EXE      CPROG.EXE



                           COREDLL/WINSOCK/COMMCRL/WININET
                                                 kCoreDLL.DLL
          KERNEL.DLL
Kernel
Space




                              FILESYS.DLL                              Device.DLL
                                               GWES        Network
             OAL.EXE
                             FSDMGR.DLL                                  Drivers

                                             Hardware
Friday, 7 September 2012
Windows Phone 7 Introduction

                               Process Code
   Process
    Space
               2GB


                                 User DLLs


                            Memory Mapped Files



                                  GWES
   Kernel
   Space




                                  Drivers
               2GB




                                File System

                                  Kernel


Friday, 7 September 2012
Windows Phone 7 Introduction

                            Shared System Heap
                                  256MB




                                                  processes
                                                  across all
                                                  Common
                            RAM Backed Mapfiles
                                 256MB
   Process
   Memory




                             Shared User DLLs
               2GB




                                  512MB




                                                  Private to

                                                   process
                                                    each
                               Process Space
                              1GB per process




Friday, 7 September 2012
Windows Phone 7 Platform Security


  • Windows Phone 7 Security Model

        • Chambers concept to enforce app isolation and least privilege
        • The chambers provide a security boundary to restrict the apps
        • Four chambers and apps run in one of them
        • Three chambers have fixed permission sets
        • The fourth chamber is capabilities based




Friday, 7 September 2012
Windows Phone 7 Platform Security


       Trusted Computing
          Base (TCB)


          Elevated Rights       Fixed permissions
          Chamber (ERC)


          Standard Rights
          Chamber (SRC)


          Least Privileged
                                Capabilities based
          Chamber (LPC)

Friday, 7 September 2012
Windows Phone 7 Platform Security


       Trusted Computing
          Base (TCB)

  • The kernel and kernel-mode drivers run in the TCB chamber
  • Allows processes to have unrestricted access to most resources
  • The TCB chamber can modify policy and enforce the security model
  • Only Microsoft can add signed software to the TCB chamber




Friday, 7 September 2012
Windows Phone 7 Platform Security


          Elevated Rights
          Chamber (ERC)

  • User-mode drivers and services runs in this chamber
  • Can access all resources except security policy
  • Intended for services and user-mode drivers
  • Only Microsoft can add signed software to the ERC chamber




Friday, 7 September 2012
Windows Phone 7 Platform Security


          Standard Rights
          Chamber (SRC)

  • The default chamber for pre-installed MS and OEM applications
  • Apps that do not provide device-wide services run in the SRC




Friday, 7 September 2012
Windows Phone 7 Platform Security


          Least Privileged
          Chamber (LPC)

  • The default chamber for all non-Microsoft applications
  • Least Privileged Chambers are configured using capabilities
  • Capabilities listed in applications WMAppManifest.xml file




Friday, 7 September 2012
Windows Phone 7 Platform Security


  • Windows Phone 7 Application Capabilities

        • Application capabilities are features that an app uses
        • Apps request permission to access protected APIs during the
          deployment process
        • Default app manifest file includes a list of all the capabilities*
        • WP7 grants security permissions based on the contents of your
          WMAppManifest.xml file*
        • Not everything your app does needs a capability defined




Friday, 7 September 2012
Windows Phone 7 Platform Security


  • Windows Phone 7 Application Capabilities

        • Capability checks are enforced at runtime
        • Permission set for the apps LPC is created based on the
          capabilities
        • Requests for other resources == UnauthorizedAccessException
        • This exception occurs when the access is attempted not when
          the app is executed




Friday, 7 September 2012
Windows Phone 7 Platform Security




Friday, 7 September 2012
Windows Phone 7 Platform Security


  • Windows Phone 7 Capabilities Detection Demo




Friday, 7 September 2012
Windows Phone 7 Platform Security


  • Windows Phone 7 Application Signing

        • Apart from developer unlocked devices apps must be signed
        • Microsoft automatically signs approved apps
        • Apps must have a valid Microsoft signature to be installed




Friday, 7 September 2012
Friday, 7 September 2012
Windows Phone 7 Platform Security


  • Windows Phone 7 Application Sandboxing

        • Apps execute within a restricted LPC as we saw earlier
        • Cannot communicate with other apps on the phone
        • Sandboxed apps aren’t allowed to run in the background
        • No access to native code from within the sandbox
        • All I/O operations are restricted to per app Isolated Storage




Friday, 7 September 2012
Windows Phone 7 Platform Security


  • Windows Phone 7 Application Isolated Storage

        • Per app Isolated Storage allows apps to keep data “private”
        • Very similar to Isolated Storage in Silverlight
        • No direct access to the file system
        • No access to other apps Isolated Storage
        • Three different ways to use your apps Isolated Storage




Friday, 7 September 2012
Windows Phone 7 Platform Security




Friday, 7 September 2012
Windows Phone 7 Application Security


  • Windows Phone 7 Application Security

        • Mobile application security introduces almost no new issues
        • Forget about specific vulnerabilities for one minute
        • Think about the root causes of vulnerabilities, I’ll give you a hand




Friday, 7 September 2012
Windows Phone 7 Application Security


  •   Input Validation
  •   Output Validation
  •   Error Handling
  •   Authentication and Authorisation
  •   Secure Storage
  •   Secure Communications
  •   Session Management
  •   Secure Resource Access
  •   Auditing and Logging
  •   Privacy
Friday, 7 September 2012
Windows Phone 7 Application Security


  • Windows Phone 7 Application Security

        • Mobile application security introduces almost no new issues
        • Forget about specific vulnerabilities for one minute
        • Think about the root causes of vulnerabilities, I’ll give you a hand
        • From that list what do you think the top 3 are?
        • My top 3 are:
               • Secure Storage
               • Authentication and Authorisation
               • Secure Resource Access/Privacy



Friday, 7 September 2012
Windows Phone 7 Application Security


  • OWASP Top 10 Mobile Risks

        • I compared the OWASP top 10 mobile risks to my list
        • 50% Secure Storage/Secure Communications
        • 20% Authentication and Authorisation
        • 0% Privacy*




Friday, 7 September 2012
Windows Phone 7 Application Security


  • OWASP Mobile Controls

        • Lists the mobile app security controls you should implement
        • I compared each control to the list I showed you, guess what?
        • 26% Secure Storage
        • 16% Secure Communications
        • 16% Authentication and Authorisation
        • 16% Secure Resource Access*




Friday, 7 September 2012
Windows Phone 7 Application Security


  • My top 3 in the real world

        • Secure Storage: Facebook, Citibank, LinkedIn, Google Wallet
        • A&A: Foodspotting, Google Wallet, Google (multiple apps)
        • SRA/Privacy: Path, Hipster, Ad Libraries
        • This doesn’t mean we can ignore all of the other issues




Friday, 7 September 2012
Windows Phone 7 Application Security


  • Preventing the top 3 in your WP7 apps

        • I can’t cover every principle in this talk
        • With that in mind I'm grouping them to make a "new" top 3
        • Data Security - Secure Storage and Communications
        • Authentication and Authorisation
        • Data Access/Privacy




Friday, 7 September 2012
Windows Phone 7 Application Security


  • Windows Phone 7 Data Security

        • Never store data on the device if it really isn’t needed
        • WP7 allows us to encrypt data and databases
        • Only new databases can be encrypted but very easy to do
        • DPAPI is used for file/password/pin etc encryption
        • No hashing available and no algorithm selection




Friday, 7 September 2012
Windows Phone 7 Application Security


  • Windows Phone 7 Data Security

        • The local database encryption is based on a password
        • You create a DB in code and you must include the password
        • The database is encrypted using AES-128
        • The password is hashed using SHA-256
        • An encrypted database can be created with two lines of code




Friday, 7 September 2012
Windows Phone 7 Application Security




   // Create the data context, specify the database file location and password
   DavesDataContext db = new DavesDataContext ("Data Source=isostore:/NinjaSecrets.sdf;Password=NinjaPassword");


   // Create an encrypted database after confirming that it does not exist
   if (!db.DatabaseExists()) db.CreateDatabase();




Friday, 7 September 2012
Windows Phone 7 Application Security


  • Windows Phone 7 Data Security

        • Saving data to an apps isolated storage is not secure
        • If you want to encrypt data and not a DB you use the DPAPI
        • Use the System.Security.Cryptography.ProtectedData class
        • Specifically the Protect() and Unprotect() methods
        • Symmetric encryption (AES) used. Hashing isn’t possible




Friday, 7 September 2012
Windows Phone 7 Application Security


  • Windows Phone 7 Data Security

        • Every app on a WP7 phone gets its own Encryption Key
        • DPAPI generates and securely stores this for you
        • Calling Protect() or Unprotect() implicitly selects the apps key
        • optionalEntropy parameter can be used to provide extra entropy




Friday, 7 September 2012
Windows Phone 7 Application Security


  • Encrypted Data Code Sample




Friday, 7 September 2012
Windows Phone 7 Application Security


  • Windows Phone 7 Data Security

        • Secure Communications is a lot easier!
        • Very little to do with the app code itself in my opinion
        • More to do with good design and a good security code review!
        • Data sent to web services, SQL Azure etc needs protection
        • No client side SSL certs allowed and no VPN functionality




Friday, 7 September 2012
Windows Phone 7 Application Security


  • Windows Phone 7 Authentication & Authorisation

        • Not just talking about app logon or service authentication
        • Specifically talking about access to data on the device
        • Gaining users authorisation before accessing sensitive data
        • This includes access to users contacts, SMS etc
        • I know we already "asked" in the WMAppManifest.xml file....




Friday, 7 September 2012
Windows Phone 7 Application Security


  • Windows Phone 7 Data Access/Privacy

        • Another one which isn’t a platform/framework specific
        • Understand the data accessed by third party libraries
        • Create a privacy policy covering personal data and stick to it!
        • Don’t store historical data on the device beyond required time
        • Audit app communications to check for data leaks




Friday, 7 September 2012
Windows Phone 8 Security


  • The good things

        • Shared Windows Core (NT Kernel on a phone)
        • Secure boot and Bitlocker on by default
        • Enterprise app deployment/management functionality
        • OTA updates for all phones for at least 18 months




Friday, 7 September 2012
Windows Phone 8 Security


  • The potentially bad things

        • Shared Windows Core (NT Kernel on a phone)
        • NFC and Wallet Hub
        • Native C and C++ code now available to everyone
        • Micro SD Card support but with no Bitlocker support




Friday, 7 September 2012
Application Security Workshop


  • Free Application Security Workshop at Realex

  • 27th September in our Dublin office

  • Secure coding: why and how

  • Think like a pen tester

  • Security focused code reviews


Friday, 7 September 2012
QUESTIONS?
             www.securityninja.co.uk
   http://sourceforge.net/projects/agnitiotool/

                    @securityninja

                     /realexninja

                     /securityninja

                     /realexninja



Friday, 7 September 2012

More Related Content

What's hot

MeeGo AppLab Desktop Summit 2011 - Submission and Validation
MeeGo AppLab Desktop Summit 2011 - Submission and ValidationMeeGo AppLab Desktop Summit 2011 - Submission and Validation
MeeGo AppLab Desktop Summit 2011 - Submission and Validation
Intel Developer Zone Community
 
Mobile Operating System
Mobile Operating SystemMobile Operating System
Mobile Operating System
Sonal Poddar
 
Android
AndroidAndroid
Android
davs7
 
Android OS and its Features
Android OS and its FeaturesAndroid OS and its Features
Android OS and its Features
Harshad Lokhande
 
Android technology
Android technology Android technology
Android technology
vikas malviya
 
Ultrabook Developer Resources - Intel AppLab Berlin
Ultrabook Developer Resources - Intel AppLab BerlinUltrabook Developer Resources - Intel AppLab Berlin
Ultrabook Developer Resources - Intel AppLab Berlin
Intel Developer Zone Community
 
Android
AndroidAndroid
Android
AndroidAndroid
Android
Jindal Gohil
 
Operating systems essentials & Android OS concepts
Operating systems essentials & Android OS conceptsOperating systems essentials & Android OS concepts
Operating systems essentials & Android OS concepts
Mohamed Taman
 
Intel AppUp Webinar Italiano General Information
Intel AppUp Webinar Italiano General InformationIntel AppUp Webinar Italiano General Information
Intel AppUp Webinar Italiano General Information
Intel Developer Zone Community
 
Android app development ppt
Android app development pptAndroid app development ppt
Android app development ppt
saitej15
 
PPT on Android
PPT on AndroidPPT on Android
PPT on Android
Subhadip Chakraborty
 
Mobile operating systems
Mobile operating systemsMobile operating systems
Mobile operating systems
Nicolas Demetriou
 
Android Report
Android ReportAndroid Report
Android Report
Ganesh Waghmare
 
Android Workshop Session 1
Android Workshop Session 1Android Workshop Session 1
Android Workshop Session 1
NAILBITER
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
GoogleTecTalks
 
Versions of Android OS
Versions of Android OSVersions of Android OS
Versions of Android OS
Haseeb
 
18th android intro
18th android intro18th android intro
18th android intro
Rahulpreet Singh
 
Android architecture
Android architectureAndroid architecture
Android architecture
Kartik Kalpande Patil
 
Android architechture
Android architechtureAndroid architechture
Android architechture
Yojana Nanaware
 

What's hot (20)

MeeGo AppLab Desktop Summit 2011 - Submission and Validation
MeeGo AppLab Desktop Summit 2011 - Submission and ValidationMeeGo AppLab Desktop Summit 2011 - Submission and Validation
MeeGo AppLab Desktop Summit 2011 - Submission and Validation
 
Mobile Operating System
Mobile Operating SystemMobile Operating System
Mobile Operating System
 
Android
AndroidAndroid
Android
 
Android OS and its Features
Android OS and its FeaturesAndroid OS and its Features
Android OS and its Features
 
Android technology
Android technology Android technology
Android technology
 
Ultrabook Developer Resources - Intel AppLab Berlin
Ultrabook Developer Resources - Intel AppLab BerlinUltrabook Developer Resources - Intel AppLab Berlin
Ultrabook Developer Resources - Intel AppLab Berlin
 
Android
AndroidAndroid
Android
 
Android
AndroidAndroid
Android
 
Operating systems essentials & Android OS concepts
Operating systems essentials & Android OS conceptsOperating systems essentials & Android OS concepts
Operating systems essentials & Android OS concepts
 
Intel AppUp Webinar Italiano General Information
Intel AppUp Webinar Italiano General InformationIntel AppUp Webinar Italiano General Information
Intel AppUp Webinar Italiano General Information
 
Android app development ppt
Android app development pptAndroid app development ppt
Android app development ppt
 
PPT on Android
PPT on AndroidPPT on Android
PPT on Android
 
Mobile operating systems
Mobile operating systemsMobile operating systems
Mobile operating systems
 
Android Report
Android ReportAndroid Report
Android Report
 
Android Workshop Session 1
Android Workshop Session 1Android Workshop Session 1
Android Workshop Session 1
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
 
Versions of Android OS
Versions of Android OSVersions of Android OS
Versions of Android OS
 
18th android intro
18th android intro18th android intro
18th android intro
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
Android architechture
Android architechtureAndroid architechture
Android architechture
 

Viewers also liked

Developing secure web applications
Developing secure web applicationsDeveloping secure web applications
Developing secure web applications
Security Ninja
 
Hack in Paris - Agnitio
Hack in Paris - AgnitioHack in Paris - Agnitio
Hack in Paris - Agnitio
Security Ninja
 
Hack in Paris 2013
Hack in Paris 2013Hack in Paris 2013
Hack in Paris 2013
Security Ninja
 
The Security Risks of Web 2.0 - DEF CON 17
The Security Risks of Web 2.0 - DEF CON 17The Security Risks of Web 2.0 - DEF CON 17
The Security Risks of Web 2.0 - DEF CON 17
Security Ninja
 
The Principles of Secure Development - Epicenter Dublin
The Principles of Secure Development - Epicenter DublinThe Principles of Secure Development - Epicenter Dublin
The Principles of Secure Development - Epicenter Dublin
Security Ninja
 
SecurityBSides London - Agnitio: it's static analysis but not as we know it
SecurityBSides London - Agnitio: it's static analysis but not as we know itSecurityBSides London - Agnitio: it's static analysis but not as we know it
SecurityBSides London - Agnitio: it's static analysis but not as we know it
Security Ninja
 
SecurityBSides las vegas - Agnitio
SecurityBSides las vegas - AgnitioSecurityBSides las vegas - Agnitio
SecurityBSides las vegas - Agnitio
Security Ninja
 

Viewers also liked (7)

Developing secure web applications
Developing secure web applicationsDeveloping secure web applications
Developing secure web applications
 
Hack in Paris - Agnitio
Hack in Paris - AgnitioHack in Paris - Agnitio
Hack in Paris - Agnitio
 
Hack in Paris 2013
Hack in Paris 2013Hack in Paris 2013
Hack in Paris 2013
 
The Security Risks of Web 2.0 - DEF CON 17
The Security Risks of Web 2.0 - DEF CON 17The Security Risks of Web 2.0 - DEF CON 17
The Security Risks of Web 2.0 - DEF CON 17
 
The Principles of Secure Development - Epicenter Dublin
The Principles of Secure Development - Epicenter DublinThe Principles of Secure Development - Epicenter Dublin
The Principles of Secure Development - Epicenter Dublin
 
SecurityBSides London - Agnitio: it's static analysis but not as we know it
SecurityBSides London - Agnitio: it's static analysis but not as we know itSecurityBSides London - Agnitio: it's static analysis but not as we know it
SecurityBSides London - Agnitio: it's static analysis but not as we know it
 
SecurityBSides las vegas - Agnitio
SecurityBSides las vegas - AgnitioSecurityBSides las vegas - Agnitio
SecurityBSides las vegas - Agnitio
 

Similar to Owasp App Sec Ireland Windows Phone 7 Security

1319571 634635606205391250
1319571 6346356062053912501319571 634635606205391250
1319571 634635606205391250
MadNor Exe
 
2011 android
2011 android2011 android
2011 android
vpedapolu
 
WinWire webinar: Converting iPad apps to Windows Store apps
WinWire webinar: Converting iPad apps to Windows Store appsWinWire webinar: Converting iPad apps to Windows Store apps
WinWire webinar: Converting iPad apps to Windows Store apps
WinWire Technologies Inc
 
Android
AndroidAndroid
Android ppt
Android pptAndroid ppt
Android ppt
srikanth982
 
android architecture
android architectureandroid architecture
android architecture
Aashita Gupta
 
Gl android platform
Gl android platformGl android platform
Gl android platform
Pragya Rastogi
 
What is Android
What is Android What is Android
What is Android
SanjayKumar330366
 
Developing for Windows Phone 8 and Windows 8
Developing for Windows Phone 8 and Windows 8Developing for Windows Phone 8 and Windows 8
Developing for Windows Phone 8 and Windows 8
Dave Bost
 
Google chrome
Google chromeGoogle chrome
Google chrome
Nayana_Bingi
 
ANDROID
ANDROIDANDROID
ANDROID
Ranjan Som
 
Android 130923124440-phpapp01
Android 130923124440-phpapp01Android 130923124440-phpapp01
Android 130923124440-phpapp01
rajesh kumar
 
Windows mobile
Windows mobileWindows mobile
Windows mobile
Shehrevar Davierwala
 
Introduction of android
Introduction of androidIntroduction of android
Introduction of android
Naret Su
 
09 09-2013 android-introduction p_pt
09 09-2013 android-introduction p_pt09 09-2013 android-introduction p_pt
09 09-2013 android-introduction p_pt
TOPS Technologies
 
Basic of Android App Development
Basic of Android App DevelopmentBasic of Android App Development
Basic of Android App Development
Abhijeet Gupta
 
Google Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talkGoogle Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talk
Imam Raza
 
Mobile trends and impressions
Mobile trends and impressionsMobile trends and impressions
Mobile trends and impressions
Shafaq Abdullah
 
Android and android versions
Android and android versionsAndroid and android versions
Android and android versions
Megha Jain
 
Android Technology
Android TechnologyAndroid Technology
Android Technology
R
 

Similar to Owasp App Sec Ireland Windows Phone 7 Security (20)

1319571 634635606205391250
1319571 6346356062053912501319571 634635606205391250
1319571 634635606205391250
 
2011 android
2011 android2011 android
2011 android
 
WinWire webinar: Converting iPad apps to Windows Store apps
WinWire webinar: Converting iPad apps to Windows Store appsWinWire webinar: Converting iPad apps to Windows Store apps
WinWire webinar: Converting iPad apps to Windows Store apps
 
Android
AndroidAndroid
Android
 
Android ppt
Android pptAndroid ppt
Android ppt
 
android architecture
android architectureandroid architecture
android architecture
 
Gl android platform
Gl android platformGl android platform
Gl android platform
 
What is Android
What is Android What is Android
What is Android
 
Developing for Windows Phone 8 and Windows 8
Developing for Windows Phone 8 and Windows 8Developing for Windows Phone 8 and Windows 8
Developing for Windows Phone 8 and Windows 8
 
Google chrome
Google chromeGoogle chrome
Google chrome
 
ANDROID
ANDROIDANDROID
ANDROID
 
Android 130923124440-phpapp01
Android 130923124440-phpapp01Android 130923124440-phpapp01
Android 130923124440-phpapp01
 
Windows mobile
Windows mobileWindows mobile
Windows mobile
 
Introduction of android
Introduction of androidIntroduction of android
Introduction of android
 
09 09-2013 android-introduction p_pt
09 09-2013 android-introduction p_pt09 09-2013 android-introduction p_pt
09 09-2013 android-introduction p_pt
 
Basic of Android App Development
Basic of Android App DevelopmentBasic of Android App Development
Basic of Android App Development
 
Google Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talkGoogle Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talk
 
Mobile trends and impressions
Mobile trends and impressionsMobile trends and impressions
Mobile trends and impressions
 
Android and android versions
Android and android versionsAndroid and android versions
Android and android versions
 
Android Technology
Android TechnologyAndroid Technology
Android Technology
 

More from Security Ninja

The Realex Payments Application Story
The Realex Payments Application StoryThe Realex Payments Application Story
The Realex Payments Application Story
Security Ninja
 
OWASP Birmingham - Mobile Application Security
OWASP Birmingham - Mobile Application SecurityOWASP Birmingham - Mobile Application Security
OWASP Birmingham - Mobile Application Security
Security Ninja
 
BruCON Agnitio Workshop
BruCON Agnitio WorkshopBruCON Agnitio Workshop
BruCON Agnitio Workshop
Security Ninja
 
SecurityBSides London - Jedi mind tricks for building application security pr...
SecurityBSides London - Jedi mind tricks for building application security pr...SecurityBSides London - Jedi mind tricks for building application security pr...
SecurityBSides London - Jedi mind tricks for building application security pr...
Security Ninja
 
Application security and PCI DSS
Application security and PCI DSSApplication security and PCI DSS
Application security and PCI DSS
Security Ninja
 
Injecting simplicity not SQL RSA Europe 2010
Injecting simplicity not SQL RSA Europe 2010Injecting simplicity not SQL RSA Europe 2010
Injecting simplicity not SQL RSA Europe 2010
Security Ninja
 
Injecting simplicity not SQL BSides Las Vegas 2010
Injecting simplicity not SQL BSides Las Vegas 2010Injecting simplicity not SQL BSides Las Vegas 2010
Injecting simplicity not SQL BSides Las Vegas 2010
Security Ninja
 
The Principles of Secure Development - BSides Las Vegas 2009
The Principles of Secure Development - BSides Las Vegas 2009The Principles of Secure Development - BSides Las Vegas 2009
The Principles of Secure Development - BSides Las Vegas 2009
Security Ninja
 
The Principles of Secure Development
The Principles of Secure DevelopmentThe Principles of Secure Development
The Principles of Secure Development
Security Ninja
 
Owasp talk-november-08
Owasp talk-november-08Owasp talk-november-08
Owasp talk-november-08
Security Ninja
 

More from Security Ninja (10)

The Realex Payments Application Story
The Realex Payments Application StoryThe Realex Payments Application Story
The Realex Payments Application Story
 
OWASP Birmingham - Mobile Application Security
OWASP Birmingham - Mobile Application SecurityOWASP Birmingham - Mobile Application Security
OWASP Birmingham - Mobile Application Security
 
BruCON Agnitio Workshop
BruCON Agnitio WorkshopBruCON Agnitio Workshop
BruCON Agnitio Workshop
 
SecurityBSides London - Jedi mind tricks for building application security pr...
SecurityBSides London - Jedi mind tricks for building application security pr...SecurityBSides London - Jedi mind tricks for building application security pr...
SecurityBSides London - Jedi mind tricks for building application security pr...
 
Application security and PCI DSS
Application security and PCI DSSApplication security and PCI DSS
Application security and PCI DSS
 
Injecting simplicity not SQL RSA Europe 2010
Injecting simplicity not SQL RSA Europe 2010Injecting simplicity not SQL RSA Europe 2010
Injecting simplicity not SQL RSA Europe 2010
 
Injecting simplicity not SQL BSides Las Vegas 2010
Injecting simplicity not SQL BSides Las Vegas 2010Injecting simplicity not SQL BSides Las Vegas 2010
Injecting simplicity not SQL BSides Las Vegas 2010
 
The Principles of Secure Development - BSides Las Vegas 2009
The Principles of Secure Development - BSides Las Vegas 2009The Principles of Secure Development - BSides Las Vegas 2009
The Principles of Secure Development - BSides Las Vegas 2009
 
The Principles of Secure Development
The Principles of Secure DevelopmentThe Principles of Secure Development
The Principles of Secure Development
 
Owasp talk-november-08
Owasp talk-november-08Owasp talk-november-08
Owasp talk-november-08
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 

Owasp App Sec Ireland Windows Phone 7 Security

  • 1. David Rook Windows Phone 7 Security OWASP AppSec Ireland Friday, 7 September 2012
  • 2. if (slide == introduction) System.out.println("I’m David Rook"); • Application Security Lead, Realex Payments, Dublin CISSP, CISA, GCIH and many other acronyms • Security Ninja (@securityninja) • Speaker at developer and security conferences • Microsoft Developer Security MVP • SC Magazine Information Security Rising Star 2012 • Developed and released Agnitio and the WPAA Friday, 7 September 2012
  • 3. Agenda • Smartphones and apps - big numbers, little security? • Windows Phone 7 introduction • Windows Phone 7 platform security • Windows Phone 7 application security Friday, 7 September 2012
  • 4. Mobile device sales 2011 472 million Smartphones 31% Mobile 69% 1.3 billion Source: http://www.gartner.com/it/page.jsp?id=1924314 Friday, 7 September 2012
  • 5. Smartphone OS market share 2011 Microsoft 2% RIM 9% Symbian 12% Android 51% iOS 24% Source: http://www.gartner.com/it/page.jsp?id=2120015 Friday, 7 September 2012
  • 6. Smartphone OS market share 2011 • Microsoft has 1.9% of the smartphone market share • Smaller market share than something called Bada Friday, 7 September 2012
  • 7. Smartphone OS market share 2011 Friday, 7 September 2012
  • 8. Smartphone OS market share 2011 • Microsoft has 1.9% of the smartphone market share • Smaller market share than something called Bada • Should I even continue with this talk about Windows Phone 7? • Similar approach to Android with many devices available Friday, 7 September 2012
  • 9. Smartphone OS market share 2011 Friday, 7 September 2012
  • 10. Smartphone OS market share 2011 • Microsoft has 1.9% of the smartphone market share • Smaller market share than something called Bada • Should I even continue with this talk about Windows Phone 7? • Similar approach to Android with many devices available • IDC predict that they will have 20% market share by 2015 Friday, 7 September 2012
  • 11. Smartphone OS market share 2011 Friday, 7 September 2012
  • 12. Smartphone OS market share 2011 • Microsoft has 1.9% of the smartphone market share • Smaller market share than something called Bada • Should I even continue with this talk about Windows Phone 7? • Similar approach to Android with many devices available • IDC predict that it will have 20% market share by 2015 • 20% is unlikely but it’s market share will increase in my opinion Friday, 7 September 2012
  • 13. Smartphone OS market share 2011 Friday, 7 September 2012
  • 14. Windows Phone 7 Introduction • The smartphone from Microsoft • First released in late 2010 with 7 updates since then • Based on Windows Embedded Compact v6 and v7 • Minimum “tough but fair” hardware requirements • Apps only available via the Windows Phone Marketplace • Specifically aimed at the consumer market not enterprise Friday, 7 September 2012
  • 15. Windows Phone 7 Introduction Friday, 7 September 2012
  • 16. Windows Phone 7 Introduction • .NET Compact Framework • Version of the .NET framework for resource constrained devices • Some of the same classes and some mobile specific ones • Compiler translates your code into Intermediate Language • Apps are JIT compiled and executed by the .NET CLR • Only managed .NET code allowed in your apps* Friday, 7 September 2012
  • 17. Windows Phone 7 Introduction private void button1_Click(object sender, RoutedEventArgs e)         {             MessageBox.Show("Hello OWASP AppSec Ireland!");         } C# Compiler Managed Module .NET CLR Friday, 7 September 2012
  • 18. Windows Phone 7 Introduction • Windows Phone 7 Kernel Architecture • 32bit OS that runs inside a 4GB virtual address space • 2GB allocated to the kernel and 2GB to process executing • That isn’t quite true, the process executing only gets 1GB • 1GB is for components commonly mapped into all processes Friday, 7 September 2012
  • 19. Windows Phone 7 Introduction • Windows Phone 7 Kernel Architecture APPLICATIONS Space User TELSHELL.EXE UDEVICES.EXE SERVICESD.EXE CPROG.EXE COREDLL/WINSOCK/COMMCRL/WININET kCoreDLL.DLL KERNEL.DLL Kernel Space FILESYS.DLL Device.DLL GWES Network OAL.EXE FSDMGR.DLL Drivers Hardware Friday, 7 September 2012
  • 20. Windows Phone 7 Introduction Process Code Process Space 2GB User DLLs Memory Mapped Files GWES Kernel Space Drivers 2GB File System Kernel Friday, 7 September 2012
  • 21. Windows Phone 7 Introduction Shared System Heap 256MB processes across all Common RAM Backed Mapfiles 256MB Process Memory Shared User DLLs 2GB 512MB Private to process each Process Space 1GB per process Friday, 7 September 2012
  • 22. Windows Phone 7 Platform Security • Windows Phone 7 Security Model • Chambers concept to enforce app isolation and least privilege • The chambers provide a security boundary to restrict the apps • Four chambers and apps run in one of them • Three chambers have fixed permission sets • The fourth chamber is capabilities based Friday, 7 September 2012
  • 23. Windows Phone 7 Platform Security Trusted Computing Base (TCB) Elevated Rights Fixed permissions Chamber (ERC) Standard Rights Chamber (SRC) Least Privileged Capabilities based Chamber (LPC) Friday, 7 September 2012
  • 24. Windows Phone 7 Platform Security Trusted Computing Base (TCB) • The kernel and kernel-mode drivers run in the TCB chamber • Allows processes to have unrestricted access to most resources • The TCB chamber can modify policy and enforce the security model • Only Microsoft can add signed software to the TCB chamber Friday, 7 September 2012
  • 25. Windows Phone 7 Platform Security Elevated Rights Chamber (ERC) • User-mode drivers and services runs in this chamber • Can access all resources except security policy • Intended for services and user-mode drivers • Only Microsoft can add signed software to the ERC chamber Friday, 7 September 2012
  • 26. Windows Phone 7 Platform Security Standard Rights Chamber (SRC) • The default chamber for pre-installed MS and OEM applications • Apps that do not provide device-wide services run in the SRC Friday, 7 September 2012
  • 27. Windows Phone 7 Platform Security Least Privileged Chamber (LPC) • The default chamber for all non-Microsoft applications • Least Privileged Chambers are configured using capabilities • Capabilities listed in applications WMAppManifest.xml file Friday, 7 September 2012
  • 28. Windows Phone 7 Platform Security • Windows Phone 7 Application Capabilities • Application capabilities are features that an app uses • Apps request permission to access protected APIs during the deployment process • Default app manifest file includes a list of all the capabilities* • WP7 grants security permissions based on the contents of your WMAppManifest.xml file* • Not everything your app does needs a capability defined Friday, 7 September 2012
  • 29. Windows Phone 7 Platform Security • Windows Phone 7 Application Capabilities • Capability checks are enforced at runtime • Permission set for the apps LPC is created based on the capabilities • Requests for other resources == UnauthorizedAccessException • This exception occurs when the access is attempted not when the app is executed Friday, 7 September 2012
  • 30. Windows Phone 7 Platform Security Friday, 7 September 2012
  • 31. Windows Phone 7 Platform Security • Windows Phone 7 Capabilities Detection Demo Friday, 7 September 2012
  • 32. Windows Phone 7 Platform Security • Windows Phone 7 Application Signing • Apart from developer unlocked devices apps must be signed • Microsoft automatically signs approved apps • Apps must have a valid Microsoft signature to be installed Friday, 7 September 2012
  • 34. Windows Phone 7 Platform Security • Windows Phone 7 Application Sandboxing • Apps execute within a restricted LPC as we saw earlier • Cannot communicate with other apps on the phone • Sandboxed apps aren’t allowed to run in the background • No access to native code from within the sandbox • All I/O operations are restricted to per app Isolated Storage Friday, 7 September 2012
  • 35. Windows Phone 7 Platform Security • Windows Phone 7 Application Isolated Storage • Per app Isolated Storage allows apps to keep data “private” • Very similar to Isolated Storage in Silverlight • No direct access to the file system • No access to other apps Isolated Storage • Three different ways to use your apps Isolated Storage Friday, 7 September 2012
  • 36. Windows Phone 7 Platform Security Friday, 7 September 2012
  • 37. Windows Phone 7 Application Security • Windows Phone 7 Application Security • Mobile application security introduces almost no new issues • Forget about specific vulnerabilities for one minute • Think about the root causes of vulnerabilities, I’ll give you a hand Friday, 7 September 2012
  • 38. Windows Phone 7 Application Security • Input Validation • Output Validation • Error Handling • Authentication and Authorisation • Secure Storage • Secure Communications • Session Management • Secure Resource Access • Auditing and Logging • Privacy Friday, 7 September 2012
  • 39. Windows Phone 7 Application Security • Windows Phone 7 Application Security • Mobile application security introduces almost no new issues • Forget about specific vulnerabilities for one minute • Think about the root causes of vulnerabilities, I’ll give you a hand • From that list what do you think the top 3 are? • My top 3 are: • Secure Storage • Authentication and Authorisation • Secure Resource Access/Privacy Friday, 7 September 2012
  • 40. Windows Phone 7 Application Security • OWASP Top 10 Mobile Risks • I compared the OWASP top 10 mobile risks to my list • 50% Secure Storage/Secure Communications • 20% Authentication and Authorisation • 0% Privacy* Friday, 7 September 2012
  • 41. Windows Phone 7 Application Security • OWASP Mobile Controls • Lists the mobile app security controls you should implement • I compared each control to the list I showed you, guess what? • 26% Secure Storage • 16% Secure Communications • 16% Authentication and Authorisation • 16% Secure Resource Access* Friday, 7 September 2012
  • 42. Windows Phone 7 Application Security • My top 3 in the real world • Secure Storage: Facebook, Citibank, LinkedIn, Google Wallet • A&A: Foodspotting, Google Wallet, Google (multiple apps) • SRA/Privacy: Path, Hipster, Ad Libraries • This doesn’t mean we can ignore all of the other issues Friday, 7 September 2012
  • 43. Windows Phone 7 Application Security • Preventing the top 3 in your WP7 apps • I can’t cover every principle in this talk • With that in mind I'm grouping them to make a "new" top 3 • Data Security - Secure Storage and Communications • Authentication and Authorisation • Data Access/Privacy Friday, 7 September 2012
  • 44. Windows Phone 7 Application Security • Windows Phone 7 Data Security • Never store data on the device if it really isn’t needed • WP7 allows us to encrypt data and databases • Only new databases can be encrypted but very easy to do • DPAPI is used for file/password/pin etc encryption • No hashing available and no algorithm selection Friday, 7 September 2012
  • 45. Windows Phone 7 Application Security • Windows Phone 7 Data Security • The local database encryption is based on a password • You create a DB in code and you must include the password • The database is encrypted using AES-128 • The password is hashed using SHA-256 • An encrypted database can be created with two lines of code Friday, 7 September 2012
  • 46. Windows Phone 7 Application Security // Create the data context, specify the database file location and password DavesDataContext db = new DavesDataContext ("Data Source=isostore:/NinjaSecrets.sdf;Password=NinjaPassword"); // Create an encrypted database after confirming that it does not exist if (!db.DatabaseExists()) db.CreateDatabase(); Friday, 7 September 2012
  • 47. Windows Phone 7 Application Security • Windows Phone 7 Data Security • Saving data to an apps isolated storage is not secure • If you want to encrypt data and not a DB you use the DPAPI • Use the System.Security.Cryptography.ProtectedData class • Specifically the Protect() and Unprotect() methods • Symmetric encryption (AES) used. Hashing isn’t possible Friday, 7 September 2012
  • 48. Windows Phone 7 Application Security • Windows Phone 7 Data Security • Every app on a WP7 phone gets its own Encryption Key • DPAPI generates and securely stores this for you • Calling Protect() or Unprotect() implicitly selects the apps key • optionalEntropy parameter can be used to provide extra entropy Friday, 7 September 2012
  • 49. Windows Phone 7 Application Security • Encrypted Data Code Sample Friday, 7 September 2012
  • 50. Windows Phone 7 Application Security • Windows Phone 7 Data Security • Secure Communications is a lot easier! • Very little to do with the app code itself in my opinion • More to do with good design and a good security code review! • Data sent to web services, SQL Azure etc needs protection • No client side SSL certs allowed and no VPN functionality Friday, 7 September 2012
  • 51. Windows Phone 7 Application Security • Windows Phone 7 Authentication & Authorisation • Not just talking about app logon or service authentication • Specifically talking about access to data on the device • Gaining users authorisation before accessing sensitive data • This includes access to users contacts, SMS etc • I know we already "asked" in the WMAppManifest.xml file.... Friday, 7 September 2012
  • 52. Windows Phone 7 Application Security • Windows Phone 7 Data Access/Privacy • Another one which isn’t a platform/framework specific • Understand the data accessed by third party libraries • Create a privacy policy covering personal data and stick to it! • Don’t store historical data on the device beyond required time • Audit app communications to check for data leaks Friday, 7 September 2012
  • 53. Windows Phone 8 Security • The good things • Shared Windows Core (NT Kernel on a phone) • Secure boot and Bitlocker on by default • Enterprise app deployment/management functionality • OTA updates for all phones for at least 18 months Friday, 7 September 2012
  • 54. Windows Phone 8 Security • The potentially bad things • Shared Windows Core (NT Kernel on a phone) • NFC and Wallet Hub • Native C and C++ code now available to everyone • Micro SD Card support but with no Bitlocker support Friday, 7 September 2012
  • 55. Application Security Workshop • Free Application Security Workshop at Realex • 27th September in our Dublin office • Secure coding: why and how • Think like a pen tester • Security focused code reviews Friday, 7 September 2012
  • 56. QUESTIONS? www.securityninja.co.uk http://sourceforge.net/projects/agnitiotool/ @securityninja /realexninja /securityninja /realexninja Friday, 7 September 2012