Skip to content
KitploitKITPLOIT
ToolsBlog
Einreichen
ToolsBlog
Einreichen

Hacking-, PenTest- und Cybersicherheits-Tools für Ihr Sicherheitsarsenal!

Kitploit ist ein Verzeichnis von Hacking-, Cybersicherheits- und Pentesting-Tools. Entdecken Sie die neuesten Projekt-Updates, um Schwachstellen zu finden, Systeme zu analysieren, Tests zu automatisieren und Ihre Sicherheit zu stärken.

··Feeds·Kontakt·Datenschutz·© 2026 Kitploit

Tool-Verzeichnis

Kategorien

Alle Kategorien anzeigen
Loading categories
rusty-hog — Mehrquellen-Geheimnis-Scanner, der API-Schlüssel, Passwörter und personenbezogene Daten (PII) über Git-Repos, S3-Buckets, Dateisysteme, Confluence, JIRA, Slack und Google Docs hinweg mittels Regex und Entropieanalyse erkennt. | Kitploit
Tools/GitHubGitHub/newrelic/rusty-hog
Code-AnalyseCloud-SicherheitDevSecOpsSecret-Erkennung
GitHubnewrelic/rusty-hog

rusty-hog

Mehrquellen-Geheimnis-Scanner, der API-Schlüssel, Passwörter und personenbezogene Daten (PII) über Git-Repos, S3-Buckets, Dateisysteme, Confluence, JIRA, Slack und Google Docs hinweg mittels Regex und Entropieanalyse erkennt.

Repository anzeigen
55563vor 16 TagenVon Kitploit geprüft

Beliebteste

Alle anzeigen →

Entdecken Sie die meistgenutzten Tools unserer Community.

Alle Tools erkunden

Durchsuchen Sie unsere Tool-Sammlung

Alle Tools anzeigen →
Teilen

Rusty Hog ist ein Geheimnis-Scanner, der in Rust für Leistung entwickelt wurde und auf TruffleHog basiert, das in Python geschrieben ist. Rusty Hog bietet die folgenden Binärdateien an:

  • Ankamali Hog: Scannt nach Geheimnissen in einem Google-Dokument.
  • Berkshire Hog: Scannt nach Geheimnissen in einem S3-Bucket.
  • Choctaw Hog: Scannt nach Geheimnissen in einem Git-Repository.
  • Duroc Hog: Scannt nach Geheimnissen in einem Verzeichnis, einer Datei und einem Archiv.
  • Essex Hog: Scannt nach Geheimnissen in einer Confluence-Wiki-Seite.
  • Gottingen Hog: Scannt nach Geheimnissen in einem JIRA-Ticket.
  • Slack Hog: Scannt nach Geheimnissen in einem Slack-Kanal.

Table of contents

  • Verwendung
    • Wie man mit heruntergeladenen Binärdateien installiert
    • Wie man mit DockerHub ausführt
    • Wie man baut
    • Wie man unter Windows baut
    • Anakamali Hog (GDoc Scanner) Verwendung
    • Berkshire Hog (S3 Scanner - CLI) Verwendung
    • Berkshire Hog (S3 Scanner - Lambda) Verwendung
    • Choctaw Hog (Git Scanner) Verwendung
    • Duroc Hog (Dateisystem-Scanner) Verwendung
    • Essex Hog (Confluence-Scanner) Verwendung
    • Gottingen Hog (JIRA-Scanner) Verwendung
    • Hante Hog (SLACK-Scanner) Verwendung
    • Regex JSON-Dateiformat
    • Allowlist JSON-Dateiformat
  • Projektinformationen
    • Open-Source-Lizenz
    • Support
    • Community
    • Probleme / Verbesserungsanfragen
    • Mitwirken
    • Funktions-Roadmap
    • Was bedeutet der Name?

Usage

Dieses Projekt bietet eine Reihe von Scannern, die reguläre Ausdrücke verwenden, um das Vorhandensein sensibler Informationen wie API-Schlüssel, Passwörter und persönliche Daten zu erkennen. Es enthält standardmäßig eine Reihe regulärer Ausdrücke, akzeptiert aber auch ein JSON-Objekt mit Ihren benutzerdefinierten regulären Ausdrücken.

How to install using downloaded binaries

Laden Sie das neueste ZIP auf dem Releases-Tab herunter und entpacken Sie es. Führen Sie dann jede Binärdatei mit -h aus, um die Verwendung zu sehen.```shell script wget https://github.com/newrelic/rusty-hog/releases/download/v1.0.11/rustyhogs-darwin-choctaw_hog-1.0.11.zip unzip rustyhogs-darwin-choctaw_hog-1.0.11.zip darwin_releases/choctaw_hog -h

root@kitploit:~
## So führen Sie es mit DockerHub aus
Rusty Hog Docker-Images finden Sie auf der persönlichen DockerHub-Seite des Autors [hier](https://hub.docker.com/u/wetfeet2000)
Für jeden Hog und für jedes Release wird ein Docker-Image erstellt. Um beispielsweise choctaw_hog zu verwenden, führen Sie die folgenden Befehle aus:```shell script
docker pull wetfeet2000/choctaw_hog:1.0.10
docker run -it --rm wetfeet2000/choctaw_hog:1.0.10 --help

So bauen Sie es

  • Stellen Sie sicher, dass Rust installiert und im Pfad vorhanden ist.
  • Klonen Sie dieses Repository und führen Sie dann cargo build --release aus. Die Binärdateien befinden sich in target/release.
  • Um HTML-Dokumente zu erstellen und anzuzeigen, führen Sie cargo doc --no-deps --open aus.
  • Um Komponententests auszuführen, führen Sie cargo test aus.
  • Um Berkshire Hog für die AWS Lambda-Umgebung cross-zu-kompilieren, führen Sie die folgenden Befehle aus und laden Sie berkshire_lambda.zip in Ihr AWS Lambda-Dashboard hoch:```shell script docker run --rm -it -v "$(pwd)":/home/rust/src ekidd/rust-musl-builder cargo build --release cp target/x86_64-unknown-linux-musl/release/berkshire_hog bootstrap zip -j berkshire_lambda.zip bootstrap
root@kitploit:~
## Wie man unter Windows baut
Sie müssen statische OpenSSL-Binärdateien kompilieren und Rust/Cargo mitteilen, wo sie zu finden sind:```
mkdir \Tools
cd \Tools
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg.exe install openssl:x64-windows-static

$env:OPENSSL_DIR = 'C:\Tools\vcpkg\installed\x64-windows-static'
$env:OPENSSL_STATIC = 'Yes'
[System.Environment]::SetEnvironmentVariable('OPENSSL_DIR', $env:OPENSSL_DIR, [System.EnvironmentVariableTarget]::User)
[System.Environment]::SetEnvironmentVariable('OPENSSL_STATIC', $env:OPENSSL_STATIC, [System.EnvironmentVariableTarget]::User)

Sie können nun den oben aufgeführten Haupt-Build-Anweisungen folgen.

So erstellen Sie Berkshire Hog für Lambda

macOS

Verwenden Sie Homebrew, um die Abhängigkeiten zu erhalten:``` brew install rpm2cpio FiloSottile/musl-cross/musl-cross

root@kitploit:~
Dann führen Sie `./build_lambda_macos.sh` aus.

Das Build-Skript wird gegen OpenSSL 3.0.12 bauen. Verwenden Sie `export OPENSSL_BUILD_VER=3.0.12` zum Überschreiben.

Das Build-Skript wird gegen Amazon Linux-Kernel-Header bauen, die von deren RPM bereitgestellt werden; `export AMAZON_KERNEL_HEADERS_RPM_URL=...` zum Überschreiben, woher das RPM heruntergeladen wird. (Es spricht nichts dagegen, ein RPM mit linux-headers einer anderen Distribution zu verwenden, wir brauchen nur die linux-headers, um openssl für Linux zu bauen)

Das Build-Skript wird ein build-deps-Verzeichnis in Ihrem aktuellen Quellverzeichnis erstellen. Sie können dieses Verzeichnis sicher mit `rm -rf` löschen, aber es wird beim nächsten Ausführen des Build-Skripts neu erstellt. Es wird auch verschiedene Konsistenzprüfungen durchführen, um sicherzustellen, dass der Build funktionieren sollte, und falls diese fehlschlagen, wird es Sie möglicherweise auffordern, dieses Verzeichnis dennoch mit `rm -rf` zu löschen, um es erneut zu versuchen.

### Linux

Stellen Sie sicher, dass `cross` installiert ist (`cargo install cross`), führen Sie dann einfach `./build_lambda.sh` aus.

# Befehle

## Anakamali Hog (GDoc Scanner) Verwendung```
USAGE:
    ankamali_hog [FLAGS] [OPTIONS] <GDRIVEID>

FLAGS:
        --caseinsensitive    Sets the case insensitive flag for all regexes
        --entropy            Enables entropy scanning
        --oauthsecret        Path to an OAuth secret file (JSON) ./clientsecret.json by default
        --oauthtoken         Path to an OAuth token storage file ./temp_token by default
        --prettyprint        Outputs the JSON in human readable format
    -v, --verbose            Sets the level of debugging information
    -h, --help               Prints help information
    -V, --version            Prints version information

