rapid7 / metasploitable3

Metasploitable3 is a VM that is built from the ground up with a large amount of security vulnerabilities.
Other
4.78k stars 1.15k forks source link

sessions -i 1 no response for a long time #565

Closed Louis-me closed 2 years ago

Louis-me commented 2 years ago

Issue Description

msf6 auxiliary(scanner/ssh/ssh_login) > run

[*] 192.168.56.105:22 - Starting bruteforce
[+] 192.168.56.105:22 - Success: 'vagrant:vagrant' 'Microsoft Windows Server 2008 R2 Standard 6.1.7601 Service Pack 1 Build 7601'
[*] Command shell session 1 opened (10.0.2.7:37601 -> 192.168.56.105:22 ) at 2022-02-28 04:40:09 -0500
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf6 auxiliary(scanner/ssh/ssh_login) > sessions -i 

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

  Id  Name  Type           Information                              Connection
  --  ----  ----           -----------                              ----------
  1         shell windows  SSH vagrant:vagrant (192.168.56.105:22)  10.0.2.7:37601 -> 192.168.56.105:22  (192.168.56.105)

msf6 auxiliary(scanner/ssh/ssh_login) > sessions -i 1
[*] Starting interaction with 1...

SSH vagrant:vagrant (192.168.56.105:22)

Host System

please help me ,thanks.

jmartin-tech commented 2 years ago

ssh shell windows type connections will often not provide a prompt, this is due to the nature of the ssh service provided:

msf6 auxiliary(scanner/ssh/ssh_login) > sessions

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

  Id  Name  Type           Information    Connection
  --  ----  ----           -----------    ----------
  1         shell windows  SSH vagrant:vagrant @  x.x.x.x:55198 -> x.x.x.x:22
                                           (x.x.x.x)

msf6 auxiliary(scanner/ssh/ssh_login) > session -i 1
[-] Unknown command: session
msf6 auxiliary(scanner/ssh/ssh_login) > sessions -i 1
[*] Starting interaction with 1...

ls
AppData
Application Data
Contacts
Cookies
Desktop
Documents
Downloads
Favorites
Links
Local Settings
Music
My Documents
NTUSER.DAT
NTUSER.DAT{016888bd-6c6f-11de-8d1d-001e0bcde3ec}.TM.blf
NTUSER.DAT{016888bd-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000001.regtrans-ms
NTUSER.DAT{016888bd-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000002.regtrans-ms

This it a metasploit-framework function and not controlled by this project.