SlideShare a Scribd company logo
1 of 22
Download to read offline
Mobile App Security Meet
More Connections to more devices means
more vulnerabilities. If you control the code
you control the world
”
Secure API Design
Mobile App Security Meet
Mobile first
”The future of mobile is the future of online. It is how people
access online content now.
Mobile App Security Meet
Agenda
● API Threats
● Attributes of Secure API
● Realizing about the problem
● Authentication Schemes
● Best Practices
● Questions
Mobile App Security Meet
Threats to your APIs
● APIs are vulnerable to OWASP top 10 attacks
● Hackers reverse engineer apps to access private APIs
● Data thefts
● User account compromise
● Coding flaws
● Badly Implemented clients may leave your system vulnerable
Mobile App Security Meet
Realizing about the problem
● Unusual API requests
● Traffic spike
● Strange source addresses of requests
● Long service time
Mobile App Security Meet
Attributes of Secure API
● Authentication
System should service only legitimate users
● Authorization
System should allow users to perform only
legitimate operations
● Confidentiality
Confidential data should be protected
● Integrity
Integrity of transactions should be protected
Mobile App Security Meet
Authentication Schemes - Basic
Resend Request
GET
Request:
GET
Server Challenge
HTTP/1.1 401
Mobile App Security Meet
Authentication Schemes - Digest
Hash username and password before sending it
over network
Request
GET
Mobile App Security Meet
Authentication Schemes - Oauth 1.0
GET
Mobile App Security Meet
Authentication Schemes - Oauth 2.0
GET
Mobile App Security Meet
Authentication Schemes - Oauth 2.0
Mobile App Security Meet
Authentication Schemes - 2 Way TLS
Mobile App Security Meet
Best Practices
TLS
● Use TLS for all API’s
● Plain HTTP is vulnerable to man in the middle attack
● Once moved to TLS, do not support plain HTTP
● Use standard TLS implementations in clients
● Preferably use SSL pinning in mobile apps
○ Proper implementation of X509TrustManager in
Android Apps
○ Use additional unconventional checks like
hashing of public cert
● Use mutual TLS for trusting clients - private API’s or
apps not on playstore
Mobile App Security Meet
Best Practices
Access Tokens
● Long Strings
● Entropy
● Resistant to preimage attacks
● Resistant to collision attacks
● Strong cryptographic hash e.g. bcrypt
● Short TTL
● Avoid designing API’s which blindly return access
tokens for a given user id
Mobile App Security Meet
Best Practices
Scope access tokens
POST
Mobile App Security Meet
Best Practices
Validating Access Tokens
● All API calls must carry access tokens - Reject those which
have none.
● Build a framework which is invoked before the actual API call is
serviced - Spring Security in JAVA
● Map the access token to a valid User Entity for further
processing
● Validate the scope of token - Reject request which are trying to
perform unauthorized operations
Mobile App Security Meet
Best Practices
User Passwords
● Well defined password rules
● Mix of alphanumeric and special characters
● Avoid dictionary words - Dictionary Attack
● Extra care while designing API’s which reset password like
○ Forgot Password
○ Profile Edit
● Use additional security measures like OTP via email or text
● Badly implemented API’s will create a backdoor to your
system
Mobile App Security Meet
Best Practices
Session Cookies
● Avoid using session cookies - Consider Access
Tokens
● Stateless API’s are more easy to manage than stateful
● Access Tokens + Stateless API = No CSRF attacks
●
;
Mobile App Security Meet
Best Practices
ID’s
Request:
GET
vs
Request:
GET
Mobile App Security Meet
Best Practices
ID’s
● Don’t use serial numbers as primary identifiers of your
resources like accounts, transactions - Brute Force
Attack
● Use hashes instead
● Preferably use unique identifiers like UUID’s as
transaction id’s
○ universally unique
○ avoids contention
○ performance boost
Mobile App Security Meet
Best Practices
Treat Security as a first class citizen and not as an add-on
Consider it in the design phase of your product
Mobile App Security Meet
Thank you

More Related Content

Recently uploaded

FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRnishacall1
 
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
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 
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
 
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
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPsychicRuben LoveSpells
 

Recently uploaded (7)

FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
 
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
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort 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,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
 
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
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
 

Featured

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 

Featured (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

Secure API Design for Mobile Apps

  • 1. Mobile App Security Meet More Connections to more devices means more vulnerabilities. If you control the code you control the world ” Secure API Design
  • 2. Mobile App Security Meet Mobile first ”The future of mobile is the future of online. It is how people access online content now.
  • 3. Mobile App Security Meet Agenda ● API Threats ● Attributes of Secure API ● Realizing about the problem ● Authentication Schemes ● Best Practices ● Questions
  • 4. Mobile App Security Meet Threats to your APIs ● APIs are vulnerable to OWASP top 10 attacks ● Hackers reverse engineer apps to access private APIs ● Data thefts ● User account compromise ● Coding flaws ● Badly Implemented clients may leave your system vulnerable
  • 5. Mobile App Security Meet Realizing about the problem ● Unusual API requests ● Traffic spike ● Strange source addresses of requests ● Long service time
  • 6. Mobile App Security Meet Attributes of Secure API ● Authentication System should service only legitimate users ● Authorization System should allow users to perform only legitimate operations ● Confidentiality Confidential data should be protected ● Integrity Integrity of transactions should be protected
  • 7. Mobile App Security Meet Authentication Schemes - Basic Resend Request GET Request: GET Server Challenge HTTP/1.1 401
  • 8. Mobile App Security Meet Authentication Schemes - Digest Hash username and password before sending it over network Request GET
  • 9. Mobile App Security Meet Authentication Schemes - Oauth 1.0 GET
  • 10. Mobile App Security Meet Authentication Schemes - Oauth 2.0 GET
  • 11. Mobile App Security Meet Authentication Schemes - Oauth 2.0
  • 12. Mobile App Security Meet Authentication Schemes - 2 Way TLS
  • 13. Mobile App Security Meet Best Practices TLS ● Use TLS for all API’s ● Plain HTTP is vulnerable to man in the middle attack ● Once moved to TLS, do not support plain HTTP ● Use standard TLS implementations in clients ● Preferably use SSL pinning in mobile apps ○ Proper implementation of X509TrustManager in Android Apps ○ Use additional unconventional checks like hashing of public cert ● Use mutual TLS for trusting clients - private API’s or apps not on playstore
  • 14. Mobile App Security Meet Best Practices Access Tokens ● Long Strings ● Entropy ● Resistant to preimage attacks ● Resistant to collision attacks ● Strong cryptographic hash e.g. bcrypt ● Short TTL ● Avoid designing API’s which blindly return access tokens for a given user id
  • 15. Mobile App Security Meet Best Practices Scope access tokens POST
  • 16. Mobile App Security Meet Best Practices Validating Access Tokens ● All API calls must carry access tokens - Reject those which have none. ● Build a framework which is invoked before the actual API call is serviced - Spring Security in JAVA ● Map the access token to a valid User Entity for further processing ● Validate the scope of token - Reject request which are trying to perform unauthorized operations
  • 17. Mobile App Security Meet Best Practices User Passwords ● Well defined password rules ● Mix of alphanumeric and special characters ● Avoid dictionary words - Dictionary Attack ● Extra care while designing API’s which reset password like ○ Forgot Password ○ Profile Edit ● Use additional security measures like OTP via email or text ● Badly implemented API’s will create a backdoor to your system
  • 18. Mobile App Security Meet Best Practices Session Cookies ● Avoid using session cookies - Consider Access Tokens ● Stateless API’s are more easy to manage than stateful ● Access Tokens + Stateless API = No CSRF attacks ● ;
  • 19. Mobile App Security Meet Best Practices ID’s Request: GET vs Request: GET
  • 20. Mobile App Security Meet Best Practices ID’s ● Don’t use serial numbers as primary identifiers of your resources like accounts, transactions - Brute Force Attack ● Use hashes instead ● Preferably use unique identifiers like UUID’s as transaction id’s ○ universally unique ○ avoids contention ○ performance boost
  • 21. Mobile App Security Meet Best Practices Treat Security as a first class citizen and not as an add-on Consider it in the design phase of your product
  • 22. Mobile App Security Meet Thank you