OPTIONS:
    -a, --allowlist <ALLOWLIST>                                    Sets a custom allowlist JSON file
        --default_entropy_threshold <DEFAULT_ENTROPY_THRESHOLD>    Default entropy threshold (0.6 by default)
    -o, --outputfile <OUTPUT>                                      Sets the path to write the scanner results to (stdout by default)

        --regex <REGEX>                                            Sets a custom regex JSON file

ARGS:
    <GDRIVEID>    The ID of the Google drive file you want to scan

Berkshire Hog (S3 Scanner - CLI) Verwendung```

USAGE: berkshire_hog [FLAGS] [OPTIONS]

FLAGS: --caseinsensitive Sets the case insensitive flag for all regexes --entropy Enables entropy scanning --prettyprint Outputs the JSON in human readable format -r, --recursive Recursively scans files under the prefix -v, --verbose Sets the level of debugging information -h, --help Prints help information -V, --version Prints version information

OPTIONS: -a, --allowlist Sets a custom allowlist JSON file --default_entropy_threshold <DEFAULT_ENTROPY_THRESHOLD> Default entropy threshold (0.6 by default) -o, --outputfile Sets the path to write the scanner results to (stdout by default)

root@kitploit:~
    --profile <PROFILE>                                        When using a configuration file, enables a non-default profile

    --regex <REGEX>                                            Sets a custom regex JSON file

ARGS: The location of a S3 bucket and optional prefix or filename to scan. This must be written in the form s3://mybucket[/prefix_or_file] Sets the region of the S3 bucket to scan

root@kitploit:~
## Berkshire Hog (S3 Scanner - Lambda) Verwendung
Berkshire Hog ist derzeit dafür ausgelegt, als Lambda-Funktion verwendet zu werden. Dies ist der grundlegende Datenfluss:
<pre>
    ┌───────────┐              ┌───────┐     ┌────────────────┐     ┌────────────┐
    │ S3 bucket │ ┌────────┐   │       │     │ Berkshire Hog  │     │ S3 bucket  │
    │  (input) ─┼─┤S3 event├──▶│  SQS  │────▶│    (Lambda)    │────▶│  (output)  │
    │           │ └────────┘   │       │     │                │     │            │
    └───────────┘              └───────┘     └────────────────┘     └────────────┘
</pre>

Um Berkshire Hog auf diese Weise auszuführen, richten Sie Folgendes ein:
1) Konfigurieren Sie den Eingabe-Bucket so, dass er für jedes PUSH/PUT-Ereignis ein "Event" an SQS sendet.
2) Richten Sie das SQS-Thema so ein, dass es Ereignisse von S3 akzeptiert, einschließlich IAM-Berechtigungen.
3) Führen Sie Berkshire Hog mit IAM-Zugriff auf SQS und S3 aus.

## Choctaw Hog (Git Scanner) Verwendung```
USAGE:
    choctaw_hog [FLAGS] [OPTIONS] <GITPATH>

FLAGS:
        --caseinsensitive    Sets the case insensitive flag for all regexes
        --entropy            Enables entropy scanning
        --prettyprint        Outputs the JSON in human readable format
    -v, --verbose            Sets the level of debugging information
    -h, --help               Prints help information
    -V, --version            Prints version information

OPTIONS:
        --default_entropy_threshold <DEFAULT_ENTROPY_THRESHOLD>    Default entropy threshold (4.5 by default)
        --httpspass <HTTPSPASS>                                    Takes a password for HTTPS-based authentication
        --httpsuser <HTTPSUSER>                                    Takes a username for HTTPS-based authentication
    -o, --outputfile <OUTPUT>                                      Sets the path to write the scanner results to (stdout by default)
        --recent_days <RECENTDAYS>                                 Filters commits to the last number of days (branch agnostic)
    -r, --regex <REGEX>                                            Sets a custom regex JSON file
        --since_commit <SINCECOMMIT>                               Filters commits based on date committed (branch agnostic)
        --sshkeypath <SSHKEYPATH>                                  Takes a path to a private SSH key for git authentication, defaults to ssh-agent
        --sshkeyphrase <SSHKEYPHRASE>                              Takes a passphrase to a private SSH key for git authentication, defaults to none
        --until_commit <UNTILCOMMIT>                               Filters commits based on date committed (branch agnostic)
    -a, --allowlist <ALLOWLIST>                                    Sets a custom ALLOWLIST JSON file

ARGS:
    <GITPATH>    Sets the path (or URL) of the Git repo to scan. SSH links must include username (git@)

