SlideShare a Scribd company logo
1 of 31
Download to read offline
Pentesting iPhone & iPad Apps
    #Days 2011 – October 28
                                1
Who are we?



• Annika Meyer
   President, co-founder of ADVTOOLS
• Sebastien Andrivet
   Director, co-founder of ADVTOOLS




                                        2
ADVTOOLS

• Swiss company founded in 2002 in
  Geneva
• Specialized in Information Security
  & Problems Diagnosis
   Pentesting
   Security Audits
   Forensics
   Training


                                        3
Agenda

• Overviews
• Previous researches
• iPhone/iPad application pentest
   Our methodology
• Live demonstrations
• Q&A




                                    4
iOS Application Types

• Web Applications
   HTML + CSS + Javascript
   Run inside Safari
• Native Applications:
   Written in Objective-C (+ C/C++)
   Compiled into CPU code: ARM for actual
    devices, x86 for iOS Simulator
• MonoTouch, Adobe Flash, …
   Written in high-level language
   Compiled into CPU code
                                             5
iOS Applications

• Distributed as “.ipa” files
   in fact simply zip files
• Deployed as “.app” directories
   like on Mac OS X
• Executable code is:
   encrypted with FairPlay DRM (AES)
   signed with Apple’s signature
   decryption with GDB or Crackulous


                                        6
Objective-C

• Objective-C = C + Smalltalk
• Object oriented language
• Created in early 1980s by Stepstone
• Objective-C 2.0 released with Leopard
  (Mac OS X 10.5)
• Can be mixed with C and C++




                                          7
Reverse Engineering

• Not so obvious at first:
    ARM instruction set
    Objective-C & objc_msgSend
    Generated code sometimes strange
    Few (working) scripts and tools
• Finally not so difficult
• Your best friend:
    Hex-Rays IDA Pro (Win, Mac, Linux)


                                          8
Data storage

• plist files (Property lists)
    Used and abused
    Binary (depreciated) or XML
• Sqlite 3
    From time to time
• Keychain
• Binary data files (aka unknown)



                                    9
iTunes & Backups

• Every time you connect your device to
  your computer, a backup is made
• Contains almost all data
• By default, not encrypted.
• To mitigate security problems:




                                          10
Previous researches

•   In general, out of date
•   Often inaccurate
•   But contain interesting information
•   We will give here only some examples




                                           11
Foundstone (McAfee / Intel)




http://www.mcafee.com/us/resources/white-papers/foundstone/wp-pen-
testing-iphone-ipad-apps.pdf                                         12
Nicolas Seriot




http://seriot.ch/resources/talks_papers/iPhonePrivacy.pdf   13
TippingPoint (now HP)




http://dvlabs.tippingpoint.com/blog/2009/03/06/reverse-engineering-iphone-14
appstore-binaries
ARTeam




http://www.accessroot.com/arteam/site/download.php?view.222   15
http://www.accessroot.com/arteam/site/download.php?view.308
Pentesting iOS Applications

•   Step 1: Preparing a device
•   Step 2: Preparing a workstation
•   Step 3: Preparing a network
•   Step 4: Pentesting
•   Step 5: Report




                                      16
Step 1: Preparing a device

• Dedicated iPhone or iPad
• Jailbreaking
    Easier if you jailbreak
    Forbidden by Apple if you are a developer
    Dangerous: jailbreaking is disabling most of the
     security features of iOS
• Install tools



                                                    17
Tools

•   APT 0.7 Strict      •   network-cmds
•   adv-cmds            •   nmap
•   Darwin CC Tools     •   OpenSSH
•   GNU Debugger        •   tcpdump
•   inetutils           •   top
•   lsof                •   wget
•   MobileTerminal
•   netcat

                                           18
iOS Default Passwords

• By default, there are two users:
   root
   mobile
• Passwords = alpine
• Be sure to change them:
   passwd
   passwd mobile




                                     19
Step 2 : Workstation

• Windows:
   OK
• Mac OS X (Lion or Snow Leopard)
   Better
• Linux, FreeBSD, …
   Good luck!
   Possible but you will need a Windows to run
    some tools (virtual machine…)


                                                  20
Some Tools
• Windows:
   SecureCRT or Putty, WinSCP
   plist Editor for Windows
• Mac OS X:
   ssh, SecureCRT, Cyberduck
   XCode
