Re Fw Rootfs logo

Re Fw Rootfs

Community
dslsdzc
re-fw-rootfs

固件文件系统分析:rootfs、配置、密钥、启动脚本。 触发词:rootfs、文件系统分析、squashfs、cramfs、配置文件

Overview

Publisherdslsdzc
Repositoryrev-skills
Skill namere-fw-rootfs
Stars
191
Forks
35
Bundled files
Instructions only
LicenseApache-2.0
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 dslsdzc on GitHub. Read the source before you install it.

Installation

Install the Re Fw Rootfs 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.
    https://github.com/dslsdzc/rev-skills/tree/main/.claude/skills/re-fw-rootfs
  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/dslsdzc/rev-skills.git /tmp/rev-skills
mkdir -p .claude/skills
cp -r /tmp/rev-skills/.claude/skills/re-fw-rootfs .claude/skills/re-fw-rootfs
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Re Fw Rootfs 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 Re Fw Rootfs 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 Re Fw Rootfs 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.

固件文件系统分析(rootfs)

何时使用 / 何时不用

  • 用:已有解包产物 / 文件系统镜像,需要找启动入口、配置、密钥、硬编码口令
  • 用:需要定位固件内程序与架构(交叉二进制)
  • 不用:还没有任何解包产物(先 [[re-fw-extract]])
  • 不用:需要运行固件程序观察行为(走 [[re-fw-emulate]])
  • 不用:需实物板子(走 [[re-hardware-io]])

工具准备

所有工具先验证再使用。本技能纯静态分析可免沙箱([[re-analyze/platform-tips]] 最高原则);解出的程序要运行时转 [[re-fw-emulate]]。

解包工具(unblob / binwalk 产物优先)

  • 已装则直接用 [[re-fw-extract]] 的解包产物;没装按该技能「工具准备」安装
  • 验证: unblob --version / binwalk --version

7-Zip(7z)—— 通用容器兜底

  • Linux: apt install p7zip-full / dnf install p7zip-plugins / pacman -S 7zip
  • macOS: brew install p7zip
  • Windows: choco install 7zip(或 7-zip.org 官方安装包)
  • 验证: 7z i | head -5(显示版本)

squashfs-tools(unsquashfs)

  • Linux: apt install squashfs-tools / dnf install squashfs-tools / pacman -S squashfs-tools
  • macOS: brew install squashfs
  • Windows/WSL: WSL 内 Linux 版
  • 验证: unsquashfs -version

cramfs 解包(cramfsck)

  • Linux: apt install cramfsprogs(Debian/Ubuntu);其他发行版无官方包 → 用 unblob 解 cramfs 兜底
  • macOS/Windows: unblob 兜底
  • 验证: cramfsck -V

grep / ripgrep —— 配置与密钥搜索

  • Linux: apt install ripgrep / dnf install ripgrep / pacman -S ripgrep(grep 随发行版自带)
  • macOS: brew install ripgrep
  • Windows: choco install ripgrep(或 WSL)
  • 验证: rg --version / grep --version

交叉 binutils(readelf / objdump 跨架构)

  • Linux: apt install binutils-arm-linux-gnueabi binutils-arm-linux-gnueabihf binutils-mipsel-linux-gnu binutils-mips-linux-gnu(Debian/Ubuntu;Fedora: dnf install binutils-arm-linux-gnu binutils-mips-linux-gnu)
  • macOS: brew install binutils(greadelf)或 brew install llvm(llvm-readelf)
  • WSL: Linux 版直接可用
  • 验证: arm-linux-gnueabi-readelf --version;本机 readelf 也能读交叉 ELF 头(readelf -h),属性级信息用交叉版 readelf -A

操作步骤

按顺序执行,每步记下结果。

  1. 挂载/解包文件系统:

    sh
    # squashfs(最常见)
    unsquashfs rootfs.squashfs -d rootfs_out
    # cpio initramfs
    mkdir rootfs_out && cd rootfs_out && cpio -idmv < ../initramfs.cpio
    # 通用兜底
    7z x rootfs.img
    # cramfs(Debian 系)
    cramfsck -x rootfs_out rootfs.cramfs
    # ext 类镜像(需 root,只读挂载)
    mkdir mnt && mount -o loop,ro rootfs.img mnt

    已用 [[re-fw-extract]] 解出则直接进入下一步,跳过此步。

  2. 启动脚本找程序入口:

    sh
    ls etc/init.d/ etc/rc.d/ 2>/dev/null
    cat etc/inittab 2>/dev/null
    cat etc/init.d/rcS 2>/dev/null          # 常见主启动脚本

    阅读启动顺序:记录先启的服务与固件主程序(httpd / 服务端主进程),分析从它开始;rcS / rc 脚本里常有版本、厂商信息与调试开关。

  3. 配置文件挖密钥/口令:

    sh
    rg -i "password|passwd|secret|token|key|login|admin" rootfs_out -l
    cat etc/passwd etc/shadow 2>/dev/null

    重点目录:/etc、/usr/share、web 界面目录(固件 web 配置常明文存口令)、wpa_supplicant.conf、SSH 私钥(find rootfs_out \( -name "*id_rsa*" -o -name "*.pem" \))。

  4. 交叉编译二进制定位:

    sh
    find rootfs_out -type f -exec file {} \; 2>/dev/null | grep ELF
    # 大镜像改用:
    find rootfs_out -type f -print0 | xargs -0 file | grep ELF
    arm-linux-gnueabi-readelf -h rootfs_out/usr/sbin/httpd   # Machine + Data 字段确认架构/字节序
    arm-linux-gnueabi-readelf -A rootfs_out/usr/sbin/httpd   # 交叉工具链细节(EABI 等)

    重点目录:/bin、/usr/bin、/usr/sbin、/usr/lib;busybox 是软链集合(ls -la bin/ 看链接目标确认 applet)。

  5. 弱口令/后门账号搜索:

    sh
    cat etc/passwd
    rg -i "admin|root|debug|backdoor|telnet" rootfs_out/etc -l

    常见:root 空口令/弱口令、telnetd 常驻、默认 admin/admin、调试账号(debug/backdoor);发现后门与可疑程序转 [[re-malware]] 评估。

跨域联合

  • [[re-firmware]]:工作流第 3 步固定调用本技能
  • 固件内 ELF 深挖 → [[re-binary-core]]([[re-format-elf]] / [[re-ghidra]])
  • 需要运行固件 → [[re-fw-emulate]];发现后门/恶意样本 → [[re-malware]];发现通信 → [[re-protocol]]
  • 本技能被 [[re-analyze]] 的 triage「分析固件 / IoT 设备」路径调用

常见坑与陷阱

  • 配置里硬编码密钥/口令常见:现象——固件里直接躺着 SSH 私钥、WiFi 密码、云平台 API key;原因——IoT 厂商为省成本硬编码;对策——系统性 rg 扫全部配置目录与 web 目录,别只看 /etc(步骤 3)
  • 启动脚本决定分析顺序:现象——几十个可执行文件不知从哪看起;原因——没先读启动脚本,从随机二进制开刀;对策——先读 rcS / inittab / init.d,按启动顺序定位主程序(步骤 2)
  • 交叉架构二进制需对应工具链:现象——本机 readelf 信息不全 / objdump 反汇编失败;原因——缺对应架构 binutils,或架构/字节序认错;对策——装交叉 binutils,readelf -A 确认架构与 EABI(步骤 4),确认后再选仿真/反编译工具
  • busybox 是软链集合:现象——bin/ 下全是同名软链,file 全部指向同一 ELF;原因——busybox 单二进制多 applet;对策——看软链名即 applet 功能(ls/cat/httpd 等),分析该单一 ELF 即覆盖全部命令

Frequently asked questions

What does the Re Fw Rootfs AI skill do?

固件文件系统分析:rootfs、配置、密钥、启动脚本。 触发词:rootfs、文件系统分析、squashfs、cramfs、配置文件

Why use Re Fw Rootfs on TypingMind?

Because you install it once and use it with any model. Re Fw Rootfs 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 Re Fw Rootfs in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dslsdzc/rev-skills/tree/main/.claude/skills/re-fw-rootfs. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Re Fw Rootfs?

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 Re Fw Rootfs?

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

Is the Re Fw Rootfs AI skill free?

Yes. It is published on GitHub by dslsdzc under the Apache-2.0 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 👇