Skip to content

Instantly share code, notes, and snippets.

@khyberspache
Created January 19, 2021 15:09
Show Gist options
  • Save khyberspache/3aec6715d9093014f322ab7bc3989ead to your computer and use it in GitHub Desktop.
Save khyberspache/3aec6715d9093014f322ab7bc3989ead to your computer and use it in GitHub Desktop.
CGO build command for Windows DLL with 64-bit address ASLR and NX compatibility on
GOOS=windows CC=x86_64-w64-mingw32-gcc CGO_ENABLED=1 go build --buildmode=c-shared --ldflags='-s -w -X main.key="MYKEYISBESTKEY" -extldflags "-Wl,--nxcompat -Wl,--dynamicbase -Wl,--high-entropy-va"' -o payloads/pneuma.dll main.go;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment