Closed cobbr closed 7 years ago
Hi @cobbr, can you confirm that the needle agent has been on the foreground (i.e., app visible on screen) for the entire time?
Yes, the agent remained in the foreground. Has the agent been tested on 10.2?
Yep, one of my devices runs 10.2
Hmmm is there any other output I can provide that would help me debug this?
Hi @marco-lancini : now needle freezes or don't what should I call it, while attempting to read the list of app installed on iDevice. attaching the screenshot!
@cobbr: do you have access to Xcode? @kryptoknight13: are you still experiencing issue #137?
yes i am still facing issue #137.
mmmh, @kryptoknight13 the 2 issues are mutually exclusive. If you are facing this issue then the core is waiting an answer from the agent (without receiving a connection closed error). Could you provide more details?
yes @marco-lancini that's what i experienced too. either i get "telnet connection closed" or "freezing of needle". please do let me know what details you would require. PS: these two errors are seen on two different environments with same needle release.
I also get this issue on iOS 9.1. Needle 1.0.1. It hangs on [D] [AGENT] Attempting to reading result
. Only workaround I've found is to do git checkout tags/v0.1.1
and use last working version.
@kryptoknight13, @cobbr: if you can attach the device to Xcode you can start debugging it by analyzing the system log and see what the agent is printing
@marco-lancini is there any specific cpu type needed for needle agent app? I am asking this, as 1st error itself says "
PS: below are logs when i have just launched the needle agent app on device. note: needle framework hasn't started at this point of time.
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Error>: MS:Error: binary does not support this cpu type
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Error>: MS:Error: failure to check DVIAMethodTracer.dylib
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Notice>: MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/Flex.dylib
Mar 21 17:42:32 iPhone6 SpringBoard[97] <Warning>: processing error queue with 1 errors
Mar 21 17:42:32 iPhone6 SpringBoard[97] <Warning>: Error - level severe: internal msg: "couldn't erase extract command file /var/mobile/Documents/Flex/mwr.needle.agent.dump, error code: -1"
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Error>: MS:Error: binary does not support this cpu type
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Error>: MS:Error: failure to check SBSettings.dylib
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Error>: MS:Error: extension does not have filter
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Error>: MS:Error: failure to check SSLKillSwitch.dylib
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Error>: MS:Error: cannot parse PropertyList
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Error>: MS:Error: failure to check SnoopiTweak.dylib
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Notice>: MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/Veency.dylib
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Notice>: MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/WinterBoard.dylib
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector checkoutAccessoryImagesForIcon:location:
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector checkoutAccessoryImageForIcon:location:
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector checkoutBadgeImageForText:
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector generateIconImage:
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: message not found [UIStatusBarTimeItemView contentsImageForStyle:]
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: message not found [UIImage defaultDesktopImage]
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector _defaultDesktopImage
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector resetCurrentImageToWallpaper
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector init
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector setIconImageAlpha:
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector setIconLabelAlpha:
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector initWithDefaultSize
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector setAlpha:
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector updateNumberOfRootIconLists
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector layoutSubviews
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector renderedSizeOfNode:constrainedToWidth:
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector initWithFrame:delegate:
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector _canUseLayerBackedBalloon
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector layoutSubviews
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector addBalloonView:
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector setBackgroundColor:
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector initWithStyle:reuseIdentifier:
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector initWithStyle:reuseIdentifier:
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector initWithStyle:reuseIdentifier:
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector setSeparatorStyle:
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector initWithFrame:style:
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector loadView
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector initWithName:inBundle:
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: nil class argument for selector imageNamed:device:
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: MS:Warning: message not found [_UIAssetManager imageNamed:scale:idiom:subtype:cachingOptions:]
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Notice>: MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/hidspringboard.dylib
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Notice>: MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/introspy.dylib
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Warning>: Introspy - Profiling disabled for mwr.needle.agent
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Notice>: MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/libstatusbar.dylib
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Notice>: CoreFoundation = 1241.110000
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Notice>: Could not match CoreFoundation = 1241.110000
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Notice>: MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/xCon.dylib
Mar 21 17:42:32 iPhone6 NeedleAgent[1166] <Notice>: MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/|tsProtector.dylib
Mar 21 17:42:32 iPhone6 UserEventAgent[123] <Warning>: Tracking mwr.needle.agent (via activity)
@marco-lancini : posting log from xcode again when needle framework is started and needle agent is launched ( in listening condition).
Mar 21 17:48:12 iPhone6 NeedleAgent[1166] <Warning>: Handle Command: OS_VERSION, (
)
I don't get any further log from needle agent in ASL(xcode).
let me know if anything else is needed!
Hi, @cobbr, @kryptoknight13, and @HenryHoggard. Version 1.0.2 has just been released to fix issues #137 and #141:
Please upgrade the Agent from Cydia, and the Core from github. Then let me know if you're still experiencing this issue
This appears to be fixed, thanks @marco-lancini ! However, I now appear to be experiencing another issue. This seems to be identical to #84
[needle] > set DEBUG True
DEBUG => True
[needle] > set VERBOSE True
VERBOSE => True
[needle] > set SETUP_DEVICE True
SETUP_DEVICE => True
[needle] > use binary/info/metadata
[needle][metadata] > run
[*] Checking connection with device...
[+] Already connected to: 127.0.0.1
[D] 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: com.highaltitudehacks.dvia
[*] Retrieving app's metadata...
/private/var/containers/Bundle/Application/801DC9B4-CD5E-4A6B-BD00-B25A15BF0560/DamnVulnerableIOSApp.app/Info.plist
[D] Copying the plist to temp: /private/var/containers/Bundle/Application/801DC9B4-CD5E-4A6B-BD00-B25A15BF0560/DamnVulnerableIOSApp.app/Info.plist -> /root/.needle/tmp/plist
[*] Pulling: /private/var/containers/Bundle/Application/801DC9B4-CD5E-4A6B-BD00-B25A15BF0560/DamnVulnerableIOSApp.app/Info.plist -> /root/.needle/tmp/plist
[D] Downloading: "/private/var/containers/Bundle/Application/801DC9B4-CD5E-4A6B-BD00-B25A15BF0560/DamnVulnerableIOSApp.app/Info.plist" -> /root/.needle/tmp/plist
[D] [LOCAL CMD] Local Command: sshpass -p <removed> scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -P 2222 root@127.0.0.1:"/private/var/containers/Bundle/Application/801DC9B4-CD5E-4A6B-BD00-B25A15BF0560/DamnVulnerableIOSApp.app/Info.plist" /root/.needle/tmp/plist
[D] [REMOTE CMD] Remote Command: lipo -info /private/var/containers/Bundle/Application/801DC9B4-CD5E-4A6B-BD00-B25A15BF0560/DamnVulnerableIOSApp.app/DamnVulnerableIOSApp
------------------------------------------------------------
Traceback (most recent call last):
File "/opt/needle/needle/core/framework/module.py", line 111, in do_run
pre = self.module_pre()
File "/opt/needle/needle/core/framework/module.py", line 147, in module_pre
if self.app_check() is None: return None
File "/opt/needle/needle/core/framework/framework.py", line 665, in app_check
self.APP_METADATA = Framework.APP_METADATA = self.device.app.get_metadata(app)
File "/opt/needle/needle/core/device/app.py", line 19, in get_metadata
return self._retrieve_metadata()
File "/opt/needle/needle/core/device/app.py", line 40, in _retrieve_metadata
architectures = self.__detect_architectures(binary_path)
File "/opt/needle/needle/core/device/app.py", line 111, in __detect_architectures
out = self._device.remote_op.command_blocking(cmd, internal=True)
File "/opt/needle/needle/core/device/remote_operations.py", line 94, in command_blocking
out, err = self._device._exec_command_ssh(cmd, internal)
File "/opt/needle/needle/core/device/device.py", line 128, in _exec_command_ssh
raise Exception(err_str)
Exception: sh: lipo: command not found
------------------------------------------------------------
[!] Exception: sh: lipo: command not found.
Even with SETUP_DEVICE
set to True
, it doesn't appear to be automatically installed. Maybe this is intentional. #84 recommends to install lipo
from: org.coolstar.cctools
, which no longer appears to work.
@cobbr: awesome! :D Regarding your last issue with a dependency, please post it on #84. As soon as @kryptoknight13 and @HenryHoggard confirm this has been fixed, I'll (hopefully) close this issue
@marco-lancini Issue: not able to get any output from modules I have set up as per given installation guide https://github.com/mwrlabs/needle/wiki/Installation-Guide
device : Jailbroken Ipad iOS 9.3.1 32 bit and agent needle v1.0.3 OS : kali Linux
Could someone help
@kryptoknight13 Could you help if you have done it
Hi @dmred1: in order to debug this issue, we require more information.
Ensure VERBOSE
and DEBUG
mode are enabled, this will provide us with more detailed needle logs:
[needle] > set VERBOSE True
VERBOSE => True
[needle] > set DEBUG True
DEBUG => True
Once you have this information, please attach the log files (starting from when you type python needle.py
) to this thread and we can assist further.
@marco-lancini Hi, please look at screenshots
Issue
Upon executing any modules, Needle successfully connects via SSH and to the agent, but never returns any results from the modules.
Expected behaviour
I expect output from the modules.
Actual behaviour
Needle freezes. Ctrl+C works to stop the module, but no output is received. I have tried this on several modules.
Steps to reproduce
needle error logs
No output is ever returned.
Environment
Workstation Operating System
Kali 2 Rolling
Python Version
Python 2.7.13
Python Packages (
pip freeze
)Device iOS Version
iOS 10.2