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

Commit

Permalink
Merge pull request #202 from g0tmi1k/misc
Browse files Browse the repository at this point in the history
Follow up PR for everything/anything
  • Loading branch information
ChrisTruncer authored Apr 29, 2018
2 parents d9b90c8 + 18dc2a0 commit 70dc241
Show file tree
Hide file tree
Showing 11 changed files with 95 additions and 92 deletions.
33 changes: 15 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,31 +94,30 @@ Veil's Main Menu:
```bash
$ ./Veil.py
===============================================================================
Veil | [Version]: 3.1.5
Veil | [Version]: 3.1.6
===============================================================================
[Web]: https://www.veil-framework.com/ | [Twitter]: @VeilFramework
===============================================================================

Main Menu

2 tools loaded
2 tools loaded

Available Tools:

1) Evasion
2) Ordnance
1) Evasion
2) Ordnance

Available Commands:

exit Completely exit Veil
info Information on a specific tool
list List available tools
options Show Veil configuration
update Update Veil
use Use a specific tool
exit Completely exit Veil
info Information on a specific tool
list List available tools
options Show Veil configuration
update Update Veil
use Use a specific tool


Main menu choice:
Veil>:
```

**Help**
Expand All @@ -129,9 +128,8 @@ usage: Veil.py [--list-tools] [-t TOOL] [--update] [--setup] [--config]
[-p [PAYLOAD]] [-o OUTPUT-NAME]
[-c [OPTION=value [OPTION=value ...]]]
[--msfoptions [OPTION=value [OPTION=value ...]]] [--msfvenom ]
[--compiler pyinstaller] [--clean] [--ordnance-payload [PAYLOAD]]
[--list-encoders] [-e ENCODER] [-b \x00\x0a..]
[--print-stats]
[--compiler pyinstaller] [--clean] [--ordnance-payload PAYLOAD]
[--list-encoders] [-e ENCODER] [-b \x00\x0a..] [--print-stats]

Veil is a framework containing multiple tools.

Expand Down Expand Up @@ -166,14 +164,14 @@ Veil is a framework containing multiple tools.
--clean Clean out payload folders
[*] Veil-Ordnance Shellcode Options:
--ordnance-payload [PAYLOAD]
--ordnance-payload PAYLOAD
Payload type (bind_tcp, rev_tcp, etc.)
[*] Veil-Ordnance Encoder Options:
--list-encoders Lists all available encoders
-e ENCODER, --encoder ENCODER
Name of shellcode encoder to use
-b \\x00\\x0a.., --bad-chars \x00\x0a..
-b \x00\x0a.., --bad-chars \x00\x0a..
Bad characters to avoid
--print-stats Print information about the encoded shellcode
$
Expand Down Expand Up @@ -206,7 +204,6 @@ strconv
reflect
encoding/binary
command-line-arguments
===============================================================================
Veil-Evasion
===============================================================================
Expand Down
73 changes: 50 additions & 23 deletions config/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ RESET="\033[00m" # Normal
func_title(){
## Echo title
echo " =========================================================================="
echo " Veil (Setup Script) | [Updated]: 2018-04-23"
echo " Veil (Setup Script) | [Updated]: 2018-04-29"
echo " =========================================================================="
echo " [Web]: https://www.veil-framework.com/ | [Twitter]: @VeilFramework"
echo " =========================================================================="
Expand Down Expand Up @@ -242,17 +242,50 @@ func_package_deps(){
echo -e " ${RED}[ERROR] ${msg}${RESET}\n"
fi

#ttf-mscorefonts-installer
sudo ${arg} apt-get install -y wine unzip winbind wget git ca-certificates \
mingw-w64 monodevelop mono-mcs \
ruby golang \
python python-crypto python-pefile python-pip python3-pip
# sudo - its everywhere
# unzip - used for de-compressing files during setup
# git - used for setup and keeping up-to-date
# mingw-w64 - cross compiling c payloads
# mono-mcs - c#/cs compiling payloads
# ruby - ruby payloads
# python3-* - python payloads
sudo ${arg} apt-get install -y sudo unzip git \
mingw-w64 \
mono-mcs \
ruby \
python3
if [[ "$?" -ne "0" ]]; then
msg="Failed with installing dependencies (1): $?"
errors="${errors}\n${msg}"
echo -e " ${RED}[ERROR] ${msg}${RESET}\n"
fi

if [ "${os}" == "debian" ] \
|| [ "${os}" == "kali" ] \
|| [ "${os}" == "parrot" ]; then
echo -e "\n\n [*] ${YELLOW}Installing Python's pycrypto (via apt)...${RESET}\n"
sudo ${arg} apt-get install -y python3-crypto
if [[ "$?" -ne "0" ]]; then
msg="Failed with installing dependencies (6): $?"
errors="${errors}\n${msg}"
echo -e " ${RED}[ERROR] ${msg}${RESET}\n"
fi
else
echo -e "\n\n [*] ${YELLOW}Installing Python's pycrypto (via pip3)...${RESET}\n"
sudo ${arg} apt-get install -y python3-pip
if [[ "$?" -ne "0" ]]; then
msg="Failed with installing dependencies (7): $?"
errors="${errors}\n${msg}"
echo -e " ${RED}[ERROR] ${msg}${RESET}\n"
fi

pip3 install pycrypto
if [[ "$?" -ne "0" ]]; then
msg="Failed with installing pip3 (1): $?"
errors="${errors}\n${msg}"
echo -e " ${RED}[ERROR] ${msg}${RESET}\n"
fi
fi
elif [ "${os}" == '"elementary"' ]; then
## Silent mode?
[ "${silent}" == "true" ] \
Expand Down Expand Up @@ -310,7 +343,7 @@ func_package_deps(){
## Couple of extras for other OSs
if [ "${os}" == "kali" ] \
|| [ "${os}" == "parrot" ]; then
sudo ${arg} apt-get install -y metasploit-framework python2.7 python3 python3-pycryptodome python3-crypto
sudo ${arg} apt-get install -y metasploit-framework
if [[ "$?" -ne "0" ]]; then
msg="Failed with installing dependencies (5): $?"
errors="${errors}\n${msg}"
Expand Down Expand Up @@ -545,7 +578,7 @@ func_package_deps(){
## Install Python dependencies
func_python_deps(){
## Banner
echo -e "\n\n [*] ${YELLOW}Initializing Python dependencies installation...${RESET}\n"
echo -e "\n\n [*] ${YELLOW}Initializing (OS + Wine) Python dependencies installation...${RESET}\n"

## Python (OS) - install-addons.sh
## In-case its 'First time run' for Wine (More information - http://wiki.winehq.org/Mono)
Expand All @@ -567,13 +600,6 @@ func_python_deps(){
echo -e " ${RED}[ERROR] ${msg}${RESET}\n"
fi

## If not kali or parrot, use pip to install
if [ "${os}" != "kali" ] \
&& [ "${os}" != "parrot" ]; then
echo -e "\n\n [*] ${YELLOW}Installing Python's pycrypto (via PIP3)...${RESET}\n"
pip3 install pycrypto
fi

## Cool down
sleep 3s

Expand All @@ -597,12 +623,13 @@ func_python_deps(){
[ -e "SCRIPTS" ] && sudo -u "${trueuser}" cp -rf SCRIPTS/* "${winedrive}/Python34/Scripts/"
## Run post install file
[ -e "SCRIPTS/pywin32_postinstall.py" ] && sudo -u "${trueuser}" WINEPREFIX="${winedir}" wine "${winedir}/drive_c/Python34/python.exe" "${winedrive}/Python34/Scripts/pywin32_postinstall.py" "-silent" "-quiet" "-install" >/dev/null
tmp="$?"
if [[ "${tmp}" -ne "0" ]]; then
msg="Failed to install ${FILE}... Exit code: ${tmp}"
errors="${errors}\n${msg}"
echo -e " ${RED}[ERROR] ${msg}${RESET}\n"
fi
## Due to pycrypto-2.6.1.win32-py3.4.exe not exacting cleaning, this will falsely trigger
#tmp="$?"
#if [[ "${tmp}" -ne "0" ]]; then
# msg="Failed to install ${FILE}... Exit code: ${tmp}"
# errors="${errors}\n${msg}"
# echo -e " ${RED}[ERROR] ${msg}${RESET}\n"
#fi
## Clean up
sudo rm -rf "PLATLIB/" "SCRIPTS/"
else
Expand All @@ -619,7 +646,7 @@ func_python_deps(){
popd >/dev/null

## Install Python (OS) extra setup files (PyInstaller)
echo -e "\n\n [*] ${YELLOW}Installing Python's PyInstaller (via TAR)${RESET}\n"
echo -e "\n\n [*] ${YELLOW}Installing (OS) Python's PyInstaller (via TAR)${RESET}\n"
if [ "${force}" == "false" ] \
&& [ -f "${veildir}/PyInstaller-3.2.1/pyinstaller.py" ]; then
echo -e "\n\n [*] ${YELLOW}PyInstaller v3.2 is already installed... Skipping...${RESET}\n"
Expand Down Expand Up @@ -666,7 +693,7 @@ func_python_deps(){


## Function done
echo -e "\n\n [*] ${YELLOW}Finished Python dependencies installation${RESET}\n"
echo -e "\n\n [*] ${YELLOW}Finished (Wine + OS) Python dependencies installation${RESET}\n"
}


Expand Down
14 changes: 14 additions & 0 deletions config/update-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,46 +209,60 @@ def generateConfig(options):
path = input( " [>] Please enter the directory of your system's temp path (e.g. /tmp/): " )
path = str(path)
options["TEMP_PATH"] = path
if not options["TEMP_PATH"].endswith('/'):
options["TEMP_PATH"] += "/"

# Check the paths are correct (METASPLOIT_PATH)
while not os.path.isdir( options["METASPLOIT_PATH"] ):
path = input( " [>] Please enter the directory of the Metasploit Framework (e.g. %s): " % ( options["METASPLOIT_PATH"] ) )
path = str(path)
options["METASPLOIT_PATH"] = path
if not options["METASPLOIT_PATH"].endswith('/'):
options["METASPLOIT_PATH"] += "/"

# Check the paths are correct (MSFVENOM_PATH)
while not os.path.isfile( options["MSFVENOM_PATH"] + "/msfvenom" ):
path = input( " [>] Please enter the directory of msfvenom (e.g. /usr/bin/): " )
path = str(path)
options["MSFVENOM_PATH"] = path
if not options["MSFVENOM_PATH"].endswith('/'):
options["MSFVENOM_PATH"] += "/"

# Check the paths are correct (VEIL_PATH)
while not os.path.isdir( options["VEIL_PATH"] ):
print( "\n [i] Can't find Veil's path? Run: %s --force --silent" % ( os.path.abspath("./config/setup.sh" ) ) )
path = str(path)
path = input( " [>] Please enter the directory to Veil (e.g. /opt/veil/): " )
options["VEIL_PATH"] = path
if not options["VEIL_PATH"].endswith('/'):
options["VEIL_PATH"] += "/"

# Check the paths are correct (PYINSTALLER_PATH)
while not os.path.isdir( options["PYINSTALLER_PATH"] ):
print( "\n [i] Can't find PyInstaller? Run: %s --force --silent" % ( os.path.abspath("./config/setup.sh" ) ) )
path = input( " [>] Please enter the directory of PyInstaller (e.g. %s): " % ( options["PYINSTALLER_PATH"] ) )
path = str(path)
options["PYINSTALLER_PATH"] = path
if not options["PYINSTALLER_PATH"].endswith('/'):
options["PYINSTALLER_PATH"] += "/"

# Check the paths are correct (WINEPREFIX)
while not os.path.isdir( options["WINEPREFIX"] ):
print( "\n [i] Can't find WINE profile? Run: %s --force --silent" % ( os.path.abspath("./config/setup.sh" ) ) )
path = input( " [>] Please enter the directory of Veil's WINE profile (e.g. %s): " % ( options["WINEPREFIX"] ) )
path = str(path)
options["WINEPREFIX"] = path
if not options["WINEPREFIX"].endswith('/'):
options["WINEPREFIX"] += "/"

# Check the paths are correct (GOLANG_PATH)
while not os.path.isdir( options["GOLANG_PATH"] ):
print( "\n [i] Can't find GoLang? Run: %s --force --silent" % ( os.path.abspath("./config/setup.sh" ) ) )
path = input( " [>] Please enter the directory of GoLang (e.g. %s): " % ( options["GOLANG_PATH"] ) )
path = str(path)
options["GOLANG_PATH"] = path
if not options["GOLANG_PATH"].endswith('/'):
options["GOLANG_PATH"] += "/"
# Unsupported platform...
else:
print( " [!] ERROR: PLATFORM NOT CURRENTLY SUPPORTED" )
Expand Down
2 changes: 0 additions & 2 deletions lib/common/orchestra.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ def list_tools(self, show_header = True):
# Did we run a command?
if show_header:
# show title bar
print()
messages.title_screen()
print()
print(helpers.color(' [*] Available Tools:\n'))
else:
print("Available Tools:\n")
Expand Down
8 changes: 4 additions & 4 deletions tools/evasion/evasion_common/evasion_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ def compileToTemp(language, payloadSource):
"""
if language == "cs":

tempExeName = settings.TEMP_PATH + "/temp.exe"
tempSourceName = settings.TEMP_PATH + "/temp.cs"
tempExeName = settings.TEMP_PATH + 'temp.exe'
tempSourceName = settings.TEMP_PATH + 'temp.cs'

# write out the payload source to the temporary location
with open(settings.TEMP_PATH + "/temp.cs", 'w') as f:
with open(settings.TEMP_PATH + 'temp.cs', 'w') as f:
f.write(payloadSource)

# Compile our CS code into an executable and pass a compiler flag to prevent it from opening a command prompt when run
Expand Down Expand Up @@ -100,7 +100,7 @@ def LHOST():

def obfuscateNum(N, mod):
"""
Take a number and modulus and return an obsucfated form.
Take a number and modulus and return an obfuscated form.
Returns a string of the obfuscated number N
"""
d = random.randint(1, mod)
Expand Down
Loading

0 comments on commit 70dc241

Please sign in to comment.