[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EHT86DQ1GBS21HRKBWWB02":3,"skill-same:01M6EHT86DQ1GBS21HRKBWWB02":71},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":47,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M6EHT86DQ1GBS21HRKBWWB02","binary-re-tool-setup",null,"Use when reverse engineering tools are missing, not working, or need configuration. Installation guides for radare2 (r2), Ghidra, GDB, QEMU, Frida, binutils, and cross-compilation toolchains. Keywords - \"install radare2\", \"setup ghidra\", \"r2 not found\", \"qemu missing\", \"tool not installed\", \"configure gdb\", \"cross-compiler\"","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002F2389-research\u002Fbinary-re-tool-setup\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"binary re tool setup","binary","tool","setup","use","guides","missing","radare2","installation","gdb","configuration","install","configure","Tools","frida","ghidra","engineering","compiler","2026-11-10 10:12:30",false,"---\nname: binary-re-tool-setup\ndescription: Use when reverse engineering tools are missing, not working, or need configuration. Installation guides for radare2 (r2), Ghidra, GDB, QEMU, Frida, binutils, and cross-compilation toolchains. Keywords - \"install radare2\", \"setup ghidra\", \"r2 not found\", \"qemu missing\", \"tool not installed\", \"configure gdb\", \"cross-compiler\"\n---\n\n# Tool Setup\n\n## Purpose\n\nEnsure required reverse engineering tools are available and properly configured for cross-architecture analysis.\n\n## When to Use\n\n- Before first analysis session\n- When tool commands fail\n- Setting up new analysis environment\n- Updating to newer tool versions\n\n## Required Tools\n\n| Tool | Purpose | Priority |\n|------|---------|----------|\n| radare2 | Static analysis, disassembly | **Required** |\n| rabin2 | Fast binary triage | **Required** (part of r2) |\n| qemu-user | Cross-arch emulation | **Required** |\n| gdb-multiarch | Cross-arch debugging | **Required** |\n| Ghidra | Decompilation | Recommended |\n| GEF | GDB enhancements | Recommended |\n| Frida | Dynamic instrumentation | Optional |\n| Unicorn | Snippet emulation | Optional |\n| Angr | Symbolic execution | Optional |\n\n## Installation by Platform\n\n### Ubuntu\u002FDebian\n\n```bash\n# Core tools\nsudo apt update\nsudo apt install -y \\\n  radare2 \\\n  qemu-user \\\n  qemu-user-static \\\n  gdb-multiarch \\\n  binutils-multiarch \\\n  jq                    # Required for JSON parsing in skill commands\n\n# ARM sysroots (for QEMU)\nsudo apt install -y \\\n  libc6-armhf-cross \\\n  libc6-arm64-cross \\\n  libc6-dev-armhf-cross \\\n  libc6-dev-arm64-cross\n\n# Additional utilities\nsudo apt install -y \\\n  file \\\n  binutils \\\n  elfutils \\\n  patchelf\n```\n\n### Windows (WSL2)\n\nWindows users should use WSL2 with Ubuntu for full compatibility:\n\n```powershell\n# PowerShell (Administrator) - Install WSL2 with Ubuntu\nwsl --install -d Ubuntu\n\n# Restart computer when prompted, then open Ubuntu terminal\n```\n\nInside WSL2 Ubuntu:\n\n```bash\n# Install all required tools\nsudo apt update && sudo apt install -y \\\n  radare2 \\\n  qemu-user \\\n  qemu-user-static \\\n  gdb-multiarch \\\n  binutils-multiarch \\\n  jq \\\n  file \\\n  patchelf\n\n# Fix file permissions for Windows-mounted drives\nsudo tee -a \u002Fetc\u002Fwsl.conf > \u002Fdev\u002Fnull \u003C\u003C 'EOF'\n[automount]\noptions = \"metadata,umask=22,fmask=11\"\nEOF\n\n# Restart WSL to apply changes\n# (In PowerShell: wsl --shutdown)\n```\n\n**WSL2 Tips:**\n- Copy binaries into `~` rather than using `\u002Fmnt\u002Fc\u002F...` paths (fewer permission issues)\n- Use `wsl --shutdown` in PowerShell to restart WSL after config changes\n- Docker Desktop integrates with WSL2 for container-based analysis\n\n### macOS (Homebrew)\n\n```bash\n# Core tools\nbrew install radare2 jq\n\n# NOTE: Homebrew QEMU may lack qemu-user targets\n# Verify: qemu-arm --version || echo \"qemu-user missing\"\n# If missing, use Docker for cross-arch execution (see below)\n\n# GDB requires special handling on macOS\nbrew install gdb\n# Note: Code signing required for debugging\n\n# ARM cross tools (optional, for static analysis only)\nbrew install arm-linux-gnueabihf-binutils\n```\n\n### macOS Docker Setup for Dynamic Analysis\n\nSince Homebrew doesn't provide `qemu-user`, use Docker for cross-architecture execution:\n\n```bash\n# Install Docker runtime (Colima is lightweight alternative to Docker Desktop)\nbrew install colima docker\n\n# Start Colima\ncolima start\n\n# Register multi-architecture emulation handlers\ndocker run --rm --privileged --platform linux\u002Farm64 \\\n  tonistiigi\u002Fbinfmt --install arm\n\n# Verify ARM32 emulation works\ndocker run --rm --platform linux\u002Farm\u002Fv7 arm32v7\u002Fdebian:bullseye-slim uname -m\n# Should output: armv7l\n\n# Verify ARM64 emulation works\ndocker run --rm --platform linux\u002Farm64 arm64v8\u002Fdebian:bullseye-slim uname -m\n# Should output: aarch64\n\n# Verify x86-32 emulation works\ndocker run --rm --platform linux\u002Fi386 i386\u002Fdebian:bullseye-slim uname -m\n# Should output: i686\n```\n\n**IMPORTANT:** On Colima, always mount from `~\u002F` not `\u002Ftmp\u002F`:\n```bash\n# ✅ Works\ndocker run -v ~\u002Fsamples:\u002Fwork ...\n\n# ❌ May fail silently\ndocker run -v \u002Ftmp\u002Fsamples:\u002Fwork ...\n```\n\n### Arch Linux\n\n```bash\nsudo pacman -S radare2 qemu-user gdb\nyay -S arm-linux-gnueabihf-glibc  # From AUR\n```\n\n## Tool-Specific Setup\n\n### radare2\n\n```bash\n# Verify installation\nr2 -v\nrabin2 -v\n\n# Install r2ghidra plugin (decompilation)\nr2pm init\nr2pm update\nr2pm -ci r2ghidra  # -ci = clean install\n\n# Verify r2ghidra is working (CRITICAL CHECK)\nr2 -qc 'pdg?' - 2>\u002Fdev\u002Fnull | grep -q Usage && echo \"r2ghidra OK\" || echo \"r2ghidra MISSING\"\n\n# Alternative verification\nr2 -c 'Ld' \u002Fbin\u002Fls | grep -i ghidra\n```\n\n**Common r2ghidra issues:**\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| `pdg` unknown command | Plugin not loaded | `r2pm -ci r2ghidra` |\n| Plugin loads but crashes | Version mismatch | Update both r2 and plugin |\n| Decompilation hangs | Large function | Use `pdf` instead, or Ghidra headless |\n\n**Configuration (~\u002F.radare2rc):**\n```\n# Disable colors for scripting\ne scr.color=false\n\n# Increase analysis limits\ne anal.timeout=120\ne anal.maxsize=67108864\n\n# JSON output by default for scripts\ne cfg.json.num=true\n```\n\n### Ghidra (Headless)\n\n```bash\n# Download from https:\u002F\u002Fghidra-sre.org\u002F\n# Extract to \u002Fopt\u002Fghidra\n\n# Verify headless script\n\u002Fopt\u002Fghidra\u002Fsupport\u002FanalyzeHeadless --help\n\n# Add to PATH\necho 'export PATH=$PATH:\u002Fopt\u002Fghidra\u002Fsupport' >> ~\u002F.bashrc\n```\n\n**Memory configuration (for large binaries):**\nEdit `\u002Fopt\u002Fghidra\u002Fsupport\u002FanalyzeHeadless`:\n```bash\nMAXMEM=4G  # Increase from default\n```\n\n### GEF (GDB Enhanced Features)\n\n```bash\n# Install GEF\nbash -c \"$(curl -fsSL https:\u002F\u002Fgef.blah.cat\u002Fsh)\"\n\n# Verify\ngdb -q -ex \"gef help\" -ex \"quit\"\n\n# For ARM Cortex-M support, also install gef-extras\ngit clone https:\u002F\u002Fgithub.com\u002Fhugsy\u002Fgef-extras.git ~\u002F.gef-extras\necho 'source ~\u002F.gef-extras\u002Fscripts\u002Fchecksec.py' >> ~\u002F.gdbinit\n```\n\n### Frida\n\n```bash\n# Install Frida tools\npip install frida-tools\n\n# Verify\nfrida --version\n\n# Install frida-server for device debugging (optional)\n# Download from https:\u002F\u002Fgithub.com\u002Ffrida\u002Ffrida\u002Freleases\n```\n\n### Unicorn (Python bindings)\n\n```bash\npip install unicorn\n\n# Verify\npython -c \"from unicorn import *; print('OK')\"\n```\n\n### Angr\n\n```bash\n# Create virtual environment (recommended)\npython -m venv ~\u002Fangr-venv\nsource ~\u002Fangr-venv\u002Fbin\u002Factivate\n\n# Install angr\npip install angr\n\n# Verify\npython -c \"import angr; print('OK')\"\n```\n\n### YARA\n\n```bash\n# Ubuntu\u002FDebian\nsudo apt install yara\n\n# Or from source for latest\ngit clone https:\u002F\u002Fgithub.com\u002FVirusTotal\u002Fyara.git\ncd yara\n.\u002Fbootstrap.sh\n.\u002Fconfigure\nmake && sudo make install\n\n# Python bindings\npip install yara-python\n```\n\n## Sysroot Setup\n\n### Standard Debian\u002FUbuntu Sysroots\n\nAlready installed via `libc6-*-cross` packages:\n\n```bash\n# Verify paths\nls \u002Fusr\u002Farm-linux-gnueabihf\u002Flib\u002F\nls \u002Fusr\u002Faarch64-linux-gnu\u002Flib\u002F\n```\n\n### Custom Sysroot from Device\n\n```bash\n# Pull from device via SSH\nmkdir -p ~\u002Fsysroots\u002Fdevice\nssh user@device \"tar czf - \u002Flib \u002Fusr\u002Flib\" | tar xzf - -C ~\u002Fsysroots\u002Fdevice\n\n# Or minimal extraction\nssh user@device \"tar czf - \u002Flib\u002Fld-* \u002Flib\u002Flibc.* \u002Flib\u002Flibpthread.* \u002Flib\u002Flibdl.*\" \\\n  | tar xzf - -C ~\u002Fsysroots\u002Fdevice\n```\n\n### Musl Sysroot\n\n```bash\n# From Alpine Linux\ndocker run -it --rm -v ~\u002Fsysroots:\u002Fout alpine:latest sh -c \\\n  \"apk add musl musl-dev && cp -a \u002Flib \u002Fusr \u002Fout\u002Falpine-musl\"\n```\n\n## Verification Script\n\nRun this to verify all tools are working:\n\n```bash\n#!\u002Fbin\u002Fbash\nset -e\n\necho \"=== Binary RE Tool Verification ===\"\n\n# radare2\necho -n \"radare2: \"\nr2 -v | head -1\n\n# rabin2\necho -n \"rabin2: \"\nrabin2 -v | head -1\n\n# QEMU\necho -n \"qemu-arm: \"\nqemu-arm --version | head -1\n\necho -n \"qemu-aarch64: \"\nqemu-aarch64 --version | head -1\n\n# GDB\necho -n \"gdb-multiarch: \"\ngdb-multiarch --version | head -1\n\n# Ghidra (optional)\nif command -v analyzeHeadless &> \u002Fdev\u002Fnull; then\n  echo -n \"Ghidra: \"\n  analyzeHeadless 2>&1 | head -1 || echo \"available\"\nelse\n  echo \"Ghidra: not installed (optional)\"\nfi\n\n# Frida (optional)\nif command -v frida &> \u002Fdev\u002Fnull; then\n  echo -n \"Frida: \"\n  frida --version\nelse\n  echo \"Frida: not installed (optional)\"\nfi\n\n# Sysroots\necho \"\"\necho \"=== Sysroots ===\"\n[ -d \u002Fusr\u002Farm-linux-gnueabihf ] && echo \"ARM hard-float: OK\" || echo \"ARM hard-float: MISSING\"\n[ -d \u002Fusr\u002Faarch64-linux-gnu ] && echo \"ARM64: OK\" || echo \"ARM64: MISSING\"\n\necho \"\"\necho \"=== Verification Complete ===\"\n```\n\n## Troubleshooting\n\n### Common Issues Quick Reference\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| `exec format error` in Docker | binfmt not registered | `docker run --privileged tonistiigi\u002Fbinfmt --install arm` |\n| `ld-linux.so.3 not found` | Linker path mismatch | `ln -sf \u002Flib\u002Fld-linux-armhf.so.3 \u002Flib\u002Fld-linux.so.3` |\n| `libXXX.so not found` | Missing dependency | `apt install` in container (check `rabin2 -l`) |\n| r2 `pdg` unknown command | r2ghidra not installed | `r2pm -ci r2ghidra` |\n| Empty xrefs from `axtj` | Shallow analysis | Use `aa; aac` or manual `af @addr` |\n| Empty Docker mount | Colima \u002Ftmp issue | Use `~\u002Fpath` instead of `\u002Ftmp\u002Fpath` |\n| strace fails in container | ptrace not implemented | Use `LD_DEBUG=files,libs` |\n\n### r2 \"Cannot open file\"\n\n```bash\n# Check permissions\nls -la binary\n\n# Try with explicit format\nr2 -b 32 binary\n```\n\n### QEMU \"Invalid ELF image\"\n\n```bash\n# Verify architecture matches\nfile binary\n\n# Check QEMU variant\nqemu-arm --help | grep -i \"target\"\n```\n\n### Docker \"exec format error\"\n\n```bash\n# Register binfmt handlers (one-time setup)\ndocker run --rm --privileged --platform linux\u002Farm64 \\\n  tonistiigi\u002Fbinfmt --install arm\n\n# Verify registration\ncat \u002Fproc\u002Fsys\u002Ffs\u002Fbinfmt_misc\u002Fqemu-arm\n```\n\n### GDB \"Cannot execute binary\"\n\n```bash\n# Use QEMU as gdbserver\nqemu-arm -g 1234 .\u002Fbinary &\ngdb-multiarch -ex \"target remote :1234\" .\u002Fbinary\n```\n\n### Ghidra \"Out of memory\"\n\n```bash\n# Increase heap in analyzeHeadless script\n# Or pass explicitly:\nanalyzeHeadless ... -max-cpu 4 -analysisTimeoutPerFile 600\n```\n\n### Missing ARM libraries in QEMU\n\n```bash\n# Set LD_LIBRARY_PATH in QEMU environment\nqemu-arm -E LD_LIBRARY_PATH=\u002Flib:\u002Fusr\u002Flib -L \u002Fsysroot .\u002Fbinary\n\n# Or use patchelf to modify binary's rpath\npatchelf --set-rpath \u002Flib:\u002Fusr\u002Flib .\u002Fbinary\n```\n\n### Docker container can't find libraries\n\n```bash\n# Inside container, install common dependencies\napt-get update && apt-get install -y libcap2 libacl1\n\n# Check what the binary needs\n# (Run rabin2 -l on host before entering container)\n```\n\n## Version Recommendations\n\n| Tool | Minimum | Recommended |\n|------|---------|-------------|\n| radare2 | 5.8.0 | Latest |\n| QEMU | 7.0 | 8.0+ |\n| GDB | 12.0 | 14.0+ |\n| Ghidra | 10.3 | 11.0+ |\n| Frida | 16.0 | Latest |\n\n## Environment Variables\n\nAdd to `~\u002F.bashrc` or `~\u002F.zshrc`:\n\n```bash\n# Ghidra\nexport GHIDRA_HOME=\u002Fopt\u002Fghidra\nexport PATH=$PATH:$GHIDRA_HOME\u002Fsupport\n\n# Default sysroot for QEMU\nexport QEMU_LD_PREFIX=\u002Fusr\u002Farm-linux-gnueabihf\n\n# Angr virtual environment\nalias angr-activate='source ~\u002Fangr-venv\u002Fbin\u002Factivate'\n```\n","# Tool Setup\n\n## Purpose\n\nEnsure required reverse engineering tools are available and properly configured for cross-architecture analysis.\n\n## When to Use\n\n- Before first analysis session\n- When tool commands fail\n- Setting up new analysis environment\n- Updating to newer tool versions\n\n## Required Tools\n\n| Tool | Purpose | Priority |\n|------|---------|----------|\n| radare2 | Static analysis, disassembly | **Required** |\n| rabin2 | Fast binary triage | **Required** (part of r2) |\n| qemu-user | Cross-arch emulation | **Required** |\n| gdb-multiarch | Cross-arch debugging | **Required** |\n| Ghidra | Decompilation | Recommended |\n| GEF | GDB enhancements | Recommended |\n| Frida | Dynamic instrumentation | Optional |\n| Unicorn | Snippet emulation | Optional |\n| Angr | Symbolic execution | Optional |\n\n## Installation by Platform\n\n### Ubuntu\u002FDebian\n\n```bash\n# Core tools\nsudo apt update\nsudo apt install -y \\\n  radare2 \\\n  qemu-user \\\n  qemu-user-static \\\n  gdb-multiarch \\\n  binutils-multiarch \\\n  jq                    # Required for JSON parsing in skill commands\n\n# ARM sysroots (for QEMU)\nsudo apt install -y \\\n  libc6-armhf-cross \\\n  libc6-arm64-cross \\\n  libc6-dev-armhf-cross \\\n  libc6-dev-arm64-cross\n\n# Additional utilities\nsudo apt install -y \\\n  file \\\n  binutils \\\n  elfutils \\\n  patchelf\n```\n\n### Windows (WSL2)\n\nWindows users should use WSL2 with Ubuntu for full compatibility:\n\n```powershell\n# PowerShell (Administrator) - Install WSL2 with Ubuntu\nwsl --install -d Ubuntu\n\n# Restart computer when prompted, then open Ubuntu terminal\n```\n\nInside WSL2 Ubuntu:\n\n```bash\n# Install all required tools\nsudo apt update && sudo apt install -y \\\n  radare2 \\\n  qemu-user \\\n  qemu-user-static \\\n  gdb-multiarch \\\n  binutils-multiarch \\\n  jq \\\n  file \\\n  patchelf\n\n# Fix file permissions for Windows-mounted drives\nsudo tee -a \u002Fetc\u002Fwsl.conf > \u002Fdev\u002Fnull \u003C\u003C 'EOF'\n[automount]\noptions = \"metadata,umask=22,fmask=11\"\nEOF\n\n# Restart WSL to apply changes\n# (In PowerShell: wsl --shutdown)\n```\n\n**WSL2 Tips:**\n- Copy binaries into `~` rather than using `\u002Fmnt\u002Fc\u002F...` paths (fewer permission issues)\n- Use `wsl --shutdown` in PowerShell to restart WSL after config changes\n- Docker Desktop integrates with WSL2 for container-based analysis\n\n### macOS (Homebrew)\n\n```bash\n# Core tools\nbrew install radare2 jq\n\n# NOTE: Homebrew QEMU may lack qemu-user targets\n# Verify: qemu-arm --version || echo \"qemu-user missing\"\n# If missing, use Docker for cross-arch execution (see below)\n\n# GDB requires special handling on macOS\nbrew install gdb\n# Note: Code signing required for debugging\n\n# ARM cross tools (optional, for static analysis only)\nbrew install arm-linux-gnueabihf-binutils\n```\n\n### macOS Docker Setup for Dynamic Analysis\n\nSince Homebrew doesn't provide `qemu-user`, use Docker for cross-architecture execution:\n\n```bash\n# Install Docker runtime (Colima is lightweight alternative to Docker Desktop)\nbrew install colima docker\n\n# Start Colima\ncolima start\n\n# Register multi-architecture emulation handlers\ndocker run --rm --privileged --platform linux\u002Farm64 \\\n  tonistiigi\u002Fbinfmt --install arm\n\n# Verify ARM32 emulation works\ndocker run --rm --platform linux\u002Farm\u002Fv7 arm32v7\u002Fdebian:bullseye-slim uname -m\n# Should output: armv7l\n\n# Verify ARM64 emulation works\ndocker run --rm --platform linux\u002Farm64 arm64v8\u002Fdebian:bullseye-slim uname -m\n# Should output: aarch64\n\n# Verify x86-32 emulation works\ndocker run --rm --platform linux\u002Fi386 i386\u002Fdebian:bullseye-slim uname -m\n# Should output: i686\n```\n\n**IMPORTANT:** On Colima, always mount from `~\u002F` not `\u002Ftmp\u002F`:\n```bash\n# ✅ Works\ndocker run -v ~\u002Fsamples:\u002Fwork ...\n\n# ❌ May fail silently\ndocker run -v \u002Ftmp\u002Fsamples:\u002Fwork ...\n```\n\n### Arch Linux\n\n```bash\nsudo pacman -S radare2 qemu-user gdb\nyay -S arm-linux-gnueabihf-glibc  # From AUR\n```\n\n## Tool-Specific Setup\n\n### radare2\n\n```bash\n# Verify installation\nr2 -v\nrabin2 -v\n\n# Install r2ghidra plugin (decompilation)\nr2pm init\nr2pm update\nr2pm -ci r2ghidra  # -ci = clean install\n\n# Verify r2ghidra is working (CRITICAL CHECK)\nr2 -qc 'pdg?' - 2>\u002Fdev\u002Fnull | grep -q Usage && echo \"r2ghidra OK\" || echo \"r2ghidra MISSING\"\n\n# Alternative verification\nr2 -c 'Ld' \u002Fbin\u002Fls | grep -i ghidra\n```\n\n**Common r2ghidra issues:**\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| `pdg` unknown command | Plugin not loaded | `r2pm -ci r2ghidra` |\n| Plugin loads but crashes | Version mismatch | Update both r2 and plugin |\n| Decompilation hangs | Large function | Use `pdf` instead, or Ghidra headless |\n\n**Configuration (~\u002F.radare2rc):**\n```\n# Disable colors for scripting\ne scr.color=false\n\n# Increase analysis limits\ne anal.timeout=120\ne anal.maxsize=67108864\n\n# JSON output by default for scripts\ne cfg.json.num=true\n```\n\n### Ghidra (Headless)\n\n```bash\n# Download from https:\u002F\u002Fghidra-sre.org\u002F\n# Extract to \u002Fopt\u002Fghidra\n\n# Verify headless script\n\u002Fopt\u002Fghidra\u002Fsupport\u002FanalyzeHeadless --help\n\n# Add to PATH\necho 'export PATH=$PATH:\u002Fopt\u002Fghidra\u002Fsupport' >> ~\u002F.bashrc\n```\n\n**Memory configuration (for large binaries):**\nEdit `\u002Fopt\u002Fghidra\u002Fsupport\u002FanalyzeHeadless`:\n```bash\nMAXMEM=4G  # Increase from default\n```\n\n### GEF (GDB Enhanced Features)\n\n```bash\n# Install GEF\nbash -c \"$(curl -fsSL https:\u002F\u002Fgef.blah.cat\u002Fsh)\"\n\n# Verify\ngdb -q -ex \"gef help\" -ex \"quit\"\n\n# For ARM Cortex-M support, also install gef-extras\ngit clone https:\u002F\u002Fgithub.com\u002Fhugsy\u002Fgef-extras.git ~\u002F.gef-extras\necho 'source ~\u002F.gef-extras\u002Fscripts\u002Fchecksec.py' >> ~\u002F.gdbinit\n```\n\n### Frida\n\n```bash\n# Install Frida tools\npip install frida-tools\n\n# Verify\nfrida --version\n\n# Install frida-server for device debugging (optional)\n# Download from https:\u002F\u002Fgithub.com\u002Ffrida\u002Ffrida\u002Freleases\n```\n\n### Unicorn (Python bindings)\n\n```bash\npip install unicorn\n\n# Verify\npython -c \"from unicorn import *; print('OK')\"\n```\n\n### Angr\n\n```bash\n# Create virtual environment (recommended)\npython -m venv ~\u002Fangr-venv\nsource ~\u002Fangr-venv\u002Fbin\u002Factivate\n\n# Install angr\npip install angr\n\n# Verify\npython -c \"import angr; print('OK')\"\n```\n\n### YARA\n\n```bash\n# Ubuntu\u002FDebian\nsudo apt install yara\n\n# Or from source for latest\ngit clone https:\u002F\u002Fgithub.com\u002FVirusTotal\u002Fyara.git\ncd yara\n.\u002Fbootstrap.sh\n.\u002Fconfigure\nmake && sudo make install\n\n# Python bindings\npip install yara-python\n```\n\n## Sysroot Setup\n\n### Standard Debian\u002FUbuntu Sysroots\n\nAlready installed via `libc6-*-cross` packages:\n\n```bash\n# Verify paths\nls \u002Fusr\u002Farm-linux-gnueabihf\u002Flib\u002F\nls \u002Fusr\u002Faarch64-linux-gnu\u002Flib\u002F\n```\n\n### Custom Sysroot from Device\n\n```bash\n# Pull from device via SSH\nmkdir -p ~\u002Fsysroots\u002Fdevice\nssh user@device \"tar czf - \u002Flib \u002Fusr\u002Flib\" | tar xzf - -C ~\u002Fsysroots\u002Fdevice\n\n# Or minimal extraction\nssh user@device \"tar czf - \u002Flib\u002Fld-* \u002Flib\u002Flibc.* \u002Flib\u002Flibpthread.* \u002Flib\u002Flibdl.*\" \\\n  | tar xzf - -C ~\u002Fsysroots\u002Fdevice\n```\n\n### Musl Sysroot\n\n```bash\n# From Alpine Linux\ndocker run -it --rm -v ~\u002Fsysroots:\u002Fout alpine:latest sh -c \\\n  \"apk add musl musl-dev && cp -a \u002Flib \u002Fusr \u002Fout\u002Falpine-musl\"\n```\n\n## Verification Script\n\nRun this to verify all tools are working:\n\n```bash\n#!\u002Fbin\u002Fbash\nset -e\n\necho \"=== Binary RE Tool Verification ===\"\n\n# radare2\necho -n \"radare2: \"\nr2 -v | head -1\n\n# rabin2\necho -n \"rabin2: \"\nrabin2 -v | head -1\n\n# QEMU\necho -n \"qemu-arm: \"\nqemu-arm --version | head -1\n\necho -n \"qemu-aarch64: \"\nqemu-aarch64 --version | head -1\n\n# GDB\necho -n \"gdb-multiarch: \"\ngdb-multiarch --version | head -1\n\n# Ghidra (optional)\nif command -v analyzeHeadless &> \u002Fdev\u002Fnull; then\n  echo -n \"Ghidra: \"\n  analyzeHeadless 2>&1 | head -1 || echo \"available\"\nelse\n  echo \"Ghidra: not installed (optional)\"\nfi\n\n# Frida (optional)\nif command -v frida &> \u002Fdev\u002Fnull; then\n  echo -n \"Frida: \"\n  frida --version\nelse\n  echo \"Frida: not installed (optional)\"\nfi\n\n# Sysroots\necho \"\"\necho \"=== Sysroots ===\"\n[ -d \u002Fusr\u002Farm-linux-gnueabihf ] && echo \"ARM hard-float: OK\" || echo \"ARM hard-float: MISSING\"\n[ -d \u002Fusr\u002Faarch64-linux-gnu ] && echo \"ARM64: OK\" || echo \"ARM64: MISSING\"\n\necho \"\"\necho \"=== Verification Complete ===\"\n```\n\n## Troubleshooting\n\n### Common Issues Quick Reference\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| `exec format error` in Docker | binfmt not registered | `docker run --privileged tonistiigi\u002Fbinfmt --install arm` |\n| `ld-linux.so.3 not found` | Linker path mismatch | `ln -sf \u002Flib\u002Fld-linux-armhf.so.3 \u002Flib\u002Fld-linux.so.3` |\n| `libXXX.so not found` | Missing dependency | `apt install` in container (check `rabin2 -l`) |\n| r2 `pdg` unknown command | r2ghidra not installed | `r2pm -ci r2ghidra` |\n| Empty xrefs from `axtj` | Shallow analysis | Use `aa; aac` or manual `af @addr` |\n| Empty Docker mount | Colima \u002Ftmp issue | Use `~\u002Fpath` instead of `\u002Ftmp\u002Fpath` |\n| strace fails in container | ptrace not implemented | Use `LD_DEBUG=files,libs` |\n\n### r2 \"Cannot open file\"\n\n```bash\n# Check permissions\nls -la binary\n\n# Try with explicit format\nr2 -b 32 binary\n```\n\n### QEMU \"Invalid ELF image\"\n\n```bash\n# Verify architecture matches\nfile binary\n\n# Check QEMU variant\nqemu-arm --help | grep -i \"target\"\n```\n\n### Docker \"exec format error\"\n\n```bash\n# Register binfmt handlers (one-time setup)\ndocker run --rm --privileged --platform linux\u002Farm64 \\\n  tonistiigi\u002Fbinfmt --install arm\n\n# Verify registration\ncat \u002Fproc\u002Fsys\u002Ffs\u002Fbinfmt_misc\u002Fqemu-arm\n```\n\n### GDB \"Cannot execute binary\"\n\n```bash\n# Use QEMU as gdbserver\nqemu-arm -g 1234 .\u002Fbinary &\ngdb-multiarch -ex \"target remote :1234\" .\u002Fbinary\n```\n\n### Ghidra \"Out of memory\"\n\n```bash\n# Increase heap in analyzeHeadless script\n# Or pass explicitly:\nanalyzeHeadless ... -max-cpu 4 -analysisTimeoutPerFile 600\n```\n\n### Missing ARM libraries in QEMU\n\n```bash\n# Set LD_LIBRARY_PATH in QEMU environment\nqemu-arm -E LD_LIBRARY_PATH=\u002Flib:\u002Fusr\u002Flib -L \u002Fsysroot .\u002Fbinary\n\n# Or use patchelf to modify binary's rpath\npatchelf --set-rpath \u002Flib:\u002Fusr\u002Flib .\u002Fbinary\n```\n\n### Docker container can't find libraries\n\n```bash\n# Inside container, install common dependencies\napt-get update && apt-get install -y libcap2 libacl1\n\n# Check what the binary needs\n# (Run rabin2 -l on host before entering container)\n```\n\n## Version Recommendations\n\n| Tool | Minimum | Recommended |\n|------|---------|-------------|\n| radare2 | 5.8.0 | Latest |\n| QEMU | 7.0 | 8.0+ |\n| GDB | 12.0 | 14.0+ |\n| Ghidra | 10.3 | 11.0+ |\n| Frida | 16.0 | Latest |\n\n## Environment Variables\n\nAdd to `~\u002F.bashrc` or `~\u002F.zshrc`:\n\n```bash\n# Ghidra\nexport GHIDRA_HOME=\u002Fopt\u002Fghidra\nexport PATH=$PATH:$GHIDRA_HOME\u002Fsupport\n\n# Default sysroot for QEMU\nexport QEMU_LD_PREFIX=\u002Fusr\u002Farm-linux-gnueabihf\n\n# Angr virtual environment\nalias angr-activate='source ~\u002Fangr-venv\u002Fbin\u002Factivate'\n```\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002F2389-research\u002Fbinary-re-tool-setup",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill binary-re-tool-setup",{"tool":57,"command":58},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill binary-re-tool-setup",{"tool":60,"command":61},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill binary-re-tool-setup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002F2389-research\u002Fbinary-re-tool-setup\u002FSKILL.md",true,[65],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"skill-report.json","REFERENCE","参考文档",25163,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002F2389-research\u002Fbinary-re-tool-setup\u002Fskill-report.json",[72,86,96,105,111,118],{"skillNo":73,"name":74,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":82,"publishedAt":37},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[77],{"categoryNo":78,"categoryName":79,"taxonomyType":80,"taxonomyTypeDesc":81},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[83,84,85],"model","model hierarchy","model hierarchy skill",{"skillNo":87,"name":88,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":92,"publishedAt":37},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[91],{"categoryNo":78,"categoryName":79,"taxonomyType":80,"taxonomyTypeDesc":81},[93,94,95],"MCP","zoom","zoom mcp",{"skillNo":97,"name":98,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":37},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[102,103,104,94],"sdk","zoom apps sdk","apps",{"skillNo":106,"name":107,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":37},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[107],{"skillNo":112,"name":113,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":117,"publishedAt":37},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[116],{"categoryNo":78,"categoryName":79,"taxonomyType":80,"taxonomyTypeDesc":81},[113],{"skillNo":119,"name":120,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":37},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[120]]