SlideShare a Scribd company logo
1 of 37
Windows Phone 8 Security & 
Testing WP8 Apps 
Jorge Orchilles 
1
whoami 
• Advanced PenTest & QC – Large Financial 
• Master of Science and BBA in Management Information 
Systems – Florida International University 
• Author – Microsoft Windows 7 Administrator’s Reference 
(Syngress) 
• Certifications – GXPN, CISM, CISSP, GPEN, GCIH, CEH, 
CICP, CCDA, CSSDS, MCTS, MCP, Security+, CISM 
• SANS Instructor – SEC504, SEC560, SEC577 
• Organizations 
– Director - South Florida ISSA 
– Member - OWASP, InfraGard, Miami Electronic Crimes Task Force, 
Hack Miami 
2
Microsoft has a phone? 
• Windows Phone 8 (WP8) – used to be called 
Windows Mobile until 7.x 
– Released Oct 2012 
– ARM Hardware Architecture (like iOS, Android, and 
Blackberry) 
– Windows Phone Runtime Application Architecture 
• Developer apps work on both Windows 8 and WP8 
– Windows NT kernel 
• Windows Phone 8.1 recently released 
– Fixed 1.5 of 3 issues found in my original research
Understand the platform 
• WP7 uses Windows CE kernel 
• WP8 uses NT Kernel 
– 128-bit BitLocker for device encryption 
– NTFS file system 
– Sandboxed apps 
– SafeBoot: Secure UEFI Boot 
• Can’t boot software without correct digital signature to be loaded 
on the phone 
• TPM 2.0 – requires unique keys to be burned into chip during 
production 
– WP8 binaries must have Microsoft signed digital signatures
Chambers 
• Trusted Computing Base (TCB) 
– Kernel & kernel-mode drivers 
• Least Privileged Chamber (LPC) 
– Services 
– Apps
Capabilities
App Sandboxing 
• Each app has a local isolated storage 
• Limited app-to-app communication 
• App A cannot see App B storage 
• App folder has: 
– Settings 
– Files 
– Directories 
– Database
Jailbreak? 
• WP8 is closed OS, just like most things M$ 
• No jailbreak yet – some activities you would like to do 
for mobile device testing will not be possible 
– Access to memory 
– Local file system and storage 
– Transfer files to and from device
What would a JB look like? 
• Exploit a vulnerability 
– Client side vulnerability for IE 10 or 11 
• Escalate privilege to SYSTEM 
• Bypass SecureBoot 
• Disable application code signing 
• Create a trusted app store certificate
What we can test 
• Application Logic 
• Server side 
• Client side 
• Local app storage – requires XAP file 
• Local app configuration – requires XAP file
Prerequisites 
• Physical Device or Emulator 
• Windows Phone SDK 
• Unlocking the device 
• XAP file or app 
• HTTP Proxy
Physical or Emulator 
• Prefer physical – devices are cheap 
– Nokia Lumia 920 
• Emulator 
– Hyper-V images 
– x86 instead of ARM 
– Fake binaries 
• FakeLed.sys, FakeModem.dll 
– Different browser user-agent 
– Cannot install apps from Store
Windows Phone SDK 
• Requires Windows 8 64-bit w/Hyper-V enabled 
– For VM, set hypervisor.cpuid.v0 = “FALSE” 
– Control Panel – Programs – Turn Windows Features on or off 
– Check Hyper-V 
• Free at http://dev.windowsphone.com 
• Emulator is installed as part of SDK 
– C:Program Files (x86)Microsoft XDE8.0XDE.exe 
• Visual Studio Express 2012
Unlock the Device 
• For physical devices only 
• Must unlock the device to be able to side load apps 
• Join the dev program (lifetime membership now) 
– $19 allows 3 side loaded apps 
– $99 dev account allows 10 side loaded app 
– $399 company trusted cert for enterprise app store 
• Register it on dev.windowsphone.com
XAP File 
• Windows Phone App file: .xap 
– Used for Silverlight apps as well 
• Contains an App.Manifest.xaml 
– Defines assemblies and DLLs that get deployed 
• XAP files downloaded from Store come with 
PlayReady DRM 
– DRM is added by the marketplace in realtime, based on the 
LiveID cookie value 
– Encrypted XAP files will not run in emulator 
• Request XAP from developers
DRM vs. No DRM
Side loading apps 
• Defined: installing applications on your device without 
going through the official Store 
• Use SDK or Windows Phone Power Tools 
• Live Demo 
• If fail then video
Methodology 
• Information Gathering 
– Describes the steps and things to consider when you are in 
the early stage reconnaissance and mapping phases of 
testing as well as determining the application’s magnitude of 
effort and scoping. 
• Dynamic Analysis 
– Executing an application either on the device itself or within a 
simulator/emulator and interacting with the remote services 
with which the application communicates. This includes 
assessing the application’s local inter process 
communication surface, forensic analysis of the local file 
system, and assessing remote service dependencies. 
• Static Analysis 
– Analyzing raw mobile source code, decompile or 
disassembled code.
Information Gathering 
• First step of any assessment! 
– Understand what you are testing 
• App is installed right? 
– Side loaded or from Store 
• Learn how the app works
Information Gathering 
• Navigate through the application 
– This will expose you to the application as an end user would use it. 
Tap through all the different features, look at the settings, etc. This 
may be performed on the device or in the emulator as we covered in 
previous sections. 
• Identify the network interfaces used 
– Does the application require internet connectivity? If so, does it work 
through Wi-Fi only, SIM only? Does the application use bluetooth, 
NFC, a VPN? 
• Does the application take your input? Any sensitive information? 
Does it access any sensitive information? 
• Does the application perform transactions? In-app purchases? 
Credit card or payment information? 
• What other components does the application interact with? 
Contact list, calendar, camera, location? 
• Do some reconnaissance. Has this app been talked about 
already? Search Google, app store reviews, etc.
Vulnerabilities? 
• No application pass code 
– Does the app reveal sensitive information that requires 
authentication? Should it have it’s own pass code. This may 
be a consideration for apps storing company data while the 
devices are BYOD and don’t require a device pass code. 
• Weak pass code 
– Does the app enforce good password policies? 
– Minimum of how many characters? 
– Complexity? 
– Password rotation? 
– Password lock out? 
• Sensitive information stored on disk 
– Does the app request sensitive information from the end user 
and then store it?
Dynamic Testing 
• Use an HTTP proxy to see traffic 
– Install cert to see HTTPS 
• If traffic is not HTTP(s) 
– Perform MiTM 
• Mallory 
• Access Point 
• ARP Poisoning 
• Cannot do VPN!
HTTP Proxy 
• Notice no authentication for 
HTTP proxy! 
– Corporate proxies should 
require authentication 
– Fixed in 8.1 for corporate 
deployments
Now you see traffic!
Generate SSL Cert 
• Email it to yourself 
• Save it on SkyDrive and access it from IE (remember 
App Sandboxing won’t allow you to install the cert 
onto the device if it is opened with SkyDrive App) 
• Transfer it via USB 
• Host it on a web server and browse to it with IE
Install SSL Cert 
• Note there is no digital 
certificate management 
• Your device will accept this 
cert as valid until expiration
If Emulator 
• Windows Phone 8 emulator is a Hyper-V virtual 
machine with it’s own IP address. 
• This means the network traffic will route from the 
virtual machine (emulator) to your Windows 8 system 
running the SDK and then out to the Internet. 
• The easiest way to configure the emulator to use a 
proxy is to configure the Windows 8 system’s IE proxy 
settings.
If Emulator
More Information Gathering 
• Can you determine anything about the server side application 
environment? 
– Hosting provider (AWS, App Engine, Heroku, Rackspace, Azure, etc.) 
– Development environment (Rails, Java, Django, ASP.NET, etc.) 
– Does the application leverage Single Sign On or Authentication APIs 
(Google Apps, Facebook, iTunes, OAuth, etc.) 
– Any other APIs in use 
• Payment gateways 
• SMS messaging 
• Social networks 
• Cloud file storage 
• Ad networks 
• Perform a thorough crawl of exposed web resources and sift 
through the requests and responses to identify potentially 
interesting data or behavior 
– Leaking sensitive information (i.e. credentials) in the response 
– Resources not exposed through the UI 
– Error messages 
– Cacheable information
More Vulnerabilities 
• Encryption not enforced 
– I prefer always enforcing HTTPS even for non-sensitive data. 
Most end users connect to any free/untrusted WiFi and 
modifying HTTP data is trivial. 
– More of an integrity issue than confidentiality 
• Sensitive information sent in clear text 
– Credentials sent over HTTP instead of HTTPS 
• Digital Certificate not validated 
– Does the app accept the invalid cert and send sensitive 
information? 
– No warning on invalid digital certificate 
• Basic Authentication used 
• No Mutual Authentication
HTTPS for EVERYTHING 
• Traditionally, encryption was used to maintain 
confidentiality 
• With mobile apps, you also need to maintain Integrity 
• Push for everything being HTTPS 
• OR ELSE
No HTTPS… Stock market crash
Local Storage 
• Only works if XAP was provided 
• Live Demo 
• Or video
Static Analysis 
• Requires XAP with no DRM 
• Decompile apps 
– XAML Spy - commercial 
• ILSPY - free 
• JustDecompile 
• .NET Reflector - commercial 
– Tangerine - free
New in Windows Phone 8.1 
• VPN Connectivity 
• Enterprise Wi-FI 
– PEAP-MSCHAPv2 
– EAP-TLS 
– EAP-TTLS 
• Certificate Management 
– Only through MDM 
• Virtual Smart Cards for MFA 
• MDM 
– Remote Wipe 
– App allow and deny 
Presentation Title
Conclusion 
• WP8 is pretty secure 
• Complex attack surface 
• App testing is dependent on XAP file access 
• Server and Client side testing remains the similar to 
other mobile platforms
Questions? 
• http://orchilles.com/category/wp8/ 
• Thanks for your time and feedback! 
• Feel free to contact me 
jorge@orchilles.com 
@jorgeorchilles 
www.orchilles.com