Duroc Hog (Dateisystem-Scanner) Verwendung```

USAGE: duroc_hog [FLAGS] [OPTIONS]

FLAGS: --caseinsensitive Sets the case insensitive flag for all regexes --entropy Enables entropy scanning --norecursive Disable recursive scanning of all subdirectories underneath the supplied path --prettyprint Outputs the JSON in human readable format -z, --unzip Recursively scans archives (ZIP and TAR) in memory (dangerous) -v, --verbose Sets the level of debugging information -h, --help Prints help information -V, --version Prints version information

OPTIONS: -a, --allowlist Sets a custom allowlist JSON file --default_entropy_threshold <DEFAULT_ENTROPY_THRESHOLD> Default entropy threshold (0.6 by default) -o, --outputfile Sets the path to write the scanner results to (stdout by default) -r, --regex Sets a custom regex JSON file

ARGS: Sets the path of the directory or file to scan.

root@kitploit:~
## Essex Hog (Confluence scanner) Verwendung```
USAGE:
    essex_hog [FLAGS] [OPTIONS] <PAGEID> <URL>

FLAGS:
        --caseinsensitive    Sets the case insensitive flag for all regexes
        --entropy            Enables entropy scanning
        --prettyprint        Outputs the JSON in human readable format
    -v, --verbose            Sets the level of debugging information
    -h, --help               Prints help information
    -V, --version            Prints version information

OPTIONS:
    -a, --allowlist <ALLOWLIST>                                    Sets a custom allowlist JSON file
        --authtoken <BEARERTOKEN>                                  Confluence basic auth bearer token (instead of user & pass)

        --default_entropy_threshold <DEFAULT_ENTROPY_THRESHOLD>    Default entropy threshold (0.6 by default)
    -o, --outputfile <OUTPUT>                                      Sets the path to write the scanner results to (stdout by default)
        --password <PASSWORD>                                      Confluence password (crafts basic auth header)
        --regex <REGEX>                                            Sets a custom regex JSON file
        --username <USERNAME>                                      Confluence username (crafts basic auth header)

