SlideShare a Scribd company logo
Mobile Application Pentest [Fast-Track]
 Just Mobile Phone
 Phone calls
 Sending text message or MMS
 Alarm clock
 Calculator
 Listen music
 Edge for Surf internet !!
 3G, 4G and WIFI support on Mobile network
 Became more intelligent – Smart Phone
 Sending email
 Surf internet
 Check-on for flights
 Online Banking transactions
 Social Network (Facebook, Twitter, Instagram, Etc)
 Companies started creating mobile applications to offer
services to clients
 Storing and synchronizing data files in the cloud
 Participating in social network sites
 As the data that stored, processed and transferred can often be
considered sensitive.
Mobile App Attack Surface
 Client Software on Mobile Device
 Communications Channel
 Server Side Infrastructure
Server Side
Infrastructure
Comm.
Channel
Client
Software
Mobile Phone
Internet
Application Server
Client Software
Communication Channel
Server Side
Infrastructure
 Packages are typically downloaded from an AppStore,
Google Play or provided via Company website
 Testing requires a device that is rooted or jailbroken for
access to all files and folders on the local file system
 Be able to decompiled, tampered or reverse engineered
 Attention points
 Files on the local file system
 Application authentication & authorization
 Error Handling & Session Management
 Business logic
 Decompiling and Analyzing
 Channel between the client and the server (HTTPs,
EDGE, 3G)
 Testing with HTTP Proxy (Burp, ZAP) to intercept and
manipulate alter traffic
 If the application does not use the HTTP protocol, can
use transparent TCP and UDP proxy like Mallory
 Attention points
 Sniff sensitive information
 Replay attack vulnerabilities
 Secure transfer of sensitive information
 The attack vectors for the web servers behind a mobile
application is similar to those use for regular websites
 Perform host and service scans on the target system to
identify running services
 Attention points
 OWASP Top 10 vulnerabilities (SQLi, XSS, …)
 Running services and version
 Infrastructure vulnerability scanning
Pentest iOS Application
 Insecure Storage
 Why application needs to store data
▪ Ease of use for user
▪ Popularity
▪ Activity with single click
▪ Decrease transaction time
▪ 9 out of 10 applications have this vulnerability
 How attacker can gain access
▪ Wifi
▪ Default password after jail breaking (alpine)
▪ Physical Theft
▪ Temporary access to device
▪ Backup File
 Insecure Storage
 Local Data Storage
▪ Plist and XML files
▪ NSuserDefaults
▪ Class provides a programmatic interface for interacting with default system
▪ Keep information in plist file
▪ SQLite data files
▪ Core Data Services
▪ Object Model, Relational Database
▪ SQLite Manage
▪ Table prefixed “z”
▪ Keychain
 Enumerate sensitive information from local files
 Wordpress iOS App (.plist) stored user & pass
 SQL Injection in Local Database
 Most Mobile platforms uses SQLite as database to store
information on the device
 Using any SQLite Database Browser, it is possible to access
database logs which has queries and other sensitive database
information
 In case application is not filtering input, SQL Injection on
local database is possible
 a” or “a”=“a
 Bad Code
NSString *uid = [myHTTPConnection getUID];
NSString *statement = [NSString StringWithFormat : @”SELECT username FROM users
where uid = ‘%@’”, uid];
const char *sql = [statement UTF8String];
 Good Code
Const char *sql = “SELECT username FROM users where uid = ?”;
sqlite3_prepare_v2(db, sql, -1, &selectUid, NULL);
Sqlite3_bind_int(selectUid, 1, uid);
int status = sqlite3_step(selectUid);
 Buffer Overflow
 When the input data is longer
than the buffer size, if it is accepted,
it will overwrite other data in memory.
 No protection by default in C,
Objective-C and C++
 Decrypt Application and find hardcoded secrets
 Applications from the AppStore is encrypted and Signed
 Decrypt Application and find hardcoded secrets
 Clutch
▪ Used for iOS application decryption
▪ Can be run from the command line
 Decrypt Application and find hardcoded secrets
 Runtime Analysis with GDB
