Performing OSINT with SpiderFoot
Overview
SpiderFoot is an open-source OSINT automation tool with 200+ modules that integrates with data sources for threat intelligence and attack surface mapping. This skill uses the SpiderFoot REST API and CLI (sf.py/spiderfoot-cli) to create and manage scans, select modules by use case (footprint, investigate, passive), parse structured results for domains, IPs, email addresses, leaked credentials, and DNS records, and generate target intelligence profiles.
When to Use
Trigger phrases:
"performing osint with spiderfoot"
"Automate OSINT collection using SpiderFoot REST API and CLI for target profiling"
When conducting security assessments that involve performing osint with spiderfoot
When following incident response procedures for related security events
When performing scheduled security testing or auditing activities
When validating security controls through hands-on testing
Prerequisites
- SpiderFoot 4.0+ installed or SpiderFoot HX cloud account
- Python 3.8+ with requests library
- SpiderFoot server running on default port 5001
- Optional: API keys for VirusTotal, Shodan, HaveIBeenPwned modules
Steps
# Example: IOC detection
import re
IOC_PATTERNS = {
"ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",
"domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",
"hash_md5": r"\b[a-f0-9]{32}\b",
"hash_sha256": r"\b[a-f0-9]{64}\b",
}
def extract_iocs(text: str) -> dict:
return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}
- Connect to SpiderFoot REST API or use CLI interface
- Create a new scan with target specification (domain, IP, email, name)
- Select scan modules by use case (all, footprint, investigate, passive)
- Monitor scan progress via API polling
- Retrieve and parse scan results by data element type
- Extract key findings: subdomains, IPs, emails, leaked credentials
- Generate structured OSINT intelligence report
Expected Output
JSON report containing OSINT findings organized by data type (domains, IPs, emails, credentials, DNS records), module source attribution, and target profile summary with risk indicators.
When NOT to Use
- You don't have explicit written authorization to test
- Task is about defense/detection, not offense (use detection skills)
- You need to implement security controls (use implementing-* skills)
- Task requires compliance auditing (use auditing-* skills)
- You're investigating an incident (use incident response skills)
- Target is out of scope for your engagement
- Task is about vulnerability scanning only (use scanning tools)
Red Flags
- Performing actions without explicit written authorization from the asset owner
- Testing against production systems without a defined scope and rules of engagement
- Testing without rate limiting, potentially causing service degradation
- Storing sensitive test data (credentials, tokens) in plain text logs
- Using automated scanners blindly without reviewing results for false positives
Process
- Design — Define interface, identify patterns, plan implementation
- Implement — Write code following existing conventions, add tests
- Verify — Run tests, check integration, validate behavior
Verification
- All steps executed successfully against a test environment before production use
- Output documented with screenshots or logs demonstrating expected behavior
- Vulnerabilities reproduced with proof-of-concept and impact analysis
- False positives filtered out through manual verification
- Fix recommendations include code-level remediation guidance
Anti-Rationalization Table
| Rationalization |
Reality |
| "We are too small to be targeted" |
Automated attacks target everyone. Size does not matter. |
| "Security slows us down" |
A breach slows you down 100x more. Build security in from the start. |
| "We will fix it after launch" |
Vulnerabilities in production are exploited within hours. Fix before deploy. |
1---2name: performing-osint-with-spiderfoot3description: Use when automating OSINT collection using SpiderFoot REST API and CLI4 for target profiling, module-based reconnaissance, and structured result analysis5 across 200+ data sources6domain: cybersecurity7subdomain: threat-intelligence8tags:9- osint10- spiderfoot11- reconnaissance12- threat-intelligence13- attack-surface14- target-profiling15version: '1.0'16author: oyi7717license: Apache-2.018nist_csf:19- ID.RA-0120- ID.RA-0521- DE.CM-0122- DE.AE-0223category: cybersecurity24metadata:25 source: https://skillmd.com/skills/oyi77/performing-osint-with-spiderfoot26---272829# Performing OSINT with SpiderFoot3031## Overview3233SpiderFoot is an open-source OSINT automation tool with 200+ modules that integrates with data sources for threat intelligence and attack surface mapping. This skill uses the SpiderFoot REST API and CLI (sf.py/spiderfoot-cli) to create and manage scans, select modules by use case (footprint, investigate, passive), parse structured results for domains, IPs, email addresses, leaked credentials, and DNS records, and generate target intelligence profiles.343536## When to Use37**Trigger phrases:**38- "performing osint with spiderfoot"39- "Automate OSINT collection using SpiderFoot REST API and CLI for target profiling"404142- When conducting security assessments that involve performing osint with spiderfoot43- When following incident response procedures for related security events44- When performing scheduled security testing or auditing activities45- When validating security controls through hands-on testing4647## Prerequisites4849- SpiderFoot 4.0+ installed or SpiderFoot HX cloud account50- Python 3.8+ with requests library51- SpiderFoot server running on default port 500152- Optional: API keys for VirusTotal, Shodan, HaveIBeenPwned modules5354## Steps5556```python57# Example: IOC detection58import re5960IOC_PATTERNS = {61 "ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",62 "domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",63 "hash_md5": r"\b[a-f0-9]{32}\b",64 "hash_sha256": r"\b[a-f0-9]{64}\b",65}6667def extract_iocs(text: str) -> dict:68 return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}69```70711. Connect to SpiderFoot REST API or use CLI interface722. Create a new scan with target specification (domain, IP, email, name)733. Select scan modules by use case (all, footprint, investigate, passive)744. Monitor scan progress via API polling755. Retrieve and parse scan results by data element type766. Extract key findings: subdomains, IPs, emails, leaked credentials777. Generate structured OSINT intelligence report7879## Expected Output8081JSON report containing OSINT findings organized by data type (domains, IPs, emails, credentials, DNS records), module source attribution, and target profile summary with risk indicators.82## When NOT to Use8384- You don't have explicit written authorization to test85- Task is about defense/detection, not offense (use detection skills)86- You need to implement security controls (use implementing-* skills)87- Task requires compliance auditing (use auditing-* skills)88- You're investigating an incident (use incident response skills)89- Target is out of scope for your engagement90- Task is about vulnerability scanning only (use scanning tools)919293## Red Flags9495- Performing actions without explicit written authorization from the asset owner96- Testing against production systems without a defined scope and rules of engagement97- Testing without rate limiting, potentially causing service degradation98- Storing sensitive test data (credentials, tokens) in plain text logs99- Using automated scanners blindly without reviewing results for false positives100101## Process1021031. **Design** — Define interface, identify patterns, plan implementation1041. **Implement** — Write code following existing conventions, add tests1051. **Verify** — Run tests, check integration, validate behavior106107## Verification108109- All steps executed successfully against a test environment before production use110- Output documented with screenshots or logs demonstrating expected behavior111- Vulnerabilities reproduced with proof-of-concept and impact analysis112- False positives filtered out through manual verification113- Fix recommendations include code-level remediation guidance114115## Anti-Rationalization Table116117| Rationalization | Reality |118|---|---|119| "We are too small to be targeted" | Automated attacks target everyone. Size does not matter. |120| "Security slows us down" | A breach slows you down 100x more. Build security in from the start. |121| "We will fix it after launch" | Vulnerabilities in production are exploited within hours. Fix before deploy. |