Osint

From brucesongs/kali-claw · View interactive version

Osint is an AI agent skill from the GitHub repository brucesongs/kali-claw. A specialized skill for intelligence gathering using publicly available sources.

How to use this skill

Skill file

Skill: Open Source Intelligence (OSINT)

Supplementary Files:

- payloads.md — OSINT attack payloads and command collection (domain reconnaissance, DNS enumeration, subdomain discovery, Google Dorking, email collection, social media intelligence, metadata extraction, Shodan/Censys queries, leaked data queries, technology fingerprinting)

- test-cases.md — Structured test cases (passive reconnaissance, active scanning, OSINT collection, technology fingerprinting) with severity levels and summary tables

Summary

Osint skill domain covering osint operations.

Domain: osint

MITRE ATT&CK: TA0043-Reconnaissance

Description

A specialized skill for intelligence gathering using publicly available sources. OSINT is a core capability in the reconnaissance phase of penetration testing, covering comprehensive information acquisition from domains, emails, and usernames to social media, leaked data, and threat intelligence. This skill focuses on 13 professional OSINT tools and 5 major practical workflows, emphasizing passive collection, compliant operations, and cross-verification.

Difference from the recon-osint skill: recon-osint focuses on active reconnaissance (port scanning, directory brute forcing, web fingerprinting), while this skill focuses on passive intelligence gathering (no direct interaction with the target).

Use Cases

Core Tools

Comprehensive Frameworks

| Tool | Purpose | Command Example |

|------|---------|-----------------|

| SpiderFoot | Automated OSINT collection (200+ modules) | spiderfoot -s target -t ALL -u passive |

| Recon-ng | Modular web reconnaissance framework | recon-ng > use recon/domains-hosts/brute_hosts |

| Maltego | Visual link analysis | GUI: Domain -> DNS Names -> IP Address |

| sn0int | Semi-automated structured OSINT | sn0int workspace create osint_test |

Email and Personnel Intelligence

| Tool | Purpose | Command Example |

|------|---------|-----------------|

| theHarvester | Email, subdomain, and personnel collection | theHarvester -d example.com -b all |

| h8mail | Email breach query (20+ data sources) | h8mail -t target@email.com |

| Holehe | Email registration detection across 120+ services | holehe target@email.com |

Username and Social Media

| Tool | Purpose | Command Example |

|------|---------|-----------------|

| Sherlock | Username search across 300+ platforms | sherlock username --json |

Network and Device Intelligence

| Tool | Purpose | Command Example |

|------|---------|-----------------|

| Shodan | IoT and server search engine | shodan host <IP> |

| PhoneInfoga | Phone number intelligence collection | phoneinfoga -n +1234567890 -s all |

Code and Credentials

| Tool | Purpose | Command Example |

|------|---------|-----------------|

| GitHub Dorking | GitHub sensitive information search | curl -s "https://api.github.com/search/code?q=..." |

| Git-Dumper | Offline Git repository download and analysis | git-dumper https://github.com/user/repo /output |

Methodology

OSINT Five-Phase Process

Phase 1: Passive Collection

No direct interaction with the target; use only public data sources.

# WHOIS domain registration information
whois example.com

# DNS record collection
dig any example.com @8.8.8.8
subfinder -d example.com -o subdomains.txt
dnsx -d example.com -a -silent

# Certificate Transparency query
theHarvester -d example.com -b crtsh

# Search engine passive collection
theHarvester -d example.com -b google

# SpiderFoot fully automated passive scan
spiderfoot -s example.com -t INTERNET_NAME,DNS_ANY,SUBDOMAIN_HTTPS -u passive

Phase 2: Email Intelligence

Collect target organization emails and check for breaches.

# Email collection (multiple data sources)
theHarvester -d example.com -b all

# Email format inference
theHarvester -d example.com -b hunter

# Breach checking
h8mail -t user@example.com
h8mail -t @targetdomain.com -l local

# Service registration detection
holehe user@example.com

# PGP key search
gpg --search-keys user@example.com

Phase 3: Username and Social Media

Track target usernames across major platforms.

# Cross-platform username search
sherlock username1 username2 --json

# LinkedIn employee search
theHarvester -d "Company Name" -b linkedin

# Twitter association
theHarvester -d example.com -b twitter

Phase 4: Domain and Asset Discovery

# Subdomain enumeration (multi-tool cross-verification)
subfinder -d example.com -o subs_subfinder.txt
amass enum -passive -d example.com -o subs_amass.txt

# Merge, deduplicate, and verify
sort -u subs_*.txt | httpx -silent -status-code -title

# DNS brute force
gobuster dns -d example.com -w /usr/share/wordlists/subdomains-top1mil-20000.txt

# Shodan search for exposed devices
shodan search "org:Example Corp"
shodan host <IP>

Phase 5: Credential and Code Leak

# GitHub sensitive information search
curl -s "https://api.github.com/search/code?q=org:company+password+in:file"
curl -s "https://api.github.com/search/code?q=user:username+api_key+in:file"
curl -s "https://api.github.com/search/code?q=repo:owner/repo+secret+in:path"

# Breach database query
curl "https://haveibeenpwned.com/api/v3/breachedaccount/<EMAIL>"

# Offline repository analysis
git-dumper https://github.com/user/repo /tmp/repo_analysis
grep -r "password\|api_key\|secret\|token" /tmp/repo_analysis/

Quick Selection Guide

| Scenario | Primary Tool | Alternative |

|----------|-------------|-------------|

| Quick comprehensive scan | SpiderFoot | Recon-ng |

| Email collection | theHarvester + Hunter | h8mail |

| Email breach check | h8mail | HaveIBeenPwned API |

| Email registration detection | Holehe | -- |

| Username tracking | Sherlock | Namechk |

| Phone number intelligence | PhoneInfoga | -- |

| Subdomain enumeration | subfinder + amass | dnsenum, fierce |

| Device search | Shodan | Censys |

| Code leakage | GitHub Dorking | Git-Dumper |

| Visual correlation | Maltego | -- |

| Automation pipeline | Recon-ng | sn0int |

Defense Perspective

Practical Steps

Practical Exercise 1: Complete Intelligence Profile of Target Organization

# Step 1: Domain basic information
whois example.com
dig any example.com @8.8.8.8

# Step 2: Email and personnel collection
theHarvester -d example.com -b all -f recon_report.html

# Step 3: Breach checking
h8mail -t @example.com -o leaks.json

# Step 4: SpiderFoot comprehensive scan
spiderfoot -s example.com -t ALL -u passive -o json > full_osint.json

# Step 5: Visual correlation (Maltego)
# Domain -> DNS Names -> IP -> AS Number -> Organization

Practical Exercise 2: Target Personnel Social Tracking

# Step 1: Collect employee emails
theHarvester -d example.com -b linkedin

# Step 2: Extract usernames and search across platforms
sherlock user1 user2 user3 --json -o social_accounts.json

# Step 3: Email service association
holehe user@example.com

# Step 4: Phone number intelligence
phoneinfoga -n +1234567890 -s all

Practical Exercise 3: GitHub Code Leak Audit

# Step 1: Search for organization sensitive files
curl -s "https://api.github.com/search/code?q=org:target+filename:.env" | jq '.items[].html_url'
curl -s "https://api.github.com/search/code?q=org:target+password+in:file" | jq '.items[].html_url'

# Step 2: Search for key credential keywords
for keyword in password secret api_key token private_key aws_access_key; do
  curl -s "https://api.github.com/search/code?q=org:target+${keyword}+in:file" | jq '.items[].html_url'
done

# Step 3: Download suspicious repositories for in-depth analysis
git-dumper https://github.com/target/suspicious-repo /tmp/audit
grep -rn "password\|api_key\|secret\|token\|aws_" /tmp/audit/ --include="*.yml" --include="*.env" --include="*.json"

Practical Exercise 4: Recon-ng Automation Pipeline

# Launch and create workspace
recon-ng
[recon-ng] > workspaces create target_recon

# Add target domain
[recon-ng] > add domains example.com

# Subdomain enumeration module chain
[recon-ng] > use recon/domains-hosts/brute_hosts
[recon-ng] > run
[recon-ng] > use recon/hosts-hosts/resolve
[recon-ng] > run

# Email collection
[recon-ng] > use recon/domains-contacts/email-harvester
[recon-ng] > set source example.com
[recon-ng] > run

# Export results
[recon-ng] > show hosts
[recon-ng] > show contacts
[recon-ng] > export csv /tmp/recon_results.csv

For detailed payloads see payloads.md, and for the complete test checklist see test-cases.md.

Online OSINT Resources

Search Engines and Devices

| Resource | Purpose |

|----------|---------|

| Google advanced operators | site:, inurl:, filetype:, intitle: |

| Shodan (shodan.io) | IoT device and server search |

| Censys (censys.io) | Certificate and host data |

| Yandex | Image reverse search (strong recognition capability) |

Domain and DNS

| Resource | Purpose |

|----------|---------|

| WHOIS (whois.domaintools.com) | Domain registration information |

| crt.sh | Certificate Transparency query |

| DNSdumpster | DNS enumeration |

| VirusTotal | URL/domain analysis |

Email and Breaches

| Resource | Purpose |

|----------|---------|

| Hunter.io | Email lookup and format inference |

| HaveIBeenPwned | Breach checking |

| DeHashed | Breach database search |

| LeakCheck | Breach checking |

Threat Intelligence

| Resource | Purpose |

|----------|---------|

| AlienVault OTX | Open-source threat intelligence |

| AbuseIPDB | IP report query |

| GreyNoise | Internet noise filtering |

| IPinfo | IP geolocation and ownership query |

Business Information (China)

| Resource | Purpose |

|----------|---------|

| Tianyancha | Enterprise information query |

| Qichacha | Enterprise business registration information |

| Aiqicha | Baidu enterprise query |

Safety Notes

Detection Methods

OSINT detection focuses on identifying reconnaissance activity from external sources and monitoring what information about your organization is publicly available. Understanding attacker reconnaissance patterns helps defenders deploy decoys and detect intelligence-gathering activity.

Network-Level Indicators (Defender Perspective)

Web Infrastructure Indicators

Social / Human Recon Indicators

Decoy / Honeypot Detection

SIEM Detection Rules

Defense Evasion Techniques

Stealth Reconnaissance

Search Engine Dorking Stealth

Social Engineering Recon Stealth

Dark Web Monitoring Evasion

Code Repository Recon Stealth

Email / User Enumeration Stealth

Cloud Reconnaissance Stealth


Hacker Laws

Learning Resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.