WithSecureLabs / needle

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

No handlers could be found for logger "paramiko.transport" #249

Closed szeghybarna closed 6 years ago

szeghybarna commented 6 years ago

Issue

Expected behaviour

working SSH connection

Actual behaviour

dropped SSH connection

Steps to reproduce

  1. python needle.py -r ../config.txt
  2. use device/dependency_installer
  3. run

needle error logs

Ensure verbose and debug mode are enabled:

python needle.py -r ../config.txt 

             __   _ _______ _______ ______         _______
             | \  | |______ |______ |     \ |      |______
             |  \_| |______ |______ |_____/ |_____ |______

                   Needle v1.3.2 [mwr.to/needle]                  
  [MWR InfoSecurity (@MWRLabs) - Marco Lancini (@LanciniMarco)]   

[*] Loading commands from resource file
[needle] > set DEBUG True
DEBUG => True
[needle] > set VERBOSE True
VERBOSE => True
[needle] > set IP 192.168.88.249
IP => 192.168.88.249
[needle] > set PORT 4444
PORT => 4444
[needle] > EOF
[+] Resource file successfully loaded
[needle] > use device/dependency_installer
[needle][dependency_installer] > run
[D] Setup local output folder: /Users/szeghybarna/.needle/output
[?] Attention! The folder chosen to store local output is not empty: /Users/szeghybarna/.needle/output
[?] Do you want to back it up first?
[?] Y: the content will be archived in a different location, then the folder will be emptied
[?] N: no action will be taken (destination files might be overwritten in case of filename clash)
[y/n]: y
[V] Archiving local output folder: /Users/szeghybarna/.needle/output --> /Users/szeghybarna/.needle/backup/needle-output_2018-05-03-15:26:52
[D] Copying: /Users/szeghybarna/.needle/output -> /Users/szeghybarna/.needle/backup/needle-output_2018-05-03-15:26:52
[D] Deleting: /Users/szeghybarna/.needle/output
[D] Creating local output folder: /Users/szeghybarna/.needle/output
[D] Setting up issues database...
[D] [DB] QUERY: CREATE TABLE IF NOT EXISTS issues (app TEXT, module TEXT, name TEXT, content TEXT, confidence TEXT, outfile TEXT)
[D] Setting up issues database...
[D] [DB] QUERY: CREATE TABLE IF NOT EXISTS issues (app TEXT, module TEXT, name TEXT, content TEXT, confidence TEXT, outfile TEXT)
[*] Checking connection with device...
[V] Connection not present, creating a new instance
[V] [AGENT] Connecting to agent (192.168.88.249:4444)...
[+] [AGENT] Successfully connected to agent (192.168.88.249:4444)...
[D] [AGENT] Executing command: os_version
[V] [SSH] Connecting (192.168.88.249:4444)...
No handlers could be found for logger "paramiko.transport"
[!] Problem establishing connection: Exception - Connection dropped. Please check your connection with the device, and reload the module. SSHException: Error reading SSH protocol banner 
------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/szeghybarna/tmp/needle/needle/core/framework/framework.py", line 641, in _connection_new
    self.device.connect()
  File "/Users/szeghybarna/tmp/needle/needle/core/device/device.py", line 219, in connect
    self.ssh = self._connect_ssh()
  File "/Users/szeghybarna/tmp/needle/needle/core/device/device.py", line 93, in _connect_ssh
    'and reload the module. %s: %s' % (type(e).__name__, e.message))
Exception: Connection dropped. Please check your connection with the device, and reload the module. SSHException: Error reading SSH protocol banner
------------------------------------------------------------
[!] Exception: Connection dropped. Please check your connection with the device, and reload the module. SSHException: Error reading SSH protocol banner
[V] [SSH] Disconnecting...
[V] [AGENT] Disconnecting from agent...

Environment

Needle Version

Workstation Operating System

macOS High Sierra 10.13.4

Python Version

2.7.15

Python Packages (pip freeze)

asn1crypto==0.24.0 bcrypt==3.1.4 biplist==1.0.3 cffi==1.11.5 colorama==0.3.9 cryptography==1.2.1 ecdsa==0.13 enum34==1.1.6 frida==10.8.2 idna==2.6 ipaddress==1.0.22 paramiko==1.15.2 prompt-toolkit==1.0.15 pyasn1==0.4.2 pycparser==2.18 pycrypto==2.6.1 Pygments==2.2.0 PyNaCl==1.2.1 readline==6.2.4.1 six==1.11.0 sshtunnel==0.1.3 wcwidth==0.1.7

Device iOS Version

iOS 9.3.5

mehadhe commented 6 years ago

Hello szeghybarna, Did u found the solution? Experiencing the same problem.... Pls assist on this. Thank you.