Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'bool' object has no attribute 'send' Issue in creds/routers/mikrotik/api_ros_default_creds module #766

Open
R3dIO opened this issue Dec 2, 2021 · 0 comments

Comments

@R3dIO
Copy link
Contributor

R3dIO commented Dec 2, 2021

! ANY INCOMPLETE REPORT WILL BE CLOSED RIGHT AWAY!

Steps to Reproduce (for bugs)

  1. python3 ./rsf.py
  2. use creds/routers/mikrotik/api_ros_default_creds
  3. set target 10.20.242.1
  4. run

Your Environment

  • RouterSploit Version used:
  • Operating System and version: Ubuntu 20.04
  • Python Version: ( python3 --version ) Python 3.8.10
  • Python Environment: ( python3 -m pip freeze )
appdirs==1.4.3
astroid==2.4.2
attrs==19.3.0
Automat==0.8.0
autopep8==1.5.4
bcrypt==3.2.0
blinker==1.4
certifi==2019.11.28
cffi==1.15.0
chardet==3.0.4
Click==7.0
cloud-init==21.2
colorama==0.4.3
command-not-found==0.3
configobj==5.0.6
constantly==15.1.0
cryptography==2.8
dbus-python==1.2.16
distlib==0.3.0
distro==1.4.0
distro-info===0.23ubuntu1
entrypoints==0.3
et-xmlfile==1.0.1
filelock==3.0.12
flake8==3.8.3
future==0.18.2
httplib2==0.14.0
hyperlink==19.0.0
idna==2.8
importlib-metadata==2.0.0
incremental==16.10.1
isort==5.5.1
jdcal==1.4.1
Jinja2==2.10.1
jsonpatch==1.22
jsonpointer==2.0
jsonschema==3.2.0
keyring==18.0.1
language-selector==0.1
launchpadlib==1.10.13
lazr.restfulclient==0.14.2
lazr.uri==1.0.3
lazy-object-proxy==1.4.3
MarkupSafe==1.1.0
mccabe==0.6.1
more-itertools==4.2.0
netifaces==0.10.4
numpy==1.19.2
oauthlib==3.1.0
openpyxl==3.0.5
pandas==1.1.2
paramiko==2.8.1
pep8==1.7.1
pexpect==4.6.0
ply==3.11
pyasn1==0.4.2
pyasn1-modules==0.2.1
pycodestyle==2.6.0
pycparser==2.21
pycryptodome==3.11.0
pycryptodomex==3.11.0
pyflakes==2.2.0
PyGObject==3.36.0
PyHamcrest==1.9.0
PyJWT==1.7.1
pylint==2.6.0
pymacaroons==0.13.0
PyNaCl==1.3.0
pyOpenSSL==19.0.0
pyrsistent==0.15.5
pyserial==3.4
pysmi==0.3.4
pysnmp==4.4.6
python-apt==2.0.0+ubuntu0.20.4.5
python-dateutil==2.8.1
python-debian===0.1.36ubuntu1
python-dotenv==0.14.0
pytz==2020.1
PyYAML==5.3.1
requests==2.21.0
requests-unixsocket==0.2.0
SecretStorage==2.3.1
service-identity==18.1.0
simplejson==3.16.0
six==1.15.0
sos==4.1
ssh-import-id==5.10
systemd-python==234
toml==0.10.1
Twisted==18.9.0
typed-ast==1.4.1
ubuntu-advantage-tools==27.0
ufw==0.36
unattended-upgrades==0.1
urllib3==1.24.3
virtualenv==20.0.17
wadllib==1.3.3
wrapt==1.12.1
xlrd==1.2.0
XlsxWriter==1.3.6
zipp==3.2.0
zope.interface==4.7.1

Current Behavior

When testing a Mikrotik router for api_ros_default_creds exploit when we execute run command "AttributeError: 'bool' object has no attribute 'send'". is returned and exploit fails to run.

Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "Project/routersploit/routersploit/modules/creds/routers/mikrotik/api_ros_default_creds.py", line 56, in target_function
    output = apiros.login(username, password)
  File "Project/routersploit/routersploit/libs/apiros/apiros_client.py", line 14, in login
    for repl, attrs in self.talk(["/login"]):
  File "routersploit/routersploit/libs/apiros/apiros_client.py", line 28, in talk
    if self.writeSentence(words) == 0:
  File "Project/routersploit/routersploit/libs/apiros/apiros_client.py", line 50, in writeSentence
    self.writeWord(w)
  File "Project/routersploit/routersploit/libs/apiros/apiros_client.py", line 64, in writeWord
    self.writeLen(len(w))
  File "Project/routersploit/routersploit/libs/apiros/apiros_client.py", line 73, in writeLen
    self.writeByte((length).to_bytes(1, sys.byteorder))
  File "routersploit/routersploit/libs/apiros/apiros_client.py", line 139, in writeByte
    r = self.sk.send(str[n:])
AttributeError: 'bool' object has no attribute 'send'
  • If describing a bug, tell us what happens instead of the expected behavior
  • If suggesting a change/improvement, tell us how it works right now

Expected Behavior

The exploit runs successfully or returns a message that the router is not vulnerable

  • If you're describing a bug, tell us what should happen
  • If you're suggesting a change/improvement, tell us how it should work
R3dIO added a commit to R3dIO/routersploit that referenced this issue Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant