SlideShare a Scribd company logo
HACKING & SECURING OF iOS
APPS
-Saurabh Mishra
NSLog (@”About me !”);
 iOS developer >2 yr
 Web api developer
 iOS app pentester
 Security Enthusiast
Rough Agenda (we will digress)
 Introduction to iOS
 Introduction to iOS apps
 Objective C
 Environment & tool setup
 Static Analysis
 Dynamic Analysis
 Secure Coding & Best practices
iOS
 Mobile OS by Apple Inc. (i Operating System ,
2007)
 History
 Architecture of iOS
iOS architecture of Non Jailbroken
device
OS &
preinstalled
Apps
Path
/Application
Root
user
Mobile
user
App
1
App
2
Sandbox for
app1
contains all the
files created or
required by app
Apps from appstore
Path
/var/mobile/containe
r/bundle/application
*The permission architecture
*Sandboxing of iOS apps
Types of iOS Applications
 Web Applications:
 HTML + CSS + JavaScript
 Run inside Safari/Webkit
 Native Applications:
 Written in Objective-C (+ C/C++)
 Compiled into ARM for actual devices, x86 for
iOS Simulator
What does an iOS Application Look
Like?
 iOS Applications:
 In Development with Apple SDK Xcode:
 Distributed as XCode Project Folders
 Compiled and deployed through the app store:
 Compiled as ARM
 Distributed as “.ipa” files
 zip files containing app resources and ARM executable
 Deployed as “.app” directories
 Executable code is:
 encrypted with FairPlay DRM (AES)
 signed with Apple’s signature
Objective C
Objective-C is a superset of C, this means all C
code still applies.
[self doSomethingWithVar:var1];
Environment Setup/Tools
required
Tool List:
 Your Phone:
 Jailbreak
 GDB
 Command Line Knowledge
 Crackulous/appcrack/Clutch
 Class-dump-z
 Cycript
 Your PC:
 Burp
 SQLite Manager
 IDA/Hopper
How do we Test?
Analysis of iOS apps
Static Analysis Dynamic Analysis
Binary
Analysis
Class
dump
Local
Storage
Method
Swizzling
Network
Analysis
Static Analysis
 Hopper disassembler
 Class-dump-z
Demo
Dynamic Analysis
 GDB
 Method sizzling using “Cycript”
Cycript
 Cycript is an implementation of JavaScript that
can interact with Objective-C classes and
objects. One of the most useful functions of
Cycript is its ability to attach directly to a
process, much like gdb, and alter the state of
the running application. With Cycript, you can
manipulate existing objects already in your
application’s memory, or instantiate new objects,
such as new view controller classes or windows.
Demo
Network Analysis
 Proxy setup
Local Storage Analysis
 NSUserdefault
 Sqlite
 CoreData
Hacking & Securing of iOS Apps by Saurabh Mishra
Secure Coding & Best Practices
 Secure coding is about increasing the
complexity demanded for an attack against the
application to succeed. No application can
ever be truly secure. With the right resources
and time, any application, including those
utilizing strong encryption, can be broken.
Precaution not Cure :-P
 Use dummy methods.
 Analyze flow & architecture of code.
 Is Jailbroken?
 Don’t use hardcoded strings (key,outhtoken etc).
 Is debugger attached.
 Handle -
(void)applicationDidEnterBackground:(UIApplicati
on *)application
 Use keychain for sensitive info (key,outhtoken
etc).
 Don’t use plain http web api.
 Always use server side validation for inapp
purchase.
All done ! Can contact me @
 srbmishra91@gmail.com

More Related Content

PDF
Digital Forensics and Incident Response (DFIR) using Docker Containers
PDF
Hacking Tizen: The OS of everything - Whitepaper
PDF
Azure Sphere
PDF
PDF
CNIT 128 2. Analyzing iOS Applications (Part 2)
PPTX
Hacking Tizen : The OS of Everything - Nullcon Goa 2015
PPT
iOS Hacking: Advanced Pentest & Forensic Techniques
PPTX
Frida - Objection Tool Usage
Digital Forensics and Incident Response (DFIR) using Docker Containers
Hacking Tizen: The OS of everything - Whitepaper
Azure Sphere
CNIT 128 2. Analyzing iOS Applications (Part 2)
Hacking Tizen : The OS of Everything - Nullcon Goa 2015
iOS Hacking: Advanced Pentest & Forensic Techniques
Frida - Objection Tool Usage

What's hot (19)

