XECA : PowerShell Payload Generator

XECA is a project that creates encrypted PowerShell payloads for offensive purposes. Creating position independent shellcode from DLL files is also possible.

Install

Firstly ensure that rust is installed, then build the project with the following command:

cargo build

How It Works?

  • Identify and encrypt the payload. Load encrypted payload into a powershell script and save to a file named “launch.txt”
  • The key to decrypt the payload is saved to a file named “safe.txt”
  • 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 have access 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.

Mitigations

If users must have access 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 Ap pLocker.

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:
@monoxgas
@H0neyBadger
@stephenfewer
@dismantl

License

xeca is licensed under GPLv3, some sub-components may have separate licenses. See their respective references in this project for details.

R K

Recent Posts

NyxInvoke – A Comprehensive Guide To Advanced Execution Techniques In Rust

NyxInvoke is a versatile Rust-based tool designed for executing .NET assemblies, PowerShell commands/scripts, and Beacon…

16 hours ago

Learn Rust, One Exercise At A Time

You've heard about Rust, but you never had the chance to try it out?This course…

17 hours ago

Prince Ransomware – A New Threat In Cybersecurity

Prince now has a Windows Defender flag, namely "Ransom:Win64/PrinceRansom.YAA!MTB". This means that Prince Ransomware will…

17 hours ago

reCAPTCHA Phish – A Dive Into Social Engineering Tactics

This is small harness to recreate the social engineering and phishing lure recently seen in…

17 hours ago

Process Injection Techniques – For Advanced Adversary Emulation

Usman Sikander (a.k.a Offensive-Panda) is a seasoned security professional specializing in adversary emulation, malware development,…

2 days ago

Hill Saturday Malware Analysis : Open Dir -> Obfuscated Python -> DONUT Launcher -> XWorm

Just some quick malware analysis on a free Saturday. I was just chilling in the…

2 days ago