
बग बाउंटी शिकारियों, पेनटेस्टरों और रेड टीमों के लिए पर्सनल एक्सेस टोकन (PAT) रीकॉन टूल

क्या आपने कभी GitHub या NPM का personal access token (PAT) पाया है और सोचा है "क्या यह मान्य है?" या "मैं सोचता हूँ कि एक बुरा आदमी इसके साथ क्या कर सकता है?" अगर ऐसा है, तो मेरे पास आपके लिए टूल है!
पेश है gimmePatz, PATs के लिए एक व्यापक reconnaissance टूल। gimmePATz आपको बताएगा कि PAT मान्य है या नहीं, और यह किस प्रकार का PAT है। यह PAT बनाने वाले उपयोगकर्ता खाते के बारे में जानकारी प्रदान करता है, जिसमें वह उपयोगकर्ता किन संगठनों का हिस्सा है और उसके कितने followers हैं। gimmePATz आपको दिखाएगा कि PAT में कौन-कौन से scopes हैं और PAT के पास किन variables या secrets तक पहुँच है। gimmePATz यह भी सूचीबद्ध करेगा कि PAT किन repositories, NPM packages या GitHub Organisations से जुड़ा है, और आपको बताएगा कि PAT के पास प्रत्येक resource पर वास्तव में कौन-सी permissions हैं। यह टूल offensive security पेशेवरों के लिए डिज़ाइन किया गया है, जैसे bug bounty hunters, pentesters और red teams। इस टूल का उपयोग करके, आप इसे कानूनी संदर्भ में उपयोग करने के लिए सहमत होते हैं।
आप gimmePATz को किसी फ़ाइल पर point कर सकते हैं और यह उस फ़ाइल में सभी PATs ढूँढ़ लेगा और आपको बताएगा कि वे मान्य हैं या नहीं। gimmepatz JSON आउटपुट का भी समर्थन करता है, इसलिए आप आउटपुट को JSON में सहेज सकते हैं, और/या gimmePATz के आउटपुट को jq जैसे अन्य टूल्स में pipe कर सकते हैं। आप नीचे "Advanced Usage" अनुभाग में gimmePATz का उपयोग करने के विभिन्न तरीकों के कुछ उदाहरण देख सकते हैं।
gimmepatz.py TOKEN
requests लाइब्रेरी # pip install requestsgit (रिपॉजिटरी डाउनलोड करने के लिए)# Discover secrets and variables
gimmepatz.py TOKEN --variables
# Include organization repositories
gimmepatz.py TOKEN --org GITHUB_ORGANIZATION
# JSON output for scripting
gimmepatz.py TOKEN --json
# Combined: organization repos + JSON output
gimmepatz.py TOKEN --org GITHUB_ORGANIZATION --json
# Save the output of gimmePATz in JSON output to a file
gimmepatz.py TOKEN --variables --org target-org --json > assessment.json
# Download all accessible repositories
gimmepatz.py TOKEN --download
# Download only private repositories
gimmepatz.py TOKEN --download --download-type private
# Custom download location
gimmepatz.py TOKEN --download --download-path ./target-repos
# Scan a file to see if it has any PATs in it
gimmepatz.py --scan ./example-file.json
स्क्रिप्ट को क्लोन करें या डाउनलोड करें
git clone https://github.com/6mile/gimmepatz.git
cd ./gimmepatz/ && chmod u+x ./gimmepatz.py
_ ______ ___ _____
(_) | ___ \/ _ \_ _|
__ _ _ _ __ ___ _ __ ___ ___| |_/ / /_\ \| |____
/ _` | | '_ ` _ \| '_ ` _ \ / _ \ __/| _ || |_ /
| (_| | | | | | | | | | | | | __/ | | | | || |/ /
\__, |_|_| |_| |_|_| |_| |_|\___\_| \_| |_/\_/___|
__/ |
|___/ "Personal Access Token recon tool"
----------------------------------------------------
by @6mile
✅ Token is valid
👤 Authenticated as: octocat
Name: Octocat Maclean
Account type: User
Public repos: 4
Private repos: 3
Followers: 9714
Following: 731
🏢 Organization Memberships (2 total):
👤 Space-Force-Beta (member)
Name: Space-Force-Beta
Description: Building cool stuff for space
Public repos: 2
Private repos: 1
URL: https://github.com/Space-Force-Beta
👑 ThrifyBank (admin)
Description: The thriftiest Neo Bank in Kansas!
Public repos: 1
Private repos: 5
URL: https://github.com/thrifybank-kansas
🔑 Token Scopes (14 total):
• codespace:secrets
• notifications
• read:audit_log
• read:discussion
• read:enterprise
• read:org
• read:packages
• read:project
• read:public_key
• read:repo_hook
• read:user
• repo
• user:email
• workflow
Scope Descriptions:
--------------------------------------------------
repo: Full access to repositories
user: Access to user profile information
notifications: Access to notifications
📊 Rate Limit Status:
Limit: 5000
Remaining: 4999
Reset time: 1234567890
📁 Accessible Repositories:
Found 25 accessible repositories:
• 15 private repositories
• 10 public repositories
🔒 Private Repositories (9):
📂 octocat (3 private repos):
• octocat/internal-api (admin)
• octocat/database (admin)
• octocat/external-api (admin)
📂 Space-Force-Beta (1 private repos):
• Space-Force-Beta/destrukto-beam (admin)
📂 ThriftyBank (5 private repos):
• thriftybank-kansas/web (admin)
• thriftybank-kansas/docker (admin)
• thriftybank-kansas/database-int (admin)
• thriftybank-kansas/bank-vault (admin)
• thriftybank-kansas/SAAS-PORTAL (admin)
🔓 Public Repositories (7):
📂 octocat (4 public repos):
• octocat/sdk (admin)
• octocat/helpdesk-docs (admin)
• octocat/aws-sdk-helpers (admin)
• octocat/stinkyCaptain (admin)
📂 Space-Force-Beta (1 public repos):
• Space-Force-Beta/destrukto-beam (admin)
📂 thrifybank-kansas (1 public repos):
• thrifybank-kansas/node-restify (admin)
{
"token_valid": true,
"user_info": {
"login": "octocat",
"name": "The Octocat",
"type": "User",
"id": 1
},
"scopes": ["repo", "user", "notifications"],
"rate_limit": {
"limit": 5000,
"remaining": 4999,
"reset": 1234567890
},
"repositories": {
"total": 25,
"private": [
{
"name": "mycompany/internal-api",
"owner": "mycompany",
"permissions": {
"admin": true,
"push": true,
"pull": true
},
"url": "https://github.com/mycompany/internal-api"
}
],
"public": [
{
"name": "octocat/awesome-project",
"owner": "octocat",
"permissions": {
"admin": true,
"push": true,
"pull": true
},
"url": "https://github.com/octocat/awesome-project"
}
]
},
"summary": {
"total_repos": 25,
"private_count": 15,
"public_count": 10,
"owners": ["mycompany", "octocat"]
}
}
export TOKEN="your_token_here"
gimmepatz.py "$TOKEN"
"अमान्य टोकन या नेटवर्क त्रुटि"
"कोई रिपॉजिटरी नहीं मिली"
--org के साथ संगठन रिपॉजिटरी शामिल करने की आवश्यकता हैरेट सीमा समाप्त
200: सफलता401: गलत क्रेडेंशियल्स (अमान्य टोकन)403: रेट सीमा समाप्त या अपर्याप्त अनुमतियाँ404: संसाधन नहीं मिला (उपयोगकर्ता/संगठन मौजूद नहीं है)योगदान का स्वागत है! कृपया बेझिझक Pull Request सबमिट करें। बड़े बदलावों के लिए, कृपया पहले एक issue खोलें ताकि आप जो बदलना चाहते हैं उस पर चर्चा की जा सके।
यह प्रोजेक्ट MIT लाइसेंस के अंतर्गत लाइसेंस प्राप्त है - विवरण के लिए LICENSE फ़ाइल देखें।
--download के माध्यम से मिली रिपॉजिटरी डाउनलोड करने की क्षमता जोड़ी गईमेरे offsec दोस्तों के लिए @6mile द्वारा ❤️ के साथ बनाया गया
| Option | Description |
|---|
--json | परिणाम JSON प्रारूप में आउटपुट करें |
--variables, --var | GitHub variables और secrets की गणना करें |
--var-target | लक्ष्य दायरा: all, user, repo, org |
--var-name | विशिष्ट रिपॉजिटरी या संगठन का नाम |
--download | सभी सुलभ रिपॉजिटरी डाउनलोड करें |
--download-path | कस्टम डाउनलोड निर्देशिका (डिफ़ॉल्ट: repos) |
--download-type | फ़िल्टर: all, private, public |
--org | विशिष्ट GitHub संगठन विश्लेषण शामिल करें |
--debug | विस्तृत डिबग आउटपुट सक्षम करें |
--scan | PATs के लिए स्थानीय फ़ाइलें स्कैन करें |
| Scope | Description |
|---|
repo | रिपॉजिटरी तक पूर्ण पहुँच |
public_repo | केवल सार्वजनिक रिपॉजिटरी तक पहुँच |
repo:status | कमिट स्थिति तक पहुँच |
repo_deployment | डिप्लॉयमेंट स्थितियों तक पहुँच |
user | उपयोगकर्ता प्रोफ़ाइल जानकारी तक पहुँच |
user:email | उपयोगकर्ता ईमेल पतों तक पहुँच |
user:follow | उपयोगकर्ताओं को follow/unfollow करने की पहुँच |
admin:org | संगठन, टीमों और सदस्यताओं तक पूर्ण पहुँच |
write:org | संगठन और टीमों तक लेखन पहुँच |
read:org | संगठन और टीमों तक पढ़ने की पहुँच |
gist | gists तक लेखन पहुँच |
notifications | सूचनाओं तक पहुँच |
workflow | GitHub Actions वर्कफ़्लो तक पहुँच |
write:packages | GitHub पैकेजों तक लेखन पहुँच |
read:packages | GitHub पैकेजों तक पढ़ने की पहुँच |
delete_repo | रिपॉजिटरी हटाने की पहुँच |