Giter VIP home page Giter VIP logo

health_monitor'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

health_monitor's People

Contributors

darknight24 avatar delta24 avatar viyatb avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

health_monitor's Issues

[module] RAM/CPU usage for OWTF

Monitor RAM/CPU usage of OWTF (and its child processes) as well as the total consumption for the testing machine (where OWTF is running). Use SSH to login to that machine and determine the stats.

Make OWTF to run scans only on ZEST recordings

In a multi module web application or a very big web application, there can be changes as time progress.
You can assume it as a continues development. So in this kind of scenarios, teams are only interested to run security scans/checks only on those webpages or modules or series of steps (ZEST recordings) which are developed or modified recently.

Having this feature will make OWTF more useful on a daily basis and more acceptable for Dev community.
Particularly, more useful for Agile based development environment.

[module] Target monitor

Use the OWTF API to get targets for the active session and determine if they are up/down. If down, then pause the worker for that target and all other work in the worklist (for that target).

Tests and coverage

Right now, the health monitor is stable and working. But as OWTF's internal architecture changes (and will soon), the code will have to modified accordingly.

We needs tests (functional/unittests) to ensure the tool does not break on changes.

Network connectivity monitor

Implement a network connectivity monitor

Every 2-3 minutes, check if connectivity is OK
If connectivity fails, check again, after 5-10 seconds (things might fail under heavy load)
if it still fails, then pause ALL workers
Keep checking connectivity
If connectivity works again, check again, after 5-10 seconds
If it still works, then restart ALL workers, 1 at a time, while connectivity continues to be checked
Before launching ANY plugin, check connectivity
What we achieve: If an ISP takes down the traffic, there is an outage, etc. We lose as little results as possible, because we will auto-pause and auto-restart the whole scan.

Added module's action to UI

Add functionality of the actions taken by module to UI. Like add command in CLI to clean disk or resume/pause OWTF.

Disk inode monitoring

Cross-posted from OWTF issue tracker owtf/owtf#424

@7a: I ran into a situation where there was enough disk space but the number of free inodes became 0, we need to:

Safely pause everything + abort if the number of free inodes is getting “too close” to zero
Try to reduce the number of files we create, which has something to do with “running out of inodes” problem.
How to check if there are enough free inodes, running this command:
df -i

UPDATE: After rebooting, 1 million (!) inodes became available, suggesting that our temporary files (and/or the ones created by the tools we run) on /tmp consumed these many inodes. Because nothing else was changed.
Clean-up script:

NOTE: to be run from tmp/owtf/proxy-cache, with all workers paused
clean_up.sh

#!/bin/bash

for p_dir in $(ls); do
    if [ -d "$p_dir" ]; then
        (
            cd $p_dir
            echo "Cleaning up: $(pwd) - $(ls -l | wc -l) files"
            time for i in $(ls); do rm -f $i; done &
        )
        #echo "pwd out: $(pwd)"
    fi
done

Also,

Candidate 1) w3af temporary files
root@k:~/.w3af/tmp# df -vh ; rm -rf *; df -vh ← 7GB liberated (!)

Candidate 2) apt-cache

Step 1)du -sh /var/cache/apt/archives/ (5.7G /var/cache/apt/archives/ ← (!!!!) )
Step 2) apt-get clean
Step 3) du -sh /var/cache/apt/archives/ (116K /var/cache/apt/archives/← 6GB liberated (11GB on another box!) )

Bug when log directory is not found

When running the program for first time, or running it after deleting the .owtf_monitor directory present in $HOME.

For the first time it fails in run, a panic occurs due to this database query returns the error.

On analyzing I found that the database contains the data, but still throws an error.

Database interaction for saving config

The functions have to be implemented to enable saving of config to database with different profile if asked.
If there is error found in loading of profile switch to default profile.

OWTF log files compression

Cross-posted from owtf/owtf#423

Hi Folks, I don't have log output to show the incidence however I have had incidence atleast once when the OWTF scan process created so much of log files which resulted in 100% disk usage which causes issues towards the system stability.
A check to see how much is free storage and may be doing a tar.gz / tar.bz2 of the log files should help in long way as the data is anyways plain text.

Fix

Monitor size of proxy cache and log files and add a control method to backup the logs in a .tar.gz format to a directory of user's choice from the monitor's web interface.

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.