-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Adds SSL support to the postgres_login module #20517
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
base: master
Are you sure you want to change the base?
Adds SSL support to the postgres_login module #20517
Conversation
09e9629
to
63cccde
Compare
if response == 'S' | ||
ssl_context = OpenSSL::SSL::SSLContext.new | ||
ssl_socket = OpenSSL::SSL::SSLSocket.new(@conn, ssl_context) | ||
ssl_socket.sync_close = true |
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.
Is there any context on why this is needed? 👀
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.
https://ruby-doc.org/stdlib-2.6.1//libdoc/openssl/rdoc/OpenSSL/SSL/SSLSocket.html
sync_close[RW]
Whether to close the underlying socket as well, when the SSL/TLS connection is shut down. This defaults to false.
I assumed this was required to sync that the Rex socket would be closed together.
63cccde
to
e603880
Compare
This PR adds SSL support to the
postgres_login
module. This was spotted as part of a separate issue, then I couldn't think of a reason why the module shouldn't have SSL support to be more in line with our other login scanners.Verification
List the steps needed to make sure this thing works
msfconsole
use scanner/postgres/postgres_login
ssl=true
is set that we seeChange Cipher Spec
as part of our Wireshark packets when filtering by that string