▪ Use clutch
▪ View classdump-z output
▪ Set breakpoint
▪ Analyze objc_msgsend
▪ Find passcode
▪ Evade checks
 https://vimeo.com/66617415
 Poor or no encryption during transit
 Traffic over HTTP
 Token passing
 Device ID over poor channel
 UDID Privacy concerns (Can be used to track user)
 BurpSuite Proxy
 Apps communicate with backend web services
 OWASP Top 10 auditing
 Most communication using XML
 MitM and inject bad XML
 UIWebviews (Used to embed web content in app)
 Execute JavaScript (XSS)
 Fuzz data sent/received
 Client Software
 Found backend path in Localizable.strings
 Server-Side Infrastructure
 Access to port 8080 (Apache Tomcat)
 Logged in with default tomcat username and password
 Upload Malicious JSP code into webserver (Bypass Symantec)
 Access to configuration file that contain database credentials
 OWNed !! Database server
 Localizable.strings
 Logged in with Default Tomcat credentials
 Upload Malicious JSP code
 Backend Compromised
 Database Compromised
Pentest Android Application
 Local Data Storage flaws
 Weak encoding/encryption
 Insecure Storage
 Reverse Engineering
▪ APKtool to decode resources
▪ Convert the .apk file into .zip
▪ Extract the zipped file, Found classes.dex
▪ Dex2jar for convert .dex to .jar
▪ Using JD GUI to open JAR file and review source code
 Insecure Storage
 Reverse Engineering
 Insecure Storage
 Reverse Engineering
 BurpSuite Proxy
 Insecure Logging
 Identity Decloaking
 Apps communicate with backend web services
 OWASP Top 10 auditing
 Fuzz data sent/received
 Client Software
 Found backend path from Reverse Engineering
 Found FTP username and password
 Communication Channel
 Found Mail’s credentials
 Server-Side Infrastructure
 Access FTP Server
 Access Terminal Service
 Logged in with FTP credential
 PWNed !! Backend server
 Compromised internal server
 Reverse Engineering
 Logged in with FTP credential
 100 porn images found !!
 Burp Proxy
 Access Mail
 Backend Compromised
 Authors: ZeQ3uL and diF
 http://www.exploit-db.com/papers/26620/
Local Storage Internet
Sniff Traffic

More Related Content

PDF
Pentesting Mobile Applications (Prashant Verma)
PPTX
Android pen test basics
PPTX
Pentesting Android Applications
PPTX
Pentesting Android Apps
PDF
Security testing in mobile applications
PDF
Hacking android apps by srini0x00
PDF
Andriod Pentesting and Malware Analysis
PPT
Mobile Application Security – Effective methodology, efficient testing!
Pentesting Mobile Applications (Prashant Verma)
Android pen test basics
Pentesting Android Applications
Pentesting Android Apps
Security testing in mobile applications
Hacking android apps by srini0x00
Andriod Pentesting and Malware Analysis
Mobile Application Security – Effective methodology, efficient testing!

What's hot (20)

