A set of libraries and accompanying tools for post-exploitation, written in Golang. Intended to be a simple and straightforward toolbox for post-exploitation binaries that you can easily cross compile. For use on engagements where a standard Meterpreter payload won't cut it.
This project is split into two parts:
- The
postexpackage contains various functions that should be useful for general post-exploitation. - The
toolsfolder contains sample Go programs that use the postex package to do things like open reverse shells or exfiltrate data.
Currently, this project includes the following functional tools, built using the postex package:
shell-reverseis an ncat-style reverse shell. Supports shells sent over TCP, UDP and TLS (compatible with the '-ssl' option for ncat). Also supports an HTTPS shell that sends base-64 encoded input and output via GET and POST requests.smuggleris a tool for sending or receiving files by connecting to a remote host over TCP. There is a cleartext and TLS version (compatible with the '-ssl' option for ncat).dirtysocksis a portable SOCKS proxy that can be dropped onto a server and used for pivoting via SSH port forwarding.shellcodeis a simple tool for executing shellcode on Windows or Linux - provide it with a hex string or a path to a binary file containing shellcode. Try using it to execute a meterpreter payload!shellcode-injectis similar to the previous tool, but allows you to inject shellcode into an existing process by providing a PID.xortoolis a simple commandline tool for performing multi-byte XOR encryption and decryption of hex strings or binaries.
This project doesn't have any external dependencies besides Go itself. To build it, just do:
$ git clone https://github.com/ofasgard/postex-tools
$ cd postex-tools
$ ./build.shIf you have trouble building or using any of the tools, the following notes may be helpful:
- You may need to install
gcc-multilibor the equivalent for cross-platform compilation to work. - In order to use the shellcode loader, you'll need to set the GOARCH variable to the correct architecture -
386for 32-bit shellcode, andamd64for 64-bit shellcode.