[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ECCSQ9BY772SNC12342EJ2":3,"skill-same:01M7ECCSQ9BY772SNC12342EJ2":56},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7ECCSQ9BY772SNC12342EJ2","firmware-static-analysis",null,"Systematic static analysis of ELF firmware binaries using command-line tools (file, strings, readelf, objdump, xxd). Use when the agent needs to perform initial reconnaissance on firmware\u002Fembedded binaries before reverse engineering, specifically for (1) Identifying architecture and binary characteristics, (2) Extracting metadata, strings, and imports, (3) Analyzing symbols, sections, and entry points, (4) Understanding binary structure and dependencies, (5) Generating structured analysis reports. Covers ARM, MIPS, x86, RISC-V, PowerPC architectures. Does NOT handle firmware extraction\u002Funpacking (use separate skill for that).","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F03-逆向工程\u002Ffirmware-static-analysis\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: firmware-static-analysis\ndescription: \"Systematic static analysis of ELF firmware binaries using command-line tools (file, strings, readelf, objdump, xxd). Use when the agent needs to perform initial reconnaissance on firmware\u002Fembedded binaries before reverse engineering, specifically for (1) Identifying architecture and binary characteristics, (2) Extracting metadata, strings, and imports, (3) Analyzing symbols, sections, and entry points, (4) Understanding binary structure and dependencies, (5) Generating structured analysis reports. Covers ARM, MIPS, x86, RISC-V, PowerPC architectures. Does NOT handle firmware extraction\u002Funpacking (use separate skill for that).\"\n---\n\n# Firmware Static Analysis\n\nPerform comprehensive static analysis of ELF firmware binaries using command-line reconnaissance tools. This skill guides systematic metadata extraction and binary characterization before deeper reverse engineering.\n\n## Analysis Workflow\n\nFollow this workflow when analyzing firmware binaries. Always start from Step 1 and proceed sequentially:\n\n1. **Binary identification** - Determine architecture, bitness, endianness\n2. **String extraction** - Find human-readable strings and clues\n3. **Symbol analysis** - Examine imports, exports, and functions\n4. **Structure analysis** - Analyze segments, sections, and entry points\n5. **Security analysis** - Check PIE, RELRO, stack canaries\n6. **Metadata extraction** - Find compiler info and build metadata\n7. **Report generation** - Create structured markdown report\n\n## Step 1: Binary Identification\n\nIdentify the target architecture and basic characteristics.\n\n```bash\nfile \u003Cbinary>\n```\n\n**Extract these details:**\n- CPU architecture (ARM, MIPS, x86, RISC-V, PowerPC, etc.)\n- Bitness (32-bit or 64-bit)\n- Endianness (LSB\u002Flittle-endian or MSB\u002Fbig-endian)\n- Link type (dynamically linked, statically linked, or not linked)\n- Binary type (executable, shared object, relocatable)\n\n**Architecture reference:** If unfamiliar with the detected architecture, read `references\u002Farchitectures.md` for architecture-specific details including calling conventions and common use cases.\n\n## Step 2: String Extraction\n\nExtract all printable strings to understand program behavior and inputs.\n\n```bash\nstrings -a \u003Cbinary> > strings.txt\n```\n\n**Analyze for:**\n- Usage\u002Fhelp text patterns (`usage|help|--`)\n- Format strings (`%s|%d|%x`)\n- Error messages (`error|fail|invalid`)\n- File paths and directories (`\u002Fetc\u002F|\u002Ftmp\u002F|\u002Fvar\u002F`)\n- URLs and network addresses\n- Hardcoded credentials (common in firmware!)\n- Library names and debug paths\n- Version strings and build info\n\n**Targeted searches:**\n```bash\nstrings -a \u003Cbinary> | grep -i -E 'usage|error|%d|%s'\nstrings -a \u003Cbinary> | grep -i -E 'password|admin|root|key'\nstrings -a \u003Cbinary> | grep -E '^\u002F|^\\.'  # File paths\n```\n\n## Step 3: Symbol Analysis\n\nExamine what functions the binary imports and exports.\n\n### Dynamic Symbols (when .dynsym is present, including many stripped binaries)\n```bash\nreadelf --dyn-syms --wide \u003Cbinary>\n```\n\n**Look for:**\n- Imported functions (from libc, libssl, custom libraries)\n- Exported functions (what this binary provides)\n- Function names that hint at behavior (`authenticate`, `encrypt`, `parse`, etc.)\n- Standard library usage patterns\n\n**Alternative command:**\n```bash\nobjdump -T \u003Cbinary>\n```\n\n### Function Discovery\nIdentify key functions for later disassembly:\n```bash\nreadelf -Ws \u003Cbinary> | grep ' main$'\nreadelf -Ws \u003Cbinary> | grep -E 'FUNC.*GLOBAL'\n```\n\nCommon firmware functions to look for: `main`, `init`, `setup`, `parse_config`, `handle_request`, `authenticate`, `encrypt`, `decrypt`\n\n## Step 4: Structure Analysis\n\nAnalyze the binary's internal structure.\n\n### ELF Header\n```bash\nreadelf -h \u003Cbinary>\n```\n\n**Key information:**\n- **Entry point address** - Where execution begins\n- **Type** - ET_EXEC (non-PIE) or ET_DYN (PIE\u002Fshared object)\n- **Machine** - Confirm architecture\n- **Section headers** - Number and locations\n\n### Program Headers (Segments)\n```bash\nreadelf -lW \u003Cbinary>\n```\n\n**Check for:**\n- **INTERP segment** - Dynamic linker path (if dynamically linked)\n- **LOAD segments** - Memory layout (addresses, permissions)\n- **DYNAMIC segment** - Dynamic linking information\n- **GNU_STACK** - Stack permissions (NX bit)\n\n### Section Headers\n```bash\nreadelf -S \u003Cbinary>\n```\n\n**Important sections:**\n- `.text` - Code section (note size and address)\n- `.rodata` - Read-only data (strings, constants)\n- `.data` - Initialized data\n- `.bss` - Uninitialized data\n- `.dynsym` \u002F `.dynstr` - Dynamic symbols and strings\n- `.plt` \u002F `.got` - Procedure linkage table and global offset table\n- `.comment` - Compiler information\n\n**Verify symbol tables directly:**\n```bash\n# Get .dynsym and .dynstr offsets from readelf -S\nxxd -s 0x\u003CDYNSYM_OFFSET> -l 256 \u003Cbinary>\nxxd -s 0x\u003CDYNSTR_OFFSET> -l 256 \u003Cbinary>\n```\n\n### Dynamic Section\n```bash\nreadelf -d \u003Cbinary>\n```\n\n**Extract:**\n- **NEEDED** - Shared library dependencies\n- **SONAME** - Shared object name (if present)\n- **RPATH\u002FRUNPATH** - Library search paths\n- **FLAGS** - Dynamic linking flags\n\n## Step 5: Security Analysis\n\nAssess available evidence, retaining an **unknown\u002Fnot observed** result where needed.\n`PT_GNU_RELRO` is a program header. For conventional dynamically linked ELF,\nthat segment plus immediate binding (`BIND_NOW` or `FLAGS\u002FFLAGS_1` containing\n`NOW`) indicates full RELRO; the segment alone indicates partial RELRO.\nAbsent dynamic tags in a static binary require a different assessment.\n\n`GNU_STACK` without `E` requests a non-executable stack. A missing header is\nunknown and depends on the ABI\u002Fkernel. Canary or `_chk` symbols show some\ninstrumentation, not complete coverage; absence does not prove absence in\nstripped, static or inlined code. Inspect relevant functions when reporting.\n\n### PIE\u002FASLR Check\n```bash\nreadelf -h \u003Cbinary> | grep Type\n```\n- `Type: EXEC (Executable file)` = Non-PIE (fixed addresses)\n- `Type: DYN (Shared object file)` = PIE candidate OR shared library. Check `FLAGS_1: PIE`, loader metadata and intended use.\n- ASLR is runtime policy, not established by ELF type. Verify on the target kernel and compare mappings across runs.\n\n### Security Features Check\n```bash\nreadelf -dW \u003Cbinary> | grep -E 'BIND_NOW|FLAGS.*NOW'\nreadelf -lW \u003Cbinary> | grep -E 'GNU_RELRO|GNU_STACK'\nreadelf -Ws \u003Cbinary> | grep -E '__stack_chk_fail|__(memcpy|memmove|strcpy|strncpy|sprintf|snprintf|printf)_chk'\n```\n\n**Look for:**\n- **RELRO** (RELocation Read-Only) - GOT protections\n- **Stack canaries** (`__stack_chk_fail`)\n- **NX stack** (non-executable stack via GNU_STACK)\n- **Fortify evidence**: checked wrappers such as `__memcpy_chk` or `__snprintf_chk`\n\n## Step 6: Metadata Extraction\n\nExtract compiler and build information.\n\n### Compiler Info\n```bash\nreadelf -p .comment \u003Cbinary>\nstrings \u003Cbinary> | grep -i -E 'gcc|clang|build|version'\n```\n\n**Look for:**\n- GCC\u002FClang version\n- Target triplet (e.g., `arm-linux-gnueabihf-gcc`)\n- Optimization level hints\n- Build date\u002Ftime\n\n### Build Metadata\n```bash\nreadelf -n \u003Cbinary>  # Build ID and ABI info\n```\n\n## Step 7: Disassembly (with symbols)\n\nIf symbols are present, disassemble key functions.\n\n### Verify Symbol Availability\n```bash\nreadelf -Ws \u003Cbinary> | grep ' main$'\nreadelf -Ws \u003Cbinary> | grep -E '\u003Cfunction_name>'\n```\n\n### Disassemble Functions\n```bash\nobjdump -d --disassemble=main \u003Cbinary>\nobjdump -d --disassemble=\u003Cfunction_name> \u003Cbinary>\n```\n\n**Analysis tips:**\n- Look for calls to imported functions (e.g., `printf@plt`, `strcmp@plt`)\n- Identify control flow (branches, loops)\n- Note register usage patterns\n- Track function call arguments\n\n## Step 8: Handling Stripped Binaries\n\nWhen symbols are removed, adapt the analysis approach.\n\n### Strip and Compare\n```bash\ncp \u003Cbinary> \u003Cbinary>_stripped\nstrip \u003Cbinary>_stripped\n\n# Compare before\u002Fafter\nreadelf -Ws \u003Cbinary>\nreadelf -Ws \u003Cbinary>_stripped\n```\n\n### Disassemble Without Symbols\n```bash\n# Name-based disassembly will fail:\nobjdump -d --disassemble=main \u003Cbinary>_stripped  # FAILS\n\n# Instead, dump entire .text section:\nobjdump -d -j .text \u003Cbinary>_stripped | less\n```\n\n**Function identification strategies:**\n- Look for common prologues (e.g., ARM: `push {r11, lr}`, x86: `push rbp`)\n- Find calls to known PLT functions (e.g., `atoi@plt`, `printf@plt`)\n- Use entry point address from readelf -h as starting point\n- Look for string references (xrefs to .rodata)\n\n## Report Generation\n\nCreate a structured markdown report with all findings. Use this template:\n\n```markdown\n# Firmware Static Analysis Report\n\n**Binary:** \u003Cfilename>\n**Analysis Date:** \u003Cdate>\n\n## Executive Summary\n\n[2-3 sentence overview of the binary: purpose, architecture, and key findings]\n\n## Binary Characteristics\n\n- **File Type:** [ELF type]\n- **Architecture:** [CPU architecture, bitness, endianness]\n- **Entry Point:** [address]\n- **Link Type:** [static\u002Fdynamic]\n- **PIE:** [Yes\u002FNo\u002FUnknown; evidence]\n- **ASLR:** [Runtime tested \u002F Not tested; evidence]\n- **Stripped:** [Yes\u002FNo]\n\n## Architecture Details\n\n- **CPU:** [ARM\u002FMIPS\u002Fx86\u002FRISC-V\u002Fetc.]\n- **Bitness:** [32-bit \u002F 64-bit]\n- **Endianness:** [Little-endian \u002F Big-endian]\n- **Calling Convention:** [ABI details]\n\n## Symbol Analysis\n\n### Imported Functions\n[List key imported functions and what they suggest about behavior]\n- `printf` - Formatting and output\n- `socket` - Network communication\n- `strcmp` - String comparison\n- etc.\n\n### Exported Functions\n[List exported functions if any]\n\n### Key Functions Identified\n[List main and other important functions found]\n\n## String Analysis\n\n### Interesting Strings\n[List notable strings found, categorized by type]\n\n**Configuration\u002FPaths:**\n- `\u002Fetc\u002Fconfig.conf`\n- etc.\n\n**Credentials\u002FKeys:**\n- `admin:default_password` [⚠️ SECURITY CONCERN]\n- etc.\n\n**Error Messages:**\n- \"Invalid input\"\n- etc.\n\n**Network\u002FURLs:**\n- `http:\u002F\u002Fupdate.example.com`\n- etc.\n\n## Structure Analysis\n\n### Segments\n[List key program segments with addresses and permissions]\n\n### Sections\n[List important sections with sizes]\n- `.text`: [size] - Code\n- `.rodata`: [size] - Read-only data\n- etc.\n\n### Dynamic Dependencies\n[List required shared libraries]\n- `libc.so.6`\n- `libssl.so.1.1`\n- etc.\n\n## Security Analysis\n\n### Mitigations Detected\n- PIE: [Yes\u002FNo\u002FUnknown; evidence]\n- ASLR: [Runtime result\u002FNot tested]\n- RELRO: [Full\u002FPartial\u002FNone\u002FUnknown; evidence]\n- Stack canary evidence: [Observed\u002FNot observed\u002FUnknown; coverage unverified]\n- Stack execute request: [Non-executable\u002FExecutable\u002FMissing; runtime unverified]\n- Fortify evidence: [Observed\u002FNot observed\u002FUnknown]\n\n### Security Concerns\n[List any security issues found]\n- Hardcoded credentials\n- Weak\u002Fno ASLR\n- Missing stack protection\n- etc.\n\n## Metadata\n\n### Compiler Information\n- **Compiler:** [GCC\u002FClang version]\n- **Target:** [Toolchain target triplet]\n- **Build Date:** [if available]\n\n### Build ID\n[Build ID from notes section]\n\n## Disassembly Highlights\n\n### main() Function\n[Brief description of what main does based on disassembly]\n\n### Other Key Functions\n[Brief description of other important functions]\n\n## Recommendations for Further Analysis\n\n1. [Specific next steps based on findings]\n2. [Tools to use next: Ghidra, IDA, Binary Ninja, etc.]\n3. [Specific functions or areas to focus on]\n4. [Dynamic analysis recommendations]\n\n## Appendix\n\n### Full Symbol Table\n[Attach or reference full symbol list if relevant]\n\n### Complete String Dump\n[Reference to strings.txt file]\n```\n\n## Additional References\n\n- **Architecture details:** See `references\u002Farchitectures.md` for architecture-specific calling conventions and characteristics\n- **Toolchain commands:** See `references\u002Ftoolchain.md` for detailed command syntax and options\n\n## Tips\n\n- **Always work on a copy** - Never modify the original firmware binary\n- **Save intermediate outputs** - Redirect command outputs to files for reference (e.g., `strings -a binary > strings.txt`)\n- **Cross-reference findings** - Strings\u002Fimports are candidates; verify authentication use, attacker control and reachability before reporting a vulnerability\n- **Architecture matters** - Load the architecture reference early if unfamiliar with the target\n- **Document as you go** - Build the report incrementally during analysis\n- **Look for the unusual** - Hardcoded credentials, unusual network addresses, and debug paths are common in firmware\n- **Check toolchain** - Version strings are clues; verify component identity, backports and vulnerable code before assigning a CVE\n- **PIE vs non-PIE** - ET_EXEC binaries have fixed addresses, making analysis easier\n- **Stripped binaries** - Don't despair, entry point and PLT calls still provide context\n","# Firmware Static Analysis\n\nPerform comprehensive static analysis of ELF firmware binaries using command-line reconnaissance tools. This skill guides systematic metadata extraction and binary characterization before deeper reverse engineering.\n\n## Analysis Workflow\n\nFollow this workflow when analyzing firmware binaries. Always start from Step 1 and proceed sequentially:\n\n1. **Binary identification** - Determine architecture, bitness, endianness\n2. **String extraction** - Find human-readable strings and clues\n3. **Symbol analysis** - Examine imports, exports, and functions\n4. **Structure analysis** - Analyze segments, sections, and entry points\n5. **Security analysis** - Check PIE, RELRO, stack canaries\n6. **Metadata extraction** - Find compiler info and build metadata\n7. **Report generation** - Create structured markdown report\n\n## Step 1: Binary Identification\n\nIdentify the target architecture and basic characteristics.\n\n```bash\nfile \u003Cbinary>\n```\n\n**Extract these details:**\n- CPU architecture (ARM, MIPS, x86, RISC-V, PowerPC, etc.)\n- Bitness (32-bit or 64-bit)\n- Endianness (LSB\u002Flittle-endian or MSB\u002Fbig-endian)\n- Link type (dynamically linked, statically linked, or not linked)\n- Binary type (executable, shared object, relocatable)\n\n**Architecture reference:** If unfamiliar with the detected architecture, read `references\u002Farchitectures.md` for architecture-specific details including calling conventions and common use cases.\n\n## Step 2: String Extraction\n\nExtract all printable strings to understand program behavior and inputs.\n\n```bash\nstrings -a \u003Cbinary> > strings.txt\n```\n\n**Analyze for:**\n- Usage\u002Fhelp text patterns (`usage|help|--`)\n- Format strings (`%s|%d|%x`)\n- Error messages (`error|fail|invalid`)\n- File paths and directories (`\u002Fetc\u002F|\u002Ftmp\u002F|\u002Fvar\u002F`)\n- URLs and network addresses\n- Hardcoded credentials (common in firmware!)\n- Library names and debug paths\n- Version strings and build info\n\n**Targeted searches:**\n```bash\nstrings -a \u003Cbinary> | grep -i -E 'usage|error|%d|%s'\nstrings -a \u003Cbinary> | grep -i -E 'password|admin|root|key'\nstrings -a \u003Cbinary> | grep -E '^\u002F|^\\.'  # File paths\n```\n\n## Step 3: Symbol Analysis\n\nExamine what functions the binary imports and exports.\n\n### Dynamic Symbols (when .dynsym is present, including many stripped binaries)\n```bash\nreadelf --dyn-syms --wide \u003Cbinary>\n```\n\n**Look for:**\n- Imported functions (from libc, libssl, custom libraries)\n- Exported functions (what this binary provides)\n- Function names that hint at behavior (`authenticate`, `encrypt`, `parse`, etc.)\n- Standard library usage patterns\n\n**Alternative command:**\n```bash\nobjdump -T \u003Cbinary>\n```\n\n### Function Discovery\nIdentify key functions for later disassembly:\n```bash\nreadelf -Ws \u003Cbinary> | grep ' main$'\nreadelf -Ws \u003Cbinary> | grep -E 'FUNC.*GLOBAL'\n```\n\nCommon firmware functions to look for: `main`, `init`, `setup`, `parse_config`, `handle_request`, `authenticate`, `encrypt`, `decrypt`\n\n## Step 4: Structure Analysis\n\nAnalyze the binary's internal structure.\n\n### ELF Header\n```bash\nreadelf -h \u003Cbinary>\n```\n\n**Key information:**\n- **Entry point address** - Where execution begins\n- **Type** - ET_EXEC (non-PIE) or ET_DYN (PIE\u002Fshared object)\n- **Machine** - Confirm architecture\n- **Section headers** - Number and locations\n\n### Program Headers (Segments)\n```bash\nreadelf -lW \u003Cbinary>\n```\n\n**Check for:**\n- **INTERP segment** - Dynamic linker path (if dynamically linked)\n- **LOAD segments** - Memory layout (addresses, permissions)\n- **DYNAMIC segment** - Dynamic linking information\n- **GNU_STACK** - Stack permissions (NX bit)\n\n### Section Headers\n```bash\nreadelf -S \u003Cbinary>\n```\n\n**Important sections:**\n- `.text` - Code section (note size and address)\n- `.rodata` - Read-only data (strings, constants)\n- `.data` - Initialized data\n- `.bss` - Uninitialized data\n- `.dynsym` \u002F `.dynstr` - Dynamic symbols and strings\n- `.plt` \u002F `.got` - Procedure linkage table and global offset table\n- `.comment` - Compiler information\n\n**Verify symbol tables directly:**\n```bash\n# Get .dynsym and .dynstr offsets from readelf -S\nxxd -s 0x\u003CDYNSYM_OFFSET> -l 256 \u003Cbinary>\nxxd -s 0x\u003CDYNSTR_OFFSET> -l 256 \u003Cbinary>\n```\n\n### Dynamic Section\n```bash\nreadelf -d \u003Cbinary>\n```\n\n**Extract:**\n- **NEEDED** - Shared library dependencies\n- **SONAME** - Shared object name (if present)\n- **RPATH\u002FRUNPATH** - Library search paths\n- **FLAGS** - Dynamic linking flags\n\n## Step 5: Security Analysis\n\nAssess available evidence, retaining an **unknown\u002Fnot observed** result where needed.\n`PT_GNU_RELRO` is a program header. For conventional dynamically linked ELF,\nthat segment plus immediate binding (`BIND_NOW` or `FLAGS\u002FFLAGS_1` containing\n`NOW`) indicates full RELRO; the segment alone indicates partial RELRO.\nAbsent dynamic tags in a static binary require a different assessment.\n\n`GNU_STACK` without `E` requests a non-executable stack. A missing header is\nunknown and depends on the ABI\u002Fkernel. Canary or `_chk` symbols show some\ninstrumentation, not complete coverage; absence does not prove absence in\nstripped, static or inlined code. Inspect relevant functions when reporting.\n\n### PIE\u002FASLR Check\n```bash\nreadelf -h \u003Cbinary> | grep Type\n```\n- `Type: EXEC (Executable file)` = Non-PIE (fixed addresses)\n- `Type: DYN (Shared object file)` = PIE candidate OR shared library. Check `FLAGS_1: PIE`, loader metadata and intended use.\n- ASLR is runtime policy, not established by ELF type. Verify on the target kernel and compare mappings across runs.\n\n### Security Features Check\n```bash\nreadelf -dW \u003Cbinary> | grep -E 'BIND_NOW|FLAGS.*NOW'\nreadelf -lW \u003Cbinary> | grep -E 'GNU_RELRO|GNU_STACK'\nreadelf -Ws \u003Cbinary> | grep -E '__stack_chk_fail|__(memcpy|memmove|strcpy|strncpy|sprintf|snprintf|printf)_chk'\n```\n\n**Look for:**\n- **RELRO** (RELocation Read-Only) - GOT protections\n- **Stack canaries** (`__stack_chk_fail`)\n- **NX stack** (non-executable stack via GNU_STACK)\n- **Fortify evidence**: checked wrappers such as `__memcpy_chk` or `__snprintf_chk`\n\n## Step 6: Metadata Extraction\n\nExtract compiler and build information.\n\n### Compiler Info\n```bash\nreadelf -p .comment \u003Cbinary>\nstrings \u003Cbinary> | grep -i -E 'gcc|clang|build|version'\n```\n\n**Look for:**\n- GCC\u002FClang version\n- Target triplet (e.g., `arm-linux-gnueabihf-gcc`)\n- Optimization level hints\n- Build date\u002Ftime\n\n### Build Metadata\n```bash\nreadelf -n \u003Cbinary>  # Build ID and ABI info\n```\n\n## Step 7: Disassembly (with symbols)\n\nIf symbols are present, disassemble key functions.\n\n### Verify Symbol Availability\n```bash\nreadelf -Ws \u003Cbinary> | grep ' main$'\nreadelf -Ws \u003Cbinary> | grep -E '\u003Cfunction_name>'\n```\n\n### Disassemble Functions\n```bash\nobjdump -d --disassemble=main \u003Cbinary>\nobjdump -d --disassemble=\u003Cfunction_name> \u003Cbinary>\n```\n\n**Analysis tips:**\n- Look for calls to imported functions (e.g., `printf@plt`, `strcmp@plt`)\n- Identify control flow (branches, loops)\n- Note register usage patterns\n- Track function call arguments\n\n## Step 8: Handling Stripped Binaries\n\nWhen symbols are removed, adapt the analysis approach.\n\n### Strip and Compare\n```bash\ncp \u003Cbinary> \u003Cbinary>_stripped\nstrip \u003Cbinary>_stripped\n\n# Compare before\u002Fafter\nreadelf -Ws \u003Cbinary>\nreadelf -Ws \u003Cbinary>_stripped\n```\n\n### Disassemble Without Symbols\n```bash\n# Name-based disassembly will fail:\nobjdump -d --disassemble=main \u003Cbinary>_stripped  # FAILS\n\n# Instead, dump entire .text section:\nobjdump -d -j .text \u003Cbinary>_stripped | less\n```\n\n**Function identification strategies:**\n- Look for common prologues (e.g., ARM: `push {r11, lr}`, x86: `push rbp`)\n- Find calls to known PLT functions (e.g., `atoi@plt`, `printf@plt`)\n- Use entry point address from readelf -h as starting point\n- Look for string references (xrefs to .rodata)\n\n## Report Generation\n\nCreate a structured markdown report with all findings. Use this template:\n\n```markdown\n# Firmware Static Analysis Report\n\n**Binary:** \u003Cfilename>\n**Analysis Date:** \u003Cdate>\n\n## Executive Summary\n\n[2-3 sentence overview of the binary: purpose, architecture, and key findings]\n\n## Binary Characteristics\n\n- **File Type:** [ELF type]\n- **Architecture:** [CPU architecture, bitness, endianness]\n- **Entry Point:** [address]\n- **Link Type:** [static\u002Fdynamic]\n- **PIE:** [Yes\u002FNo\u002FUnknown; evidence]\n- **ASLR:** [Runtime tested \u002F Not tested; evidence]\n- **Stripped:** [Yes\u002FNo]\n\n## Architecture Details\n\n- **CPU:** [ARM\u002FMIPS\u002Fx86\u002FRISC-V\u002Fetc.]\n- **Bitness:** [32-bit \u002F 64-bit]\n- **Endianness:** [Little-endian \u002F Big-endian]\n- **Calling Convention:** [ABI details]\n\n## Symbol Analysis\n\n### Imported Functions\n[List key imported functions and what they suggest about behavior]\n- `printf` - Formatting and output\n- `socket` - Network communication\n- `strcmp` - String comparison\n- etc.\n\n### Exported Functions\n[List exported functions if any]\n\n### Key Functions Identified\n[List main and other important functions found]\n\n## String Analysis\n\n### Interesting Strings\n[List notable strings found, categorized by type]\n\n**Configuration\u002FPaths:**\n- `\u002Fetc\u002Fconfig.conf`\n- etc.\n\n**Credentials\u002FKeys:**\n- `admin:default_password` [⚠️ SECURITY CONCERN]\n- etc.\n\n**Error Messages:**\n- \"Invalid input\"\n- etc.\n\n**Network\u002FURLs:**\n- `http:\u002F\u002Fupdate.example.com`\n- etc.\n\n## Structure Analysis\n\n### Segments\n[List key program segments with addresses and permissions]\n\n### Sections\n[List important sections with sizes]\n- `.text`: [size] - Code\n- `.rodata`: [size] - Read-only data\n- etc.\n\n### Dynamic Dependencies\n[List required shared libraries]\n- `libc.so.6`\n- `libssl.so.1.1`\n- etc.\n\n## Security Analysis\n\n### Mitigations Detected\n- PIE: [Yes\u002FNo\u002FUnknown; evidence]\n- ASLR: [Runtime result\u002FNot tested]\n- RELRO: [Full\u002FPartial\u002FNone\u002FUnknown; evidence]\n- Stack canary evidence: [Observed\u002FNot observed\u002FUnknown; coverage unverified]\n- Stack execute request: [Non-executable\u002FExecutable\u002FMissing; runtime unverified]\n- Fortify evidence: [Observed\u002FNot observed\u002FUnknown]\n\n### Security Concerns\n[List any security issues found]\n- Hardcoded credentials\n- Weak\u002Fno ASLR\n- Missing stack protection\n- etc.\n\n## Metadata\n\n### Compiler Information\n- **Compiler:** [GCC\u002FClang version]\n- **Target:** [Toolchain target triplet]\n- **Build Date:** [if available]\n\n### Build ID\n[Build ID from notes section]\n\n## Disassembly Highlights\n\n### main() Function\n[Brief description of what main does based on disassembly]\n\n### Other Key Functions\n[Brief description of other important functions]\n\n## Recommendations for Further Analysis\n\n1. [Specific next steps based on findings]\n2. [Tools to use next: Ghidra, IDA, Binary Ninja, etc.]\n3. [Specific functions or areas to focus on]\n4. [Dynamic analysis recommendations]\n\n## Appendix\n\n### Full Symbol Table\n[Attach or reference full symbol list if relevant]\n\n### Complete String Dump\n[Reference to strings.txt file]\n```\n\n## Additional References\n\n- **Architecture details:** See `references\u002Farchitectures.md` for architecture-specific calling conventions and characteristics\n- **Toolchain commands:** See `references\u002Ftoolchain.md` for detailed command syntax and options\n\n## Tips\n\n- **Always work on a copy** - Never modify the original firmware binary\n- **Save intermediate outputs** - Redirect command outputs to files for reference (e.g., `strings -a binary > strings.txt`)\n- **Cross-reference findings** - Strings\u002Fimports are candidates; verify authentication use, attacker control and reachability before reporting a vulnerability\n- **Architecture matters** - Load the architecture reference early if unfamiliar with the target\n- **Document as you go** - Build the report incrementally during analysis\n- **Look for the unusual** - Hardcoded credentials, unusual network addresses, and debug paths are common in firmware\n- **Check toolchain** - Version strings are clues; verify component identity, backports and vulnerable code before assigning a CVE\n- **PIE vs non-PIE** - ET_EXEC binaries have fixed addresses, making analysis easier\n- **Stripped binaries** - Don't despair, entry point and PLT calls still provide context\n",{"name":5,"description":7},"main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","03-逆向工程\u002Ffirmware-static-analysis",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill firmware-static-analysis",{"tool":38,"command":39},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill firmware-static-analysis",{"tool":41,"command":42},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill firmware-static-analysis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F03-逆向工程\u002Ffirmware-static-analysis\u002FSKILL.md",true,[46,52],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Farchitectures.md","REFERENCE","参考文档",3611,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F03-逆向工程\u002Ffirmware-static-analysis\u002Freferences\u002Farchitectures.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Ftoolchain.md",5491,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F03-逆向工程\u002Ffirmware-static-analysis\u002Freferences\u002Ftoolchain.md",[57,65,70,77,84,91],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":64},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":66,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":64},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":64},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":64},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":64},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":64},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]