WithSecureLabs / needle

The iOS Security Testing Framework
https://mobiletools.mwrinfosecurity.com/
Other
1.34k stars 284 forks source link

Issue with blanks in the app name. #183

Closed florian-eichelberger closed 7 years ago

florian-eichelberger commented 7 years ago

Issue

Expected behaviour

The app should be able to download files correctly e.g. Info.plist

Actual behaviour

The app seems to have some issues with blanks in the name of the app.

Steps to reproduce

  1. start needle agent on device and needle.py on the host
  2. use binary/info/metadata -> run

needle error logs

Ensure verbose and debug mode are enabled:

[needle] > set VERBOSE True
VERBOSE => True
[needle] > set DEBUG True
DEBUG => True

Environment

iOS 9.3.1

Needle Version

Workstation Operating System

Kali Linux

Python Version

Python Packages (pip freeze)

Device iOS Version

iOS 9.3.1

By running the module on an app with a blank in the name, the following thing happens

[*] Pulling: /private/var/containers/Bundle/Application/F54A6AF0-9DFE-4C93-B0EC-6475D3E5ACB7/App%20Name.app/Info.plist -> /home/user/.needle/tmp/plist [!] IOError: [Errno 2] No such file or directory: '/home/user/.needle/tmp/plis

The path is constructed incorrectly as by using the following path, the file can be found.

root# ls -al /private/var/containers/Bundle/Application/F54A6AF0-9DFE-4C93-B0EC-6475D3E5ACB7/App\ Name.app/Info.plist -rw-r--r-- 1 _installd _installd 6400 Jun 2 16:02 /private/var/containers/Bundle/Application/F54A6AF0-9DFE-4C93-B0EC-6475D3E5ACB7/App Name.app/Info.plist

marco-lancini commented 7 years ago

duplicate of #151