Skip to content
KitploitKITPLOIT
أدواتالمدونة
إرسال
أدواتالمدونة
إرسال

أدوات الاختراق واختبار الاختراق والأمن السيبراني لترسانتك الأمنية!

Kitploit هو دليل لأدوات الاختراق والأمن السيبراني واختبار الاختراق. اكتشف آخر تحديثات المشاريع للعثور على الثغرات وتحليل الأنظمة وأتمتة الاختبارات وتعزيز أمنك.

··الخلاصات·اتصال·الخصوصية·© 2026 Kitploit

دليل الأدوات

الفئات

عرض جميع الفئات
Loading categories
rusty-hog — ماسح الأسرار متعدد المصادر يكتشف مفاتيح API وكلمات المرور وPII عبر مستودعات Git ودلاء S3 وأنظمة الملفات وConfluence وJIRA وSlack ومستندات Google باستخدام regex وتحليل الانتروبيا. | Kitploit
أدوات/GitHubGitHub/newrelic/rusty-hog
تحليل الكودأمن السحابةDevSecOpsكشف الأسرار
GitHubnewrelic/rusty-hog

rusty-hog

ماسح الأسرار متعدد المصادر يكتشف مفاتيح API وكلمات المرور وPII عبر مستودعات Git ودلاء S3 وأنظمة الملفات وConfluence وJIRA وSlack ومستندات Google باستخدام regex وتحليل الانتروبيا.

عرض المستودع
55563منذ 16 أيامتمت المراجعة من قبل Kitploit

الأكثر شعبية

عرض الكل →

اكتشف الأدوات الأكثر استخدامًا من قبل مجتمعنا.

استكشف جميع الأدوات

تصفح مجموعتنا من الأدوات

عرض جميع الأدوات →
مشاركة

Rusty Hog هو ماسح أسرار مكتوب بلغة Rust لتحسين الأداء، ومبني على TruffleHog المكتوب بلغة Python. يوفر Rusty Hog الملفات الثنائية التالية:

  • Ankamali Hog: يفحص عن الأسرار في مستند جوجل.
  • Berkshire Hog: يفحص عن الأسرار في حاوية S3.
  • Choctaw Hog: يفحص عن الأسرار في مستودع Git.
  • Duroc Hog: يفحص عن الأسرار في مجلد وملف وأرشيف.
  • Essex Hog: يفحص عن الأسرار في صفحة Confluence.
  • Gottingen Hog: يفحص عن الأسرار في مشكلة JIRA.
  • Slack Hog: يفحص عن الأسرار في قناة Slack.

جدول المحتويات

  • الاستخدام
    • كيفية التثبيت باستخدام الملفات الثنائية المحملة
    • كيفية التشغيل باستخدام DockerHub
    • كيفية البناء
    • كيفية البناء على Windows
    • استخدام Anakamali Hog (ماسح GDocs)
    • استخدام Berkshire Hog (ماسح S3 - CLI)
    • استخدام Berkshire Hog (ماسح S3 - Lambda)
    • استخدام Choctaw Hog (ماسح Git)
    • استخدام Duroc Hog (ماسح نظام الملفات)
    • استخدام Essex Hog (ماسح Confluence)
    • استخدام Gottingen Hog (ماسح JIRA)
    • استخدام Hante Hog (ماسح SLACK)
    • تنسيق ملف JSON للتعبيرات النمطية
    • تنسيق ملف JSON لقائمة السماح
  • معلومات المشروع
    • الترخيص مفتوح المصدر
    • الدعم
    • المجتمع
    • المشكلات / طلبات التحسين
    • المساهمة
    • خريطة الطريق للميزات
    • ماذا يعني الاسم؟

الاستخدام

يوفر هذا المشروع مجموعة من الماسحات التي تستخدم التعبيرات النمطية لمحاولة اكتشاف وجود معلومات حساسة، مثل مفاتيح API وكلمات المرور والمعلومات الشخصية. يتضمن مجموعة من التعبيرات النمطية بشكل افتراضي، ولكنه يقبل أيضًا كائن JSON يحتوي على تعبيرات نمطية مخصصة لك.

كيفية التثبيت باستخدام الملفات الثنائية المحملة

