<instruction> As an experienced translator and native Simplified Chinese speaker,…
- User
III. SYSTEM DESIGN
Penguin generates a configuration file that specifies the details of a rehosting environment. The initial configuration combines established defaults with information learned from static analysis of the target filesystem. A configuration is then realized into a rehosting environment and filesystem. This rehosting is executed and dynamic analysis results are recorded for the user. Through observation of the rehosting's runtime behavior, failures can be identified and the configuration file can be refined to address those failures. Using this iterative rehosting process, Penguin aims to be a framework for tailoring a rehosting to a specific firmware. To reproduce or share a rehosting a user simply needs the configuration file and original firmware image. The stages of the Penguin rehosting framework are shown in Fig. 1.
A. Filesystem Analysis
We perform a series of static analyses to identify the firmware's filesystem and derive an initial rehosting configuration. Once a filesystem is generated, it is necessary to identify
[image: img-0.jpeg]
Fig. 1: Rehosting a firmware with Penguin.
The original system's architecture, bit-width, and endianness to select appropriate parameters for CPU emulation. Additionally, the init program is identified.
Penguin extends the static analyses from both Firmadyne and FirmAE as well as supports several new analyses. While some analyses from Firmadyne and FirmAE are tailored to specific vendors (or even firmware), our novel analyses are designed to be firmware agnostic. The (configurable) suite of filesystem analyses in Penguin are summarized in Table I and given more detailed treatment in Appendix C.
B. Rehosting as a Configuration
After the filesystem analyses are complete, the Penguin user has an initial rehosting configuration. A Penguin rehosting is a YAML file that is paired with a repackaged filesystem to precisely specify that rehosting. The configuration capabilities can be broadly categorized into three groups: static filesystem modifications, runtime environment, and dynamic analyses. A brief example of a configuration is in Appendix B.
1) Static Filesystem Modifications: Users can define a set of modifications to make this file filesystem before the rehosting starts. Files can be added, deleted, or moved.
2) Runtime Environment: The configuration specifies the emulated environment that the rehosting will execute under. This includes emulator configuration (e.g., which CPU architecture), Linux boot arguments, network device names, and initial NVRAM values. Additionally, the configuration can specify new pseudofiles in /proc, /dev, and /sys as well as models for how those pseudofiles should behave.
3) Dynamic Analyses: While a rehosting runs it can be analyzed to identify failures and inform future refinement to the rehosting configuration. Beyond the rehosting process, dynamic analyses of a rebooted system can also be leveraged to reverse engineer system behavior, identify vulnerabilities, or otherwise exercise the functionality of a system.
- Assistant
III. 系统设计
Penguin 生成一个配置文件,用于指定重托管环境的详细信息。初始配置结合了既定的默认值和对目标文件系统进行静态分析所获得的信息。随后,该配置被实现为一个重托管环境和文件系统。该重托管环境被执行,并为用户记录动态分析结果。通过观察重托管环境的运行时行为,可以识别出故障,并可对配置文件进行优化以解决这些故障。通过这种迭代的重托管过程,Penguin 旨在成为一个可针对特定固件定制重托管的框架。要复现或共享一个重托管,用户只需配置文件和原始固件镜像即可。Penguin 重托管框架的各个阶段如图 1 所示。
A. 文件系统分析
我们执行一系列静态分析,以识别固件的文件系统并推导出初始的重托管配置。一旦生成了文件系统,就有必要识别
[image: img-0.jpeg]
图 1:使用 Penguin 对固件进行重托管。
原始系统的架构、位宽和字节序,以选择适当的 CPU 仿真参数。此外,还需识别 init 程序。
Penguin 扩展了 Firmadyne 和 FirmAE 的静态分析方法,并支持多种新的分析方法。虽然 Firmadyne 和 FirmAE 的某些分析针对特定厂商(甚至特定固件)进行了定制,但我们新提出的分析方法旨在与固件无关。Penguin 中(可配置的)文件系统分析套件在表 I 中进行了总结,并在附录 C 中有更详细的说明。
B. 作为配置的重托管
文件系统分析完成后,Penguin 用户将获得一个初始的重托管配置。Penguin 的重托管是一个 YAML 文件,与重新打包的文件系统配对,以精确指定该重托管。配置能力大致可分为三类:静态文件系统修改、运行时环境和动态分析。配置示例简要见附录 B。
1) 静态文件系统修改: 用户可以定义一组修改,在重托管开始前对该文件系统进行操作。可以添加、删除或移动文件。
2) 运行时环境: 配置文件指定了重托管将要执行的仿真环境。这包括仿真器配置(如 CPU 架构)、Linux 启动参数、网络设备名称和初始 NVRAM 值。此外,配置还可以指定 /proc、/dev 和 /sys 中的新伪文件,以及这些伪文件应如何表现的模型。
3) 动态分析: 在重托管运行时,可以对其进行分析,以识别故障并为未来的重托管配置优化提供信息。除了重托管过程外,对重启系统的动态分析还可用于逆向工程系统行为、识别漏洞或以其他方式测试系统功能。
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.