Skip to content

Commit

Permalink
update and add ability to tool depends
Browse files Browse the repository at this point in the history
  • Loading branch information
TrustedSec committed Jan 31, 2017
1 parent 76c75ea commit 8e7b16e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ AFTER_COMMANDS="cd {INSTALL_LOCATION},ruby install-beef"

LAUNCHER="beef"

TOOL_DEPEND="modules/exploitation/metasploit"

###Module Development:

All of the fields are pretty easy, on the repository locations, you can use GIT, SVN or FILE. Fill in the depends, and where you want the install location to be. PTF will take where the python file is located (for example exploitation) and move it to what you specify in the PTF config (located under config). By default it installs all your tools to /pentest/PTES_PHASE/TOOL_FOLDER
Expand Down Expand Up @@ -115,6 +117,14 @@ You can have multiple launchers for an application. For example, for Metasploit

You can also just run ./ptf --update-all and it will automatically update everything for you without having to go into the framework.

###TOOL DEPENDS

Some tools such as Veil, SET, etc. require tools such as the Metasploit Framework. You can add in the module TOOL_DEPEND="modules/exploitation/metasploit,module/exploitation/set" and multiple other tools if there is a tool required to be installed prior to installing the tool. This will force PTF to install the required tool first, then install the module that requires it. Example:

TOOL_DEPEND="modules/exploitation/metasploit"

This will install Metasploit first or ensured its installed first prior to installing the application.

### IGNORE Modules or Categories

The "IGNORE_THESE_MODULES=" config option can be found under config/ptf.config in the PTF root directory. This will ignore modules and not install them - everything is comma separated and based on name - example: modules/exploitation/metasploit,modules/exploitation/set or entire module categories, like /modules/code-audit/*,/modules/reporting/*
1 change: 1 addition & 0 deletions readme/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ version 1.12
* add stickykeyslayer
* added fido
* fixed sparta ln usage
* added new field for modules called TOOL_DEPEND which will allow you to specify other tools that are needed in order to install. Check README.md for mor information

~~~~~~~~~~~~~~~~~
version 1.11
Expand Down
18 changes: 17 additions & 1 deletion src/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ def use_module(module, all_trigger):
# grab install type
install_type = module_parser(filename, "INSTALL_TYPE")

# if were are tool depends for other modules prior to install
tool_depend = module_parser(filename, "TOOL_DEPEND")

# grab repository location
repository_location = module_parser(
filename, "REPOSITORY_LOCATION")
Expand Down Expand Up @@ -244,6 +247,20 @@ def use_module(module, all_trigger):
if set_breakout[1].upper() == "INSTALL_LOCATION":
install_location = set_breakout[2]

# tool depend is if there is a tool for example like veil that has a depend of Metasploit - can put TOOL_DEPEND = the tool or tools here
if len(tool_depend) > 1:
try:
if " " in tool_depend:
tool_depend = tool_depend.split(" ")
for tool in tool_depend: use_module(tool, "1")

elif "," in tool_depend:
tool_depend = tool_depend.split(",")
for tool in tool_depend: use_module(tool, "1")

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

if int(all_trigger) == 1:
prompt = "run"

Expand Down Expand Up @@ -346,7 +363,6 @@ def use_module(module, all_trigger):
if not "__init__.py" in filename and not ignore_module(filename):

# grab the OS type, DEBIAN, FEDORA, CUSTOM, BSD!!!! WOW!!,
# ETC
ostype = profile_os()

# if OSTYPE is DEBIAN
Expand Down

0 comments on commit 8e7b16e

Please sign in to comment.