More Related Content

What's hot

Analysis and research of system security based on android
Analysis and research of system security based on androidAnalysis and research of system security based on android
Analysis and research of system security based on android
Ravishankar Kumar
 
Threat Analysis on Win10 IoT Core and Recommaended Security Measures by Naohi...
Threat Analysis on Win10 IoT Core and Recommaended Security Measures by Naohi...Threat Analysis on Win10 IoT Core and Recommaended Security Measures by Naohi...
Threat Analysis on Win10 IoT Core and Recommaended Security Measures by Naohi...
CODE BLUE
 
Bypassing the Android Permission Model
Bypassing the Android Permission ModelBypassing the Android Permission Model
Bypassing the Android Permission Model
Georgia Weidman
 

What's hot (20)

Stealing sensitive data from android phones the hacker way
Stealing sensitive data from android phones   the hacker wayStealing sensitive data from android phones   the hacker way
Stealing sensitive data from android phones the hacker way
 
Android Security Overview and Safe Practices for Web-Based Android Applications
Android Security Overview and Safe Practices for Web-Based Android ApplicationsAndroid Security Overview and Safe Practices for Web-Based Android Applications
Android Security Overview and Safe Practices for Web-Based Android Applications
 
Смирнов Александр, Security in Android Application
Смирнов Александр, Security in Android ApplicationСмирнов Александр, Security in Android Application
Смирнов Александр, Security in Android Application
 
Permission in Android Security: Threats and solution
Permission in Android Security: Threats and solutionPermission in Android Security: Threats and solution
Permission in Android Security: Threats and solution
 
Android Security
Android SecurityAndroid Security
Android Security
 
Android security in depth
Android security in depthAndroid security in depth
Android security in depth
 
Understanding android security model
Understanding android security modelUnderstanding android security model
Understanding android security model
 
Deep Dive Into Android Security
Deep Dive Into Android SecurityDeep Dive Into Android Security
Deep Dive Into Android Security
 
Analysis and research of system security based on android
Analysis and research of system security based on androidAnalysis and research of system security based on android
Analysis and research of system security based on android
 
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin Magazine
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin MagazineNIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin Magazine
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin Magazine
 
Android security
Android securityAndroid security
Android security
 
Android secure offline storage - CC Mobile
Android secure offline storage - CC MobileAndroid secure offline storage - CC Mobile
Android secure offline storage - CC Mobile
 
Android Security
Android SecurityAndroid Security
Android Security
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and Security
 
ToorCon 14 : Malandroid : The Crux of Android Infections
ToorCon 14 : Malandroid : The Crux of Android InfectionsToorCon 14 : Malandroid : The Crux of Android Infections
ToorCon 14 : Malandroid : The Crux of Android Infections
 
Threat Analysis on Win10 IoT Core and Recommaended Security Measures by Naohi...
Threat Analysis on Win10 IoT Core and Recommaended Security Measures by Naohi...Threat Analysis on Win10 IoT Core and Recommaended Security Measures by Naohi...
Threat Analysis on Win10 IoT Core and Recommaended Security Measures by Naohi...
 
Android Hacking
Android HackingAndroid Hacking
Android Hacking
 
RSA SF Conference talk-2009-ht2-401 sallam
RSA SF Conference talk-2009-ht2-401 sallamRSA SF Conference talk-2009-ht2-401 sallam
RSA SF Conference talk-2009-ht2-401 sallam
 
