Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.
This repository was archived by the owner on May 9, 2025. It is now read-only.

Mac&Kali: SSH Connection Dropped. No handlers could be found for logger "paramiko.transport" #274

@akasandra

Description

@akasandra

Issue

Expected behaviour

Should tell me os_version

Actual behaviour

Prints error "Connection dropped", Needle Agent reports "Disconnected" after os_version received

Steps to reproduce

  1. python needle-cli.py -g DEBUG=True -g IP=172.20.10.1 -g PORT=4444 -m binary/info/metadata -m device/agent_client#COMMAND=OS_VERSION

needle error logs

DEBUG => True
IP => 172.20.10.1
PORT => 4444
[+] MODULE => binary/info/metadata
[D] Setup local output folder: /home/noob/.needle/output
[?] Attention! The folder chosen to store local output is not empty: /home/noob/.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: /home/noob/.needle/output --> /home/noob/.needle/backup/needle-output_2019-06-17-11:55:59
[D] Copying: /home/noob/.needle/output -> /home/noob/.needle/backup/needle-output_2019-06-17-11:55:59
[D] Deleting: /home/noob/.needle/output
[D] Creating local output folder: /home/noob/.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 (172.20.10.1:4444)...
[+] [AGENT] Successfully connected to agent (172.20.10.1:4444)...
[D] [AGENT] Executing command: os_version
[V] [SSH] Connecting (172.20.10.1: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[Errno 104] Connection reset by peer 
------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/noob/needle/needle/core/framework/framework.py", line 641, in _connection_new
    self.device.connect()
  File "/mnt/noob/needle/needle/core/device/device.py", line 219, in connect
    self.ssh = self._connect_ssh()
  File "/mnt/noob/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[Errno 104] Connection reset by peer
------------------------------------------------------------
[!] Exception: Connection dropped. Please check your connection with the device, and reload the module. SSHException: Error reading SSH protocol banner[Errno 104] Connection reset by peer
[V] [SSH] Disconnecting...
[V] [AGENT] Disconnecting from agent...

Environment

Connection type: WiFi Hotspot from iPhone (172.20.10.1 is iPhone)

JB: u0

Needle Version

  • Framework (on your machine): 1.3.2
  • Agent (on your device): 1.0.5

Workstation Operating System

Latest Mac
Latest Kali

Dependencies as instructed in Readme

Python Version

2.7

Python Packages (pip freeze)

adns-python==1.2.1
alembic==1.0.0.dev0
argcomplete==1.8.1
argh==0.26.2
asn1crypto==0.24.0
atomicwrites==1.1.5
attrs==18.2.0
autobahn==17.10.1
Automat==0.6.0
Babel==2.6.0
backports-abc==0.5
backports.functools-lru-cache==1.5
backports.ssl-match-hostname==3.5.0.1
BBQSQL==1.0
bcrypt==3.1.6
bdfproxy==0.0.0
beautifulsoup4==4.7.1
biplist==1.0.3
BlindElephant==1.0
blinker==1.4
bottle==0.12.15
brotlipy==0.6.0
cbor==1.0.0
certifi==2018.8.24
cffi==1.12.3
Chameleon==2.24
chardet==3.0.4
CherryTree==0.38.8
## FIXME: could not find svn URL in dependency_links for this package:
chirp===daily-20190104
click==6.7
colorama==0.3.7
ConfigArgParse==0.11.0
configobj==5.0.6
configparser==3.5.0b2
constantly==15.1.0
construct==2.5.3
cryptography==1.5.3
cssselect==1.0.3
cssutils==1.0.2
Cython==0.29.2
deprecation==2.0.6
dhcpig==0.0.0
dicttoxml==1.7.4
distorm3==3.4.1
Django==1.11.21
dnslib==0.9.7
dnspython==1.16.0
docutils==0.14
easygui==0.96
EditorConfig==0.12.1
Elixir==0.7.1
entrypoints==0.3
enum34==1.1.6
et-xmlfile==1.0.1
faradaysec==3.8.0
feedparser==5.2.1
filedepot==0.5.2
filteralchemy==0.1.0
Flask==0.11.1
Flask-BabelEx==0.9.3
Flask-Classful==0.14.1
Flask-Login==0.4.1
Flask-Mail==0.9.1
Flask-Principal==0.4.0
Flask-Restless==0.17.0
Flask-Security==3.0.0
Flask-Session==0.3.1
Flask-SQLAlchemy==2.1
Flask-WTF==0.14.2
FormEncode==1.3.0
frida==12.6.6
funcsigs==1.0.2
fuse-python==0.3.1
future==0.16.0
futures==3.2.0
GDAL==2.3.2
GeoIP==1.3.2
gevent==1.3.7
gpg==1.12.0
greenlet==0.4.15
h2==2.4.4
hpack==2.3.0
html2text==2016.9.19
html5lib==1.0.1
httplib2==0.11.3
hupper==1.5
hyperframe==4.0.2
hyperlink==17.3.1
idna==2.6
impacket==0.9.19
incremental==16.10.1
ipaddress==1.0.17
IPy==0.83
itsdangerous==0.24
jdcal==1.0
Jinja2==2.10
jsbeautifier==1.6.4
jsonpickle==0.9.5
jsonrpclib==0.1.7
keyring==17.1.1
keyrings.alt==3.1.1
killerbee==1.0
ldap3==2.5.1
ldapdomaindump==0.9.1
lxml==3.6.0
lz4==1.1.0
M2Crypto==0.31.0
Mako==1.0.7
MarkupSafe==1.1.0
marshmallow==3.0.0b3
marshmallow-sqlalchemy==0.14.1
mechanize==0.2.5
mercurial==4.8.2
metaconfig==0.1.4a1
mimerender==0.6.0
mitmproxy==0.18.3
more-itertools==4.2.0
msgpack==0.5.6
mysqlclient==1.3.10
netaddr==0.7.19
NfSpy==1.0
nplusone==1.0.0
numpy==1.16.2
olefile==0.46
openpyxl==2.4.9
packaging==19.0
paramiko==2.4.2
passlib==1.6.5
Paste==3.0.6
PasteDeploy==2.0.1
PasteScript==2.0.2
pathlib2==2.3.3
pathtools==0.1.2
pcapy==0.10.8
peepdf==0.4.2
pefile==2018.8.8
pexpect==4.6.0
Pillow==3.4.2
plaster==1.0
plaster-pastedeploy==0.5
pluggy==0.8.0
prettytable==0.7.2
psycopg2==2.7.7
py==1.7.0
py-ubjson==0.12.0
pyasn1==0.1.9
pyasn1-modules==0.2.1
pycairo==1.16.2
pycparser==2.19
pycrypto==2.6.1
pycryptodomex==3.6.1
pycurl==7.43.0.2
pydns==2.3.6
pydot==1.4.1
pyenchant==2.0.0
Pygments==2.3.1
PyGObject==3.30.4
pygtkspellcheck==4.0.5
pyinotify==0.9.6
pylibemu==0.3.3
pymongo==3.7.1
pymssql==2.1.4
PyNaCl==1.3.0
pyOpenSSL==16.2.0
pyparsing==2.1.10
PyPDF2==1.26.0
pyperclip==1.5.32
pyquery==1.2.9
pyramid==1.10.2
pyrit==0.5.1
pyscard==1.9.7
pyserial==3.4
PySocks==1.6.8
pysqlite==2.7.0
pytest==3.10.1
python-dateutil==2.7.3
python-editor==1.0.3
python-Levenshtein==0.12.0
python-magic==0.4.16
python-mimeparse==0.1.4
python-openid==2.2.5
python-slugify==2.0.1
python-snappy==0.5.3
pythonaes==1.0
PyTrie==0.2
pytz==2019.1
pyusb==1.0.2
PyV8==1.0.dev0
PyX==0.12.1
pyxdg==0.25
PyYAML==3.13
qrcode==6.1
readline==6.2.4.1
repoze.lru==0.7
requests==2.11.1
rfidiot==1.0
roman==2.0.0
scandir==1.9.0
scapy==2.4.0
scgi==1.13
SecretStorage==2.3.1
selenium==3.14.1
service-identity==16.0.0
simplejson==3.16.0
singledispatch==3.4.0.3
sipvicious==0.2.8
six==1.10.0
slowaes==0.1a1
soupsieve==1.8
speaklater==1.3
SQLAlchemy==1.3.1
sqlalchemy-schemadisplay==1.3
sqlparse==0.2.4
sshtunnel==0.1.5
tcpwatch==1.3.1
Tempita==0.5.2
tornado==4.4.3
tqdm==4.28.1
translationstring==1.3
trollius==2.0.1
Twisted==18.9.0
txaio==2.10.0
typing==3.5.2.2
u-msgpack-python==2.1
unicodecsv==0.14.1
Unidecode==1.0.23
urllib3==1.24.1
urwid==1.3.1
uTidylib==0.5
venusian==1.2.0
vinetto==0.7b0
volatility==2.6
waitress==1.2.0b2
watchdog==0.8.3
webargs==5.1.2
webencodings==0.5.1
WebOb==1.8.5
websocket-client==0.53.0
WebTest==2.0.32
webunit==1.3.10
Werkzeug==0.14.1
wifite==2.2.5
wsaccel==0.6.2
WTForms==2.2.1
wxPython==3.0.2.0
wxPython-common==3.0.2.0
XlsxWriter==1.1.2
xmlbuilder==1.0
yara-python==3.9.0
zenmap==7.70
zim==0.68
zope.component==4.3.0
zope.deprecation==4.4.0
zope.event==4.2.0
zope.hookable==4.0.4
zope.interface==4.3.2

Device iOS Version

iOS 12.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions