SlideShare une entreprise Scribd logo
1  sur  30
Télécharger pour lire hors ligne
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
Episode II
RETURN OF THE
BACK-END/NETWORK
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
Episode II
RETURN OF THE
NETWORK/BACK-END
Episode I
THE FORENSIC
MENACE
Episode III
ATTACK OF
THE CODE
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Connect
Twitter: @NowSecureMobile
—
Subscribe to #MobSec5, our weekly mobile security news digest
http://mobsec5.nowsecure.com/
—
Web: nowsecure.com
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Michael Krueger
Solutions Engineer | NowSecure
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Contents
● The Trilogy series overview
● Data-in-transit
● Server-side security
● Suggested tools to get started
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
Mobile
forensics &
data recovery
Network, web
services &
API testing
Server-side
penetration
testing
Reverse
engineering &
code analysis
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
“I can show you the ways of the [Force data in transit].”
— Kylo Ren
https://milnersblog.com/tag/the-characters-of-star-wars-the-force-awakens/
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Data in transit concerns
● Insecure communication
○ Certificate validation issues
○ Privacy leakage
● Insecure authentication
● Insecure authorization
○ Server accepting/responding to
requests without authorization
○ Client-based authorization decisions
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Man-in-the-middle (MITM)
● Secretly intercept (modify) communications between systems believing they are communicating directly
● Aims to circumvent mutual authentication (or lack thereof)
● Use it to test for potential vulnerabilities and validate that app sends proper requests/intended data
Who are you really talking to?
Original connection
Victim
Attacker
Presents fake
certificate
Server
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Lack of certificate validation
Don’t implement your own crypto!
It still happens because developers want to accept self-signed
certificates or because code implementation is too complex
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Mitmproxy basic setup
Device 192.168.10.15
Gateway set to 192.168.10.66 192.168.10.1
Server
Laptop w/ mitmproxy
Listening at ports 80 & 443
192.168.10.66
Mitmproxy CA certificate
(optional)
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Android handset gateway configuration
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
IP forwarding
1
2
3
sysctl - w net.ipv4.ip_forward = 1
iptables - t nat - A PREROUTING - i eth0 - p tcp--dport 80 - j REDIRECT--to - port 8080
iptables - t nat - A PREROUTING - i eth0 - p tcp--dport 443 - j REDIRECT--to - port 8080
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Looking for HTTPS traffic
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Privacy leakage
● Email address
● Username/password
● Phone number
● IMEI/IMSI
● Home address
● And so much more
See: “Who Knows What About Me? A Survey of Behind the
Scenes Personal Data Sharing to Third Parties by Mobile Apps”
http://jots.pub/a/2015103001/
Sharing more than you intend
Sharing of sensitive data by
Android apps (left) to domains (right)
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Authentication vs. authorization
Do you know the difference?
Authentication
The process of sending
credentials in an
attempt to connect
Authorization
Gaining access to a resource
because configured permissions
allow you access
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Insecure authentication
● Predictable session identifiers
● Failing to log users out
● Session lifetime risks
○ Sessions valid too long
○ Sessions valid across multiple channels
● Session fixation
Who copied my house key???
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Insecure authorization
I feel like being an administrator today.
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.http://disney.wikia.com/wiki/Leia_Organa
“Somebody has to save our [skins servers].”
— Princess Leia
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Server-side issues
● Injection
○ SQL
○ XSS
○ Command
● Improper session handling
● Weak ciphers
● Many more...
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Weak cipher examples
What do you accept?
https://www.ssllabs.com/
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Weak cipher examples
What do you accept?
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Intelligence Gathering
● What IP addresses does your app talk to?
● Query WHOIS to learn more about each IP address
● Use geolocation services to confirm IP address location
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Endpoint identification
https://www.wireshark.org
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Suggested tools for back-end testing
Rooted Android device
I use a Google Nexus 5
Linux machine or VM
w/ Android Studio tools
May we recommend Santoku Linux?
(Also, Kali Linux)
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Tools for testing
Qualys SSL Labs https://www.ssllabs.com/ssltest/
Nmap
https://nmap.org/nsedoc/scripts/ssl-enum-ciphers.html
https://nmap.org/nsedoc/scripts/ssl-cert.html
Mitmproxy http://docs.mitmproxy.org/en/stable/
Burp Suite https://support.portswigger.net/
IPFingerprints http://www.ipfingerprints.com/
Santoku Linux https://santoku-linux.com/
Wireshark https://www.wireshark.org
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Pointers to keep in mind during analysis
Don’t just focus
on the encrypted
payload. Look
at metadata.
When searching
for data in large files,
command line tools
are best: Try grep
Try multiple tools.
Find the one
you’re most
comfortable with.
If you’re scanning a
third-party server,
get permission
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.
Vulnerable data exists in more than just the payload
Try using both trusted and untrusted certificates
when intercepting data in transit
Don’t underestimate the time/effort involved in
network-focused testing
© Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute.
Episode III
ATTACK OF THE CODE
Thursday, January 19
11 a.m. CST / 9 a.m. PST
REGISTER NOW: http://bit.ly/2gOPih8
Let’s talk
NowSecure
+1 312.878.1100
@NowSecureMobile
www.nowsecure.com
Subscribe to #MobSec5 - a digest of the week’s mobile news
that matters - http://mobsec5.nowsecure.com/

