© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
BUILDING A MOBILE APP
PEN TESTING BLUEPRINT
© Copyright 2018 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
RONO DASGUPTA
MOBILE SECURITY ANALYST
AGENDA
WHO WE ARE
WHY MOBILE MATTERS
TOOLS OF THE TRADE
COMMON FINDINGS
SHARING WITH STAKEHOLDERS
AUTOMATING PEN TESTING
SPEAKERS
2
BRIAN REED
CMO
TONY RAMIREZ
MOBILE SECURITY ANALYST
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.3
85% of Mobile Apps
Have Security
Vulnerabilities
49% of Mobile Apps
Leak Personal Data to
Violate GDPR
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
NOWSECURE DEEP MOBILE SECURITY EXPERTISE
Open source
Books & Speaking
MOBILE SECURITY RESEARCH IS IN OUR DNA
Dream team of security researchers
Discovering critical vulns
Identifying novel attack vectors
Creating/maintaining renowned open-source mobile security tools/projects
Expert team of security pen testers
Pen tested thousands of mobile apps
Comprehensive experience and testing blueprint
Certified some of the worlds most complex, high security apps
THE NOWSECURE MISSION
Save the world from unsafe mobile apps
Educate enterprises on the latest mobile threats
Maximize the security of apps enterprises develop, purchase and use
4
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.5
MOBILE APP RISKS ARE REAL AND PAINFULLY EXPOSED
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
1. Terminal of choice
2. Jailbroken/rooted iOS and Android devices
3. Network interception tools
4. Developer tools
5. Reverse engineering tools
6. Patience, creativity, and attention to detail
6
TOOLS OF THE TRADE
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.7
MOBILE VULNERABILITY AREAS – THE ATTACK SURFACE
Backend/API
Network Traffic
Client Code Quality
Forensics/Data-at-Rest
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
INSIDE THE MOBILE ATTACK SURFACE
iOS
APPS
iOS FRAMEWORKS
iOS NATIVE LIBRARIES
iOS Mach/XNU KERNEL
iOS HAL
HARDWARE
CODE FUNCTIONALITY
DATA AT REST DATA IN MOTION
Data Center
& App Backend
Network &
Cloud Services
TEST
APP
▪ GPS spoofing
▪ Buffer overflow
▪ allowBackup Flag
▪ allowDebug Flag
▪ Code Obfuscation
▪ Configuration manipulation
▪ Escalated privileges
▪ URL schemes
▪ GPS Leaking
▪ Integrity/tampering/repacking
▪ Side channel attacks
▪ App signing key unprotected
▪ JSON-RPC
▪ Automatic Reference Counting
▪ Dynamic runtime injection
▪ Unintended permissions
▪ UI overlay/pin stealing
▪ Intent hijacking
▪ Zip directory traversal
▪ Clipboard data
▪ World Readable Files
▪ Data caching
▪ Data stored in application directory
▪ Decryption of keychain
▪ Data stored in log files
▪ Data cached in memory/RAM
▪ Data stored in SD card
▪ OS data caching
▪ Passwords & data accessible
▪ No/Weak encryption
▪ TEE/Secure Enclave Processor
▪ Side channel leak
▪ SQLite database
▪ Emulator variance
▪ Wi-Fi (no/weak encryption)
▪ Rogue access point
▪ Packet sniffing
▪ Man-in-the-middle
▪ Session hijacking
▪ DNS poisoning
▪ TLS Downgrade
▪ Fake TLS certificate
▪ Improper TLS validation
▪ HTTP Proxies
▪ VPNs
▪ Weak/No Local authentication
▪ App transport security
▪ Transmitted to insecure server
▪ Zip files in transit
▪ Cookie “httpOnly” flag
▪ Cookie “secure” flag
8
▪ Android rooting/iOS jailbreak
▪ User-initiated code
▪ Confused deputy attack
▪ Media/file format parsers
▪ Insecure 3rd party libraries
▪ World Writable Files
▪ World Writable Executables
WEB + SAST VENDORS
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
FORENSICS/DATA-AT-REST
9
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
of Android Apps
Leak Sensitive Data to
System Logs
73%
10
Sensitive data on the device
Credentials
PII (SSNs, addresses, phone numbers)
Session tokens
Cryptographic keys and IVs
Data in insecure locations
System Logs
Emulated Storage / SD Card
Arbitrary Code on SD Card
COMMON FORENSICS ISSUES
of iOS Apps
Leak Sensitive Data to
System Logs
18%
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
The search for sensitive values
Rainbow tables help
regex and grep
Jailbroken/Rooted devices
Great for testing private folders and keychain
Not necessary for backups, logs, and SDCard
Exercise the app!
Different data before and after log out
11
TESTING FORENSICS/DATA-AT-REST
SD card (Android) RAM
System log files
Private
application
folder
Keychain
Backups
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
IoT app with wearable hardware
Monitors users health
Requires updates
Syncs with mobile device via app
Writing to insecure data storage
Identifying health data on SD card
Firmware binary stored on SD card
12
REAL-WORLD EXAMPLE
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
1. Avoid writing sensitive data
a. Use encryption
i. No custom crypto
2. Avoid writing to SD card
3. Avoid writing to system logs
13
REMEDIATIONS
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
CLIENT CODE QUALITY
14
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
Hardcoded crypto keys and IVs
Hardcoded credentials
Client side logic
Vulnerable SDKs and libraries
Free security features
Backdoor methods
15
COMMON CODE-LEVEL ISSUES
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
● Black-box testing approach
● Reverse Engineering:
○ Zip files -> AndroidManifest.xml, Info.plist
○ Disassemblers / Decompilers (Radare2, apktool, procyon)
○ Dynamic binary instrumentation (Frida)
○ Developer tool (Android Studio, Xcode)
○ Source code analysis
■ Android - Java, Kotlin
■ iOS - Objective-C, Swift
● “strings” and “grep”, otool etc.
16
TESTING CODE QUALITY
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
DEX -> smali -> jar
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.18
Executable code compared to disassembled code
Executable code Disassembled code
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
Crypto info hardcoded client-side
19
REAL-WORLD EXAMPLE
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
1. If you don’t want it seen, don’t
hardcode it
a. Keys, IVs, creds, and other
sensitive data
2. Authentication and Authorization must
be performed server side
3. Use free security
a. Client side flags protect users
4. Remove extraneous functionality
20
REMEDIATIONS
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
NETWORK TRAFFIC
21
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
COMMON NETWORK SECURITY ISSUES
HTTP Traffic
MITM Issues
Certificate Validation
Hostname Verification
Certificate Pinning
Third Party Endpoints
Vulnerable Network Libraries
22
Android Apps use
insecure HTTP
1 in 5
iOS Apps use
insecure HTTP
1 in 7
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
Use different MiTM environments
Different types of certs
Test before and after login process
Be prepared to launch the proxy during different stages
Exercise the entire app
Third party API or other content
Look for sensitive data and interesting content types
Less work when testing the web API
23
TESTING NETWORK INTERACTIONS
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
INTERCEPTION PROXY BASIC SETUP
Device 192.168.10.15
Gateway set to 192.168.10.66 192.168.10.1
Backend Server
Laptop w/ mitmproxy
Listening at ports 80 & 443
192.168.10.66
Mitmproxy CA certificate
(optional)
24
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
WebViews with MiTM issues
In-app browser
Arbitrary content
JavaScript
FAQ page can become a phishing vector
25
REAL-WORLD EXAMPLE
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
1. Always use HTTPS because it’s 2019
2. Ensure proper verification of certificates
3. Implement certificate pinning when
transmitting highly sensitive PII over the
network
4. Use up-to-date network libraries
5. Test your third party API requests
26
REMEDIATIONS
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
BACKEND/API
27
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
COMMON BACKEND/API ISSUES
Insecure authentication
Insecure authorization
Session token issues
Lack of rate limiting
General web backend issues
28
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
● Manipulate network traffic using interception proxy
○ Attempt to brute force important fields in the network request
○ Input arbitrary values and inspect server response (stack traces)
○ Fuzz URL for directory traversal etc.
● Exercise authentication and authorization functionalities
○ Test for session token replay, expiration
○ Try default admin credentials
29
TESTING BACKEND/API
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
Serialized IDs used to enroll IoT devices -> easy Denial of Service
30
REAL-WORLD EXAMPLES
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
Improper access control on Facebook external access tokens -> Unauthorized access
31
REAL-WORLD EXAMPLES
https://developers.facebook.com/docs/facebook-login/man
ually-build-a-login-flow#checktoken
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
1. Perform rate limiting on endpoints
2. Ensure proper session handling
3. Follow web backend best practices:
https://www.owasp.org/index.php/Categ
ory:OWASP_Backend_Security_Project
32
REMEDIATIONS
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
COMMUNICATING THE ISSUES
Report needs to make sense to everyone
Security, Developers, and Management
Attack Scenario
Remediation
33
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
1. Unnecessary data storage on device (writing to external storage or logs)
2. HTTP network traffic
3. Lack of hostname verification /certificate validation
4. Client-side logic
5. Mobile API security
34
TOP 5 TAKEAWAYS
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
Automated Mobile AppSec Testing Software
Expert Pen Testing & Security Services
Powers Security in Agile & DevOps Teams
World-Class Security Research Team
(builders of FRIDA & RADARE)
Advanced Engineering & DevOps Teams
from High Frequency Trading Companies
Wrote the book on mobile forensics
TRUSTED BY THE WORLD’S HIGHEST SECURITY ORGANIZATIONS
35
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
NOWSECURE SOLUTION
Data
Repository
Dashboards &
Reports
Advanced
Configuration
Device
Farm
Compliance
Mapping
Analysis
Engine
36
NowSecure SOFTWARE NowSecure SERVICES
For Dev, QA & Security Teams
Automated Security Testing
Dynamic Testing Across Full Lifecycle
Scales to Continuous Testing & Monitoring
For App Owners, Dev & Security Teams
Expert Pen Testing Programs
Training & App Security Programs
Enterprise Mobile App Risk Assessments
Internal/Outsourced Development
On-Demand, API or CI/CD Integrated
on-prem or cloud
© Copyright 2018 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
Elite team of security professionals can
swiftly triage urgent needs, provide expert
training & optimize your program
Expert Penetration testing for complete
assessments
+100 Man Years Experience
+1000 Mobile Apps Tested
Advanced Mobile AppSec Forensic Skills
Optional NowSecure Certified Badge
Full lifecycle programs for maximum success
Expert Onboarding, Setup & Guidance
Mobile AppSec Testing Program Development
Dev & Security Team Quarterly Training
Mobile AppSec Staff Augmentation
Enterprise-wide Mobile Risk Assessments
NOWSECURE SERVICES EXPERT APPSEC ANALYSIS
37
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
Fully automated mobile app security testing
solution for Agile & DevOps
Shorten time-to-release with security baked
in and visibility throughout
Full "hands-free" automation for analysis in minutes
SAST, DAST, Behavioral binary testing on real devices
Highly accurate CVSS-scored findings w/ compliance
Developer-friendly remediation tips
Full visibility & feedback for continuous improvement
On-demand or plug-in SDLC integration with
no new tools for developers to learn
Auto test every build
Auto generate issue tickets
Auto route info to all stakeholders
Optimize workflow across roles & app lifecycle
NOWSECURE POWERS SECURE DEV TOOLCHAIN
38
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
INSIDE NOWSECURE MOBILE APP RISK SCORING
39
© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
INSIDE NOWSECURE MOBILE APP RISK SCORING
40
© Copyright 2018 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.41
OPEN Q&A
Use the “Ask a Question” tab below the slides
RONO DASGUPTA
MOBILE SECURITY ANALYST
BRIAN REED
CMO
TONY RAMIREZ
MOBILE SECURITY ANALYST

Building a Mobile App Pen Testing Blueprint

  • 1.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.© Copyright 2019 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. BUILDING A MOBILE APP PEN TESTING BLUEPRINT
  • 2.
    © Copyright 2018NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. RONO DASGUPTA MOBILE SECURITY ANALYST AGENDA WHO WE ARE WHY MOBILE MATTERS TOOLS OF THE TRADE COMMON FINDINGS SHARING WITH STAKEHOLDERS AUTOMATING PEN TESTING SPEAKERS 2 BRIAN REED CMO TONY RAMIREZ MOBILE SECURITY ANALYST
  • 3.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.3 85% of Mobile Apps Have Security Vulnerabilities 49% of Mobile Apps Leak Personal Data to Violate GDPR
  • 4.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. NOWSECURE DEEP MOBILE SECURITY EXPERTISE Open source Books & Speaking MOBILE SECURITY RESEARCH IS IN OUR DNA Dream team of security researchers Discovering critical vulns Identifying novel attack vectors Creating/maintaining renowned open-source mobile security tools/projects Expert team of security pen testers Pen tested thousands of mobile apps Comprehensive experience and testing blueprint Certified some of the worlds most complex, high security apps THE NOWSECURE MISSION Save the world from unsafe mobile apps Educate enterprises on the latest mobile threats Maximize the security of apps enterprises develop, purchase and use 4
  • 5.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.5 MOBILE APP RISKS ARE REAL AND PAINFULLY EXPOSED
  • 6.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. 1. Terminal of choice 2. Jailbroken/rooted iOS and Android devices 3. Network interception tools 4. Developer tools 5. Reverse engineering tools 6. Patience, creativity, and attention to detail 6 TOOLS OF THE TRADE
  • 7.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.7 MOBILE VULNERABILITY AREAS – THE ATTACK SURFACE Backend/API Network Traffic Client Code Quality Forensics/Data-at-Rest
  • 8.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. INSIDE THE MOBILE ATTACK SURFACE iOS APPS iOS FRAMEWORKS iOS NATIVE LIBRARIES iOS Mach/XNU KERNEL iOS HAL HARDWARE CODE FUNCTIONALITY DATA AT REST DATA IN MOTION Data Center & App Backend Network & Cloud Services TEST APP ▪ GPS spoofing ▪ Buffer overflow ▪ allowBackup Flag ▪ allowDebug Flag ▪ Code Obfuscation ▪ Configuration manipulation ▪ Escalated privileges ▪ URL schemes ▪ GPS Leaking ▪ Integrity/tampering/repacking ▪ Side channel attacks ▪ App signing key unprotected ▪ JSON-RPC ▪ Automatic Reference Counting ▪ Dynamic runtime injection ▪ Unintended permissions ▪ UI overlay/pin stealing ▪ Intent hijacking ▪ Zip directory traversal ▪ Clipboard data ▪ World Readable Files ▪ Data caching ▪ Data stored in application directory ▪ Decryption of keychain ▪ Data stored in log files ▪ Data cached in memory/RAM ▪ Data stored in SD card ▪ OS data caching ▪ Passwords & data accessible ▪ No/Weak encryption ▪ TEE/Secure Enclave Processor ▪ Side channel leak ▪ SQLite database ▪ Emulator variance ▪ Wi-Fi (no/weak encryption) ▪ Rogue access point ▪ Packet sniffing ▪ Man-in-the-middle ▪ Session hijacking ▪ DNS poisoning ▪ TLS Downgrade ▪ Fake TLS certificate ▪ Improper TLS validation ▪ HTTP Proxies ▪ VPNs ▪ Weak/No Local authentication ▪ App transport security ▪ Transmitted to insecure server ▪ Zip files in transit ▪ Cookie “httpOnly” flag ▪ Cookie “secure” flag 8 ▪ Android rooting/iOS jailbreak ▪ User-initiated code ▪ Confused deputy attack ▪ Media/file format parsers ▪ Insecure 3rd party libraries ▪ World Writable Files ▪ World Writable Executables WEB + SAST VENDORS
  • 9.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. FORENSICS/DATA-AT-REST 9
  • 10.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. of Android Apps Leak Sensitive Data to System Logs 73% 10 Sensitive data on the device Credentials PII (SSNs, addresses, phone numbers) Session tokens Cryptographic keys and IVs Data in insecure locations System Logs Emulated Storage / SD Card Arbitrary Code on SD Card COMMON FORENSICS ISSUES of iOS Apps Leak Sensitive Data to System Logs 18%
  • 11.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. The search for sensitive values Rainbow tables help regex and grep Jailbroken/Rooted devices Great for testing private folders and keychain Not necessary for backups, logs, and SDCard Exercise the app! Different data before and after log out 11 TESTING FORENSICS/DATA-AT-REST SD card (Android) RAM System log files Private application folder Keychain Backups
  • 12.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. IoT app with wearable hardware Monitors users health Requires updates Syncs with mobile device via app Writing to insecure data storage Identifying health data on SD card Firmware binary stored on SD card 12 REAL-WORLD EXAMPLE
  • 13.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. 1. Avoid writing sensitive data a. Use encryption i. No custom crypto 2. Avoid writing to SD card 3. Avoid writing to system logs 13 REMEDIATIONS
  • 14.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. CLIENT CODE QUALITY 14
  • 15.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. Hardcoded crypto keys and IVs Hardcoded credentials Client side logic Vulnerable SDKs and libraries Free security features Backdoor methods 15 COMMON CODE-LEVEL ISSUES
  • 16.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. ● Black-box testing approach ● Reverse Engineering: ○ Zip files -> AndroidManifest.xml, Info.plist ○ Disassemblers / Decompilers (Radare2, apktool, procyon) ○ Dynamic binary instrumentation (Frida) ○ Developer tool (Android Studio, Xcode) ○ Source code analysis ■ Android - Java, Kotlin ■ iOS - Objective-C, Swift ● “strings” and “grep”, otool etc. 16 TESTING CODE QUALITY
  • 17.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. DEX -> smali -> jar
  • 18.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.18 Executable code compared to disassembled code Executable code Disassembled code
  • 19.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. Crypto info hardcoded client-side 19 REAL-WORLD EXAMPLE
  • 20.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. 1. If you don’t want it seen, don’t hardcode it a. Keys, IVs, creds, and other sensitive data 2. Authentication and Authorization must be performed server side 3. Use free security a. Client side flags protect users 4. Remove extraneous functionality 20 REMEDIATIONS
  • 21.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. NETWORK TRAFFIC 21
  • 22.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. COMMON NETWORK SECURITY ISSUES HTTP Traffic MITM Issues Certificate Validation Hostname Verification Certificate Pinning Third Party Endpoints Vulnerable Network Libraries 22 Android Apps use insecure HTTP 1 in 5 iOS Apps use insecure HTTP 1 in 7
  • 23.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. Use different MiTM environments Different types of certs Test before and after login process Be prepared to launch the proxy during different stages Exercise the entire app Third party API or other content Look for sensitive data and interesting content types Less work when testing the web API 23 TESTING NETWORK INTERACTIONS
  • 24.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. INTERCEPTION PROXY BASIC SETUP Device 192.168.10.15 Gateway set to 192.168.10.66 192.168.10.1 Backend Server Laptop w/ mitmproxy Listening at ports 80 & 443 192.168.10.66 Mitmproxy CA certificate (optional) 24
  • 25.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. WebViews with MiTM issues In-app browser Arbitrary content JavaScript FAQ page can become a phishing vector 25 REAL-WORLD EXAMPLE
  • 26.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. 1. Always use HTTPS because it’s 2019 2. Ensure proper verification of certificates 3. Implement certificate pinning when transmitting highly sensitive PII over the network 4. Use up-to-date network libraries 5. Test your third party API requests 26 REMEDIATIONS
  • 27.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. BACKEND/API 27
  • 28.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. COMMON BACKEND/API ISSUES Insecure authentication Insecure authorization Session token issues Lack of rate limiting General web backend issues 28
  • 29.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. ● Manipulate network traffic using interception proxy ○ Attempt to brute force important fields in the network request ○ Input arbitrary values and inspect server response (stack traces) ○ Fuzz URL for directory traversal etc. ● Exercise authentication and authorization functionalities ○ Test for session token replay, expiration ○ Try default admin credentials 29 TESTING BACKEND/API
  • 30.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. Serialized IDs used to enroll IoT devices -> easy Denial of Service 30 REAL-WORLD EXAMPLES
  • 31.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. Improper access control on Facebook external access tokens -> Unauthorized access 31 REAL-WORLD EXAMPLES https://developers.facebook.com/docs/facebook-login/man ually-build-a-login-flow#checktoken
  • 32.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. 1. Perform rate limiting on endpoints 2. Ensure proper session handling 3. Follow web backend best practices: https://www.owasp.org/index.php/Categ ory:OWASP_Backend_Security_Project 32 REMEDIATIONS
  • 33.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. COMMUNICATING THE ISSUES Report needs to make sense to everyone Security, Developers, and Management Attack Scenario Remediation 33
  • 34.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. 1. Unnecessary data storage on device (writing to external storage or logs) 2. HTTP network traffic 3. Lack of hostname verification /certificate validation 4. Client-side logic 5. Mobile API security 34 TOP 5 TAKEAWAYS
  • 35.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. Automated Mobile AppSec Testing Software Expert Pen Testing & Security Services Powers Security in Agile & DevOps Teams World-Class Security Research Team (builders of FRIDA & RADARE) Advanced Engineering & DevOps Teams from High Frequency Trading Companies Wrote the book on mobile forensics TRUSTED BY THE WORLD’S HIGHEST SECURITY ORGANIZATIONS 35
  • 36.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. NOWSECURE SOLUTION Data Repository Dashboards & Reports Advanced Configuration Device Farm Compliance Mapping Analysis Engine 36 NowSecure SOFTWARE NowSecure SERVICES For Dev, QA & Security Teams Automated Security Testing Dynamic Testing Across Full Lifecycle Scales to Continuous Testing & Monitoring For App Owners, Dev & Security Teams Expert Pen Testing Programs Training & App Security Programs Enterprise Mobile App Risk Assessments Internal/Outsourced Development On-Demand, API or CI/CD Integrated on-prem or cloud
  • 37.
    © Copyright 2018NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. Elite team of security professionals can swiftly triage urgent needs, provide expert training & optimize your program Expert Penetration testing for complete assessments +100 Man Years Experience +1000 Mobile Apps Tested Advanced Mobile AppSec Forensic Skills Optional NowSecure Certified Badge Full lifecycle programs for maximum success Expert Onboarding, Setup & Guidance Mobile AppSec Testing Program Development Dev & Security Team Quarterly Training Mobile AppSec Staff Augmentation Enterprise-wide Mobile Risk Assessments NOWSECURE SERVICES EXPERT APPSEC ANALYSIS 37
  • 38.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. Fully automated mobile app security testing solution for Agile & DevOps Shorten time-to-release with security baked in and visibility throughout Full "hands-free" automation for analysis in minutes SAST, DAST, Behavioral binary testing on real devices Highly accurate CVSS-scored findings w/ compliance Developer-friendly remediation tips Full visibility & feedback for continuous improvement On-demand or plug-in SDLC integration with no new tools for developers to learn Auto test every build Auto generate issue tickets Auto route info to all stakeholders Optimize workflow across roles & app lifecycle NOWSECURE POWERS SECURE DEV TOOLCHAIN 38
  • 39.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. INSIDE NOWSECURE MOBILE APP RISK SCORING 39
  • 40.
    © Copyright 2019NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. INSIDE NOWSECURE MOBILE APP RISK SCORING 40
  • 41.
    © Copyright 2018NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.41 OPEN Q&A Use the “Ask a Question” tab below the slides RONO DASGUPTA MOBILE SECURITY ANALYST BRIAN REED CMO TONY RAMIREZ MOBILE SECURITY ANALYST