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

Feature request #44

Open
savelyglazkov opened this issue Oct 22, 2021 · 3 comments
Open

Feature request #44

savelyglazkov opened this issue Oct 22, 2021 · 3 comments

Comments

@savelyglazkov
Copy link

Can you modify this program to record only correct passwords?
Can you also add session hijack when public key authentication is used?

@littlebear2
Copy link

littlebear2 commented Oct 29, 2021

This server is only able to intercept password authentication. There is a branch with public key authentication, but both authentication methods does not work together 😞

There is another @ssh-mitm project which is able to intercept public key authentication: https://github.com/ssh-mitm/ssh-mitm

With the other project, I was able to successfully intercept publickey and password authentication.

I don't know how this works, but the recommended project is able to use the same authentication method as the remote server. This means, if you want to login with publickey authentication it only accepts the same key as the remote server. If logging in with publickey authentication is not possible, because you have no publickeys which are allowed to login to the remote server, the mitm server falls back to password authentication. That's how magic works 😃

Note on publickey authentication: The other server is able to fully intercept publickey authentication, but only when an agent was forwarded. If no agent was forwarded, the session will be closed. This can be avoided if you use a honeypot as fallback.

ssh-mitm --remote-host 1.2.3.4:22 --fallback-host user:password@honeypot:22

The fallback host is only used, when the client is allowed to login with publickey authentication on the remote server but no agent was forwarded!
If the client is not allowed to login with publickey authentication on the remote server, authentication against the mitm server also fails.

@jtesta
Copy link
Owner

jtesta commented Oct 29, 2021 via email

@littlebear2
Copy link

On Fri, 2021-10-29 at 03:53 -0700, littlebear2 wrote: @jtesta recommended me in #14 to use another project
I did not.

@jtesta I'm sorry if I misunderstood. 😢

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

3 participants