SlideShare a Scribd company logo
Mobile Application Infrastructure
Security
Michalis Kamprianis
MBA, MSc, CISSP, CCSK, COBIT, Prince2, ISO27001LA, ITIL
https://www.linkedin.com/in/michaliskamprianis
2
Mobile application categories
» Stand Alone
• Picture gallery
• Camera
• Clock and alarm
• Notes, Word processor
» Client – Server
• No significant user data
- Transport schedules
• With significant user data and interaction
- Twitter
- LinkedIn
- Tinder
3
Mobile application security analogy
» What does it mean to protect information in the mobile application?
4
Mobile app security + infrastructure
» What does it mean to protect information always?
5
What are we talking about?
» Security is as strong as your weakest link
(1) You should ensure the mobile application is secure
(2) If you store data in servers, you should protect the servers too
• Hardening, Secure configuration, Patch and Vulnerability management
• Access control, Least privilege, Segregation of duties
• Logging, Monitoring
• Encryption at rest,
(3) And by the way, since you’re transferring the data from the
application to the servers, protect it en route
• Encryption in transit
6
An old trick
» Encryption in transit usually means SSL
• And more often than not, that is HTTPS
» Known problem: man-in-the-middle attack
» Known solution: Certificate pinning
• OWASP has sample code for iOS and Android
• No solution for Windows Phone
Let’s make sure we do it right!
» Own certificate authority or not?
• I opt for own; generate the certificates and shut it down!
• In 2001, Verisign issued fake MS certificates
• In 2010 Verisign was hacked – no news about the CA
• Vasco/DigiNotar got hacked in 2011 having issued hundreds of
fraudulent certificates
• KPN/Getronics got hacked in 2007, identified in 2011
• Comodo’s reseller was hacked, 9 fraudulent certificates issued
• None of the drawbacks of self-signed certificates is relevant in
this case
What else do we add?
» Android – specific : How about client key pairs / certificates?
• Have either the reverse proxy or plain web server “authenticate” the .apk
• Use SSL Verify Depth wisely so that ONLY your CA’s certificates are accepted
• Use Certificate Revocation Lists so that you can block access to a buggy version altogether
• Issue different certificates per version / device type
» Of course don’t forget to :
• Remove any debugging code
• Obfuscate the apk before release (proguard)
• Construct passwords on the fly; use tokenization and runtime functions
• Even better, construct passwords algorithmically from existing application strings
» Important for client key pairs : use the appropriate KeyStore
• Do not use JKS / BKS; this is only resistant to tampering
• Use UBER; this is resistant to both tampering AND inspection
Is this security by obscurity?
» Obscurity does not (usually) provide security
• But even if you’re specifically targeted, it adds to security
• This “trick” adds to the setup, does nor replace something
• If it gets broken, nothing changes in comparison to not having it at all
» Similar cases
• Do you change your SSH server port?
• Do you use port-knocking?
• Do you hide your servers’ version information from headers?
• Do you remove software banners and welcome texts?
Do as Google says…
» Do you use Google Play and In-App billing?
» Google says: Protect your Google Play public key
• To keep your public key safe from malicious users and
hackers, do not embed it in any code as a literal string.
Instead, construct the string at runtime from pieces or
use bit manipulation (for example, XOR with some other
string) to hide the actual key. The key itself is not secret
information, but you do not want to make it easy for a
hacker or malicious user to replace the public key with
another key
Raise the bar
» There is no perfect security
• But we should do our best, including delaying the attacker
» If someone targets you, you’re in trouble
• Big names are getting hacked every day
» Make sure you’re not the easiest target
• You avoid as much as possible amateurs / script kiddies
• You buy yourself some time on the next 0-day vulnerability
» Make intrusion difficult and time consuming
• A cost benefit analysis should push the attacker away
Remember that sometimes…
Drawbacks
» There is some inherent complexity
• Complexity is bad for security
• But you only do it once and the code is very simple
» You may open yourself to new attack vectors
• SSL – based (although you already have SSL)
• Potential DOS due to client SSL authentication
» Potential performance overhead
Next steps
» Wouldn’t it be nice
• If that technique could be extended to generate
user-bound certificates on registration?
Get in touch
Michalis Kamprianis
» On LinkedIn:
https://www.linkedin.com/in/michaliskamprianis
» By email:
michalis.kamprianis@gmail.com
» On Twitter:
@kamprianism

More Related Content

What's hot

Application Security within Agile
Application Security within AgileApplication Security within Agile
Application Security within Agile
Netlight Consulting
 
How an Attacker "Audits" Your Software Systems
How an Attacker "Audits" Your Software SystemsHow an Attacker "Audits" Your Software Systems
How an Attacker "Audits" Your Software Systems
Security Innovation
 
Kubernetes Secrets Management - Securing Your Production Environment
Kubernetes Secrets Management - Securing Your Production EnvironmentKubernetes Secrets Management - Securing Your Production Environment
Kubernetes Secrets Management - Securing Your Production Environment
Akeyless
 
IBM Secret Key management protoco
IBM Secret Key management protocoIBM Secret Key management protoco
IBM Secret Key management protoco
gori4
 
Bulletproofing your account palcomtech
Bulletproofing your account palcomtechBulletproofing your account palcomtech
Bulletproofing your account palcomtech
Alfons Tanujaya
 
The Key to Strong Cloud Security
The Key to Strong Cloud SecurityThe Key to Strong Cloud Security
The Key to Strong Cloud Security
Akeyless
 
Hardening Microservices Security: Building a Layered Defense Strategy
Hardening Microservices Security: Building a Layered Defense StrategyHardening Microservices Security: Building a Layered Defense Strategy
Hardening Microservices Security: Building a Layered Defense Strategy
Cloudflare
 
State of OWASP 2015
State of OWASP 2015State of OWASP 2015
State of OWASP 2015
tmd800
 
Shmoocon 2015 - httpscreenshot
Shmoocon 2015 - httpscreenshotShmoocon 2015 - httpscreenshot
Shmoocon 2015 - httpscreenshot
jstnkndy
 
Passwords are passé. WebAuthn is simpler, stronger and ready to go
Passwords are passé. WebAuthn is simpler, stronger and ready to goPasswords are passé. WebAuthn is simpler, stronger and ready to go
Passwords are passé. WebAuthn is simpler, stronger and ready to go
Michael Furman
 
Path of Cyber Security
Path of Cyber SecurityPath of Cyber Security
Path of Cyber Security
Satria Ady Pradana
 
How can you deliver a secure product
How can you deliver a secure productHow can you deliver a secure product
How can you deliver a secure product
Michael Furman
 
Kubernetes Secrets - The Good, The Bad, and The Ugly - Akeyless
Kubernetes Secrets -  The Good, The Bad, and The Ugly - AkeylessKubernetes Secrets -  The Good, The Bad, and The Ugly - Akeyless
Kubernetes Secrets - The Good, The Bad, and The Ugly - Akeyless
Akeyless
 
[OPD 2019] AST Platform and the importance of multi-layered application secu...
[OPD 2019]  AST Platform and the importance of multi-layered application secu...[OPD 2019]  AST Platform and the importance of multi-layered application secu...
[OPD 2019] AST Platform and the importance of multi-layered application secu...
OWASP
 
Cymmetria Webinar: Deception & Responder
Cymmetria Webinar: Deception & ResponderCymmetria Webinar: Deception & Responder
Cymmetria Webinar: Deception & Responder
Cymmetria
 
Bypass Security Checking with Frida
Bypass Security Checking with FridaBypass Security Checking with Frida
Bypass Security Checking with Frida
Satria Ady Pradana
 
BlueHat v18 || Dep for the app layer - time for app sec to grow up
BlueHat v18 || Dep for the app layer - time for app sec to grow upBlueHat v18 || Dep for the app layer - time for app sec to grow up
BlueHat v18 || Dep for the app layer - time for app sec to grow up
BlueHat Security Conference
 
Microservices Security: dos and don'ts
Microservices Security: dos and don'tsMicroservices Security: dos and don'ts
Microservices Security: dos and don'ts
Minded Security
 
