Code Monkey home page Code Monkey logo

htrace.sh's Introduction

htrace.sh

Travis-CI Docker


Master

Created by trimstray and contributors

Description

In my daily work, I missed a tool with which I could test the configuration of domains in a simple way. The ability to use curl or openssl is very important, but I did not have the tools to automate this process. Until now, I used the tools available on the web, but each of them had some shortcomings. Htrace.sh is a shell script that allows you to validate your domain configuration and catch any errors (e.g. redirect loops). It also displays basic information about the ssl configuration (if available), response headers, checks for mixed content and performs security scans using Nmap scripts and great external tools such as Ssllabs or Mozilla Observatory.

It is useful for:

  • checking properly domain configuration (web servers/reverse proxies)

  • redirects analysis, e.g. to eliminate redirect loops

  • checking response headers for each request

  • checking basic ssl configuration

    • validation of the certificates (date, cn, san) and verification ssl connection
  • scanning domain for Mixed Content

  • scanning domain using Nmap NSE Library

  • scanning domain with external security tools: Mozilla Observatory and SSL Labs API

    Before use htrace.sh please see Requirements.

How To Use

It's simple:

# Clone this repository
git clone https://github.com/trimstray/htrace.sh

# Go into the repository
cd htrace.sh

# Install
./setup.sh install

# Run the app
htrace.sh --domain https://google.com
  • symlink to bin/htrace.sh is placed in /usr/local/bin
  • man page is placed in /usr/local/man/man8

External tools

htrace.sh support external tools for security scans:

  • Mozilla Observatory - cli version of observatory.mozilla.org
    with params: --format=report --rescan --zero --quiet
  • Ssllabs - command-line reference-implementation client for SSL Labs API
    with params: -quiet -grade
  • mixed-content-scan - cli tool for check HTTPS-enabled website for Mixed Content
    with params: -user-agent \"$_user_agent\" --no-check-certificate
  • Nmap NSE Library - provide automated security scans with Nmap
    with scripts:
    • http-auth-finder
    • http-chrono
    • http-cookie-flags
    • http-cors
    • http-cross-domain-policy
    • http-csrf
    • http-dombased-xss
    • http-git
    • http-grep
    • http-internal-ip-disclosure
    • http-jsonp-detection
    • http-malware-host
    • http-methods
    • http-passwd
    • http-phpself-xss
    • http-php-version
    • http-robots.txt
    • http-sitemap-generator
    • http-shellshock
    • http-stored-xss
    • http-unsafe-output-escaping
    • http-useragent-tester
    • http-vhosts
    • http-xssed
    • ssl-enum-ciphers
    • whois-ip

If you don't know how to install these tools and where they should be placed, please see in Dockerfile where exactly every step is described.

When scanning for mixed content and nmap scripting engine, remember that it may take a long time before the entire site is checked.

Reports

If you want to generate a report in html format, use the ansi2html.sh tool. A detailed description of use:

htrace.sh -d https://nmap.org -s -h | ansi2html --bg=dark > report.html

Docker

The configuration is contained in the build/Dockerfile.

Build image

cd htrace.sh/build
docker build --rm -t htrace.sh -f Dockerfile .

Run container

docker run --rm -it --name htrace.sh htrace.sh -d http://nmap.org -h

Requirements

This tool working with:

Parameters

Provides the following options:

    htrace.sh v1.0.6

Usage:
    htrace.sh <option|long-option>

  Examples:
    htrace.sh --domain https://example.com
    htrace.sh --domain https://example.com -s -h --scan ssllabs

  Options:
        --help                                show this message
        -d|--domain <domain_name>             set domain name
        -s|--ssl                              show ssl server/connection params
        -h|--headers                          show response headers
        --scan <all|observatory|ssllabs>      scan domain with external security tools
        --mixed-content                       scan website for mixed content
        --nse                                 scan website with nmap nse library
        --user-agent <val>                    set 'User-Agent' header
        --max-redirects <num>                 set max redirects (default: 10)
        --timeout <num>                       set max timeout (default: 15)

Contributing

See this.

License

GPLv3 : http://www.gnu.org/licenses/

Free software, Yeah!

htrace.sh's People

Contributors

trimstray avatar

Watchers

 avatar

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.