GitHub is one of the most popular code-sharing platforms used by developers worldwide. It provides a central repository for developers to store, collaborate on, and share their code with others. However, it is also a treasure trove of information that can be exploited by cybercriminals to carry out attacks or gain unauthorized access to sensitive information.

To help security researchers, ethical hackers, and other professionals identify potential security vulnerabilities or other issues with GitHub repositories, GitHub dorks have been created. GitHub dorks are search queries that can be used to find specific types of data, such as sensitive information, credentials, network devices, and other data on GitHub.

In this GitHub dork cheatsheet, we have compiled a comprehensive list of dorks that can be used to search for various types of data on GitHub. These dorks are grouped into categories to make it easier to find the specific dork that you need. Some of the categories covered in this cheatsheet include:

  • Sensitive information: This category includes dorks that can help you find files that may contain sensitive information, such as API keys, database passwords, and other configuration settings that should not be exposed publicly.
  • Credentials: This category includes dorks that are specifically designed to find various types of credentials, such as AWS access keys, Google Cloud Platform credentials, and database passwords used in WordPress installations.
  • Network devices: This category includes dorks that help you locate various types of network devices, such as VPN servers, remote access servers, network gateways, firewalls, and network switches.
  • Software configuration files: This category includes dorks that can help you find configuration files for various types of software tools, including Git, Docker, Terraform, and Jenkins, that may contain sensitive information or other details that could be useful for attackers.

By using these GitHub dorks, you can easily search for specific types of data on GitHub and identify potential security risks or other issues that may need to be addressed. It is important to use these dorks ethically and responsibly, and only for legitimate purposes. Using them for malicious purposes or unauthorized access can result in legal consequences.

Sensitive files and configurations

These dorks can help you find files that contain sensitive information, such as passwords, API keys, and configuration files. They can be used to identify potential security vulnerabilities in a codebase.

DorkDescription
filename:.envSearches for files containing sensitive environment variables
filename:credentialsSearches for files containing sensitive credentials
filename:configSearches for files containing sensitive configuration information
filename:databaseSearches for files containing database credentials or configurations
filename:wp-config.phpSearches for WordPress configuration files containing sensitive information

Publicly accessible AWS S3 buckets

These dorks can help you identify publicly accessible AWS S3 buckets. This is important because publicly accessible S3 buckets can expose sensitive data to the public.

DorkDescription
site:s3.amazonaws.comSearches for publicly accessible AWS S3 buckets
site:s3.amazonaws.com ext:jsonSearches for JSON files in publicly accessible AWS S3 buckets
site:s3.amazonaws.com ext:yamlSearches for YAML files in publicly accessible AWS S3 buckets

Exposed API keys

These dorks can help you find API keys that may have been accidentally exposed in code or configuration files. API keys can be used to gain unauthorized access to services, so it’s important to keep them secure.

DorkDescription
filename:api_keySearches for files containing API keys
filename:config.json api_keySearches for API keys in JSON configuration files
filename:config.json authSearches for authentication tokens in JSON configuration files

Again, it is important to use GitHub dorks ethically and only for legitimate purposes. Using them for malicious activities is not only unethical, but also illegal.

Exposure of sensitive information

These dorks can help you find plaintext passwords, SSH keys, and other sensitive information that may have been accidentally exposed in code or configuration files. This information can be used to gain unauthorized access to systems and should be kept secure.

DorkDescription
extension:sql passwordSearches for SQL files containing plaintext passwords
extension:txt sshSearches for plaintext SSH private keys
filename:.bash_historySearches for bash history files, which can reveal commands and sensitive information
filename:.gitconfigSearches for Git configuration files, which can contain sensitive information such as usernames and passwords

Source code leaks

These dorks can help you identify vulnerabilities in a codebase, such as WordPress configuration files, Apache htpasswd files, and IIS configuration files.

DorkDescription
filename:wp-config.phpSearches for WordPress configuration files containing sensitive information
filename:.htpasswdSearches for Apache htpasswd files containing passwords
filename:web.configSearches for IIS configuration files containing sensitive information

Vulnerable software

These dorks can help you find vulnerable software, such as Vim swap files, WordPress login pages, and backup files. These vulnerabilities can be exploited to gain unauthorized access to systems.

DorkDescription
extension:swpSearches for Vim swap files that can contain plaintext passwords and other sensitive information
filename:wp-login.phpSearches for WordPress login pages that can be vulnerable to brute-force attacks
filename:backupSearches for backup files that can contain sensitive information

Exposed secrets and tokens

These dorks can help you find authentication tokens and other secrets that may have been accidentally exposed in code or configuration files.

DorkDescription
filename:.npmrc _authSearches for NPM configuration files containing authentication tokens
filename:.bashrc passwordSearches for bash configuration files containing plaintext passwords
filename:.dockercfg authSearches for Docker configuration files containing authentication tokens
filename:prod.exs passwordSearches for Elixir configuration files containing plaintext passwords

Technology stack

These dorks can help you identify the technology stack used by a project and its dependencies, such as Python, Ruby, JavaScript, and Java. This information can be useful for security and auditing purposes.

DorkDescription
language:python filename:requirements.txtSearches for Python projects and their dependencies
language:ruby filename:GemfileSearches for Ruby projects and their dependencies
language:javascript filename:package.jsonSearches for JavaScript projects and their dependencies
language:java filename:build.gradleSearches for Java projects and their dependencies

Exposed database credentials

These dorks can help you find database credentials that may have been accidentally exposed in code or configuration files. This information can be used to gain unauthorized access to databases and should be kept secure.

DorkDescription
filename:.env DB_USERNAME NOT homesteadSearches for Laravel configuration files containing database usernames
filename:.env DB_PASSWORD NOT homesteadSearches for Laravel configuration files containing database passwords
filename:wp-config.php DB_PASSWORDSearches for WordPress configuration files containing database passwords

Exposed AWS credentials

These dorks can help you find AWS access and secret keys that may have been accidentally exposed in code or configuration files. AWS credentials can be used to gain unauthorized access to AWS services, so it’s important to keep them secure.

DorkDescription
filename:credentials aws_access_key_idSearches for AWS credentials files containing access keys
filename:credentials aws_secret_access_keySearches for AWS credentials files containing secret keys

Exposed private repositories

These dorks can help you find private repositories that may have been accidentally made public. This information can be useful for security and auditing purposes.

DorkDescription
filename:.npmrc _authSearches for NPM configuration files containing authentication tokens
filename:.pypirc passwordSearches for Python configuration files containing plaintext passwords
filename:.npmrc _authSearches for NPM configuration files containing authentication tokens
filename:.dockercfg authSearches for Docker configuration files containing authentication tokens

Exposed Git metadata

These dorks can help you find Git metadata files that may have been accidentally exposed in code or configuration files. Git metadata can contain sensitive information, such as commit messages and file paths.

DorkDescription
filename:.gitconfig passwordSearches for Git configuration files containing plaintext passwords
filename:.git-credentialsSearches for Git credentials files
filename:.git/FETCH_HEADSearches for Git fetch logs

Exposed web servers

These dorks can help you find web servers that may be publicly accessible. This information can be used to identify potential security vulnerabilities and to assess the security posture of a system.

DorkDescription
http.status:200 "Server: Microsoft-IIS"Searches for Microsoft IIS web servers
http.status:200 "Server: Apache"Searches for Apache web servers
http.status:200 "Server: nginx"Searches for Nginx web servers

Exposed FTP servers

These dorks can help you find FTP servers that may be publicly accessible. FTP servers can be used to transfer files between systems, so it’s important to keep them secure.

DorkDescription
ftpSearches for FTP servers

Network devices

These dorks help locate various types of network devices, such as VPN servers, remote access servers, network gateways, firewalls, and network switches.

DorkDescription
hostname:vpnSearches for VPN servers
hostname:remoteSearches for remote access servers
hostname:gatewaySearches for network gateway devices
hostname:firewallSearches for firewall devices
hostname:switchSearches for network switches

Miscellaneous

These dorks help find configuration files for various types of software tools, including Git, Docker, Terraform, and Jenkins, that may contain sensitive information or other details that could be useful for attackers.

DorkDescription
filename:.gitconfigSearches for Git configuration files
filename:.dockerconfigjsonSearches for Docker configuration files
filename:.terraformrcSearches for Terraform configuration files
filename:jenkinsfileSearches for Jenkins pipeline files

Finding API

API keys

DorkDescription
filename:.npmrc _authSearches for NPM configuration files containing authentication tokens
filename:.pypirc passwordSearches for Python configuration files containing plaintext passwords
filename:.dockercfg authSearches for Docker configuration files containing authentication tokens
filename:.gem/credentialsSearches for Ruby Gem configuration files containing authentication tokens
filename:wp-config.php WP_SECRET_KEYSearches for WordPress configuration files containing secret keys
filename:.env MAILCHIMP_API_KEYSearches for Laravel configuration files containing Mailchimp API keys
filename:.env S3_BUCKETSearches for Laravel configuration files containing Amazon S3 bucket names

API endpoints

DorkDescription
filename:swagger.ymlSearches for Swagger API documentation files
filename:openapi.ymlSearches for OpenAPI API documentation files
filename:api_keySearches for API keys in files
filename:api_secretSearches for API secrets in files

These dorks can help you find potential vulnerabilities in API keys and endpoints, and can be used to improve the security of your system. Again, it’s important to use GitHub dorks responsibly and only for legitimate purposes.

Tools

Programming languages

DorkDescription
language:pythonSearches for repositories written in Python
language:javascriptSearches for repositories written in JavaScript
language:rubySearches for repositories written in Ruby
language:javaSearches for repositories written in Java

Frameworks

DorkDescription
framework:laravelSearches for Laravel projects
framework:ruby-on-railsSearches for Ruby on Rails projects
framework:vueSearches for Vue.js projects
framework:reactSearches for React projects

Operating systems

DorkDescription
os:windowsSearches for repositories related to Windows
os:macSearches for repositories related to macOS
os:linuxSearches for repositories related to Linux

Package managers

DorkDescription
filename:package.jsonSearches for NPM projects
filename:GemfileSearches for Ruby Gem projects
filename:requirements.txtSearches for Python package requirements

These dorks can help you find tools and software written in various programming languages, using different frameworks, and running on different operating systems. This can be useful for discovering new projects, exploring existing ones, or searching for solutions to specific problems.

AWS/S3 recon

DorkDescription
site:s3.amazonaws.com filetype:sqlSearches for SQL files in S3 buckets
site:s3.amazonaws.com filetype:jsonSearches for JSON files in S3 buckets
site:s3.amazonaws.com filetype:xmlSearches for XML files in S3 buckets
site:s3.amazonaws.com ext:cfgSearches for configuration files in S3 buckets
site:s3.amazonaws.com ext:logSearches for log files in S3 buckets
site:s3.amazonaws.com inurl:server-statusSearches for S3 buckets with server status pages
site:s3.amazonaws.com inurl:policySearches for S3 buckets with access policies
site:s3.amazonaws.com inurl:bucketSearches for S3 buckets with “bucket” in their URL
site:s3.amazonaws.com intext:"AccessKeyId"Searches for S3 buckets with AWS access keys

These dorks can help you find public S3 buckets or related information that may be exposed on GitHub. Please note that accessing and modifying resources on other people’s S3 buckets without their consent is a violation of AWS’s terms of service and could result in legal action.

FAQ

1. What are GitHub dorks?

GitHub dorks are search queries that can be used to find specific types of data on GitHub. These dorks can help security researchers, ethical hackers, and other professionals identify potential security vulnerabilities or other issues with GitHub repositories.

2. How can GitHub dorks be used?

GitHub dorks can be used to search for specific types of data on GitHub, such as sensitive information, credentials, network devices, and software configuration files. By using these dorks, you can quickly identify potential security risks or other issues that may need to be addressed.

3. Are GitHub dorks legal to use?

Yes, GitHub dorks are legal to use. However, it is important to use them ethically and responsibly, and only for legitimate purposes. Using them for malicious purposes or unauthorized access can result in legal consequences.

4. Can GitHub dorks be used for any code-sharing platform other than GitHub?

No, GitHub dorks are specifically designed to search for data on GitHub. However, similar dorks may exist for other code-sharing platforms.

5. Can GitHub dorks be used to find any type of data?

GitHub dorks can be used to find a variety of data, including sensitive information, credentials, network devices, and software configuration files. However, not all data may be accessible through GitHub dorks, and some repositories may have security measures in place to prevent data from being exposed.

Shares:

Leave a Reply

Your email address will not be published. Required fields are marked *