Let's get started with passwordless authentication using windows hello in you...
Let's get started with passwordless authentication using windows hello in you...Let's get started with passwordless authentication using windows hello in you...
Let's get started with passwordless authentication using windows hello in you...
Chris Ryu
 
Secure coding practices
Secure coding practicesSecure coding practices
Secure coding practices
Mohammed Danish Amber
 

What's hot (20)

Application Security within Agile
Application Security within AgileApplication Security within Agile
Application Security within Agile
 
How an Attacker "Audits" Your Software Systems
How an Attacker "Audits" Your Software SystemsHow an Attacker "Audits" Your Software Systems
How an Attacker "Audits" Your Software Systems
 
Kubernetes Secrets Management - Securing Your Production Environment
Kubernetes Secrets Management - Securing Your Production EnvironmentKubernetes Secrets Management - Securing Your Production Environment
Kubernetes Secrets Management - Securing Your Production Environment
 
IBM Secret Key management protoco
IBM Secret Key management protocoIBM Secret Key management protoco
IBM Secret Key management protoco
 
Bulletproofing your account palcomtech
Bulletproofing your account palcomtechBulletproofing your account palcomtech
Bulletproofing your account palcomtech
 
The Key to Strong Cloud Security
The Key to Strong Cloud SecurityThe Key to Strong Cloud Security
The Key to Strong Cloud Security
 
Hardening Microservices Security: Building a Layered Defense Strategy
Hardening Microservices Security: Building a Layered Defense StrategyHardening Microservices Security: Building a Layered Defense Strategy
Hardening Microservices Security: Building a Layered Defense Strategy
 
State of OWASP 2015
State of OWASP 2015State of OWASP 2015
State of OWASP 2015
 
Shmoocon 2015 - httpscreenshot
Shmoocon 2015 - httpscreenshotShmoocon 2015 - httpscreenshot
Shmoocon 2015 - httpscreenshot
 
Passwords are passé. WebAuthn is simpler, stronger and ready to go
Passwords are passé. WebAuthn is simpler, stronger and ready to goPasswords are passé. WebAuthn is simpler, stronger and ready to go
Passwords are passé. WebAuthn is simpler, stronger and ready to go
 
Path of Cyber Security
Path of Cyber SecurityPath of Cyber Security
Path of Cyber Security
 
How can you deliver a secure product
How can you deliver a secure productHow can you deliver a secure product
How can you deliver a secure product
 
Kubernetes Secrets - The Good, The Bad, and The Ugly - Akeyless
Kubernetes Secrets -  The Good, The Bad, and The Ugly - AkeylessKubernetes Secrets -  The Good, The Bad, and The Ugly - Akeyless
Kubernetes Secrets - The Good, The Bad, and The Ugly - Akeyless
 
[OPD 2019] AST Platform and the importance of multi-layered application secu...
[OPD 2019]  AST Platform and the importance of multi-layered application secu...[OPD 2019]  AST Platform and the importance of multi-layered application secu...
[OPD 2019] AST Platform and the importance of multi-layered application secu...
 
Cymmetria Webinar: Deception & Responder
Cymmetria Webinar: Deception & ResponderCymmetria Webinar: Deception & Responder
Cymmetria Webinar: Deception & Responder
 
Bypass Security Checking with Frida
Bypass Security Checking with FridaBypass Security Checking with Frida
Bypass Security Checking with Frida
 
BlueHat v18 || Dep for the app layer - time for app sec to grow up
BlueHat v18 || Dep for the app layer - time for app sec to grow upBlueHat v18 || Dep for the app layer - time for app sec to grow up
BlueHat v18 || Dep for the app layer - time for app sec to grow up
 
Microservices Security: dos and don'ts
Microservices Security: dos and don'tsMicroservices Security: dos and don'ts
Microservices Security: dos and don'ts
 
Let's get started with passwordless authentication using windows hello in you...
Let's get started with passwordless authentication using windows hello in you...Let's get started with passwordless authentication using windows hello in you...
Let's get started with passwordless authentication using windows hello in you...
 
Secure coding practices
Secure coding practicesSecure coding practices
Secure coding practices
 

Similar to (ISC)2 Kamprianis - Mobile Security

