mips-uclibc-static-triage
Use when statically analyzing MIPS little-endian uClibc firmware binaries, ELF objects, static archives, shared libraries, relocations, symbols, disassembly, exec/system wrappers, or Broadcom/router-s
SKILL.mdfirmware-reverse-eng-skill/mips-uclibc-static-triage/SKILL.md
GitHubMIPS/uClibc Static Triage
Use this skill for read-only MIPS firmware binary/object analysis. Prefer conservative conclusions and cite artifact names, symbols, relocation offsets, and disassembly addresses where practical.
See references/TOOLS.md for the external command-line and MIPS-capable Binutils setup used by this workflow.
Workflow
Classify artifacts.
- Run
file,readelf -h,readelf -S,readelf -s, andreadelf -r. - Note stripped vs unstripped, relocatable object vs executable/shared object, endian, ABI, and architecture.
- Run
Locate symbols and imports.
- Use
nm -Afor object files and archives. - Use
readelf -Wsor dynamic symbols for stripped ELF binaries/shared libraries. - For stripped executables, map imports through PLT/GOT call sites and nearby strings; treat names recovered from strings as candidates unless call linkage is shown.
- Track wrappers around
system,_eval,execve,execv,execvp,popen,fork,waitpid,kill,unlink,mktemp, upload/file APIs, and NVRAM APIs.
- Use
Disassemble with the right target.
- For MIPS little-endian objects, prefer:
objdump -Dr -b elf32-little -m mips:isa32 artifact.o
- For ELF executables/shared libraries,
objdump -dr artifactmay be enough if binutils recognizes the target.
Determine execution model.
system(char *cmd),popen, or/bin/sh -cmeans shell-string execution.forkplusexecv/execvp/execvewithchar *const argv[]means argv-based execution. Confirm by checking argument register setup (a0 = argv[0],a1 = argv) when possible.- Wrapper functions can make execution mixed across the program. Report per call site.
Handle relocatable objects carefully.
- Calls may appear as branch/jump instructions with relocation records naming the real target.
- Use relocation tables to resolve external call names.
- Do not infer final linked addresses from
.ooffsets alone.
MIPS Notes
- Arguments usually flow through
$a0-$a3; return values through$v0. jal/jalrcall targets may require relocation, dynamic symbol, or GOT/PLT review.- Delay slots can contain meaningful instructions.
- String address construction often uses
lui/addiupairs or GOT-relative loads.
Reporting Rules
- Label whether an execution path is
argv-based,shell-string, ormixed/unclear. - Separate wrapper behavior from caller-controlled data flow.
- Avoid exploitability claims unless user-controlled data reaches a dangerous sink with enough evidence.