قم بتنزيل وفك ضغط أحدث ZIP من علامة التبويب releases. ثم شغل كل ملف ثنائي باستخدام -h لرؤية التعليمات.```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:~
## كيفية التشغيل باستخدام DockerHub
يمكن العثور على صور Docker الخاصة بـ Rusty Hog على صفحة DockerHub الشخصية للمؤلف [هنا](https://hub.docker.com/u/wetfeet2000)
يتم بناء صورة Docker لكل Hog ولكل إصدار. لذا لاستخدام choctaw_hog، يمكنك تشغيل الأوامر التالية:```shell script
docker pull wetfeet2000/choctaw_hog:1.0.10
docker run -it --rm wetfeet2000/choctaw_hog:1.0.10 --help

كيفية البناء

  • تأكد من تثبيت Rust وأنه في مسار النظام.
  • استنسخ هذا المستودع، ثم نفذ cargo build --release. الملفات التنفيذية موجودة في target/release.
  • لبناء وعرض مستندات HTML، نفذ cargo doc --no-deps --open.
  • لتشغيل اختبارات الوحدة، نفذ cargo test.
  • لتجميع Berkshire Hog بطريقة عبرية لبيئة AWS Lambda، نفذ الأوامر التالية وارفع berkshire_lambda.zip إلى لوحة تحكم AWS Lambda الخاصة بك:```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:~
## كيفية البناء على ويندوز
ستحتاج إلى تجميع ثنائيات OpenSSL الثابتة وإخبار Rust/Cargo بمكان العثور عليها:```
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)

يمكنك الآن اتباع تعليمات البناء الرئيسية المذكورة أعلاه.

كيفية بناء Berkshire Hog لـ Lambda

macOS

استخدم Homebrew للحصول على التبعيات:``` brew install rpm2cpio FiloSottile/musl-cross/musl-cross

root@kitploit:~
ثم قم بتشغيل `./build_lambda_macos.sh`.

سيبني البرنامج النصي للبناء ضد OpenSSL 3.0.12. استخدم `export OPENSSL_BUILD_VER=3.0.12` للتجاوز.

سيبني البرنامج النصي للبناء ضد رؤوس نواة Amazon Linux المقدمة من خلال RPM الخاصة بها؛ استخدم `export AMAZON_KERNEL_HEADERS_RPM_URL=...` لتجاوز مكان تحميل RPM. (لا شيء يمنع استخدام RPM لرؤوس لينكس من توزيعة مختلفة، نحتاج فقط إلى رؤوس لينكس لبناء openssl لنظام لينكس)

سينشئ البرنامج النصي للبناء دليلاً باسم build-deps في جذر المصدر الحالي. يمكنك حذف هذا الدليل بأمان باستخدام `rm -rf`، ولكن سيتم إعادة إنشائه في تشغيل البرنامج النصي التالي. سيقوم أيضًا بإجراء العديد من فحوصات التناسق للتأكد من أن البناء يجب أن يعمل، وإذا فشلت تلك الفحوصات، قد يطلب منك حذف هذا الدليل باستخدام `rm -rf` للمحاولة مرة أخرى.

### Linux

تأكد من تثبيت `cross` (`cargo install cross`)، ثم قم بتشغيل `./build_lambda.sh`.

# الأوامر

## Anakamali Hog (GDoc Scanner) الاستخدام```
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)```

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) usage
تم تصميم Berkshire Hog حاليًا لاستخدامه كدالة Lambda. فيما يلي تدفق البيانات الأساسي:
<pre>
    ┌───────────┐              ┌───────┐     ┌────────────────┐     ┌────────────┐
    │ S3 bucket │ ┌────────┐   │       │     │ Berkshire Hog  │     │ S3 bucket  │
    │  (input) ─┼─┤S3 event├──▶│  SQS  │────▶│    (Lambda)    │────▶│  (output)  │
    │           │ └────────┘   │       │     │                │     │            │
    └───────────┘              └───────┘     └────────────────┘     └────────────┘
</pre>

لتشغيل Berkshire Hog بهذه الطريقة، قم بإعداد ما يلي:
1) قم بتكوين الحاوية (bucket) المدخلة لإرسال "event" إلى SQS لكل حدث PUSH/PUT.
2) قم بإعداد موضوع SQS لقبول الأحداث من S3، بما في ذلك أذونات IAM.
3) قم بتشغيل Berkshire Hog مع وصول IAM إلى SQS وS3.

## Choctaw Hog (Git Scanner) usage```
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 (ماسح نظام الملفات) الاستخدام```

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) استخدام```
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) الاستخدام```

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)```
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)

