-
-
Notifications
You must be signed in to change notification settings - Fork 948
Detecting open Dropbear server #808
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
Detecting open Dropbear server #808
Conversation
arkid15r
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Captain-T2004 thanks for digging into this!
I wonder how it worked without the explicit empty password in top 1000 common passwords file.
Please find my suggestion on possible code improvement below. This code needs to be tested for the Dropbear case.
Thank you!
arkid15r
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Captain-T2004, thanks for the fix!
Here is my another suggestion that needs to be verified:
arkid15r
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can make it more compact (see the suggestion). Otherwise LGTM, great work!
After testing it rigorously i have found that without the try and except the code doesn't work, so to improve the readability i have added some comments, also added is finally block to close the connection.
As per the suggestions i have replaced try/except with if/else and i have ran multiple tests on my localhost to test and it is working.
I have made the suggested changes to the code to make it more concise and easy to read. I have taken time to test it and make sure it works( it does ).
arkid15r
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested the PR, it works (Dropbear v2022.83). I'm merging this.
Thanks everyone!
Checklist
Changes proposed in this pull request
This pull request solves issue #715,
Due to internal workings of Paramiko library used to connect to SSH in core_ssh.py, Nettacker was unable to detect an open passwordless SSH server. Adding an exception fixes that problem. But to be on the safe side i have added an empty line to the default passwords list(Nettacker/lib/payloads/passwords/top_1000_common_passwords.txt).
Your development environment
Pop-OS22.043.10