go-inject

module
v0.0.0-...-c68c1c7 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: MIT

README

go-inject

Process injection techniques written in Go. I've also expanded this repo to include some general offense techniques in Go.

Techniques

Usage

Use msfvenom or any other tool to generate hex encoded shellcode:

msfvenom -p windows/x64/exec CMD=calc.exe -f hex

Place hex encoded payload within one of the example .go files replacing the content of the payload variable. You can cross compile on Linux using the following: Linux:

env GOOS=windows go build -ldflags="-s -w" -trimpath examples/x64/uuid/uuid.go

Detection

I've written a few simple yara rules to detect binaries using go-inject:

Yara ruleset

I also recommend using Sysmon event ids 8 (CreateRemoteThread) and 25 (ProcessTampering) for detection.

References

Jump to

Keyboard shortcuts

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