Contenu connexe

Tendances

Tendances (20)

OWASP Mobile Top 10
OWASP Mobile Top 10OWASP Mobile Top 10
OWASP Mobile Top 10
 
85% of App Store Apps Fail OWASP Mobile Top 10: Are you exposed?
85% of App Store Apps Fail OWASP Mobile Top 10: Are you exposed?85% of App Store Apps Fail OWASP Mobile Top 10: Are you exposed?
85% of App Store Apps Fail OWASP Mobile Top 10: Are you exposed?
 
How to scale mobile application security testing
How to scale mobile application security testingHow to scale mobile application security testing
How to scale mobile application security testing
 
Five mobile security challenges facing the enterprise
Five mobile security challenges facing the enterpriseFive mobile security challenges facing the enterprise
Five mobile security challenges facing the enterprise
 
Addressing the OWASP Mobile Security Threats using Xamarin
Addressing the OWASP Mobile Security Threats using XamarinAddressing the OWASP Mobile Security Threats using Xamarin
Addressing the OWASP Mobile Security Threats using Xamarin
 
OWASP Top 10 for Mobile
OWASP Top 10 for MobileOWASP Top 10 for Mobile
OWASP Top 10 for Mobile
 
Mobile Hacking
Mobile HackingMobile Hacking
Mobile Hacking
 
Communication security 2021
Communication security 2021Communication security 2021
Communication security 2021
 
Owasp Mobile Top 10 - M7 & M8
Owasp Mobile Top 10 - M7 & M8Owasp Mobile Top 10 - M7 & M8
Owasp Mobile Top 10 - M7 & M8
 
Mobile Defense-in-Dev (Depth)
Mobile Defense-in-Dev (Depth)Mobile Defense-in-Dev (Depth)
Mobile Defense-in-Dev (Depth)
 
Cyber Kill Chain: Web Application Exploitation
Cyber Kill Chain: Web Application ExploitationCyber Kill Chain: Web Application Exploitation
Cyber Kill Chain: Web Application Exploitation
 
Lookout pegasus-android-technical-analysis
Lookout pegasus-android-technical-analysisLookout pegasus-android-technical-analysis
Lookout pegasus-android-technical-analysis
 
Mobile App Crashworthiness - Securing Vehicle-to-Device (V2D) Interfaces and ...
Mobile App Crashworthiness - Securing Vehicle-to-Device (V2D) Interfaces and ...Mobile App Crashworthiness - Securing Vehicle-to-Device (V2D) Interfaces and ...
Mobile App Crashworthiness - Securing Vehicle-to-Device (V2D) Interfaces and ...
 
Webinar: Insights from Cyren's 2016 cyberthreat report
Webinar: Insights from Cyren's 2016 cyberthreat reportWebinar: Insights from Cyren's 2016 cyberthreat report
Webinar: Insights from Cyren's 2016 cyberthreat report
 
OWASP Day - OWASP Day - Lets secure!
OWASP Day - OWASP Day - Lets secure! OWASP Day - OWASP Day - Lets secure!
OWASP Day - OWASP Day - Lets secure!
 