• Windows / Mac:
   SQLite Database Browser
   Apple iPhone Configuration Utility
   Wireshark
   Burp, Webscarab …
   IDA Pro (+ ARM decompiler)

                                         21
Our Tools

• ADVsock2pipe
   Remote network captures (Windows)
• ADVinterceptor 2.0
   Communications interception
   DNS & Web Servers
• Available on GitHub under GPLv3
   https://github.com/ADVTOOLS




                                        22
Step 3: Network

Wifi                     Internet


        Firewall



                   LAN




                                    23
Step 4: Pentesting

• Step A: Install app. from iTunes
• Step B: Reconnaissance (passive)
   B.1: Network capture
   B.2: Interception
   B.3: Artifacts
   B.4: Decrypt + Reverse engineering
• Step C: Attack (active)
   C.1: Interception + tampering


                                         24
B.1: Network Capture




tcpdump
    +
           tcp
  netcat
                                Windows
                 ADVsock2pipe
                                  pipe

                                          25
B.2: Interception
  Proxy method




        Proxy


                Burp Suite Pro
                 WebScarab
                      …          26
B.2: Interception
  ADVinterceptor




      DNS
      HTTP
      HTTPS   ADVinterceptor 2
                (DNS Server,
      etc.     Web Server,…)
                                 27
Inject SSL Certificates

• Root from Burp or ADVinterceptor
• Use Apple iPhone Configuration




                                     28
Demos


                3G+Wifi              Internet
                             2G/3G
      Wifi



             Wifi


                                  SSH Client
VNC Client           Shell       (SecureCRT)



                                           29
      Windows 7 on Mac Book
Q&A




      30
Thank you

To contact us:
annika@advtools.com
sebastien@advtools.com

Twitter:
@AndrivetSeb
@ADVTOOLS


www.advtools.com
                         31

More Related Content

More from Area41

Rob "Mubix" Fuller: Attacker Ghost Stories
Rob "Mubix" Fuller: Attacker Ghost StoriesRob "Mubix" Fuller: Attacker Ghost Stories
Rob "Mubix" Fuller: Attacker Ghost StoriesArea41
 
Halvar Flake: Why Johnny can’t tell if he is compromised
Halvar Flake: Why Johnny can’t tell if he is compromisedHalvar Flake: Why Johnny can’t tell if he is compromised
Halvar Flake: Why Johnny can’t tell if he is compromisedArea41
 
hashdays 2011: Tobias Ospelt - Reversing Android Apps - Hacking and cracking ...
hashdays 2011: Tobias Ospelt - Reversing Android Apps - Hacking and cracking ...hashdays 2011: Tobias Ospelt - Reversing Android Apps - Hacking and cracking ...
hashdays 2011: Tobias Ospelt - Reversing Android Apps - Hacking and cracking ...Area41
 
hashdays 2011: Mikko Hypponen - Keynote
hashdays 2011: Mikko Hypponen - Keynotehashdays 2011: Mikko Hypponen - Keynote
hashdays 2011: Mikko Hypponen - KeynoteArea41
 
hashdays 2011: Felix 'FX' Lindner - Targeted Industrial Control System Attack...
hashdays 2011: Felix 'FX' Lindner - Targeted Industrial Control System Attack...hashdays 2011: Felix 'FX' Lindner - Targeted Industrial Control System Attack...
hashdays 2011: Felix 'FX' Lindner - Targeted Industrial Control System Attack...Area41
 
hashdays 2011: Sniping Slowloris - Taking out DDoS attackers with minimal har...
hashdays 2011: Sniping Slowloris - Taking out DDoS attackers with minimal har...hashdays 2011: Sniping Slowloris - Taking out DDoS attackers with minimal har...
hashdays 2011: Sniping Slowloris - Taking out DDoS attackers with minimal har...Area41
 
hashdays 2011: Christian Bockermann - Protecting Databases with Trees
hashdays 2011: Christian Bockermann - Protecting Databases with Treeshashdays 2011: Christian Bockermann - Protecting Databases with Trees
hashdays 2011: Christian Bockermann - Protecting Databases with TreesArea41
 
hashdays 2011: Ange Albertini - Such a weird processor - messing with x86 opc...
hashdays 2011: Ange Albertini - Such a weird processor - messing with x86 opc...hashdays 2011: Ange Albertini - Such a weird processor - messing with x86 opc...
hashdays 2011: Ange Albertini - Such a weird processor - messing with x86 opc...Area41
 
