SlideShare a Scribd company logo
Pen-testing iOS
Applications: Static
Analysis
Deepika Kumari
Who Am I ?
 Senior Security Consultant @EY
 Security Researcher
 Bachelor’s Degree from Amity University (2015)
 Certified Red Team professional
Find me on :
https://www.linkedin.com/in/deepika-kumari-740763100/
Blog:
https://medium.com/@deepika-k/
2
Agenda
iOS Platform Overview
Web vs Mobile Testing
Pre-requisites
iOS application Static Analysis
3
iOS Security Architecture
The iOS security architecture consists of several core features:
 Hardware Security (Secure Enclave)
 Secure Boot
 Code Signing
 Security of runtime process
4
Mobile vs Web App
5
Data being stored
on the device
Interaction with the OS
through API’s
Reverse
Engineering
Local
Authentication
(e.g. Fingerprint)
Types of Mobile Apps
 Native App
 Web App
 Hybrid App
6
Web Vs Mobile
Q1. is XSS a vulnerability that is applicable to
mobile apps?
• a) yes but only reflected
• b) yes but only stored
• c) yes reflected and stored
• d) No
Q2: Do you think its possible to make an app
immune to reverse engg attacks?
• a) yes via obfucstion
• b) yes via encryption
• c) Yes by combining above 2
• d) No reverse engg will always win
7
Web vs Mobile
Pentesting
 Be aware of the impact of vulnerabilities in mobile apps
compared to web apps
 You can not blindly map everything you know about
web app testing to mobile apps
 Need to understand the differences and common
pitfalls when implementing mobile apps
8
Creating Pentest
Platform
 Jailbreak using Checkra1n or other jailbreak tools
 Launch Cydia
 Install Open SSH server
 Connect to Wi-Fi and SSH over IP
 Install .ipa file using iMazing or Installer IPA.
 Install tools like Otool(reverse enginnering), cycript
(decrypting ipa file), Frida/Objection (bypassing
SSL pinning and dumping keychain)
 MobSF Scanner
9 Tuesday, February 2, 20XX
iOS Application
Testing Methodology
Static Analysis : using manual techniques and tools such as
MobSF, otool, etc. to look for certain strings, hardcoded
sensitive information, misconfigures cryptography.
Dynamic Analysis : involves runtime exploitation and
hooking different methods objects to bypass certain
scenarios and gain access to sensitive information, testing
dynamic API calls, business logic flows, parameter tampering,
Injection attacks and so on.
10
Finding
Package
Name
11
iOS Application
Static Analysis
• Plist file analysis
• Sensitive Data in UserDefaults
• Looking into Insecure Local
Storage
• Verify Signature (Binary
Protection)
• Runtime Memory Dump
• Dumping Keychain
12
Plist File
Analysis
1. Run the following commands:
• objection -g <app package name> explore
• ios plist cat userInfo.plist
2. Observe that the sensitive information is stored in plain text.
3. Look for Misconfigured ATS
13
Sensitive Data in
NSUserDefaults
1. Run the following commands:
• objection -g <app package name>
explore
• ios nsuserdefaults get
2. Observe that the sensitive information is
stored in the plain-text in DemoValue
parameter.
14
Insecure Local
Data Storage
1. Navigate to the application package folder.
2. Search for database file with .db extension or .sqlite.
3. Open it using sqlite3 database command.
4. From the screenshot above we are able to read the database
table and content.
15
Verify
Signature of
IPA file
1. Use code signer tool to check the signature of the IPA file
• codesign -dv --verbose=4 /Applications/Utilities/Terminal.app
2. Use open source to check the IPA cert validation
• https://gist.github.com/ronsims2/1b7a8b9e15898f9406788988106b
2f78
• python ipa_cert_checker.py /Users/janedoe/Dcouments/Foobar.ipa
16
Run-Time Memory Dump
1. Use FRIDUMP tool to dump sensitive information from the
temporary memory
• Command : https://github.com/Nightbringer21/fridump
• fridump -U Safari - Dump the memory of an iOS device
associated with the Safari app
17
Dumping
Keychain
1. Run the following commands:
• objection -g DVIA-v2 explore
• ios keychain dump
2.Observe that the sensitive information (password) is found
stored in the plain-text (Super Secure Password).
18
References
• https://www.cobalt.io/blog/ios-pentesting-101
• https://payatu.com/blog/kapil.gurav/ios-penetration-testing
• https://book.hacktricks.xyz/mobile-pentesting/ios-
pentesting-checklist
• https://blog.yeswehack.com/yeswerhackers/getting-started-
ios-penetration-testing-part-1/
• https://mobile-security.gitbook.io/mobile-security-testing-
guide/ios-testing-guide/0x06b-basic-security-testing
19
Thank you
Deepika Kumari
deepikakumari778@gmail.com
/in/deepika-kumari-740763100/
20