تنسيق ملف JSON للتعبيرات المنتظمة

يتيح خيار التعبيرات المنتظمة في الماسحات للمستخدمين تقديم مسار لملف JSON الخاص بهم الذي يحتوي على تعبيرات منتظمة تطابق المواد الحساسة. أي ملف يتم تقديمه حاليًا سيحل محل التعبيرات المنتظمة الافتراضية التي يوفرها SecretScanner، وليس إضافتها إليها. التنسيق المتوقع للملف هو كائن JSON واحد.

يجب أن تكون المفاتيح أسماء لنوع السر الذي سيكتشفه كل إدخال تعبير منتظم، حيث سيتم استخدام المفاتيح لخصائص السبب التي يخرجها الماسح.

يجب أن تكون كل قيمة سلسلة تحتوي على [https://docs.rs/regex/1.3.9/regex/#syntax](تعبير منتظم صالح للغة Rust) يطابق نوع السر الموصوف بواسطة المفتاح المقابل له.

اعتبارًا من الإصدار 1.0.8، يدعم محرك Rusty Hog أيضًا الكائنات كقيم لكل سر. يمكن أن يحتوي الكائن على كل ما يلي:

  • خاصية pattern تحتوي على تعبير regex المطابق (إلزامي)
  • خاصية entropy_filter بقيمة منطقية لتمكين فحص الإنتروبيا لهذه المعلومات (إلزامي)
  • خاصية threshold لتخصيص تحمل الإنتروبيا على مقياس من 0 إلى 1 (اختياري، سيتم ضبطها للتنسيق القديم 1-8، الافتراضي 0.6)
  • خاصية keyspace للإشارة إلى عدد القيم المحتملة في المفتاح، مثل 16 للست عشري، 64 لـ base64، 128 لـ ASCII (اختياري، الافتراضي 128)
  • خاصية make_ascii_lowercase للإشارة إلى ما إذا كان يجب على Rust تنفيذ .make_ascii_lowercase() على المفتاح قبل حساب الإنتروبيا (اختياري، الافتراضي false)

كلما زادت العتبة، زادت الإنتروبيا المطلوبة في السر لاعتباره مطابقًا.

مثال على هذا التنسيق موجود هنا:```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:~
اعتبارًا من الإصدار 1.0.11، يكون تعبير regex JSON الافتراضي الحالي المستخدم كالتالي:```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+"
}

تنسيق ملف JSON للقائمة البيضاء

توفر الماسحات الضوئية ميزة القائمة البيضاء. يتيح لك ذلك تحديد قائمة من التعبيرات العادية لكل نمط سيتم تجاهله بواسطة الماسح الضوئي. يمكنك الآن اختياريًا تقديم قائمة من التعبيرات العادية التي يتم تقييمها مقابل مسار الملف أيضًا.

يجب أن يكون تنسيق ملف القائمة البيضاء هذا كائن JSON واحد. يجب أن يتطابق كل مفتاح في القائمة البيضاء مع مفتاح في JSON التعبير العادي، ويمكن أن تكون القيمة واحدة من شيئين:

  1. مصفوفة من السلاسل النصية التي تمثل استثناءات لنمط التعبير العادي هذا. على سبيل المثال:
  2. كائن بمفتاح واحد على الأقل (patterns) واختياريًا مفتاح ثانٍ (paths).

بالإضافة إلى ذلك، يمكنك تحديد المفتاح <GLOBAL> الذي يتم تقييمه مقابل جميع الأنماط.

فيما يلي القائمة البيضاء الافتراضية المضمنة في جميع عمليات المسح:```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:~
كن على علم أن هذه هي نصوص، وليست تعبيرات regex، ومفاتيح قائمة السماح هذه يجب أن يكون لها مفتاح في ملف regex json. المفاتيح حساسة لحالة الأحرف.

# معلومات المشروع
## ترخيص مفتوح المصدر

يُوزَّع هذا المشروع بموجب [ترخيص Apache 2](https://github.com/newrelic/rusty-hog/blob/HEAD/LICENSE).

## الدعم

قامت New Relic بفتح مصدر هذا المشروع. هذا المشروع مُقدَّم كما هو دون ضمان أو دعم، على الرغم من أنه يمكنك الإبلاغ عن المشكلات والمساهمة في المشروع هنا على GitHub.

_يرجى عدم الإبلاغ عن المشكلات المتعلقة بهذا البرنامج للدعم الفني العالمي لـ New Relic._

## المجتمع

تستضيف New Relic وتُدير منتدى عبر الإنترنت حيث يمكن للعملاء التفاعل مع موظفي New Relic بالإضافة إلى عملاء آخرين للحصول على المساعدة ومشاركة أفضل الممارسات. مثل جميع مشاريع New Relic مفتوحة المصدر الرسمية، هناك موضوع مجتمعي ذو صلة في مركز مستكشف New Relic. يمكنك العثور على موضوع/نقاش هذا المشروع هنا:

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

## المشكلات / طلبات التحسين

قدِّم المشكلات وطلبات التحسين في [علامة التبويب "المشكلات" في هذا المستودع](https://raw.githubusercontent.com/newrelic/issues). يُرجى البحث ومراجعة المشكلات المفتوحة الحالية قبل تقديم مشكلة جديدة.

## المساهمة

المساهمات مرحب بها (وإذا قدَّمت طلب تحسين، فتوقع أن تتم دعوتك للمساهمة به بنفسك). يُرجى مراجعة [دليل المساهمين](https://github.com/newrelic/rusty-hog/blob/HEAD/CONTRIBUTING.md).

ضع في اعتبارك أنه عند تقديم طلب السحب، ستحتاج إلى توقيع اتفاقية المساهمة (CLA) من خلال النقر باستخدام CLA-Assistant. إذا كنت ترغب في تنفيذ اتفاقية المساهمة الخاصة بشركتنا، أو إذا كان لديك أي أسئلة، فيُرجى مراسلتنا عبر البريد الإلكتروني على [email protected].

## خارطة الميزات

- 1.1: ميزات المؤسسات
    - [ ] دعم ملفات الإعدادات (بدلاً من وسيطات سطر الأوامر)
    - [ ] دعم متغيرات البيئة بدلاً من وسيطات CLI
    - [ ] تعدد المهام
    - [ ] تحسين كشف السياق وتصفية النتائج الإيجابية الخاطئة (GitHound، التعلم الآلي)
    - [ ] استخدام Rusoto بدلاً من s3-rust
    - [x] إضافة ماسح JIRA
    - [x] إضافة ماسح نظام الملفات والأرشيفات
    - [ ] استخدام ميزات Rust لتقليل تبعيات التجميع؟

- 1.2: التكامل مع النصوص البرمجية وواجهات المستخدم الأكبر
    - [ ] دعم واجهة GitHub API لإدارة المؤسسات الأكبر
        - [ ] مسح جميع المستودعات لقائمة المستخدمين
        - [x] مسح جميع المستودعات في مؤسسة
    - [ ] إنشاء تقرير ويب أو واجهة ويب. دعم توليد "حفظ الحالة" من الواجهة.
    - [ ] نموذج الوكيل/المدير
    - [ ] عملية جدولة (معلقة بدعم حفظ الحالة)

## ماذا يعني الاسم؟
يُعتبر TruffleHog المعيار الفعلي / الماسح السري الأصلي. لقد كنت أبني مجموعة من أدوات فحص الأسرار لمنصات مختلفة بناءً على TruffleHog واحتجت إلى مخطط تسمية، لذا بدأت من أعلى [قائمة سلالات الخنازير](https://en.wikipedia.org/wiki/List_of_pig_breeds) في ويكيبيديا. وبالتالي فإن اسم كل أداة هو سلالة من الخنازير تبدأ بحرف "A" وتتصاعد.
تنزيل الأداة