Bypassing the Android Permission Model
Bypassing the Android Permission ModelBypassing the Android Permission Model
Bypassing the Android Permission Model
 
CNIT 128 7. Attacking Android Applications (Part 3)
CNIT 128 7. Attacking Android Applications (Part 3)CNIT 128 7. Attacking Android Applications (Part 3)
CNIT 128 7. Attacking Android Applications (Part 3)
 

Viewers also liked

Django Web Application Security
Django Web Application SecurityDjango Web Application Security
Django Web Application Security
levigross
 
iOS Application Penetation Test
iOS Application Penetation TestiOS Application Penetation Test
iOS Application Penetation Test
JongWon Kim
 
Hacking and securing ios applications
Hacking and securing ios applicationsHacking and securing ios applications
Hacking and securing ios applications
Satish b
 
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSFAppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
Ajin Abraham
 

Viewers also liked (20)

Android Security Essentials
Android Security EssentialsAndroid Security Essentials
Android Security Essentials
 
IOS debugging
IOS debuggingIOS debugging
IOS debugging
 
Django Web Application Security
Django Web Application SecurityDjango Web Application Security
Django Web Application Security
 
'SecureMe - Droid' Android Security Application by Vishal Asthana
'SecureMe - Droid' Android Security Application by Vishal Asthana'SecureMe - Droid' Android Security Application by Vishal Asthana
'SecureMe - Droid' Android Security Application by Vishal Asthana
 
Two scoops of Django - Security Best Practices
Two scoops of Django - Security Best PracticesTwo scoops of Django - Security Best Practices
Two scoops of Django - Security Best Practices
 
iOS Application Penetation Test
iOS Application Penetation TestiOS Application Penetation Test
iOS Application Penetation Test
 
Metasploit - The Exploit Learning Tree
Metasploit - The Exploit Learning TreeMetasploit - The Exploit Learning Tree
Metasploit - The Exploit Learning Tree
 
[2014/10/06] HITCON Freetalk - App Security on Android
[2014/10/06] HITCON Freetalk - App Security on Android[2014/10/06] HITCON Freetalk - App Security on Android
[2014/10/06] HITCON Freetalk - App Security on Android
 
