Veil Evasion doesn't install


(Ayucaba) #1

i did

apt-get install veil

and everything runs fine after i do

 /usr/share/veil/config/setup.sh --force --silent

 ==========================================================================
                 Veil (Setup Script) | [Updated]: 2018-05-08
 ==========================================================================

     [Web]: https://www.veil-framework.com/ | [Twitter]: @VeilFramework
 ==========================================================================

                 os = parrot
          osversion = 4.5
       osmajversion = 4
               arch = x86_64
           trueuser = root
   userprimarygroup = root
        userhomedir = /home/user
            rootdir = /usr/share/veil
            veildir = /var/lib/veil
          outputdir = /var/lib/veil/output
    dependenciesdir = /var/lib/veil/setup-dependencies
            winedir = /var/lib/veil/wine
          winedrive = /var/lib/veil/wine/drive_c
            gempath = Z:\var\lib\veil\wine\drive_c\Ruby187\bin\gem

 [I] Parrot Security 4.5 x86_64 detected...

 [I] Silent Mode: Enabled
 [I]  Force Mode: Enabled


 [?] Are you sure you wish to install Veil?

     Continue with installation? ([y]es/[s]ilent/[N]o): S



 [*] Initializing package installation



 [*] Pulling down binary dependencies

rm: cannot remove '/var/lib/veil/setup-dependencies/.git/branches': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/hooks/applypatch-msg.sample': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/hooks/commit-msg.sample': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/hooks/fsmonitor-watchman.sample': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/hooks/post-update.sample': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/hooks/pre-applypatch.sample': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/hooks/pre-commit.sample': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/hooks/pre-push.sample': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/hooks/pre-rebase.sample': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/hooks/pre-receive.sample': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/hooks/prepare-commit-msg.sample': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/hooks/update.sample': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/info/exclude': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/refs/heads/master': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/refs/tags': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/refs/remotes/origin/HEAD': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/objects/pack': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/objects/info': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/objects/90/8ddf4387bb317d67d70ce5f35b85011e1e6e6a': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/objects/11/429f6fdaac62d8e2124e97ac2daaa7a8364b46': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/objects/d7/75f37e2b7a9a6dc5958886217e1c486b5ccc36': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/objects/19/b348a02422c96ede48f66912a7e219c2dee78c': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/objects/ee/778ce495f7b1ed5bcce807677a9ba713276f83': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/objects/92/f0dec4858fa862ba76f1e80c44c2d67b7643cb': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/objects/d4/f64d51890e906d81d6ab979481023235c83fb2': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/objects/b6/8729f22cbcea19589053c0611465ecd64f2af9': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/objects/6f/6a9dbcaa4ad66010258ac17aacd3339a8ffda3': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/objects/82/d10ff168db9a7c8c58d65c8b460786e5e90a42': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/objects/85/ad534d3136e9f5651dde6b4f63c3440609d3f1': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/objects/91/f3f4d3bdc886806f99dadd03d727ba2fe57cf8': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/packed-refs': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/logs/refs/remotes/origin/HEAD': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/logs/refs/heads/master': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/logs/HEAD': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/HEAD': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/config': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/.git/index': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/PyInstaller-3.2.1.tar': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/autoit-v3-setup.exe': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/go1.7.5.linux-386.tar.gz': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/go1.7.5.linux-amd64.tar.gz': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/ocra-1.3.6.gem': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/pycrypto-2.6.1.win32-py3.4.exe': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/python-3.4.4.msi': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/pywin32-220.win32-py3.4.exe': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/ruby_gems-1.8.zip': Permission denied
rm: cannot remove '/var/lib/veil/setup-dependencies/rubyinstaller-1.8.7-p371.exe': Permission denied
 [*] Already detected folder: /var/lib/veil/setup-dependencies

 [*] Trying to git pull

[sudo] password for user: 
Already up to date.


 [*] Installing Wine

 [*] Already have x86 architecture added...



 [*] Installing Wine 32-bit and 64-bit binaries (via APT)

wine is already the newest version (4.0~rc6-1).
wine64 is already the newest version (4.0~rc6-1).
wine32:i386 is already the newest version (4.0~rc6-1).
The following packages were automatically installed and are no longer required:
  galera-3 libconfig-inifiles-perl libdbd-mysql-perl libjemalloc1
  mariadb-client-core-10.1 mariadb-server-core-10.1
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


 [*] [ALERT]: Existing Veil Wine environment detected at: /var/lib/veil/wine

     Do you want to nuke it? ([y]es/[N]o): Y

 [*] Deleting existing Veil Wine environment...

 [*] Creating new Veil Wine environment in: /var/lib/veil/wine

 [*] Initializing Veil's Wine environment...

wineserver: mkdir /run/user/0/wine: No such file or directory
wineserver: mkdir /run/user/0/wine: No such file or directory
 [*] Veil Wine environment successfully created!



 [*] Finished package installation



 [*] Initializing (OS + Wine) Python dependencies installation...



 [*] Installing (Wine) Python...

 [*]  Next -> Next -> Next -> Finished! ...Overwrite if prompt (use default values)

wineserver: mkdir /run/user/0/wine: No such file or directory
 [ERROR] Failed to install (Wine) Python 3.4.4... Exit code: 1



 [*] Installing (Wine) Python dependencies...



 [*] Installing (Wine) Python's pywin32-220.win32-py3.4.exe...

 [*]  Next -> Next -> Next -> Finished! ...Overwrite if prompt (use default values)

warning [pywin32-220.win32-py3.4.exe]:  192288 extra bytes at beginning or within zipfile
  (attempting to process anyway)
cp: target '/var/lib/veil/wine/drive_c/Python34/Lib/site-packages/' is not a directory
cp: target '/var/lib/veil/wine/drive_c/Python34/Scripts/' is not a directory
wineserver: mkdir /run/user/0/wine: No such file or directory


 [*] Installing (Wine) Python's pycrypto-2.6.1.win32-py3.4.exe...

 [*]  Next -> Next -> Next -> Finished! ...Overwrite if prompt (use default values)

warning [pycrypto-2.6.1.win32-py3.4.exe]:  191515 extra bytes at beginning or within zipfile
  (attempting to process anyway)
cp: target '/var/lib/veil/wine/drive_c/Python34/Lib/site-packages/' is not a directory


 [*] Installing (OS) Python's PyInstaller (via TAR)



 [*] Installing (Wine) Python's PIP pefile

wineserver: mkdir /run/user/0/wine: No such file or directory
 [ERROR] Failed to run (wine) Python pip... Exit code: 1

wineserver: mkdir /run/user/0/wine: No such file or directory
 [ERROR] Failed to run (wine) Python pip future... Exit code: 1

wineserver: mkdir /run/user/0/wine: No such file or directory
 [ERROR] Failed to run (wine) Python pip pefile... Exit code: 1



 [*] Finished (Wine + OS) Python dependencies installation



 [*] Initializing (Wine) Ruby installation...



 [*] Installing (Wine) Ruby & dependencies

 [*]  Next -> Next -> Next -> Finished! ...Overwrite if prompt (use default values)

wineserver: mkdir /run/user/0/wine: No such file or directory
 [ERROR] Failed to install (Wine) Ruby.exe... Exit code: 1



 [*] Installing (Wine) Ruby OCRA gem...

wineserver: mkdir /run/user/0/wine: No such file or directory
 [ERROR] Failed to run (wine) Ruby OCRA.. Exit code: 1



 [*] Extracting (Wine) Ruby dependencies...



 [*] Finished Ruby installation



 [*] Initializing Go installation...



 [*] Installing Go x86_64 (via TAR)



 [*] Finished Go installation



 [*] Initializing AutoIT installation...



 [*] Installing (Wine) AutoIT

 [*]  Next -> Next -> Next -> Finished! ...Overwrite if prompt (use default values)

wineserver: mkdir /run/user/0/wine: No such file or directory
 [ERROR] Failed to run (wine) AutoIT.. Exit code: 1



 [*] Finished AutoIT installation



 [*] Updating Veil configuration...

 [*] Detected current Veil settings. Removing...


 Veil Configuration:
 [*] OPERATING_SYSTEM = Linux
 [*] TERMINAL_CLEAR = clear
 [*] VEIL_PATH = /usr/share/veil/
 [*] WINEPREFIX = /var/lib/veil/wine/
 [*] TEMP_PATH = /tmp/
 [*] METASPLOIT_PATH = /opt/metasploit-framework/embedded/framework/
 [*] MSFVENOM_PATH = /usr/local/bin/
 [*] MSFVENOM_OPTIONS = 
 [*] PYINSTALLER_PATH = /var/lib/veil/PyInstaller-3.2.1/
 [*] GOLANG_PATH = /var/lib/veil/go/



 Veil-Evasion Configuration:
 [*] PAYLOAD_SOURCE_PATH = /var/lib/veil/output/source/
 [*] PAYLOAD_COMPILED_PATH = /var/lib/veil/output/compiled/
 [*] HANDLER_PATH = /var/lib/veil/output/handlers/
 [*] HASH_LIST = /var/lib/veil/output/hashes.txt
 [I] Path '/etc/veil/' Created
 [I] Configuration File Written To: '/etc/veil/settings.py'



 [*] Ensuring this account (root) owns veil output directory (/var/lib/veil/output)...

 [*] Ensuring this account (root) has correct ownership of /var/lib/veil/wine



 [*] Finished Veil configuration...



 [*] Finished environment checks

 [ERROR] There was issues installing the following:

 
