Open sudo-WearTherinG opened 4 years ago
Have a look at /Phantom-Evasion/Setup/Phantom_lib.py and search in file for 'pfx = crypto' The attribute is stated as PKCS12Type
Compare it with the attribute in /usr/lib/python3/dist-packages/OpenSSL/crypto.py and you will find out that it should be simply PKCS12
To fix this, change it in /Phantom-Evasion/Setup/Phantom_lib.py from PKCS12Type to PKCS12
What a nice soluation!
really worked like a charm but make sure not to change ( ) just type PKCS12( ) in place of pfx = crypto
[+] MODULE DESCRIPTION:
Pure C reverse tcpstager compatible with metasploit and cobaltstrike beacon [>] Local process stage execution type:
[>] Local Memory allocation type:
[>] AUTOCOMPILE format: exe,dll
Press Enter to continue:
[>] Insert Target architecture (default:x86):
[>] Insert LHOST: 192.168.1.107
[>] Insert LPORT: 443
[>] Insert Exec-method (default:Thread):
[>] Insert Memory allocation type (default:Virtual_RWX):
[>] Insert Junkcode Intesity value (default:10):
[>] Insert Junkcode Frequency value (default: 10):
[>] Insert Junkcode Reinjection Frequency (default: 0):
[>] Insert Evasioncode Frequency value (default: 10):
[>] Dynamically load windows API? (Y/n):y
[>] Add Ntdll api Unhooker? (Y/n):y
[>] Masq peb process? (Y/n):y
[>] Insert fake process path?(default:C:\windows\system32\notepad.exe):
[>] Insert fake process commandline?(default:empty):
[>] Strip executable? (Y/n):y
[>] Use certificate spoofer and sign executable? (Y/n):y
[>] Insert url target for certificate spoofer (default:www.windows.com:443):
[>] Insert certificate description (default:Notepad Benchmark Util):
[>] Insert output format (default:exe):
[>] Insert output filename:filename.exe
[>] Generating code...
[>] Compiling...
[>] Strip binary...
[>] Sign Executable
Traceback (most recent call last): File "phantom-evasion.py", line 402, in
CompleteMenu()
File "phantom-evasion.py", line 125, in CompleteMenu
Phantom_lib.ModuleLauncher(module_type)
File "Setup/Phantom_lib.py", line 964, in ModuleLauncher
ExeSigner(ModOpt["Outfile"],ModOpt["SpoofCert"],ModOpt["descr"])
File "Setup/Phantom_lib.py", line 439, in ExeSigner
pfx = crypto.PKCS12Type()
AttributeError: module 'OpenSSL.crypto' has no attribute 'PKCS12Type'
root@kali:~/tools/Phantom-Evasion#
Runned script in python and python3
Os kali linux
Linux kali 5.8.0-kali3-amd64 #1 SMP Debian 5.8.14-1kali1 (2020-10-13) x86_64 GNU/Linux