undisassemble/yap

GitHub: undisassemble/yap

YAP 是一款开源的 x86-64 Windows PE 保护程序,通过打包封装和反汇编重组两种方式为原生二进制提供代码混淆与反逆向保护。

Stars: 27 | Forks: 5

# Yet Another Packer x86_64 Windows PE(exe、dll)的保护程序。不支持 C#。 Yet Another Packer 目前包含两种主要的混淆方法:packer 和 reassembler。packer 将原始应用程序封装在保护层中,以防止静态分析,并附加了反调试和反转储等功能,使动态分析更加困难。reassembler 将应用程序反汇编,并使用 YAP 的 mutation engine 重新组装。 | 功能 | 未保护 | 已保护 | |-------------|------------------------------------------|----------------------------------------| | Packer | ![未保护 packer](https://static.pigsec.cn/wp-content/uploads/repos/cas/55/55720d1a97b2bd2feec4e3119fe01a41cd4fec49c08a9d683a38de36b0a87c4f.png) | ![已保护 packer](https://static.pigsec.cn/wp-content/uploads/repos/cas/3c/3cd270fca7f80d50aac8c244be33d82ca5f18b083395ccf83d329ef0ac91ce10.png) | | Reassembler | ![未保护 reasm](https://static.pigsec.cn/wp-content/uploads/repos/cas/76/7672a45791e7bd8fcf927ab6bc4b4379bdca906100bd381feaef935c0742492a.png) | ![已保护 reasm](https://static.pigsec.cn/wp-content/uploads/repos/cas/16/168268d8c82c9a774b38bcef089a12e6a936544e4e0b48dc467215217feb5595.png) | ## SDK 注意事项 - 你需要 `yap.h` 和 `yap.dll`,它们在你安装 YAP 时会一并安装(位于 `YAP path/SDK`)。 - 始终确保 `__YAP_VERSION__` 与你的 packer 版本匹配(忽略 patch 版本通常没问题)。 - 你必须直接链接到 `yap.dll`,以便它出现在应用程序的导入目录中。**请勿重命名 yap.dll**。 - 保护完成后,`yap.dll` 会被取消链接,你不需要(也不应该)将 `yap.dll` 与你的应用程序一起分发。 - 你不能使用 `GetModuleHandle`/`GetProcAddress` 来解析 `yap.dll` 的导入。 - 与 Reassembler 相关的宏是按线性方向编译的,因此控制流优化可能会导致无法按预期工作。 - 此外,请避免围绕它们编写包装函数,它们应该被用作其他代码块的标记。 Reassembler 宏示例: ``` #include #include "yap.h" void protect(); void unprotect(); int main() { printf("Hello World!\n"); // Right YAP_SUBSTITUTION(1); YAP_MUTATIONLEVEL(5); printf("Obfuscated code\n"); YAP_SUBSTITUTION(0); YAP_MUTATIONLEVEL(0); // Wrong protect(); printf("Unobfuscated code\n"); unprotect(); return 0; } // Because of how to reassembler assembles code, these don't protect anything*. void protect() { YAP_SUBSTITUTION(1); YAP_MUTATIONLEVEL(5); } // *they actually protect whatever is written here, assuming when it's compiled these functions follow each other in memory. void unprotect() { YAP_SUBSTITUTION(0); YAP_MUTATIONLEVEL(0); } ``` ## 构建 ### 基本构建 ``` cmake . -DCMAKE_BUILD_TYPE=Release cmake --build . ``` ### 构建选项 `CMAKE_BUILD_TYPE` 可以是 `Release` 或 `Debug`(默认)。 ## 许可证 Yet Another Packer 采用 MIT 许可证授权。第三方许可证可在 `docs/licenses` 中找到。
标签:Bash脚本, DNS 反向解析, DOM解析, PE打包器, UML, 云资产清单, 代码混淆, 反调试, 逆向工程