SlideShare a Scribd company logo
1 of 50
Download to read offline
Data transfer security
for mobile apps
what the fish doesn’t notice in the ocean? 🐟
#mddaylviv2015 @vixentael
There ain’t
enough talks
about security
Apple Security Guide
Every program is a potential target.
Your customers’ property and your reputation
are at stake.
https://developer.apple.com/library/mac/documentation/Security/
Conceptual/SecureCodingGuide/Introduction.html
data transfer security for mobile apps #mddaylviv2015 @vixentael
3 kinds of data to protect
Data in storage
Data in memory
Data in motion
data transfer security for mobile apps #mddaylviv2015 @vixentael
Data in motion:
what could
possibly go wrong
Communication with server. Usually.
data transfer security for mobile apps #mddaylviv2015 @vixentael
Imagine little fish...
data transfer security for mobile apps #mddaylviv2015 @vixentael
...in the ocean of threats
active
eavesdropping
data leakage
evil twin
replay attack
...in the ocean of threats
* SSL experimenting with
Android Top100 apps
http://bit.ly/1NqpheM
* Intercepting the App
Store's Traffic on iOS
http://bit.ly/1H3xMrs
One proxy to rule ‘em all!
Attack reasons
Many apps use HTTP*
data transfer security for mobile apps #mddaylviv2015 @vixentael
*iOS9 ATS will decrease this number
Attack reasons
Many apps use HTTP*
Some apps use HTTPS
data transfer security for mobile apps #mddaylviv2015 @vixentael
*iOS9 ATS will decrease this number
Attack reasons
Many apps use HTTP*
Some apps use HTTPS
Few apps encrypt user’s data
*iOS9 ATS will decrease this number
data transfer security for mobile apps #mddaylviv2015 @vixentael
Why is this
happening?
1. Security is hard.
STACKOVERFLOW!
Let’s StackOverflow!
http://stackoverflow.com/a/21826729
data transfer security for mobile apps #mddaylviv2015 @vixentael
Weird padding
http://stackoverflow.com/a/21826729
data transfer security for mobile apps #mddaylviv2015 @vixentael
2. Software is buggy
Remove padding!
http://stackoverflow.com/a/26147479
data transfer security for mobile apps #mddaylviv2015 @vixentael
Omg WTF is going on
WTF
http://stackoverflow.com/a/26147479
WTF
WTF
data transfer security for mobile apps #mddaylviv2015 @vixentael
3. Illusion of safety is still a illusion
data transfer security for mobile apps #mddaylviv2015 @vixentael
#define kUserPassword
@“1111111”
Armoring
your fish
Realize security risks
data transfer security for mobile apps #mddaylviv2015 @vixentael
Amateurs Produce Amateur Cryptography
Anyone can invent a security system
that he himself cannot break
— Schneier's Law
https://www.schneier.com/blog/archives/
2011/04/schneiers_law.html
data transfer security for mobile apps #mddaylviv2015 @vixentael
Do not re-implement existing things
data transfer security for mobile apps #mddaylviv2015 @vixentael
Security is a
system, not a
pluggable library
Build stout architecture
data transfer security for mobile apps #mddaylviv2015 @vixentael
Build stout architecture
cryptolib
key
management
data transfer security for mobile apps #mddaylviv2015 @vixentael
Use great tools
Themis https://github.com/cossacklabs/themis
RNCryptor https://github.com/RNCryptor/RNCryptor
MIHCrypto https://github.com/hohl/MIHCrypto
OTRKit https://github.com/ChatSecure/OTRKit
libsodium/NaCL https://github.com/mochtu/libsodium-ios
scientific background trust big guys good track record
data transfer security for mobile apps #mddaylviv2015 @vixentael
Use SSL? Do it right!
https://www.owasp.org/index.php/Transport_Layer_Protection_Cheat_Sheet
✤use long keys
✤remove backward compatibility
✤use good ciphers (EC vs RSA)
✤SSL pinning
✤use cheat sheet
https://www.cossacklabs.com/avoid-ssl-for-your-next-app.htmlSSL has a lot of problems
To survive you need to:
data transfer security for mobile apps #mddaylviv2015 @vixentael
TLS/SSL in short
data transfer security for mobile apps #mddaylviv2015 @vixentael
Where can it break?
data transfer security for mobile apps #mddaylviv2015 @vixentael
SSL pinning
data transfer security for mobile apps #mddaylviv2015 @vixentael
SSL pinning on iOS
https://possiblemobile.com/2013/03/ssl-pinning-for-increased-app-security/
https://www.paypal-engineering.com/2015/10/14/key-pinning-in-mobile-
applications/
- (void)connection:(NSURLConnection *)connection willSendRequestForAuthenticationChallenge:
(NSURLAuthenticationChallenge *)challenge {
SecTrustRef serverTrust = challenge.protectionSpace.serverTrust;
id<NSURLAuthenticationChallengeSender> sender = challenge.sender;
SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, 0);
NSData * remoteCertificateData = CFBridgingRelease(SecCertificateCopyData(certificate));
NSString * cerPath = [[NSBundle mainBundle] pathForResource:@"MyLocalCertificate" ofType:@"cer"];
NSData * localCertData = [NSData dataWithContentsOfFile:cerPath];
if ([remoteCertificateData isEqualToData:localCertData]) {
NSURLCredential * credential = [NSURLCredential credentialForTrust:serverTrust];
[sender useCredential:credential forAuthenticationChallenge:challenge];
} else {
[sender cancelAuthenticationChallenge:challenge];
}
}
data transfer security for mobile apps #mddaylviv2015 @vixentael
SSL pinning more easy :)
Swift lib for HTTPS with SSL pinning
https://github.com/johnlui/Pitaya/wiki
let	
  certData	
  =	
  NSData(contentsOfFile:	
  
NSBundle.mainBundle().pathForResource("lvwenhancom",	
  ofType:	
  "cer")!)!

...	
  ...

.addSSLPinning(LocalCertData:	
  certData)	
  {	
  ()	
  -­‐>	
  Void	
  in

	
  	
  	
  	
  print("Under	
  Man-­‐in-­‐the-­‐middle	
  attack!")

}
data transfer security for mobile apps #mddaylviv2015 @vixentael
How to achieve
the solution
Let’s imagine chatting app
simple API
authentication meaningfull communication
confidentiality thread
data transfer security for mobile apps #mddaylviv2015 @vixentael
Securing app step by step
1. HTTPS everywhere
2. SSL pinning
3. Encrypt messages by persistent keys
data transfer security for mobile apps #mddaylviv2015 @vixentael
Securing app step by step
1. HTTPS everywhere
----> SSL/TLS has lots of bugs and bad crypto
2. SSL pinning
----> is not a panacea
3. Encrypt messages by persistent keys
----> can be easily cracked
data transfer security for mobile apps #mddaylviv2015 @vixentael
Securing in a more proper way
perfect forward secrecy
use good ciphers
data transfer security for mobile apps #mddaylviv2015 @vixentael
Using ephemeral key
data transfer security for mobile apps #mddaylviv2015 @vixentael
How to achieve it easily
https://github.com/cossacklabs/themis
1. establish session
2. encrypt message with SecureSession before sending
3. decrypt message after receive
4. encrypt history with SecureCell
data transfer security for mobile apps #mddaylviv2015 @vixentael
How to achieve it easily
https://github.com/cossacklabs/mobile-
websocket-example
data transfer security for mobile apps #mddaylviv2015 @vixentael
Security is hard, but
if you’re smart,
security is not so
hard :)
The last slide
@vixentael
iOS developer
at stanfy.com
[creating awesome mobile
and IoT apps]
To read
★ CryptoCat iOS app security audit
https://nabla-c0d3.github.io/documents/iSEC_Cryptocat_iOS.pdf
★ Why you should avoid SSL for your next application
https://www.cossacklabs.com/avoid-ssl-for-your-next-app.html
★ OAuth1, OAuth2, OAuth...?
http://homakov.blogspot.com/2013/03/oauth1-oauth2-oauth.html
To watch youtube
★ All tasks of Moxie Marlinspike
https://www.youtube.com/watch?v=ibF36Yyeehw
https://www.youtube.com/watch?v=8N4sb-SEpcg
https://www.youtube.com/watch?v=tOMiAeRwpPA
To read more slides
★ Securing iOS apps
https://speakerdeck.com/mbazaliy/securing-ios-applications
★ Users' data security in iOS applications
https://speakerdeck.com/vixentael/users-data-security-in-ios-applications
★ Reversing 101
https://speakerdeck.com/0xc010d/reversing-101

More Related Content

What's hot

Secure Architecture and Programming 101
Secure Architecture and Programming 101Secure Architecture and Programming 101
Secure Architecture and Programming 101Mario-Leander Reimer
 
AWS Security Week | Getting to Continuous Security and Compliance Monitoring ...
AWS Security Week | Getting to Continuous Security and Compliance Monitoring ...AWS Security Week | Getting to Continuous Security and Compliance Monitoring ...
AWS Security Week | Getting to Continuous Security and Compliance Monitoring ...Lacework
 
The Emergent Cloud Security Toolchain for CI/CD
The Emergent Cloud Security Toolchain for CI/CDThe Emergent Cloud Security Toolchain for CI/CD
The Emergent Cloud Security Toolchain for CI/CDJames Wickett
 
Security in serverless world
Security in serverless worldSecurity in serverless world
Security in serverless worldYan Cui
 
Elizabeth Lawler - Devops, security, and compliance working in unison
Elizabeth Lawler - Devops, security, and compliance working in unisonElizabeth Lawler - Devops, security, and compliance working in unison
Elizabeth Lawler - Devops, security, and compliance working in unisonDevSecCon
 
DerbyCon 2019: Prepare to be Boarded! A Tale of Kubernetes, Plunder, and Cryp...
DerbyCon 2019: Prepare to be Boarded! A Tale of Kubernetes, Plunder, and Cryp...DerbyCon 2019: Prepare to be Boarded! A Tale of Kubernetes, Plunder, and Cryp...
DerbyCon 2019: Prepare to be Boarded! A Tale of Kubernetes, Plunder, and Cryp...Lacework
 
Mobile Penetration Testing: Episode 1 - The Forensic Menace
Mobile Penetration Testing: Episode 1 - The Forensic MenaceMobile Penetration Testing: Episode 1 - The Forensic Menace
Mobile Penetration Testing: Episode 1 - The Forensic MenaceNowSecure
 
DevSecCon Boston 2018: Building a practical DevSecOps pipeline for free by Je...
DevSecCon Boston 2018: Building a practical DevSecOps pipeline for free by Je...DevSecCon Boston 2018: Building a practical DevSecOps pipeline for free by Je...
DevSecCon Boston 2018: Building a practical DevSecOps pipeline for free by Je...DevSecCon
 
Ground Zero Training- Metasploit For Web
Ground Zero Training- Metasploit For WebGround Zero Training- Metasploit For Web
Ground Zero Training- Metasploit For WebNipun Jaswal
 
Security as Code
Security as CodeSecurity as Code
Security as CodeEd Bellis
 
Practical DevSecOps Using Security Instrumentation
Practical DevSecOps Using Security InstrumentationPractical DevSecOps Using Security Instrumentation
Practical DevSecOps Using Security InstrumentationVMware Tanzu
 
Security in Serverless world
Security in Serverless worldSecurity in Serverless world
Security in Serverless worldYan Cui
 
BSides Denver 2019 - Cloud Wars Episode V: The Cryptojacker Strikes Back
BSides Denver 2019 - Cloud Wars Episode V: The Cryptojacker Strikes BackBSides Denver 2019 - Cloud Wars Episode V: The Cryptojacker Strikes Back
BSides Denver 2019 - Cloud Wars Episode V: The Cryptojacker Strikes BackLacework
 
Spring Security 5.5 From Taxi to Takeoff
Spring Security 5.5 From Taxi to TakeoffSpring Security 5.5 From Taxi to Takeoff
Spring Security 5.5 From Taxi to TakeoffVMware Tanzu
 
OWASP AppSecEu 2016 Rome - Building secure cloud native apps
OWASP AppSecEu 2016 Rome - Building secure cloud native appsOWASP AppSecEu 2016 Rome - Building secure cloud native apps
OWASP AppSecEu 2016 Rome - Building secure cloud native appsAndreas Falk
 
Secure Node Code (workshop, O'Reilly Security)
Secure Node Code (workshop, O'Reilly Security)Secure Node Code (workshop, O'Reilly Security)
Secure Node Code (workshop, O'Reilly Security)Guy Podjarny
 
Beyond Ethical Hacking By Nipun Jaswal , CSA HCF Infosec Pvt. Ltd
Beyond Ethical Hacking By Nipun Jaswal , CSA HCF Infosec Pvt. LtdBeyond Ethical Hacking By Nipun Jaswal , CSA HCF Infosec Pvt. Ltd
Beyond Ethical Hacking By Nipun Jaswal , CSA HCF Infosec Pvt. LtdNipun Jaswal
 
Rethinking Application Security for cloud-native era
Rethinking Application Security for cloud-native eraRethinking Application Security for cloud-native era
Rethinking Application Security for cloud-native eraPriyanka Aash
 
DefCamp 2013 - Are we there yet?
DefCamp 2013 - Are we there yet?DefCamp 2013 - Are we there yet?
DefCamp 2013 - Are we there yet?DefCamp
 
Security Risks & Vulnerabilities in Skype
Security Risks & Vulnerabilities in SkypeSecurity Risks & Vulnerabilities in Skype
Security Risks & Vulnerabilities in SkypeKelum Senanayake
 

What's hot (20)

Secure Architecture and Programming 101
Secure Architecture and Programming 101Secure Architecture and Programming 101
Secure Architecture and Programming 101
 
AWS Security Week | Getting to Continuous Security and Compliance Monitoring ...
AWS Security Week | Getting to Continuous Security and Compliance Monitoring ...AWS Security Week | Getting to Continuous Security and Compliance Monitoring ...
AWS Security Week | Getting to Continuous Security and Compliance Monitoring ...
 
The Emergent Cloud Security Toolchain for CI/CD
The Emergent Cloud Security Toolchain for CI/CDThe Emergent Cloud Security Toolchain for CI/CD
The Emergent Cloud Security Toolchain for CI/CD
 
Security in serverless world
Security in serverless worldSecurity in serverless world
Security in serverless world
 
Elizabeth Lawler - Devops, security, and compliance working in unison
Elizabeth Lawler - Devops, security, and compliance working in unisonElizabeth Lawler - Devops, security, and compliance working in unison
Elizabeth Lawler - Devops, security, and compliance working in unison
 
DerbyCon 2019: Prepare to be Boarded! A Tale of Kubernetes, Plunder, and Cryp...
DerbyCon 2019: Prepare to be Boarded! A Tale of Kubernetes, Plunder, and Cryp...DerbyCon 2019: Prepare to be Boarded! A Tale of Kubernetes, Plunder, and Cryp...
DerbyCon 2019: Prepare to be Boarded! A Tale of Kubernetes, Plunder, and Cryp...
 
Mobile Penetration Testing: Episode 1 - The Forensic Menace
Mobile Penetration Testing: Episode 1 - The Forensic MenaceMobile Penetration Testing: Episode 1 - The Forensic Menace
Mobile Penetration Testing: Episode 1 - The Forensic Menace
 
DevSecCon Boston 2018: Building a practical DevSecOps pipeline for free by Je...
DevSecCon Boston 2018: Building a practical DevSecOps pipeline for free by Je...DevSecCon Boston 2018: Building a practical DevSecOps pipeline for free by Je...
DevSecCon Boston 2018: Building a practical DevSecOps pipeline for free by Je...
 
Ground Zero Training- Metasploit For Web
Ground Zero Training- Metasploit For WebGround Zero Training- Metasploit For Web
Ground Zero Training- Metasploit For Web
 
Security as Code
Security as CodeSecurity as Code
Security as Code
 
Practical DevSecOps Using Security Instrumentation
Practical DevSecOps Using Security InstrumentationPractical DevSecOps Using Security Instrumentation
Practical DevSecOps Using Security Instrumentation
 
Security in Serverless world
Security in Serverless worldSecurity in Serverless world
Security in Serverless world
 
BSides Denver 2019 - Cloud Wars Episode V: The Cryptojacker Strikes Back
BSides Denver 2019 - Cloud Wars Episode V: The Cryptojacker Strikes BackBSides Denver 2019 - Cloud Wars Episode V: The Cryptojacker Strikes Back
BSides Denver 2019 - Cloud Wars Episode V: The Cryptojacker Strikes Back
 
Spring Security 5.5 From Taxi to Takeoff
Spring Security 5.5 From Taxi to TakeoffSpring Security 5.5 From Taxi to Takeoff
Spring Security 5.5 From Taxi to Takeoff
 
OWASP AppSecEu 2016 Rome - Building secure cloud native apps
OWASP AppSecEu 2016 Rome - Building secure cloud native appsOWASP AppSecEu 2016 Rome - Building secure cloud native apps
OWASP AppSecEu 2016 Rome - Building secure cloud native apps
 
Secure Node Code (workshop, O'Reilly Security)
Secure Node Code (workshop, O'Reilly Security)Secure Node Code (workshop, O'Reilly Security)
Secure Node Code (workshop, O'Reilly Security)
 
Beyond Ethical Hacking By Nipun Jaswal , CSA HCF Infosec Pvt. Ltd
Beyond Ethical Hacking By Nipun Jaswal , CSA HCF Infosec Pvt. LtdBeyond Ethical Hacking By Nipun Jaswal , CSA HCF Infosec Pvt. Ltd
Beyond Ethical Hacking By Nipun Jaswal , CSA HCF Infosec Pvt. Ltd
 
Rethinking Application Security for cloud-native era
Rethinking Application Security for cloud-native eraRethinking Application Security for cloud-native era
Rethinking Application Security for cloud-native era
 
DefCamp 2013 - Are we there yet?
DefCamp 2013 - Are we there yet?DefCamp 2013 - Are we there yet?
DefCamp 2013 - Are we there yet?
 
Security Risks & Vulnerabilities in Skype
Security Risks & Vulnerabilities in SkypeSecurity Risks & Vulnerabilities in Skype
Security Risks & Vulnerabilities in Skype
 

Viewers also liked

Data processing components architecture in mobile applications
Data processing components architecture in mobile applicationsData processing components architecture in mobile applications
Data processing components architecture in mobile applicationsStanfy
 
Building Profanity Filters: clbuttic sh!t
Building Profanity Filters: clbuttic sh!tBuilding Profanity Filters: clbuttic sh!t
Building Profanity Filters: clbuttic sh!tStanfy
 
Effective memory management
Effective memory managementEffective memory management
Effective memory managementYurii Kotov
 
Anton Minashkin Dagger 2 light
Anton Minashkin Dagger 2 lightAnton Minashkin Dagger 2 light
Anton Minashkin Dagger 2 lightMichael Pustovit
 
Live with IOT (Borys Pratsiuk Technology Stream)
Live with IOT (Borys Pratsiuk Technology Stream) Live with IOT (Borys Pratsiuk Technology Stream)
Live with IOT (Borys Pratsiuk Technology Stream) IT Arena
 
Data binding в массы! (1.2)
Data binding в массы! (1.2)Data binding в массы! (1.2)
Data binding в массы! (1.2)Yurii Kotov
 
Borys Pratciuk Augmented reality romania
Borys Pratciuk Augmented reality romaniaBorys Pratciuk Augmented reality romania
Borys Pratciuk Augmented reality romaniaMichael Pustovit
 
Remote user research & usability methods to gather important insights fast
Remote user research & usability methods to gather important insights fastRemote user research & usability methods to gather important insights fast
Remote user research & usability methods to gather important insights fastAnna Iurchenko
 
Users' Data Security in iOS Applications
Users' Data Security in iOS ApplicationsUsers' Data Security in iOS Applications
Users' Data Security in iOS ApplicationsStanfy
 
Android Developer Days: Increasing performance of big arrays processing on An...
Android Developer Days: Increasing performance of big arrays processing on An...Android Developer Days: Increasing performance of big arrays processing on An...
Android Developer Days: Increasing performance of big arrays processing on An...Stanfy
 
Oauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 supportOauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 supportGaurav Sharma
 
Layer 7 Mobile Security Workshop with CA Technologies and Forrester Research ...
Layer 7 Mobile Security Workshop with CA Technologies and Forrester Research ...Layer 7 Mobile Security Workshop with CA Technologies and Forrester Research ...
Layer 7 Mobile Security Workshop with CA Technologies and Forrester Research ...CA API Management
 
AndroIDS: Mobile Security Reloaded
AndroIDS: Mobile Security ReloadedAndroIDS: Mobile Security Reloaded
AndroIDS: Mobile Security ReloadedJaime Sánchez
 
Symantec Mobile Security Whitepaper June 2011
Symantec Mobile Security Whitepaper June 2011Symantec Mobile Security Whitepaper June 2011
Symantec Mobile Security Whitepaper June 2011Symantec
 
Mobile Security: The 5 Questions Modern Organizations Are Asking
Mobile Security: The 5 Questions Modern Organizations Are AskingMobile Security: The 5 Questions Modern Organizations Are Asking
Mobile Security: The 5 Questions Modern Organizations Are AskingLookout
 
Mobile Security 101
Mobile Security 101Mobile Security 101
Mobile Security 101Lookout
 

Viewers also liked (16)

Data processing components architecture in mobile applications
Data processing components architecture in mobile applicationsData processing components architecture in mobile applications
Data processing components architecture in mobile applications
 
Building Profanity Filters: clbuttic sh!t
Building Profanity Filters: clbuttic sh!tBuilding Profanity Filters: clbuttic sh!t
Building Profanity Filters: clbuttic sh!t
 
Effective memory management
Effective memory managementEffective memory management
Effective memory management
 
Anton Minashkin Dagger 2 light
Anton Minashkin Dagger 2 lightAnton Minashkin Dagger 2 light
Anton Minashkin Dagger 2 light
 
Live with IOT (Borys Pratsiuk Technology Stream)
Live with IOT (Borys Pratsiuk Technology Stream) Live with IOT (Borys Pratsiuk Technology Stream)
Live with IOT (Borys Pratsiuk Technology Stream)
 
Data binding в массы! (1.2)
Data binding в массы! (1.2)Data binding в массы! (1.2)
Data binding в массы! (1.2)
 
Borys Pratciuk Augmented reality romania
Borys Pratciuk Augmented reality romaniaBorys Pratciuk Augmented reality romania
Borys Pratciuk Augmented reality romania
 
Remote user research & usability methods to gather important insights fast
Remote user research & usability methods to gather important insights fastRemote user research & usability methods to gather important insights fast
Remote user research & usability methods to gather important insights fast
 
Users' Data Security in iOS Applications
Users' Data Security in iOS ApplicationsUsers' Data Security in iOS Applications
Users' Data Security in iOS Applications
 
Android Developer Days: Increasing performance of big arrays processing on An...
Android Developer Days: Increasing performance of big arrays processing on An...Android Developer Days: Increasing performance of big arrays processing on An...
Android Developer Days: Increasing performance of big arrays processing on An...
 
Oauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 supportOauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 support
 
Layer 7 Mobile Security Workshop with CA Technologies and Forrester Research ...
Layer 7 Mobile Security Workshop with CA Technologies and Forrester Research ...Layer 7 Mobile Security Workshop with CA Technologies and Forrester Research ...
Layer 7 Mobile Security Workshop with CA Technologies and Forrester Research ...
 
AndroIDS: Mobile Security Reloaded
AndroIDS: Mobile Security ReloadedAndroIDS: Mobile Security Reloaded
AndroIDS: Mobile Security Reloaded
 
Symantec Mobile Security Whitepaper June 2011
Symantec Mobile Security Whitepaper June 2011Symantec Mobile Security Whitepaper June 2011
Symantec Mobile Security Whitepaper June 2011
 
Mobile Security: The 5 Questions Modern Organizations Are Asking
Mobile Security: The 5 Questions Modern Organizations Are AskingMobile Security: The 5 Questions Modern Organizations Are Asking
Mobile Security: The 5 Questions Modern Organizations Are Asking
 
Mobile Security 101
Mobile Security 101Mobile Security 101
Mobile Security 101
 

Similar to Data transfer security for mobile apps

Безопасность данных мобильных приложений. Мифы и реальность.
Безопасность данных мобильных приложений. Мифы и реальность.Безопасность данных мобильных приложений. Мифы и реальность.
Безопасность данных мобильных приложений. Мифы и реальность.Advanced monitoring
 
Anastasiia Vixentael: 10 things you need to know before implementing cryptogr...
Anastasiia Vixentael: 10 things you need to know before implementing cryptogr...Anastasiia Vixentael: 10 things you need to know before implementing cryptogr...
Anastasiia Vixentael: 10 things you need to know before implementing cryptogr...mdevtalk
 
OWASP Mobile Security: Top 10 Risks for 2017
OWASP Mobile Security: Top 10 Risks for 2017OWASP Mobile Security: Top 10 Risks for 2017
OWASP Mobile Security: Top 10 Risks for 2017TecsyntSolutions
 
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
 
Secure Your Mobile Apps
Secure Your Mobile AppsSecure Your Mobile Apps
Secure Your Mobile Appsprimomh
 
Mobile Penetration Testing: Episode III - Attack of the Code
Mobile Penetration Testing: Episode III - Attack of the CodeMobile Penetration Testing: Episode III - Attack of the Code
Mobile Penetration Testing: Episode III - Attack of the CodeNowSecure
 
The Safest Way To Interact Online
The Safest Way To Interact OnlineThe Safest Way To Interact Online
The Safest Way To Interact Onlinepcsafe
 
The Four Horsemen of Mobile Security
The Four Horsemen of Mobile SecurityThe Four Horsemen of Mobile Security
The Four Horsemen of Mobile SecuritySkycure
 
Mobile hacking, pentest, and malware
Mobile hacking, pentest, and malwareMobile hacking, pentest, and malware
Mobile hacking, pentest, and malwareAmmar WK
 
Lessons learned from 2017 cybersecurity incidents, 2018 and beyond
Lessons learned from 2017 cybersecurity incidents, 2018 and beyondLessons learned from 2017 cybersecurity incidents, 2018 and beyond
Lessons learned from 2017 cybersecurity incidents, 2018 and beyondAPNIC
 
Anastasia Vixentael - Don't Waste Time on Learning Cryptography: Better Use I...
Anastasia Vixentael - Don't Waste Time on Learning Cryptography: Better Use I...Anastasia Vixentael - Don't Waste Time on Learning Cryptography: Better Use I...
Anastasia Vixentael - Don't Waste Time on Learning Cryptography: Better Use I...OWASP Kyiv
 
DTS Solution - ISACA UAE Chapter - ISAFE 2014 - RU PWNED - Living a Life as a...
DTS Solution - ISACA UAE Chapter - ISAFE 2014 - RU PWNED - Living a Life as a...DTS Solution - ISACA UAE Chapter - ISAFE 2014 - RU PWNED - Living a Life as a...
DTS Solution - ISACA UAE Chapter - ISAFE 2014 - RU PWNED - Living a Life as a...Shah Sheikh
 
Sperasoft talks: Android Security Threats
Sperasoft talks: Android Security ThreatsSperasoft talks: Android Security Threats
Sperasoft talks: Android Security ThreatsSperasoft
 
Mobile Day - App (In)security
Mobile Day - App (In)securityMobile Day - App (In)security
Mobile Day - App (In)securitySoftware Guru
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Securitysudip pudasaini
 
The Emergent Cloud Security Toolchain for CI/CD
The Emergent Cloud Security Toolchain for CI/CDThe Emergent Cloud Security Toolchain for CI/CD
The Emergent Cloud Security Toolchain for CI/CDJames Wickett
 
RSA2015: Securing the Internet of Things
RSA2015: Securing the Internet of ThingsRSA2015: Securing the Internet of Things
RSA2015: Securing the Internet of ThingsDaniel Miessler
 

Similar to Data transfer security for mobile apps (20)

Безопасность данных мобильных приложений. Мифы и реальность.
Безопасность данных мобильных приложений. Мифы и реальность.Безопасность данных мобильных приложений. Мифы и реальность.
Безопасность данных мобильных приложений. Мифы и реальность.
 
Anastasiia Vixentael: 10 things you need to know before implementing cryptogr...
Anastasiia Vixentael: 10 things you need to know before implementing cryptogr...Anastasiia Vixentael: 10 things you need to know before implementing cryptogr...
Anastasiia Vixentael: 10 things you need to know before implementing cryptogr...
 
OWASP Mobile Security: Top 10 Risks for 2017
OWASP Mobile Security: Top 10 Risks for 2017OWASP Mobile Security: Top 10 Risks for 2017
OWASP Mobile Security: Top 10 Risks for 2017
 
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
 
Secure Your Mobile Apps
Secure Your Mobile AppsSecure Your Mobile Apps
Secure Your Mobile Apps
 
Mobile Penetration Testing: Episode III - Attack of the Code
Mobile Penetration Testing: Episode III - Attack of the CodeMobile Penetration Testing: Episode III - Attack of the Code
Mobile Penetration Testing: Episode III - Attack of the Code
 
The Safest Way To Interact Online
The Safest Way To Interact OnlineThe Safest Way To Interact Online
The Safest Way To Interact Online
 
The Four Horsemen of Mobile Security
The Four Horsemen of Mobile SecurityThe Four Horsemen of Mobile Security
The Four Horsemen of Mobile Security
 
Mobile hacking, pentest, and malware
Mobile hacking, pentest, and malwareMobile hacking, pentest, and malware
Mobile hacking, pentest, and malware
 
Lessons learned from 2017 cybersecurity incidents, 2018 and beyond
Lessons learned from 2017 cybersecurity incidents, 2018 and beyondLessons learned from 2017 cybersecurity incidents, 2018 and beyond
Lessons learned from 2017 cybersecurity incidents, 2018 and beyond
 
Is my app secure?
Is my app secure?Is my app secure?
Is my app secure?
 
Is My App Secure ?
 Is My App Secure ? Is My App Secure ?
Is My App Secure ?
 
Anastasia Vixentael - Don't Waste Time on Learning Cryptography: Better Use I...
Anastasia Vixentael - Don't Waste Time on Learning Cryptography: Better Use I...Anastasia Vixentael - Don't Waste Time on Learning Cryptography: Better Use I...
Anastasia Vixentael - Don't Waste Time on Learning Cryptography: Better Use I...
 
DTS Solution - ISACA UAE Chapter - ISAFE 2014 - RU PWNED - Living a Life as a...
DTS Solution - ISACA UAE Chapter - ISAFE 2014 - RU PWNED - Living a Life as a...DTS Solution - ISACA UAE Chapter - ISAFE 2014 - RU PWNED - Living a Life as a...
DTS Solution - ISACA UAE Chapter - ISAFE 2014 - RU PWNED - Living a Life as a...
 
Continuous security
Continuous securityContinuous security
Continuous security
 
Sperasoft talks: Android Security Threats
Sperasoft talks: Android Security ThreatsSperasoft talks: Android Security Threats
Sperasoft talks: Android Security Threats
 
Mobile Day - App (In)security
Mobile Day - App (In)securityMobile Day - App (In)security
Mobile Day - App (In)security
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
 
The Emergent Cloud Security Toolchain for CI/CD
The Emergent Cloud Security Toolchain for CI/CDThe Emergent Cloud Security Toolchain for CI/CD
The Emergent Cloud Security Toolchain for CI/CD
 
RSA2015: Securing the Internet of Things
RSA2015: Securing the Internet of ThingsRSA2015: Securing the Internet of Things
RSA2015: Securing the Internet of Things
 

More from Stanfy

Stanfy MadCode Meetup #11: Why do you need to switch from Obj-C to Swift, or ...
Stanfy MadCode Meetup #11: Why do you need to switch from Obj-C to Swift, or ...Stanfy MadCode Meetup #11: Why do you need to switch from Obj-C to Swift, or ...
Stanfy MadCode Meetup #11: Why do you need to switch from Obj-C to Swift, or ...Stanfy
 
Stanfy MadCode Meetup #9: Functional Programming 101 with Swift
Stanfy MadCode Meetup #9: Functional Programming 101 with SwiftStanfy MadCode Meetup #9: Functional Programming 101 with Swift
Stanfy MadCode Meetup #9: Functional Programming 101 with SwiftStanfy
 
Optimistic Approach. How to show results instead spinners without breaking yo...
Optimistic Approach. How to show results instead spinners without breaking yo...Optimistic Approach. How to show results instead spinners without breaking yo...
Optimistic Approach. How to show results instead spinners without breaking yo...Stanfy
 
ComponenKit and React Native
ComponenKit and React NativeComponenKit and React Native
ComponenKit and React NativeStanfy
 
UX Research in mobile
UX Research in mobileUX Research in mobile
UX Research in mobileStanfy
 
Remote user research & usability methods
Remote user research & usability methodsRemote user research & usability methods
Remote user research & usability methodsStanfy
 
Stanfy MadCode Meetup#6: Apple Watch. First Steps.
Stanfy MadCode Meetup#6: Apple Watch. First Steps.Stanfy MadCode Meetup#6: Apple Watch. First Steps.
Stanfy MadCode Meetup#6: Apple Watch. First Steps.Stanfy
 
Stanfy MadCode Meetup: Анализ и модификация HTTP запросов для тестирования мо...
Stanfy MadCode Meetup: Анализ и модификация HTTP запросов для тестирования мо...Stanfy MadCode Meetup: Анализ и модификация HTTP запросов для тестирования мо...
Stanfy MadCode Meetup: Анализ и модификация HTTP запросов для тестирования мо...Stanfy
 
Stanfy's highlights of 2013
Stanfy's highlights of 2013Stanfy's highlights of 2013
Stanfy's highlights of 2013Stanfy
 
10 things to consider when choosing a mobile platform (iOS or Android)
10 things to consider when choosing a mobile platform (iOS or Android)10 things to consider when choosing a mobile platform (iOS or Android)
10 things to consider when choosing a mobile platform (iOS or Android)Stanfy
 
Stanfy Publications: How to Conduct Quick Usability Tests for iOS & Android A...
Stanfy Publications: How to Conduct Quick Usability Tests for iOS & Android A...Stanfy Publications: How to Conduct Quick Usability Tests for iOS & Android A...
Stanfy Publications: How to Conduct Quick Usability Tests for iOS & Android A...Stanfy
 
Stanfy Publications: Mobile Applications UI/UX Prototyping Process
Stanfy Publications: Mobile Applications UI/UX Prototyping ProcessStanfy Publications: Mobile Applications UI/UX Prototyping Process
Stanfy Publications: Mobile Applications UI/UX Prototyping ProcessStanfy
 
Stanfy Publications: Successful Cases of Mobile Technology in Medical Industry
Stanfy Publications: Successful Cases of Mobile Technology in Medical Industry Stanfy Publications: Successful Cases of Mobile Technology in Medical Industry
Stanfy Publications: Successful Cases of Mobile Technology in Medical Industry Stanfy
 
Fitness In Mobile: A Case Study.
Fitness In Mobile: A Case Study. Fitness In Mobile: A Case Study.
Fitness In Mobile: A Case Study. Stanfy
 

More from Stanfy (14)

Stanfy MadCode Meetup #11: Why do you need to switch from Obj-C to Swift, or ...
Stanfy MadCode Meetup #11: Why do you need to switch from Obj-C to Swift, or ...Stanfy MadCode Meetup #11: Why do you need to switch from Obj-C to Swift, or ...
Stanfy MadCode Meetup #11: Why do you need to switch from Obj-C to Swift, or ...
 
Stanfy MadCode Meetup #9: Functional Programming 101 with Swift
Stanfy MadCode Meetup #9: Functional Programming 101 with SwiftStanfy MadCode Meetup #9: Functional Programming 101 with Swift
Stanfy MadCode Meetup #9: Functional Programming 101 with Swift
 
Optimistic Approach. How to show results instead spinners without breaking yo...
Optimistic Approach. How to show results instead spinners without breaking yo...Optimistic Approach. How to show results instead spinners without breaking yo...
Optimistic Approach. How to show results instead spinners without breaking yo...
 
ComponenKit and React Native
ComponenKit and React NativeComponenKit and React Native
ComponenKit and React Native
 
UX Research in mobile
UX Research in mobileUX Research in mobile
UX Research in mobile
 
Remote user research & usability methods
Remote user research & usability methodsRemote user research & usability methods
Remote user research & usability methods
 
Stanfy MadCode Meetup#6: Apple Watch. First Steps.
Stanfy MadCode Meetup#6: Apple Watch. First Steps.Stanfy MadCode Meetup#6: Apple Watch. First Steps.
Stanfy MadCode Meetup#6: Apple Watch. First Steps.
 
Stanfy MadCode Meetup: Анализ и модификация HTTP запросов для тестирования мо...
Stanfy MadCode Meetup: Анализ и модификация HTTP запросов для тестирования мо...Stanfy MadCode Meetup: Анализ и модификация HTTP запросов для тестирования мо...
Stanfy MadCode Meetup: Анализ и модификация HTTP запросов для тестирования мо...
 
Stanfy's highlights of 2013
Stanfy's highlights of 2013Stanfy's highlights of 2013
Stanfy's highlights of 2013
 
10 things to consider when choosing a mobile platform (iOS or Android)
10 things to consider when choosing a mobile platform (iOS or Android)10 things to consider when choosing a mobile platform (iOS or Android)
10 things to consider when choosing a mobile platform (iOS or Android)
 
Stanfy Publications: How to Conduct Quick Usability Tests for iOS & Android A...
Stanfy Publications: How to Conduct Quick Usability Tests for iOS & Android A...Stanfy Publications: How to Conduct Quick Usability Tests for iOS & Android A...
Stanfy Publications: How to Conduct Quick Usability Tests for iOS & Android A...
 
Stanfy Publications: Mobile Applications UI/UX Prototyping Process
Stanfy Publications: Mobile Applications UI/UX Prototyping ProcessStanfy Publications: Mobile Applications UI/UX Prototyping Process
Stanfy Publications: Mobile Applications UI/UX Prototyping Process
 
Stanfy Publications: Successful Cases of Mobile Technology in Medical Industry
Stanfy Publications: Successful Cases of Mobile Technology in Medical Industry Stanfy Publications: Successful Cases of Mobile Technology in Medical Industry
Stanfy Publications: Successful Cases of Mobile Technology in Medical Industry
 
Fitness In Mobile: A Case Study.
Fitness In Mobile: A Case Study. Fitness In Mobile: A Case Study.
Fitness In Mobile: A Case Study.
 

Data transfer security for mobile apps

  • 1. Data transfer security for mobile apps what the fish doesn’t notice in the ocean? 🐟 #mddaylviv2015 @vixentael
  • 3. Apple Security Guide Every program is a potential target. Your customers’ property and your reputation are at stake. https://developer.apple.com/library/mac/documentation/Security/ Conceptual/SecureCodingGuide/Introduction.html data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 4. 3 kinds of data to protect Data in storage Data in memory Data in motion data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 5. Data in motion: what could possibly go wrong
  • 6. Communication with server. Usually. data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 7. Imagine little fish... data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 8. ...in the ocean of threats
  • 9. active eavesdropping data leakage evil twin replay attack ...in the ocean of threats
  • 10. * SSL experimenting with Android Top100 apps http://bit.ly/1NqpheM * Intercepting the App Store's Traffic on iOS http://bit.ly/1H3xMrs One proxy to rule ‘em all!
  • 11. Attack reasons Many apps use HTTP* data transfer security for mobile apps #mddaylviv2015 @vixentael *iOS9 ATS will decrease this number
  • 12. Attack reasons Many apps use HTTP* Some apps use HTTPS data transfer security for mobile apps #mddaylviv2015 @vixentael *iOS9 ATS will decrease this number
  • 13. Attack reasons Many apps use HTTP* Some apps use HTTPS Few apps encrypt user’s data *iOS9 ATS will decrease this number data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 15. 1. Security is hard. STACKOVERFLOW!
  • 16. Let’s StackOverflow! http://stackoverflow.com/a/21826729 data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 17. Weird padding http://stackoverflow.com/a/21826729 data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 18. 2. Software is buggy
  • 19. Remove padding! http://stackoverflow.com/a/26147479 data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 20. Omg WTF is going on WTF http://stackoverflow.com/a/26147479 WTF WTF data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 21. 3. Illusion of safety is still a illusion data transfer security for mobile apps #mddaylviv2015 @vixentael #define kUserPassword @“1111111”
  • 23. Realize security risks data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 24. Amateurs Produce Amateur Cryptography Anyone can invent a security system that he himself cannot break — Schneier's Law https://www.schneier.com/blog/archives/ 2011/04/schneiers_law.html data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 25. Do not re-implement existing things data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 26. Security is a system, not a pluggable library
  • 27. Build stout architecture data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 28. Build stout architecture cryptolib key management data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 29. Use great tools Themis https://github.com/cossacklabs/themis RNCryptor https://github.com/RNCryptor/RNCryptor MIHCrypto https://github.com/hohl/MIHCrypto OTRKit https://github.com/ChatSecure/OTRKit libsodium/NaCL https://github.com/mochtu/libsodium-ios scientific background trust big guys good track record data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 30.
  • 31. Use SSL? Do it right! https://www.owasp.org/index.php/Transport_Layer_Protection_Cheat_Sheet ✤use long keys ✤remove backward compatibility ✤use good ciphers (EC vs RSA) ✤SSL pinning ✤use cheat sheet https://www.cossacklabs.com/avoid-ssl-for-your-next-app.htmlSSL has a lot of problems To survive you need to: data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 32. TLS/SSL in short data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 33. Where can it break? data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 34. SSL pinning data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 35. SSL pinning on iOS https://possiblemobile.com/2013/03/ssl-pinning-for-increased-app-security/ https://www.paypal-engineering.com/2015/10/14/key-pinning-in-mobile- applications/ - (void)connection:(NSURLConnection *)connection willSendRequestForAuthenticationChallenge: (NSURLAuthenticationChallenge *)challenge { SecTrustRef serverTrust = challenge.protectionSpace.serverTrust; id<NSURLAuthenticationChallengeSender> sender = challenge.sender; SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, 0); NSData * remoteCertificateData = CFBridgingRelease(SecCertificateCopyData(certificate)); NSString * cerPath = [[NSBundle mainBundle] pathForResource:@"MyLocalCertificate" ofType:@"cer"]; NSData * localCertData = [NSData dataWithContentsOfFile:cerPath]; if ([remoteCertificateData isEqualToData:localCertData]) { NSURLCredential * credential = [NSURLCredential credentialForTrust:serverTrust]; [sender useCredential:credential forAuthenticationChallenge:challenge]; } else { [sender cancelAuthenticationChallenge:challenge]; } } data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 36. SSL pinning more easy :) Swift lib for HTTPS with SSL pinning https://github.com/johnlui/Pitaya/wiki let  certData  =  NSData(contentsOfFile:   NSBundle.mainBundle().pathForResource("lvwenhancom",  ofType:  "cer")!)!
 ...  ...
 .addSSLPinning(LocalCertData:  certData)  {  ()  -­‐>  Void  in
        print("Under  Man-­‐in-­‐the-­‐middle  attack!")
 } data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 37. How to achieve the solution
  • 38. Let’s imagine chatting app simple API authentication meaningfull communication confidentiality thread data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 39. Securing app step by step 1. HTTPS everywhere 2. SSL pinning 3. Encrypt messages by persistent keys data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 40. Securing app step by step 1. HTTPS everywhere ----> SSL/TLS has lots of bugs and bad crypto 2. SSL pinning ----> is not a panacea 3. Encrypt messages by persistent keys ----> can be easily cracked data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 41.
  • 42. Securing in a more proper way perfect forward secrecy use good ciphers data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 43. Using ephemeral key data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 44. How to achieve it easily https://github.com/cossacklabs/themis 1. establish session 2. encrypt message with SecureSession before sending 3. decrypt message after receive 4. encrypt history with SecureCell data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 45. How to achieve it easily https://github.com/cossacklabs/mobile- websocket-example data transfer security for mobile apps #mddaylviv2015 @vixentael
  • 46. Security is hard, but if you’re smart, security is not so hard :)
  • 47. The last slide @vixentael iOS developer at stanfy.com [creating awesome mobile and IoT apps]
  • 48. To read ★ CryptoCat iOS app security audit https://nabla-c0d3.github.io/documents/iSEC_Cryptocat_iOS.pdf ★ Why you should avoid SSL for your next application https://www.cossacklabs.com/avoid-ssl-for-your-next-app.html ★ OAuth1, OAuth2, OAuth...? http://homakov.blogspot.com/2013/03/oauth1-oauth2-oauth.html
  • 49. To watch youtube ★ All tasks of Moxie Marlinspike https://www.youtube.com/watch?v=ibF36Yyeehw https://www.youtube.com/watch?v=8N4sb-SEpcg https://www.youtube.com/watch?v=tOMiAeRwpPA
  • 50. To read more slides ★ Securing iOS apps https://speakerdeck.com/mbazaliy/securing-ios-applications ★ Users' data security in iOS applications https://speakerdeck.com/vixentael/users-data-security-in-ios-applications ★ Reversing 101 https://speakerdeck.com/0xc010d/reversing-101