SlideShare a Scribd company logo
1 of 35
Enterprise Mobile Security and OWASP
Compliance
Alec Tucker
White Clarke Group
@alecdtucker
Intro to Standards
How can you prove to an enterprise client that your apps are secure?
What boxes might a security conscious client require you to tick to
comply with policy?
What are the industry guidelines for app security?
The Open Web Application Security Project
OWASP Top 10
https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project
OWASP Top 10 for Mobile 2016
https://www.owasp.org/index.php/Projects/OWASP_Mobile_Security_Project_-_Top_Ten_Mobile_Risks
https://www.owasp.org/index.php/OWASP_Mobile_Security_Project
OWASP Application Security Verification Standards (ASVS) v3.0.1
https://www.owasp.org/index.php/Category:OWASP_Application_Security_Verification_Standard_Project
Chapter 17 covers mobile
OWASP Top 10 for Mobile 2014
M1 – Weak server side controls
M2 – Insecure data storage on the device
M3 – Insufficient transport layer protection
M4 – Unintended data leakage
M5 – Poor authentication and authorization
M6 – Broken cryptography
M7 – Client side injection
M8 – Security decisions via untrusted inputs
M9 – Improper session handling
M10 – Lack of binary protection
OWASP Top 10 for Mobile 2016
M1 – Improper Platform Usage
M2 – Insecure Data Storage
M3 – Insecure Communication
M4 – Insecure Authentication
M5 – Insufficient Cryptography
M6 – Insecure Authorization
M7 – Client Code Quality
M8 – Code Tampering
M9 – Reverse Engineering
M10 – Extraneous Functionality
2014  2016
M1 – Weak server side controls
M2 – Insecure data storage on the device
M3 – Insufficient transport layer protection
M4 – Unintended data leakage
M5 – Poor authentication and authorization
M6 – Broken cryptography
M7 – Client side injection
M8 – Security decisions via untrusted inputs
M9 – Improper session handling
M10 – Lack of binary protection
M1 – Improper Platform Usage
M2 – Insecure Data Storage
M3 – Insecure Communication
M4 – Insecure Authentication
M5 – Insufficient Cryptography
M6 – Insecure Authorization
M7 – Client Code Quality
M8 – Code Tampering
M9 – Reverse Engineering
M10 – Extraneous Functionality
Substantive Risks
• Malware remains high among perceived risks
• 63% of organisations are not confident (or have no confidence) they
know all of the mobile and IoT apps used in the workplace
• End user convenience is often considered more important than
security
• Despite the known and will documented risks, there is still a lack of
urgency to address the threat
• 60% of companies categorise the risk that they have already
suffered a security incident due to an insecure mobile app as “likely”
or higher
2017 Study on Mobile IoT Application Security, Ponemon Institute
Reasons
• Testing of mobile apps is ad-hoc, if done at all
• Insecure coding practices
• Broken crypto and unintended data leakage are the difficult risks to
mitigate
• Lack of internal policies is STILL listed as a reason
• The main reason remains…rush to release
2017 Study on Mobile IoT Application Security, Ponemon Institute
M1 – Improper Platform Usage
Misuse of a platform feature or failure to use platform security controls
• Violation of published guidelines
• Violation of convention or common practice
• Unintentional misuse
• Includes requesting too many permissions, or the wrong permissions
Example
- usesClearTextTraffic on Android, API23+
NB: This is ignored on API24 and above if an Android Network Security Config is present
M1 – Improper Platform Usage
Exposing usesClearTextTraffic in Xamarin
using Services;
using Xamarin.Forms;
[assembly:Dependency(typeof(M1.Droid.NetworkSecurityPolicyService_Droid))]
namespace M1.Droid
{
public class NetworkSecurityPolicyService_Droid : INetworkPolicyService
{
public NetworkSecurityPolicyService_Droid()
{
}
public bool isClearTextTrafficPermitted()
{
return Android.Security.NetworkSecurityPolicy.Instance.IsCleartextTrafficPermitted;
}
}
}
Checking usesClearTextTraffic in Xamarin
public async Task<string> DownloadContentDishonour(string url)
{
WebClient client = new WebClient();
return await client.DownloadStringTaskAsync(url);
}
Checking usesClearTextTraffic in Xamarin
public async Task<string> DownloadContentHonour(string url)
{
if (networkPolicyService != null
&& url.StartsWith("http:")
&& !networkPolicyService.isClearTextTrafficPermitted)
{
throw new InvalidOperationException(
"Clear text network requests are not permitted");
}
WebClient client = new WebClient();
return await client.DownloadStringTaskAsync(url);
}
M1 – Improper Platform Usage - Components
…that honour usesClearTextTraffic
• DownloadManager
• MediaPlayer
• SocketHandler
• Java.* / Android.* HTTP, FTP, WebSockets,
XMPP, IMAP, SMTP network components
• Some third party libraries
• OkHttp
• ModernHttpClient
…that dishonour usesClearTextTraffic
• Android.WebKit.WebView
• Java.* / Android.* UDP and TCP connections
• Any related low-level network stacks
• All managed networking components
M2 – Insecure Data Storage
2014 M2 – Insecure Data Storage
• SQL databases
• Log files
• XML datastores / manifest files
• Binary data stores
• SD card
• Cloud sync’d folders
2014 M4 – Unintended Data Leakage
• Leaked without developer’s knowledge
• Cached data
• Images – e.g. task switcher
• Key presses
• Logging
• Buffers
This covers two of the 2014 top 10 risks:
Blurring the screen during auto-snapshot
public override void OnResignActivation(UIApplication uiApplication)
{
// 1. Take a screenshot
// 2. Blur it
// 3. Add the blurred view to the RootViewController.View
base.OnResignActivation(uiApplication);
}
public override void OnActivated(UIApplication uiApplication)
{
// 4. Remove the blurred view, if there is one
base.OnActivated(uiApplication);
}
Blurring the screen during auto-snapshot
// 1. Take a screenshot
UIView view = UIApplication.SharedApplication.KeyWindow.RootViewController.View;
UIGraphics.BeginImageContext(view.Frame.Size);
view.DrawViewHierarchy(view.Frame, true);
UIImage image = UIGraphics.GetImageFromCurrentImageContext();
UIGraphics.EndImageContext();
Blurring the screen during auto-snapshot
// 2. Blur it
UIImage newImage = null;
using(var inputImage = new CoreImage.CIImage(image)) {
using(var blur = new CoreImage.CIGaussianBlur()) {
blur.Image = inputImage;
blur.Radius = 25f;
using(var outputImage = blur.OutputImage) {
using(var context = CoreImage.CIContext.FromOptions(new CoreImage.CIContextOptions()
{ UseSoftwareRenderer = false })) {
using(var cgImage = context.CreateCGImage(outputImage,
new System.Drawing.RectangleF (
new System.Drawing.PointF(0,0),
new System.Drawing.SizeF((float)image.Size.Width, (float)image.Size.Height)))) {
newImage = UIImage.FromImage(cgImage);
}
}
}
}
}
Blurring the screen during auto-snapshot
// 3. Add the blurred view to the RootViewController.View
view.AddSubview(new UIImageView(newImage));
// 4. Remove the blurred view, if there is one
int lastIndex = UIApplication.SharedApplication.KeyWindow
.RootViewController.View.Subviews.GetUpperBound(0);
if (lastIndex > 0)
{
UIApplication.SharedApplication.KeyWindow
.RootViewController.View.Subviews[lastIndex]
.RemoveFromSuperview();
}
M2 – Insecure Data Storage
iOS Developer Cheat Sheet
- https://www.owasp.org/index.php/IOS_Developer_Cheat_Sheet
- Small amounts of sensitive data should go in the Keychain
- Recommends usage of a third party encryption API “not encumbered by
inherent weaknesses in Apple’s encryption”
- Singles out SQLCipher
- Key management then becomes critical ( M5)
- https://www.owasp.org/index.php/Key_Management_Cheat_Sheet
Windows Mobile 10 Security Guide
- https://technet.microsoft.com/en-us/library/mt674915(v=vs.85).aspx
M3 – Insecure Communication
This covers:
• Poor handshaking
• Incorrect SLL versions
• Weak negotiation
• Cleartext communication of sensitive assets *
• SSL certificate validity
* Sensitive assets can include things like the IMEI and other hardware addresses. Some
jurisdictions consider these to be private data that must be given the same privacy treatment as a
phone number or home address
Checking certificate validity – iOS / Android
System.Net.ServicePointManager.ServerCertificateValidationCallback +=
((sender, certificate, chain, sslPolicyErrors) =>
{
return sslPolicyErrors == System.Net.Security.SslPolicyErrors.None
&& validCertificates.Contains(certificate.GetCertHashString);
});
M4 – Insecure Authentication
In general, follow the same rules as a web app for authentication
i.e. if porting a web app, it should not be possible to authenticate with less auth factors than
the web browser
Never use a device identifier (UDID, IP, MAC address, IMEI) to identify
a user or a session
Remember that some jurisdictions treat these as personal data
M4 – Insecure Authentication
Avoid out-of-band authentication tokens being sent to the same
device as the user is using to login (e.g. SMS to phone)
http://www.smh.com.au/technology/consumer-security/malware-hijacks-big-four-
australian-banks-apps-steals-twofactor-sms-codes-20160309-gnf528.html
M5 – Insufficient Cryptography
https://www.owasp.org/index.php/Cryptographic_Storage_Cheat_Sheet
• Only store sensitive data that you need
• Use strong approved authenticated encryption
• Store a one-way and salted value of passwords
• Ensure that the cryptographic protection remains secure even if
access controls fail
• Ensure that any secret key is protected from unauthorised access
• Follow applicable regulations on use of cryptography
• PCLCrypto component
M5 – Insufficient Cryptography
Use of hardware information in key:
SQLCipher advice
- What’s unacceptable is to use this in entirety and nothing else
- They propose it’s acceptable to use it as a portion of a key, but point
out that it’s critical that at least a portion of the key is both:
- Entered by the user
- Never stored on the device
https://discuss.zetetic.net/t/sqlcipher-database-key-material-and-selection/25
M6 – Insecure Authorization
App may restrict functions based on user’s authorization level
Web service endpoints cannot assume this is sufficient
Classic finding is a server implicitly trusting the mobile code to only
generate requests appropriate to the user’s privilege level
Of course this cannot be assumed of a compromised app
M7 – Client Code Quality
“Catch-all” for code level implementation problems where the solution is to rewrite
some of the mobile code.
Poor coding practices allow attackers to modify:
• Your app’s business logic
• Code to bypass security controls
M7 – Client Code Quality
Mitigations
• Developer education, coding standards, code reviews, check-in hooks
• Static code analysis tool (several available)
OWASP Guides:
• Secure Coding Pratices – Quick Reference Guide v2
• https://www.owasp.org/index.php/OWASP_Secure_Coding_Practices_-_Quick_Reference_Guide
• Secure Coding Cheat Sheet
• https://www.owasp.org/index.php/Secure_Coding_Cheat_Sheet
M8 – Code Tampering
private bool IsJailBroken()
{
return UIApplication.SharedApplication.CanOpenUrl(new NSUrl("cydia://package/com.example.package")));
}
M9 – Reverse Engineering
• Obfuscation using DotFuscator
• Community edition is available with Visual Studio
https://blog.xamarin.com/protecting-xamarin-apps-dotfuscator/
M10 – Extraneous Functionality
Inclusion of testing shortcuts never intended for Production
e.g. ignoring certificate errors, disabling two-factor authentication during testing
Inclusion of these could be the results of a CI/CD script error
Build/deployment issues far more likely if manual steps are involved
Also covers intentional inclusion of malicious code
Where to from here?
Source: 2017 Study on Mobile IoT Application Security, Ponemon Institute
Where to from here?
• OWASP ASVS
• PCI standards
• If you don’t have a security policy, reference these standards
• If you do have a security policy, check it against these standards
• If you’re writing or reviewing a security policy, check it against these standards
• Mobile dev is not web dev
• Establish and maintain a dedicated Mobile Center of Excellence
• A combination of the above
Thank you / Questions

More Related Content

Similar to Enterprise Mobile Security and OWASP Compliance

OWASP Day - OWASP Day - Lets secure!
OWASP Day - OWASP Day - Lets secure! OWASP Day - OWASP Day - Lets secure!
OWASP Day - OWASP Day - Lets secure! Prathan Phongthiproek
 
DataMindsConnect2018_SECDEVOPS
DataMindsConnect2018_SECDEVOPSDataMindsConnect2018_SECDEVOPS
DataMindsConnect2018_SECDEVOPSTobias Koprowski
 
Essentials of Web Application Security: what it is, why it matters and how to...
Essentials of Web Application Security: what it is, why it matters and how to...Essentials of Web Application Security: what it is, why it matters and how to...
Essentials of Web Application Security: what it is, why it matters and how to...Cenzic
 
Disrupting the Malware Kill Chain - What's New from Palo Alto Networks.
Disrupting the Malware Kill Chain - What's New from Palo Alto Networks.Disrupting the Malware Kill Chain - What's New from Palo Alto Networks.
Disrupting the Malware Kill Chain - What's New from Palo Alto Networks.Scalar Decisions
 
How PCI And PA DSS will change enterprise applications
How PCI And PA DSS will change enterprise applicationsHow PCI And PA DSS will change enterprise applications
How PCI And PA DSS will change enterprise applicationsBen Rothke
 
Mobile Application Security Threats through the Eyes of the Attacker
Mobile Application Security Threats through the Eyes of the AttackerMobile Application Security Threats through the Eyes of the Attacker
Mobile Application Security Threats through the Eyes of the Attackerbugcrowd
 
Unified application security analyser
Unified application security analyserUnified application security analyser
Unified application security analyserTim Youm
 
What the New OWASP Top 10 2013 and Latest X-Force Report Mean for App Sec
What the New OWASP Top 10 2013 and Latest X-Force Report Mean for App SecWhat the New OWASP Top 10 2013 and Latest X-Force Report Mean for App Sec
What the New OWASP Top 10 2013 and Latest X-Force Report Mean for App SecIBM Security
 
apidays LIVE Singapore 2021 - Why verifying user identity Is not enough In 20...
apidays LIVE Singapore 2021 - Why verifying user identity Is not enough In 20...apidays LIVE Singapore 2021 - Why verifying user identity Is not enough In 20...
apidays LIVE Singapore 2021 - Why verifying user identity Is not enough In 20...apidays
 
Sumeet Mandloi: Robust Security Testing Framework
Sumeet Mandloi: Robust Security Testing FrameworkSumeet Mandloi: Robust Security Testing Framework
Sumeet Mandloi: Robust Security Testing FrameworkAnna Royzman
 
Unicom Conference - Mobile Application Security
Unicom Conference - Mobile Application SecurityUnicom Conference - Mobile Application Security
Unicom Conference - Mobile Application SecuritySubho Halder
 
Application security Best Practices Framework
Application security   Best Practices FrameworkApplication security   Best Practices Framework
Application security Best Practices FrameworkSujata Raskar
 
Adaptive authentication to determine login attempt penalty from multiple inpu...
Adaptive authentication to determine login attempt penalty from multiple inpu...Adaptive authentication to determine login attempt penalty from multiple inpu...
Adaptive authentication to determine login attempt penalty from multiple inpu...Conference Papers
 
Adaptive authentication to determine login attempt penalty from multiple inpu...
Adaptive authentication to determine login attempt penalty from multiple inpu...Adaptive authentication to determine login attempt penalty from multiple inpu...
Adaptive authentication to determine login attempt penalty from multiple inpu...Conference Papers
 
Security Teams & Tech In A Cloud World
Security Teams & Tech In A Cloud WorldSecurity Teams & Tech In A Cloud World
Security Teams & Tech In A Cloud WorldMark Nunnikhoven
 
