Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on...

18
++ Black Hat Arsenal EU Marco Lancini 3 rd November 2016 Needle

Transcript of Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on...

Page 1: Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on device Support for non-jailbroken devices •Substrate integration •WebView scanner

++

Black Hat Arsenal EU

Marco Lancini

3rd November 2016

Needle

Page 2: Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on device Support for non-jailbroken devices •Substrate integration •WebView scanner

+ A tool for auditing iOS Application Security

+ An open source, modular framework

• streamline the entire process

• acts as a central hub

What is Needle?

Black Hat Arsenal EU

Page 3: Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on device Support for non-jailbroken devices •Substrate integration •WebView scanner

Motivation

Beginners: easy to use

Professionals: save time during assessments

Developers: quickly test their products

Black Hat Arsenal EU

Page 4: Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on device Support for non-jailbroken devices •Substrate integration •WebView scanner

The Architecture

Page 5: Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on device Support for non-jailbroken devices •Substrate integration •WebView scanner

1. Decoupled components

2. Entirely written in Python

Architecture

Black Hat Arsenal EU

Page 6: Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on device Support for non-jailbroken devices •Substrate integration •WebView scanner

UI

Black Hat Arsenal EU

Page 7: Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on device Support for non-jailbroken devices •Substrate integration •WebView scanner

+ Manage connections with the iDevice

• SSH over Wi-Fi

• SSH over USB

+ Device setup, port forwarding, cleanup…

+ Basic commands

• shell, push/pull

+ App management

• metadata, open, decrypt, data protection…

Device Manager

Black Hat Arsenal EU

Page 8: Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on device Support for non-jailbroken devices •Substrate integration •WebView scanner

+ Initialize and manage

all the other components

+ Load/execute modules/jobs

+ Maintain status

• global options, loaded modules, running jobs,

device status…

• pointers to instantiated objects

• constants

Framework Core

Black Hat Arsenal EU

Page 9: Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on device Support for non-jailbroken devices •Substrate integration •WebView scanner

+ Common functionalities

offered both to the Core and APIs

+ Sanitization, logging, printing…

Helpers

Black Hat Arsenal EU

Page 10: Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on device Support for non-jailbroken devices •Substrate integration •WebView scanner

+ The framework core exposes

APIs to interact with the local

and remote OS

+ These wraps common functionalities

• file and data access

• command execution

• networking

+ Speed-up creation of new modules

API

Black Hat Arsenal EU

Page 11: Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on device Support for non-jailbroken devices •Substrate integration •WebView scanner

API

Black Hat Arsenal EU

Page 12: Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on device Support for non-jailbroken devices •Substrate integration •WebView scanner

+ Heart of Needle’s functionalities

+ Collection of python scripts

Modules

Black Hat Arsenal EU

Page 13: Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on device Support for non-jailbroken devices •Substrate integration •WebView scanner

Currently Supported Modules

Black Hat Arsenal EU

Binary

•App Metadata

•Compilation Checks

•Shared Libraries

•Strings

•Class Dump

• Install IPA

•Pull IPA

Storage

•Binary Cookies

•Cache.db Files

•Plist Files

•SQL Files

•Dump Keychain

•Screenshot Caching

•Keyboard Autocomplete

Caching

Page 14: Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on device Support for non-jailbroken devices •Substrate integration •WebView scanner

Currently Supported Modules

Black Hat Arsenal EU

Dynamic

• Jailbreak Detection

•URI Handler

•Heap Dump

•Monitor File changes

•Monitor OS Pasteboard

•Syslog Monitor

•Syslog Watch

Hooking

•Cycript shell

•Frida shell

•Frida trace

•Frida launcher

•Enumerate Classes (script)

•Enumerate Methods (script)

•Enumerate All Methods

(script)

Page 15: Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on device Support for non-jailbroken devices •Substrate integration •WebView scanner

Currently Supported Modules

Black Hat Arsenal EU

Comms

•List Installed Certificates

•Export Installed

Certificates

• Import Installed

Certificates

•Delete Installed Certificates

• Install MitmProxy CA

Certificate

• Intercepting Proxy

Static

•Code Checks

Page 16: Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on device Support for non-jailbroken devices •Substrate integration •WebView scanner

Roadmap

Page 17: Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on device Support for non-jailbroken devices •Substrate integration •WebView scanner

Roadmap

Black Hat Arsenal EU

•Replace all the dependencies

Agent to deploy on device

Support for non-jailbroken devices

•Substrate integration

•WebView scanner

•Hook Swift methods

•URI handlers fuzzer

•Pinning detection/bypass

•Obfuscation detection

New modules

… community based

Page 18: Needle - Black Hat | Home...Black Hat Arsenal EU •Replace all the dependencies Agent to deploy on device Support for non-jailbroken devices •Substrate integration •WebView scanner

Get Needle

Black Hat Arsenal EU

mwr.to/needle

@mwrneedle