Failed to install (Wine) Python 3.4.4... Exit code: 1
Failed to run (wine) Python pip... Exit code: 1
Failed to run (wine) Python pip future... Exit code: 1
Failed to run (wine) Python pip pefile... Exit code: 1
Failed to install (Wine) Ruby.exe... Exit code: 1
Failed to run (wine) Ruby OCRA.. Exit code: 1
Failed to run (wine) AutoIT.. Exit code: 1

that’s the eror why??


(Zeppole & Espresso) #2

try sudo mkdir /run/user/0 and then re-run ./config/setup.sh --force --silent


(Ayucaba) #3

i typed veil and =

 [!] ERROR #2-3: Can't find the Metasploit Framework (/opt/metasploit-framework/embedded/framework/).   Run: /usr/share/veil/config/setup.sh --force --silent

what you replied sorted the problem of before! Veil still unusable tho…

if asks me where is it located the folder of metasploit what i need to type??


(Matt) #4

Setup needs to be run as root.

sudo /usr/share/veil/config/setup.sh --force --silent

(Nico Paul) #5

Is it better to do this or run in a vm so that its isolated like dvwa?


(Matt) #6

Its only for the setup script, so shouldn’t be a problem.

From there github (https://github.com/Veil-Framework/Veil):

Installation must be done with superuser privileges. If you are not using the root account (as default with Kali Linux), prepend commands with sudo or change to the root user before beginning.


#7

I don’t think this will work. You have to run the setup script with sudo, but those winserver errors are coming from running wine with elevated privileges. Just try it: wine rnd.exe and sudo wine rnd.exe the wineserver will always complain with sudo.
I tried to fix that by running sudo firejail --noprofile wine, hoping it would fix the sudo error- just because I had no other idea and usually when something doesn’t work in parrot it’s firejail related, but that did not help either.


(Lavander Nervox) #8

Yes , I have the same issue , Parrot Os security 4.5.1 x86 , and the same error : Failed to install (Wine) Python 3.4.4… Exit code: 1
Failed to run (wine) Python pip… Exit code: 1
Failed to run (wine) Python pip future… Exit code: 1
Failed to run (wine) Python pip pefile… Exit code: 1
Failed to install (Wine) Ruby.exe… Exit code: 1
Failed to run (wine) Ruby OCRA… Exit code: 1
Failed to run (wine) AutoIT… Exit code: 1 . I tried doing all above. Tomorrow I’ll check for a solution and post it here if I find one. Have you tried to nuke the wine folder ? I have also found this link https://github.com/Veil-Framework/Veil/issues/245


(dmknght) #9

It is because firejail blocked wine task during installation (as i remember).


(Lavander Nervox) #10

Oh , is there a way to fix this issue ? Maybe allowing wine via white list ?


(dmknght) #11

Sorry for lately reply. As I remember, I started veil setup script with “no sandbox” option. I remember I tried install py2exe in wine manually and skipped setup script as well. Must test them first. Gonna report back as soon as possible.


(dmknght) #12

I am running setup script automatically. Run as normal user is fine, it will as sudo permission. permission denied happened from 2nd time execute setup script only. This problem is metasploit-framework path error. I modified it to /usr/share/metasploit-framework and ran it again.
Here is screenshot (my previous comments were previous version of veil so it doesn’t work).

Screenshot%20from%202019-02-08%2021-09-34
The fix: modify config file (with root permission) at /usr/share/veil/config/update-config.py, edit metasploit path and msfvenom path, it should look like this:
Screenshot%20from%202019-02-08%2021-11-18
then run setup script again
Update: This script detect Parrot as regular Linux distribution. I am creating new issue on veil git, suggest dev team add Parrot to distro check
Screenshot%20from%202019-02-08%2021-12-56


(dmknght) #13

Veil has merged my pull request. Next Veil version should be fine on Parrot.
https://github.com/Veil-Framework/Veil/commit/2c5f076ebd4d84a7d2793214737b06fe3d842371