exec2shell

command module
v0.0.0-...-e9bbfdd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2023 License: MIT Imports: 9 Imported by: 0

README

exec2shell

Extracts TEXT section of a PE, ELF, or Mach-O executable to shellcode

Installation

To install to GOPATH/bin:

go install github.com/Binject/exec2shell@latest

Build from source:

git clone https://github.com/Binject/exec2shell.git

cd exec2shell

go build .

Usage

exec2shell [-h|--help] -i|--in "" [-o|--out ""] [-c|--c-outfile ""] [-n|--c-var ""] [-g|--go-outfile ""] [-p|--go-pkg ""] [-v|--go-var ""]

Arguments:

-h --help Print help information

-i --in Input PE, ELF, or Mach-o binary

-o --out Output file - Shellcode as Binary. Default: shellcode.bin

-c --c-outfile Output file - Shellcode as C Array

-n --c-var Sets variable name for C Array output. Default: SHELLCODE

-g --go-outfile Output file - Shellcode as Go Array

-p --go-pkg Sets package string for Go Array output. Default: shellcode

-v --go-var Sets variable name for Go Array output. Default: shellcode

Examples

Make shellcode from a binary:

exec2shell -i someprog.exe -o shellcode.bin

Make a C-Array style header file shellcode:

exec2shell -i someprog.exe -c shellcode.h -n SHELLCODE_VARNAME

Make a Go-Array style shellcode

exec2shell -i someprog.exe -g shellcode.go -p mypackage -v DONUT

Make All the Things at Once:

exec2shell -i someprog.exe -o shellcode.bin -c shellcode.h -g shellcode.go -p mypackage -n C_VARNAME -v GO_VARNAME

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL