Scope

Replace the placeholders with the actual authorized scope.

PlaceholderUse
<domain>Root domain or subdomain, such as example.com
<org>Organization name, such as "Example Corp"
<netblock>CIDR range, such as 198.51.100.0/24
<asn>Autonomous system, such as AS64496
<github-org>GitHub organization or user
<owner/repo>GitHub repository

Google Filters

FilterSyntaxMeaning
Exact text"text"Match an exact phrase.
Exclude-textRemove results containing a term.
Either termA OR BMatch either term or group.
Sitesite:<domain>Restrict results to a domain.
File typefiletype:<ext>Restrict results to an extension.
Before datebefore:YYYY-MM-DDRestrict by indexed/updated date.
After dateafter:YYYY-MM-DDRestrict by indexed/updated date.
Titleintitle:<text>Match text in the title.
URLinurl:<text>Match text in the URL.
Bodyintext:<text>Match text in page content.

No space goes between filter and value: site:example.com, not site: example.com.

Google Patterns

GoalQuery
Domain inventorysite:<domain> -site:www.<domain>
Portals and login surfacessite:<domain> (login OR portal OR dashboard OR vpn OR sso)
Public documentssite:<domain> (filetype:pdf OR filetype:docx OR filetype:xlsx OR filetype:pptx)
Backups, logs, and dumpssite:<domain> (filetype:conf OR filetype:log OR filetype:bak OR filetype:sql)
Directory listingssite:<domain> intitle:"index of"
Staging or test pagessite:<domain> (inurl:staging OR inurl:test OR inurl:dev)
Public shared documents(site:docs.google.com OR site:drive.google.com) <domain>
Cloud-hosted references(site:s3.amazonaws.com OR site:storage.googleapis.com OR site:azurewebsites.net) <domain>

Shodan Filters

Shodan uses filter:value. Quote values containing spaces.

FilterSyntaxMeaning
Hostnamehostname:<domain>Match hostnames.
TLS common namessl.cert.subject.cn:<domain>Match certificate subject CN.
TLS issuerssl.cert.issuer.cn:"<name>"Match certificate issuer CN.
Organizationorg:"<org>"Match network owner.
Netblocknet:<netblock>Match CIDR range.
ASNasn:<asn>Match autonomous system.
Portport:<number>Match exposed port.
Productproduct:"<name>"Match detected product.
Versionversion:<version>Match detected version.
OSos:<name>Match detected operating system.
HTTP titlehttp.title:"<text>"Match page title.
HTTP bodyhttp.html:"<text>"Match page body.
HTTP statushttp.status:<code>Match HTTP status.
Countrycountry:<code>Match country code.
Citycity:"<city>"Match city.
Vulnerabilityvuln:<CVE>Match CVE metadata.

Shodan Patterns

GoalQuery
Hostname inventoryhostname:<domain>
Certificate inventoryssl.cert.subject.cn:<domain>
Organization exposureorg:"<org>"
Netblock exposurenet:<netblock>
ASN exposureasn:<asn>
Single-port reviewnet:<netblock> port:443
Product revieworg:"<org>" product:"OpenSSH"
Version revieworg:"<org>" product:nginx version:1.18.0
Web login titleshostname:<domain> http.title:"login"
Directory listing titlesorg:"<org>" http.title:"index of"
CVE triagenet:<netblock> vuln:CVE-YYYY-NNNN

GitHub Filters

FilterSyntaxMeaning
Exact text"text"Match an exact string.
Both termsA AND BRequire both terms.
Either termA OR BMatch either term.
ExcludeNOT <term>Remove matching results.
Repositoryrepo:<owner/repo>Search one repository.
Organizationorg:<github-org>Search one organization.
Useruser:<name>Search one user.
Enterpriseenterprise:<name>Search one enterprise.
Languagelanguage:<name>Restrict by language.
Pathpath:<path>Match file path.
Contentcontent:<text>Match file content.
Symbolsymbol:<name>Match symbol definitions.
Propertyis:<property>Filter by repository/content property.
Regex/pattern/Match by regular expression.

repo:, org:, and user: require complete names.

GitHub Patterns

GoalQuery
Repository inventoryorg:<github-org> NOT is:fork NOT is:archived
Infrastructure pathsorg:<github-org> (path:/infra/ OR path:/terraform/ OR path:/kubernetes/)
GitHub Actionsorg:<github-org> path:/.github/workflows/
Container filesorg:<github-org> (path:Dockerfile OR path:docker-compose.yml)
Env and config filesorg:<github-org> (path:.env OR path:*.tfvars OR path:*.kubeconfig)
Private-key markersorg:<github-org> "BEGIN PRIVATE KEY" NOT path:README
Token keywordsorg:<github-org> ("api_key" OR "access_token" OR "client_secret") NOT path:tests
Cloud credential namesorg:<github-org> ("AWS_ACCESS_KEY_ID" OR "GOOGLE_APPLICATION_CREDENTIALS" OR "AZURE_CLIENT_SECRET")
Python debug flagsorg:<github-org> language:python ("debug=True" OR "DEBUG = True")
Go TLS bypassesorg:<github-org> language:go "InsecureSkipVerify"
Workflow secret usageorg:<github-org> path:/.github/workflows/ "secrets."
Regex private-key markerorg:<github-org> /-----BEGIN [A-Z ]+PRIVATE KEY-----/

Result Fields

FieldPurpose
QuerySearch string used.
SourceGoogle, Shodan, GitHub, or another index.
Result URLURL or Shodan/GitHub result link.
AssetDomain, host, repo, or netblock.
EvidenceMatched path, banner, filename, title, or string.
OwnerTeam, repo owner, or asset owner.
StatusNew, triaged, fixed, accepted, or false positive.

References