jtesta / ssh-mitm

SSH man-in-the-middle tool
Other
1.63k stars 197 forks source link

JoesAwesomeSSHMITMVictimFinder.py bugs #43

Open STashakkori opened 3 years ago

STashakkori commented 3 years ago

Even with the correct parameters are passed and SSH connections are definitely open between a host and target, JoesAwesomeSSHMITMVictimFinder.py still says no SSH connections found. On debug mode it does indeed print all the correct addresses and states that it finds them yet does not detect the connects themselves.

Also even when quitting with q and waiting for "graceful" shutdown this tool ruins my terminal connection and I have to create a new one. Not sure what causes that but makes the tool pretty hard to use

jtesta commented 3 years ago

On Thu, 2021-09-02 at 11:57 -0700, Sina Tashakkori wrote:

Even with the correct parameters are passed and SSH connections are definitely open between a host and target, JoesAwesomeSSHMITMVictimFinder.py still says no SSH connections found.

A connection may exist, but if no packets are sent while the tool is inspecting the endpoints, then the connection won't be found.

If you're able to help test, try starting an SSH connection and letting the ping tool run for a long time in it. That would generate at least one packet per second (as the ping tool produces output) and you should find the SSH connection. Otherwise, something is very wrong...

Also even when quitting with q and waiting for "graceful" shutdown this tool ruins my terminal connection and I have to create a new one. Not sure what causes that but makes the tool pretty hard to use

Are there any errors reported when you do a graceful shutdown? I'd love to be able to debug this problem.

STashakkori commented 3 years ago

Hey Joe! Thank you.

So by ping tool do you mean the JoesAwesome*.py? I am keeping that running for a long time and it doesn't detect. Can you test on your end? If it works on your end I wonder if it is a firewall issue or something maybe the packets are getting dropped.

The graceful exit does not produce an error message. Just exits but then if I hit enter in the terminal it is either frozen or the terminal prints like so: linux_prompt:~$ linux_prompt:~$ linux_prompt:~$ linux_prompt:~$ linux_prompt:~$ linux_prompt:~$ linux_prompt:~$

You see what I mean? prompts stack sideways instead of nice and new lined like normal. Also the typed texted doesnt show on the console. Almost like the cursor doesnt get properly handled. I can look into this part a little bit myself too to see what the script is doing when it shuts down. This issue is intermittent- it doesnt happen ever single time just occasionally on exit.