Intercept SSH with SSHMitm man-in-the-middle


Intercept SSH network topology using SSHMitm man -in-the-middle:
target machine: metasploitable2-linux

insert image description here

Attacker: kali-linux
insert image description here

Visitor: backtrack5-linux
insert image description here

Kali uses ettercap for man-in-the-middle attack (arp spoofing):
insert image description here

Use ssh to log in to the remote server here
insert image description here

But kali didn't catch any package
insert image description here

Scan the service version number to determine the reason
insert image description here

It was found that the version number is Openssh4.7, which can theoretically be attacked. However, due to the use of the protocol 2 version, all information is encrypted. Here we use the arpspoof method to perform a man-in-the-middle attack to capture packets for verification.
insert image description here

Enable NIC forwarding:
Echo “1” > /proc/sys/net/ipv4/ip_forward
insert image description here

Use wireshark to capture packets
insert image description here

Then make the ssh connection again:

insert image description here

Stop capturing packets and perform filtering.

insert image description here

Find the account password, but we can find that all the package information here is encrypted.

insert image description here

Here you can change the version number of ssh to 1.0, and you can find that the captured packets are all plaintext, so we won't do the experiment here.

Now we use mitm to downgrade ssh. Forcing it to version 1.0, sending plaintext packets.
But due to the limited level, I really don't know how sshmitm works. . .

Guess you like

Origin blog.csdn.net/qq_27180763/article/details/123929911