Skip to content

Latest commit

Β 

History

59 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Screenshot_2026-04-13_09_04_03

Python 3.10+ License MIT Version 6.3 Platform Linux Tools 9 Routes 36 Themes 12 Tests 9

   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
  β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•
  β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•‘      β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  
  β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β•šβ•β•β•β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘      β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•  
  β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘      β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
   β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β•   β•šβ•β•      β•šβ•β•   β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β• β•šβ•β•β•β•β•β•β•šβ•β•β•β•β•β•β•
                                                                          v6.3 by Alsartawi

OSINT made simple β€” from beginner to professional.

GhostTrace is a modular OSINT intelligence platform that wraps 9 Linux tools into a single web interface with real-time streaming, active reconnaissance, risk scoring, attack path analysis, and professional PDF reports. No cloud dependencies. No telemetry. Runs entirely on your machine.

"⭐ If you find this useful, a star helps a lot!" "πŸ› Found a bug? Open an issue β€” I actively fix them."


πŸ†• What's New in v6.3

Frontend security hardening β€” no breaking changes, all 153 tests pass.

Area Fix
πŸ›‘οΈ DOM-XSS guard Scan-derived values (WHOIS fields, cert SANs/CN, page titles, raw tool output) are now escaped at every UI sink β€” console, result list, history, and graph tooltip. A fail-closed allowlist sanitizer preserves the hl/muted/val styling spans while neutralizing any other injected markup.

πŸ†• What's New in v6.2

Report quality & email-security release.

Area Improvement
🌐 Subdomain grouping Hosts that resolve to multiple IPs are collapsed into a single row with all IPs aggregated β€” counts now reflect unique hosts, in the report, entity timeline, and graph alike
πŸ“§ DMARC detection DNS scans check _dmarc.<domain> automatically β€” reports the policy if present, or flags "vulnerable to email spoofing" when missing
🎯 Smarter Key Findings Domain-verification TXT tokens (Zoom, Google, MS, etc.) are down-ranked so they no longer crowd out real findings
🧹 Cleaner data at the source Subdomains are de-duplicated when stored, not just when displayed

πŸ†• What's New in v6.1

Stability & security hardening release β€” no breaking changes, all 201 tests pass.

Area Fix
⏱️ Hang protection A wall-clock watchdog now terminates tools that produce no output (scans no longer freeze indefinitely); stderr is drained on a separate thread to prevent pipe-buffer deadlock
πŸ”‘ Session persistence The Flask secret key is now persisted, so you stay logged in across restarts (previously regenerated on every boot)
πŸ›‘οΈ CSRF / drive-by protection Cross-site GET requests to the API are rejected via the Sec-Fetch-Site header
πŸ“„ CSV-injection guard Spreadsheet formula injection is neutralized in CSV exports
πŸ—„οΈ Data integrity Foreign keys enforced (cascade deletes work), atomic result de-duplication, and the abort/finish race condition fixed
🧹 Hardening & hygiene Config file locked to mode 600, export files auto-pruned, and uploads timestamp-prefixed to avoid overwrites

πŸ†• What's New in v6.0

Feature Description
⭐ Starred Scans Pin important scans to the top of History β€” they're protected from auto-cleanup
⌨️ Keyboard Shortcuts Enter, Esc, Ctrl+K/H/L/,, 1-9, Ctrl+/ for power users
πŸ”— Deep Links URL updates when loading scan β€” share ?scan=<id> with colleagues
πŸ—‘οΈ DB Cleanup Auto-remove scans older than N days (keeps starred), vacuum reclaims space
πŸ“Š DB Info View database size, scan counts, starred counts via API
πŸ“¦ Bulk Operations Delete multiple scans at once via API
πŸ’Ύ Export All History Full backup as JSON for archiving or transfer
πŸ“ Better Logging Scan lifecycle tracked in logs β€” start, complete, errors
πŸ”’ CSRF Fixes 3 security bugs fixed β€” null token rejection, proper flow, jsonify import
πŸ› AttackPath Crash Fix KeyError: 'status' on incomplete admin panel data

⚑ What Makes GhostTrace Different

  • πŸ” 9 integrated tools β€” not just wrappers, full intelligence pipeline
  • πŸ›‘οΈ Active Recon β€” DNS validation, HTTP probing, port scanning with banner grabbing
  • πŸ“Š Risk Scoring Engine β€” 0-100 dynamic scoring with actionable reasons
  • πŸ—ΊοΈ Attack Path Generator β€” 5 rules that map real exploitation paths
  • 🧠 Smart Confidence β€” scores based on result quality, not just source
  • πŸ”¬ Intelligent Metadata Analysis β€” auto-detects WhatsApp/Telegram metadata stripping
  • πŸ“„ Professional Reports β€” PDF with Key Findings, SVG charts, Entity Timeline, risk assessment
  • 🌐 Interactive Graph β€” Quadtree O(n log n) force layout, PNG export, fullscreen
  • πŸ” Authentication + CSRF β€” bcrypt password, session-based, CSRF tokens on all POST/DELETE
  • 🎨 12 Premium Themes β€” including Royal Gold and Midnight Silver
  • πŸ”„ Cross-Scan Diff β€” compare two scans to detect new exposures
  • πŸ“€ File Upload + Drag & Drop β€” no need to type paths for metadata extraction

🧰 Integrated Tools (9)

# Tool Tab What It Finds
1 theHarvester Email / Subs Emails, subdomains, IPs from 13 free sources
2 Maigret Username Social media profiles across 2500+ sites
3 Sherlock Username Username search across 400+ sites
4 ExifTool Metadata Hidden metadata β€” GPS, author, device (smart classification)
5 PhoneInfoga Phone Phone number carrier, country (search engine noise filtered)
6 Whois Auto/CLI Domain registration, registrar, expiry, nameservers
7 dig DNS MX, TXT (SPF/DKIM/DMARC), NS, SOA, A, AAAA, CNAME records
8 openssl SSL Certificate SANs (hidden subdomains), issuer, expiry
9 Google Dorks Dorks 28 targeted clickable queries

πŸŽ›οΈ 10 Scan Modules

Module Input Tool Used Example
Auto Anything Auto-detects, chains DNS+SSL for domains microsoft.com β†’ 3-phase pipeline
Email Domain theHarvester example.com
Username Username Maigret / Sherlock johndoe
Metadata File path or Upload (drag&drop) ExifTool (smart classification) Drag file or browse
Phone Phone number PhoneInfoga (noise-filtered) +1234567890
Subdomain Domain theHarvester google.com
DNS Domain dig (7 record types) example.com
SSL Domain openssl example.com
Dorks Domain Generator (clickable) example.com
Recon Domain Built-in Full pipeline with banner grabbing

⌨️ Keyboard Shortcuts

Shortcut Action
Enter Start scan
Esc Abort scan
Ctrl + K Focus filter
Ctrl + / Show help
Ctrl + H Open History
Ctrl + , Settings
Ctrl + L Clear console
1 – 9 Switch tabs

πŸ›‘οΈ Active Reconnaissance Pipeline

After passive OSINT, GhostTrace validates and enriches results:

πŸ“‘ DNS Resolution     β†’ Remove dead domains, validate alive hosts
🌐 HTTP Probing       β†’ Status codes, technology detection, security headers
πŸ”Œ Port Scanning      β†’ Top 25 ports + banner grabbing (OpenSSH, Apache, nginx...)
🎯 Attack Surface     β†’ Admin panels, login pages, API endpoints
πŸ“Š Risk Scoring       β†’ 0-100 dynamic score with explanations
πŸ—ΊοΈ Attack Paths       β†’ 5 rules: Brute Force, Admin Panel, API, Legacy, Chained

Risk Scoring

Factor Points Example
Alive host +10 Base score for reachable targets
RDP exposed +25 Port 3389 open
Admin panel found +20 /admin returns 200/401/403
Missing HSTS +10 No Strict-Transport-Security header
Staging/dev exposed +18 staging.example.com publicly accessible
WordPress detected +10 Known vulnerability history

Attack Path Rules

Rule Trigger Severity
Brute Force Candidate Login page + SSH/FTP/RDP open HIGH
Admin Panel Exposed Any admin panel found CRITICAL (scoreβ‰₯65)
API Enumeration API endpoint detected HIGH
Legacy Service FTP (21) or Telnet (23) open CRITICAL
Chained Risk Scoreβ‰₯65 + 3 contributing factors CRITICAL

🧠 Smart Confidence System

Result Old Score Smart Score Why
john.doe@example.com 72% 90% Personal email (firstname.lastname)
info@example.com 72% 60% Generic alias
admin.example.com 70% 90% Admin subdomain + DNS resolved
blog.example.com 70% 60% No IP confirmation
0.0.0.0 70% 15% Private IP β€” noise
*.example.com 70% 20% Wildcard entry

πŸ”¬ Smart Metadata Analysis

ExifTool results classified by intelligence value:

Classification Confidence Examples
πŸ“ GPS 98% Latitude, longitude, altitude
πŸ‘€ AUTHOR 95% Owner name, copyright, artist
πŸ“± DEVICE 92% iPhone 14 Pro, Samsung, Canon
πŸ’» SOFTWARE 85% iOS 17.2, Photoshop, GIMP
πŸ“… DATE 85% Original capture date/time
πŸ“„ BASIC 40% File size, dimensions, type

Auto-detects metadata stripping from: WhatsApp, Telegram, Signal, Facebook, Twitter, Screenshots.


πŸ“„ Professional PDF Reports

Reports include all 9 result types with:

  • 🎯 Key Findings β€” Top 10 highest-priority results (confidence β‰₯50% only)
  • πŸ“Š SVG Charts β€” Bar chart of results by type
  • πŸ• Entity Timeline β€” Recurring findings with first_seen/last_seen/count
  • πŸ“ˆ Confidence distribution bar (high/medium/low)
  • πŸ“ Executive summary (auto-generated)
  • πŸ›‘οΈ Risk Assessment section (if recon was performed)
  • πŸ—ΊοΈ Attack paths with severity and steps
  • ⚠️ Recommendations

✨ Features

Feature Description
πŸ” Authentication bcrypt password with --setup, session-based
πŸ”’ CSRF Protection Token per session, auto-injected on all POST/DELETE
🎨 12 Premium Themes Ghost Blue, Matrix, Cyberpunk, Ocean, Sunset, Toxic, Blood, Stealth, Arctic, Light, Royal Gold, Midnight Silver
πŸŒ™ Dark/Light Toggle Quick toggle button in navbar
⭐ Starred Scans Pin important scans β€” protected from auto-cleanup
πŸ”— Deep Links URL updates on scan load β€” shareable links
πŸ“€ File Upload + Drag & Drop Drop files into metadata tab directly
πŸ“‹ Copy Button Hover any result β†’ click ⎘ to copy
πŸ“ Scan Notes Add notes to any scan from History
πŸ—‘οΈ Delete / Bulk Delete Remove old scans one-by-one or in batch
🧹 Auto Cleanup Remove scans older than N days (keeps starred)
πŸ’Ύ Full DB Backup Export entire history as JSON
πŸ”„ Cross-Scan Diff Compare two scans: added/removed/unchanged
🌐 Interactive Graph Quadtree O(n log n), clustering, shapes, PNG export
β›Ά Fullscreen Graph Dedicated fullscreen mode
πŸ”Ž Result Search Filter results in real-time
πŸ’Ύ Scan History SQLite-backed with starred ordering
πŸ”Œ Tor Integration One toggle β€” routes traffic through Tor
πŸ“¦ Export JSON, CSV, TXT, HTML, PDF
πŸ–₯️ CLI Mode Direct commands in the terminal bar
⌨️ Keyboard Shortcuts Power user workflow

πŸ§ͺ Quality Assurance

Category Details
βœ… 9 Test Files validators, harvester, correlator, risk_engine, recon, new_tools, database, report, integration
βœ… Linting flake8 checks for syntax errors and undefined names
βœ… API Documentation Full reference at docs/API.md β€” all 36 endpoints
βœ… Contributing Guide CONTRIBUTING.md β€” how to add tools, run tests, code style
βœ… Type Hints Key modules typed: base, risk_engine, correlator, validators

Run tests locally:

pytest tests/ -v

Architecture

                           GhostTrace v6.3

 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚  Web UI   │───→│ Validators  │───→│ Tool Adapters │───→│ Executionβ”‚
 β”‚ 10 tabs   β”‚    β”‚ whitelist   β”‚    β”‚ 9 tools       β”‚    β”‚ Engine   β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
       ↑                                                     β”‚
       β”‚ SSE      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   subprocess
       │←─────────│  Scanner    │←───│   Parser      β”‚β†β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚          β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚                β”‚
       β”‚          β”Œβ”€β”€β”€β”€β”€β†“β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚          β”‚ Correlator  │───→│   SQLite DB   β”‚
       β”‚          β”‚ + Scorer    β”‚    β”‚  WAL + starredβ”‚
       β”‚          β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚                β”‚
       β”‚          β”Œβ”€β”€β”€β”€β”€β†“β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚          β”‚ Active Recon│───→│ Risk Engine   β”‚
       β”‚          β”‚ DNS+HTTP+   β”‚    β”‚ Score 0-100   β”‚
       β”‚          β”‚ Ports+Attackβ”‚    β”‚ Attack Paths  β”‚
       β”‚          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Installation

Target: Kali Linux 2025+ / Ubuntu 22.04+

1. Clone and install Python deps

git clone https://github.com/alialsartawi7-sketch/ghosttrace.git
cd ghosttrace
pip install -r requirements.txt --break-system-packages

2. Install OSINT tools

# Required
sudo apt update
sudo apt install -y pipx dnsutils whois libimage-exiftool-perl \
  openssl git libcairo2-dev pkg-config python3-dev build-essential

# pipx PATH
pipx ensurepath

# OSINT tools
pipx install maigret sherlock-project

# PhoneInfoga
wget https://github.com/sundowndev/phoneinfoga/releases/latest/download/phoneinfoga_Linux_x86_64.tar.gz -O /tmp/phoneinfoga.tar.gz
tar xzf /tmp/phoneinfoga.tar.gz -C /tmp/
sudo mv /tmp/phoneinfoga /usr/local/bin/

# Clone and run
git clone https://github.com/alialsartawi7-sketch/ghosttrace.git
cd ghosttrace
pip install -r requirements.txt --break-system-packages
python3 app.py

# Optional β€” for Tor routing
sudo apt install tor -y
sudo service tor start

3. Verify tools

theHarvester -h
sherlock --version
maigret --version
exiftool -ver
phoneinfoga version
dig -v
openssl version

4. Set password (recommended)

python3 app.py --setup

Usage

python3 app.py
# Open http://127.0.0.1:5000

Tor

Tool Tor Method
Maigret --tor-proxy socks5://127.0.0.1:9050
Sherlock --tor
theHarvester proxychains4 -q wrapper
ExifTool N/A (local file processing)

CLI Mode

ghost $ maigret johndoe --site Instagram --site GitHub
ghost $ theHarvester -d example.com -b crtsh -l 100
ghost $ whois example.com
ghost $ dig example.com MX

πŸ“Έ Screenshots

The themes:

theme1 theme2 theme3

All themes β€” try it πŸ˜‰

themes

The scans:

scan

The Graph:

graph1 graph2

The PDF Reports:

image

Security Model

Layer Implementation
Authentication bcrypt password hashing, session-based auth
CSRF Protection Token per session, validated on all POST/DELETE
Input validation Per-field regex: domain, email, username, filepath, phone
CLI validation Whitelist regex per tool (not a blacklist)
Path traversal Blocks .., /etc/shadow, /root, .ssh (uploads dir whitelisted)
Output sanitization Strips ANSI codes + control characters
Rate limiting 20 scans per 60 seconds
Process isolation os.setsid + process group kill on timeout/abort
File upload Sanitized filename, safe directory, 16MB limit

Known Limitations

  • Instagram/Facebook block automated checks (Cloudflare) β€” even with Tor
  • Maigret + Tor on all 2500+ sites is slow β€” use --site targeting
  • Google Dorks generates queries only β€” user must search manually
  • PhoneInfoga requires separate installation from GitHub releases
  • PDF requires weasyprint (recommended) or wkhtmltopdf
  • WhatsApp/Telegram/Signal strip metadata from shared images β€” by design
  • Linux only β€” Windows not supported

Disclaimer

GhostTrace is intended for authorized security research, penetration testing, and educational purposes only.

The author assumes no liability for misuse. Always obtain proper authorization before performing OSINT operations on targets you do not own.

Use responsibly. Respect privacy. Follow your country's laws.


License

MIT License β€” see LICENSE


Built with ❀️ by Alsartawi

About

Modular OSINT and attack surface analysis platform for authorized security research, with risk scoring, attack paths, and report generation.

Topics

Resources

Contributing

Stars

85 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages