βββββββ βββ βββ βββββββ βββββββββββββββββββββββββββββββββ ββββββ βββββββββββββββ
ββββββββ βββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββ βββββββββββββββ βββββββββββ βββ βββ βββββββββββββββββββ ββββββ
βββ ββββββββββββββ βββββββββββ βββ βββ βββββββββββββββββββ ββββββ
ββββββββββββ ββββββββββββββββββββ βββ βββ βββ ββββββ βββββββββββββββββββ
βββββββ βββ βββ βββββββ ββββββββ βββ βββ βββ ββββββ βββ βββββββββββββββ
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."
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. |
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 |
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 |
| 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 |
- π 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
| # | 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 |
| Module | Input | Tool Used | Example |
|---|---|---|---|
| Auto | Anything | Auto-detects, chains DNS+SSL for domains | microsoft.com β 3-phase pipeline |
| 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 |
| 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 |
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
| 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 |
| 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 |
| 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 |
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.
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
| 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 |
| 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 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 β
β ββββββββββββββ ββββββββββββββββ
Target: Kali Linux 2025+ / Ubuntu 22.04+
git clone https://github.com/alialsartawi7-sketch/ghosttrace.git
cd ghosttrace
pip install -r requirements.txt --break-system-packages# 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 starttheHarvester -h
sherlock --version
maigret --version
exiftool -ver
phoneinfoga version
dig -v
openssl versionpython3 app.py --setuppython3 app.py
# Open http://127.0.0.1:5000| Tool | Tor Method |
|---|---|
| Maigret | --tor-proxy socks5://127.0.0.1:9050 |
| Sherlock | --tor |
| theHarvester | proxychains4 -q wrapper |
| ExifTool | N/A (local file processing) |
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
The themes:
All themes β try it π
The scans:
The Graph:
The PDF Reports:
| 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 |
- Instagram/Facebook block automated checks (Cloudflare) β even with Tor
- Maigret + Tor on all 2500+ sites is slow β use
--sitetargeting - Google Dorks generates queries only β user must search manually
- PhoneInfoga requires separate installation from GitHub releases
- PDF requires
weasyprint(recommended) orwkhtmltopdf - WhatsApp/Telegram/Signal strip metadata from shared images β by design
- Linux only β Windows not supported
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.
MIT License β see LICENSE
Built with β€οΈ by Alsartawi