nccgroup/Winpayloads

Does not generate payload files.

patxeco opened this issue · 18 comments

[*] Creating Payload using Pyinstaller...
mv: can not perform `stat 'on' <<dist/payload.exe>>: There is no directory file

[] Payload.exe Has Been Generated And Is Located Here: /root/winpayloads/Windows_Meterpreter_Reverse_Shell.exe (But on this route there is nothing...)
rm: can not be deleted «dist»: There is no file or directory
rm: can not be deleted «build»: There is no file or directory
rm: can not be deleted «
.spec»: There is no file or directory

It may be because of a problem with wine?

I'm in a virtual machine
uname -a ->Linux Kali 4.0.0-kalil-686-pae #1 SMP Debian 4.0.4-1+kali2(2015-06-03) i686 GNU/Linux

thank you very much.

Hi,
Can you run with payloads with the -debug flag please.

Thanks

Thanks for your speed, but how can i run payloads with the -debug flag ?
I'm sorry, I'm a little new

./Winpayloads.py -debug

Charliedean the output is as follows:
[*] Creating Payload using Pyinstaller ...

1031 WARNING: Internal error: early pywin32 import was introduced

Traceback (most recent call last):

  File "/opt/pyinstaller/pyinstaller.py", line 15, in

    Run ()
  File "Z: \ opt \ pyinstaller \ PyInstaller \ __ main__.py", line 62, in run

    Import PyInstaller.building.build_main

  File "Z: \ opt \ pyinstaller \ PyInstaller \ building \ build_main.py", line 32, in

    From ..depend import bindepend

  File "Z: \ opt \ pyinstaller \ PyInstaller \ depend \ bindepend.py", line 18, in

    Import pefile

ImportError: No module named pefile

Mv: can not perform `stat 'on' dist / payload.exe ': There is no file or directory

[*] Payload.exe Has Been Generated And Is Located Here: /root/winpayloads/Windows_Meterpreter_Reverse_Shell.exe

Rm: can not be deleted «dist»: There is no file or directory

Rm: can not delete «build»: There is no file or directory

Rm: can not be deleted «* .spec»: There is no file or directory

Okay re run the setup file with the -r flag
./setup.sh -r

I did it but the result is the same ...

Please give the output or I cannot help you.

The output of setup -r

The output of setup -r is very extensive you need all or something in particular.

Upload to pastebin please

Sorry to have delayed and thanks for your patience.
https://pastebin.com/rCGAec1X

Try this:
wine ~/.wine/drive_c/Python27/Scripts/pip.exe install pefile
Paste output please

root@kali:/# wine /root/.wine/drive_c/Python27/Scripts/pip.exe install pefile
You are using pip version 7.0.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Requirement already satisfied (use --upgrade to upgrade): pefile in c:\python27\lib\site-packages
Requirement already satisfied (use --upgrade to upgrade): future in c:\python27\lib\site-packages (from pefile)

Hmm odd.
You shouldn't have any issues.
Could you try to generate again?

[*] Creating Payload using Pyinstaller...
4269 WARNING: Internal error: early pywin32 import was introduced
Traceback (most recent call last):
File "/opt/pyinstaller/pyinstaller.py", line 15, in
run()
File "Z:\opt\pyinstaller\PyInstaller_main_.py", line 62, in run
import PyInstaller.building.build_main
File "Z:\opt\pyinstaller\PyInstaller\building\build_main.py", line 32, in
from ..depend import bindepend
File "Z:\opt\pyinstaller\PyInstaller\depend\bindepend.py", line 27, in
from . import dylib, utils
File "Z:\opt\pyinstaller\PyInstaller\depend\utils.py", line 25, in
from ..lib.modulegraph import util, modulegraph
File "Z:\opt\pyinstaller\PyInstaller\lib\modulegraph\util.py", line 16, in
from ._compat import StringIO, BytesIO, get_instructions
File "Z:\opt\pyinstaller\PyInstaller\lib\modulegraph_compat.py", line 29, in
from dis3 import get_instructions
ImportError: No module named dis3
mv: no se puede efectuar `stat' sobre 'dist/payload.exe': No existe el fichero o el directorio

[] Payload.exe Has Been Generated And Is Located Here: /root/winpayloads/Windows_Meterpreter_Reverse_Shell.exe
rm: no se puede borrar 'dist': No existe el fichero o el directorio
rm: no se puede borrar 'build': No existe el fichero o el directorio
rm: no se puede borrar '
.spec': No existe el fichero o el directorio

Okay try:
wine ~/.wine/drive_c/Python27/Scripts/pip.exe install dis3

Charliedean you finally found the solution, thank you very much for your help and your time.

No problem,
Not sure why you had this issue