diff --git a/Tools/Evasion/Tool.py b/Tools/Evasion/Tool.py index 0dc5f65..2c8edad 100644 --- a/Tools/Evasion/Tool.py +++ b/Tools/Evasion/Tool.py @@ -34,7 +34,7 @@ class Tools: def __init__(self, cli_options=None): self.cli_name = "Evasion" - self.description = "Generates antivirus avoiding executables #avlol" + self.description = "Generates Anti-Virus avoiding executables #avlol" # Payloads currently within the payload directories self.active_payloads = {} # Load all payload modules diff --git a/Veil.py b/Veil.py index a166008..36235ed 100755 --- a/Veil.py +++ b/Veil.py @@ -20,74 +20,76 @@ '-h', '-?', '--h', '-help', '--help', action="store_true", help=argparse.SUPPRESS) - veilframework = parser.add_argument_group('Veil Options') + veilframework = parser.add_argument_group('[*] Veil Options') veilframework.add_argument( - '--update', action='store_true', help='Update the Veil framework.') + '--list-tools', action="store_true", default=False, + help='List Veil\'s tools') veilframework.add_argument( - '--setup', action='store_true', help='Run\'s the Veil framework setup file & regenerates the configuration.') + '-t', '--tool', metavar='TOOL', default=False, + help='Specify Veil tool to use (Evasion, Ordnance etc.)') veilframework.add_argument( - '--config', action='store_true', help='Regenerate the Veil framework configuration file.') + '--update', action='store_true', help='Update the Veil framework') veilframework.add_argument( - '--version', action="store_true", help='Displays version and quits.') + '--setup', action='store_true', help='Run the Veil framework setup file & regenerate the configuration') veilframework.add_argument( - '--list-tools', action="store_true", default=False, - help='List Veil\'s tools') + '--config', action='store_true', help='Regenerate the Veil framework configuration file') veilframework.add_argument( - '-t', '--tool', metavar='Veil-Framework', default=False, - help='Specify Veil tool to use') + '--version', action="store_true", help='Displays version and quits') - callback_args = parser.add_argument_group('Callback Settings') + callback_args = parser.add_argument_group('[*] Callback Settings') callback_args.add_argument( - "--ip", "--domain", metavar="IP Address", default=None, - help="IP Address to connect back to") + "--ip", "--domain", metavar="IP", default=None, + help='IP address to connect back to') callback_args.add_argument( - '--port', metavar="Port Number", default=8675, type=int, - help="Port number to connect to.") + '--port', metavar="PORT", default=8675, type=int, + help='Port number to connect to') - veilevasion = parser.add_argument_group('Veil-Evasion Options') - veilevasion.add_argument( - '-c', metavar='OPTION1=value OPTION2=value', nargs='*', - default=None, help='Custom payload module options.') - veilevasion.add_argument( - '-o', metavar="OUTPUT NAME", default="payload", - help='Output file base name for source and compiled binaries.') + payload_args = parser.add_argument_group('[*] Payload Settings') + payload_args.add_argument( + '--list-payloads', default=False, action='store_true', + help='Lists all available payloads for that tool') + + veilevasion = parser.add_argument_group('[*] Veil-Evasion Options') veilevasion.add_argument( '-p', metavar="PAYLOAD", nargs='?', const="list", - help='Payload to generate. Lists payloads if none specified.') + help='Payload to generate') veilevasion.add_argument( - '--clean', action='store_true', - help='Clean out payload folders.') + '-o', metavar="OUTPUT-NAME", default="payload", + help='Output file base name for source and compiled binaries') + veilevasion.add_argument( + '-c', metavar='OPTION=value', nargs='*', + default=None, help='Custom payload module options') veilevasion.add_argument( '--msfoptions', metavar="OPTION=value", nargs='*', - help='Options for the specified metasploit payload.') + help='Options for the specified metasploit payload') veilevasion.add_argument( - '--msfvenom', metavar="windows/meterpreter/reverse_tcp", nargs='?', - default='windows/meterpreter/reverse_tcp', help='Metasploit shellcode to generate.') + '--msfvenom', metavar="", nargs='?', + default='windows/meterpreter/reverse_tcp', help='Metasploit shellcode to generate (e.g. windows/meterpreter/reverse_tcp etc.)') veilevasion.add_argument( '--compiler', metavar="pyinstaller", default='pyinstaller', help='Compiler option for payload (currently only needed for Python)') + veilevasion.add_argument( + '--clean', action='store_true', + help='Clean out payload folders') - ordnance_shellcode = parser.add_argument_group('Veil-Ordnance Shellcode Options') + ordnance_shellcode = parser.add_argument_group('[*] Veil-Ordnance Shellcode Options') ordnance_shellcode.add_argument( "--ordnance-payload", metavar="rev_tcp", default=None, - help="Payload type (bind_tcp, rev_tcp, etc.)") - ordnance_shellcode.add_argument( - '--list-payloads', default=False, action='store_true', - help="Lists all available payloads.") + help='Payload type (bind_tcp, rev_tcp, etc.)') - ordnance_encoder = parser.add_argument_group('Veil-Ordnance Encoder Options') + ordnance_encoder = parser.add_argument_group('[*] Veil-Ordnance Encoder Options') ordnance_encoder.add_argument( - "-e", "--encoder", metavar="Encoder Name", default=None, - help="Name of Shellcode Encoder to use") + '--list-encoders', default=False, action='store_true', + help='Lists all available encoders') ordnance_encoder.add_argument( - "-b", "--bad-chars", metavar="\\\\x00\\\\x0a..", default=None, - help="Bad characters to avoid") + "-e", "--encoder", metavar="ENCODER", default=None, + help='Name of shellcode encoder to use') ordnance_encoder.add_argument( - '--list-encoders', default=False, action='store_true', - help="Lists all available encoders.") + "-b", "--bad-chars", metavar="\\\\x00\\\\x0a..", default=None, + help='Bad characters to avoid') ordnance_encoder.add_argument( '--print-stats', default=False, action='store_true', - help="Print information about the encoded shellcode.") + help='Print information about the encoded shellcode') args = parser.parse_args() diff --git a/config/setup.sh b/config/setup.sh index 9989877..032a443 100755 --- a/config/setup.sh +++ b/config/setup.sh @@ -3,19 +3,21 @@ ## Global variables os="$( awk -F '=' '/^ID=/ {print $2}' /etc/os-release 2>&- )" -if [ "${os}" == "ubuntu" ] \ -|| [ "${os}" == "arch" ] \ +if [ "${os}" == "arch" ] \ || [ "${os}" == "blackarch" ] \ || [ "${os}" == "debian" ] \ -|| [ "${os}" == '"elementary"' ] \ || [ "${os}" == "deepin" ] \ -|| [ "${os}" == "linuxmint" ] ; then +|| [ "${os}" == "elementary" ] \ +|| [ "${os}" == "kali" ] \ +|| [ "${os}" == "linuxmint" ] \ +|| [ "${os}" == "ubuntu" ]; then trueuser="$( who | tr -d '\n' | cut -d' ' -f1 )" else - ## If this is blank, we're actually root (kali) + ## If this is blank, we're actually root trueuser="$( who am i | cut -d' ' -f1 )" fi +## If this is blank, we're actually root if [ "${trueuser}" == "" ]; then trueuser="root" fi @@ -39,8 +41,13 @@ dependenciesdir="${veildir}/setup-dependencies" runuser="$( whoami )" userprimarygroup="$( id -Gn "${trueuser}" | cut -d' ' -f1 )" rootdir=$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd ) -winedir="${userhomedir}/.config/wine/veil" +winedir="${veildir}/wine/veil" winedrive="${winedir}/drive_c" +gempath="${winedir}\drive_c\Ruby187\bin\gem" +replace="\\" +prefix="Z:" +gempath=${gempath////$replace} +gempath=${prefix}${gempath} BOLD="\033[01;01m" # Highlight RED="\033[01;31m" # Issues/Errors @@ -108,9 +115,14 @@ func_check_env(){ echo -e "${GREEN}S${RESET}\n" else read -p '' install - if [ "${install}" == 's' ]; then + install=$(echo "${install}" | tr '[:upper:]' '[:lower:]') + echo + + if [ "${install}" == 's' ] \ + || [ "${install}" == 'silent' ]; then silent=true - elif [ "${install}" != 'y' ]; then + elif [ "${install}" != 'y' ] \ + && [ "${install}" != 'yes' ]; then echo -e "\n\n ${RED}[ERROR]: Installation aborted by user${RESET}\n" exit 1 fi @@ -124,9 +136,13 @@ func_check_env(){ echo -e "\n\n ${BOLD}[!] NON-KALI Users: Before you begin the install, make sure that you have" echo -e " the Metasploit-Framework installed before you proceed!${RESET}\n" echo -en " Continue with installation? ([${BOLD}Y${RESET}]es/[${BOLD}n${RESET}]o): " + read -p '' install + install=$(echo "${install}" | tr '[:upper:]' '[:lower:]') + echo + if [ "${install}" == 'n' ] \ - || [ "${install}" == 'N' ]; then + || [ "${install}" == 'no' ]; then echo -e "\n\n ${RED}[ERROR]: Installation aborted by user${RESET}\n" exit 1 fi @@ -203,12 +219,15 @@ func_package_deps(){ echo -e " [*] ${YELLOW}Already detected folder: ${BOLD}${dependenciesdir}${RESET}\n" echo -e " [*] ${YELLOW}Trying to git pull${RESET}\n" pushd "${dependenciesdir}" >/dev/null + sudo git reset --hard HEAD >/dev/null + sudo git clean -fd >/dev/null sudo git pull \ || echo -e "${RED}[ERROR]: Failed with git pull (1)\n${RESET}\n" popd >/dev/null else echo -e " [*] ${YELLOW}Empty folder... git cloning${RESET}\n" - sudo mkdir -p "${dependenciesdir}"; sudo rm -rf "${dependenciesdir}" + sudo mkdir -p "${dependenciesdir}" + sudo rm -rf "${dependenciesdir}" sudo git clone https://github.com/Veil-Framework/VeilDependencies.git "${dependenciesdir}" \ || echo -e "${RED}[ERROR]: Failed with git clone (1)\n${RESET}\n" fi @@ -218,6 +237,8 @@ func_package_deps(){ ## Always install 32-bit support for 64-bit architectures ## echo -e "\n\n [*] ${YELLOW}Installing Wine${RESET}\n" + + ## Debian based distributions if [ "${os}" == "ubuntu" ] \ || [ "${os}" == "debian" ] \ @@ -225,7 +246,9 @@ func_package_deps(){ || [ "${os}" == "parrot" ] \ || [ "${os}" == "deepin" ] \ || [ "${os}" == "linuxmint" ]; then - [ "${silent}" == "true" ] && arg=" DEBIAN_FRONTEND=noninteractive" + [ "${silent}" == "true" ] \ + && arg=" DEBIAN_FRONTEND=noninteractive" \ + || arg="" if [ "${arch}" == "x86_64" ]; then echo -e "\n\n [*] ${YELLOW}Adding x86 architecture to x86_64 system for Wine${RESET}\n" @@ -233,7 +256,7 @@ func_package_deps(){ sudo apt-get -qq update \ || echo -e "${RED}[ERROR]: Failed with apt-get update (1)\n${RESET}\n" - echo -e "\n\n [*] ${YELLOW}Installing Wine 32-bit and 64-bit binaries${RESET}\n" + echo -e "\n\n [*] ${YELLOW}Installing Wine 32-bit and 64-bit binaries (via APT)${RESET}\n" if [ "${os}" == "ubuntu" ] \ || [ "${os}" == "linuxmint" ]; then ## Special urghbuntu derivative snowflakes @@ -270,7 +293,7 @@ func_package_deps(){ ## Elementary OS x86_64 elif [ "${os}" == '"elementary"' ]; then - echo -e "\n\n [*] ${YELLOW}Installing Wine on Elementary OS${RESET}\n" + echo -e "\n\n [*] ${YELLOW}Installing Wine on Elementary OS (via APT)${RESET}\n" sudo ${arg} apt-get -y -qq install wine wine1.6 wine1.6-amd64 \ || echo -e "${RED}[ERROR]: Failed with apt-get install wine (4)\n${RESET}\n" tmp="$?" @@ -284,7 +307,7 @@ func_package_deps(){ elif [ "${os}" == "fedora" ] \ || [ "${os}" == "rhel" ] \ || [ "${os}" == "centos" ]; then - echo -e "\n\n [*] ${YELLOW}Installing Wine 32-bit on x86_64 System${RESET}\n" + echo -e "\n\n [*] ${YELLOW}Installing Wine 32-bit on x86_64 System (via DNF)${RESET}\n" sudo dnf install -y wine.i686 wine tmp="$?" if [ "${tmp}" -ne "0" ]; then @@ -294,6 +317,7 @@ func_package_deps(){ fi elif [ "${os}" == "arch" ] \ || [ "${os}" == "blackarch" ]; then + echo -e "\n\n [*] ${YELLOW}Installing Wine 32-bit on x86_64 System (via PACMAN)${RESET}\n" if grep -Fxq "#[multilib]" /etc/pacman.conf; then echo "[multilib]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf fi @@ -322,13 +346,15 @@ func_package_deps(){ echo -e "${GREEN}Y${RESET}\n" else read -p '' nukewinedir + nukewinedir=$(echo "${nukewinedir}" | tr '[:upper:]' '[:lower:]') + echo fi if [ "${nukewinedir}" == 'y' ] \ - || [ "${nukewinedir}" == 'Y' ] \ - || [ "${silent}" == 'true' ] ; then + || [ "${nukewinedir}" == 'yes' ] \ + || [ "${silent}" == 'true' ]; then echo -e " [*] ${YELLOW}Deleting existing Veil Wine environment...${RESET}\n" - rm -rf "${winedir}" + sudo rm -rf "${winedir}" else echo -e " [*] ${YELLOW}Maintaining current Veil Wine environment...${RESET}\n" fi @@ -338,7 +364,8 @@ func_package_deps(){ ## For creating wine environment on newer distros if [ -f "/usr/bin/wineboot" ]; then winebootexists=true - sudo -u "${trueuser}" mkdir -p "${winedrive}/" + sudo mkdir -p "${winedrive}/" + sudo chown -R "${trueuser}:" "${winedir}" else winebootexists=false fi @@ -346,7 +373,8 @@ func_package_deps(){ if [ ! -d "${winedir}" ] \ || [ "${nukewinedir}" == 'y' ] \ - || [ "${nukewinedir}" == 'Y' ]; then + || [ "${nukewinedir}" == 'yes' ] \ + || [ "${silent}" == 'true' ]; then echo -e " [*] ${YELLOW}Creating new Veil Wine environment in: ${BOLD}${winedir}${RESET}\n" echo -e " [*] ${YELLOW}Initializing Veil's Wine environment...${RESET}\n" @@ -447,10 +475,12 @@ func_python_deps(){ ## Install (Wine) Python main setup file echo -e "\n\n [*] ${YELLOW}Installing (Wine) Python...${RESET}\n" - echo -e "${BOLD} [*] Next -> Next -> Next -> Finished! ...Overwrite if prompt. Use default values${RESET}\n" + echo -e " [*] ${BOLD} Next -> Next -> Next -> Finished! ...Overwrite if prompt (use default values)${RESET}\n" sleep 1s - [ "${silent}" == "true" ] && arg=" TARGETDIR=C:\Python34 ALLUSERS=1 /q /norestart" + [ "${silent}" == "true" ] \ + && arg=" TARGETDIR=C:\Python34 ALLUSERS=1 /q /norestart" \ + || arg="" sudo -u "${trueuser}" WINEPREFIX="${winedir}" wine msiexec /i "${dependenciesdir}/python-3.4.4.msi" ${arg} tmp="$?" if [ "${tmp}" -ne "0" ]; then @@ -462,6 +492,7 @@ func_python_deps(){ ## 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 @@ -475,15 +506,16 @@ func_python_deps(){ ## Install (Wine) Python extra setup files (PyWin32 & PyCrypto) for FILE in pywin32-220.win32-py3.4.exe pycrypto-2.6.1.win32-py3.4.exe; do echo -e "\n\n [*] ${YELLOW}Installing (Wine) Python's ${FILE}...${RESET}\n" + echo -e " [*] ${BOLD} Next -> Next -> Next -> Finished! ...Overwrite if prompt (use default values)${RESET}\n" + sleep 1s + if [ "${silent}" == "true" ]; then sudo -u "${trueuser}" unzip -q -o "${FILE}" - sudo -u "${trueuser}" cp -rf PLATLIB/* "${winedrive}/Python34/Lib/site-packages/" + [ -e "PLATLIB" ] && sudo -u "${trueuser}" cp -rf PLATLIB/* "${winedrive}/Python34/Lib/site-packages/" [ -e "SCRIPTS" ] && sudo -u "${trueuser}" cp -rf SCRIPTS/* "${winedrive}/Python34/Scripts/" + [ -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 rm -rf "PLATLIB/" "SCRIPTS/" else - echo -e " [*] ${BOLD}Next -> Next -> Next -> Finished! ...Overwrite if prompt. Use default values${RESET}\n" - sleep 1s - sudo -u "${trueuser}" WINEPREFIX="${winedir}" wine "${FILE}" tmp="$?" if [ "${tmp}" -ne "0" ]; then @@ -497,7 +529,7 @@ func_python_deps(){ popd >/dev/null ## Install Python (OS) extra setup files (PyInstaller) - echo -e "\n\n [*] ${YELLOW}Installing Python's PyInstaller${RESET}\n" + echo -e "\n\n [*] ${YELLOW}Installing 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" @@ -517,7 +549,7 @@ func_python_deps(){ fi ## Use wine based pip to install dependencies - echo -e "\n\n [*] ${YELLOW}Installing (Wine) Python's pip pefile${RESET}\n" + echo -e "\n\n [*] ${YELLOW}Installing (Wine) Python's PIP pefile${RESET}\n" sudo -u "${trueuser}" WINEPREFIX="${winedir}" wine "${winedir}/drive_c/Python34/python.exe" "-m" "pip" "install" "--upgrade" "pip" sudo -u "${trueuser}" WINEPREFIX="${winedir}" wine "${winedir}/drive_c/Python34/python.exe" "-m" "pip" "install" "future" sudo -u "${trueuser}" WINEPREFIX="${winedir}" wine "${winedir}/drive_c/Python34/python.exe" "-m" "pip" "install" "pefile" @@ -587,8 +619,13 @@ func_go_deps(){ func_autoit_deps(){ echo -e "\n\n [*] ${YELLOW}Initializing AutoIT installation...${RESET}\n" + echo -e "\n\n [*] ${YELLOW}Installing (Wine) AutoIT${RESET}\n" + echo -e " [*] ${BOLD} Next -> Next -> Next -> Finished! ...Overwrite if prompt (use default values)${RESET}\n" + sleep 1s - [ "${silent}" == "true" ] && arg=" /S" + [ "${silent}" == "true" ] \ + && arg=" /S" \ + || arg="" sudo -u "${trueuser}" WINEPREFIX="${winedir}" wine "${dependenciesdir}/autoit-v3-setup.exe" ${arg} @@ -605,12 +642,14 @@ func_ruby_deps(){ ## Install Ruby under Wine echo -e "\n\n [*] ${YELLOW}Installing (Wine) Ruby & dependencies${RESET}\n" - echo -e " [*] ${BOLD}Next -> Next -> Next -> Finished! ...Overwrite if prompt. Use default values${RESET}\n" + echo -e " [*] ${BOLD} Next -> Next -> Next -> Finished! ...Overwrite if prompt (use default values)${RESET}\n" sleep 1s sudo -u "${trueuser}" mkdir -p "${winedrive}/Ruby187/lib/ruby/gems/1.8/" - [ "${silent}" == "true" ] && arg=" /silent" + [ "${silent}" == "true" ] \ + && arg=" /silent" \ + || arg="" sudo -u "${trueuser}" WINEPREFIX="${winedir}" wine "${dependenciesdir}/rubyinstaller-1.8.7-p371.exe" ${arg} tmp="$?" if [ "${tmp}" -ne "0" ]; then @@ -622,14 +661,8 @@ func_ruby_deps(){ ## Install the OCRA Gem under Wine echo -e "\n\n [*] ${YELLOW}Installing (Wine) Ruby OCRA gem...${RESET}\n" ## Write batch script to disk - winedir="${userhomedir}/.config/wine/veil" - gempath="$winedir\drive_c\Ruby187\bin\gem" - replace="\\" - prefix="Z:" - gempath=${gempath////$replace} - gempath=$prefix$gempath - echo "$gempath install --force --local ocra-1.3.6.gem" > ocrainstall.bat - sudo -u "${trueuser}" WINEPREFIX="${winedir}" wine cmd /c ocrainstall.bat + echo "${gempath} install --force --local ocra-1.3.6.gem" > /tmp/ocrainstall.bat + sudo -u "${trueuser}" WINEPREFIX="${winedir}" wine cmd /c /tmp/ocrainstall.bat ## Unzip the Ruby dependencies echo -e "\n\n [*] ${YELLOW}Extracting (Wine) Ruby dependencies...${RESET}\n" @@ -663,7 +696,7 @@ func_update_config(){ fi sudo -u "${trueuser}" sudo python2 update-config.py - mkdir -p "${outputdir}" + sudo mkdir -p "${outputdir}" ## Chown output directory if [ -d "${outputdir}" ]; then @@ -675,7 +708,7 @@ func_update_config(){ ## Ensure that user completely owns the wine directory echo -e " [*] ${YELLOW}Ensuring this account (${trueuser}) has correct ownership of ${winedir}${RESET}\n" - chown -R "${trueuser}":"${userprimarygroup}" "${winedir}" + sudo chown -R "${trueuser}":"${userprimarygroup}" "${winedir}" ## Function done diff --git a/config/update-config.py b/config/update-config.py index 625dd1a..f0ffa55 100755 --- a/config/update-config.py +++ b/config/update-config.py @@ -172,7 +172,7 @@ def generateConfig(options): # os.makedirs("/etc/veil/") os.system("sudo mkdir /etc/veil/") os.system("sudo touch /etc/veil/settings.py") - os.system("sudo chmod 0777 /etc/veil/settings.py") + os.system("sudo chmod 0755 /etc/veil/settings.py") print " [I] Path '/etc/veil/' Created" f = open("/etc/veil/settings.py", 'w') f.write(config) @@ -222,15 +222,7 @@ def generateConfig(options): options["PYINSTALLER_PATH"] = "/opt/veil/PyInstaller-3.2.1/" options["TEMP_DIR"] = "/tmp/" options["MSFVENOM_OPTIONS"] = "" - - # Get the real user if we're being ran under sudo - wineprefix = "" - user = os.environ.get("SUDO_USER", pwd.getpwuid(os.getuid()).pw_name) - if user == 'root': - wineprefix = "/root/.config/wine/veil/" - else: - wineprefix = "/home/" + user + "/.config/wine/veil/" - options["WINEPREFIX"] = wineprefix + options["WINEPREFIX"] = "/opt/veil/wine/veil/" # Veil-Evasion specific options veil_evasion_path = "/".join(os.getcwd().split("/")[:-1]) + "/" diff --git a/lib/common/orchestra.py b/lib/common/orchestra.py index 761f8fb..de31881 100644 --- a/lib/common/orchestra.py +++ b/lib/common/orchestra.py @@ -41,7 +41,7 @@ def __init__(self, cli_stuff): def command_line_use(self): tool_found = False for key, tool_object in sorted(self.imported_tools.items()): - # if the entered number matches the payload, use that payload + # If the entered number matches the payload, use that payload if self.command_line_options.tool.lower() == tool_object.cli_name.lower(): tool_object.cli_menu() tool_found = True @@ -50,14 +50,18 @@ def command_line_use(self): print(helpers.color('Quitting Veil...', warning=True)) sys.exit() - def list_tools(self): - # show title bar - messages.title_screen() + def list_tools(self, show_header = True): + # Did we run a command? + if show_header: + # show title bar + messages.title_screen() + print(helpers.color(' [*] Available Tools:\n')) + else: + print("Available Tools:\n") # Loop over all tools loaded into Veil, print name and description # Function for listing all payloads tool_counter = 1 - print(helpers.color(' [*] Available Tools:\n')) for key, tool in sorted(self.imported_tools.items()): print('\t' + str(tool_counter) + ")\t" + tool.cli_name) tool_counter += 1 @@ -76,7 +80,7 @@ def load_tools(self, command_line_object): return def main_menu(self): - # default blank command for the main meny loop + # default blank command for the main menu loop main_menu_command = '' show_header = True @@ -94,11 +98,14 @@ def main_menu(self): messages.title_screen() print("Main Menu") print("\n\t" + helpers.color(len(self.imported_tools)) + " tools loaded\n") + # List tools, but don't show the header + self.list_tools(False) print("Available Commands:\n") for command in sorted(self.mainmenu_commands.keys()): print("\t" + helpers.color(command) + '\t\t\t' + self.mainmenu_commands[command]) print() + print() main_menu_command = input('Main menu choice: ').strip() if main_menu_command.startswith('use'): @@ -116,7 +123,7 @@ def main_menu(self): # Grab the command, either the number or word tool_choice = main_menu_command.split()[1] - # if we're choosing the payload by numbers + # If we're choosing the payload by numbers if tool_choice.isdigit() and\ 0 < int(tool_choice) <= len(self.imported_tools): tool_number = 1 @@ -164,12 +171,12 @@ def main_menu(self): # Grab the command, either the number or word info_choice = main_menu_command.split()[1] - # if we're choosing the payload by numbers + # If we're choosing the payload by numbers if info_choice.isdigit() and\ 0 < int(info_choice) <= len(self.imported_tools): tool_number = 1 for key, tool_object in sorted(self.imported_tools.items()): - # if the entered number matches the tool, use that tool + # If the entered number matches the tool, use that tool if int(info_choice) == tool_number: print() print(helpers.color(tool_object.cli_name) + " => " + tool_object.description) @@ -177,7 +184,7 @@ def main_menu(self): show_header = False tool_number += 1 - # if the entered name matches the tool, use that tool + # If the entered name matches the tool, use that tool else: for key, tool_object in sorted(self.imported_tools.items()): if main_menu_command.split()[1].lower() == tool_object.cli_name.lower(): @@ -209,6 +216,7 @@ def main_menu(self): print("\n\n" + helpers.color("Rage quit!", warning=True)) sys.exit() + # Self update framework def update_veil(self): if settings.OPERATING_SYSTEM == "Kali": os.system('apt-get update; apt-get -y install veil') @@ -217,18 +225,20 @@ def update_veil(self): input('\n\nVeil has checked for updates, press enter to continue') return + # Re-run setup def setup_veil(self): if settings.OPERATING_SYSTEM == "Kali": if os.path.exists("/usr/share/veil/config/setup.sh"): - os.system('/usr/share/veil/config/setup.sh -f') + os.system('/usr/share/veil/config/setup.sh -f -s') else: print("\n [!] ERROR: Missing %s\n" % ("/usr/share/veil/config/setup.sh")) - os.system('./config/setup.sh -f') + os.system('./config/setup.sh -f -s') else: - os.system('./config/setup.sh -f') + os.system('./config/setup.sh -f -s') input('\n\nVeil has ran setup.sh, press enter to continue') return + # Re-run config.py def config_veil(self): if settings.OPERATING_SYSTEM == "Kali": if os.path.exists("/usr/share/veil/config/update-config.py"): diff --git a/tools/evasion/tool.py b/tools/evasion/tool.py index 0dc5f65..2c8edad 100644 --- a/tools/evasion/tool.py +++ b/tools/evasion/tool.py @@ -34,7 +34,7 @@ class Tools: def __init__(self, cli_options=None): self.cli_name = "Evasion" - self.description = "Generates antivirus avoiding executables #avlol" + self.description = "Generates Anti-Virus avoiding executables #avlol" # Payloads currently within the payload directories self.active_payloads = {} # Load all payload modules