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

ssh-logjam #22

Open
freb opened this issue May 10, 2019 · 2 comments
Open

ssh-logjam #22

freb opened this issue May 10, 2019 · 2 comments

Comments

@freb
Copy link
Contributor

freb commented May 10, 2019

ssh-hostkey uses the fetch_host_key

This function includes a kexchange that we could probably reuse to get the prime size

https://github.com/nmap/nmap/blob/a7638f57c88cb1b5da949147729fca76a0f332c5/nselib/ssh2.lua#L224-L249

We should be able to grab the modulus/prime size from there. But we can't guarantee that the negotiated kex algorithms will be the vulnerable ones. Basically, if the host supports group1-sha1 then it is vulnerable, but we need to check the modulus size for a group-exchange-sha1.

@freb
Copy link
Contributor Author

freb commented Oct 14, 2019

Notes:

dh-group-exchange-sha1 has a variable size dh modulus that can be regenerated on the server. specify a small modulus to see if the server will oblige. I believe the smallest acceptable dh modulus for the client and server is used but put max 1024 so that it is clear if a success is an issue. if there is no connection, you'll get "ssh: handshake failed: EOF" in the error key.

echo 172.24.1.1 | ./zgrab -port 22 -xssh -xssh-kex-algorithms diffie-hellman-group-exchange-sha1 -xssh-ciphers aes128-cbc -xssh-gex-min-bits 512 -xssh-gex-max-bits 1024 | jq

@freb
Copy link
Contributor Author

freb commented Oct 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant