逆向工程中的心理战
Psychological Warfare in Reverse Engineering (2015)

原始链接: https://github.com/xoreaxeaxeax/repsych

REpsych 是由 Christopher Domas 开发的一套概念验证工具,旨在展示软件逆向工程与视觉艺术的结合。该工具通过将 24 位位图(BPP)转换为可执行程序,使其生成的控制流图(CFG)能够直观地还原原始图像。 出于美学与技术创新目的,REpsych 在 IDA Pro 中运行最为稳定,同时也与 Hopper 和 radare2 等其他 CFG 查看器保持了半兼容性。该工具将输入图像的每个像素映射为生成代码中的唯一基本块(CFG 节点)。因此,建议开发者使用小尺寸图像(最大 100x100 像素),并可能需要提高 CFG 查看器的节点限制以获得最佳渲染效果。 该项目包含两种不同的节点布局策略,以确保视觉准确性。对于文本类输入,开发者建议在最终转换前先将文件转为 2 位黑白格式,以确保清晰度。该工具首次亮相于 DEF CON,旨在作为一种创造性探索,研究如何利用结构化代码分析来重构视觉数据。

这篇 Hacker News 帖子讨论了 xoreaxeaxeax 在 2015 年开展的项目“逆向工程中的心理战”。该工具旨在干扰依赖 IDA 或 Ghidra 等工具的逆向工程师的工作。 通常,逆向工程师会使用这些程序生成“控制流图”(即二进制代码逻辑的视觉表现),以理解程序的运行方式。该帖中介绍的工具颠覆了这一过程,它创建的二进制函数经过特殊设计,在被这些图形生成工具分析时,会显示为特定的图像或复杂的图案。 帖子中的用户将这种策略比作“活体”或防御性架构的概念——如同伊恩·班克斯(Iain M. Banks)的小说《费尔萨姆·恩金》(*Feersum Endjinn*)中那座会主动抗拒调查的城堡。归根结底,这是一种极具创造力的混淆形式,将标准的分析工具反过来用以对抗使用者。
相关文章

原文

: Psychological Warfare in Reverse Engineering

github.com/xoreaxeaxeax/repsych // domas // @xoreaxeaxeax

The REpsych toolset is a proof-of-concept illustrating the generation of images through a program's control flow graph (CFG).

There is no specific point to the project (other than to show that it can be done), but possible (non-serious) applications are outlined in the DEF CON presentation.

The program works reliably with all tested versions of the IDA Pro reverse engineering tool, and semi-reliably with other CFG viewers (Hopper, BinNavi, radare2, etc).

The toolset translates source images into functioning programs, such that the program's control flow graph generates the source image.

To generate a new program from an image:

  • Save the image in the gfx/ folder as a 24 BPP bitmap.
  • Run "make image" in the root directory of the project, where "image" is the name of your image, without the extension.

Two functioning programs will be created: repsych_v1 and repsych_v2. Each uses a different strategy for ensuring the CFG renderer correctly places the CFG nodes.

The tool will create a basic block (CFG node) for each pixel of the source image; as such, you should try to use small source images (not larger than 100x100), and you may need to increase the number of allowed nodes in your CFG viewer.

When using an image of text as input to the tool, first convert the image to a 2 BPP black and white bitmap first, then to a 24 BPP bitmap; this will remove non black and white colors, and give the best results in the control flow graph.

Example 1

Example 4

Example 3

Example 2

Example 5

The technique is outlined in detail in the DEF CON presentation.

Slides from the presentation are provided here.

REpsych is a proof-of-concept from Christopher Domas (@xoreaxeaxeax).

联系我们 contact @ memedata.com