Logo: Analyzing Go Binaries

Analyzing Go Binaries

Communautéit
trilwu
analyzing-go-binaries

Go-Binaries am Reverse Engineering analyséieren, andeems Dir mat GoReSym, redress an IDA/Ghidra-Go-Plugins Funktiounsnimm an -typen aus pclntab a moduledata rekonstruéiert an dem Go seng net standardméisseg Calling Convention, Interface-Dispatch a String-Layout liest. Benotzt dëse Skill, wann e Binary Go-Runtime-Strings enthält, wann Strings runtime.main oder go:buildid weisen, wann e Binary ouni Symboler onerwaart grouss ass oder wann Dir Go-Malware oder e Go-baséierte Service analyséiert.

Add to TypingMind

Iwwersiicht

Editeurtrilwu
Repositorysecskills
Skill-Nummanalyzing-go-binaries
Stären
144
Forks
15
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    trilwu huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Analyzing Go Binaries an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/trilwu/secskills/tree/main/secskills-core/skills/analyzing-go-binaries
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/trilwu/secskills.git /tmp/secskills
mkdir -p .claude/skills
cp -r /tmp/secskills/secskills-core/skills/analyzing-go-binaries .claude/skills/analyzing-go-binaries
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Analyzing Go Binaries an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Analyzing Go Binaries automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Analyzing Go Binaries net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Analyzing Go Binaries

Go binaries look hostile — statically linked, tens of megabytes, no imports you recognize, and "stripped" in a way that makes tools show thousands of sub_ functions. They are not. Go ships its own symbol table for runtime reflection and panic traces, and strip does not remove it. Recover it and the binary becomes one of the easiest targets there is.

When to Use

  • strings shows runtime.main, go:buildid, go.buildinfo, or runtime.gopanic
  • A "stripped" binary is 5–50 MB with almost no dynamic imports
  • The disassembler shows thousands of unnamed functions and unreadable strings
  • Analyzing Go malware, a Go CLI tool, or a compiled Go service

When NOT to Use

  • Rust binaries — use analyzing-rust-binaries; the symbol recovery is entirely different
  • .NET assemblies — use analyzing-dotnet-assemblies
  • Suspected malware, before containment — use analyzing-malware for the environment, then come back here
  • General native RE — use analyzing-binaries

Confirm It Is Go, and Which Version

bash
strings -n 6 target | rg -m5 'go1\.[0-9]+|go:buildid|runtime\.main|GOROOT'
go version target                     # works on unstripped and many stripped builds
go version -m target                  # module list and build settings — free SBOM

go version -m is the highest-value first command. It prints the module dependency graph with versions, which gives you the third-party libraries in use before you disassemble anything — often answering the question outright (which HTTP library, which crypto, which C2 framework).

The Go version matters because pclntab layout changed at 1.2, 1.16, 1.18, and 1.20. Tooling that fails is usually version mismatch, not a hardened binary.

Recover Symbols

bash
# GoReSym — extracts pclntab, moduledata, types, and build info
GoReSym -t -d -p target > syms.json
#   -t  user type metadata
#   -d  include standard library
#   -p  paths

# redress — Go-aware analysis, works well when GoReSym struggles
redress info target
redress symbols target
redress types target

# Load into the disassembler
#   IDA:    AlphaGolang, golang_loader_assist, or the GoReSym IDA script
#   Ghidra: GolangAnalyzerExtension, or gotools
#   Binja:  the Golang loader plugin

After applying symbols, functions carry their real names — main.processRequest, crypto/tls.(*Conn).Handshake, github.com/vendor/pkg.Function. Filter to main.* and to third-party module paths. Everything under runtime., internal/, and the standard library is stock and is 90%+ of the function count.

bash
jq -r '.UserFunctions[].FunctionName' syms.json | rg -v '^(runtime|internal|reflect|sync)\.' | head -40

Reading Go Code in a Disassembler

Four things make Go listings confusing until you know them:

Strings have no terminator. Go strings are a pointer plus a length, so strings output runs adjacent literals together and the disassembler shows a pointer load followed by a length constant. Look for the pair — the constant next to the pointer is the length, and that is how you slice the correct substring out of the blob.

Calling convention. Before Go 1.17 all arguments and return values went on the stack, not in registers. From 1.17 a register ABI applies on amd64/arm64. A decompiler configured for the C convention will show wrong arguments; Go-aware plugins fix this, and it is the main reason decompiler output looks nonsensical.

