Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ Pull a decrypted IPA from a jailbroken device
## Usage

1. Install [frida](http://www.frida.re/) on device

2. `sudo pip install -r requirements.txt --upgrade`
3. Run usbmuxd/iproxy SSH forwarding over USB (Default 2222 -> 22). e.g. `iproxy 2222 22`
4. Run ./dump.py `Display name` or `Bundle identifier`

3. For USB device: Run usbmuxd/iproxy SSH forwarding over USB (Default 2222 -> 22). e.g. `iproxy 2222 22`

For remote device: Run frida-server on device. e.g. `frida-server -l 0.0.0.0`

4. Run ./dump.py `[-R REMOTE_HOST]` `Display name` or `Bundle identifier`

For SSH/SCP make sure you have your public key added to the target device's ~/.ssh/authorized_keys file.

Expand Down
14 changes: 12 additions & 2 deletions dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ def on_changed():
return device


def get_remote_device(host):
device = frida.get_device_manager().add_remote_device(host)
if not device:
print('Remote device not found')
sys.exit(-1)
return device


def generate_ipa(path, display_name):
ipa_filename = display_name + '.ipa'

Expand Down Expand Up @@ -292,6 +300,7 @@ def start_dump(session, ipa_name):
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='frida-ios-dump (by AloneMonkey v2.0)')
parser.add_argument('-l', '--list', dest='list_applications', action='store_true', help='List the installed apps')
parser.add_argument('-R', '--remote', dest='remote_host', help='Connect to remote device')
parser.add_argument('-o', '--output', dest='output_ipa', help='Specify name of the decrypted IPA')
parser.add_argument('-H', '--host', dest='ssh_host', help='Specify SSH hostname')
parser.add_argument('-p', '--port', dest='ssh_port', help='Specify SSH port')
Expand All @@ -305,11 +314,12 @@ def start_dump(session, ipa_name):
exit_code = 0
ssh = None

if not len(sys.argv[1:]):
if (not args.target) and (not args.list_applications):
parser.print_help()
sys.exit(exit_code)

device = get_usb_iphone()
device = get_remote_device(args.remote_host) if args.remote_host else get_usb_iphone()
print('Connect to %s device: %s (id=%s)' % (device.type, device.name, device.id))

if args.list_applications:
list_applications(device)
Expand Down