Giter VIP home page Giter VIP logo

owtf-docker's Introduction

Offensive Web Testing Framework

Build staus License (3-Clause BSD) python_3.6 python_3.7 python_3.8

OWASP OWTF is a project focused on penetration testing efficiency and alignment of security tests to security standards like the OWASP Testing Guide (v3 and v4), the OWASP Top 10, PTES and NIST so that pentesters will have more time to

  • See the big picture and think out of the box
  • More efficiently find, verify and combine vulnerabilities
  • Have time to investigate complex vulnerabilities like business logic/architectural flaws or virtual hosting sessions
  • Perform more tactical/targeted fuzzing on seemingly risky areas
  • Demonstrate true impact despite the short timeframes we are typically given to test.

The tool is highly configurable and anybody can trivially create simple plugins or add new tests in the configuration files without having any development experience.

Note: This tool is however not a silverbullet and will only be as good as the person using it: Understanding and experience will be required to correctly interpret tool output and decide what to investigate further in order to demonstrate impact.

Requirements

OWTF is developed on KaliLinux and macOS but it is made for Kali Linux (or other Debian derivatives)

OWTF supports Python3.

OSX pre-requisites

Dependencies: Install Homebrew (https://brew.sh/) and follow the steps given below:

$ python3 -m venv ~/.virtualenvs/owtf
$ source ~/.virtualenvs/owtf/bin/activate
$ brew install coreutils gnu-sed openssl
# We need to install 'cryptography' first to avoid issues
$ pip install cryptography --global-option=build_ext --global-option="-L/usr/local/opt/openssl/lib" --global-option="-I/usr/local/opt/openssl/include"

Installation

Running as a Docker container:

The recommended way to use OWTF is by building the Docker Image so you will not have to worry about dependencies issues and installing the various pentesting tools.

git clone https://github.com/owtf/owtf
cd owtf
make compose

Installing directly

Create and start the PostgreSQL database server

Using preconfigured Postgresql Docker container (Recommended)

Please make sure you have Docker installed!

Run make startdb to create and start the PostgreSQL server in a Docker container. In the default configuration, it listens on port 5342 exposed from Docker container.

Manual setup (painful and error-prone)

You can also use a script to this for you - find it in scripts/db_setup.sh. You'll need to modify any hardcoded variables if you change the corresponding ones in owtf/settings.py.

Start the postgreSQL server,

  • macOS: brew install postgresql and pg_ctl -D /usr/local/var/postgres start
  • Kali: sudo systemctl enable postgresql; sudo systemctl start postgresql or sudo service postgresql start

Create the owtf_db_user user,

  • macOS: psql postgres -c "CREATE USER $db_user WITH PASSWORD '$db_pass';"
  • Kali: sudo su postgres -c "psql -c \"CREATE USER $db_user WITH PASSWORD '$db_pass'\""

Create the database,

  • macOS: psql postgres -c "CREATE DATABASE $db_name WITH OWNER $db_user ENCODING 'utf-8' TEMPLATE template0;"
  • Kali: sudo su postgres -c "psql -c \"CREATE DATABASE $db_name WITH OWNER $db_user ENCODING 'utf-8' TEMPLATE template0;\""

Installing OWTF

git clone https://github.com/owtf/owtf
cd owtf
python3 setup.py develop
owtf
open `localhost:8009` in the web browser for the OWTF web interface or `owtf --help` for all available commands.

Features

  • Resilience: If one tool crashes OWTF, will move on to the next tool/test, saving the partial output of the tool until it crashed.
  • Flexible: Pause and resume your work.
  • Tests Separation: OWTF separates its traffic to the target into mainly 3 types of plugins:
    • Passive : No traffic goes to the target
    • Semi Passive : Normal traffic to target
    • Active: Direct vulnerability probing
  • Extensive REST API.
  • Has almost complete OWASP Testing Guide(v3, v4), Top 10, NIST, CWE coverage.
  • Web interface: Easily manage large penetration engagements easily.
  • Interactive report:
  • Automated plugin rankings from the tool output, fully configurable by the user.
  • Configurable risk rankings
  • In-line notes editor for each plugin.

License

Checkout LICENSE

Code of Conduct

Checkout Code of Conduct

Links

owtf-docker's People

Contributors

ahiknsr avatar alexandrasandulescu avatar viyatb avatar xavitorello avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

owtf-docker's Issues

Got err in building docker

i jsut run command docker build -t owtf-dev .

and i got an Err as follows:

Sending build context to Docker daemon 123.4kB
Step 1/26 : FROM kalilinux/kali-linux-docker
---> b8fe82f15421
Step 2/26 : MAINTAINER @viyatb [email protected], @alexandrasandulescu [email protected]
---> Using cache
---> 584a88ed2a37
Step 3/26 : RUN wget -q -O - archive.kali.org/archive-key.asc | apt-key add
---> Running in 8145b8252775
E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
The command '/bin/sh -c wget -q -O - archive.kali.org/archive-key.asc | apt-key add' returned a non-zero code: 255

How could i fix it?thx

env :
Docker version 17.09.1-ce, build 19e2cf6

Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty

Linux 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Broken build process at autoremove

It seems that build process is broken due to an incident at apt-get autoremove. This execution expects an iteraction to confirm the execution using prompt:

Building dependency tree...
Reading state information...
The following packages will be REMOVED:
  gnupg-l10n
0 upgraded, 0 newly installed, 1 to remove and 16 not upgraded.
After this operation, 4475 kB disk space will be freed.
Do you want to continue? [Y/n] Abort.
The command '/bin/sh -c apt-get autoremove' returned a non-zero code: 1

Error when running PTES

[INFO] [2020-05-22 13:10:56,426] [File 'blocking_shell.py', line 167, in shell_exec_monitor] - ------> Execution Start Date/Time: 22/05/2020-13:10
[INFO] [2020-05-22 13:10:56,426] [File 'blocking_shell.py', line 168, in shell_exec_monitor] -

Error during signature verification

There was an issue while trying to deploy a fresh building based on latest Kali docker image.

It seems like Kali signatures must be updated after apt interactions, so a preventive update of signatures will be needed.

Sending build context to Docker daemon    128kB
Step 1/25 : FROM kalilinux/kali-linux-docker
 ---> 8ececeaf404d
Step 2/25 : MAINTAINER @viyatb [email protected], @alexandrasandulescu [email protected]
 ---> Running in ea849a1c3ecd
Removing intermediate container ea849a1c3ecd
 ---> fbb7ff8ce6e7
Step 3/25 : RUN apt-get update --fix-missing && apt-get upgrade -y
 ---> Running in 4a967e11c9dd
Get:1 http://archive-4.kali.org/kali kali-rolling InRelease [30.5 kB]
Err:1 http://archive-4.kali.org/kali kali-rolling InRelease
  The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <[email protected]>
Fetched 30.5 kB in 1s (25.8 kB/s)
Reading package lists...
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive-4.kali.org/kali kali-rolling InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <[email protected]>
W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease  The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <[email protected]>
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
 
...
...
...

  python-minimal python-pip python-pip-whl python-pkg-resources python-pyasn1
  python-secretstorage python-setuptools python-six python-wheel python-xdg
  python2.7 python2.7-dev python2.7-minimal python3 python3-minimal python3.5
  python3.5-minimal rename rsync sgml-base shared-mime-info ssl-cert sudo
  sysstat ucf unzip x11-common x11-xkb-utils xauth xdg-user-dirs xfonts-base
  xfonts-encodings xfonts-utils xkb-data xml-core xserver-common
  xserver-xephyr xvfb xz-utils zlib1g-dev
0 upgraded, 234 newly installed, 0 to remove and 0 not upgraded.
Need to get 185 MB of archives.
After this operation, 760 MB of additional disk space will be used.
Err:1 http://http.kali.org/kali kali-rolling/main amd64 perl-modules-5.24 all 5.24.1-1
  404  Not Found
Err:2 http://http.kali.org/kali kali-rolling/main amd64 libperl5.24 amd64 5.24.1-1
  404  Not Found
Err:3 http://http.kali.org/kali kali-rolling/main amd64 perl amd64 5.24.1-1
  404  Not Found
Err:4 http://http.kali.org/kali kali-rolling/main amd64 libpython2.7-minimal amd64 2.7.13-2
  404  Not Found
Err:5 http://http.kali.org/kali kali-rolling/main amd64 python2.7-minimal amd64 2.7.13-2
  404  Not Found

Docker OWTF web interface inaccessible

When I build and run the docker image, I am unable to connect to the mapped ports (8009, for example) to access the web interface. It appears that the config settings cause the web interface to be bound only to localhost within the container (see below).

        @owtfp
    http://owtf.org

[*] OWTF Version: 1.0.1, Release: LionHeart (Beta) 
[-] Loading framework please wait..
[*] 127.0.0.1:8008 <-- HTTP(S) Proxy to which requests can be directed
[*] http://127.0.0.1:8009 <-- Web UI URL
[-] Press Ctrl+C when you spawned a shell ;)