hashdays 2011: Jean-Philippe Aumasson - Cryptanalysis vs. Reality
hashdays 2011: Jean-Philippe Aumasson - Cryptanalysis vs. Realityhashdays 2011: Jean-Philippe Aumasson - Cryptanalysis vs. Reality
hashdays 2011: Jean-Philippe Aumasson - Cryptanalysis vs. RealityArea41
 

More from Area41 (9)

Rob "Mubix" Fuller: Attacker Ghost Stories
Rob "Mubix" Fuller: Attacker Ghost StoriesRob "Mubix" Fuller: Attacker Ghost Stories
Rob "Mubix" Fuller: Attacker Ghost Stories
 
Halvar Flake: Why Johnny can’t tell if he is compromised
Halvar Flake: Why Johnny can’t tell if he is compromisedHalvar Flake: Why Johnny can’t tell if he is compromised
Halvar Flake: Why Johnny can’t tell if he is compromised
 
hashdays 2011: Tobias Ospelt - Reversing Android Apps - Hacking and cracking ...
hashdays 2011: Tobias Ospelt - Reversing Android Apps - Hacking and cracking ...hashdays 2011: Tobias Ospelt - Reversing Android Apps - Hacking and cracking ...
hashdays 2011: Tobias Ospelt - Reversing Android Apps - Hacking and cracking ...
 
hashdays 2011: Mikko Hypponen - Keynote
hashdays 2011: Mikko Hypponen - Keynotehashdays 2011: Mikko Hypponen - Keynote
hashdays 2011: Mikko Hypponen - Keynote
 
hashdays 2011: Felix 'FX' Lindner - Targeted Industrial Control System Attack...
hashdays 2011: Felix 'FX' Lindner - Targeted Industrial Control System Attack...hashdays 2011: Felix 'FX' Lindner - Targeted Industrial Control System Attack...
hashdays 2011: Felix 'FX' Lindner - Targeted Industrial Control System Attack...
 
hashdays 2011: Sniping Slowloris - Taking out DDoS attackers with minimal har...
hashdays 2011: Sniping Slowloris - Taking out DDoS attackers with minimal har...hashdays 2011: Sniping Slowloris - Taking out DDoS attackers with minimal har...
hashdays 2011: Sniping Slowloris - Taking out DDoS attackers with minimal har...
 
hashdays 2011: Christian Bockermann - Protecting Databases with Trees
hashdays 2011: Christian Bockermann - Protecting Databases with Treeshashdays 2011: Christian Bockermann - Protecting Databases with Trees
hashdays 2011: Christian Bockermann - Protecting Databases with Trees
 
hashdays 2011: Ange Albertini - Such a weird processor - messing with x86 opc...
hashdays 2011: Ange Albertini - Such a weird processor - messing with x86 opc...hashdays 2011: Ange Albertini - Such a weird processor - messing with x86 opc...
hashdays 2011: Ange Albertini - Such a weird processor - messing with x86 opc...
 
hashdays 2011: Jean-Philippe Aumasson - Cryptanalysis vs. Reality
hashdays 2011: Jean-Philippe Aumasson - Cryptanalysis vs. Realityhashdays 2011: Jean-Philippe Aumasson - Cryptanalysis vs. Reality
hashdays 2011: Jean-Philippe Aumasson - Cryptanalysis vs. Reality
 

Recently uploaded

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
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 businesspanagenda
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 

