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 and the powershell bypass technique presented by David Kennedy (TrustedSec) and Josh Kelly at Defcon 18.
https://www.trustedsec.com
Other
3.74k stars 817 forks source link

Logical Error in Help Section #156

Closed b0rne-ug closed 3 years ago

b0rne-ug commented 3 years ago

Script always jumps to the help output as long as there are more than 2 arguments.

This is because of the logical error below: https://github.com/trustedsec/unicorn/blob/22f94cc2786756d3f615abe1556a199605ecaf22/unicorn.py#L1230

I recommend it be changed to

if len(sys.argv) > 2 and sys.argv[1] in help_options:

ghost commented 3 years ago

What is the command you are running? Can you share so I can check it? Because it shouldn't do that

b0rne-ug commented 3 years ago

when you run a command like python unicorn.py muahahaha.ps1 macro 500 it goes straight to the help menu

HackingDave commented 3 years ago

Looks good, will be in the next release, thanks!