1.5 KiB
1.5 KiB
DigiSpark Reverse Shell Script:
This DigiSpark script downloads and executes the Invoke-PowerShellTcpOneLine.ps1 powershell script which essentially opens a netcat reverse shell from a Windows machine to the host computer in about 3 seconds.
Instructions:
On the host machine (I assume you are using linux for this):
- Open a netcat listener on a port (the script uses port 4444 by default):
nc -lp 4444
- Download and modify the Invoke-PowerShellTcpOneLine.ps1 by removing the first line comment and changing the IP address to the one of your host machine and the port to the one you chose earlier.
- You now need to host the payload on a web server so it can be downloaded on the Windows computer. There are many ways to do this, but for anyone who wants a quick and easy solution you can host a php web server from the linux terminal like this:
sudo php -S 0.0.0.0:80 -t /directory/to/folder/of/powershellScript/
- Download and edit the
Reverse_Shell.ino
DigiSpark script to match the address where the ps1 powershell script is hosted and compile and loadReverse_Shell.ino
to your DigiSpark.
On the Windows machine:
Plug in the DigiSpark and enjoy your reverse shell on the host machine!
Hope you all enjoy this script and as always use it responsibly!