r/offsec • • Feb 23 '22
Metasploit reverse shell
Hi, I'm having some trouble understanding this concept:
Suppose that we have two PCs in a network-- one is an attacking Kali machine (LHOST: 192.168.1.2) and the other is a target windows machine (RHOST: 192.168.1.3).
So if I launch an exploit with a reverse shell payload from Metasploit in the Kali machine (using the exploit command) to the Windows machine, why does the Metasploit terminal say:
Command shell session 1 opened (192.168.1.2 --> 192.168.1.3)
Shouldn't it be the other way around since it's a reverse shell from the RHOST to LHOST?
Command shell session 1 opened (192.168.1.3 --> 192.168.1.2)
View all comments
Show parent comment
1
u/[deleted] Feb 23 '22
Ok, so if I'm understanding this correctly: 1.2 initiates a connection with 1.3 and transfers the payload. Then 1.3 executes the payload, opens a remote shell, and connects back to 1.2?