More Related Content

What's hot

iOS Application Penetration Testing
iOS Application Penetration TestingiOS Application Penetration Testing
iOS Application Penetration Testing
n|u - The Open Security Community
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applications
Niyas Nazar
 
Webinar: Siber Güvenlikte Olgunluk Seviyesini Arttırmak
Webinar: Siber Güvenlikte Olgunluk Seviyesini ArttırmakWebinar: Siber Güvenlikte Olgunluk Seviyesini Arttırmak
Webinar: Siber Güvenlikte Olgunluk Seviyesini Arttırmak
BGA Cyber Security
 
Mobile Application Security Testing (Static Code Analysis) of Android App
Mobile Application Security Testing (Static Code Analysis) of Android AppMobile Application Security Testing (Static Code Analysis) of Android App
Mobile Application Security Testing (Static Code Analysis) of Android App
Abhilash Venkata
 
Azure Penetration Testing
Azure Penetration TestingAzure Penetration Testing
Azure Penetration Testing
Cheah Eng Soon
 
Penetration Testing AWS
Penetration Testing AWSPenetration Testing AWS
Penetration Testing AWS
Sanjeev Kumar Jaiswal
 
Android Pentesting
Android PentestingAndroid Pentesting
Pentesting Rest API's by :- Gaurang Bhatnagar
Pentesting Rest API's by :- Gaurang BhatnagarPentesting Rest API's by :- Gaurang Bhatnagar
Pentesting Rest API's by :- Gaurang Bhatnagar
OWASP Delhi
 
Android pentesting
Android pentestingAndroid pentesting
Android pentesting
Mykhailo Antonishyn
 
Owasp Top 10 A1: Injection
Owasp Top 10 A1: InjectionOwasp Top 10 A1: Injection
Owasp Top 10 A1: Injection
Michael Hendrickx
 
Pentesting iOS Applications
Pentesting iOS ApplicationsPentesting iOS Applications
Pentesting iOS Applications
jasonhaddix
 
Secure Coding 101 - OWASP University of Ottawa Workshop
Secure Coding 101 - OWASP University of Ottawa WorkshopSecure Coding 101 - OWASP University of Ottawa Workshop
Secure Coding 101 - OWASP University of Ottawa Workshop
Paul Ionescu
 
Mobile security
Mobile securityMobile security
Mobile security
priyanka pandey
 
Secure Coding principles by example: Build Security In from the start - Carlo...
Secure Coding principles by example: Build Security In from the start - Carlo...Secure Coding principles by example: Build Security In from the start - Carlo...
Secure Coding principles by example: Build Security In from the start - Carlo...
Codemotion
 
Secure Code Review 101
Secure Code Review 101Secure Code Review 101
Secure Code Review 101
Narudom Roongsiriwong, CISSP
 
Hacking and Defending APIs - Red and Blue make Purple.pdf
Hacking and Defending APIs - Red and Blue make Purple.pdfHacking and Defending APIs - Red and Blue make Purple.pdf
Hacking and Defending APIs - Red and Blue make Purple.pdf
Matt Tesauro
 
Security testing
Security testingSecurity testing
Security testing
Khizra Sammad
 
MobSF: Mobile Security Testing (Android/IoS)
MobSF: Mobile Security Testing (Android/IoS)MobSF: Mobile Security Testing (Android/IoS)
MobSF: Mobile Security Testing (Android/IoS)
Agile Testing Alliance
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020
Moataz Kamel
 

What's hot (20)

iOS Application Penetration Testing
iOS Application Penetration TestingiOS Application Penetration Testing
iOS Application Penetration Testing
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applications
 
Webinar: Siber Güvenlikte Olgunluk Seviyesini Arttırmak
Webinar: Siber Güvenlikte Olgunluk Seviyesini ArttırmakWebinar: Siber Güvenlikte Olgunluk Seviyesini Arttırmak
Webinar: Siber Güvenlikte Olgunluk Seviyesini Arttırmak
 
Mobile Application Security Testing (Static Code Analysis) of Android App
Mobile Application Security Testing (Static Code Analysis) of Android AppMobile Application Security Testing (Static Code Analysis) of Android App
Mobile Application Security Testing (Static Code Analysis) of Android App
 
Azure Penetration Testing
Azure Penetration TestingAzure Penetration Testing
Azure Penetration Testing
 
Penetration Testing AWS
Penetration Testing AWSPenetration Testing AWS
Penetration Testing AWS
 
Android Pentesting
Android PentestingAndroid Pentesting
Android Pentesting
 
Pentesting Rest API's by :- Gaurang Bhatnagar
Pentesting Rest API's by :- Gaurang BhatnagarPentesting Rest API's by :- Gaurang Bhatnagar
Pentesting Rest API's by :- Gaurang Bhatnagar
 
Mobile App Security Testing -2
Mobile App Security Testing -2Mobile App Security Testing -2
Mobile App Security Testing -2
 
Android pentesting
Android pentestingAndroid pentesting
Android pentesting
 
Owasp Top 10 A1: Injection
Owasp Top 10 A1: InjectionOwasp Top 10 A1: Injection
Owasp Top 10 A1: Injection
 
Pentesting iOS Applications
Pentesting iOS ApplicationsPentesting iOS Applications
Pentesting iOS Applications
 
Secure Coding 101 - OWASP University of Ottawa Workshop
Secure Coding 101 - OWASP University of Ottawa WorkshopSecure Coding 101 - OWASP University of Ottawa Workshop
Secure Coding 101 - OWASP University of Ottawa Workshop
 
Mobile security
Mobile securityMobile security
Mobile security
 
Secure Coding principles by example: Build Security In from the start - Carlo...
Secure Coding principles by example: Build Security In from the start - Carlo...Secure Coding principles by example: Build Security In from the start - Carlo...
Secure Coding principles by example: Build Security In from the start - Carlo...
 
Secure Code Review 101
Secure Code Review 101Secure Code Review 101
Secure Code Review 101
 
Hacking and Defending APIs - Red and Blue make Purple.pdf
Hacking and Defending APIs - Red and Blue make Purple.pdfHacking and Defending APIs - Red and Blue make Purple.pdf
Hacking and Defending APIs - Red and Blue make Purple.pdf
 
Security testing
Security testingSecurity testing
Security testing
 
MobSF: Mobile Security Testing (Android/IoS)
MobSF: Mobile Security Testing (Android/IoS)MobSF: Mobile Security Testing (Android/IoS)
MobSF: Mobile Security Testing (Android/IoS)
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020
 

Similar to iOS Application Static Analysis - Deepika Kumari.pptx

Security testing of mobile applications
Security testing of mobile applicationsSecurity testing of mobile applications
Security testing of mobile applicationsGTestClub
 