Can't run the image correctly

I pull the image from docker hub, and run the following command as suggested:

docker run -it --privileged -p 8008:8008 -p 8009:8009 -p 8010:8010 owtf/owtf -e

but it gave the error message like this:

Failed to connect to bus: No such file or directory
[+] Postgres running on :
[+] OWTF db config points towards 127.0.0.1:5432
[+] New database configuration saved
psql: could not connect to server: Connection refused
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
psql: could not connect to server: Connection refused
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Having SSL=true in postgres config causes many errors (psycopg2 problem)
sed: no input files
Restarting the postgresql service
[ ok ] Restarting PostgreSQL 9.5 database server: main.
CREATE ROLE
CREATE DATABASE
[*] Make sure you run this image with the proper parameters
[*] #docker run -it -p 8008:8008 -p 8009:8009 -p 8010:8010 --privileged <image_name>
patching file owtf/framework/config/framework_config.cfg
Hunk #1 succeeded at 17 (offset 2 lines).
patching file owtf/profiles/general/default.cfg
Hunk #1 succeeded at 169 (offset 1 line).

 _____ _ _ _ _____ _____
|     | | | |_   _|   __|
|  |  | | | | | | |   __|
|_____|_____| |_| |__|

        @owtfp
    http://owtf.org

ERROR:root:Aborted by Framework: Database configuration file is potentially corrupted. Please check ~/.owtf/db.cfg
[DB] invalid literal for int() with base 10: ''