Breaking Secure Mobile Applications - Hack In The Box 2014 KL
Breaking Secure Mobile Applications - Hack In The Box 2014 KLBreaking Secure Mobile Applications - Hack In The Box 2014 KL
Breaking Secure Mobile Applications - Hack In The Box 2014 KL
iphonepentest
 
iOS Application Security.pdf
iOS Application Security.pdfiOS Application Security.pdf
iOS Application Security.pdf
Ravi Aggarwal
 
Yow connected developing secure i os applications
Yow connected   developing secure i os applicationsYow connected   developing secure i os applications
Yow connected developing secure i os applications
mgianarakis
 
Creating secure apps using the salesforce mobile sdk
Creating secure apps using the salesforce mobile sdkCreating secure apps using the salesforce mobile sdk
Creating secure apps using the salesforce mobile sdk
Martin Vigo
 
OWASP Mobile TOP 10 2014
OWASP Mobile TOP 10 2014OWASP Mobile TOP 10 2014
OWASP Mobile TOP 10 2014
Islam Azeddine Mennouchi
 
Hacking Mobile Apps
Hacking Mobile AppsHacking Mobile Apps
Hacking Mobile Apps
Sophos Benelux
 
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja WarriorsRyan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors
Ryan Elkins
 
Started In Security Now I'm Here
Started In Security Now I'm HereStarted In Security Now I'm Here
Started In Security Now I'm Here
Christopher Grayson
 
YOW! Connected 2014 - Developing Secure iOS Applications
YOW! Connected 2014 - Developing Secure iOS ApplicationsYOW! Connected 2014 - Developing Secure iOS Applications
YOW! Connected 2014 - Developing Secure iOS Applications
eightbit
 
Mobile App Security - Best Practices
Mobile App Security - Best PracticesMobile App Security - Best Practices
Mobile App Security - Best Practices
RedBlackTree
 
AusCERT - Developing Secure iOS Applications
AusCERT - Developing Secure iOS ApplicationsAusCERT - Developing Secure iOS Applications
AusCERT - Developing Secure iOS Applications
eightbit
 
Application security meetup k8_s security with zero trust_29072021
Application security meetup k8_s security with zero trust_29072021Application security meetup k8_s security with zero trust_29072021
Application security meetup k8_s security with zero trust_29072021
lior mazor
 
Protecting Sensitive Data (and be PCI Compliant too!)
Protecting Sensitive Data (and be PCI Compliant too!)Protecting Sensitive Data (and be PCI Compliant too!)
Protecting Sensitive Data (and be PCI Compliant too!)
Security Innovation
 
Keeping Secrets on the Internet of Things - Mobile Web Application Security
Keeping Secrets on the Internet of Things - Mobile Web Application SecurityKeeping Secrets on the Internet of Things - Mobile Web Application Security
Keeping Secrets on the Internet of Things - Mobile Web Application Security
Kelly Robertson
 
IBWAS 2010: Web Security From an Auditor's Standpoint
IBWAS 2010: Web Security From an Auditor's StandpointIBWAS 2010: Web Security From an Auditor's Standpoint
IBWAS 2010: Web Security From an Auditor's Standpoint
Luis Grangeia
 
Luis Grangeia IBWAS
Luis Grangeia IBWASLuis Grangeia IBWAS
Luis Grangeia IBWAS
Luis Grangeia
 
9 Writing Secure Android Applications
9 Writing Secure Android Applications9 Writing Secure Android Applications
9 Writing Secure Android Applications
Sam Bowne
 
Top 10 mobile security risks - Khổng Văn Cường
Top 10 mobile security risks - Khổng Văn CườngTop 10 mobile security risks - Khổng Văn Cường
Top 10 mobile security risks - Khổng Văn Cường
Security Bootcamp
 
Top 10 mobile security risks - Khổng Văn Cường
Top 10 mobile security risks - Khổng Văn CườngTop 10 mobile security risks - Khổng Văn Cường
Top 10 mobile security risks - Khổng Văn Cường
Võ Thái Lâm
 
Zen and the art of Security Testing
Zen and the art of Security TestingZen and the art of Security Testing
Zen and the art of Security Testing
TEST Huddle
 

Similar to (ISC)2 Kamprianis - Mobile Security (20)

Breaking Secure Mobile Applications - Hack In The Box 2014 KL
Breaking Secure Mobile Applications - Hack In The Box 2014 KLBreaking Secure Mobile Applications - Hack In The Box 2014 KL
Breaking Secure Mobile Applications - Hack In The Box 2014 KL
 
iOS Application Security.pdf
iOS Application Security.pdfiOS Application Security.pdf
iOS Application Security.pdf
 
Yow connected developing secure i os applications
Yow connected   developing secure i os applicationsYow connected   developing secure i os applications
Yow connected developing secure i os applications
 
Creating secure apps using the salesforce mobile sdk
Creating secure apps using the salesforce mobile sdkCreating secure apps using the salesforce mobile sdk
Creating secure apps using the salesforce mobile sdk
 
OWASP Mobile TOP 10 2014
OWASP Mobile TOP 10 2014OWASP Mobile TOP 10 2014
OWASP Mobile TOP 10 2014
 
Hacking Mobile Apps
Hacking Mobile AppsHacking Mobile Apps
Hacking Mobile Apps
 
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja WarriorsRyan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors
 
Started In Security Now I'm Here
Started In Security Now I'm HereStarted In Security Now I'm Here
Started In Security Now I'm Here
 
YOW! Connected 2014 - Developing Secure iOS Applications
YOW! Connected 2014 - Developing Secure iOS ApplicationsYOW! Connected 2014 - Developing Secure iOS Applications
YOW! Connected 2014 - Developing Secure iOS Applications
 
Mobile App Security - Best Practices
Mobile App Security - Best PracticesMobile App Security - Best Practices
Mobile App Security - Best Practices
 
AusCERT - Developing Secure iOS Applications
AusCERT - Developing Secure iOS ApplicationsAusCERT - Developing Secure iOS Applications
AusCERT - Developing Secure iOS Applications
 
Application security meetup k8_s security with zero trust_29072021
Application security meetup k8_s security with zero trust_29072021Application security meetup k8_s security with zero trust_29072021
Application security meetup k8_s security with zero trust_29072021
 
Protecting Sensitive Data (and be PCI Compliant too!)
Protecting Sensitive Data (and be PCI Compliant too!)Protecting Sensitive Data (and be PCI Compliant too!)
Protecting Sensitive Data (and be PCI Compliant too!)
 
Keeping Secrets on the Internet of Things - Mobile Web Application Security
Keeping Secrets on the Internet of Things - Mobile Web Application SecurityKeeping Secrets on the Internet of Things - Mobile Web Application Security
Keeping Secrets on the Internet of Things - Mobile Web Application Security
 
IBWAS 2010: Web Security From an Auditor's Standpoint
IBWAS 2010: Web Security From an Auditor's StandpointIBWAS 2010: Web Security From an Auditor's Standpoint
IBWAS 2010: Web Security From an Auditor's Standpoint
 
Luis Grangeia IBWAS
Luis Grangeia IBWASLuis Grangeia IBWAS
Luis Grangeia IBWAS
 
9 Writing Secure Android Applications
9 Writing Secure Android Applications9 Writing Secure Android Applications
9 Writing Secure Android Applications
 
Top 10 mobile security risks - Khổng Văn Cường
Top 10 mobile security risks - Khổng Văn CườngTop 10 mobile security risks - Khổng Văn Cường
Top 10 mobile security risks - Khổng Văn Cường
 
Top 10 mobile security risks - Khổng Văn Cường
Top 10 mobile security risks - Khổng Văn CườngTop 10 mobile security risks - Khổng Văn Cường
Top 10 mobile security risks - Khổng Văn Cường
 
Zen and the art of Security Testing
Zen and the art of Security TestingZen and the art of Security Testing
Zen and the art of Security Testing
 

