PandaCrypter
PandaCrypter is a C#-based tool designed to convert PowerShell scripts into obfuscated batch files (.bat) with encryption and additional features for execution control.
Install / Use
/learn @chainski/PandaCrypterREADME
PandaCrypter
PandaCrypter is a C#-based tool designed to convert PowerShell scripts into obfuscated batch files (.bat) with encryption and additional features for execution control.
Features
- [x] AES Encryption: Encrypts the PowerShell payload.
- [x] Anti-VM: Optionally evades virtualized environments.
- [x] Compression: Compresses the payload to reduce size before encryption.
- [x] Obfuscation: Obfuscates the generated batch file and powershel execution chain.
- [x] AMSI Bypass: Optionally includes an
AMSI(Antimalware Scan Interface) bypass to avoid detection. - [x] Run as Administrator: Supports elevating privileges by prompting for admin rights using
Abuse Elevation Control MechanismForce Admin. - [x] Self-Deletion: Optionally self-destructs after execution.
- [x] Persistence: Optionally registers the batch file to run at user logon via scheduled tasks.
- [x] Windows Defender Exclusion: Can add an exclusion path to Windows Defender (requires admin privileges).
- [x] Execution Delay: Supports adding a delay before script execution.
- [x] Low Entropy Packing: Contains colon padding to reduce entropy
- [x] EventLog Cleanup: Removes Powershell logs to reduce footprint (requires admin privileges).
Tested with Red-Team Tools
- [x] Hoaxshell
Options
-debug: Debug mode
-amsi: Enables AMSI bypass in the generated batch file.
-antivm: Evades virtualized environments.
-admin: Configures the batch file to request administrative privileges.
-selfdelete: Adds self-deletion logic to remove the batch file after execution.
-startup: Registers the batch file to run at user logon using a scheduled task.
-defender_exclusion: Adds an exclusion path to Windows Defender for the ProgramData and UserProfile directory.
-sleep: Introduces a 10-second delay before executing the payload.
How It Works
PandaCrypter processes a PowerShell script through several stages to produce an obfuscated batch file:
- Input Reading: Reads the input PowerShell script (.ps1) as text.
- Compression: Compresses the script using
GZipto reduce its size. - Encryption: Encrypts the compressed payload.
- Stub Generation: Creates a PowerShell stub that:
- Decodes the encrypted payload from Base64.
- Decrypts it using the provided
keyandIV. - Decompresses the result.
- Executes the final PowerShell code using IEX
(Invoke-Expression). - Batch Obfuscation: Embeds the PowerShell stub in a batch file, applying:
- Random variable names for obfuscation.
- Splitting commands into smaller parts assigned to variables.
- Random case variation for PowerShell command strings (e.g., pOwErShElL).
- Feature Integration: Adds optional features like
AMSI bypass,admin elevation, orself-deletionbased on command-line flags. - Output: Writes the final batch file with the encrypted payload appended as a Base64-encoded string, prefixed with
::.
Installation
Clone the repository or download the prebuilt binary produced by github actions:
git clone https://github.com/chainski/PandaCrypter.git
Open the solution in Visual Studio or another C# IDE. Build the project to generate the executable (PandaCrypter.exe). Run the tool from the command line with the desired options.
Usage Example
"Hello, World!" > hello.ps1
PandaCrypter -i hello.ps1 -o hello.bat
Contributing
Contributions are welcome! Please submit pull requests or open issues for bug reports, feature requests, or improvements.
License
This project is licensed under the MIT License. See the file for details.
Disclaimer
PandaCrypter is provided "as is" for educational and research purposes. The developers are not responsible for any misuse or damage caused by this tool. Always use it in compliance with applicable laws and regulations.
Related Skills
diffs
340.5kUse the diffs tool to produce real, shareable diffs (viewer URL, file artifact, or both) instead of manual edit summaries.
clearshot
Structured screenshot analysis for UI implementation and critique. Analyzes every UI screenshot with a 5×5 spatial grid, full element inventory, and design system extraction — facts and taste together, every time. Escalates to full implementation blueprint when building. Trigger on any digital interface image file (png, jpg, gif, webp — websites, apps, dashboards, mockups, wireframes) or commands like 'analyse this screenshot,' 'rebuild this,' 'match this design,' 'clone this.' Skip for non-UI images (photos, memes, charts) unless the user explicitly wants to build a UI from them. Does NOT trigger on HTML source code, CSS, SVGs, or any code pasted as text.
openpencil
1.9kThe world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pencil.
HappyColorBlend
HappyColorBlendVibe Project Guidelines Project Overview HappyColorBlendVibe is a Figma plugin for color palette generation with advanced tint/shade blending capabilities. It allows designers to
