SkillAgentSearch skills...

Elf

:gem: Go library to parse Executable and Linkable Format (ELF) files.

Install / Use

/learn @saferwall/Elf
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<a href="https://saferwall.com" target="_blank" rel="noopener noreferrer"><img align="right" width="100" src=".github/assets/logo.png" alt="Saferwall logo"></a>

ELF File Format Parser

GoDoc Go Version Report Card codecov GitHub Workflow Status

elf is a go package for parsing Executable and Linkable Format (ELF). This package is designed for static malware analysis and reverse engineering.

Install

You can install the elf package and its dependencies using the go get command.


go get github.com/saferwall/elf

Usage


package main

import (
	"encoding/json"
	"fmt"

	"github.com/saferwall/elf"
)


func main() {

	p, err := elf.New("/bin/ls")
	defer p.CloseFile()
	if err != nil {
		panic(err)
	}
	err = p.Parse()
	if err != nil {
		panic(err)
	}
	jsonFile, err := p.DumpJSON()
	if err != nil {
		panic(err)
	}
	fmt.Println(jsonFile)
}

References

  • https://refspecs.linuxfoundation.org/elf/elf.pdf
  • https://github.com/freebsd/freebsd-src/blob/main/sys/sys/elf_common.h
View on GitHub
GitHub Stars52
CategoryDevelopment
Updated3mo ago
Forks8

Languages

Go

Security Score

97/100

Audited on Dec 7, 2025

No findings