Android Application Security Awareness Talk, OWASP MEETUP Q3, 2015
Android Application Security Awareness Talk, OWASP MEETUP Q3, 2015Android Application Security Awareness Talk, OWASP MEETUP Q3, 2015
Android Application Security Awareness Talk, OWASP MEETUP Q3, 2015
 
Webinar: Is your web security broken? - 10 things you need to know
Webinar: Is your web security broken? - 10 things you need to knowWebinar: Is your web security broken? - 10 things you need to know
Webinar: Is your web security broken? - 10 things you need to know
 
CeBIT 2015 Presentation
CeBIT 2015 PresentationCeBIT 2015 Presentation
CeBIT 2015 Presentation
 
Webinar: IT security at SMBs: 2016 benchmarking survey
Webinar: IT security at SMBs: 2016 benchmarking surveyWebinar: IT security at SMBs: 2016 benchmarking survey
Webinar: IT security at SMBs: 2016 benchmarking survey
 
The Threat Landscape in the Era of Directed Attacks - Webinar
The Threat Landscape in the Era of Directed Attacks - Webinar The Threat Landscape in the Era of Directed Attacks - Webinar
The Threat Landscape in the Era of Directed Attacks - Webinar
 

Similaire à Mobile Penetration Testing: Episode II - Attack of the Code

[CB16] Background Story of "Operation neutralizing banking malware" and highl...
[CB16] Background Story of "Operation neutralizing banking malware" and highl...[CB16] Background Story of "Operation neutralizing banking malware" and highl...
[CB16] Background Story of "Operation neutralizing banking malware" and highl...
CODE BLUE
 
INTOSTREAM INTRO_2016_SEP
INTOSTREAM INTRO_2016_SEPINTOSTREAM INTRO_2016_SEP
INTOSTREAM INTRO_2016_SEP
Sungil Woo
 

Similaire à Mobile Penetration Testing: Episode II - Attack of the Code (20)

The Datacenter Network You Wish You Had: It's yours for the taking.
The Datacenter Network You Wish You Had: It's yours for the taking.The Datacenter Network You Wish You Had: It's yours for the taking.
The Datacenter Network You Wish You Had: It's yours for the taking.
 
The Datacenter Network You Wish You Had
The Datacenter Network You Wish You HadThe Datacenter Network You Wish You Had
The Datacenter Network You Wish You Had
 
Cybersecurity Fundamentals for Bar Associations
Cybersecurity Fundamentals for Bar AssociationsCybersecurity Fundamentals for Bar Associations
Cybersecurity Fundamentals for Bar Associations
 
The Slow Death of Passwords
The Slow Death of PasswordsThe Slow Death of Passwords
The Slow Death of Passwords
 
Identity Relationship Management - The Right Approach for a Complex Digital W...
Identity Relationship Management - The Right Approach for a Complex Digital W...Identity Relationship Management - The Right Approach for a Complex Digital W...
Identity Relationship Management - The Right Approach for a Complex Digital W...
 
Security & Identity for the Internet of Things Webinar
Security & Identity for the Internet of Things WebinarSecurity & Identity for the Internet of Things Webinar
Security & Identity for the Internet of Things Webinar
 
OSX/Pirrit: The blue balls of OS X adware
OSX/Pirrit: The blue balls of OS X adwareOSX/Pirrit: The blue balls of OS X adware
OSX/Pirrit: The blue balls of OS X adware
 
CASE STUDY - Ironclad Messaging & Secure App Dev for Regulated Industries
CASE STUDY - Ironclad Messaging & Secure App Dev for Regulated IndustriesCASE STUDY - Ironclad Messaging & Secure App Dev for Regulated Industries
CASE STUDY - Ironclad Messaging & Secure App Dev for Regulated Industries
 
Pas d'IoT sans Identité!
Pas d'IoT sans Identité!Pas d'IoT sans Identité!
Pas d'IoT sans Identité!
 
IOT Networks
IOT NetworksIOT Networks
IOT Networks
 
Recovering Your Customers From Ransomware Without Paying Ransom
Recovering Your Customers From Ransomware Without Paying RansomRecovering Your Customers From Ransomware Without Paying Ransom
Recovering Your Customers From Ransomware Without Paying Ransom
 
