Learning iOS Penetration Testing - Swaroop Yermalkar - E-Book

Learning iOS Penetration Testing E-Book

Swaroop Yermalkar

0,0
34,79 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Secure your iOS applications and uncover hidden vulnerabilities by conducting penetration tests

About This Book

  • Achieve your goal to secure iOS devices and applications with the help of this fast paced manual
  • Find vulnerabilities in your iOS applications and fix them with the help of this example-driven guide
  • Acquire the key skills that will easily help you to perform iOS exploitation and forensics with greater confidence and a stronger understanding

Who This Book Is For

This book is for IT security professionals who want to conduct security testing of applications. This book will give you exposure to diverse tools to perform penetration testing. This book will also appeal to iOS developers who would like to secure their applications, as well as security professionals. It is easy to follow for anyone without experience of iOS pentesting.

What You Will Learn

  • Understand the basics of iOS app development, deployment, security architecture, application signing, application sandboxing, and OWASP TOP 10 for mobile
  • Set up your lab for iOS app pentesting and identify sensitive information stored locally
  • Perform traffic analysis of iOS devices and catch sensitive data being leaked by side channels
  • Modify an application's behavior using runtime analysis
  • Analyze an application's binary for security protection
  • Acquire the knowledge required for exploiting iOS devices
  • Learn the basics of iOS forensics

In Detail

iOS has become one of the most popular mobile operating systems with more than 1.4 million apps available in the iOS App Store. Some security weaknesses in any of these applications or on the system could mean that an attacker can get access to the device and retrieve sensitive information. This book will show you how to conduct a wide range of penetration tests on iOS devices to uncover vulnerabilities and strengthen the system from attacks.

Learning iOS Penetration Testing discusses the common vulnerabilities and security-related shortcomings in an iOS application and operating system, and will teach you to conduct static and dynamic analysis of iOS applications.

This practical guide will help you uncover vulnerabilities in iOS phones and applications. We begin with basics of iOS security and dig deep to learn about traffic analysis, code analysis, and various other techniques. Later, we discuss the various utilities, and the process of reversing and auditing.

Style and approach

This fast-paced and practical guide takes a step-by-step approach to penetration testing with the goal of helping you secure your iOS devices and apps quickly.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 119

Veröffentlichungsjahr: 2016

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Learning iOS Penetration Testing
Credits
Foreword – Why Mobile Security Matters
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Introducing iOS Application Security
Basics of iOS and application development
Developing your first iOS app
Running apps on iDevice
iOS MVC design
iOS security model
iOS secure boot chain
iOS application signing
iOS application sandboxing
OWASP Top 10 Mobile Risks
Weak server-side controls
Insecure data storage
Insufficient transport layer protection
Side channel data leakage
Poor authorization and authentication
Broken cryptography
Client-side injection
Security decisions via untrusted input
Improper session handling
Lack of binary protections
Summary
2. Setting up Lab for iOS App Pentesting
Need for jailbreaking
What is jailbreak?
Types of jailbreaks
Hardware and software requirements
Jailbreaking iDevice
Adding sources to Cydia
Connecting with iDevice
Transferring files to iDevice
Connecting to iDevice using VNC
Installing utilities on iDevice
Installing idb tool
Installing apps on iDevice
Pentesting using iOS Simulator
Summary
3. Identifying the Flaws in Local Storage
Introduction to insecure data storage
Installing third-party applications
Insecure data in the plist files
Insecure storage in the NSUserDefaults class
Insecure storage in SQLite database
SQL injection in iOS applications
Insecure storage in Core Data
Insecure storage in keychain
Summary
4. Traffic Analysis for iOS Application
Intercepting traffic over HTTP
Intercepting traffic over HTTPS
Intercepting traffic of iOS Simulator
Web API attack demo
Bypassing SSL pinning
Summary
5. Sealing up Side Channel Data Leakage
Data leakage via application screenshot
Pasteboard leaking sensitive information
Device logs leaking application sensitive data
Keyboard cache capturing sensitive data
Summary
6. Analyzing iOS Binary Protections
Decrypting unsigned iOS applications
Decrypting signed iOS applications
Analyzing code by reverse engineering
Analyzing iOS binary
Hardening binary against reverse engineering
Summary
7. The iOS App Dynamic Analysis
Understanding Objective-C runtime
Dynamic analysis using Cycript
Runtime analysis using Snoop-it
Dynamic analysis on iOS Simulator
Summary
8. iOS Exploitation
Setting up exploitation lab
Shell bind TCP for iOS
Shell reverse TCP for iOS
Creating iOS backdoor
Converting iDevice to a pentesting device
Summary
9. Introducing iOS Forensics
Basics of iOS forensics
The iPhone hardware
The iOS filesystem
Physical acquisition
Data backup acquisition
iOS forensics tools walkthrough
Elcomsoft iOS Forensic Toolkit (EIFT)
Open source and free tools
Summary
Index

