
项目说明
xeca
xeca is a project that creates encrypted PowerShell payloads for offensi.
Creating position independent shellcode from DLL files is also possible.
Note: Please place your custom AMSI bypass in src/assets/amsi-bypass.ps1.
Table of Contents
xeca * Install
* How It Works
* Mitigations
* Examples
+ Co
+ Empire
+ Merlin
+ Sliver
* Acknowledgements
* License
Install
Firstly ensure that rust is installed, then build the project with the following command:
How It Works
1. Identify and encrypt the payload. Load encrypted payload into a powershell script and save to a file named "launch.txt"
3. The key to decrypt the payload is saved to a file named "safe.txt"
3. Execute "launch.txt" on a remote host
- The script will call back to the attacker defined web server to retrieve the decryption key "safe.txt"
- Decrypt the payload in memory
- Execute the intended payload in memory
Mitigations
If users must ha to programs such as powershell.exe, consider minimising security risks with Just Enough Administration and PowerShell Logging. Application control policies can be deployed via a whitelisting technology such as AppLocker.
Examples
Co
Co .NET assembly donut payload.
!gif
Empire
Empire PowerShell payload.
!gif
Merlin
Merlin DLL payload.
!gif
Sliver
Sliver Shellcode payload.
!gif
Acknowledgements
This tool would not be possible without the sharing of knowledge and information. Ideas, snippets and code from the following authors should be acknowledged:
License
xeca is licensed under GPLv3, some sub-components may ha licenses. See their respecti in this project for details.
项目信息
开发语言:PowerShell
Star 数:121
技术要点
该项目属于CTF思路方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕PowerShell payload generator展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
使用与学习建议
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
免责声明
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。