Reverse Shell Colab Notebook
Install cloudflared
! curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb -o cloudflared.deb
! sudo dpkg -i cloudflared.deb
! sudo apt-get install -f
Install pm2
Install netcat from source
!wget http://sourceforge.net/projects/netcat/files/netcat/0.7.1/netcat-0.7.1.tar.gz
!tar -xvf netcat-0.7.1.tar.gz
!cd netcat-0.7.1 && ./configure
!cd netcat-0.7.1 && sudo make && sudo make install
!mv /usr/local/bin/nc /usr/local/bin/nothing
!nothing -h
Start reverse shell
#! /bin/bash
nothing -l -p 8888 -e /bin/bash
!pm2 start nothing.sh --name nothing --watch
Start cloudflared tunnel
#! /bin/bash
cloudflared tunnel --url tcp://localhost:8888
! pm2 start tunnel.sh --name tunnel
! pm2 logs tunnel # get the domain
From local machine:
Install cloudflared
cloudflared access tcp --hostname tcp.site.com --url localhost:8888
Connect via netcat
nc localhost 8888
python -c ' import pty; pty.spawn("/bin/bash")'
%%capture --no-display
! pm2 start server.py --name server --watch && pm2 start tunnel.sh --name tunnel
! cloudflared tunnel --url http://localhost:8888
! cloudflared tunnel --url tcp://localhost:8888
! pm2 logs nothing --lines 100
! pm2 flush
! pm2 logs
! pm2 status
! pm2 stop all
! pm2 delete all