PDF
CNIT 128 7. Attacking Android Applications (Part 2)
PDF
Are you ready for Microsoft Azure Sphere?
PDF
IoT Day - Introducing Azure Sphere
PDF
Creating secure apps using the salesforce mobile sdk
PDF
Is My App Secure ?
PPTX
Help Doctor, my application is an onion!
PDF
Azure Sphere - GAB 2019
PDF
Abusing, Exploiting and Pwning with Firefox Add-ons
PPT
Outsmarting smartphones
PDF
Flare - tech-intro-for-paris-hackathon
PDF
Resin.io overview (2016 July)
PDF
When Encryption is Not Enough...Sumanth Naropanth, Chandra Prakash Gopalaiah ...
PPTX
Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015
PDF
Scaling IoT Deployments: DevOps for the Internet of Things
PPTX
Building Secure IoT Solutions using Azure Sphere
PPTX
Secure and power the intelligent edge with Azure Sphere
PDF
Securing Internet of Things
PDF
Webinar–Mobile Application Hardening Protecting Business Critical Apps
PDF
HITCON Defense Summit 2019 - 從 SAST 談持續式資安測試
CNIT 128 7. Attacking Android Applications (Part 2)
Are you ready for Microsoft Azure Sphere?
IoT Day - Introducing Azure Sphere
Creating secure apps using the salesforce mobile sdk
Is My App Secure ?
Help Doctor, my application is an onion!
Azure Sphere - GAB 2019
Abusing, Exploiting and Pwning with Firefox Add-ons
Outsmarting smartphones
Flare - tech-intro-for-paris-hackathon
Resin.io overview (2016 July)
When Encryption is Not Enough...Sumanth Naropanth, Chandra Prakash Gopalaiah ...
Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015
Scaling IoT Deployments: DevOps for the Internet of Things
Building Secure IoT Solutions using Azure Sphere
Secure and power the intelligent edge with Azure Sphere
Securing Internet of Things
Webinar–Mobile Application Hardening Protecting Business Critical Apps
HITCON Defense Summit 2019 - 從 SAST 談持續式資安測試

Viewers also liked (20)

PDF
DFIR using Docker Containers by Deep Shankar Yadav
PPTX
IoT Security Risks and Challenges
PPTX
RAT - Kill or Get Killed! by Karan Bansal
PPTX
Quantum Computing by Rajeev Chauhan
PPT
Darknets - Introduction & Deanonymization of Tor Users By Hitesh Bhatia
ODP
Hostile Subdomain Takeover by Ankit Prateek
PPTX
OWASP top 10-2013
PDF
Thwarting The Surveillance in Online Communication by Adhokshaj Mishra
PDF
OWASP Top 10 2013
PDF
Global trade-development-week-emea-summit-16pgs-010914
PDF
All consuming news
PDF
Florance shopping
PDF
Oreskylaw
PPTX
Lt+preschool+program+design
PDF
P h technical handbook
PDF
Pop-Up the Ladder and Own a Bar
PDF
Minority business solutions
DOC
Executive summary for eden heights
PDF
United small business
PDF
Repair home
DFIR using Docker Containers by Deep Shankar Yadav
IoT Security Risks and Challenges
RAT - Kill or Get Killed! by Karan Bansal
Quantum Computing by Rajeev Chauhan
Darknets - Introduction & Deanonymization of Tor Users By Hitesh Bhatia
Hostile Subdomain Takeover by Ankit Prateek
OWASP top 10-2013
Thwarting The Surveillance in Online Communication by Adhokshaj Mishra
OWASP Top 10 2013
Global trade-development-week-emea-summit-16pgs-010914
All consuming news
Florance shopping
Oreskylaw
Lt+preschool+program+design
P h technical handbook
Pop-Up the Ladder and Own a Bar
Minority business solutions
Executive summary for eden heights
United small business
Repair home

Similar to Hacking & Securing of iOS Apps by Saurabh Mishra (20)

