Skip to content

Commit

Permalink
fix metasploit tool depend, fix veil silent install, force https on a…
Browse files Browse the repository at this point in the history
…pi pull
  • Loading branch information
TrustedSec committed Apr 26, 2018
1 parent 675c7fd commit fe06aea
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
4 changes: 2 additions & 2 deletions modules/av-bypass/veil-framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
DEBIAN="git"

# COMMANDS TO RUN AFTER
AFTER_COMMANDS="cd {INSTALL_LOCATION}/config, ./setup.sh -c, ln -s {INSTALL_LOCATION}/Veil.py /usr/local/bin/veil "
AFTER_COMMANDS="cd {INSTALL_LOCATION}config,./setup.sh -s, ln -s {INSTALL_LOCATION}Veil.py /usr/local/bin/veil "

# THIS WILL CREATE AN AUTOMATIC LAUNCHER FOR THE TOOL
LAUNCHER="Veil.py"

# PREREQ INSTALL MODULES NEEDED FOR THIS TOOL TO WORK PROPERLY
TOOL_DEPEND="modules/exploitation/framework/metasploit"
TOOL_DEPEND="modules/exploitation/metasploit"
2 changes: 1 addition & 1 deletion modules/exploitation/metasploit.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
FEDORA=""

# COMMANDS TO RUN AFTER
AFTER_COMMANDS="sudo wget -O - http://apt.metasploit.com/metasploit-framework.gpg.key | apt-key add -,apt-get install --reinstall metasploit-framework,cd {INSTALL_LOCATION},mv msfupdate.erb msfinstall,chmod 755 msfinstall,./msfinstall,rm msfinstall 1> /dev/null 2>/dev/null,update-rc.d postgresql enable,chmod +x {PTF_LOCATION}/modules/exploitation/msfdb.sh,sh {PTF_LOCATION}/modules/exploitation/msfdb.sh 1> /dev/null 2> /dev/null,mkdir /root/.msf4 1> /dev/null 2>/dev/null,cp /opt/database.yml /root/.msf4/,rm -rf {INSTALL_LOCATION} 1> /dev/null 2> /dev/null,mkdir {INSTALL_LOCATION} 1> /dev/null 2> /dev/null,echo 'Metasploit is located under /opt/metasploit-framework/ but you can launch from anywhere by typing msfconsole etc.' > {INSTALL_LOCATION}METASPLOIT_README.txt,rm -rf /usr/local/bin/msf* 1> /dev/null 2> /dev/null"
AFTER_COMMANDS="sudo wget -O - https://apt.metasploit.com/metasploit-framework.gpg.key | apt-key add -,apt-get install --reinstall metasploit-framework,cd {INSTALL_LOCATION},mv msfupdate.erb msfinstall,chmod 755 msfinstall,./msfinstall,rm msfinstall 1> /dev/null 2>/dev/null,update-rc.d postgresql enable,chmod +x {PTF_LOCATION}/modules/exploitation/msfdb.sh,sh {PTF_LOCATION}/modules/exploitation/msfdb.sh 1> /dev/null 2> /dev/null,mkdir /root/.msf4 1> /dev/null 2>/dev/null,cp /opt/database.yml /root/.msf4/,rm -rf {INSTALL_LOCATION} 1> /dev/null 2> /dev/null,mkdir {INSTALL_LOCATION} 1> /dev/null 2> /dev/null,echo 'Metasploit is located under /opt/metasploit-framework/ but you can launch from anywhere by typing msfconsole etc.' > {INSTALL_LOCATION}METASPLOIT_README.txt,rm -rf /usr/local/bin/msf* 1> /dev/null 2> /dev/null"

# THIS WILL CREATE AN AUTOMATIC LAUNCHER FOR THE TOOL
LAUNCHER=""
Expand Down
3 changes: 3 additions & 0 deletions readme/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ version 2.0
* fix launchers with $@ instead of $*
* fixed autosploit to have new install.sh and requirements met
* force github to use https
* added api grab to https for Metasploit
* added error handling if tool_depend module not found
* fixed veil installation

~~~~~~~~~~~~~~~~~
version 1.18
Expand Down
4 changes: 2 additions & 2 deletions src/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ def count_modules():
banner += """ """ + bcolors.backBlue + \
"""Version: %s""" % (grab_version) + bcolors.ENDC + "\n"

banner += bcolors.YELLOW + bcolors.BOLD + """ Codename: """ + \
bcolors.BLUE + """Tool Time""" + "\n"
banner += bcolors.YELLOW + bcolors.BOLD + """ Codename: """ + \
bcolors.BLUE + """Tool Warehouse Depot""" + "\n"

banner += """ """ + bcolors.ENDC + bcolors.backRed + \
"""Red Team Approved""" + bcolors.ENDC + "\n"
Expand Down
18 changes: 10 additions & 8 deletions src/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,11 @@
os_profile = profile_os()


print_status("Operating system detected as: " +
bcolors.BOLD + os_profile + bcolors.ENDC)
print_status("Operating system detected as: " + bcolors.BOLD + os_profile + bcolors.ENDC)

# main intro here
if profile_os() == "DEBIAN":
subprocess.Popen("sudo dpkg --add-architecture i386",
stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
subprocess.Popen("sudo dpkg --add-architecture i386", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)

print_status("Welcome to PTF - where everything just works...Because.." +
bcolors.BOLD + funny + bcolors.ENDC)
Expand Down Expand Up @@ -176,7 +174,6 @@ def show_new_modules():

# this is when a use <module> command is initiated
def use_module(module, all_trigger):

# if we aren't using all
if not "install_update_all" in module and not "update_installed" in module and not "__init__" in module:

Expand All @@ -202,10 +199,13 @@ def use_module(module, all_trigger):

# if were are tool depends for other modules prior to install
tool_depend = module_parser(filename, "TOOL_DEPEND")
# if the module path is wrong, throw a warning
if not os.path.isfile(tool_depend + ".py"):
print_warning("Tool depend: " + tool_depend + " not found. Ensure the module is pointing to a module location.")
tool_depend = ""

# grab repository location
repository_location = module_parser(
filename, "REPOSITORY_LOCATION")
repository_location = module_parser(filename, "REPOSITORY_LOCATION")

# custom work for zaproxy
if "zaproxy" in repository_location:
Expand All @@ -227,6 +227,7 @@ def use_module(module, all_trigger):
install_location = os.path.expanduser(base_install + "/" + \
module_split + "/" + install_base_location + "/")


while 1:

# if we aren't doing update/install all
Expand Down Expand Up @@ -307,7 +308,8 @@ def use_module(module, all_trigger):
tool_depend = tool_depend.split(",")
for tool in tool_depend: use_module(tool, "1")

else: use_module(tool_depend, "1")
else:
use_module(tool_depend, "1")
except: pass

if int(all_trigger) == 1:
Expand Down

0 comments on commit fe06aea

Please sign in to comment.