ARGS:
    <PAGEID>    The ID (e.g. 1234) of the confluence page you want to scan
    <URL>       Base URL of Confluence instance (e.g. https://newrelic.atlassian.net/)

Gottingen Hog (JIRA-Scanner) Verwendung```

Jira secret scanner in Rust.

USAGE: gottingen_hog [FLAGS] [OPTIONS]

FLAGS: --caseinsensitive Sets the case insensitive flag for all regexes --entropy Enables entropy scanning --prettyprint Outputs the JSON in human readable format -v, --verbose Sets the level of debugging information -h, --help Prints help information -V, --version Prints version information

OPTIONS: -a, --allowlist Sets a custom allowlist JSON file --authtoken Jira basic auth bearer token (instead of user & pass) --default_entropy_threshold <DEFAULT_ENTROPY_THRESHOLD> Default entropy threshold (0.6 by default) --url Base URL of JIRA instance (e.g. https://jira.atlassian.net/) -o, --outputfile Sets the path to write the scanner results to (stdout by default) --password Jira password (crafts basic auth header) --regex Sets a custom regex JSON file --username Jira username (crafts basic auth header)

ARGS: The ID (e.g. PROJECT-123) of the Jira issue you want to scan

root@kitploit:~
## Hante Hog (SLACK scanner) Verwendung```
Slack secret scanner in Rust.

USAGE:
    hante_hog [FLAGS] [OPTIONS] --authtoken <BEARERTOKEN> --channelid <CHANNELID> --url <SLACKURL>

FLAGS:
        --caseinsensitive    Sets the case insensitive flag for all regexes
        --entropy            Enables entropy scanning
        --prettyprint        Outputs the JSON in human readable format
    -v, --verbose            Sets the level of debugging information
    -h, --help               Prints help information
    -V, --version            Prints version information

OPTIONS:
    -a, --allowlist <ALLOWLIST>                                    Sets a custom allowlist JSON file
        --authtoken <BEARERTOKEN>                                  Slack basic auth bearer token
        --channelid <CHANNELID>
            The ID (e.g. C12345) of the Slack channel you want to scan

        --default_entropy_threshold <DEFAULT_ENTROPY_THRESHOLD>    Default entropy threshold (0.6 by default)
        --latest <LATEST>                                          End of time range of messages to include in search
        --oldest <OLDEST>                                          Start of time range of messages to include in search
    -o, --outputfile <OUTPUT>
            Sets the path to write the scanner results to (stdout by default)

        --regex <REGEX>                                            Sets a custom regex JSON file
        --url <SLACKURL>
            Base URL of Slack Workspace (e.g. https://[WORKSPACE NAME].slack.com)

Regex-JSON-Dateiformat

Die Regex-Option bei Scannern ermöglicht es Benutzern, einen Pfad zu ihrer eigenen JSON-Datei mit regulären Ausdrücken anzugeben, die vertrauliches Material erkennen. Jede bereitgestellte Datei ersetzt derzeit die von SecretScanner bereitgestellten Standard-Regulärausdrücke und wird nicht an diese angehängt. Das erwartete Format der Datei ist ein einzelnes JSON-Objekt.

Die Schlüssel sollten Namen für den Typ des Geheimnisses sein, den jeder Regex-Eintrag erkennt, da die Schlüssel für die vom Scanner ausgegebenen Reason-Eigenschaften verwendet werden.

Jeder Wert sollte eine Zeichenfolge sein, die einen gültigen [https://docs.rs/regex/1.3.9/regex/#syntax](regulären Ausdruck für Rust) enthält und den durch den entsprechenden Schlüssel beschriebenen Geheimnistyp abgleicht.

Ab Version 1.0.8 unterstützt die Rusty Hog-Engine auch Objekte als Werte für jedes Geheimnis. Das Objekt kann alle folgenden enthalten:

  • eine pattern-Eigenschaft mit dem passenden Regex-Ausdruck (obligatorisch)
  • eine entropy_filter-Eigenschaft mit einem booleschen Wert, um Entropie-Scannen für diese Information zu aktivieren (obligatorisch)
  • eine threshold-Eigenschaft, um die Entropietoleranz auf einer Skala von 0-1 anzupassen (optional, passt sich an das alte 1-8-Format an, Standard 0,6)
  • eine keyspace-Eigenschaft, die angibt, wie viele mögliche Werte der Schlüssel hat, z.B. 16 für hex, 64 für base64, 128 für ASCII (optional, Standard 128)
  • eine make_ascii_lowercase-Eigenschaft, die angibt, ob Rust .make_ascii_lowercase() auf dem Schlüssel ausführen soll, bevor die Entropie berechnet wird (optional, Standard false)

Je höher der Schwellenwert, desto mehr Entropie ist im Geheimnis erforderlich, um es als Treffer zu betrachten.

Ein Beispiel für dieses Format finden Sie hier:```json { "Generic Secret": { "pattern": "(?i)secret[\s[[:punct:]]]{1,4}[0-9a-zA-Z-]{16,64}[\s[[:punct:]]]?", "entropy_filter": true, "threshold": "0.6" }, "Slack Token": { "pattern": "(xox[p|b|o|a]-[0-9]{12}-[0-9]{12}-[0-9]{12}-[a-z0-9]{32})", "entropy_filter": true, "threshold": "0.6", "keyspace": "36", "make_ascii_lowercase": true }, "Google API Key": { "pattern": "AIza[0-9A-Za-z\-]{35}", "entropy_filter": true }, "PGP private key block": "-----BEGIN PGP PRIVATE KEY BLOCK-----" }

root@kitploit:~
Ab Version 1.0.11 lautet das derzeit verwendete Standard-Regex-JSON wie folgt:```json
{
	"Slack Token": "(xox[p|b|o|a]-[0-9]{12}-[0-9]{12}-[0-9]{12}-[a-z0-9]{32})",
	"RSA private key": "-----BEGIN RSA PRIVATE KEY-----",
	"SSH (DSA) private key": "-----BEGIN DSA PRIVATE KEY-----",
	"SSH (EC) private key": "-----BEGIN EC PRIVATE KEY-----",
	"PGP private key block": "-----BEGIN PGP PRIVATE KEY BLOCK-----",
	"Amazon AWS Access Key ID": "AKIA[0-9A-Z]{16}",
	"Amazon MWS Auth Token": "amzn\\.mws\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",
	"Facebook Access Token": "EAACEdEose0cBA[0-9A-Za-z]+",
	"Facebook OAuth": "(?i)facebook[\\s[[:punct:]]]{1,4}[0-9a-f]{32}[\\s[[:punct:]]]?",
	"GitHub": "(?i)(github|access[[:punct:]]token)[\\s[[:punct:]]]{1,4}[0-9a-zA-Z]{35,40}",
	"Generic API Key": {
		"pattern": "(?i)(api|access)[\\s[[:punct:]]]?key[\\s[[:punct:]]]{1,4}[0-9a-zA-Z\\-_]{16,64}[\\s[[:punct:]]]?",
		"entropy_filter": true,
		"threshold": "0.6",
		"keyspace": "guess"
	},
	"Generic Account API Key": {
		"pattern": "(?i)account[\\s[[:punct:]]]?api[\\s[[:punct:]]]{1,4}[0-9a-zA-Z\\-_]{16,64}[\\s[[:punct:]]]?",
		"entropy_filter": true,
		"threshold": "0.6",
		"keyspace": "guess"
	},
	"Generic Secret": {
		"pattern": "(?i)secret[\\s[[:punct:]]]{1,4}[0-9a-zA-Z-_]{16,64}[\\s[[:punct:]]]?",
		"entropy_filter": true,
		"threshold": "0.6",
		"keyspace": "guess"
	},
	"Google API Key": "AIza[0-9A-Za-z\\-_]{35}",
	"Google Cloud Platform API Key": "AIza[0-9A-Za-z\\-_]{35}",
	"Google Cloud Platform OAuth": "(?i)[0-9]+-[0-9A-Za-z_]{32}\\.apps\\.googleusercontent\\.com",
	"Google Drive API Key": "AIza[0-9A-Za-z\\-_]{35}",
	"Google Drive OAuth": "(?i)[0-9]+-[0-9A-Za-z_]{32}\\.apps\\.googleusercontent\\.com",
	"Google (GCP) Service-account": "(?i)\"type\": \"service_account\"",
	"Google Gmail API Key": "AIza[0-9A-Za-z\\-_]{35}",
	"Google Gmail OAuth": "(?i)[0-9]+-[0-9A-Za-z_]{32}\\.apps\\.googleusercontent\\.com",
	"Google OAuth Access Token": "ya29\\.[0-9A-Za-z\\-_]+",
	"Google YouTube API Key": "AIza[0-9A-Za-z\\-_]{35}",
	"Google YouTube OAuth": "(?i)[0-9]+-[0-9A-Za-z_]{32}\\.apps\\.googleusercontent\\.com",
	"Heroku API Key": "[h|H][e|E][r|R][o|O][k|K][u|U][\\s[[:punct:]]]{1,4}[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}",
	"MailChimp API Key": "[0-9a-f]{32}-us[0-9]{1,2}",
	"Mailgun API Key": "(?i)key-[0-9a-zA-Z]{32}",
	"Credentials in absolute URL": "(?i)((https?|ftp)://)(([a-z0-9$_\\.\\+!\\*'\\(\\),;\\?&=-]|%[0-9a-f]{2})+(:([a-z0-9$_\\.\\+!\\*'\\(\\),;\\?&=-]|%[0-9a-f]{2})+)@)((([a-z0-9]\\.|[a-z0-9][a-z0-9-]*[a-z0-9]\\.)*[a-z][a-z0-9-]*[a-z0-9]|((\\d|[1-9]\\d|1\\d{2}|2[0-4][0-9]|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d{2}|2[0-4][0-9]|25[0-5]))(:\\d+)?)(((/+([a-z0-9$_\\.\\+!\\*'\\(\\),;:@&=-]|%[0-9a-f]{2})*)*(\\?([a-z0-9$_\\.\\+!\\*'\\(\\),;:@&=-]|%[0-9a-f]{2})*)?)?)?",
	"PayPal Braintree Access Token": "(?i)access_token\\$production\\$[0-9a-z]{16}\\$[0-9a-f]{32}",
	"Picatic API Key": "(?i)sk_live_[0-9a-z]{32}",
	"Slack Webhook": "(?i)https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8}/[a-zA-Z0-9_]{24}",
	"Stripe API Key": "(?i)sk_live_[0-9a-zA-Z]{24}",
	"Stripe Restricted API Key": "(?i)rk_live_[0-9a-zA-Z]{24}",
	"Square Access Token": "(?i)sq0atp-[0-9A-Za-z\\-_]{22}",
	"Square OAuth Secret": "(?i)sq0csp-[0-9A-Za-z\\-_]{43}",
	"Twilio API Key": "SK[0-9a-fA-F]{32}",
	"Twitter Access Token": "(?i)twitter[\\s[[:punct:]]]{1,4}[1-9][0-9]+-[0-9a-zA-Z]{40}",
	"Twitter OAuth": "(?i)twitter[\\s[[:punct:]]]{1,4}['|\"]?[0-9a-zA-Z]{35,44}['|\"]?",
	"New Relic Partner & REST API Key": "[\\s[[:punct:]]][A-Fa-f0-9]{47}[\\s[[:punct:]][[:cntrl:]]]",
	"New Relic Mobile Application Token": "[\\s[[:punct:]]][A-Fa-f0-9]{42}[\\s[[:punct:]][[:cntrl:]]]",
	"New Relic Synthetics Private Location": "(?i)minion_private_location_key",
	"New Relic Insights Key (specific)": "(?i)insights[\\s[[:punct:]]]?(key|query|insert)[\\s[[:punct:]]]{1,4}\\b[\\w-]{32,40}\\b",
	"New Relic Insights Key (vague)": "(?i)(query|insert)[\\s[[:punct:]]]?key[\\s[[:punct:]]]{1,4}b[\\w-]{32,40}\\b",
	"New Relic License Key": "(?i)license[\\s[[:punct:]]]?key[\\s[[:punct:]]]{1,4}\\b[\\w-]{32,40}\\b",
	"New Relic Internal API Key": "(?i)nr-internal-api-key",
	"New Relic HTTP Auth Headers and API Key": "(?i)(x|newrelic|nr)-?(admin|partner|account|query|insert|api|license)-?(id|key)[\\s[[:punct:]]]{1,4}\\b[\\w-]{32,47}\\b",
	"New Relic API Key Service Key (new format)": "(?i)NRAK-[A-Z0-9]{27}",
	"New Relic APM License Key (new format)": "(?i)[a-f0-9]{36}NRAL",
	"New Relic APM License Key (new format, region-aware)": "(?i)[a-z]{2}[0-9]{2}xx[a-f0-9]{30}NRAL",
	"New Relic REST API Key (new format)": "(?i)NRRA-[a-f0-9]{42}",
	"New Relic Admin API Key (new format)": "(?i)NRAA-[a-f0-9]{27}",
	"New Relic Insights Insert Key (new format)": "(?i)NRII-[A-Za-z0-9-_]{32}",
	"New Relic Insights Query Key (new format)": "(?i)NRIQ-[A-Za-z0-9-_]{32}",
	"New Relic Synthetics Private Location Key (new format)": "(?i)NRSP-[a-z]{2}[0-9]{2}[a-f0-9]{31}",
	"Email address": "(?i)\\b(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*)@[a-z0-9][a-z0-9-]+\\.(com|de|cn|net|uk|org|info|nl|eu|ru)([\\W&&[^:/]]|\\A|\\z)",
	"New Relic Account IDs in URL": "(newrelic\\.com/)?accounts/\\d{1,10}/",
	"Account ID": "(?i)account[\\s[[:punct:]]]?id[\\s[[:punct:]]]{1,4}\\b[\\d]{1,10}\\b",
	"Salary Information": "(?i)(salary|commission|compensation|pay)([\\s[[:punct:]]](amount|target))?[\\s[[:punct:]]]{1,4}\\d+"
}

Allowlist JSON Dateiformat

Scanner bieten eine Allowlist-Funktion. Damit können Sie für jedes Muster eine Liste regulärer Ausdrücke angeben, die vom Scanner ignoriert werden. Sie haben jetzt auch die Möglichkeit, optional eine Liste regulärer Ausdrücke bereitzustellen, die gegen den Dateipfad ausgewertet werden.

Das Format für diese Allowlist-Datei sollte ein einzelnes JSON-Objekt sein. Jeder Schlüssel in der Allowlist sollte mit einem Schlüssel im Regex-JSON übereinstimmen, und der Wert kann einer von zwei Dingen sein:

  1. Ein Array von Zeichenfolgen, die Ausnahmen für dieses Regex-Muster darstellen. Zum Beispiel:
  2. Ein Objekt mit mindestens einem Schlüssel (patterns) und optional einem zweiten Schlüssel (paths).

Zusätzlich können Sie den Schlüssel <GLOBAL> angeben, der gegen alle Muster ausgewertet wird.

Im Folgenden ist die Standard-Allowlist, die in allen Scans enthalten ist:```json { "Email address": { "patterns": [ "(?i)@newrelic.com", "(?i)noreply@", "(?i)test@" ], "paths": [ "(?i)authors", "(?i)contributors", "(?i)license", "(?i)maintainers", "(?i)third_party_notices" ] }, "Credentials in absolute URL": { "patterns": [ "(?i)(https?://)?user:pass(word)?@" ] }, "New Relic API Key Service Key (new format)": { "patterns": [ "NRAK-123456789ABCDEFGHIJKLMNOPQR" ] }, "Generic API Key": { "patterns": [ "(?i)sanitizeAPIKeyForLogging" ] }, "New Relic License Key": { "patterns": [ "(?i)bootstrap_newrelic_admin_license_key", "(?i)xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "(?i)YOUR_NEW_RELIC_LICENSE_KEY__LICENSE", "(?i)YOUR_NEW_RELIC_APPLICATION_TOKEN" ] }, "Generic Secret": { "patterns": [ "(?i)secret:NewRelicLicenseKeySecret" ] }, "": [ "(?i)example", "(?i)fake", "(?i)replace", "(?i)deadbeef", "(?i)ABCDEFGHIJKLMNOPQRSTUVWX", "1234567890" ] }

root@kitploit:~
Beachten Sie, dass es sich hierbei um Zeichenfolgen handelt, nicht um Regex-Ausdrücke, und die Schlüssel für diese Zulassungsliste müssen ein Schlüssel in der Regex-JSON sein. Schlüssel unterscheiden zwischen Groß- und Kleinschreibung.

# Projektinformationen
## Open-Source-Lizenz

Dieses Projekt wird unter der [Apache 2 Lizenz](https://github.com/newrelic/rusty-hog/blob/HEAD/LICENSE) vertrieben.

## Unterstützung

New Relic hat dieses Projekt als Open Source bereitgestellt. Dieses Projekt wird WIE BESEHEN OHNE GEWÄHRLEISTUNG ODER UNTERSTÜTZUNG bereitgestellt, Sie können jedoch Probleme melden und zum Projekt hier auf GitHub beitragen.

_Bitte melden Sie Probleme mit dieser Software nicht an den New Relic Global Technical Support._

## Community

New Relic hostet und moderiert ein Online-Forum, in dem Kunden mit New Relic-Mitarbeitern und anderen Kunden interagieren können, um Hilfe zu erhalten und Best Practices auszutauschen. Wie alle offiziellen New Relic Open-Source-Projekte gibt es ein entsprechendes Community-Thema im New Relic Explorer's Hub. Sie finden das Thema/die Threads dieses Projekts hier:

https://discuss.newrelic.com/t/rusty-hog-multi-platform-secret-key-scanner/90117

## Probleme / Verbesserungsvorschläge

Reichen Sie Probleme und Verbesserungsvorschläge im [Reiter „Issues“ dieses Repositorys](https://raw.githubusercontent.com/newrelic/issues) ein. Bitte suchen Sie vor dem Einreichen eines neuen Issues nach und überprüfen Sie die bestehenden offenen Issues.

## Mitwirken

Beiträge sind willkommen (und wenn Sie einen Verbesserungsvorschlag einreichen, können Sie damit rechnen, eingeladen zu werden, ihn selbst beizusteuern). Bitte lesen Sie unseren [Leitfaden für Mitwirkende](https://github.com/newrelic/rusty-hog/blob/HEAD/CONTRIBUTING.md).

Beachten Sie, dass Sie bei der Einreichung Ihres Pull Requests die CLA über den Click-through mit CLA-Assistant unterzeichnen müssen. Wenn Sie unsere Unternehmens-CLA ausführen möchten oder Fragen haben, senden Sie uns bitte eine E-Mail an [email protected].

## Feature-Roadmap

- 1.1: Enterprise-Funktionen
    - [ ] Unterstützung von Konfigurationsdateien (anstelle von Befehlszeilenargumenten)
    - [ ] Unterstützung von Umgebungsvariablen anstelle von CLI-Argumenten
    - [ ] Multithreading
    - [ ] Bessere Kontexterkennung und Filterung von Fehlalarmen (GitHound, maschinelles Lernen)
    - [ ] Verwendung von Rusoto anstelle von s3-rust
    - [x] JIRA-Scanner hinzufügen
    - [x] Dateisystem- und Archiv-Scanner hinzufügen
    - [ ] Rust-Funktionen nutzen, um Kompilierungsabhängigkeiten zu reduzieren?

- 1.2: Integration in größere Skripte und Benutzeroberflächen
    - [ ] Unterstützung der GitHub-API für größere Organisationsverwaltung
        - [ ] Alle Repos für eine Liste von Benutzern scannen
        - [x] Alle Repos in einer Organisation scannen
    - [ ] Erstellen eines Webberichts oder einer Weboberfläche. Unterstützung der 'Save-State'-Erstellung über die Benutzeroberfläche.
    - [ ] Agent/Manager-Modell
    - [ ] Planungsprozess (blockiert durch Save-State-Unterstützung)

## Was bedeutet der Name?

TruffleHog gilt als De-facto-Standard / ursprünglicher Secret-Scanner. Ich habe eine Suite von Secret-Scanning-Tools für verschiedene Plattformen basierend auf TruffleHog entwickelt und benötigte ein Benennungsschema, also begann ich oben auf der Wikipedia-Liste der [Schweinerassen](https://en.wikipedia.org/wiki/List_of_pig_breeds). Daher ist jeder Tool-Name eine Schweinerasse, die mit 'A' beginnt und aufsteigt.
Tool herunterladen