Reverse Shell in Python - Part 3


In this post  we're going to learn how to host the attacker server using ngrok and connect to it from the client-server in Linux.

DISCLAIMER: I DON'T PROMOTE THE USE OF THIS CODE IN A MALICIOUS WAY. HACKING DONE MUST BE DONE LEGALLY WITH CONSENT.

First install ngrok using :
sudo snap install ngrok
If you don't have snap installed, install it using :
sudo apt update
sudo apt install snapd

Then open the terminal and run the server.py on the attacking computer.





Then run the command "ngrok tcp portnumber(here 9000)" on another terminal. You'll see a window like this pop up.


The host is 0.tcp.ngrok.io and the port is 10882. Remember this information.

Next open up the victim computer and run the client.py with the aforementioned parameters.



Then you'll see this pop up on the server.py file.


Now start entering the commands and you'll see that it works. Happy Hacking đŸ˜€

Comments

Popular Posts