WithSecureLabs / needle

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

Needle hangs on retrieve app list #134

Closed HenryHoggard closed 7 years ago

HenryHoggard commented 7 years ago

Issue

Expected behaviour

Needle should get list of apps in order to run a module.

Actual behaviour

Needle hangs forever when trying to retrieve list of apps. Could be multiple sshpass sessions messing with needle.

Steps to reproduce

  1. Run any module
  2. set app '' to get needle to search for apps again
  3. Attempt to run another module
  4. Needle hangs, you have to then kill the process.

needle error logs

[needle][keychain_dump_frida] > run
[*] Checking connection with device...
[+] Already connected to: 127.0.0.1
[V] Creating temp folder: /var/root/needle/
[D] [REMOTE CMD] Remote Command: if [ -d /var/root/needle/ ]; then echo "yes"; else echo "no" ; fi
[*] Target app not selected. Launching wizard...
[D] [REMOTE CMD] Remote Command: if [ -f /var/mobile/Library/Caches/com.apple.mobile.installation.plist ]; then echo "yes"; else echo "no" ; fi
[D] [REMOTE CMD] Remote Command: if [ -f /var/mobile/Library/MobileInstallation/LastLaunchServicesMap.plist ]; then echo "yes"; else echo "no" ; fi
[V] Refreshing list of installed apps...
[D] [REMOTE CMD] Remote Command: /bin/su mobile -c /usr/bin/uicache
[D] Copying the plist to temp: /var/mobile/Library/MobileInstallation/LastLaunchServicesMap.plist -> /home/demo/.needle/tmp/plist
[*] Pulling: /var/mobile/Library/MobileInstallation/LastLaunchServicesMap.plist -> /home/demo/.needle/tmp/plist
[D] Downloading: "/var/mobile/Library/MobileInstallation/LastLaunchServicesMap.plist" -> /home/demo/.needle/tmp/plist
[D] [LOCAL CMD] Local Command: sshpass -p "alpine" scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -P 2222 root@127.0.0.1:"/var/mobile/Library/MobileInstallation/LastLaunchServicesMap.plist" /home/demo/.needle/tmp/plist

Environment

Workstation Operating System

Debian

Python Version

2.7

Device iOS Version

9.1

marco-lancini commented 7 years ago

Hi @HenryHoggard, this is gonna be superseded with the release of the native agent. Gonna close this for now