hacking exposed 7 network security secrets & solutions chapter 11 mobile hacking 1

15
Hacking Exposed 7 Network Security Secrets & Solutions Chapter 11 Mobile Hacking 1

Upload: allen-gibbs

Post on 24-Dec-2015

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Hacking Exposed 7 Network Security Secrets & Solutions Chapter 11 Mobile Hacking 1

1

Hacking Exposed 7Network Security Secrets & Solutions

Chapter 11 Mobile Hacking

Page 2: Hacking Exposed 7 Network Security Secrets & Solutions Chapter 11 Mobile Hacking 1

2

Outline

• Hacking Android– Android fundamentals– Hacking your Android– Hacking other’s Android

• Hacking iOS– How secure is iOS– Hacking your iOS– Hacking other’s iOS

Page 3: Hacking Exposed 7 Network Security Secrets & Solutions Chapter 11 Mobile Hacking 1

3

Hacking AndroidAndroid Fundamentals (1/2)

• Android architecture– ARM cross-compiled Linux kernel– Native libraries– Android runtime (including Dalvik virtual machine)– Application framework– Applications

• Software Development Kit (SDK)– Android Emulator: prototype, develop, and test Android applications

without using a physical device– Android Debug Bridge (ADB):

• a command-line tool for communicating with an emulator or a physical device

• execution of native apps

– Dalvik Debug Monitor Server (DDMS): • obtain log information through logcat• send simulated location data, SMS, and phone calls• provide memory management information

Page 4: Hacking Exposed 7 Network Security Secrets & Solutions Chapter 11 Mobile Hacking 1

4

Hacking Your AndroidAndroid Fundamentals (2/2)

Page 5: Hacking Exposed 7 Network Security Secrets & Solutions Chapter 11 Mobile Hacking 1

5

Hacking Your AndroidHacking Your Android

• Rooting “your” Android to get administrative privileges– Full control of the device– The device may be “bricked”

• Android Rooting Tools: SuperOne Click, Z4Root, GingerBreak

• Steps for rooting a Kindle Fire– Enable installation of applications from unknown sources– Install the Android SDK– Add commends in adb_usb.in and android_winusb.inf – Connect Kindle Fire with PC through ADB– Download rooting files and execute them

Page 6: Hacking Exposed 7 Network Security Secrets & Solutions Chapter 11 Mobile Hacking 1

6

Hacking Your AndroidApps for Rooted Android Devices

• Superuser: control which applications can execute with root privileges

• ROM Manager: install a custom ROM• Market Enabler: spoof your location and carrier network to the

Android market• ConnectBot: execute shell commands remotely• Screenshot: obtain device screenshots• ES File Manager: copy, paste, cut, create, delete, and rename

system files• SetCPU: set the CPU clock• Juice Defender: save power and extend battery life by managing

hardware components

Page 7: Hacking Exposed 7 Network Security Secrets & Solutions Chapter 11 Mobile Hacking 1

7

Hacking Your AndroidNative Apps on Android

• BusyBox: a set of UNIX tools that allows you to execute useful commands

• Tcpdump: capture and display packets that are transmitted over a network

• Nmap: discover hardware and software on a network to identify specific details of the host operating system, open ports, DNS names, and MAC addresses,

• Ncat: read and write data across networks from the command line for making various remote network connections

Page 8: Hacking Exposed 7 Network Security Secrets & Solutions Chapter 11 Mobile Hacking 1

8

Hacking Your AndroidTrojan Apps

• A malicious program that disguises legitimate apps by using the same icon or name

• Reengineer Android applications– Manifest.xml: an encoded XML file that defines essential information

about the application to the Android– Classes.dex: the Dalvik executable where the compiled code resides

• Tools for Modify an app– apktool: unzip and repack the Android application (apk) file– SignApk: verify the repacked file– Steps

• Use apktool to unzip an apk file• Modify the application name in Mainifest.xml via any editor tool (e.g.

notepad)• Change icons in the unzipped folder/subfolder• User apktool to repack the apk file• Sign the verification via SignApk

Page 9: Hacking Exposed 7 Network Security Secrets & Solutions Chapter 11 Mobile Hacking 1

9

Hacking Other’s Android Vulnerabilities in Android (1/2)

• Remote Shell via WebKit– Get the latest version of Android– Install antivirus software