Cisco Connect Halifax 2018 Anatomy of attack
Cisco Connect Halifax 2018   Anatomy of attackCisco Connect Halifax 2018   Anatomy of attack
Cisco Connect Halifax 2018 Anatomy of attack
 
Backstage Tour of Identity - London Identity Summit
Backstage Tour of Identity - London Identity SummitBackstage Tour of Identity - London Identity Summit
Backstage Tour of Identity - London Identity Summit
 
[IGC2018] 잔디소프트 윤세민 - HTML5 게임 어디까지 가능한가
[IGC2018] 잔디소프트 윤세민 - HTML5 게임 어디까지 가능한가[IGC2018] 잔디소프트 윤세민 - HTML5 게임 어디까지 가능한가
[IGC2018] 잔디소프트 윤세민 - HTML5 게임 어디까지 가능한가
 
Hacking intranet websites
Hacking intranet websitesHacking intranet websites
Hacking intranet websites
 
Financial Grade OAuth & OpenID Connect
Financial Grade OAuth & OpenID ConnectFinancial Grade OAuth & OpenID Connect
Financial Grade OAuth & OpenID Connect
 
Security and Virtualization in the Data Center
Security and Virtualization in the Data CenterSecurity and Virtualization in the Data Center
Security and Virtualization in the Data Center
 
[CB16] Background Story of "Operation neutralizing banking malware" and highl...
[CB16] Background Story of "Operation neutralizing banking malware" and highl...[CB16] Background Story of "Operation neutralizing banking malware" and highl...
[CB16] Background Story of "Operation neutralizing banking malware" and highl...
 
Android P Security Updates: What You Need to Know
Android P Security Updates: What You Need to KnowAndroid P Security Updates: What You Need to Know
Android P Security Updates: What You Need to Know
 
INTOSTREAM INTRO_2016_SEP
INTOSTREAM INTRO_2016_SEPINTOSTREAM INTRO_2016_SEP
INTOSTREAM INTRO_2016_SEP
 

Plus de NowSecure

Plus de NowSecure (20)

iOS recon with Radare2
iOS recon with Radare2iOS recon with Radare2
iOS recon with Radare2
 
From Tangled Mess to Organized Flow: A Mobile DevSecOps Reference Architecture
From Tangled Mess to Organized Flow: A Mobile DevSecOps Reference ArchitectureFrom Tangled Mess to Organized Flow: A Mobile DevSecOps Reference Architecture
From Tangled Mess to Organized Flow: A Mobile DevSecOps Reference Architecture
 
Android Q & iOS 13 Privacy Enhancements
Android Q & iOS 13 Privacy EnhancementsAndroid Q & iOS 13 Privacy Enhancements
Android Q & iOS 13 Privacy Enhancements
 
Debunking the Top 5 Myths About Mobile AppSec
Debunking the Top 5 Myths About Mobile AppSecDebunking the Top 5 Myths About Mobile AppSec
Debunking the Top 5 Myths About Mobile AppSec
 
OSS Tools: Creating a Reverse Engineering Plug-in for r2frida
OSS Tools: Creating a Reverse Engineering Plug-in for r2fridaOSS Tools: Creating a Reverse Engineering Plug-in for r2frida
OSS Tools: Creating a Reverse Engineering Plug-in for r2frida
 
Building a Mobile App Pen Testing Blueprint
Building a Mobile App Pen Testing BlueprintBuilding a Mobile App Pen Testing Blueprint
Building a Mobile App Pen Testing Blueprint
 
Mobile App Security Predictions 2019
Mobile App Security Predictions 2019Mobile App Security Predictions 2019
Mobile App Security Predictions 2019
 
Jeff's Journey: Best Practices for Securing Mobile App DevOps
Jeff's Journey: Best Practices for Securing Mobile App DevOpsJeff's Journey: Best Practices for Securing Mobile App DevOps
Jeff's Journey: Best Practices for Securing Mobile App DevOps
 
A Risk-Based Mobile App Security Testing Strategy
A Risk-Based Mobile App Security Testing StrategyA Risk-Based Mobile App Security Testing Strategy
A Risk-Based Mobile App Security Testing Strategy
 
iOS 12 Preview - What You Need To Know
iOS 12 Preview - What You Need To KnowiOS 12 Preview - What You Need To Know
iOS 12 Preview - What You Need To Know
 
5 Tips for Agile Mobile App Security Testing
5 Tips for Agile Mobile App Security Testing5 Tips for Agile Mobile App Security Testing
5 Tips for Agile Mobile App Security Testing
 
Top OSS for Mobile AppSec Testing: The Latest on R2 and FRIDA
Top OSS for Mobile AppSec Testing: The Latest on R2 and FRIDATop OSS for Mobile AppSec Testing: The Latest on R2 and FRIDA
Top OSS for Mobile AppSec Testing: The Latest on R2 and FRIDA
 
5 Mobile App Security MUST-DOs in 2018
5 Mobile App Security MUST-DOs in 20185 Mobile App Security MUST-DOs in 2018
5 Mobile App Security MUST-DOs in 2018
 
Mobile Apps & Connected Healthcare: Managing 3rd-Party Mobile App Risk
Mobile Apps & Connected Healthcare: Managing 3rd-Party Mobile App RiskMobile Apps & Connected Healthcare: Managing 3rd-Party Mobile App Risk
Mobile Apps & Connected Healthcare: Managing 3rd-Party Mobile App Risk
 
What attackers know about your mobile apps that you don’t: Banking & FinTech
What attackers know about your mobile apps that you don’t: Banking & FinTechWhat attackers know about your mobile apps that you don’t: Banking & FinTech
What attackers know about your mobile apps that you don’t: Banking & FinTech
 
Solving for Compliance: Mobile app security for banking and financial services
Solving for Compliance: Mobile app security for banking and financial servicesSolving for Compliance: Mobile app security for banking and financial services
Solving for Compliance: Mobile app security for banking and financial services
 
Leaky Mobile Apps: What You Need to Know
Leaky Mobile Apps: What You Need to KnowLeaky Mobile Apps: What You Need to Know
Leaky Mobile Apps: What You Need to Know
 
Vetting Mobile Apps for Corporate Use: Security Essentials
Vetting Mobile Apps for Corporate Use: Security EssentialsVetting Mobile Apps for Corporate Use: Security Essentials
Vetting Mobile Apps for Corporate Use: Security Essentials
 
Cutting out the middleman: Man-in-the-middle attacks and prevention for mobil...
Cutting out the middleman: Man-in-the-middle attacks and prevention for mobil...Cutting out the middleman: Man-in-the-middle attacks and prevention for mobil...
Cutting out the middleman: Man-in-the-middle attacks and prevention for mobil...
 
Delivering secure mobile financial services (MFS) - "Frictionless" vs diligence
Delivering secure mobile financial services (MFS) - "Frictionless" vs diligenceDelivering secure mobile financial services (MFS) - "Frictionless" vs diligence
Delivering secure mobile financial services (MFS) - "Frictionless" vs diligence
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Mobile Penetration Testing: Episode II - Attack of the Code

  • 1. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. Episode II RETURN OF THE BACK-END/NETWORK
  • 2. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. Episode II RETURN OF THE NETWORK/BACK-END Episode I THE FORENSIC MENACE Episode III ATTACK OF THE CODE
  • 3. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Connect Twitter: @NowSecureMobile — Subscribe to #MobSec5, our weekly mobile security news digest http://mobsec5.nowsecure.com/ — Web: nowsecure.com
  • 4. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Michael Krueger Solutions Engineer | NowSecure
  • 5. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Contents ● The Trilogy series overview ● Data-in-transit ● Server-side security ● Suggested tools to get started
  • 6. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. Mobile forensics & data recovery Network, web services & API testing Server-side penetration testing Reverse engineering & code analysis
  • 7. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. “I can show you the ways of the [Force data in transit].” — Kylo Ren https://milnersblog.com/tag/the-characters-of-star-wars-the-force-awakens/
  • 8. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Data in transit concerns ● Insecure communication ○ Certificate validation issues ○ Privacy leakage ● Insecure authentication ● Insecure authorization ○ Server accepting/responding to requests without authorization ○ Client-based authorization decisions
  • 9. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Man-in-the-middle (MITM) ● Secretly intercept (modify) communications between systems believing they are communicating directly ● Aims to circumvent mutual authentication (or lack thereof) ● Use it to test for potential vulnerabilities and validate that app sends proper requests/intended data Who are you really talking to? Original connection Victim Attacker Presents fake certificate Server
  • 10. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Lack of certificate validation Don’t implement your own crypto! It still happens because developers want to accept self-signed certificates or because code implementation is too complex
  • 11. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Mitmproxy basic setup Device 192.168.10.15 Gateway set to 192.168.10.66 192.168.10.1 Server Laptop w/ mitmproxy Listening at ports 80 & 443 192.168.10.66 Mitmproxy CA certificate (optional)
  • 12. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Android handset gateway configuration
  • 13. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. IP forwarding 1 2 3 sysctl - w net.ipv4.ip_forward = 1 iptables - t nat - A PREROUTING - i eth0 - p tcp--dport 80 - j REDIRECT--to - port 8080 iptables - t nat - A PREROUTING - i eth0 - p tcp--dport 443 - j REDIRECT--to - port 8080
  • 14. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Looking for HTTPS traffic
  • 15. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Privacy leakage ● Email address ● Username/password ● Phone number ● IMEI/IMSI ● Home address ● And so much more See: “Who Knows What About Me? A Survey of Behind the Scenes Personal Data Sharing to Third Parties by Mobile Apps” http://jots.pub/a/2015103001/ Sharing more than you intend Sharing of sensitive data by Android apps (left) to domains (right)
  • 16. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Authentication vs. authorization Do you know the difference? Authentication The process of sending credentials in an attempt to connect Authorization Gaining access to a resource because configured permissions allow you access
  • 17. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Insecure authentication ● Predictable session identifiers ● Failing to log users out ● Session lifetime risks ○ Sessions valid too long ○ Sessions valid across multiple channels ● Session fixation Who copied my house key???
  • 18. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Insecure authorization I feel like being an administrator today.
  • 19. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information.http://disney.wikia.com/wiki/Leia_Organa “Somebody has to save our [skins servers].” — Princess Leia
  • 20. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Server-side issues ● Injection ○ SQL ○ XSS ○ Command ● Improper session handling ● Weak ciphers ● Many more...
  • 21. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Weak cipher examples What do you accept? https://www.ssllabs.com/
  • 22. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Weak cipher examples What do you accept?
  • 23. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Intelligence Gathering ● What IP addresses does your app talk to? ● Query WHOIS to learn more about each IP address ● Use geolocation services to confirm IP address location
  • 24. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Endpoint identification https://www.wireshark.org
  • 25. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Suggested tools for back-end testing Rooted Android device I use a Google Nexus 5 Linux machine or VM w/ Android Studio tools May we recommend Santoku Linux? (Also, Kali Linux)
  • 26. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Tools for testing Qualys SSL Labs https://www.ssllabs.com/ssltest/ Nmap https://nmap.org/nsedoc/scripts/ssl-enum-ciphers.html https://nmap.org/nsedoc/scripts/ssl-cert.html Mitmproxy http://docs.mitmproxy.org/en/stable/ Burp Suite https://support.portswigger.net/ IPFingerprints http://www.ipfingerprints.com/ Santoku Linux https://santoku-linux.com/ Wireshark https://www.wireshark.org
  • 27. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Pointers to keep in mind during analysis Don’t just focus on the encrypted payload. Look at metadata. When searching for data in large files, command line tools are best: Try grep Try multiple tools. Find the one you’re most comfortable with. If you’re scanning a third-party server, get permission
  • 28. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Vulnerable data exists in more than just the payload Try using both trusted and untrusted certificates when intercepting data in transit Don’t underestimate the time/effort involved in network-focused testing
  • 29. © Copyright 2016 NowSecure, Inc. All Rights Reserved. Proprietary information. Do not distribute. Episode III ATTACK OF THE CODE Thursday, January 19 11 a.m. CST / 9 a.m. PST REGISTER NOW: http://bit.ly/2gOPih8
  • 30. Let’s talk NowSecure +1 312.878.1100 @NowSecureMobile www.nowsecure.com Subscribe to #MobSec5 - a digest of the week’s mobile news that matters - http://mobsec5.nowsecure.com/