seems something wrong with the postgres_entry.sh script, could we fix this?

node-sass error

I installed the docker image on Kali Linux, however when I run the image, I get no UI, and the dev tools shows the following error:

Error: Module build failed: ModuleBuildError: Module build failed: Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (79)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.9.2
    at module.exports (/owtf/owtf/webui/node_modules/node-sass/lib/binding.js:13:13)
    at Object.<anonymous> (/owtf/owtf/webui/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (internal/modules/cjs/loader.js:1139:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1159:10)
    at Module.load (internal/modules/cjs/loader.js:988:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Module.require (internal/modules/cjs/loader.js:1028:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/owtf/owtf/webui/node_modules/sass-loader/lib/loader.js:3:14)
    at Module._compile (internal/modules/cjs/loader.js:1139:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1159:10)
    at Module.load (internal/modules/cjs/loader.js:988:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Module.require (internal/modules/cjs/loader.js:1028:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at loadLoader (/owtf/owtf/webui/node_modules/loader-runner/lib/loadLoader.js:13:17)
    at iteratePitchingLoaders (/owtf/owtf/webui/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
    at iteratePitchingLoaders (/owtf/owtf/webui/node_modules/loader-runner/lib/LoaderRunner.js:165:10)
    at /owtf/owtf/webui/node_modules/loader-runner/lib/LoaderRunner.js:173:18
    at loadLoader (/owtf/owtf/webui/node_modules/loader-runner/lib/loadLoader.js:36:3)
    at iteratePitchingLoaders (/owtf/owtf/webui/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
    at runLoaders (/owtf/owtf/webui/node_modules/loader-runner/lib/LoaderRunner.js:362:2)
    at NormalModule.doBuild (/owtf/owtf/webui/node_modules/webpack/lib/NormalModule.js:181:3)
    at NormalModule.build (/owtf/owtf/webui/node_modules/webpack/lib/NormalModule.js:274:15)
    at Compilation.buildModule (/owtf/owtf/webui/node_modules/webpack/lib/Compilation.js:149:10)
    at /owtf/owtf/webui/node_modules/webpack/lib/Compilation.js:447:10
    at /owtf/owtf/webui/node_modules/webpack/lib/NormalModuleFactory.js:241:5
    at /owtf/owtf/webui/node_modules/webpack/lib/NormalModuleFactory.js:94:13
    at /owtf/owtf/webui/node_modules/webpack/node_modules/tapable/lib/Tapable.js:268:11
    at NormalModuleFactory.<anonymous> (/owtf/owtf/webui/node_modules/webpack/lib/CompatibilityPlugin.js:52:5)
    at /owtf/owtf/webui/node_modules/webpack/lib/NormalModule.js:194:19
    at /owtf/owtf/webui/node_modules/loader-runner/lib/LoaderRunner.js:364:11
    at /owtf/owtf/webui/node_modules/loader-runner/lib/LoaderRunner.js:170:18
    at loadLoader (/owtf/owtf/webui/node_modules/loader-runner/lib/loadLoader.js:27:11)
    at iteratePitchingLoaders (/owtf/owtf/webui/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
    at iteratePitchingLoaders (/owtf/owtf/webui/node_modules/loader-runner/lib/LoaderRunner.js:165:10)
    at /owtf/owtf/webui/node_modules/loader-runner/lib/LoaderRunner.js:173:18
    at loadLoader (/owtf/owtf/webui/node_modules/loader-runner/lib/loadLoader.js:36:3)
    at iteratePitchingLoaders (/owtf/owtf/webui/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
    at runLoaders (/owtf/owtf/webui/node_modules/loader-runner/lib/LoaderRunner.js:362:2)
    at NormalModule.doBuild (/owtf/owtf/webui/node_modules/webpack/lib/NormalModule.js:181:3)
    at NormalModule.build (/owtf/owtf/webui/node_modules/webpack/lib/NormalModule.js:274:15)
    at Compilation.buildModule (/owtf/owtf/webui/node_modules/webpack/lib/Compilation.js:149:10)
    at /owtf/owtf/webui/node_modules/webpack/lib/Compilation.js:447:10
    at /owtf/owtf/webui/node_modules/webpack/lib/NormalModuleFactory.js:241:5
    at /owtf/owtf/webui/node_modules/webpack/lib/NormalModuleFactory.js:94:13
    at /owtf/owtf/webui/node_modules/webpack/node_modules/tapable/lib/Tapable.js:268:11
    at NormalModuleFactory.<anonymous> (/owtf/owtf/webui/node_modules/webpack/lib/CompatibilityPlugin.js:52:5)
    at NormalModuleFactory.applyPluginsAsyncWaterfall (/owtf/owtf/webui/node_modules/webpack/node_modules/tapable/lib/Tapable.js:272:13)
    at /owtf/owtf/webui/node_modules/webpack/lib/NormalModuleFactory.js:69:10
    at /owtf/owtf/webui/node_modules/webpack/lib/NormalModuleFactory.js:194:7
    at processTicksAndRejections (internal/process/task_queues.js:79:11) bundle.js:26:19395

Here's what the page looks like:
image

I have ran recommended steps that I found on stackoverflow and other github repos to fix this node-sass error but none of them have helped. I have tried:
$ npm update node-sass
$ npm rebuild node-sass
$ npm uninstall node-sass -g && node cache clean && node install node-sass

Thank you!

Unable to connect to exposed Ports

When I spin up the docker container (using the appropriate command and switches) I am presented with the following:

` _____ _ _ _ _____ _____
| | | | |_ | |
| | | | | | | | | **|
|
**|___| |_| ||
@owtfp
http://owtf.org

[] OWTF Version: 2.0a, Release: Tikka Masala (Alpha)
[-] Loading framework please wait..
[-] Loading Resources from: /owtf/profiles/resources/default.cfg..
[-] Loading Mapping from: /owtf/profiles/mappings/default.cfg..
[
] 0.0.0.0:8008 <-- HTTP(S) Proxy to which requests can be directed
[*] http://0.0.0.0:8009 <-- Web UI URL
[-] Press Ctrl+C when you spawned a shell ;)`

I would expect the UI to be displayed on either 10.0.01:8009 or localhost:8009, but It is not there. I am unable to ping it and netstat -na does show that 0.0.0.0:8009 is listening, but it is not accessible. Looking back over the readme you have I don't see what I could be missing.

Thoughts?
Nick Heinbaugh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.