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 Client Defaults Are Not Widely Used #16328

Closed
smcintyre-r7 opened this issue Mar 11, 2022 · 2 comments · Fixed by #16379
Closed

SSH Client Defaults Are Not Widely Used #16328

smcintyre-r7 opened this issue Mar 11, 2022 · 2 comments · Fixed by #16379
Assignees

Comments

@smcintyre-r7
Copy link
Contributor

Metasploit's SSH client functionality is provided by the Net::SSH library. In order to streamline and configure it in a somewhat consistent manner for Metasploit's purposes the Msf::Exploit::Remote::SSH mixin defines the #ssh_client_defaults method.

Looking through the current Metasploit modules and libraries, it only appears to be used by the exploit/solaris/ssh/pam_username_bof module. This means that when options to fix bugs such as those proposed in #16318 are made, modules do not consistently get them. This notably means that many modules that use SSH client connections are likely still affected by the KEX issue identified in the aforementioned PR.

We should update SSH client usages to use the defaults to fix bugs like these.

@smcintyre-r7
Copy link
Contributor Author

In addition to the KEX issue, modules are likely having to also configure their own socket factory to ensure that the connections can be made with Metasploit's Rex::Socket subsystem to ensure they can be pivoted. I haven't noticed any modules that fail to do this, but modules shouldn't have to handle that themselves.

@heyder
Copy link
Contributor

heyder commented Mar 18, 2022

I'll take it, you can assign it to me.

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

Successfully merging a pull request may close this issue.

2 participants