Skip to content

gh0stshe11/HarbingerDAST

Repository files navigation

HarbingerDAST

The DAST Harbinger - A Dynamic Application Security Testing tool that scans web applications for vulnerabilities

Overview

HarbingerDAST is a comprehensive DAST (Dynamic Application Security Testing) tool that combines multiple open-source security scanners to identify vulnerabilities in web applications. It generates both technical reports for security professionals and ELI5 (Explain Like I'm 5) reports for non-technical stakeholders.

Enhanced with webReaper features for advanced URL discovery, crawling, and comprehensive security analysis.

Features

  • 🔍 Multi-Tool Scanning: Integrates with popular open-source security tools

    • httpx HTTP probing and metadata collection (optional, requires Go)
    • katana web crawler for URL discovery (optional, requires Go)
    • OWASP ZAP baseline scanning (optional, requires Docker)
    • Nikto web server scanner (optional, requires Nikto)
    • Built-in security header checks
  • 🕷️ URL Discovery & Crawling: Automatically discover endpoints with katana integration

    • Configurable crawl depth
    • Rate limiting and concurrency control
    • Smart scope management
  • 🔒 Enhanced Security Checks:

    • Missing security headers detection
    • Directory listing vulnerabilities
    • Exposed backup/configuration files
    • Server error detection (5xx)
    • Sensitive endpoint identification
    • API endpoint analysis
  • 📊 Dual Reporting:

    • ELI5 Report: Simple, non-technical explanations for managers and stakeholders
    • Technical Report: Detailed vulnerability information for security professionals
  • 🎯 Severity Classification: Automatically categorizes findings as Critical, High, Medium, or Low priority

  • 💾 Multiple Output Formats: Generates TXT and JSON reports for easy integration

  • 🚦 CI/CD Integration: Exit codes for automated pipelines (0=safe, 1=issues found, 2=error)

Installation

Prerequisites

  • Python 3.7 or higher
  • pip (Python package manager)
  • Go 1.19+ (for optional httpx and katana tools)

Basic Installation

# Clone the repository
git clone https://github.com/gh0stshe11/HarbingerDAST.git
cd HarbingerDAST

# Install Python dependencies
pip install -r requirements.txt

# Make the script executable (optional)
chmod +x harbinger.py

Optional Tools (for extended scanning)

To enable all scanning features, install these optional tools:

httpx (for HTTP probing):

go install github.com/projectdiscovery/httpx/cmd/httpx@latest

katana (for web crawling):

go install github.com/projectdiscovery/katana/cmd/katana@latest

Docker (for OWASP ZAP):

# Install Docker based on your OS
# See: https://docs.docker.com/get-docker/

# Pull OWASP ZAP Docker image
docker pull owasp/zap2docker-stable

Nikto:

# Ubuntu/Debian
sudo apt-get install nikto

# macOS (with Homebrew)
brew install nikto

# Or download from: https://github.com/sullo/nikto

Note: Make sure Go binaries are in your PATH:

export PATH=$PATH:$HOME/go/bin
# Add to ~/.bashrc or ~/.zshrc to make permanent

Usage

Basic Scan

Scan a website with basic security checks:

python harbinger.py -u https://example.com

Enhanced Scan with URL Discovery

Use httpx and katana for enhanced discovery (if installed):

python harbinger.py -u https://example.com

Disable URL Discovery

Skip URL discovery and use only basic checks:

python harbinger.py -u https://example.com --no-discovery

Custom Output Directory

Specify a custom directory for reports:

python harbinger.py -u https://example.com -o my_security_reports

Command Line Options

usage: harbinger.py [-h] -u URL [-o OUTPUT_DIR] [--no-discovery]

Options:
  -h, --help            Show this help message and exit
  -u URL, --url URL     Target URL to scan (required)
  -o OUTPUT_DIR, --output-dir OUTPUT_DIR
                        Output directory for reports (default: reports)
  --no-discovery        Disable URL discovery and crawling (use basic checks only)

Exit Codes

HarbingerDAST uses exit codes for CI/CD integration:

  • 0: No critical or high severity issues found (safe)
  • 1: Critical or high severity issues found (action required)
  • 2: Runtime error occurred (check logs)

Example usage in CI/CD:

#!/bin/bash
python harbinger.py -u https://staging.example.com -o scan-results/

case $? in
  0)
    echo "✓ Security scan passed: No critical issues"
    ;;
  1)
    echo "✗ ALERT: Critical security issues detected!"
    echo "Review: scan-results/technical_report_*.txt"
    exit 1
    ;;
  2)
    echo "✗ ERROR: Scan failed to complete"
    exit 1
    ;;
esac

Output Reports

HarbingerDAST generates three types of reports in the output directory:

1. ELI5 Report (eli5_report_TIMESTAMP.txt)

Simple explanations suitable for non-technical audiences:

⚠️  Found 3 potential security issues

🔴 IMPORTANT ISSUES (Fix these first!):
   1. Missing protection against clickjacking (users tricked into clicking)

🟡 MODERATE ISSUES (Should fix soon):
   1. Missing protection against fake file types
   2. Not forcing secure (HTTPS) connections

2. Technical Report (technical_report_TIMESTAMP.txt)

Detailed technical information for security professionals:

[1] Missing Security Header
    Severity: Medium
    Missing Header: X-Frame-Options
    Description: Prevents clickjacking attacks
    Recommendation: Add X-Frame-Options header to improve security

3. JSON Data (findings_TIMESTAMP.json)

Machine-readable format for integration with other tools:

{
  "target": "https://example.com",
  "timestamp": "20240116_120000",
  "vulnerabilities": [...]
}

Example Workflow

  1. Run a scan:

    python harbinger.py -u https://your-website.com
  2. Review the ELI5 report with stakeholders to discuss priorities

  3. Use the technical report to implement fixes

  4. Re-run the scan after implementing fixes to verify improvements

Security Checks

HarbingerDAST currently performs the following security checks:

Built-in Checks (Always Active)

  • ✅ Security headers validation:

    • X-Frame-Options (clickjacking protection)
    • X-Content-Type-Options (MIME sniffing protection)
    • Strict-Transport-Security (HTTPS enforcement)
    • Content-Security-Policy (XSS protection)
    • X-XSS-Protection (browser XSS filter)
    • Referrer-Policy (referrer information control)
  • ✅ Information disclosure detection:

    • Server header exposure
    • Version information leaks

Enhanced Checks (with httpx/katana)

  • ✅ Directory listing detection
  • ✅ Exposed backup files (.bak, .backup, .old)
  • ✅ Exposed configuration files (.config, .conf)
  • ✅ Server error detection (5xx status codes)
  • ✅ Sensitive endpoint identification (admin, login, dashboard, api)
  • ✅ URL discovery via web crawling
  • ✅ HTTP metadata analysis

Extended Checks (Require Optional Tools)

  • 🔧 OWASP ZAP baseline scan (requires Docker)
  • 🔧 Nikto web server scan (requires Nikto installation)

Development

Project Structure

HarbingerDAST/
├── harbinger.py          # Main scanner script
├── requirements.txt      # Python dependencies
├── README.md            # Documentation
└── reports/             # Generated reports (created at runtime)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Roadmap

  • Add support for authenticated scanning
  • Integrate additional scanning tools (SQLMap, Arachni, etc.)
  • Add HTML report generation
  • Implement continuous scanning mode
  • Add webhook notifications
  • Create web interface
  • Integrate webReaper's WebSentinel features
    • httpx integration for HTTP probing
    • katana integration for web crawling
    • Enhanced security checks
    • Dependency management
    • Exit codes for CI/CD

Integration with webReaper

This version of HarbingerDAST integrates key features from the webReaper project:

  • URL Discovery: Uses katana for intelligent web crawling
  • HTTP Probing: Uses httpx for fast endpoint probing and metadata collection
  • Enhanced Security Analysis: Detects directory listings, exposed files, server errors, and more
  • Dependency Management: Automated checking and guidance for external tools
  • CI/CD Support: Exit codes for pipeline integration

For advanced reconnaissance and endpoint ranking features, see the full webReaper project.

Limitations

  • Basic checks require only Python and the requests library
  • Extended scanning features require Docker and/or additional tools
  • Scanning speed depends on target responsiveness and enabled tools
  • Some findings may be false positives and require manual verification

License

This project is open source and available under the MIT License.

Disclaimer

This tool is for authorized security testing only. Always obtain proper authorization before scanning any website you don't own. Unauthorized scanning may be illegal.

Support

For issues, questions, or contributions, please visit: https://github.com/gh0stshe11/HarbingerDAST/issues


HarbingerDAST - Making web security accessible to everyone 🛡️

About

the DAST harbinger

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages