Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OWTF 0.40 'Summer Storm III': Added New Installation procedure
- Loading branch information
1 parent
b8c8eb5
commit 785dacf
Showing
18 changed files
with
226 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
#!/usr/bin/env python | ||
# | ||
# owtf is an OWASP+PTES-focused try to unite great tools and facilitate pen testing | ||
# Copyright (c) 2011, Abraham Aranguren <name.surname@gmail.com> Twitter: @7a_ http://7-a.org | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# * Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# * Redistributions in binary form must reproduce the above copyright | ||
# notice, this list of conditions and the following disclaimer in the | ||
# documentation and/or other materials provided with the distribution. | ||
# * Neither the name of the <organization> nor the | ||
# names of its contributors may be used to endorse or promote products | ||
# derived from this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
# DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
# | ||
import os | ||
import ConfigParser | ||
|
||
class Installer(object): | ||
""" | ||
This class takes care of installation of various restricted stuff across various linux distros | ||
""" | ||
def __init__(self, RootDir): | ||
self.RootDir = RootDir | ||
self.owtf_pip = os.path.join(RootDir, "install", "owtf.pip") # OWTF python libraries | ||
self.restricted_cfg = os.path.join(RootDir, "install", "restricted.cfg") # Restricted tools and dictionaries which are distro independent | ||
self.distros_cfg = os.path.join(RootDir, "install", "linux-distributions.cfg") # Various distros and install scripts | ||
|
||
def create_directory(self, directory): | ||
# Create parent directories as necessary | ||
try: | ||
os.makedirs(directory) | ||
return True | ||
except OSError: | ||
return False | ||
|
||
def run_command(self, command): | ||
print("[*] Running following command") | ||
print("%s"%(command)) | ||
os.system(command) | ||
|
||
def install_in_directory(self, directory, command): | ||
if self.create_directory(directory): | ||
print("[*] Switching to %s"%(directory)) | ||
os.chdir(directory) | ||
self.run_command(command) | ||
else: | ||
print("[!] Directory %s already exists, so skipping installation for this"%(directory)) | ||
|
||
def install_using_pip(self, requirements_file): | ||
# Instead of using file directly with pip which can crash because of single library | ||
for line in open(requirements_file, 'r').readlines(): | ||
self.run_command("sudo -E pip install --upgrade %s"%(line)) | ||
|
||
def install_restricted_from_cfg(self, config_file): | ||
cp = ConfigParser.ConfigParser({"RootDir":self.RootDir}) | ||
cp.read(config_file) | ||
for section in cp.sections(): | ||
print("[*] Installing %s"%(section)) | ||
self.install_in_directory(os.path.expanduser(cp.get(section, "directory")), cp.get(section, "command")) | ||
|
||
def install(self): | ||
# First all distro independent stuff is installed | ||
self.install_restricted_from_cfg(self.restricted_cfg) | ||
# User asked to select distro and distro related stuff is installed | ||
cp = ConfigParser.ConfigParser({"RootDir":self.RootDir}) | ||
cp.read(self.distros_cfg) | ||
for i in range(0, len(cp.sections())): | ||
print("(%d) %s"%(i+1, cp.sections()[i])) | ||
distro_num = raw_input("Select a number based on your distribution : ") | ||
self.run_command(cp.get(cp.sections()[int(distro_num)-1], "install")) | ||
# Finally owtf python libraries installed using pip | ||
self.install_using_pip(self.owtf_pip) | ||
|
||
if __name__ == "__main__": | ||
print("[*] Great that your are installing OWTF :D") | ||
print("[!] There will be lot of output, please be patient") | ||
RootDir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) | ||
installer = Installer(RootDir) | ||
installer.install() | ||
print("[*] Hope everything went fine :)") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[Kali Linux] | ||
install = sh %(RootDir)s/install/kali/install.sh %(RootDir)s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
tornado | ||
pycurl | ||
jinja2 | ||
lxml | ||
argparse | ||
selenium | ||
rdflib | ||
pyvirtualdisplay |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[Httprint] | ||
directory = %(RootDir)s/tools/restricted/httprint | ||
command = wget "http://www.net-square.com/zip folders/httprint_linux_301.zip"; unzip *.zip; rm -f *.zip | ||
cp -rf %(RootDir)s/tools/httprint-signatures.txt %(RootDir)s/tools/restricted/httprint/httprint_301/linux | ||
|
||
[Websecurify] | ||
directory = %(RootDir)s/tools/restricted/websecurify | ||
command = wget "http://websecurify.googlecode.com/files/Websecurify%20Scanner 0.9.tgz"; tar xvfz *; rm -f *.tgz 2> /dev/null; rm -f *.tar.gz 2> /dev/null | ||
|
||
[BIG-IP Decoder] | ||
directory = %(RootDir)s/tools/restricted/decoding/cookies | ||
command = wget http://www.taddong.com/tools/BIG-IP_cookie_decoder.zip; unzip *.zip; rm -f *.zip | ||
|
||
[Hoppy] | ||
directory = %(RootDir)s/tools/restricted/hoppy-1.8.1 | ||
command = wget http://labs.portcullis.co.uk/download/hoppy-1.8.1.tar.bz2; bunzip2 *; tar xvf *; rm -f *.tar 2> /dev/null | ||
|
||
[SSL cipher Check] | ||
directory = %(RootDir)s/tools/restricted/ssl/ssl-cipher-check | ||
command = wget http://unspecific.com/ssl/ssl-cipher-check.pl; chmod 700 * | ||
|
||
[CMS Explorer] | ||
directory = %(RootDir)s/tools/restricted/cms-explorer | ||
command = sh %(RootDir)s/install/update_convert_cms_explorer_dicts.sh %(RootDir)s | ||
|
||
[SVN Digger Dictionaries] | ||
directory = %(RootDir)s/dictionaries/restricted/svndigger | ||
command = wget http://www.mavitunasecurity.com/s/research/SVNDigger.zip; unzip *.zip; rm -f *.zip | ||
|
||
[Raft Dictionaries] | ||
directory = %(RootDir)s/dictionaries/restricted/raft | ||
command = for file in $(ls %(RootDir)s/dictionaries/fuzzdb/fuzzdb-1.09/Discovery/PredictableRes/ | grep raft); do | ||
ln -s %(RootDir)s/dictionaries/fuzzdb/fuzzdb-1.09/Discovery/PredictableRes/$file %(RootDir)s/dictionaries/restricted/raft/$file | ||
done | ||
|
||
[Combined Dictionaries] | ||
directory = %(RootDir)s/dictionaries/restricted/combined | ||
command = python2 %(RootDir)s/dictionaries/dict_merger_svndigger_raft.py | ||
|
||
[Local CA for Inbound Proxy] | ||
directory = ~/.owtf/proxy | ||
command = %(RootDir)s/install/proxy_CA.sh %(RootDir)s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.