Recently uploaded (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

hashdays 2011: Annika Meyer & Sebastien Andrivet - Pentesting iPhone & iPad Applications

  • 1. Pentesting iPhone & iPad Apps #Days 2011 – October 28 1
  • 2. Who are we? • Annika Meyer  President, co-founder of ADVTOOLS • Sebastien Andrivet  Director, co-founder of ADVTOOLS 2
  • 3. ADVTOOLS • Swiss company founded in 2002 in Geneva • Specialized in Information Security & Problems Diagnosis  Pentesting  Security Audits  Forensics  Training 3
  • 4. Agenda • Overviews • Previous researches • iPhone/iPad application pentest  Our methodology • Live demonstrations • Q&A 4
  • 5. iOS Application Types • Web Applications  HTML + CSS + Javascript  Run inside Safari • Native Applications:  Written in Objective-C (+ C/C++)  Compiled into CPU code: ARM for actual devices, x86 for iOS Simulator • MonoTouch, Adobe Flash, …  Written in high-level language  Compiled into CPU code 5
  • 6. iOS Applications • Distributed as “.ipa” files  in fact simply zip files • Deployed as “.app” directories  like on Mac OS X • Executable code is:  encrypted with FairPlay DRM (AES)  signed with Apple’s signature  decryption with GDB or Crackulous 6
  • 7. Objective-C • Objective-C = C + Smalltalk • Object oriented language • Created in early 1980s by Stepstone • Objective-C 2.0 released with Leopard (Mac OS X 10.5) • Can be mixed with C and C++ 7
  • 8. Reverse Engineering • Not so obvious at first:  ARM instruction set  Objective-C & objc_msgSend  Generated code sometimes strange  Few (working) scripts and tools • Finally not so difficult • Your best friend:  Hex-Rays IDA Pro (Win, Mac, Linux) 8
  • 9. Data storage • plist files (Property lists)  Used and abused  Binary (depreciated) or XML • Sqlite 3  From time to time • Keychain • Binary data files (aka unknown) 9
  • 10. iTunes & Backups • Every time you connect your device to your computer, a backup is made • Contains almost all data • By default, not encrypted. • To mitigate security problems: 10
  • 11. Previous researches • In general, out of date • Often inaccurate • But contain interesting information • We will give here only some examples 11
  • 12. Foundstone (McAfee / Intel) http://www.mcafee.com/us/resources/white-papers/foundstone/wp-pen- testing-iphone-ipad-apps.pdf 12
  • 15. ARTeam http://www.accessroot.com/arteam/site/download.php?view.222 15 http://www.accessroot.com/arteam/site/download.php?view.308
  • 16. Pentesting iOS Applications • Step 1: Preparing a device • Step 2: Preparing a workstation • Step 3: Preparing a network • Step 4: Pentesting • Step 5: Report 16
  • 17. Step 1: Preparing a device • Dedicated iPhone or iPad • Jailbreaking  Easier if you jailbreak  Forbidden by Apple if you are a developer  Dangerous: jailbreaking is disabling most of the security features of iOS • Install tools 17
  • 18. Tools • APT 0.7 Strict • network-cmds • adv-cmds • nmap • Darwin CC Tools • OpenSSH • GNU Debugger • tcpdump • inetutils • top • lsof • wget • MobileTerminal • netcat 18
  • 19. iOS Default Passwords • By default, there are two users:  root  mobile • Passwords = alpine • Be sure to change them:  passwd  passwd mobile 19
  • 20. Step 2 : Workstation • Windows:  OK • Mac OS X (Lion or Snow Leopard)  Better • Linux, FreeBSD, …  Good luck!  Possible but you will need a Windows to run some tools (virtual machine…) 20
  • 21. Some Tools • Windows:  SecureCRT or Putty, WinSCP  plist Editor for Windows • Mac OS X:  ssh, SecureCRT, Cyberduck  XCode • Windows / Mac:  SQLite Database Browser  Apple iPhone Configuration Utility  Wireshark  Burp, Webscarab …  IDA Pro (+ ARM decompiler) 21
  • 22. Our Tools • ADVsock2pipe  Remote network captures (Windows) • ADVinterceptor 2.0  Communications interception  DNS & Web Servers • Available on GitHub under GPLv3  https://github.com/ADVTOOLS 22
  • 23. Step 3: Network Wifi Internet Firewall LAN 23
  • 24. Step 4: Pentesting • Step A: Install app. from iTunes • Step B: Reconnaissance (passive)  B.1: Network capture  B.2: Interception  B.3: Artifacts  B.4: Decrypt + Reverse engineering • Step C: Attack (active)  C.1: Interception + tampering 24
  • 25. B.1: Network Capture tcpdump + tcp netcat Windows ADVsock2pipe pipe 25
  • 26. B.2: Interception Proxy method Proxy Burp Suite Pro WebScarab … 26
  • 27. B.2: Interception ADVinterceptor DNS HTTP HTTPS ADVinterceptor 2 (DNS Server, etc. Web Server,…) 27
  • 28. Inject SSL Certificates • Root from Burp or ADVinterceptor • Use Apple iPhone Configuration 28
  • 29. Demos 3G+Wifi Internet 2G/3G Wifi Wifi SSH Client VNC Client Shell (SecureCRT) 29 Windows 7 on Mac Book
  • 30. Q&A 30
  • 31. Thank you To contact us: annika@advtools.com sebastien@advtools.com Twitter: @AndrivetSeb @ADVTOOLS www.advtools.com 31