SlideShare una empresa de Scribd logo
Building Secure Mobile Apps
Sergey Gorbaty
@ser_gor
Martin Vigo
@martin_vigo
Martin Vigo
Product Security Engineer
Sergey Gorbaty
Senior Product Security Engineer
Outline
¡ Attacks on Mobile Apps
¡ Developing Secure Mobile Apps
¡ What Frameworks Help You With
¡ Demos
Attacks on Mobile Apps
Mobile App Threats
¡ Native Mobile App Threats
¡ File system, DB Storage, Logs
¡ Network Communication
¡ Clipboard
¡ Backups
¡ RPC, URL scheme handlers
¡ Web App Threats
¡ Input validation
¡ Session management
¡ Web app logic flaws
¡ Web vulnerabilities
¡ XSS, CSRF
¡ Injections
¡  SQL, header
Outline
¡ Attacks on Mobile Apps
¡ Developing Secure Mobile Apps
¡ What Frameworks Help You With
¡ Demos
Developing Secure Mobile Apps
¡ iOS/OS X ‘Secure Coding Guide’
¡ Comprehensive, 120 pages long
¡ Covers topics from buffer overflows to web vulnerabilities
¡ https://developer.apple.com/library/iOs/documentation/
Security/Conceptual/SecureCodingGuide/SecureCodingGuide.pdf
¡ Android.com ‘Security Tips’
¡ 6 articles on
¡ Storing data
¡ Using permissions
¡ Using networking
¡ Using RPC
¡ Webview security
¡ http://developer.android.com/training/articles/security-tips.html
File System
Excessive Logging
¡ Explicit logging
¡ Debugging
¡ Feedback
¡ Analytics
¡ Automatic logging
¡ Generic information
¡ Exceptions
Excessive Logging - TODO
¡  Do not log credentials including username,
password, and OAuth tokens
¡  Do not log emails, names,
titles, company information
¡  Do not log hardware ids including IMEI, UDID
¡  Prefer to log internal opaque IDs if possible
¡ Disable logging before shipping
Hardcoded Secrets
¡ Encryption keys
¡ PINs
¡ Settings
¡ Credentials
Hardcoded Secrets - TODO
¡ Don’t hardcode ANY secrets
¡ Query secrets only when necessary
¡ Don’t keep them in memory longer than needed.
¡ Do not assign secrets to global variables
¡ Disable autocorrect on sensitive fields
Insecure storage
¡ Explicit storage
¡ Data
¡ Preferences
¡ Logs
¡ Crash Reports
¡ Automatic storage
¡ Temp Files
¡ Cache
Insecure storage - TODO
¡ Use secure storage for secrets
¡ Keychain
¡ AccountManager
¡ Verify that no sensitive data is stored without
your knowledge
¡ Control App flow and encrypt data
when device is in background or locked
Automatic Caching
¡ Databases
¡ Preference files
¡ Plists
¡ Logs
¡ Requests and responses
Automatic Caching - TODO
¡ Double check what is being cached
¡ File system explorers
¡ Database managers
¡  Prevent network requests caching
¡  ‘Cache-control: no-cache, no-store’
¡  Disable web view disk caching
¡  Use in-memory caching only
¡  Destroy Cache data on logout
Encryption
¡ Do we need encryption?
¡ Types of Crypto
¡ Personal implementation
¡ Performance
Encryption - TODO
¡  Encrypt customer data stored on the device and removable media
¡  Use AES 128 bit or stronger
¡  Never use ECB mode
¡ Use Key Derivation for encryption key
¡ PBKDF2 (10000 rounds, SHA 256 or higher)
¡  bcrypt
¡  scrypt
¡ Passcode Protection
¡ Store it hashed
¡  Use SHA-256 + secure random generated salt
¡  Store salted hashes of passcode in secure storage
¡  Use PIN for additional entropy
Network
Communication
Protocols
¡ Use of encryption layer?
¡ All endpoints covered/secure?
¡ Cyphers supported
¡ Default cyphers
¡ Caching
Protocols- TODO
¡  Do not implement SSL/TLS trust validation bypasses
¡  Use SSL3/TLS1.x
¡  Disable caching containing sensitive data
Certificates
¡ Self-signed
¡ Invalid
¡ Certificate validations
¡ Bypass
Certificates - TODO
¡ Don’t allow self-signed certificates
¡ Validate all certificates
¡ Never bypass Certificate Authority root of trust
Session management
¡ Logout
¡ Expiration
¡ Data destruction
Session management - TODO
¡  Implement inactivity timeouts to prompt user to
re-login after prolonged inactivity
¡ Implement business logic for logout
¡ Delete all associated data
¡ Expire the session on client AND server side
¡ Protect your Cookies
Clipboard
Clipboard
¡ What data can make it to the clipboard?
¡ Who can access the it?
¡ Is there any security layer?
Clipboard - TODO
¡  Clipboard is not a secure method of information exchange
¡  Clipboard can be accessed by any application
¡  At any point in time
¡  Without user prompt
¡ Limit the data available to Clipboard
¡ Don’t allow sensitive data
Backups
Backups
¡ What data is backed up
¡ Encryption
¡ Access limitations
Backups - TODO
¡ Filter what data can be backed up
¡ NSURLIsExcludedFromBackupKey
¡ android:allowBackup
¡ Backups are not a secure storage
¡ Create backups and explore them for sensitive data
Screenshots
Screenshots
¡ What can be captured
¡ Automatic screenshots
¡ Any way to set limitations?
Screenshots- TODO
¡  Prevent users from taking screenshots of sensitive data
¡  getWindow().setFlags(LayoutParams.FLAG_SECURE, LayoutParams.FLAG_SECURE);
¡  Prevent automatic caching in iOS
¡  willEnterBackground API
¡  Use splash screen
Outline
¡ Attacks on Mobile Apps
¡ Developing Secure Mobile Apps
¡ What Frameworks Help You With
¡ Demos
Mobile Frameworks
The breakdown
¡ All focus on rapid development using HTML
¡ Most provide easy ways of creating secure TLS connections
¡ Fair amount provide authentication support
¡ Few provide secure credential storage
¡ Very few provide secure data storage
Hybrid Apps
¡  Can access device internals through plugins
¡  Camera, photos
¡  Accelerometer, GPS, Compass, Gyroscope
¡  Keychain
¡  SD card
¡  Etc.
Frameworks Security
WebView
¡ Additional Threats
¡ JavaScript support
¡ Framework specific security requirements
WebView - TODO
¡  Third party scripts shouldn’t be trusted
¡  Iframe sandboxing
¡  Don’t include script in the context of application
¡  Whitelist specific domains and paths
¡  Avoid wildcard (*) whitelist
¡  Minimize the number of exposed plugins
Outline
¡ Attacks on Mobile Apps
¡ Developing Secure Mobile Apps
¡ What Frameworks Help You With
¡ Demos
Demo
Looking at files inside Apple Sandbox - iExplorer
Demo
XSS with BEEF on Hybrid mobile app
Protecting Mobile Apps
What to focus on
¡  Follow best development practices
¡  Brush up on OWASP top 10 mobile threats
¡  Review official vendor recommendations
¡  Follow recommendations for storing secrets and data
¡  Exercise minimal logging
¡  Using TLS
¡  Use security frameworks, don’t roll your own crypto
¡  Use free security assessment tools
¡  HTTP traffic examination: Burp Suite, Fiddler, Charles Proxy
¡  App sandbox examination: iExplorer, drozer, Android debugging bridge
¡  Source code review: Findbugs, Brakeman, Scanjs
THANK YOU!
Sergey Gorbaty
@ser_gor
Martin Vigo
@martin_vigo

