metasploit-framework icon indicating copy to clipboard operation
metasploit-framework copied to clipboard

Fix missing ssh_login peerinfo

Open adfoster-r7 opened this issue 1 year ago • 0 comments

Fixes missing ssh_login peerinfo information which was introduced by https://github.com/rapid7/metasploit-framework/pull/15831

Before

$  rvm use; bundle; time bundle exec ruby ./msfconsole -qx "use scanner/ssh/ssh_login; set rhosts 192.168.123.128; set rport 2222; set username user; set password password; run; sleep 1; sessions; exit -y"

# ....

Active sessions
===============

  Id  Name  Type         Information     Connection
  --  ----  ----         -----------     ----------
  1         shell linux  SSH adfoster @  192.168.123.1:52223 -> 192.168.123.128:2222 (192.168.123.128)

After

$  rvm use; bundle; time bundle exec ruby ./msfconsole -qx "use scanner/ssh/ssh_login; set rhosts 192.168.123.128; set rport 2222; set username user; set password password; run; sleep 1; sessions; exit -y"

# ....

Active sessions
===============

  Id  Name  Type         Information                          Connection
  --  ----  ----         -----------                          ----------
  1         shell linux  SSH adfoster @ 192.168.123.128:2222  192.168.123.1:52210 -> 192.168.123.128:2222 (192.168.123.128)

Verification

  • Run the ssh_login module against a target
  • Verify there is not a regression in the behavior introduced by https://github.com/rapid7/metasploit-framework/pull/15831

adfoster-r7 avatar Sep 20 '22 13:09 adfoster-r7