Hacking and Securing iOS Applications by Satish Bomisstty
Hacking and Securing iOS Applications by Satish BomissttyHacking and Securing iOS Applications by Satish Bomisstty
Hacking and Securing iOS Applications by Satish Bomisstty
ClubHack
 
Hacking and Securing iOS Applications
Hacking and Securing iOS ApplicationsHacking and Securing iOS Applications
Hacking and Securing iOS Applications
n|u - The Open Security Community
 
OWASP for iOS
OWASP for iOSOWASP for iOS
OWASP for iOS
Phineas Huang
 
Security Imeprative for iOS and Android Apps
Security Imeprative for iOS and Android AppsSecurity Imeprative for iOS and Android Apps
Security Imeprative for iOS and Android Apps
Symosis Security (Previously C-Level Security)
 
Hacking and securing ios applications
Hacking and securing ios applicationsHacking and securing ios applications
Hacking and securing ios applicationsSatish b
 
Mobile Application Security Threats through the Eyes of the Attacker
Mobile Application Security Threats through the Eyes of the AttackerMobile Application Security Threats through the Eyes of the Attacker
Mobile Application Security Threats through the Eyes of the Attacker
bugcrowd
 
iOS-Application-Security-iAmPr3m
iOS-Application-Security-iAmPr3miOS-Application-Security-iAmPr3m
iOS-Application-Security-iAmPr3m
Prem Kumar (OSCP)
 
iOS Application Penetation Test
iOS Application Penetation TestiOS Application Penetation Test
iOS Application Penetation TestJongWon Kim
 
Dmitry 'D1g1' Evdokimov - BlackBox analysis of iOS apps
Dmitry 'D1g1' Evdokimov - BlackBox analysis of iOS appsDmitry 'D1g1' Evdokimov - BlackBox analysis of iOS apps
Dmitry 'D1g1' Evdokimov - BlackBox analysis of iOS appsDefconRussia
 
iOS Security - Secure-iOS-Guidelines - Apple | iOS | Swift
iOS Security - Secure-iOS-Guidelines - Apple | iOS | Swift iOS Security - Secure-iOS-Guidelines - Apple | iOS | Swift
iOS Security - Secure-iOS-Guidelines - Apple | iOS | Swift
Bunty Madan
 
Hacking Mobile Apps
Hacking Mobile AppsHacking Mobile Apps
Hacking Mobile Apps
Sophos Benelux
 
iOS Application Security And Static Analysis.pdf
iOS Application Security And Static Analysis.pdfiOS Application Security And Static Analysis.pdf
iOS Application Security And Static Analysis.pdf
Cyber security professional services- Detox techno
 
iOS application (in)security
iOS application (in)securityiOS application (in)security
iOS application (in)security
iphonepentest
 
Is my app secure?
Is my app secure?Is my app secure?
Is my app secure?
Cláudio André
 
Is My App Secure ?
 Is My App Secure ? Is My App Secure ?
Is My App Secure ?
Herman Duarte
 
Mobile App Penetration Testing Bsides312
Mobile App Penetration Testing Bsides312Mobile App Penetration Testing Bsides312
Mobile App Penetration Testing Bsides312
wphillips114
 
Android Security - Common Security Pitfalls in Android Applications
Android Security - Common Security Pitfalls in Android ApplicationsAndroid Security - Common Security Pitfalls in Android Applications
Android Security - Common Security Pitfalls in Android Applications
BlrDroid
 
CactusCon - Practical iOS App Attack and Defense
CactusCon - Practical iOS App Attack and DefenseCactusCon - Practical iOS App Attack and Defense
CactusCon - Practical iOS App Attack and Defense
Seth Law
 

Similar to iOS Application Static Analysis - Deepika Kumari.pptx (20)

Security testing of mobile applications
Security testing of mobile applicationsSecurity testing of mobile applications
Security testing of mobile applications
 
Hacking and Securing iOS Applications by Satish Bomisstty
Hacking and Securing iOS Applications by Satish BomissttyHacking and Securing iOS Applications by Satish Bomisstty
Hacking and Securing iOS Applications by Satish Bomisstty
 
Untitled 1
Untitled 1Untitled 1
Untitled 1
 
Hacking and Securing iOS Applications
Hacking and Securing iOS ApplicationsHacking and Securing iOS Applications
Hacking and Securing iOS Applications
 
OWASP for iOS
OWASP for iOSOWASP for iOS
OWASP for iOS
 
Security Imeprative for iOS and Android Apps
Security Imeprative for iOS and Android AppsSecurity Imeprative for iOS and Android Apps
Security Imeprative for iOS and Android Apps
 
Hacking and securing ios applications
Hacking and securing ios applicationsHacking and securing ios applications
Hacking and securing ios applications
 
Mobile Application Security Threats through the Eyes of the Attacker
Mobile Application Security Threats through the Eyes of the AttackerMobile Application Security Threats through the Eyes of the Attacker
Mobile Application Security Threats through the Eyes of the Attacker
 
iOS-Application-Security-iAmPr3m
iOS-Application-Security-iAmPr3miOS-Application-Security-iAmPr3m
iOS-Application-Security-iAmPr3m
 
iOS Application Penetation Test
iOS Application Penetation TestiOS Application Penetation Test
iOS Application Penetation Test
 
Dmitry 'D1g1' Evdokimov - BlackBox analysis of iOS apps
Dmitry 'D1g1' Evdokimov - BlackBox analysis of iOS appsDmitry 'D1g1' Evdokimov - BlackBox analysis of iOS apps
Dmitry 'D1g1' Evdokimov - BlackBox analysis of iOS apps
 
iOS Security - Secure-iOS-Guidelines - Apple | iOS | Swift
iOS Security - Secure-iOS-Guidelines - Apple | iOS | Swift iOS Security - Secure-iOS-Guidelines - Apple | iOS | Swift
iOS Security - Secure-iOS-Guidelines - Apple | iOS | Swift
 
Hacking Mobile Apps
Hacking Mobile AppsHacking Mobile Apps
Hacking Mobile Apps
 
iOS Application Security And Static Analysis.pdf
iOS Application Security And Static Analysis.pdfiOS Application Security And Static Analysis.pdf
iOS Application Security And Static Analysis.pdf
 
iOS application (in)security
iOS application (in)securityiOS application (in)security
iOS application (in)security
 
Is my app secure?
Is my app secure?Is my app secure?
Is my app secure?
 
Is My App Secure ?
 Is My App Secure ? Is My App Secure ?
Is My App Secure ?
 
Mobile App Penetration Testing Bsides312
Mobile App Penetration Testing Bsides312Mobile App Penetration Testing Bsides312
Mobile App Penetration Testing Bsides312
 
Android Security - Common Security Pitfalls in Android Applications
Android Security - Common Security Pitfalls in Android ApplicationsAndroid Security - Common Security Pitfalls in Android Applications
Android Security - Common Security Pitfalls in Android Applications
 
CactusCon - Practical iOS App Attack and Defense
CactusCon - Practical iOS App Attack and DefenseCactusCon - Practical iOS App Attack and Defense
CactusCon - Practical iOS App Attack and Defense
 

Recently uploaded

DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 

Recently uploaded (20)

DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 