Más contenido relacionado

PPT
Venture Capital 101
PDF
How Investors do Valuations for Startups by Sanjay Mehta from 100x.vc
PPTX
Key Findings: The Future of Corporate Governance in Capital Markets Following...
PDF
The Helpful VC (June 2019)
PDF
Janus/HOMER/HEPIC @ OpenSIPS18
PPTX
The ROI of CSM Solutions
PPT
Successful Investing Strategy
PDF
Understanding VCs
Venture Capital 101
How Investors do Valuations for Startups by Sanjay Mehta from 100x.vc
Key Findings: The Future of Corporate Governance in Capital Markets Following...
The Helpful VC (June 2019)
Janus/HOMER/HEPIC @ OpenSIPS18
The ROI of CSM Solutions
Successful Investing Strategy
Understanding VCs

La actualidad más candente (20)

PPT
Pitch deck pointers_by_virginia_cha_2017
PPTX
KPI analytics for saas startups
PPTX
Zero to 100 - Part 5: SaaS Business Model & Metrics
PPTX
The Key Drivers for SaaS Success
PPTX
Single family office
PPTX
Building a Repeatable, Scalable & Profitable Growth Process
PPTX
WebSummit 2018 - The SaaS Business Model & Metrics
PDF
Startup Valuation: from early to mature stages
PDF
Is your customer success team delivering real value ?
PPTX
Email marketing: lead generation and lead nurturing
PDF
Richter Training Sales Deck | 2019
PDF
When & How to Raise Venture Capital
PDF
Algolia-Pitch-Deck
PPTX
The SaaS Founder’s Journey: What Matters at Each Stage
PPTX
The Science behind Viral marketing
PDF
Lean Analytics for Startups and Enterprises
PDF
How to Survive and Thrive in the post-Covid Era
PDF
Startup Fundraising 101 Revisited
PDF
Building Startups: the "3rd co-founder model"
PDF
Spins on Corporate Venture Capital
Pitch deck pointers_by_virginia_cha_2017
KPI analytics for saas startups
Zero to 100 - Part 5: SaaS Business Model & Metrics
The Key Drivers for SaaS Success
Single family office
Building a Repeatable, Scalable & Profitable Growth Process
WebSummit 2018 - The SaaS Business Model & Metrics
Startup Valuation: from early to mature stages
Is your customer success team delivering real value ?
Email marketing: lead generation and lead nurturing
Richter Training Sales Deck | 2019
When & How to Raise Venture Capital
Algolia-Pitch-Deck
The SaaS Founder’s Journey: What Matters at Each Stage
The Science behind Viral marketing
Lean Analytics for Startups and Enterprises
How to Survive and Thrive in the post-Covid Era
Startup Fundraising 101 Revisited
Building Startups: the "3rd co-founder model"
Spins on Corporate Venture Capital
Publicidad

Similar a Mobile apps security. Beyond XSS, CSRF and SQLi (20)

PPTX
Seguridad en Aplicaciones Web
ODP
[Flisol2011] Seguridad en el Desarrollo de Aplicaciones Web PHP
PPT
Seguridad en el Desarrollo de Aplicaciones Web PHP
PDF
Hacking applications that use IoT
PPT
SafeStick - aTICser v4
PPTX
Temas owasp
PDF
Seguridad de información para criptoactivos
PDF
Seguridad en Aplicaciones Web y Comercio Electrónico
PDF
Tu banca móvil, en forma simple y ¿segura? Estado de la seguridad en apps móv...
PPT
Introducción a La Seguridad Desde La Perspectiva Del Desarrollador V2
PDF
Practical security hands on with oracle solaris
PDF
Web cryptography
PPSX
CodeCamp 2010 | Diez formas de escribir código (in)seguro
PDF
6.1 Proteccion y Seguridad
PDF
S13 - PRUEBAS DE SOFTWARE OWA - PRUEBAS DE SOFTWARE
PDF
Analisis Aplicaciones Moviles con OWASP
PPTX
REBIUN_COMP_DIG_4.1_Protección_de_dispositivos (1).pptx
PPTX
5 problemas del intercambio de archivos mediante scripts
PDF
DevSecOps by Mobile
PPTX
Seguridad en el Desarrollo de Software.pptx ddddddd
Seguridad en Aplicaciones Web
[Flisol2011] Seguridad en el Desarrollo de Aplicaciones Web PHP
Seguridad en el Desarrollo de Aplicaciones Web PHP
Hacking applications that use IoT
SafeStick - aTICser v4
Temas owasp
Seguridad de información para criptoactivos
Seguridad en Aplicaciones Web y Comercio Electrónico
Tu banca móvil, en forma simple y ¿segura? Estado de la seguridad en apps móv...
Introducción a La Seguridad Desde La Perspectiva Del Desarrollador V2
Practical security hands on with oracle solaris
Web cryptography
CodeCamp 2010 | Diez formas de escribir código (in)seguro
6.1 Proteccion y Seguridad
S13 - PRUEBAS DE SOFTWARE OWA - PRUEBAS DE SOFTWARE
Analisis Aplicaciones Moviles con OWASP
REBIUN_COMP_DIG_4.1_Protección_de_dispositivos (1).pptx
5 problemas del intercambio de archivos mediante scripts
DevSecOps by Mobile
Seguridad en el Desarrollo de Software.pptx ddddddd
Publicidad

Más de Martin Vigo (13)

