Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

[!] ERROR: Unable to create output file. [!] Internal error #2. Unable to generate output. Please run /root/Desktop/Veil-Evasion-master/config/update.py manually #163

Closed
NOTMRRIYBOT opened this issue Feb 7, 2018 · 6 comments

Comments

@NOTMRRIYBOT
Copy link

[!] ERROR: Unable to create output file.

[!] Internal error #2. Unable to generate output. Please run /root/Desktop/Veil-Evasion-master/config/update.py manually
why :(

@ChrisTruncer
Copy link
Member

the tool is literally telling you exactly what to do. Please follow the directions

@NOTMRRIYBOT
Copy link
Author

Veil-Framework configuration:

[] OPERATING_SYSTEM = Kali
[
] TERMINAL_CLEAR = clear
[] WINEPREFIX = /root/.config/wine/veil/
[
] TEMP_DIR = /tmp/
[] MSFVENOM_OPTIONS =
[
] METASPLOIT_PATH = /usr/share/metasploit-framework/
[] MSFVENOM_PATH = /usr/bin/
[
] PYINSTALLER_PATH = /opt/veil/PyInstaller-3.2/

[] VEIL_EVASION_PATH = /root/Desktop/Veil-Evasion-master/
[
] PAYLOAD_SOURCE_PATH = /usr/share/veil-output/source/
[] PAYLOAD_COMPILED_PATH = /usr/share/veil-output/compiled/
[
] GENERATE_HANDLER_SCRIPT = True
[] HANDLER_PATH = /usr/share/veil-output/handlers/
[
] HASH_LIST = /usr/share/veil-output/hashes.txt

[] VEIL_CATAPULT_PATH = /root/Desktop/Veil-Catapult/
[
] CATAPULT_RESOURCE_PATH = /usr/share/veil-output/catapult/

Configuration File Written To '/etc/veil/settings.py'
Its give me like that and its not working

@mohamedawis
Copy link

: Unable to create output file.

[!] Internal error #2. Unable to generate output. Please run /root/Desktop/Veil-Evasion-master/config/update.py manually same problem what are u doing to solve this problem

@bugs007
Copy link

bugs007 commented Jun 3, 2018

Unable to generate output. Please run /root/Veil-Evasion/config/update.py manually

Do we have any solution to get rid of this error ?

@bugs007
Copy link

bugs007 commented Jun 3, 2018

Veil-Framework configuration:

[] OPERATING_SYSTEM = Kali
[] TERMINAL_CLEAR = clear
[] WINEPREFIX = /root/.config/wine/veil/
[] TEMP_DIR = /tmp/
[] MSFVENOM_OPTIONS =
[] METASPLOIT_PATH = /usr/share/metasploit-framework/
[] MSFVENOM_PATH = /usr/bin/
[] PYINSTALLER_PATH = /opt/veil/PyInstaller-3.2/

[] VEIL_EVASION_PATH = /root/Desktop/Veil-Evasion-master/
[] PAYLOAD_SOURCE_PATH = /usr/share/veil-output/source/
[] PAYLOAD_COMPILED_PATH = /usr/share/veil-output/compiled/
[] GENERATE_HANDLER_SCRIPT = True
[] HANDLER_PATH = /usr/share/veil-output/handlers/
[] HASH_LIST = /usr/share/veil-output/hashes.txt

[] VEIL_CATAPULT_PATH = /root/Desktop/Veil-Catapult/
[] CATAPULT_RESOURCE_PATH = /usr/share/veil-output/catapult/

Configuration File Written To '/etc/veil/settings.py'

I have tried to run the update.py with above details.

@georgemulder
Copy link

georgemulder commented Oct 24, 2018

Hi, I got the same error with no log and about what is (not) happening.
First at all i see that
in /usr/share/veil-output/source/ was a payload.c and
in /usr/share/veil-output/handlers/ a payload_handler.rc but
no .exe in /usr/share/veil-output/compiled/

With this clue i decided to run strace on the program. In kali you have to apt-get install strace and then execute Veil-Evasion.py. With a simple ps guess veil's pid and execute strace -fF -t -p 2>strace_log.txt

In that log i can see (started at the end of the file):

23:59:01 openat(AT_FDCWD, "/usr/share/veil-output/compiled/payload.exe", O_RDONLY) = -1 ENOENT (No such file or directory)

My .exe does not exist (I knew it)

Lot of lines before:

23:59:01 openat(AT_FDCWD, "/usr/share/veil-output/source/payload.c", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
23:59:01 write(3, "#define _WIN32_WINNT 0x0500\n#inc"..., 4096) = 4096

Generating the .c source code file

23:59:01 openat(AT_FDCWD, "/usr/share/veil-output/handlers/payload_handler.rc", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
23:59:01 write(3, "use exploit/multi/handler\nset PA"..., 147) = 147

Generating the metasploit handler resource file

[pid 23844] 23:59:01 execve("/bin/sh", ["sh", "-c", "i686-w64-mingw32-gcc -Wl,-subsys"...], 0x563c36cf6920 /* 24 vars */) = 0

It seems that it is trying to compile...

[pid 23844] 23:59:01 stat("/usr/local/sbin/i686-w64-mingw32-gcc", 0x7ffc717adc10) = -1 ENOENT (No such file or directory)
[pid 23844] 23:59:01 stat("/usr/local/bin/i686-w64-mingw32-gcc", 0x7ffc717adc10) = -1 ENOENT (No such file or directory)
[pid 23844] 23:59:01 stat("/usr/sbin/i686-w64-mingw32-gcc", 0x7ffc717adc10) = -1 ENOENT (No such file or directory)
[pid 23844] 23:59:01 stat("/usr/bin/i686-w64-mingw32-gcc", 0x7ffc717adc10) = -1 ENOENT (No such file or directory)
[pid 23844] 23:59:01 stat("/sbin/i686-w64-mingw32-gcc", 0x7ffc717adc10) = -1 ENOENT (No such file or directory)
[pid 23844] 23:59:01 stat("/bin/i686-w64-mingw32-gcc", 0x7ffc717adc10) = -1 ENOENT (No such file or directory)
[pid 23844] 23:59:01 write(2, "sh: 1: ", 7) = 7
[pid 23844] 23:59:01 write(2, "i686-w64-mingw32-gcc: not found", 31) = 31

Look for the binary but we are not lucky...

We can infer that is the problem. With a easy google search we can see that apt-get install mingw-w64 installs the binary.

After some minutes I tried veil again and now yes... We are lucky.

Edit:
write(2, "i686-w64-mingw32-gcc: not found", 31)

Write 2... 2 is the file descriptor for standard error... But with the veil's cli we can't see the error. For future errors it is recommended that you execute veil in this way ./Veil-evasion.py 2> error.log. If you try to generate the payload without the gcc you will see in error.log: "sh: 1: i686-w64-mingw32-gcc: not found"
just the text in the two write calls in the end of this post.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants