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/VoodooFarm Feb 23 '22
In theory yes that’s what happens.
I would suggest paying the monthly fee for Hack The Box so you have access to the retired machines, all the retired machines have write ups available all over the internet. Tons of them deal with exactly the things you’re currently studying and actually being able to do what you’re studying is going to help immensely with understanding. There’s tons of “very easy” boxes that utilize reverse shells and that you can use msf for.