Appearance
Uncover Search Engine Tool Cheat Sheet
Overview
Uncover is a powerful search engine wrapper developed by Project Discovery that allows quickly discovering exposed hosts on the internet using multiple search engines. It provides a unified interface to query popular search engines like Shodan, Censys, Fofa, Hunter, Zoomeye, Netlas, and more, making it an essential tool for reconnaissance and attack surface mapping.
What sets Uncover apart from directly using these search engines is its ability to query multiple providers simultaneously, normalize the results, and provide them in a consistent format. This significantly speeds up the process of discovering internet-exposed assets and helps security professionals identify potential security risks more efficiently. Uncover is designed with automation in mind, making it easy to integrate into security workflows and pipelines.
Uncover is commonly used by security researchers, bug bounty hunters, and penetration testers to discover exposed services, vulnerable applications, and misconfigured systems. Its ability to leverage multiple search engines provides a more comprehensive view of the attack surface, increasing the chances of finding security issues that might be missed when using a single source.
Installation
Using Go
bash
# Install using Go (requires Go 1.20 or later)
go install -v github.com/projectdiscovery/uncover/cmd/uncover@latest
# Verify installation
uncover -version
Using Docker
bash
# Pull the latest Docker image
docker pull projectdiscovery/uncover:latest
# Run Uncover using Docker
docker run -it projectdiscovery/uncover:latest -h
Using Homebrew (macOS)
bash
# Install using Homebrew
brew install uncover
# Verify installation
uncover -version
Using PDTM (Project Discovery Tools Manager)
bash
# Install PDTM first if not already installed
go install -v github.com/projectdiscovery/pdtm/cmd/pdtm@latest
# Install Uncover using PDTM
pdtm -i uncover
# Verify installation
uncover -version
On Kali Linux
bash
# Install using apt
sudo apt install uncover
# Verify installation
uncover -version
Basic Usage
Searching with Queries
bash
# Search using a basic query
uncover -q "apache"
# Search using multiple queries
uncover -q "apache,nginx"
# Search from a file containing queries
uncover -qf queries.txt
# Search from STDIN
echo "apache" | uncover
Provider Selection
bash
# Search using a specific provider
uncover -q "apache" -e shodan
# Search using multiple providers
uncover -q "apache" -e shodan,censys
# List available providers
uncover -list-engines
Output Options
bash
# Save results to a file
uncover -q "apache" -o results.txt
# Output in JSON format
uncover -q "apache" -json -o results.json
# Silent mode (only results)
uncover -q "apache" -silent
Provider Configuration
API Key Configuration
bash
# Set Shodan API key
uncover -shodan-key YOUR_SHODAN_API_KEY
# Set Censys API credentials
uncover -censys-id YOUR_CENSYS_ID -censys-secret YOUR_CENSYS_SECRET
# Set Fofa API credentials
uncover -fofa-email YOUR_FOFA_EMAIL -fofa-key YOUR_FOFA_KEY
# Set ZoomEye API key
uncover -zoomeye-key YOUR_ZOOMEYE_API_KEY
# Set Hunter API key
uncover -hunter-key YOUR_HUNTER_API_KEY
# Set Netlas API key
uncover -netlas-key YOUR_NETLAS_API_KEY
# Set Quake API key
uncover -quake-key YOUR_QUAKE_API_KEY
# Set Criminalip API key
uncover -criminalip-key YOUR_CRIMINALIP_API_KEY
Provider-Specific Options
bash
# Set maximum results per provider
uncover -q "apache" -limit 100
# Set timeout for provider requests
uncover -q "apache" -timeout 60
Advanced Usage
Advanced Search Queries
bash
# Search for specific ports
uncover -q "port:80"
# Search for specific services
uncover -q "product:nginx"
# Search for specific vulnerabilities
uncover -q "vuln:cve-2021-44228"
# Search for specific countries
uncover -q "country:US"
# Search for specific organizations
uncover -q "org:\"Example Inc\""
# Combine multiple filters
uncover -q "port:443 product:nginx country:US"
ASN Query Syntax
bash
# Search using ASN query syntax
uncover -asq "asn:AS15169 product:nginx"
# Search for specific ASN
uncover -asq "asn:AS15169"
# Search for specific organization
uncover -asq "org:Google"
# Search for specific IP range
uncover -asq "ip:8.8.8.0/24"
Field Selection
bash
# Select specific fields to display
uncover -q "apache" -f ip,port,host
# Available fields: ip, port, host, country, city, org, isp, asn, product, version
Integration with Other Tools
Pipeline with HTTPX
bash
# Discover hosts and probe for HTTP services
uncover -q "apache" -silent | httpx -silent
# Discover hosts, filter by port, and probe for HTTP services
uncover -q "port:443" -silent | httpx -silent
Pipeline with Nuclei
bash
# Discover hosts and scan for vulnerabilities
uncover -q "apache" -silent | nuclei -t cves/
# Discover hosts with specific product and scan for related vulnerabilities
uncover -q "product:nginx" -silent | nuclei -t exposures/
Pipeline with Naabu
bash
# Discover hosts and scan for open ports
uncover -q "apache" -silent | naabu -silent
# Discover hosts and scan for specific ports
uncover -q "apache" -silent | naabu -p 80,443,8080 -silent
Output Customization
Custom Output Format
bash
# Output only IP addresses
uncover -q "apache" -silent -f ip
# Output IP:port format
uncover -q "apache" -silent -f ip,port | awk '{print $1":"$2}'
# Count results
uncover -q "apache" -silent | wc -l
# Sort output by IP
uncover -q "apache" -silent | sort
Filtering Output
bash
# Filter by specific pattern
uncover -q "apache" -silent | grep "8.8.8"
# Filter by port
uncover -q "apache" -silent -f ip,port | grep ":443$"
# Find unique IPs
uncover -q "apache" -silent -f ip | sort -u
Advanced Filtering
Provider-Specific Filtering
bash
# Filter Shodan results by port
uncover -q "apache" -e shodan -silent | grep ":80$"
# Filter Censys results by country
uncover -q "apache" -e censys -silent -f ip,country | grep "US$"
# Filter Fofa results by title
uncover -q "apache" -e fofa -silent | grep "Dashboard"
Combining Multiple Queries
bash
# Search for multiple products
uncover -q "product:nginx,product:apache" -silent
# Search for multiple ports
uncover -q "port:80,port:443" -silent
# Search for multiple vulnerabilities
uncover -q "vuln:cve-2021-44228,vuln:cve-2021-40438" -silent
Provider-Specific Syntax
Shodan Syntax
bash
# Basic Shodan query
uncover -q "apache" -e shodan
# Shodan port filter
uncover -q "port:80" -e shodan
# Shodan product filter
uncover -q "product:nginx" -e shodan
# Shodan country filter
uncover -q "country:US" -e shodan
# Shodan organization filter
uncover -q "org:\"Example Inc\"" -e shodan
# Shodan ASN filter
uncover -q "asn:AS15169" -e shodan
# Shodan vulnerability filter
uncover -q "vuln:cve-2021-44228" -e shodan
Censys Syntax
bash
# Basic Censys query
uncover -q "apache" -e censys
# Censys port filter
uncover -q "services.port=80" -e censys
# Censys product filter
uncover -q "services.software.product=nginx" -e censys
# Censys country filter
uncover -q "location.country_code=US" -e censys
# Censys ASN filter
uncover -q "autonomous_system.asn=15169" -e censys
Fofa Syntax
bash
# Basic Fofa query
uncover -q "apache" -e fofa
# Fofa port filter
uncover -q "port=80" -e fofa
# Fofa product filter
uncover -q "app=\"nginx\"" -e fofa
# Fofa country filter
uncover -q "country=\"US\"" -e fofa
# Fofa ASN filter
uncover -q "asn=\"AS15169\"" -e fofa
ZoomEye Syntax
bash
# Basic ZoomEye query
uncover -q "apache" -e zoomeye
# ZoomEye port filter
uncover -q "port:80" -e zoomeye
# ZoomEye product filter
uncover -q "app:nginx" -e zoomeye
# ZoomEye country filter
uncover -q "country:US" -e zoomeye
# ZoomEye ASN filter
uncover -q "asn:15169" -e zoomeye
Troubleshooting
Common Issues
API Key Issues
bash# Verify API key configuration uncover -list-keys # Update API key uncover -shodan-key YOUR_NEW_SHODAN_API_KEY
Rate Limiting
bash# Reduce number of queries uncover -q "apache" -limit 10 # Increase timeout uncover -q "apache" -timeout 60
No Results
bash# Try a different provider uncover -q "apache" -e censys # Try a more general query uncover -q "web" -e shodan
Connection Issues
bash# Check internet connection ping 8.8.8.8 # Increase timeout uncover -q "apache" -timeout 60
Debugging
bash
# Enable verbose mode
uncover -q "apache" -v
# Show debug information
uncover -q "apache" -debug
# Check provider status
uncover -list-engines
Configuration
Configuration File
Uncover uses a configuration file located at $HOME/.config/uncover/provider-config.yaml
. You can customize various settings in this file:
yaml
# Example configuration file
shodan:
key: YOUR_SHODAN_API_KEY
censys:
id: YOUR_CENSYS_ID
secret: YOUR_CENSYS_SECRET
fofa:
email: YOUR_FOFA_EMAIL
key: YOUR_FOFA_KEY
zoomeye:
key: YOUR_ZOOMEYE_API_KEY
hunter:
key: YOUR_HUNTER_API_KEY
netlas:
key: YOUR_NETLAS_API_KEY
quake:
key: YOUR_QUAKE_API_KEY
criminalip:
key: YOUR_CRIMINALIP_API_KEY
Environment Variables
bash
# Set Uncover configuration via environment variables
export SHODAN_API_KEY=YOUR_SHODAN_API_KEY
export CENSYS_API_ID=YOUR_CENSYS_ID
export CENSYS_API_SECRET=YOUR_CENSYS_SECRET
export FOFA_EMAIL=YOUR_FOFA_EMAIL
export FOFA_KEY=YOUR_FOFA_KEY
export ZOOMEYE_API_KEY=YOUR_ZOOMEYE_API_KEY
export HUNTER_API_KEY=YOUR_HUNTER_API_KEY
export NETLAS_API_KEY=YOUR_NETLAS_API_KEY
export QUAKE_API_KEY=YOUR_QUAKE_API_KEY
export CRIMINALIP_API_KEY=YOUR_CRIMINALIP_API_KEY
Reference
Command Line Options
Flag | Description |
---|---|
-q, -query | Query to search |
-qf, -query-file | File containing queries to search |
-e, -engine | Search engine(s) to use |
-o, -output | File to write output to |
-json | Write output in JSON format |
-silent | Show only results in output |
-v, -verbose | Show verbose output |
-debug | Show debug information |
-f, -field | Fields to display in output |
-limit | Maximum number of results per provider |
-timeout | Timeout for provider requests in seconds |
-asq | Use ASN query syntax |
-list-engines | List available search engines |
-list-keys | List configured API keys |
-shodan-key | Shodan API key |
-censys-id | Censys API ID |
-censys-secret | Censys API secret |
-fofa-email | Fofa email |
-fofa-key | Fofa API key |
-zoomeye-key | ZoomEye API key |
-hunter-key | Hunter API key |
-netlas-key | Netlas API key |
-quake-key | Quake API key |
-criminalip-key | Criminalip API key |
-version | Show Uncover version |
Supported Providers
Provider | Description | API Key Required |
---|---|---|
shodan | Shodan search engine | Yes |
censys | Censys search engine | Yes |
fofa | Fofa search engine | Yes |
zoomeye | ZoomEye search engine | Yes |
hunter | Hunter search engine | Yes |
netlas | Netlas search engine | Yes |
quake | Quake search engine | Yes |
criminalip | Criminalip search engine | Yes |
Common Search Fields
Field | Description |
---|---|
ip | IP address |
port | Port number |
host | Hostname |
country | Country code |
city | City name |
org | Organization name |
isp | Internet service provider |
asn | Autonomous system number |
product | Product name |
version | Product version |
Resources
This cheat sheet provides a comprehensive reference for using Uncover, from basic searching to advanced filtering and integration with other tools. For the most up-to-date information, always refer to the official documentation.