Interface dispatch. Calls through an interface go via an itab — a table holding the concrete type and its method pointers. To resolve a call target, find the itab being loaded, then read the concrete type. Type recovery tools name these, which turns an indirect call into a readable one.

Goroutines and defers. go f() compiles to runtime.newproc with f as an argument, so concurrent logic does not appear as a direct call. defer becomes runtime.deferproc/deferreturn, which scatters cleanup code away from where it was written. When following control flow, check newproc call sites for work you would otherwise miss entirely.

Type Recovery

Go embeds full type descriptors for reflection. That means struct field names and layouts are recoverable — including the JSON tags that map straight to a wire protocol.

bash
redress types target | rg -A10 'type main\.'
# Struct tags like `json:"api_key"` recover the exact protocol field names

This is the fastest route to a Go service's API surface or a Go implant's C2 message format: recover the request and response structs, and you have the protocol without reading a single instruction.

Go-Specific Security Review

If the job is finding bugs rather than understanding behaviour, the Go-specific classes worth targeting:

  • Ignored errors. _ = on a function returning an error, especially around auth, crypto, and file operations.
  • math/rand for security values. Token, session ID, or nonce generation using the non-crypto RNG.
  • InsecureSkipVerify: true in a tls.Config.
  • fmt.Sprintf building SQL, shell commands, or URLs.
  • Data races on shared maps and structs — often the source of authorization bugs under load.
  • os/exec with a shell, or with an argument built from input.

With source available, use auditing-code-for-vulnerabilities and govulncheck; the above is for when you only have the binary.

Go Malware Notes

Go is common in cross-platform implants, and it leaves useful artifacts:

  • Module list from go version -m identifies the frameworks used — networking libraries, crypto, and sometimes the C2 project itself.
  • Build paths in the symbol table leak developer usernames, project names, and directory structures.
  • main. package function names frequently survive because stripping does not remove pclntab, giving you a capability list for free.
  • Some samples strip pclntab deliberately or use tools that mangle moduledata. When GoReSym and redress both fail on a sample that is otherwise clearly Go, treat that as an evasion indicator worth reporting — and fall back to scanning for the type descriptors directly.

Hand IOC and detection output to analyzing-malware and engineering-detections.

Rationalizations to Reject

  • "It's stripped, so there are no symbols." strip does not remove pclntab. Run GoReSym before concluding anything.
  • "The decompiler output is garbage." It is using the wrong calling convention. Apply a Go-aware plugin.
  • "Thousands of functions, this will take weeks." Almost all are runtime and stdlib. Filter to main.* and vendored modules.
  • "The strings are all mashed together." Go strings are pointer+length. Slice by the length constant.
  • "The tool failed, this binary is protected." Check the Go version against the tool's supported pclntab versions first.
  • "I need to trace every goroutine." Find runtime.newproc call sites and read the function passed to them.

References

  • analyzing-binaries — general triage and dynamic analysis around this
  • analyzing-malware — containment and IOC extraction for Go samples
  • auditing-code-for-vulnerabilities — the Go bug-class checklist when source exists
  • GoReSym, redress, AlphaGolang, GolangAnalyzerExtension, go version -m

Heefeg gestallte Froen

Wat mécht de KI-Skill Analyzing Go Binaries?

Go-Binaries am Reverse Engineering analyséieren, andeems Dir mat GoReSym, redress an IDA/Ghidra-Go-Plugins Funktiounsnimm an -typen aus pclntab a moduledata rekonstruéiert an dem Go seng net standardméisseg Calling Convention, Interface-Dispatch a String-Layout liest. Benotzt dëse Skill, wann e Binary Go-Runtime-Strings enthält, wann Strings runtime.main oder go:buildid weisen, wann e Binary ouni Symboler onerwaart grouss ass oder wann Dir Go-Malware oder e Go-baséierte Service analyséiert.

Firwat Analyzing Go Binaries op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Analyzing Go Binaries besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Analyzing Go Binaries an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/trilwu/secskills/tree/main/secskills-core/skills/analyzing-go-binaries an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Analyzing Go Binaries benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Analyzing Go Binaries benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Analyzing Go Binaries domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Analyzing Go Binaries gratis?

Jo. trilwu huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