• Root an Android remotely: RageAgainstTheCage– Get the latest version of Android– Install antivirus software

• Data Stealing through a PHP file– Get the latest version of Android– Install antivirus software – Temporarily disable JavaScript– Use another third-party browser– Unmount the “/sdcard” partition to protect the data stored there

• Remote Shell with Zero Permissions– Check the ratings and user reviews to try to identify suspicious

applications

Page 10: Hacking Exposed 7 Network Security Secrets & Solutions Chapter 11 Mobile Hacking 1

10

Hacking Other’s Android Vulnerabilities in Android (2/2)

• Exploiting Capability Leaks– Check the ratings and user reviews to try to identify suspicious applications

• URL-sourced Malware (Side-load Applications)– Unselect “Unknown Sources” in Settings->Applications

• Skype Data Exposure– Keep applications updated

• Carrier IQ– Use Lookout’s Carrier IQ Detector

• HTC Logger– Get the patch from HTC

• Cracking the Google Wallet PIN– Don’t leave the phone unattended.– Use the traditional Android screen lock– Do not root the device– Install antivirus software

Page 11: Hacking Exposed 7 Network Security Secrets & Solutions Chapter 11 Mobile Hacking 1

11

Hacking iOS How Secure Is iOS?

• Third-party apps are disallowed except under a less privileged user account

• Apps have to be signed by Apple to execute• Code signature verification is at both load time

and runtime• iOS has made great gains in terms of its

security model

Page 12: Hacking Exposed 7 Network Security Secrets & Solutions Chapter 11 Mobile Hacking 1

12

Hacking Your iOS Jailbreaking

• Jailbreak: The process of taking full control of an iOS-based device– Allow for using third-party apps– Expose yourself to a variety of attack vectors

• Boot-based Jailbreak– Obtain the firmware image (IPSW)– Switch the device to Device Firmware Update (DFU) mode– Install the IPSW file image to the device

• Remote Jailbreak– Load a specially crafted PDF into the web browser, Safari,

to take the control of the browser, and then the operating system

Page 13: Hacking Exposed 7 Network Security Secrets & Solutions Chapter 11 Mobile Hacking 1

13

Hacking Other’s iOSVulnerabilities in iOS

• Malware infection: JailbreakMe3.0– Keep your operating system and software updated with the latest patches

• SSH attack: iKee Attacks!– Don’t jailbreak your iPhone– Change the default credentials for a jailbroken device

• The FOCUS 11 Man-in-the-Middle Attack– Update your device and to keep it up to date– Configure the iOS device to “Ask to Join Networks”

• App store malware: Handy Light, InstaStock– Apps should be installed only when absolutely necessary and only from

trustworthy vendors• Vulnerable apps: bundled and third-party (not on the app store)

– Keep your device updated with the latest version of iOS, and keep apps updated to their latest versions

• Physical Access– Ensure that all sensitive data on the device has been encrypted

Page 14: Hacking Exposed 7 Network Security Secrets & Solutions Chapter 11 Mobile Hacking 1

14

Summary• Adapt the behavior and configuration of the device to your

purpose/data after evaluation• Enable device lock• Keep physical control of the device• Enable wipe functionality as appropriate using local or remote

features• Install security software• Leave the device home when traveling

Page 15: Hacking Exposed 7 Network Security Secrets & Solutions Chapter 11 Mobile Hacking 1

15

Homework Ch11Due: in printed hardcopy

(format: problem, solution with explanation, screen dumps)

1. (60 points) Android Debug Tool1) Install Android SDK.2) Connect an Android device or emulator to the host which runs DDMS in the SDK.3) Dump and explain contents output by logcat in DDMS.

2. (40 points) Select an Android device or emulator (e.g. the one in Android SDK, Bluestacks, and so on), root it. It is recommended to root on an Android emulator to avoid turning your phones "bricked".

3. (20 points) Use document management app (e.g. Root Explorer) to add/remove apk files to/from the folder “/system/app/” in a rooted Android device or emulator, and observe what happens.

4. (20 points) Install the app, AdBlock, in an rooted Android device or emulator and explain how it blocks Ads.

5. (20 points) Install a root-dependent app (except AdBlock) to a rooted Android device or emulator and explain why it needs a root system.

6. (20 points) Select one version of iOS, survey how to jailbreak it, and list the steps.