# elfsign **Repository Path**: nealtang/elfsign ## Basic Information - **Project Name**: elfsign - **Description**: No description available - **Primary Language**: Unknown - **License**: GPL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-08-11 - **Last Updated**: 2025-08-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ELFSign ### 0x01 Introduction This project was sourced from [ELFsign](https://github.com/Yvan-xy/ELFSign) with fixes to get it to build again, and a cgo binding added. --- This project is used to sign ELF files and store the signature in a new section. ### 0x02 Installation --- ```shell script mkdir build cd build cmake .. make ``` ### 0x03 Usage --- You can sign and verify ELF files, and execute them after verification: ```usage USAGE: ./ELFSign [options] file... Options: -c, --check Check ELF file and execute it -X, --check-X509 Check ELF file with X509 and execute it -s, --sign Sign a ELF file -a, --argument Set arguments of ELF file to execute -g, --generate Generate public and private key pair -x, --create-X509 Generate X509 certificate -p, --path Set the path of public/private key -e, --elf Set the path of ELF file Example: ./ELFSign --sign -p ./prikey.pem -e hello.out ./ELFSign -c -p ./pubkey.pem -e hello.out ./ELFSign -X -p ./ELFSign.pem -e /usr/bin/cat -a a.txt ``` ### 0x04 Go Bindings This project has a Go binding that can be used to sign and verify ELF files in your Go code. To use the Go binding, you need to install the project and then import it in your Go code. ```bash go get github.com/pi-apps-go/elfsign ``` Example: ```go package main import ( "github.com/pi-apps-go/elfsign" ) func main() { signer := elfsign.NewELFSign() signer.Sign("hello.out", "prikey.pem") signer.Verify("hello.out", "pubkey.pem") signer.Execute("hello.out") } ``` An example of the Go binding can also be found in the [example](example/main.go) directory. A further explanation of the Go binding can be found in the [README_GO_BINDINGS.md](README_GO_BINDINGS.md) file.