PDF
Phonerator, an advanced *valid* phone number generator for your OSINT/SE needs
PDF
Phonerator, an advanced *valid* phone number generator for your OSINT/SE needs
PDF
From email address to phone number, a new OSINT approach
PDF
Ransombile: yet another reason to ditch sms
PDF
Compromising online accounts by cracking voicemail systems
PDF
Building secure mobile apps
PDF
Secure Salesforce: Hardened Apps with the Mobile SDK
PDF
Breaking vaults: Stealing Lastpass protected secrets
PDF
Even the LastPass Will be Stolen Deal with It!
PDF
Creating secure apps using the salesforce mobile sdk
PDF
Security Vulnerabilities: How to Defend Against Them
PDF
Do-it-Yourself Spy Program: Abusing Apple’s Call Relay Protocol
PDF
Do-it-Yourself Spy Program: Abusing Apple’s Call Relay Protocol
Phonerator, an advanced *valid* phone number generator for your OSINT/SE needs
Phonerator, an advanced *valid* phone number generator for your OSINT/SE needs
From email address to phone number, a new OSINT approach
Ransombile: yet another reason to ditch sms
Compromising online accounts by cracking voicemail systems
Building secure mobile apps
Secure Salesforce: Hardened Apps with the Mobile SDK
Breaking vaults: Stealing Lastpass protected secrets
Even the LastPass Will be Stolen Deal with It!
Creating secure apps using the salesforce mobile sdk
Security Vulnerabilities: How to Defend Against Them
Do-it-Yourself Spy Program: Abusing Apple’s Call Relay Protocol
Do-it-Yourself Spy Program: Abusing Apple’s Call Relay Protocol

Último (20)

PDF
Maste clas de estructura metálica y arquitectura
PPTX
RAP01 - TECNICO SISTEMAS TELEINFORMATICOS.pptx
PDF
5.1 Pinch y Bijker en libro Actos, actores y artefactos de Bunch Thomas (coor...
PPTX
Propuesta BKP servidores con Acronis1.pptx
PPTX
COMO AYUDAN LAS TIC EN LA EDUCACION SUPERIOR.pptx
PDF
Liceo departamental MICRO BIT (1) 2.pdfbbbnn
PPTX
RAP02 - TECNICO SISTEMAS TELEINFORMATICOS.pptx
PPTX
Acronis Cyber Protect Cloud para Ciber Proteccion y Ciber Seguridad LATAM - A...
PDF
Plantilla para Diseño de Narrativas Transmedia.pdf
PDF
taller de informática - LEY DE OHM
PPTX
REDES INFORMATICAS REDES INFORMATICAS.pptx
PPTX
Sesion 1 de microsoft power point - Clase 1
PPTX
Power Point Nicolás Carrasco (disertación Roblox).pptx
PDF
Calidad desde el Docente y la mejora continua .pdf
PPTX
IA de Cine - Como MuleSoft y los Agentes estan redefiniendo la realidad
PDF
MÓDULO DE CALOR DE GRADO DE MEDIO DE FORMACIÓN PROFESIONAL
PPT
introduccion a las_web en el 2025_mejoras.ppt
PPTX
sa-cs-82-powerpoint-hardware-y-software_ver_4.pptx
PDF
MANUAL TECNOLOGÍA SER MINISTERIO EDUCACIÓN
PDF
programa-de-estudios-2011-guc3ada-para-el-maestro-secundarias-tecnicas-tecnol...
Maste clas de estructura metálica y arquitectura
RAP01 - TECNICO SISTEMAS TELEINFORMATICOS.pptx
5.1 Pinch y Bijker en libro Actos, actores y artefactos de Bunch Thomas (coor...
Propuesta BKP servidores con Acronis1.pptx
COMO AYUDAN LAS TIC EN LA EDUCACION SUPERIOR.pptx
Liceo departamental MICRO BIT (1) 2.pdfbbbnn
RAP02 - TECNICO SISTEMAS TELEINFORMATICOS.pptx
Acronis Cyber Protect Cloud para Ciber Proteccion y Ciber Seguridad LATAM - A...
Plantilla para Diseño de Narrativas Transmedia.pdf
taller de informática - LEY DE OHM
REDES INFORMATICAS REDES INFORMATICAS.pptx
Sesion 1 de microsoft power point - Clase 1
Power Point Nicolás Carrasco (disertación Roblox).pptx
Calidad desde el Docente y la mejora continua .pdf
IA de Cine - Como MuleSoft y los Agentes estan redefiniendo la realidad
MÓDULO DE CALOR DE GRADO DE MEDIO DE FORMACIÓN PROFESIONAL
introduccion a las_web en el 2025_mejoras.ppt
sa-cs-82-powerpoint-hardware-y-software_ver_4.pptx
MANUAL TECNOLOGÍA SER MINISTERIO EDUCACIÓN
programa-de-estudios-2011-guc3ada-para-el-maestro-secundarias-tecnicas-tecnol...

Mobile apps security. Beyond XSS, CSRF and SQLi