iOS Application Static Analysis - Deepika Kumari.pptx

  • 2. Who Am I ?  Senior Security Consultant @EY  Security Researcher  Bachelor’s Degree from Amity University (2015)  Certified Red Team professional Find me on : https://www.linkedin.com/in/deepika-kumari-740763100/ Blog: https://medium.com/@deepika-k/ 2
  • 3. Agenda iOS Platform Overview Web vs Mobile Testing Pre-requisites iOS application Static Analysis 3
  • 4. iOS Security Architecture The iOS security architecture consists of several core features:  Hardware Security (Secure Enclave)  Secure Boot  Code Signing  Security of runtime process 4
  • 5. Mobile vs Web App 5 Data being stored on the device Interaction with the OS through API’s Reverse Engineering Local Authentication (e.g. Fingerprint)
  • 6. Types of Mobile Apps  Native App  Web App  Hybrid App 6
  • 7. Web Vs Mobile Q1. is XSS a vulnerability that is applicable to mobile apps? • a) yes but only reflected • b) yes but only stored • c) yes reflected and stored • d) No Q2: Do you think its possible to make an app immune to reverse engg attacks? • a) yes via obfucstion • b) yes via encryption • c) Yes by combining above 2 • d) No reverse engg will always win 7
  • 8. Web vs Mobile Pentesting  Be aware of the impact of vulnerabilities in mobile apps compared to web apps  You can not blindly map everything you know about web app testing to mobile apps  Need to understand the differences and common pitfalls when implementing mobile apps 8
  • 9. Creating Pentest Platform  Jailbreak using Checkra1n or other jailbreak tools  Launch Cydia  Install Open SSH server  Connect to Wi-Fi and SSH over IP  Install .ipa file using iMazing or Installer IPA.  Install tools like Otool(reverse enginnering), cycript (decrypting ipa file), Frida/Objection (bypassing SSL pinning and dumping keychain)  MobSF Scanner 9 Tuesday, February 2, 20XX
  • 10. iOS Application Testing Methodology Static Analysis : using manual techniques and tools such as MobSF, otool, etc. to look for certain strings, hardcoded sensitive information, misconfigures cryptography. Dynamic Analysis : involves runtime exploitation and hooking different methods objects to bypass certain scenarios and gain access to sensitive information, testing dynamic API calls, business logic flows, parameter tampering, Injection attacks and so on. 10
  • 12. iOS Application Static Analysis • Plist file analysis • Sensitive Data in UserDefaults • Looking into Insecure Local Storage • Verify Signature (Binary Protection) • Runtime Memory Dump • Dumping Keychain 12
  • 13. Plist File Analysis 1. Run the following commands: • objection -g <app package name> explore • ios plist cat userInfo.plist 2. Observe that the sensitive information is stored in plain text. 3. Look for Misconfigured ATS 13
  • 14. Sensitive Data in NSUserDefaults 1. Run the following commands: • objection -g <app package name> explore • ios nsuserdefaults get 2. Observe that the sensitive information is stored in the plain-text in DemoValue parameter. 14
  • 15. Insecure Local Data Storage 1. Navigate to the application package folder. 2. Search for database file with .db extension or .sqlite. 3. Open it using sqlite3 database command. 4. From the screenshot above we are able to read the database table and content. 15
  • 16. Verify Signature of IPA file 1. Use code signer tool to check the signature of the IPA file • codesign -dv --verbose=4 /Applications/Utilities/Terminal.app 2. Use open source to check the IPA cert validation • https://gist.github.com/ronsims2/1b7a8b9e15898f9406788988106b 2f78 • python ipa_cert_checker.py /Users/janedoe/Dcouments/Foobar.ipa 16
  • 17. Run-Time Memory Dump 1. Use FRIDUMP tool to dump sensitive information from the temporary memory • Command : https://github.com/Nightbringer21/fridump • fridump -U Safari - Dump the memory of an iOS device associated with the Safari app 17
  • 18. Dumping Keychain 1. Run the following commands: • objection -g DVIA-v2 explore • ios keychain dump 2.Observe that the sensitive information (password) is found stored in the plain-text (Super Secure Password). 18
  • 19. References • https://www.cobalt.io/blog/ios-pentesting-101 • https://payatu.com/blog/kapil.gurav/ios-penetration-testing • https://book.hacktricks.xyz/mobile-pentesting/ios- pentesting-checklist • https://blog.yeswehack.com/yeswerhackers/getting-started- ios-penetration-testing-part-1/ • https://mobile-security.gitbook.io/mobile-security-testing- guide/ios-testing-guide/0x06b-basic-security-testing 19