trustedsec/unicorn

Unicorn is a simple tool for using a PowerShell downgrade attack and inject shellcode straight into memory. Based on Matthew Graeber's powershell attacks...

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 48 minutes ago
Added to GitGenius on September 17th, 2026
Created on June 19th, 2013
Open Issues & Pull Requests: 0 (+0)
GitHub issues: Enabled
Number of forks: 818
Total Stargazers: 3,944 (+0)
Total Subscribers: 223 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 682.0 days
Mean response time: 682.0 days
90th percentile: 682.0 days
Tracked items: 1

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 0
New in 7 days: 0
Closed in 7 days: 0
Avg open age: N/A days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

Unicorn is a Python tool for generating PowerShell downgrade attacks that inject shellcode directly into memory.

The tool addresses the challenge of executing shellcode on Windows systems by leveraging a PowerShell downgrade attack technique. It works by generating obfuscated PowerShell commands that bypass security restrictions and inject payloads into memory without writing to disk. The approach is based on established PowerShell attack methodologies and supports multiple payload sources including custom shellcode, Cobalt Strike, and Metasploit.

Unicorn suits penetration testers and red teamers who need to deliver payloads through command injection vectors. The tool generates attack code in multiple formats: direct PowerShell commands for command-line execution, VBA macros for Office documents, and HTA files for browser-based delivery. Each format produces the necessary payload files and a Metasploit resource script for listener configuration. The direct PowerShell approach requires a delivery mechanism such as SQL injection, Excel macros, Word documents, or tools like psexec. The macro variant embeds code in Office files and displays a fake corruption message to the user. The HTA variant creates HTML and HTA files that prompt the user to accept execution before the injection occurs. The tool also supports the windows/download_exec payload method for downloading and executing remote binaries.

Development activity shows consistent maintenance with regular updates addressing compatibility issues across different Office versions and Windows environments. The project includes specific handling for Office 365 and Word 2016+ macro naming conventions, indicating ongoing refinement for modern systems. Documentation covers multiple attack vectors and deployment scenarios, suggesting active engagement with real-world usage patterns. The codebase remains focused on its core functionality without scope creep into unrelated attack methods.