A Diet of Poisoned Fruit: Designing Implants & OT Payloads for ICS Embedded D...
A Diet of Poisoned Fruit: Designing Implants & OT Payloadsfor ICS Embedded D...A Diet of Poisoned Fruit: Designing Implants & OT Payloadsfor ICS Embedded D...
A Diet of Poisoned Fruit: Designing Implants & OT Payloads for ICS Embedded D...Marina Krotofil
 
19BCP072_Presentation_Final.pdf
19BCP072_Presentation_Final.pdf19BCP072_Presentation_Final.pdf
19BCP072_Presentation_Final.pdfKunjJoshi14
 

Similar to Enterprise Mobile Security and OWASP Compliance (20)

OWASP Day - OWASP Day - Lets secure!
OWASP Day - OWASP Day - Lets secure! OWASP Day - OWASP Day - Lets secure!
OWASP Day - OWASP Day - Lets secure!
 
OWASP Mobile Top 10 Deep-Dive
OWASP Mobile Top 10 Deep-DiveOWASP Mobile Top 10 Deep-Dive
OWASP Mobile Top 10 Deep-Dive
 
DataMindsConnect2018_SECDEVOPS
DataMindsConnect2018_SECDEVOPSDataMindsConnect2018_SECDEVOPS
DataMindsConnect2018_SECDEVOPS
 
Essentials of Web Application Security: what it is, why it matters and how to...
Essentials of Web Application Security: what it is, why it matters and how to...Essentials of Web Application Security: what it is, why it matters and how to...
Essentials of Web Application Security: what it is, why it matters and how to...
 
Disrupting the Malware Kill Chain - What's New from Palo Alto Networks.
Disrupting the Malware Kill Chain - What's New from Palo Alto Networks.Disrupting the Malware Kill Chain - What's New from Palo Alto Networks.
Disrupting the Malware Kill Chain - What's New from Palo Alto Networks.
 
How PCI And PA DSS will change enterprise applications
How PCI And PA DSS will change enterprise applicationsHow PCI And PA DSS will change enterprise applications
How PCI And PA DSS will change enterprise applications
 
Mobile Application Security Threats through the Eyes of the Attacker
Mobile Application Security Threats through the Eyes of the AttackerMobile Application Security Threats through the Eyes of the Attacker
Mobile Application Security Threats through the Eyes of the Attacker
 
Owasp masvs spain 17
Owasp masvs spain 17Owasp masvs spain 17
Owasp masvs spain 17
 
Secure enterprise mobility
Secure enterprise mobilitySecure enterprise mobility
Secure enterprise mobility
 
Unified application security analyser
Unified application security analyserUnified application security analyser
Unified application security analyser
 
What the New OWASP Top 10 2013 and Latest X-Force Report Mean for App Sec
What the New OWASP Top 10 2013 and Latest X-Force Report Mean for App SecWhat the New OWASP Top 10 2013 and Latest X-Force Report Mean for App Sec
What the New OWASP Top 10 2013 and Latest X-Force Report Mean for App Sec
 
apidays LIVE Singapore 2021 - Why verifying user identity Is not enough In 20...
apidays LIVE Singapore 2021 - Why verifying user identity Is not enough In 20...apidays LIVE Singapore 2021 - Why verifying user identity Is not enough In 20...
apidays LIVE Singapore 2021 - Why verifying user identity Is not enough In 20...
 
Sumeet Mandloi: Robust Security Testing Framework
Sumeet Mandloi: Robust Security Testing FrameworkSumeet Mandloi: Robust Security Testing Framework
Sumeet Mandloi: Robust Security Testing Framework
 
Unicom Conference - Mobile Application Security
Unicom Conference - Mobile Application SecurityUnicom Conference - Mobile Application Security
Unicom Conference - Mobile Application Security
 
Application security Best Practices Framework
Application security   Best Practices FrameworkApplication security   Best Practices Framework
Application security Best Practices Framework
 
Adaptive authentication to determine login attempt penalty from multiple inpu...
Adaptive authentication to determine login attempt penalty from multiple inpu...Adaptive authentication to determine login attempt penalty from multiple inpu...
Adaptive authentication to determine login attempt penalty from multiple inpu...
 
Adaptive authentication to determine login attempt penalty from multiple inpu...
Adaptive authentication to determine login attempt penalty from multiple inpu...Adaptive authentication to determine login attempt penalty from multiple inpu...
Adaptive authentication to determine login attempt penalty from multiple inpu...
 
Security Teams & Tech In A Cloud World
Security Teams & Tech In A Cloud WorldSecurity Teams & Tech In A Cloud World
Security Teams & Tech In A Cloud World
 
A Diet of Poisoned Fruit: Designing Implants & OT Payloads for ICS Embedded D...
A Diet of Poisoned Fruit: Designing Implants & OT Payloadsfor ICS Embedded D...A Diet of Poisoned Fruit: Designing Implants & OT Payloadsfor ICS Embedded D...
A Diet of Poisoned Fruit: Designing Implants & OT Payloads for ICS Embedded D...
 
19BCP072_Presentation_Final.pdf
19BCP072_Presentation_Final.pdf19BCP072_Presentation_Final.pdf
19BCP072_Presentation_Final.pdf
 

More from Alec Tucker

Monkey fest australia 2020
Monkey fest australia 2020Monkey fest australia 2020
Monkey fest australia 2020Alec Tucker
 
Sydney Mobile .Net (Xamarin) Developers Group March 2016
Sydney Mobile .Net (Xamarin) Developers Group March 2016Sydney Mobile .Net (Xamarin) Developers Group March 2016
Sydney Mobile .Net (Xamarin) Developers Group March 2016Alec Tucker
 
SydMobNet March 2016: Matthew Robbins - Android M Security Policies
SydMobNet March 2016: Matthew Robbins - Android M Security PoliciesSydMobNet March 2016: Matthew Robbins - Android M Security Policies
SydMobNet March 2016: Matthew Robbins - Android M Security PoliciesAlec Tucker
 
Sydney Mobile .Net (Xamarin) Developers Group January 2016
Sydney Mobile .Net (Xamarin) Developers Group January 2016Sydney Mobile .Net (Xamarin) Developers Group January 2016
Sydney Mobile .Net (Xamarin) Developers Group January 2016Alec Tucker
 
Xamarin.android memory management gotchas
Xamarin.android memory management gotchasXamarin.android memory management gotchas
Xamarin.android memory management gotchasAlec Tucker
 
Sydney Mobile .Net Developers Group February 2015
Sydney Mobile .Net Developers Group February 2015Sydney Mobile .Net Developers Group February 2015
Sydney Mobile .Net Developers Group February 2015Alec Tucker
 
Sydney Mobile .Net Developers Group January 2015
Sydney Mobile .Net Developers Group January 2015Sydney Mobile .Net Developers Group January 2015
Sydney Mobile .Net Developers Group January 2015Alec Tucker
 
Sydney Mobile .Net Developers Group December 2014
Sydney Mobile .Net Developers Group December 2014Sydney Mobile .Net Developers Group December 2014
Sydney Mobile .Net Developers Group December 2014Alec Tucker
 
#SydMobNet Nov 2014: Evolve 2014 recap
#SydMobNet Nov 2014: Evolve 2014 recap#SydMobNet Nov 2014: Evolve 2014 recap
#SydMobNet Nov 2014: Evolve 2014 recapAlec Tucker
 
Sydney Mobile .Net Developers Group November 2014
Sydney Mobile .Net Developers Group November 2014Sydney Mobile .Net Developers Group November 2014
Sydney Mobile .Net Developers Group November 2014Alec Tucker
 
SydMobNet September 2014: ReactiveUI, Genymotion, Xamarin.UITest and Xamarin ...
SydMobNet September 2014: ReactiveUI, Genymotion, Xamarin.UITest and Xamarin ...SydMobNet September 2014: ReactiveUI, Genymotion, Xamarin.UITest and Xamarin ...
SydMobNet September 2014: ReactiveUI, Genymotion, Xamarin.UITest and Xamarin ...Alec Tucker
 
SydMobNet August 2014: What's New in iOS8 & Xamarin plus .Net MVC and Xamarin...
SydMobNet August 2014: What's New in iOS8 & Xamarin plus .Net MVC and Xamarin...SydMobNet August 2014: What's New in iOS8 & Xamarin plus .Net MVC and Xamarin...
SydMobNet August 2014: What's New in iOS8 & Xamarin plus .Net MVC and Xamarin...Alec Tucker
 
SydMobNet July 2014: Xamarin 3 & Xamarin Forms
SydMobNet July 2014: Xamarin 3 & Xamarin FormsSydMobNet July 2014: Xamarin 3 & Xamarin Forms
SydMobNet July 2014: Xamarin 3 & Xamarin FormsAlec Tucker
 
SydMobNet May 2014 - Lewis Benge on Wearable Tech
SydMobNet May 2014 - Lewis Benge on Wearable TechSydMobNet May 2014 - Lewis Benge on Wearable Tech
SydMobNet May 2014 - Lewis Benge on Wearable TechAlec Tucker
 
SydMobNet April 2014 - Nick Randolph's Build 2014 Update
SydMobNet April 2014 - Nick Randolph's Build 2014 UpdateSydMobNet April 2014 - Nick Randolph's Build 2014 Update
SydMobNet April 2014 - Nick Randolph's Build 2014 UpdateAlec Tucker
 
Internet of Things, Mobility & .Net Micro Framework SydMobNet March 2014
Internet of Things, Mobility & .Net Micro Framework SydMobNet March 2014Internet of Things, Mobility & .Net Micro Framework SydMobNet March 2014
Internet of Things, Mobility & .Net Micro Framework SydMobNet March 2014Alec Tucker
 
SydMobDev Feb 2014 - Cross Platform Native App Development with Xamarin and M...
SydMobDev Feb 2014 - Cross Platform Native App Development with Xamarin and M...SydMobDev Feb 2014 - Cross Platform Native App Development with Xamarin and M...
SydMobDev Feb 2014 - Cross Platform Native App Development with Xamarin and M...Alec Tucker
 

More from Alec Tucker (17)

Monkey fest australia 2020
Monkey fest australia 2020Monkey fest australia 2020
Monkey fest australia 2020
 
Sydney Mobile .Net (Xamarin) Developers Group March 2016
Sydney Mobile .Net (Xamarin) Developers Group March 2016Sydney Mobile .Net (Xamarin) Developers Group March 2016
Sydney Mobile .Net (Xamarin) Developers Group March 2016
 
SydMobNet March 2016: Matthew Robbins - Android M Security Policies
SydMobNet March 2016: Matthew Robbins - Android M Security PoliciesSydMobNet March 2016: Matthew Robbins - Android M Security Policies
SydMobNet March 2016: Matthew Robbins - Android M Security Policies
 
Sydney Mobile .Net (Xamarin) Developers Group January 2016
Sydney Mobile .Net (Xamarin) Developers Group January 2016Sydney Mobile .Net (Xamarin) Developers Group January 2016
Sydney Mobile .Net (Xamarin) Developers Group January 2016
 
Xamarin.android memory management gotchas
Xamarin.android memory management gotchasXamarin.android memory management gotchas
Xamarin.android memory management gotchas
 
Sydney Mobile .Net Developers Group February 2015
Sydney Mobile .Net Developers Group February 2015Sydney Mobile .Net Developers Group February 2015
Sydney Mobile .Net Developers Group February 2015
 
Sydney Mobile .Net Developers Group January 2015
Sydney Mobile .Net Developers Group January 2015Sydney Mobile .Net Developers Group January 2015
Sydney Mobile .Net Developers Group January 2015
 
Sydney Mobile .Net Developers Group December 2014
Sydney Mobile .Net Developers Group December 2014Sydney Mobile .Net Developers Group December 2014
Sydney Mobile .Net Developers Group December 2014
 
#SydMobNet Nov 2014: Evolve 2014 recap
#SydMobNet Nov 2014: Evolve 2014 recap#SydMobNet Nov 2014: Evolve 2014 recap
#SydMobNet Nov 2014: Evolve 2014 recap
 
Sydney Mobile .Net Developers Group November 2014
Sydney Mobile .Net Developers Group November 2014Sydney Mobile .Net Developers Group November 2014
Sydney Mobile .Net Developers Group November 2014
 
SydMobNet September 2014: ReactiveUI, Genymotion, Xamarin.UITest and Xamarin ...
SydMobNet September 2014: ReactiveUI, Genymotion, Xamarin.UITest and Xamarin ...SydMobNet September 2014: ReactiveUI, Genymotion, Xamarin.UITest and Xamarin ...
SydMobNet September 2014: ReactiveUI, Genymotion, Xamarin.UITest and Xamarin ...
 
SydMobNet August 2014: What's New in iOS8 & Xamarin plus .Net MVC and Xamarin...
SydMobNet August 2014: What's New in iOS8 & Xamarin plus .Net MVC and Xamarin...SydMobNet August 2014: What's New in iOS8 & Xamarin plus .Net MVC and Xamarin...
SydMobNet August 2014: What's New in iOS8 & Xamarin plus .Net MVC and Xamarin...
 
SydMobNet July 2014: Xamarin 3 & Xamarin Forms
SydMobNet July 2014: Xamarin 3 & Xamarin FormsSydMobNet July 2014: Xamarin 3 & Xamarin Forms
SydMobNet July 2014: Xamarin 3 & Xamarin Forms
 
SydMobNet May 2014 - Lewis Benge on Wearable Tech
SydMobNet May 2014 - Lewis Benge on Wearable TechSydMobNet May 2014 - Lewis Benge on Wearable Tech
SydMobNet May 2014 - Lewis Benge on Wearable Tech
 
SydMobNet April 2014 - Nick Randolph's Build 2014 Update
SydMobNet April 2014 - Nick Randolph's Build 2014 UpdateSydMobNet April 2014 - Nick Randolph's Build 2014 Update
SydMobNet April 2014 - Nick Randolph's Build 2014 Update
 
Internet of Things, Mobility & .Net Micro Framework SydMobNet March 2014
Internet of Things, Mobility & .Net Micro Framework SydMobNet March 2014Internet of Things, Mobility & .Net Micro Framework SydMobNet March 2014
Internet of Things, Mobility & .Net Micro Framework SydMobNet March 2014
 
SydMobDev Feb 2014 - Cross Platform Native App Development with Xamarin and M...
SydMobDev Feb 2014 - Cross Platform Native App Development with Xamarin and M...SydMobDev Feb 2014 - Cross Platform Native App Development with Xamarin and M...
SydMobDev Feb 2014 - Cross Platform Native App Development with Xamarin and M...
 

Recently uploaded

CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceanilsa9823
 
9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7Pooja Nehwal
 
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...Niamh verma
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Pooja Nehwal
 
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...wyqazy
 
Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝soniya singh
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceanilsa9823
 

Recently uploaded (7)

CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
 
9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7
 
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
 
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
 
Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
 

Enterprise Mobile Security and OWASP Compliance

  • 1. Enterprise Mobile Security and OWASP Compliance Alec Tucker White Clarke Group @alecdtucker
  • 2. Intro to Standards How can you prove to an enterprise client that your apps are secure? What boxes might a security conscious client require you to tick to comply with policy? What are the industry guidelines for app security?
  • 3. The Open Web Application Security Project OWASP Top 10 https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project OWASP Top 10 for Mobile 2016 https://www.owasp.org/index.php/Projects/OWASP_Mobile_Security_Project_-_Top_Ten_Mobile_Risks https://www.owasp.org/index.php/OWASP_Mobile_Security_Project OWASP Application Security Verification Standards (ASVS) v3.0.1 https://www.owasp.org/index.php/Category:OWASP_Application_Security_Verification_Standard_Project Chapter 17 covers mobile
  • 4. OWASP Top 10 for Mobile 2014 M1 – Weak server side controls M2 – Insecure data storage on the device M3 – Insufficient transport layer protection M4 – Unintended data leakage M5 – Poor authentication and authorization M6 – Broken cryptography M7 – Client side injection M8 – Security decisions via untrusted inputs M9 – Improper session handling M10 – Lack of binary protection
  • 5. OWASP Top 10 for Mobile 2016 M1 – Improper Platform Usage M2 – Insecure Data Storage M3 – Insecure Communication M4 – Insecure Authentication M5 – Insufficient Cryptography M6 – Insecure Authorization M7 – Client Code Quality M8 – Code Tampering M9 – Reverse Engineering M10 – Extraneous Functionality
  • 6. 2014  2016 M1 – Weak server side controls M2 – Insecure data storage on the device M3 – Insufficient transport layer protection M4 – Unintended data leakage M5 – Poor authentication and authorization M6 – Broken cryptography M7 – Client side injection M8 – Security decisions via untrusted inputs M9 – Improper session handling M10 – Lack of binary protection M1 – Improper Platform Usage M2 – Insecure Data Storage M3 – Insecure Communication M4 – Insecure Authentication M5 – Insufficient Cryptography M6 – Insecure Authorization M7 – Client Code Quality M8 – Code Tampering M9 – Reverse Engineering M10 – Extraneous Functionality
  • 7. Substantive Risks • Malware remains high among perceived risks • 63% of organisations are not confident (or have no confidence) they know all of the mobile and IoT apps used in the workplace • End user convenience is often considered more important than security • Despite the known and will documented risks, there is still a lack of urgency to address the threat • 60% of companies categorise the risk that they have already suffered a security incident due to an insecure mobile app as “likely” or higher 2017 Study on Mobile IoT Application Security, Ponemon Institute
  • 8. Reasons • Testing of mobile apps is ad-hoc, if done at all • Insecure coding practices • Broken crypto and unintended data leakage are the difficult risks to mitigate • Lack of internal policies is STILL listed as a reason • The main reason remains…rush to release 2017 Study on Mobile IoT Application Security, Ponemon Institute
  • 9. M1 – Improper Platform Usage Misuse of a platform feature or failure to use platform security controls • Violation of published guidelines • Violation of convention or common practice • Unintentional misuse • Includes requesting too many permissions, or the wrong permissions Example - usesClearTextTraffic on Android, API23+ NB: This is ignored on API24 and above if an Android Network Security Config is present
  • 10. M1 – Improper Platform Usage
  • 11. Exposing usesClearTextTraffic in Xamarin using Services; using Xamarin.Forms; [assembly:Dependency(typeof(M1.Droid.NetworkSecurityPolicyService_Droid))] namespace M1.Droid { public class NetworkSecurityPolicyService_Droid : INetworkPolicyService { public NetworkSecurityPolicyService_Droid() { } public bool isClearTextTrafficPermitted() { return Android.Security.NetworkSecurityPolicy.Instance.IsCleartextTrafficPermitted; } } }
  • 12. Checking usesClearTextTraffic in Xamarin public async Task<string> DownloadContentDishonour(string url) { WebClient client = new WebClient(); return await client.DownloadStringTaskAsync(url); }
  • 13. Checking usesClearTextTraffic in Xamarin public async Task<string> DownloadContentHonour(string url) { if (networkPolicyService != null && url.StartsWith("http:") && !networkPolicyService.isClearTextTrafficPermitted) { throw new InvalidOperationException( "Clear text network requests are not permitted"); } WebClient client = new WebClient(); return await client.DownloadStringTaskAsync(url); }
  • 14. M1 – Improper Platform Usage - Components …that honour usesClearTextTraffic • DownloadManager • MediaPlayer • SocketHandler • Java.* / Android.* HTTP, FTP, WebSockets, XMPP, IMAP, SMTP network components • Some third party libraries • OkHttp • ModernHttpClient …that dishonour usesClearTextTraffic • Android.WebKit.WebView • Java.* / Android.* UDP and TCP connections • Any related low-level network stacks • All managed networking components
  • 15. M2 – Insecure Data Storage 2014 M2 – Insecure Data Storage • SQL databases • Log files • XML datastores / manifest files • Binary data stores • SD card • Cloud sync’d folders 2014 M4 – Unintended Data Leakage • Leaked without developer’s knowledge • Cached data • Images – e.g. task switcher • Key presses • Logging • Buffers This covers two of the 2014 top 10 risks:
  • 16. Blurring the screen during auto-snapshot public override void OnResignActivation(UIApplication uiApplication) { // 1. Take a screenshot // 2. Blur it // 3. Add the blurred view to the RootViewController.View base.OnResignActivation(uiApplication); } public override void OnActivated(UIApplication uiApplication) { // 4. Remove the blurred view, if there is one base.OnActivated(uiApplication); }
  • 17. Blurring the screen during auto-snapshot // 1. Take a screenshot UIView view = UIApplication.SharedApplication.KeyWindow.RootViewController.View; UIGraphics.BeginImageContext(view.Frame.Size); view.DrawViewHierarchy(view.Frame, true); UIImage image = UIGraphics.GetImageFromCurrentImageContext(); UIGraphics.EndImageContext();
  • 18. Blurring the screen during auto-snapshot // 2. Blur it UIImage newImage = null; using(var inputImage = new CoreImage.CIImage(image)) { using(var blur = new CoreImage.CIGaussianBlur()) { blur.Image = inputImage; blur.Radius = 25f; using(var outputImage = blur.OutputImage) { using(var context = CoreImage.CIContext.FromOptions(new CoreImage.CIContextOptions() { UseSoftwareRenderer = false })) { using(var cgImage = context.CreateCGImage(outputImage, new System.Drawing.RectangleF ( new System.Drawing.PointF(0,0), new System.Drawing.SizeF((float)image.Size.Width, (float)image.Size.Height)))) { newImage = UIImage.FromImage(cgImage); } } } } }
  • 19. Blurring the screen during auto-snapshot // 3. Add the blurred view to the RootViewController.View view.AddSubview(new UIImageView(newImage)); // 4. Remove the blurred view, if there is one int lastIndex = UIApplication.SharedApplication.KeyWindow .RootViewController.View.Subviews.GetUpperBound(0); if (lastIndex > 0) { UIApplication.SharedApplication.KeyWindow .RootViewController.View.Subviews[lastIndex] .RemoveFromSuperview(); }
  • 20. M2 – Insecure Data Storage iOS Developer Cheat Sheet - https://www.owasp.org/index.php/IOS_Developer_Cheat_Sheet - Small amounts of sensitive data should go in the Keychain - Recommends usage of a third party encryption API “not encumbered by inherent weaknesses in Apple’s encryption” - Singles out SQLCipher - Key management then becomes critical ( M5) - https://www.owasp.org/index.php/Key_Management_Cheat_Sheet Windows Mobile 10 Security Guide - https://technet.microsoft.com/en-us/library/mt674915(v=vs.85).aspx
  • 21. M3 – Insecure Communication This covers: • Poor handshaking • Incorrect SLL versions • Weak negotiation • Cleartext communication of sensitive assets * • SSL certificate validity * Sensitive assets can include things like the IMEI and other hardware addresses. Some jurisdictions consider these to be private data that must be given the same privacy treatment as a phone number or home address
  • 22. Checking certificate validity – iOS / Android System.Net.ServicePointManager.ServerCertificateValidationCallback += ((sender, certificate, chain, sslPolicyErrors) => { return sslPolicyErrors == System.Net.Security.SslPolicyErrors.None && validCertificates.Contains(certificate.GetCertHashString); });
  • 23. M4 – Insecure Authentication In general, follow the same rules as a web app for authentication i.e. if porting a web app, it should not be possible to authenticate with less auth factors than the web browser Never use a device identifier (UDID, IP, MAC address, IMEI) to identify a user or a session Remember that some jurisdictions treat these as personal data
  • 24. M4 – Insecure Authentication Avoid out-of-band authentication tokens being sent to the same device as the user is using to login (e.g. SMS to phone) http://www.smh.com.au/technology/consumer-security/malware-hijacks-big-four- australian-banks-apps-steals-twofactor-sms-codes-20160309-gnf528.html
  • 25. M5 – Insufficient Cryptography https://www.owasp.org/index.php/Cryptographic_Storage_Cheat_Sheet • Only store sensitive data that you need • Use strong approved authenticated encryption • Store a one-way and salted value of passwords • Ensure that the cryptographic protection remains secure even if access controls fail • Ensure that any secret key is protected from unauthorised access • Follow applicable regulations on use of cryptography • PCLCrypto component
  • 26. M5 – Insufficient Cryptography Use of hardware information in key: SQLCipher advice - What’s unacceptable is to use this in entirety and nothing else - They propose it’s acceptable to use it as a portion of a key, but point out that it’s critical that at least a portion of the key is both: - Entered by the user - Never stored on the device https://discuss.zetetic.net/t/sqlcipher-database-key-material-and-selection/25
  • 27. M6 – Insecure Authorization App may restrict functions based on user’s authorization level Web service endpoints cannot assume this is sufficient Classic finding is a server implicitly trusting the mobile code to only generate requests appropriate to the user’s privilege level Of course this cannot be assumed of a compromised app
  • 28. M7 – Client Code Quality “Catch-all” for code level implementation problems where the solution is to rewrite some of the mobile code. Poor coding practices allow attackers to modify: • Your app’s business logic • Code to bypass security controls
  • 29. M7 – Client Code Quality Mitigations • Developer education, coding standards, code reviews, check-in hooks • Static code analysis tool (several available) OWASP Guides: • Secure Coding Pratices – Quick Reference Guide v2 • https://www.owasp.org/index.php/OWASP_Secure_Coding_Practices_-_Quick_Reference_Guide • Secure Coding Cheat Sheet • https://www.owasp.org/index.php/Secure_Coding_Cheat_Sheet
  • 30. M8 – Code Tampering private bool IsJailBroken() { return UIApplication.SharedApplication.CanOpenUrl(new NSUrl("cydia://package/com.example.package"))); }
  • 31. M9 – Reverse Engineering • Obfuscation using DotFuscator • Community edition is available with Visual Studio https://blog.xamarin.com/protecting-xamarin-apps-dotfuscator/
  • 32. M10 – Extraneous Functionality Inclusion of testing shortcuts never intended for Production e.g. ignoring certificate errors, disabling two-factor authentication during testing Inclusion of these could be the results of a CI/CD script error Build/deployment issues far more likely if manual steps are involved Also covers intentional inclusion of malicious code
  • 33. Where to from here? Source: 2017 Study on Mobile IoT Application Security, Ponemon Institute
  • 34. Where to from here? • OWASP ASVS • PCI standards • If you don’t have a security policy, reference these standards • If you do have a security policy, check it against these standards • If you’re writing or reviewing a security policy, check it against these standards • Mobile dev is not web dev • Establish and maintain a dedicated Mobile Center of Excellence • A combination of the above
  • 35. Thank you / Questions