MIT License

项目介绍

bytecode77/pe-union 是一个托管在 GitHub 上的开源项目,主要使用 Assembly 编写,采用 MIT License 许可证,目前获得 740 个 Star、141 次 Fork。

仓库全名
bytecode77/pe-union
开源许可证
MIT License
Star 数
740
Fork 数
141
未关闭 Issue
2

README 摘要

PEunion Crypter, binder & downloader PEunion encrypts executables, which are decrypted at runtime and executed in-memory. Stub Two stubs are available to choose from, both of which work in a similar way. Native: Written in assembly (FASM) .NET: Written in C# Key feature overview Emulator detection Low-entropy packing scheme Two-layer execution architecture Code obfuscation File compression Binder (combine multiple…

完整内容见 GitHub 原始 README 或本页 。

常见问题

pe-union 用什么语言开发?

主要使用 Assembly 编写,采用 MIT License 许可证,目前有 740 个 Star。

pe-union 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 pe-union 的源码?

可以直接克隆仓库:git clone https://github.com/bytecode77/pe-union.git,默认分支为 master;安装与运行步骤见仓库 README。

pe-union 最近还在维护吗?

仓库最近一次更新为 2025年6月28日,当前有 2 个未关闭 Issue;Star 数为 740,可作为社区活跃度的参考。

关于

Crypter, binder & downloader with native & .NET stub, evasive by design, user friendly UI

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
1060
价值分
490
活跃状态
活跃

语言占比

Assembly
BitBake
C#
C++
HTML
NASL
PHP
Pawn

贡献者

README

PEunion

Crypter, binder & downloader

PEunion encrypts executables, which are decrypted at runtime and executed in-memory.

Stub

Two stubs are available to choose from, both of which work in a similar way.

  • Native: Written in assembly (FASM)
  • .NET: Written in C#

Key feature overview

  • Emulator detection
  • Low-entropy packing scheme
  • Two-layer execution architecture
  • Code obfuscation
  • File compression
  • Binder (combine multiple files)
  • Downloader
  • RunPE (process hollowing)
  • In-memory invocation of .NET executables
  • Drop files to disk
  • Melt (self-deleting stub)
  • EOF support
  • Specify icon, version information & manifest
  • Well-designed UI
  • Commandline compiler

Multiple files can be compiled into the stub. A file can either be embedded within the compiled executable, or the stub downloads the file at runtime.

Typically, an executable is decrypted and executed in-memory by the stub. If the executable is a native PE file, RunPE (process hollowing) is used. For .NET executables, the .NET stub uses Invoke. Legitimate files with no known signatures can be written to the disk.

Implementation & execution flow

Obfuscation and evasive features are fundamental to the design of PEunion and do not need further configuration. The exact implementation is fine tuned to decrease detection and is subject to change in future releases.

This graph illustrates the execution flow of the native stub decrypting and executing a PE file. The .NET stub works similarly.

The fundamental concept is that the stub only contains code to detect emulators and to decrypt and pass execution to the next layer. The second stage is position independent shellcode that retrieves function pointers from the PEB and handles the payload. To mitigate AV detections, only the stub requires adjustments. Stage 2 contains all the “suspicious” code that is not readable at scantime and not decrypted, if an emulator is detected.

The shellcode is encrypted using a proprietary 4-byte XOR stream cipher. To decrease entropy, the encrypted shellcode is intermingled with null-bytes at randomized offsets. Because the resulting data has no repeating patterns, it is impossible to identify this particular encoding and infer YARA rules from it. Hence, AV detection is limited to the stub itself.

Obfuscation

Assembly code is obfuscated by nop-like instructions intermingled with the actual code, such as an increment followed by a decrement. Strings are not stored in the data section, but instead constructed on the stack using mov-opcodes.

The C# obfuscator replaces symbol names with barely distinguishable Unicode characters. Both string and integer literals are decrypted at runtime.

   

Right-To-Left Override Tool

The Unicode character U+202e allows to create a filename that masquerades the actual extension of a file.

It is a simple renaming technique, where all characters followed by U+202e are displayed in reversed order. This way, an executable can be crafted in such a way that it looks like a JPEG file.

Audience

In order to use this program, you should:

  • be familiar with crypters and the basic concept of what a crypter does
  • have a basic understanding of in-memory execution and evasion techniques
  • acknowledge that uploading the stub to VirusTotal will decrease the time that the stub remains FUD

I do not take any responsibility for anybody who uses PEunion in illegal malware campaigns. This is an educational project.

FUD

This project is FUD on the day of release (September 2021). A crypter that is free, publicly available, and open source will not remain undetected for a long time. Adjusting the stub so it does not get detected is a daunting task and all efforts are in vain several days later. Therefore, there will be no updates to fix detection issues.

Rather, PEunion offers a fully functional implementation that is easy to modify and extend. If you want PEunion to be FUD, please get familiar with the code of the stub and adjust it until you are satisfied with the result.

However, additional evasion techniques may be implemented in future releases to improve the baseline design.

Downloads

PEunion 4.0.0.zip (ZIP Password: bytecode77)

Project Page

bytecode77.com/pe-union

评论

暂无评论