Analyzing Binaries logo

Analyzing Binaries

Community
trilwu
analyzing-binaries

Reverse engineer compiled binaries, firmware, and mobile app packages using triage, static disassembly, decompilation, and dynamic instrumentation. Use when analyzing an executable, ELF/PE/Mach-O file, firmware image, or stripped binary, recovering an algorithm or protocol, or working a CTF reversing challenge.

Overview

Publishertrilwu
Repositorysecskills
Skill nameanalyzing-binaries
Stars
144
Forks
15
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by trilwu on GitHub. Read the source before you install it.

Installation

Install the Analyzing Binaries AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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-binaries .claude/skills/analyzing-binaries
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Analyzing Binaries in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Analyzing Binaries on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Analyzing Binaries is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Analyzing Binaries

Reverse engineering is hypothesis testing against a program you cannot read. The cost of the job is dominated by how much code you look at, so the whole discipline is about narrowing: triage first, find the interesting few percent, then read that carefully.

When to Use

  • Understanding what an unknown or undocumented executable does
  • Recovering an algorithm, file format, or wire protocol from a binary
  • Locating a vulnerability in a closed-source target
  • Firmware analysis for embedded and IoT devices
  • Reversing challenges in CTFs

When NOT to Use

  • Live malware with intent to detonate — use analyzing-malware, which covers containment and safe detonation. Come back here for the disassembly.
  • A raw shellcode blob with no headers (position-independent payload, stager, egg-hunter) — use analyzing-shellcode
  • Source is available — use auditing-code-for-vulnerabilities
  • Android/iOS app assessment as a whole — use testing-mobile-applications; use this skill for the native .so/Mach-O components inside it
  • A framework runtime rather than a plain binary — the toolchain is specific and generic RE will not get there: reversing-flutter-apps for libapp.so/Dart snapshots, reversing-unity-il2cpp for libil2cpp.so plus global-metadata.dat, reversing-react-native-apps for Hermes bytecode
  • A language runtime with its own symbol recoveryanalyzing-go-binaries (pclntab survives stripping), analyzing-rust-binaries (panic strings leak source paths), analyzing-dotnet-assemblies (IL decompiles to C#). Reaching for generic RE on these wastes most of the effort
  • A packed or protected executable — use unpacking-protected-binaries first; there is nothing to disassemble until it is dumped
  • A whole firmware image to extract before any RE — use analyzing-firmware-images for binwalk, filesystem carving, and cross-architecture emulation; return here for an individual binary inside it

Triage First — Never Open a Disassembler Cold

Every minute here saves an hour in the decompiler.

bash
file target && du -h target
# Architecture, endianness, PIE, stripped or not — all decide your tooling
readelf -hSd target        # ELF: headers, sections, dynamic deps
rabin2 -I target           # radare2's normalized summary of any format
objdump -p target          # PE/ELF imports and load config

# Protections tell you what the author expected
checksec --file=target     # NX, canary, RELRO, PIE, Fortify

# Strings, but read them for structure rather than skimming
strings -n 8 -t x target | less        # ASCII with offsets
strings -e l -n 8 target               # UTF-16LE, essential on Windows

What triage should answer before you disassemble:

QuestionSignal
What language/toolchain built this?Rust/Go runtime strings, libstdc++, __gxx_personality, MSVC RTTI
Is it packed?High entropy, tiny import table, sections named UPX, .themida
What does it talk to?Imports of socket/HTTP APIs, embedded URLs, cert blobs
Where is the interesting logic?Imports of crypto/file/registry/process APIs
Is it stripped?nm -D empty, no .symtab
bash
# Entropy scan finds packed or embedded-blob regions
binwalk -E target
# Unpack the common case
upx -d target -o target.unpacked

Go and Rust binaries are usually not stripped in the ways that matter. Recover symbols before doing anything else — it changes the job from hours to minutes.

bash
# Go: recover function names and types
GoReSym -t -p target > syms.json    # or the redress / IDAGolangHelper plugins
# Rust: demangle
nm -C target 2>/dev/null | head

Static Analysis Workflow

Pick one tool and go deep; switching tools mid-analysis loses your annotations.

bash
# Ghidra headless: batch import, auto-analyze, run a script
analyzeHeadless /proj MyProj -import target -postScript Decompile.java

# radare2 / rizin interactive
r2 -AA target
# aaa            analyze everything
# afl            list functions, sorted by size — big ones first
# axt @ sym.f    cross-references TO a function (who calls this?)
# pdg @ main     decompile with ghidra plugin (r2ghidra)
# iz / izz       strings in data / whole binary
# /x deadbeef    search for a byte pattern

# Binary Ninja / IDA headless equivalents exist; the workflow is identical

Navigate by evidence, not by address order. The three entry points that find the interesting code fastest:

  1. Strings → xrefs. Find a message you saw at runtime, cross-reference it, land in the function that produced it.
  2. Imports → xrefs. Cross-reference recv, CreateProcess, fopen, EVP_EncryptInit to find the code that does the thing you care about.
  3. Entropy/constants. Crypto constants (AES S-box, SHA-2 round constants, MD5 magic) are recognizable; binwalk, findcrypt, and YARA rules locate them.

Then read outward from that anchor. Rename every function and variable as you work out what it does — a decompiler listing you have annotated is a completely different artifact from a raw one.

Recognizing Structure in Decompiler Output

The decompiler gives you C-shaped noise. What you are looking for:

  • Loop with an index into a byte array and an XOR — obfuscation or a homebrew cipher. Extract the key, decode offline.
  • A switch on a small integer read from input — command dispatch. This is usually the protocol, and it is the map for everything else.
  • memcpy with a length that came from the input — start of a memory safety review; see auditing-code-for-vulnerabilities.
  • Repeated [rax + 8*n] accesses on the same base — a struct. Define it in the tool; the listing collapses to readable code.
  • A call through a register right after a table load — vtable or callback dispatch. Recover the table to recover the class.

Dynamic Analysis

Static tells you what the code can do; dynamic tells you what it does. Run untrusted binaries only in an isolated VM with no host shares and networking under your control — see analyzing-malware for the containment procedure.

bash
# Syscall and API-level behaviour
strace -f -e trace=network,file,process -o trace.log ./target
ltrace -f ./target
# Windows equivalents: API Monitor, Procmon, drltrace

# Debugging
gdb -q ./target       # with pwndbg/GEF: `checksec`, `vmmap`, `heap`, `telescope`
lldb ./target         # macOS
x64dbg / WinDbg       # Windows

# Instrumentation — the highest-leverage dynamic technique
frida-trace -f ./target -i 'recv*' -i 'EVP_*'
# then edit the generated JS handlers to dump buffers and patch return values

Frida is the fastest route through anti-debugging, custom crypto, and license checks: hook the function after decryption rather than defeating the obfuscation that protects it.

Emulation for firmware and isolated routines:

bash
qemu-arm -L /usr/arm-linux-gnueabi ./target      # user-mode
# Unicorn for a single function: map memory, set registers, run, read result
# angr for symbolic execution when you need an input that reaches a state

Firmware

bash
binwalk -Me firmware.bin        # extract recursively
# Identify the filesystem before extracting: squashfs, jffs2, cramfs, ubifs
unsquashfs -d rootfs squashfs-root.bin

# Then treat the rootfs as a Linux system
rg -n 'password|admin|BEGIN (RSA|OPENSSH) PRIVATE KEY|api[_-]?key' -i rootfs/
find rootfs -name '*.pem' -o -name 'shadow' -o -name '*.conf'
# Web interface and startup scripts are where the bugs are
ls rootfs/etc/init.d rootfs/www rootfs/usr/sbin

For a bootloader or bare-metal image with no filesystem, find the load address (often in the vendor SDK or derivable from absolute-pointer clustering) before disassembling — a wrong base address makes the whole listing meaningless.

Anti-Analysis

Recognize it, then decide whether to defeat it or route around it.

TechniqueRecognitionResponse
PackingHigh entropy, stub + one big sectionUnpack, or dump from memory after the OEP
Anti-debugIsDebuggerPresent, ptrace(PTRACE_TRACEME), timing checksPatch the check, or hook it with Frida
VM detectionCPUID checks, MAC OUI, registry artifactsHarden the VM, or patch the detector
String obfuscationNo readable strings but obvious decode loopsEmulate the decoder over all call sites
Control-flow flatteningGiant switch on a state variableSymbolic deobfuscation, or ignore and work dynamically

Routing around is usually cheaper. If a check is defeating you statically, hook the function that consumes its result.

Rationalizations to Reject

  • "I'll read the whole binary." You will not. Triage and anchor, or you burn the engagement on library code.
  • "The decompiler output is wrong, so this is a dead end." Decompiler output is frequently wrong around calling conventions and structs. Check the disassembly for the specific instruction before drawing a conclusion.
  • "It's stripped, so symbols are gone." Library functions are recoverable (FLIRT/Sigs, bindiff against a compiled reference), and Go/Rust metadata usually survives.
  • "I'll just run it to see what it does." Not before you know whether it is hostile and where it is contained.
  • "The strings tell the story." Strings tell you where to look. Attackers plant misleading ones.

Deliverable

An RE report should let a reader act without repeating your work:

  • Identity — hashes, file type, architecture, compiler, packer
  • Capability — what it does, expressed as behaviour, not addresses
  • Key routines — annotated addresses with a name and a one-line purpose
  • Protocol/format — field-by-field, with a parser or Kaitai spec if useful
  • Indicators — network endpoints, file paths, mutexes, keys, constants
  • Open questions — what you did not resolve, and why

ATT&CK Coverage

Generated from secskills-core/ttp-index.json — edit that file, then run python3 scripts/sync_attack.py --write. Re-verify IDs against the current ATT&CK release before citing them in a report.

Defense Evasion (TA0005)

  • T1027 Obfuscated Files or Information — see also analyzing-malware, analyzing-shellcode
  • T1027.002 Software Packing — see also analyzing-malware
  • T1140 Deobfuscate/Decode Files or Information — see also analyzing-malware, analyzing-shellcode
  • T1497 Virtualization/Sandbox Evasion — see also analyzing-malware
  • T1622 Debugger Evasion — see also analyzing-malware

Detection content for any of these: engineering-detections. Proactive search: hunting-threats. Post-compromise: responding-to-incidents.

References

  • analyzing-malware — containment, detonation, and IOC extraction
  • testing-mobile-applications — APK/IPA workflows around native components
  • Ghidra, rizin/radare2, Binary Ninja, IDA — pick one and learn it deeply
  • Frida, angr, Unicorn, QEMU for dynamic and emulated analysis

Frequently asked questions

What does the Analyzing Binaries AI skill do?

Reverse engineer compiled binaries, firmware, and mobile app packages using triage, static disassembly, decompilation, and dynamic instrumentation. Use when analyzing an executable, ELF/PE/Mach-O file, firmware image, or stripped binary, recovering an algorithm or protocol, or working a CTF reversing challenge.

Why use Analyzing Binaries on TypingMind?

Because you install it once and use it with any model. Analyzing Binaries is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Analyzing Binaries in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/trilwu/secskills/tree/main/secskills-core/skills/analyzing-binaries. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Analyzing Binaries?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Analyzing Binaries?

As many as you like. As long as a model supports skills, you can use Analyzing Binaries with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Analyzing Binaries AI skill free?

Yes. It is published on GitHub by trilwu under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