(ISC)2 Kamprianis - Mobile Security

  • 1.
  • 2. Mobile Application Infrastructure Security Michalis Kamprianis MBA, MSc, CISSP, CCSK, COBIT, Prince2, ISO27001LA, ITIL https://www.linkedin.com/in/michaliskamprianis 2
  • 3. Mobile application categories » Stand Alone • Picture gallery • Camera • Clock and alarm • Notes, Word processor » Client – Server • No significant user data - Transport schedules • With significant user data and interaction - Twitter - LinkedIn - Tinder 3
  • 4. Mobile application security analogy » What does it mean to protect information in the mobile application? 4
  • 5. Mobile app security + infrastructure » What does it mean to protect information always? 5
  • 6. What are we talking about? » Security is as strong as your weakest link (1) You should ensure the mobile application is secure (2) If you store data in servers, you should protect the servers too • Hardening, Secure configuration, Patch and Vulnerability management • Access control, Least privilege, Segregation of duties • Logging, Monitoring • Encryption at rest, (3) And by the way, since you’re transferring the data from the application to the servers, protect it en route • Encryption in transit 6
  • 7. An old trick » Encryption in transit usually means SSL • And more often than not, that is HTTPS » Known problem: man-in-the-middle attack » Known solution: Certificate pinning • OWASP has sample code for iOS and Android • No solution for Windows Phone
  • 8. Let’s make sure we do it right! » Own certificate authority or not? • I opt for own; generate the certificates and shut it down! • In 2001, Verisign issued fake MS certificates • In 2010 Verisign was hacked – no news about the CA • Vasco/DigiNotar got hacked in 2011 having issued hundreds of fraudulent certificates • KPN/Getronics got hacked in 2007, identified in 2011 • Comodo’s reseller was hacked, 9 fraudulent certificates issued • None of the drawbacks of self-signed certificates is relevant in this case
  • 9. What else do we add? » Android – specific : How about client key pairs / certificates? • Have either the reverse proxy or plain web server “authenticate” the .apk • Use SSL Verify Depth wisely so that ONLY your CA’s certificates are accepted • Use Certificate Revocation Lists so that you can block access to a buggy version altogether • Issue different certificates per version / device type » Of course don’t forget to : • Remove any debugging code • Obfuscate the apk before release (proguard) • Construct passwords on the fly; use tokenization and runtime functions • Even better, construct passwords algorithmically from existing application strings » Important for client key pairs : use the appropriate KeyStore • Do not use JKS / BKS; this is only resistant to tampering • Use UBER; this is resistant to both tampering AND inspection
  • 10. Is this security by obscurity? » Obscurity does not (usually) provide security • But even if you’re specifically targeted, it adds to security • This “trick” adds to the setup, does nor replace something • If it gets broken, nothing changes in comparison to not having it at all » Similar cases • Do you change your SSH server port? • Do you use port-knocking? • Do you hide your servers’ version information from headers? • Do you remove software banners and welcome texts?
  • 11. Do as Google says… » Do you use Google Play and In-App billing? » Google says: Protect your Google Play public key • To keep your public key safe from malicious users and hackers, do not embed it in any code as a literal string. Instead, construct the string at runtime from pieces or use bit manipulation (for example, XOR with some other string) to hide the actual key. The key itself is not secret information, but you do not want to make it easy for a hacker or malicious user to replace the public key with another key
  • 12. Raise the bar » There is no perfect security • But we should do our best, including delaying the attacker » If someone targets you, you’re in trouble • Big names are getting hacked every day » Make sure you’re not the easiest target • You avoid as much as possible amateurs / script kiddies • You buy yourself some time on the next 0-day vulnerability » Make intrusion difficult and time consuming • A cost benefit analysis should push the attacker away
  • 14. Drawbacks » There is some inherent complexity • Complexity is bad for security • But you only do it once and the code is very simple » You may open yourself to new attack vectors • SSL – based (although you already have SSL) • Potential DOS due to client SSL authentication » Potential performance overhead
  • 15. Next steps » Wouldn’t it be nice • If that technique could be extended to generate user-bound certificates on registration?
  • 16. Get in touch Michalis Kamprianis » On LinkedIn: https://www.linkedin.com/in/michaliskamprianis » By email: michalis.kamprianis@gmail.com » On Twitter: @kamprianism