[Wroclaw #3] SELinux 101
[Wroclaw #3] SELinux 101[Wroclaw #3] SELinux 101
[Wroclaw #3] SELinux 101
 
HTTPs Strict Transport Security
HTTPs    Strict Transport Security HTTPs    Strict Transport Security
HTTPs Strict Transport Security
 
Hacking and securing ios applications
Hacking and securing ios applicationsHacking and securing ios applications
Hacking and securing ios applications
 
Reverse Engineering iOS apps
Reverse Engineering iOS appsReverse Engineering iOS apps
Reverse Engineering iOS apps
 
Pentesting RESTful WebServices v1.0
Pentesting RESTful WebServices v1.0Pentesting RESTful WebServices v1.0
Pentesting RESTful WebServices v1.0
 
JSON Injection
JSON InjectionJSON Injection
JSON Injection
 
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSFAppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
 
Introduction to iOS Penetration Testing
Introduction to iOS Penetration TestingIntroduction to iOS Penetration Testing
Introduction to iOS Penetration Testing
 
Andriod Pentesting and Malware Analysis
Andriod Pentesting and Malware AnalysisAndriod Pentesting and Malware Analysis
Andriod Pentesting and Malware Analysis
 
Sperasoft talks: Android Security Threats
Sperasoft talks: Android Security ThreatsSperasoft talks: Android Security Threats
Sperasoft talks: Android Security Threats
 
G4H Webcast: Automated Security Analysis of Mobile Applications with Mobile S...
G4H Webcast: Automated Security Analysis of Mobile Applications with Mobile S...G4H Webcast: Automated Security Analysis of Mobile Applications with Mobile S...
G4H Webcast: Automated Security Analysis of Mobile Applications with Mobile S...
 
Pentesting ReST API
Pentesting ReST APIPentesting ReST API
Pentesting ReST API
 

Similar to Windows Phone 8 Security and Testing WP8 Apps

Application Virtualization overview - BayCUG
Application Virtualization overview - BayCUGApplication Virtualization overview - BayCUG
Application Virtualization overview - BayCUG
Denis Gundarev
 

Similar to Windows Phone 8 Security and Testing WP8 Apps (20)

Pentesting iPhone applications
Pentesting iPhone applicationsPentesting iPhone applications
Pentesting iPhone applications
 
Mobile code mining for discovery and exploits nullcongoa2013
Mobile code mining for discovery and exploits nullcongoa2013Mobile code mining for discovery and exploits nullcongoa2013
Mobile code mining for discovery and exploits nullcongoa2013
 
Application Explosion How to Manage Productivity vs Security
Application Explosion How to Manage Productivity vs SecurityApplication Explosion How to Manage Productivity vs Security
Application Explosion How to Manage Productivity vs Security
 
Google android os
Google android osGoogle android os
Google android os
 
CNIT 128 Ch 4: Android
CNIT 128 Ch 4: AndroidCNIT 128 Ch 4: Android
CNIT 128 Ch 4: Android
 
128-ch4.pptx
128-ch4.pptx128-ch4.pptx
128-ch4.pptx
 
Hacking Mobile Apps
Hacking Mobile AppsHacking Mobile Apps
Hacking Mobile Apps
 
Pentesting Mobile Applications (Prashant Verma)
Pentesting Mobile Applications (Prashant Verma)Pentesting Mobile Applications (Prashant Verma)
Pentesting Mobile Applications (Prashant Verma)
 
Application Virtualization overview - BayCUG
Application Virtualization overview - BayCUGApplication Virtualization overview - BayCUG
Application Virtualization overview - BayCUG
 
Google android os
Google android osGoogle android os
Google android os
 
Automation In Android & iOS Application Review
Automation In Android & iOS 	Application Review�Automation In Android & iOS 	Application Review�
Automation In Android & iOS Application Review
 
Outsmarting SmartPhones
Outsmarting SmartPhonesOutsmarting SmartPhones
Outsmarting SmartPhones
 
Hacking mobile apps
Hacking mobile appsHacking mobile apps
Hacking mobile apps
 
CNIT 128 8: Mobile development security
CNIT 128 8: Mobile development securityCNIT 128 8: Mobile development security
CNIT 128 8: Mobile development security
 
Heartbleed Bug Vulnerability: Discovery, Impact and Solution
Heartbleed Bug Vulnerability: Discovery, Impact and SolutionHeartbleed Bug Vulnerability: Discovery, Impact and Solution
Heartbleed Bug Vulnerability: Discovery, Impact and Solution
 
Evaluating iOS Applications
Evaluating iOS ApplicationsEvaluating iOS Applications
Evaluating iOS Applications
 
Mobile security chess board - attacks & defense
Mobile security chess board - attacks & defenseMobile security chess board - attacks & defense
Mobile security chess board - attacks & defense
 
Attacking and Defending Mobile Applications
Attacking and Defending Mobile ApplicationsAttacking and Defending Mobile Applications
Attacking and Defending Mobile Applications
 
Successful Industrial IoT patterns
Successful Industrial IoT patterns Successful Industrial IoT patterns
Successful Industrial IoT patterns
 
iOS-Application-Security-iAmPr3m
iOS-Application-Security-iAmPr3miOS-Application-Security-iAmPr3m
iOS-Application-Security-iAmPr3m
 

More from Jorge Orchilles

SCYTHE Purple Team Workshop with Tim Schulz
SCYTHE Purple Team Workshop with Tim SchulzSCYTHE Purple Team Workshop with Tim Schulz
SCYTHE Purple Team Workshop with Tim Schulz
Jorge Orchilles
 
C2 Matrix Anniversary - Blackhat EU 2020
C2 Matrix Anniversary - Blackhat EU 2020C2 Matrix Anniversary - Blackhat EU 2020
C2 Matrix Anniversary - Blackhat EU 2020
Jorge Orchilles
 
Blackhat 2020 Arsenal - C2 Matrix
Blackhat 2020 Arsenal - C2 MatrixBlackhat 2020 Arsenal - C2 Matrix
Blackhat 2020 Arsenal - C2 Matrix
Jorge Orchilles
 
Managing & Showing Value during Red Team Engagements & Purple Team Exercises ...
Managing & Showing Value during Red Team Engagements & Purple Team Exercises ...Managing & Showing Value during Red Team Engagements & Purple Team Exercises ...
Managing & Showing Value during Red Team Engagements & Purple Team Exercises ...
Jorge Orchilles
 

More from Jorge Orchilles (20)

SCYTHE Purple Team Workshop with Tim Schulz
SCYTHE Purple Team Workshop with Tim SchulzSCYTHE Purple Team Workshop with Tim Schulz
SCYTHE Purple Team Workshop with Tim Schulz
 
So you want to be a red teamer
So you want to be a red teamerSo you want to be a red teamer
So you want to be a red teamer
 
Purple Team Use Case - Security Weekly
Purple Team Use Case - Security WeeklyPurple Team Use Case - Security Weekly
Purple Team Use Case - Security Weekly
 
KringleCon 3 Providing Value in Offensive Security
KringleCon 3 Providing Value in Offensive SecurityKringleCon 3 Providing Value in Offensive Security
KringleCon 3 Providing Value in Offensive Security
 
C2 Matrix Anniversary - Blackhat EU 2020
C2 Matrix Anniversary - Blackhat EU 2020C2 Matrix Anniversary - Blackhat EU 2020
C2 Matrix Anniversary - Blackhat EU 2020
 
Purple Team Exercise Workshop December 2020
Purple Team Exercise Workshop December 2020Purple Team Exercise Workshop December 2020
Purple Team Exercise Workshop December 2020
 
External Threat Hunters are Red Teamers
External Threat Hunters are Red TeamersExternal Threat Hunters are Red Teamers
External Threat Hunters are Red Teamers
 
Evolution of Offensive Assessments - SecureWV Conference
Evolution of Offensive Assessments - SecureWV ConferenceEvolution of Offensive Assessments - SecureWV Conference
Evolution of Offensive Assessments - SecureWV Conference
 
Purple Team Exercise Hands-On Workshop #GrayHat
Purple Team Exercise Hands-On Workshop #GrayHatPurple Team Exercise Hands-On Workshop #GrayHat
Purple Team Exercise Hands-On Workshop #GrayHat
 
Evolution of Offensive Assessments - RootCon
Evolution of Offensive Assessments - RootConEvolution of Offensive Assessments - RootCon
Evolution of Offensive Assessments - RootCon
 
8.8 Las Vegas - Adversary Emulation con C2 Matrix
8.8 Las Vegas - Adversary Emulation con C2 Matrix8.8 Las Vegas - Adversary Emulation con C2 Matrix
8.8 Las Vegas - Adversary Emulation con C2 Matrix
 
DEFCON Safe Mode - Red Team Village - Emulating Evil Corp and WastedLocker
DEFCON Safe Mode - Red Team Village - Emulating Evil Corp and WastedLockerDEFCON Safe Mode - Red Team Village - Emulating Evil Corp and WastedLocker
DEFCON Safe Mode - Red Team Village - Emulating Evil Corp and WastedLocker
 
Blackhat 2020 Arsenal - C2 Matrix
Blackhat 2020 Arsenal - C2 MatrixBlackhat 2020 Arsenal - C2 Matrix
Blackhat 2020 Arsenal - C2 Matrix
 
Purple Team Exercise Framework Workshop #PTEF
Purple Team Exercise Framework Workshop #PTEFPurple Team Exercise Framework Workshop #PTEF
Purple Team Exercise Framework Workshop #PTEF
 
Purple Team Exercises - GRIMMCon
Purple Team Exercises - GRIMMConPurple Team Exercises - GRIMMCon
Purple Team Exercises - GRIMMCon
 
Managing & Showing Value during Red Team Engagements & Purple Team Exercises ...
Managing & Showing Value during Red Team Engagements & Purple Team Exercises ...Managing & Showing Value during Red Team Engagements & Purple Team Exercises ...
Managing & Showing Value during Red Team Engagements & Purple Team Exercises ...
 
Cuddling the Cozy Bear Emulating APT29
Cuddling the Cozy Bear Emulating APT29Cuddling the Cozy Bear Emulating APT29
Cuddling the Cozy Bear Emulating APT29
 
Adversary Emulation - Red Team Village - Mayhem 2020
Adversary Emulation - Red Team Village - Mayhem 2020Adversary Emulation - Red Team Village - Mayhem 2020
Adversary Emulation - Red Team Village - Mayhem 2020
 
Adversary Emulation and Red Team Exercises - EDUCAUSE
Adversary Emulation and Red Team Exercises - EDUCAUSEAdversary Emulation and Red Team Exercises - EDUCAUSE
Adversary Emulation and Red Team Exercises - EDUCAUSE
 
Adversary Emulation - DerpCon
Adversary Emulation - DerpConAdversary Emulation - DerpCon
Adversary Emulation - DerpCon
 

Recently uploaded

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Recently uploaded (20)

Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 

Windows Phone 8 Security and Testing WP8 Apps

  • 1. Windows Phone 8 Security & Testing WP8 Apps Jorge Orchilles 1
  • 2. whoami • Advanced PenTest & QC – Large Financial • Master of Science and BBA in Management Information Systems – Florida International University • Author – Microsoft Windows 7 Administrator’s Reference (Syngress) • Certifications – GXPN, CISM, CISSP, GPEN, GCIH, CEH, CICP, CCDA, CSSDS, MCTS, MCP, Security+, CISM • SANS Instructor – SEC504, SEC560, SEC577 • Organizations – Director - South Florida ISSA – Member - OWASP, InfraGard, Miami Electronic Crimes Task Force, Hack Miami 2
  • 3. Microsoft has a phone? • Windows Phone 8 (WP8) – used to be called Windows Mobile until 7.x – Released Oct 2012 – ARM Hardware Architecture (like iOS, Android, and Blackberry) – Windows Phone Runtime Application Architecture • Developer apps work on both Windows 8 and WP8 – Windows NT kernel • Windows Phone 8.1 recently released – Fixed 1.5 of 3 issues found in my original research
  • 4. Understand the platform • WP7 uses Windows CE kernel • WP8 uses NT Kernel – 128-bit BitLocker for device encryption – NTFS file system – Sandboxed apps – SafeBoot: Secure UEFI Boot • Can’t boot software without correct digital signature to be loaded on the phone • TPM 2.0 – requires unique keys to be burned into chip during production – WP8 binaries must have Microsoft signed digital signatures
  • 5. Chambers • Trusted Computing Base (TCB) – Kernel & kernel-mode drivers • Least Privileged Chamber (LPC) – Services – Apps
  • 7. App Sandboxing • Each app has a local isolated storage • Limited app-to-app communication • App A cannot see App B storage • App folder has: – Settings – Files – Directories – Database
  • 8. Jailbreak? • WP8 is closed OS, just like most things M$ • No jailbreak yet – some activities you would like to do for mobile device testing will not be possible – Access to memory – Local file system and storage – Transfer files to and from device
  • 9. What would a JB look like? • Exploit a vulnerability – Client side vulnerability for IE 10 or 11 • Escalate privilege to SYSTEM • Bypass SecureBoot • Disable application code signing • Create a trusted app store certificate
  • 10. What we can test • Application Logic • Server side • Client side • Local app storage – requires XAP file • Local app configuration – requires XAP file
  • 11. Prerequisites • Physical Device or Emulator • Windows Phone SDK • Unlocking the device • XAP file or app • HTTP Proxy
  • 12. Physical or Emulator • Prefer physical – devices are cheap – Nokia Lumia 920 • Emulator – Hyper-V images – x86 instead of ARM – Fake binaries • FakeLed.sys, FakeModem.dll – Different browser user-agent – Cannot install apps from Store
  • 13. Windows Phone SDK • Requires Windows 8 64-bit w/Hyper-V enabled – For VM, set hypervisor.cpuid.v0 = “FALSE” – Control Panel – Programs – Turn Windows Features on or off – Check Hyper-V • Free at http://dev.windowsphone.com • Emulator is installed as part of SDK – C:Program Files (x86)Microsoft XDE8.0XDE.exe • Visual Studio Express 2012
  • 14. Unlock the Device • For physical devices only • Must unlock the device to be able to side load apps • Join the dev program (lifetime membership now) – $19 allows 3 side loaded apps – $99 dev account allows 10 side loaded app – $399 company trusted cert for enterprise app store • Register it on dev.windowsphone.com
  • 15. XAP File • Windows Phone App file: .xap – Used for Silverlight apps as well • Contains an App.Manifest.xaml – Defines assemblies and DLLs that get deployed • XAP files downloaded from Store come with PlayReady DRM – DRM is added by the marketplace in realtime, based on the LiveID cookie value – Encrypted XAP files will not run in emulator • Request XAP from developers
  • 16. DRM vs. No DRM
  • 17. Side loading apps • Defined: installing applications on your device without going through the official Store • Use SDK or Windows Phone Power Tools • Live Demo • If fail then video
  • 18. Methodology • Information Gathering – Describes the steps and things to consider when you are in the early stage reconnaissance and mapping phases of testing as well as determining the application’s magnitude of effort and scoping. • Dynamic Analysis – Executing an application either on the device itself or within a simulator/emulator and interacting with the remote services with which the application communicates. This includes assessing the application’s local inter process communication surface, forensic analysis of the local file system, and assessing remote service dependencies. • Static Analysis – Analyzing raw mobile source code, decompile or disassembled code.
  • 19. Information Gathering • First step of any assessment! – Understand what you are testing • App is installed right? – Side loaded or from Store • Learn how the app works
  • 20. Information Gathering • Navigate through the application – This will expose you to the application as an end user would use it. Tap through all the different features, look at the settings, etc. This may be performed on the device or in the emulator as we covered in previous sections. • Identify the network interfaces used – Does the application require internet connectivity? If so, does it work through Wi-Fi only, SIM only? Does the application use bluetooth, NFC, a VPN? • Does the application take your input? Any sensitive information? Does it access any sensitive information? • Does the application perform transactions? In-app purchases? Credit card or payment information? • What other components does the application interact with? Contact list, calendar, camera, location? • Do some reconnaissance. Has this app been talked about already? Search Google, app store reviews, etc.
  • 21. Vulnerabilities? • No application pass code – Does the app reveal sensitive information that requires authentication? Should it have it’s own pass code. This may be a consideration for apps storing company data while the devices are BYOD and don’t require a device pass code. • Weak pass code – Does the app enforce good password policies? – Minimum of how many characters? – Complexity? – Password rotation? – Password lock out? • Sensitive information stored on disk – Does the app request sensitive information from the end user and then store it?
  • 22. Dynamic Testing • Use an HTTP proxy to see traffic – Install cert to see HTTPS • If traffic is not HTTP(s) – Perform MiTM • Mallory • Access Point • ARP Poisoning • Cannot do VPN!
  • 23. HTTP Proxy • Notice no authentication for HTTP proxy! – Corporate proxies should require authentication – Fixed in 8.1 for corporate deployments
  • 24. Now you see traffic!
  • 25. Generate SSL Cert • Email it to yourself • Save it on SkyDrive and access it from IE (remember App Sandboxing won’t allow you to install the cert onto the device if it is opened with SkyDrive App) • Transfer it via USB • Host it on a web server and browse to it with IE
  • 26. Install SSL Cert • Note there is no digital certificate management • Your device will accept this cert as valid until expiration
  • 27. If Emulator • Windows Phone 8 emulator is a Hyper-V virtual machine with it’s own IP address. • This means the network traffic will route from the virtual machine (emulator) to your Windows 8 system running the SDK and then out to the Internet. • The easiest way to configure the emulator to use a proxy is to configure the Windows 8 system’s IE proxy settings.
  • 29. More Information Gathering • Can you determine anything about the server side application environment? – Hosting provider (AWS, App Engine, Heroku, Rackspace, Azure, etc.) – Development environment (Rails, Java, Django, ASP.NET, etc.) – Does the application leverage Single Sign On or Authentication APIs (Google Apps, Facebook, iTunes, OAuth, etc.) – Any other APIs in use • Payment gateways • SMS messaging • Social networks • Cloud file storage • Ad networks • Perform a thorough crawl of exposed web resources and sift through the requests and responses to identify potentially interesting data or behavior – Leaking sensitive information (i.e. credentials) in the response – Resources not exposed through the UI – Error messages – Cacheable information
  • 30. More Vulnerabilities • Encryption not enforced – I prefer always enforcing HTTPS even for non-sensitive data. Most end users connect to any free/untrusted WiFi and modifying HTTP data is trivial. – More of an integrity issue than confidentiality • Sensitive information sent in clear text – Credentials sent over HTTP instead of HTTPS • Digital Certificate not validated – Does the app accept the invalid cert and send sensitive information? – No warning on invalid digital certificate • Basic Authentication used • No Mutual Authentication
  • 31. HTTPS for EVERYTHING • Traditionally, encryption was used to maintain confidentiality • With mobile apps, you also need to maintain Integrity • Push for everything being HTTPS • OR ELSE
  • 32. No HTTPS… Stock market crash
  • 33. Local Storage • Only works if XAP was provided • Live Demo • Or video
  • 34. Static Analysis • Requires XAP with no DRM • Decompile apps – XAML Spy - commercial • ILSPY - free • JustDecompile • .NET Reflector - commercial – Tangerine - free
  • 35. New in Windows Phone 8.1 • VPN Connectivity • Enterprise Wi-FI – PEAP-MSCHAPv2 – EAP-TLS – EAP-TTLS • Certificate Management – Only through MDM • Virtual Smart Cards for MFA • MDM – Remote Wipe – App allow and deny Presentation Title
  • 36. Conclusion • WP8 is pretty secure • Complex attack surface • App testing is dependent on XAP file access • Server and Client side testing remains the similar to other mobile platforms
  • 37. Questions? • http://orchilles.com/category/wp8/ • Thanks for your time and feedback! • Feel free to contact me jorge@orchilles.com @jorgeorchilles www.orchilles.com

Editor's Notes

  1. Show of hands: who knew Microsoft had a phone? Who has a Microsoft phone?
  2. Who has tested a mobile app before?
  3. PK – initials Phil Katz author of ZIP format