PDF
Android Security & Penetration Testing
PPTX
Android Application Penetration Testing - Mohammed Adam
PPTX
[Wroclaw #1] Android Security Workshop
PPTX
Mobile application security
PPTX
Penetrating Android Aapplications
PDF
My Null Android Penetration Session
PDF
2015.04.24 Updated > Android Security Development - Part 1: App Development
PDF
Hacking your Android (slides)
PPTX
Android Security
PPTX
G4H Webcast: Automated Security Analysis of Mobile Applications with Mobile S...
PDF
Sperasoft talks: Android Security Threats
PDF
Android Security Development
PPTX
Android security
PPTX
Automated Security Analysis of Android & iOS Applications with Mobile Securit...
PPTX
Abusing Exploiting and Pwning with Firefox Addons
PDF
Testing Android Security Codemotion Amsterdam edition
PPTX
Android Hacking + Pentesting
PDF
Android Security - Common Security Pitfalls in Android Applications
PDF
Hacking Android [MUC:SEC 20.05.2015]
PDF
Mobile Defense-in-Dev (Depth)
Android Security & Penetration Testing
Android Application Penetration Testing - Mohammed Adam
[Wroclaw #1] Android Security Workshop
Mobile application security
Penetrating Android Aapplications
My Null Android Penetration Session
2015.04.24 Updated > Android Security Development - Part 1: App Development
Hacking your Android (slides)
Android Security
G4H Webcast: Automated Security Analysis of Mobile Applications with Mobile S...
Sperasoft talks: Android Security Threats
Android Security Development
Android security
Automated Security Analysis of Android & iOS Applications with Mobile Securit...
Abusing Exploiting and Pwning with Firefox Addons
Testing Android Security Codemotion Amsterdam edition
Android Hacking + Pentesting
Android Security - Common Security Pitfalls in Android Applications
Hacking Android [MUC:SEC 20.05.2015]
Mobile Defense-in-Dev (Depth)
Ad

Viewers also liked (20)

PPTX
CDIC 2013-Mobile Application Pentest Workshop
PPTX
Pentest Apocalypse - SANSFIRE 2016 Edition
PDF
Beyond the Pentest: How C2, Internal Pivoting, and Data Exfiltration Show Tru...
PPTX
PTES: PenTest Execution Standard
PDF
Bringing SDR to the pentest community - BlackHat USA 2014
PDF
Security Testing Mobile Applications
PDF
Mobile hacking, pentest, and malware
PDF
Internal Pentest: from z3r0 to h3r0
PDF
Pentest with Metasploit
PPT
iOS Hacking: Advanced Pentest & Forensic Techniques
PDF
Reference Projects KyotoCooling V4 March 2010
PDF
Predstavljanje poslovanja - press konferencija 15.06.12
PDF
แบบนำเสนอผลงานวิชาการ
PPTX
PDF
ความสัมพันธ์ทางเศรษฐกิจ
PPT
Digit Roman
PPT
TEMA2AVocabulary
PDF
PDF
Manual de selección de medicamentos Minsal Chile 2010
CDIC 2013-Mobile Application Pentest Workshop
Pentest Apocalypse - SANSFIRE 2016 Edition
Beyond the Pentest: How C2, Internal Pivoting, and Data Exfiltration Show Tru...
PTES: PenTest Execution Standard
Bringing SDR to the pentest community - BlackHat USA 2014
Security Testing Mobile Applications
Mobile hacking, pentest, and malware
Internal Pentest: from z3r0 to h3r0
Pentest with Metasploit
iOS Hacking: Advanced Pentest & Forensic Techniques
Reference Projects KyotoCooling V4 March 2010
Predstavljanje poslovanja - press konferencija 15.06.12
แบบนำเสนอผลงานวิชาการ
ความสัมพันธ์ทางเศรษฐกิจ
Digit Roman
TEMA2AVocabulary
Manual de selección de medicamentos Minsal Chile 2010
Ad

Similar to Mobile Application Pentest [Fast-Track] (20)

PDF
Smart Bombs: Mobile Vulnerability and Exploitation
PPT
Mobile code mining for discovery and exploits nullcongoa2013
PPTX
Hackers versus Developers and Secure Web Programming
PPTX
Vulnerabilities in modern web applications
PDF
Common Web Application Attacks
PPTX
6 - Web Application Security.pptx
PDF
Danger! Danger! Your Mobile Applications Are Not Secure
PPTX
SecTor '09 - When Web 2.0 Attacks!
PPTX
Security Testing Training With Examples
PDF
Smart Bombs: Mobile Vulnerability and Exploitation
PDF
Application security 101
PPTX
State of the information security nation
PPTX
Secure Android Development
PPTX
How to Test for The OWASP Top Ten
PPT
Security Testing for Mobile and Web Apps
PDF
Securing Your Mobile Applications
PDF
Introduction to Mobile Application Security - Techcity 2015 (Vilnius)
PDF
OWASPTop 10
PPTX
Security testing for web developers
Smart Bombs: Mobile Vulnerability and Exploitation
Mobile code mining for discovery and exploits nullcongoa2013
Hackers versus Developers and Secure Web Programming
Vulnerabilities in modern web applications
Common Web Application Attacks
6 - Web Application Security.pptx
Danger! Danger! Your Mobile Applications Are Not Secure
SecTor '09 - When Web 2.0 Attacks!
Security Testing Training With Examples
Smart Bombs: Mobile Vulnerability and Exploitation
Application security 101
State of the information security nation
Secure Android Development
How to Test for The OWASP Top Ten
Security Testing for Mobile and Web Apps
Securing Your Mobile Applications
Introduction to Mobile Application Security - Techcity 2015 (Vilnius)
OWASPTop 10
Security testing for web developers

More from Prathan Phongthiproek (20)

PDF
The CARzyPire - Another Red Team Operation
PDF
Cyber Kill Chain: Web Application Exploitation
PDF
Mobile App Hacking In A Nutshell
PDF
Jump-Start The MASVS
PDF
OWASP Mobile Top 10 Deep-Dive
PDF
The Hookshot: Runtime Exploitation
PDF
Understanding ransomware
PDF
OWASP Day - OWASP Day - Lets secure!
PDF
Don't Trust, And Verify - Mobile Application Attacks
PDF
Owasp Top 10 Mobile Risks
PDF
Point-Of-Sale Hacking - 2600Thailand#20
PDF
OWASP Thailand-Beyond the Penetration Testing
PPTX
Hack and Slash: Secure Coding
PDF
Web Application Firewall: Suckseed or Succeed
PDF
Layer8 exploitation: Lock'n Load Target
PDF
Advanced Malware Analysis
PDF
Tisa mobile forensic
PDF
Tisa-Social Network and Mobile Security
PDF
Tisa social and mobile security
PDF
Operation outbreak
The CARzyPire - Another Red Team Operation
Cyber Kill Chain: Web Application Exploitation
Mobile App Hacking In A Nutshell
Jump-Start The MASVS
OWASP Mobile Top 10 Deep-Dive
The Hookshot: Runtime Exploitation
Understanding ransomware
OWASP Day - OWASP Day - Lets secure!
Don't Trust, And Verify - Mobile Application Attacks
Owasp Top 10 Mobile Risks
Point-Of-Sale Hacking - 2600Thailand#20
OWASP Thailand-Beyond the Penetration Testing
Hack and Slash: Secure Coding
Web Application Firewall: Suckseed or Succeed
Layer8 exploitation: Lock'n Load Target
Advanced Malware Analysis
Tisa mobile forensic
Tisa-Social Network and Mobile Security
Tisa social and mobile security
Operation outbreak

Recently uploaded (20)

PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Tartificialntelligence_presentation.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
project resource management chapter-09.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
Approach and Philosophy of On baking technology
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Mushroom cultivation and it's methods.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
Assigned Numbers - 2025 - Bluetooth® Document
Tartificialntelligence_presentation.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
DP Operators-handbook-extract for the Mautical Institute
WOOl fibre morphology and structure.pdf for textiles
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
project resource management chapter-09.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
cloud_computing_Infrastucture_as_cloud_p
Unlocking AI with Model Context Protocol (MCP)
Zenith AI: Advanced Artificial Intelligence
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Approach and Philosophy of On baking technology
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
A comparative study of natural language inference in Swahili using monolingua...
Mushroom cultivation and it's methods.pdf
Programs and apps: productivity, graphics, security and other tools

Mobile Application Pentest [Fast-Track]

  • 2.  Just Mobile Phone  Phone calls  Sending text message or MMS  Alarm clock  Calculator  Listen music  Edge for Surf internet !!
  • 3.  3G, 4G and WIFI support on Mobile network  Became more intelligent – Smart Phone  Sending email  Surf internet  Check-on for flights  Online Banking transactions  Social Network (Facebook, Twitter, Instagram, Etc)
  • 4.  Companies started creating mobile applications to offer services to clients  Storing and synchronizing data files in the cloud  Participating in social network sites  As the data that stored, processed and transferred can often be considered sensitive.
  • 6.  Client Software on Mobile Device  Communications Channel  Server Side Infrastructure Server Side Infrastructure Comm. Channel Client Software
  • 7. Mobile Phone Internet Application Server Client Software Communication Channel Server Side Infrastructure
  • 8.  Packages are typically downloaded from an AppStore, Google Play or provided via Company website  Testing requires a device that is rooted or jailbroken for access to all files and folders on the local file system  Be able to decompiled, tampered or reverse engineered
  • 9.  Attention points  Files on the local file system  Application authentication & authorization  Error Handling & Session Management  Business logic  Decompiling and Analyzing
  • 10.  Channel between the client and the server (HTTPs, EDGE, 3G)  Testing with HTTP Proxy (Burp, ZAP) to intercept and manipulate alter traffic  If the application does not use the HTTP protocol, can use transparent TCP and UDP proxy like Mallory
  • 11.  Attention points  Sniff sensitive information  Replay attack vulnerabilities  Secure transfer of sensitive information
  • 12.  The attack vectors for the web servers behind a mobile application is similar to those use for regular websites  Perform host and service scans on the target system to identify running services
  • 13.  Attention points  OWASP Top 10 vulnerabilities (SQLi, XSS, …)  Running services and version  Infrastructure vulnerability scanning
  • 15.  Insecure Storage  Why application needs to store data ▪ Ease of use for user ▪ Popularity ▪ Activity with single click ▪ Decrease transaction time ▪ 9 out of 10 applications have this vulnerability  How attacker can gain access ▪ Wifi ▪ Default password after jail breaking (alpine) ▪ Physical Theft ▪ Temporary access to device ▪ Backup File
  • 16.  Insecure Storage  Local Data Storage ▪ Plist and XML files ▪ NSuserDefaults ▪ Class provides a programmatic interface for interacting with default system ▪ Keep information in plist file ▪ SQLite data files ▪ Core Data Services ▪ Object Model, Relational Database ▪ SQLite Manage ▪ Table prefixed “z” ▪ Keychain
  • 17.  Enumerate sensitive information from local files
  • 18.  Wordpress iOS App (.plist) stored user & pass
  • 19.  SQL Injection in Local Database  Most Mobile platforms uses SQLite as database to store information on the device  Using any SQLite Database Browser, it is possible to access database logs which has queries and other sensitive database information  In case application is not filtering input, SQL Injection on local database is possible
  • 20.  a” or “a”=“a
  • 21.  Bad Code NSString *uid = [myHTTPConnection getUID]; NSString *statement = [NSString StringWithFormat : @”SELECT username FROM users where uid = ‘%@’”, uid]; const char *sql = [statement UTF8String];  Good Code Const char *sql = “SELECT username FROM users where uid = ?”; sqlite3_prepare_v2(db, sql, -1, &selectUid, NULL); Sqlite3_bind_int(selectUid, 1, uid); int status = sqlite3_step(selectUid);
  • 22.  Buffer Overflow  When the input data is longer than the buffer size, if it is accepted, it will overwrite other data in memory.  No protection by default in C, Objective-C and C++
  • 23.  Decrypt Application and find hardcoded secrets  Applications from the AppStore is encrypted and Signed
  • 24.  Decrypt Application and find hardcoded secrets  Clutch ▪ Used for iOS application decryption ▪ Can be run from the command line
  • 25.  Decrypt Application and find hardcoded secrets  Runtime Analysis with GDB ▪ Use clutch ▪ View classdump-z output ▪ Set breakpoint ▪ Analyze objc_msgsend ▪ Find passcode ▪ Evade checks  https://vimeo.com/66617415
  • 26.  Poor or no encryption during transit  Traffic over HTTP  Token passing  Device ID over poor channel  UDID Privacy concerns (Can be used to track user)
  • 28.  Apps communicate with backend web services  OWASP Top 10 auditing  Most communication using XML  MitM and inject bad XML  UIWebviews (Used to embed web content in app)  Execute JavaScript (XSS)  Fuzz data sent/received
  • 29.  Client Software  Found backend path in Localizable.strings  Server-Side Infrastructure  Access to port 8080 (Apache Tomcat)  Logged in with default tomcat username and password  Upload Malicious JSP code into webserver (Bypass Symantec)  Access to configuration file that contain database credentials  OWNed !! Database server
  • 31.  Logged in with Default Tomcat credentials
  • 36.  Local Data Storage flaws
  • 38.  Insecure Storage  Reverse Engineering ▪ APKtool to decode resources ▪ Convert the .apk file into .zip ▪ Extract the zipped file, Found classes.dex ▪ Dex2jar for convert .dex to .jar ▪ Using JD GUI to open JAR file and review source code
  • 39.  Insecure Storage  Reverse Engineering
  • 40.  Insecure Storage  Reverse Engineering
  • 44.  Apps communicate with backend web services  OWASP Top 10 auditing  Fuzz data sent/received
  • 45.  Client Software  Found backend path from Reverse Engineering  Found FTP username and password  Communication Channel  Found Mail’s credentials  Server-Side Infrastructure  Access FTP Server  Access Terminal Service  Logged in with FTP credential  PWNed !! Backend server  Compromised internal server
  • 47.  Logged in with FTP credential
  • 48.  100 porn images found !!
  • 52.  Authors: ZeQ3uL and diF  http://www.exploit-db.com/papers/26620/ Local Storage Internet Sniff Traffic