Learning iOS Penetration Testing

Learning iOS Penetration Testing

Copyright © 2016 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: January 2016

Production reference: 1311215

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78588-325-5

www.packtpub.com

Credits

Author

Swaroop Yermalkar

Reviewer

Kenneth R. van Wyk

Commissioning Editor

Wilson D'souza

Acquisition Editor

Aaron Lazar

Content Development Editor

Arshiya Ayaz Umer

Technical Editor

Manthan Raja

Copy Editor

Vibha Shukla

Project Coordinator

Shipra Chawhan

Proofreader

Safis Editing

Indexer

Mariammal Chettiyar

Graphics

Disha Haria

Production Coordinator

Arvindkumar Gupta

Cover Work

Arvindkumar Gupta

Foreword – Why Mobile Security Matters

Information security programs frequently begin with the best of intentions: to coolly analyze risks and then to design, prescribe, and deploy security solutions for developers. The reality is that information security, writ large, usually devolves into a taillight-chasing exercise. These taillights are the vapor trails left by the latest breach or big name vulnerability.

On the Internet, information security has been playing a decades-long game of catch up. Developers innovate and the security teams rush behind to clean up as many vulnerabilities as they can find and solve. Yet, this fact has not clobbered businesses, many of whom are still able to carve out very profitable niches despite the threats on the Internet.

One of the reasons that the catchup game on web security has not proven fatal is the pace of development. When the web began in the mid-1990s, the security pros of that era quickly realized that they needed to ensure that they could separate the good stuff in the enterprise from the bad stuff on the web. To do this, they used a network firewall and set up the famous demilitarized zone (DMZ) pattern. To secure the last mile from the web server to the browser, they used SSL:

 

Software

Security

1995

CGI/PERL

Network firewalls & SSL

1997

JSP, ASP

Network firewalls & SSL

1998

EJB, DCOM

Network firewalls & SSL

1999

SOAP, XML

Network firewalls & SSL

2001

SOA, REST

Network firewalls & SSL

2003

Web 2.0

Network firewalls & SSL

2007

Cloud Computing

Network firewalls & SSL

2009

Mobile

?

The firewalls + SSL pattern was not particularly resilient against threats such as SQL injection or cross-site scripting; however, it proved effective enough to protect the sites in the 1990s. The reason for this is that the websites in the early days were mainly brochureware. Therefore, as the developers continued to innovate dynamic websites with ASP and JSP, along with three-tier architecture, web services, and so on; the security teams had some lag time to revisit, revamp, and refresh their security services.

This is precisely what makes mobile security so dangerous. The early use cases for web apps were brochureware, and interactive databases were considered advanced (Paul Graham, the co-founder of Y Combinator, still dines out on this decades later), the net result here is that the security teams had time to catch up as early deployments were low-risk assets and as higher-risk items were added, there was some lag for the security to innovate.

In the case of mobile, it's the opposite. The early mobile use cases and apps are not low-risk, they are among the highest-risk use cases that you can imagine—mobile banking, connecting to medical devices, mobile payments, and direct access enterprise backends. The knock-on effect here is that the old information security catch up game, where the developers incrementally innovate and the security teams catch up, cannot work any longer. The move to mobile is not the developers and businesses dipping toes in the water, its jumping headlong off the diving board; security needs a fresh approach. Security teams cannot be bystanders, interested observers, or walking behind the elephant with a broom any more.

For mobile, the security teams must be the core engineers, deeply intertwingled with design, development, and deployment of the effective security capabilities.

Gunnar Peterson

Security Architect and blogger

http://1raindrop.typepad.com

About the Author

Swaroop Yermalkar is a leading security researcher and technology evangelist. He is one of the top mobile security researchers worldwide, working with Synack Inc.

He has worked as domain consultant in the Security Practice Group at Persistent Systems Ltd, India, where he was responsible for the security research and assessment of web, network, Android and iOS applications.

He also gives talks and trainings on wireless and mobile app pentesting at various security conferences such as GroundZero, c0c0n, 0x90, DEFCON Lucknow, and GNUnify.

He is acknowledged by Microsoft, Amazon, eBay, Etsy, Dropbox, Evernote, Simple bank App, iFixit, and many more for reporting high severity security issues in their mobile apps.

He is an active member of null, an open security community in India, and a contributor to the regular meet-up and Humla sessions at the Pune Chapter.

He holds various information security certifications, such as SLAE, SMFE, SWSE, CEH, and CHFI. He has written various articles for ClubHACK magazine and also authored a book, An Ethical Guide to Wi-Fi Hacking and Security.

He has organized many eminent programs and was the event head of Hackathon—a national-level hacking competition. He had also worked with the Cyber Crime Cell, Pune, Maharashtra Police in programs such as Cyber Safe Pune. He can be contacted at @swaroopsy on Twitter.

Although the cover of this book only has my name on it, this book would certainly not have been possible without the continuous support by some wonderful people in this world. First of all, a great thanks to the entire team at Packt Publishing, especially, Veena, Aaron, and Arshiya for helping me with the book in every way possible.

I would also like to thank my parents and brother, Swapnil, for the continuous support and encouragement.

My special thanks goes to Ken van Wyk for giving his precious time to review the book and taking it to next level.

I would like to take this opportunity to thank my friends, Ajay Negi and Atul Shedage to motivate me towards bug bounty programs.

Finally, I would like to thank all of the readers for picking this book, it will be great learning and fun while reading of this book.

About the Reviewer

Kenneth R. van Wyk is an internationally recognized information security expert and the author of three popular books, Enterprise Software Security, Secure Coding, and Incident Response. In addition to providing consulting and training services through his company, KRvW Associates, LLC (http://www.KRvW.com), he currently holds the following positions: member of the board of directors of SecAppDev (http://www.secappdev.org) and monthly columnist for Computerworld (http://www.Computerworld.com). Ken is also the project leader of the Open Web Application Security Project (OWASP) iGoat project (https://www.owasp.org/index.php/OWASP_iGoat_Project), and is a distinguished engineering alumnus of Lehigh University (http://www.lehigh.edu/engineering/about/alumni/vanwyk.html).

Ken has 25 years of experience as an IT Security practitioner in commercial, academic, and military sectors. He has held executive and senior technologist positions at Tekmark Group, Para Protect Services Inc., Science Applications International Corporation (SAIC), U.S. Department of Defense, Carnegie Mellon University, and Lehigh University.

At Software Engineering Institute of Carnegie Mellon University, Ken was one of the founders of the Computer Emergency Response Team (CERT®). He holds a mechanical engineering degree from Lehigh University and is a frequent speaker at technical conferences. He has presented tutorials and technical sessions for CSI, ISF, USENIX, FIRST, AusCERT, and others.

Ken is a dual citizen of the EU (England) and USA, and currently holds a U.S. Department of Defense TOP SECRET clearance.

In his spare time, Ken enjoys mountain biking, hiking, jogging, and wine tasting. He is an NRA distinguished expert and pistol instructor.

www.PacktPub.com

Support files, eBooks, discount offers, and more

For support files and downloads related to your book, please visit www.PacktPub.com.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

https://www2.packtpub.com/books/subscription/packtlib

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.

Why subscribe?

Fully searchable across every book published by PacktCopy and paste, print, and bookmark contentOn demand and accessible via a web browser

Free access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.

Preface

Apple exclusively developed a mobile operating system, iOS, for Apple's hardware. It ranks second, after Android, in the market of smartphone operating systems. With the change in user preference and rapidly moving technology, users make use of mobile to handle sensitive information, such as personal, healthcare, financial, and so on, on their phones. Companies allow bring your own device (BYOD) policy, which results in corporate data being present on the phones. Therefore, it has become a necessity to secure information that is present on the device in order to protect users' privacy and also fulfill the compliance requirement mandated by the government.

This book, Learning iOS Penetration Testing, discusses common vulnerabilities and security-related shortcomings in iOS applications. It teaches readers to conduct static and dynamic analysis of iOS applications, iDevice exploitation, and iOS forensics basics.

This book will focus on the practical approach to conduct vulnerability assessment and penetration testing of iOS applications from basic to intermediate level, as per industry standards. It will help mobile application developers and information security professionals to find out the commonly known vulnerabilities and ways to mitigate them.

What this book covers

Chapter 1, Introducing iOS Application Security, teaches readers the basics of an iOS app development process and iOS security model. This chapter also teaches different concepts such as iOS sandboxing, security layers, and so on. It provides an overview of OWASP Top 10 Mobile Risks.

Chapter 2, Setting up Lab for iOS App Pentesting, explains the readers how to bypass security restrictions that prevent us from performing the penetration testing and set up a lab to perform iOS application penetration testing. It will help in learning about hardware and software requirements and setting up all the required utilities for iOS pentesting.

Chapter 3, Identifying the Flaws in Local Storage, covers identifying flaws in an application's local storage. For handheld devices, getting stolen is one of the biggest risks. Applications are not supposed to store any sensitive information locally in plain text/insecure format. We will look at different formats where an application usually stores sensitive data.

Chapter 4, Traffic Analysis for iOS Application