PPTX
Pentesting iOS Applications
PDF
Null Mumbai Meet_Android Reverse Engineering by Samrat Das
PPT
iOS Client Side Analysis
PDF
MobSecCon 2015 - Dynamic Analysis of Android Apps
PPTX
Top 10 Mobile Hacking Tools – 2025 Edition
PDF
ARTist - A Novel Instrumentation Framework for Reversing and Analyzing Androi...
PPTX
Android Penetration testing - Day 2
PDF
Android Patching & Client-Side CyberSecurity
PDF
PPTX
Null mumbai-Android-Insecure-Data-Storage-Exploitation
PPTX
Nativescript with angular 2
PDF
Android_Malware_IOAsis_2014_Analysis.pdf
PPT
Android Anatomy
PDF
OWASP for iOS
PDF
Null Dubai Humla_Romansh_Yadav_Android_app_pentesting
PPTX
Android village @nullcon 2012
DOCX
Nikesh_CV_Larsen_&_Toubro
PDF
Cara Tepat Menjadi iOS Developer Expert - Gilang Ramadhan
PDF
Hacking and Securing iOS Apps : Part 1
PDF
Digitally Record videos & Track Incidents on IPAD Application
Pentesting iOS Applications
Null Mumbai Meet_Android Reverse Engineering by Samrat Das
iOS Client Side Analysis
MobSecCon 2015 - Dynamic Analysis of Android Apps
Top 10 Mobile Hacking Tools – 2025 Edition
ARTist - A Novel Instrumentation Framework for Reversing and Analyzing Androi...
Android Penetration testing - Day 2
Android Patching & Client-Side CyberSecurity
Null mumbai-Android-Insecure-Data-Storage-Exploitation
Nativescript with angular 2
Android_Malware_IOAsis_2014_Analysis.pdf
Android Anatomy
OWASP for iOS
Null Dubai Humla_Romansh_Yadav_Android_app_pentesting
Android village @nullcon 2012
Nikesh_CV_Larsen_&_Toubro
Cara Tepat Menjadi iOS Developer Expert - Gilang Ramadhan
Hacking and Securing iOS Apps : Part 1
Digitally Record videos & Track Incidents on IPAD Application

More from OWASP Delhi (20)

PDF
Getting Started With Hacking Android & iOS Apps? Tools, Techniques and resources
PDF
Securing dns records from subdomain takeover
PDF
Effective Cyber Security Report Writing
PPTX
Data sniffing over Air Gap
PPTX
UDP Hunter
PDF
Demystifying Container Escapes
PPTX
Automating WAF using Terraform
PPTX
Actionable Threat Intelligence
PDF
Threat hunting 101 by Sandeep Singh
PPTX
Owasp top 10 vulnerabilities
PPTX
Recon with Nmap
PPTX
Securing AWS environments by Ankit Giri
PDF
DMARC Overview
PDF
Cloud assessments by :- Aakash Goel
PDF
Pentesting Rest API's by :- Gaurang Bhatnagar
ODP
Wireless security beyond password cracking by Mohit Ranjan
PDF
IETF's Role and Mandate in Internet Governance by Mohit Batra
PDF
Malicious Hypervisor - Virtualization in Shellcodes by Adhokshaj Mishra
PPTX
ICS Security 101 by Sandeep Singh
PDF
Network discovery - Inside out by Aakash Goel
Getting Started With Hacking Android & iOS Apps? Tools, Techniques and resources
Securing dns records from subdomain takeover
Effective Cyber Security Report Writing
Data sniffing over Air Gap
UDP Hunter
Demystifying Container Escapes
Automating WAF using Terraform
Actionable Threat Intelligence
Threat hunting 101 by Sandeep Singh
Owasp top 10 vulnerabilities
Recon with Nmap
Securing AWS environments by Ankit Giri
DMARC Overview
Cloud assessments by :- Aakash Goel
Pentesting Rest API's by :- Gaurang Bhatnagar
Wireless security beyond password cracking by Mohit Ranjan
IETF's Role and Mandate in Internet Governance by Mohit Batra
Malicious Hypervisor - Virtualization in Shellcodes by Adhokshaj Mishra
ICS Security 101 by Sandeep Singh
Network discovery - Inside out by Aakash Goel

Recently uploaded (20)

PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PPTX
presentation_pfe-universite-molay-seltan.pptx
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PDF
Testing WebRTC applications at scale.pdf
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PPTX
Digital Literacy And Online Safety on internet
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PPTX
artificial intelligence overview of it and more
PPTX
QR Codes Qr codecodecodecodecocodedecodecode
PPTX
Internet___Basics___Styled_ presentation
PPTX
introduction about ICD -10 & ICD-11 ppt.pptx
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
PPTX
Funds Management Learning Material for Beg
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PPTX
international classification of diseases ICD-10 review PPT.pptx
PDF
Paper PDF World Game (s) Great Redesign.pdf
DOCX
Unit-3 cyber security network security of internet system
PDF
Sims 4 Historia para lo sims 4 para jugar
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
presentation_pfe-universite-molay-seltan.pptx
Tenda Login Guide: Access Your Router in 5 Easy Steps
Job_Card_System_Styled_lorem_ipsum_.pptx
Testing WebRTC applications at scale.pdf
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
Unit-1 introduction to cyber security discuss about how to secure a system
Digital Literacy And Online Safety on internet
INTERNET------BASICS-------UPDATED PPT PRESENTATION
artificial intelligence overview of it and more
QR Codes Qr codecodecodecodecocodedecodecode
Internet___Basics___Styled_ presentation
introduction about ICD -10 & ICD-11 ppt.pptx
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
Funds Management Learning Material for Beg
SASE Traffic Flow - ZTNA Connector-1.pdf
international classification of diseases ICD-10 review PPT.pptx
Paper PDF World Game (s) Great Redesign.pdf
Unit-3 cyber security network security of internet system
Sims 4 Historia para lo sims 4 para jugar

Hacking & Securing of iOS Apps by Saurabh Mishra

  • 1. HACKING & SECURING OF iOS APPS -Saurabh Mishra
  • 2. NSLog (@”About me !”);  iOS developer >2 yr  Web api developer  iOS app pentester  Security Enthusiast
  • 3. Rough Agenda (we will digress)  Introduction to iOS  Introduction to iOS apps  Objective C  Environment & tool setup  Static Analysis  Dynamic Analysis  Secure Coding & Best practices
  • 4. iOS  Mobile OS by Apple Inc. (i Operating System , 2007)  History  Architecture of iOS
  • 5. iOS architecture of Non Jailbroken device OS & preinstalled Apps Path /Application Root user Mobile user App 1 App 2 Sandbox for app1 contains all the files created or required by app Apps from appstore Path /var/mobile/containe r/bundle/application *The permission architecture *Sandboxing of iOS apps
  • 6. Types of iOS Applications  Web Applications:  HTML + CSS + JavaScript  Run inside Safari/Webkit  Native Applications:  Written in Objective-C (+ C/C++)  Compiled into ARM for actual devices, x86 for iOS Simulator
  • 7. What does an iOS Application Look Like?  iOS Applications:  In Development with Apple SDK Xcode:  Distributed as XCode Project Folders  Compiled and deployed through the app store:  Compiled as ARM  Distributed as “.ipa” files  zip files containing app resources and ARM executable  Deployed as “.app” directories  Executable code is:  encrypted with FairPlay DRM (AES)  signed with Apple’s signature
  • 8. Objective C Objective-C is a superset of C, this means all C code still applies. [self doSomethingWithVar:var1];
  • 9. Environment Setup/Tools required Tool List:  Your Phone:  Jailbreak  GDB  Command Line Knowledge  Crackulous/appcrack/Clutch  Class-dump-z  Cycript  Your PC:  Burp  SQLite Manager  IDA/Hopper
  • 10. How do we Test? Analysis of iOS apps Static Analysis Dynamic Analysis Binary Analysis Class dump Local Storage Method Swizzling Network Analysis
  • 11. Static Analysis  Hopper disassembler  Class-dump-z
  • 12. Demo
  • 13. Dynamic Analysis  GDB  Method sizzling using “Cycript”
  • 14. Cycript  Cycript is an implementation of JavaScript that can interact with Objective-C classes and objects. One of the most useful functions of Cycript is its ability to attach directly to a process, much like gdb, and alter the state of the running application. With Cycript, you can manipulate existing objects already in your application’s memory, or instantiate new objects, such as new view controller classes or windows.
  • 15. Demo
  • 17. Local Storage Analysis  NSUserdefault  Sqlite  CoreData
  • 19. Secure Coding & Best Practices  Secure coding is about increasing the complexity demanded for an attack against the application to succeed. No application can ever be truly secure. With the right resources and time, any application, including those utilizing strong encryption, can be broken.
  • 20. Precaution not Cure :-P  Use dummy methods.  Analyze flow & architecture of code.  Is Jailbroken?  Don’t use hardcoded strings (key,outhtoken etc).  Is debugger attached.  Handle - (void)applicationDidEnterBackground:(UIApplicati on *)application  Use keychain for sensitive info (key,outhtoken etc).  Don’t use plain http web api.  Always use server side validation for inapp purchase.
  • 21. All done ! Can contact me @  srbmishra91@gmail.com