Top Related Projects
Find, verify, and analyze leaked credentials
Protect and discover secrets using Gitleaks 🔑
Prevents you from committing secrets and credentials into git repositories
Find, verify, and analyze leaked credentials
Reconnaissance tool for GitHub organizations
Quick Overview
Clairvoyance is an open-source tool designed to detect and exploit blind SSRF (Server-Side Request Forgery) vulnerabilities. It automates the process of identifying potential SSRF issues in web applications and provides a framework for exploiting these vulnerabilities to access internal resources or services.
Pros
- Automates the detection and exploitation of blind SSRF vulnerabilities
- Supports various protocols and techniques for SSRF exploitation
- Customizable and extensible through user-defined modules
- Includes a built-in DNS rebinding attack implementation
Cons
- Requires careful use to avoid unintended consequences or legal issues
- May generate significant network traffic during scans
- Limited documentation and community support compared to more established tools
- Potential for false positives in complex web applications
Code Examples
# Initialize the Clairvoyance scanner
from clairvoyance import Clairvoyance
scanner = Clairvoyance(target_url="https://example.com/vulnerable-endpoint")
# Perform a basic SSRF scan
results = scanner.scan()
for vuln in results:
print(f"Potential SSRF found: {vuln}")
# Exploit a detected SSRF vulnerability
exploit_result = scanner.exploit(vulnerability=results[0], payload="http://internal-service.local")
print(f"Exploitation result: {exploit_result}")
Getting Started
To get started with Clairvoyance:
-
Install the tool:
git clone https://github.com/nikitastupin/clairvoyance.git cd clairvoyance pip install -r requirements.txt
-
Run a basic scan:
from clairvoyance import Clairvoyance scanner = Clairvoyance(target_url="https://example.com/endpoint") results = scanner.scan() for vuln in results: print(f"Potential SSRF: {vuln}")
-
Customize the scan by adding modules or modifying existing ones in the
modules
directory.
Competitor Comparisons
Find, verify, and analyze leaked credentials
Pros of Trufflehog
- More comprehensive scanning capabilities, including support for various version control systems and cloud providers
- Actively maintained with regular updates and a larger community
- Offers both CLI and API usage, providing flexibility for integration
Cons of Trufflehog
- More complex setup and configuration process
- Potentially slower scanning speed due to its extensive feature set
- Higher resource consumption, especially for large repositories or datasets
Code Comparison
Clairvoyance (Python):
def scan_file(file_path):
with open(file_path, 'r') as f:
content = f.read()
for regex in REGEX_LIST:
matches = re.findall(regex, content)
if matches:
print(f"Found match in {file_path}: {matches}")
Trufflehog (Go):
func ScanFile(filePath string) error {
content, err := ioutil.ReadFile(filePath)
if err != nil {
return err
}
for _, detector := range detectors.All {
results := detector.FromData(context.Background(), filePath, content)
for _, result := range results {
log.Printf("Found secret in %s: %s", filePath, result.Raw)
}
}
return nil
}
Both tools aim to detect secrets in code repositories, but Trufflehog offers a more comprehensive and flexible solution at the cost of increased complexity and resource usage. Clairvoyance provides a simpler, more focused approach that may be sufficient for smaller projects or specific use cases.
Protect and discover secrets using Gitleaks 🔑
Pros of Gitleaks
- More mature and widely adopted project with a larger community
- Supports multiple version control systems beyond Git
- Offers pre-commit hooks for preventing sensitive data from being committed
Cons of Gitleaks
- Slower scanning speed compared to Clairvoyance
- May produce more false positives due to its broader ruleset
- Requires more configuration for custom rules and scenarios
Code Comparison
Clairvoyance:
def scan_repo(repo_path, rules):
for file in repo_files(repo_path):
for line in file_lines(file):
for rule in rules:
if rule.match(line):
yield Finding(file, line, rule)
Gitleaks:
func scanRepo(repo *git.Repository, opts *Options) ([]Report, error) {
var results []Report
err := gitLeaks(repo, opts, func(leak LeakInfo) {
results = append(results, NewReport(leak))
})
return results, err
}
Both tools scan repositories for sensitive information, but Clairvoyance uses Python and focuses on simplicity, while Gitleaks is written in Go and offers more advanced features for enterprise use cases.
Prevents you from committing secrets and credentials into git repositories
Pros of git-secrets
- Specifically designed for AWS secrets, providing pre-configured patterns
- Integrates with Git hooks for automated scanning
- Supports custom regex patterns for flexibility
Cons of git-secrets
- Limited to Git repositories only
- Requires manual installation and setup on each developer's machine
- Less focus on cloud-based secret scanning
Code Comparison
git-secrets:
#!/usr/bin/env bash
git secrets --install
git secrets --register-aws
clairvoyance:
from clairvoyance import Clairvoyance
clairvoyance = Clairvoyance()
clairvoyance.scan_repository("path/to/repo")
Summary
git-secrets is a Git-focused tool that excels at preventing AWS secrets from being committed, while clairvoyance offers a more comprehensive approach to secret scanning across various cloud platforms. git-secrets integrates directly with Git workflows, making it easier to implement for teams already using Git. However, clairvoyance provides a more flexible and extensible solution for scanning repositories and cloud resources, making it suitable for a wider range of use cases beyond just Git repositories.
Find, verify, and analyze leaked credentials
Pros of Trufflehog
- More comprehensive scanning capabilities, including support for various version control systems and cloud providers
- Actively maintained with regular updates and a larger community
- Offers both CLI and API usage, providing flexibility for integration
Cons of Trufflehog
- More complex setup and configuration process
- Potentially slower scanning speed due to its extensive feature set
- Higher resource consumption, especially for large repositories or datasets
Code Comparison
Clairvoyance (Python):
def scan_file(file_path):
with open(file_path, 'r') as f:
content = f.read()
for regex in REGEX_LIST:
matches = re.findall(regex, content)
if matches:
print(f"Found match in {file_path}: {matches}")
Trufflehog (Go):
func ScanFile(filePath string) error {
content, err := ioutil.ReadFile(filePath)
if err != nil {
return err
}
for _, detector := range detectors.All {
results := detector.FromData(context.Background(), filePath, content)
for _, result := range results {
log.Printf("Found secret in %s: %s", filePath, result.Raw)
}
}
return nil
}
Both tools aim to detect secrets in code repositories, but Trufflehog offers a more comprehensive and flexible solution at the cost of increased complexity and resource usage. Clairvoyance provides a simpler, more focused approach that may be sufficient for smaller projects or specific use cases.
Reconnaissance tool for GitHub organizations
Pros of Gitrob
- More mature and established project with a larger user base
- Offers a web interface for easier visualization of results
- Supports scanning of entire GitHub organizations
Cons of Gitrob
- Written in Ruby, which may be less familiar to some users
- Last updated in 2019, potentially outdated
- Requires more setup and dependencies
Code Comparison
Clairvoyance (Python):
def scan_repo(repo_url):
repo = git.Repo.clone_from(repo_url, tempfile.mkdtemp())
for commit in repo.iter_commits():
for file in commit.stats.files:
scan_file(file)
Gitrob (Ruby):
def scan_repository(repository)
repository.branches.each do |branch|
branch.commits.each do |commit|
scan_commit(commit)
end
end
end
Both tools aim to scan Git repositories for sensitive information, but they differ in implementation and features. Clairvoyance is a newer, Python-based tool focused on simplicity and ease of use, while Gitrob is a more established Ruby project with additional features like organization scanning and a web interface. Clairvoyance may be easier to set up and use for Python developers, while Gitrob offers more comprehensive scanning capabilities for those comfortable with Ruby and its dependencies.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Clairvoyance
Obtain GraphQL API schema even if the introspection is disabled.
Introduction
Some GraphQL APIs have disabled introspection. For example, Apollo Server disables introspection automatically if the NODE_ENV
environment variable is set to production
.
Clairvoyance helps to obtain GraphQL API schema even if the introspection is disabled. It produces schema in JSON format suitable for other tools like GraphQL Voyager, InQL or graphql-path-enum.
Getting Started
pip
pip install clairvoyance
clairvoyance https://rickandmortyapi.com/graphql -o schema.json
# should take about 2 minutes
docker
docker run --rm nikitastupin/clairvoyance --help
Advanced Usage
Which wordlist should I use?
There are at least three approaches:
- Use one of the wordlists collected by Escape Technologies
- Use general English words (e.g. google-10000-english).
- Create target specific wordlist by extracting all valid GraphQL names from application HTTP traffic, from mobile application static files, etc. Regex for GraphQL name is
[_A-Za-z][_0-9A-Za-z]*
.
Environment variables
LOG_FMT=`%(asctime)s \t%(levelname)s\t| %(message)s` # A string format for logging.
LOG_DATEFMT=`%Y-%m-%d %H:%M:%S` # A string format for logging date.
LOG_LEVEL=`INFO` # A string level for logging.
Support
Due to time constraints @nikitastupin won't be able to answer all the issues for some time but he'll do his best to review & merge PRs
In case of questions or issues with Clairvoyance please refer to wiki or issues. If this doesn't solve your problem feel free to open a new issue.
Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change. For more information about tests, internal project structure and so on refer to our contributing guide.
Documentation
You may find more details on how the tool works in the second half of the GraphQL APIs from bug hunter's perspective by Nikita Stupin talk.
Contributors
Thanks to the contributors for their work.
Top Related Projects
Find, verify, and analyze leaked credentials
Protect and discover secrets using Gitleaks 🔑
Prevents you from committing secrets and credentials into git repositories
Find, verify, and analyze leaked credentials
Reconnaissance tool for GitHub organizations
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot