用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill wstg-cryp-04命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
macOS post-exploitation for credential harvesting, DTrace monitoring, TCC bypass, and stealth operations via native tools
Windows userland post-exploitation for credential harvesting, monitoring, AMSI/ETW bypass, and stealth operations
Kubernetes post-exploitation for container escape, secret extraction, RBAC abuse, and cluster persistence
基于 SOC 职业分类
正在显示 SKILL.md
| name | wstg-cryp-04 |
| description | Testing for Weak Encryption |
| category | cryptography |
| owasp_id | WSTG-CRYP-04 |
| version | 1.0.0 |
| author | cyberstrike-official |
| tags | ["cryptography","tls","ssl","encryption","wstg","cryp"] |
| tech_stack | [] |
| cwe_ids | ["CWE-327"] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
WSTG-CRYP-04
Testing for Weak Encryption
Weak encryption can occur through the use of outdated algorithms, insufficient key lengths, improper implementation, or predictable initialization vectors. This test identifies cryptographic weaknesses in data encryption at rest and in transit within the application.
# Look for encrypted/hashed data in:
# - Cookies
# - Database exports
# - API responses
# - Configuration files
# - URL parameters
# Check for common weak hash patterns
# MD5: 32 hex characters
# SHA1: 40 hex characters
# Check password storage
curl -s "https://target.com/api/user/export" | \
grep -oP '[a-f0-9]{32}' | head -5 # Potential MD5
#!/usr/bin/env python3
import base64
import re
class EncryptionAnalyzer:
def __init__(self):
self.findings = []
():
()
:
decoded = base64.b64decode(data)
._analyze_decoded(decoded)
:
._check_ecb_patterns(data)
():
(data) % == :
()
(data) % == :
()
blocks = [data[i:i+] i (, (data), )]
(blocks) != ((blocks)):
()
.findings.append({
: ,
:
})
():
chunks = [data[i:i+] i (, (data), )]
(chunks) != ((chunks)) (chunks) > :
()
():
hash_len = (hash_value)
hash_types = {
: ,
: ,
: ,
: ,
}
hash_len hash_types:
hash_type = hash_types[hash_len]
()
hash_type:
.findings.append({
: ,
:
})
():
patterns = [
,
,
,
]
pattern patterns:
matches = re.findall(pattern, source_code, re.IGNORECASE)
matches:
()
.findings.append({
: ,
:
})
analyzer = EncryptionAnalyzer()
analyzer.analyze_ciphertext()
analyzer.analyze_hash()
#!/usr/bin/env python3
import hashlib
import requests
def check_password_hash_strength(api_endpoint, test_password):
"""Check if password hashing is weak"""
# Create account and get hash from response/database
# Compare with known weak hashes
known_weak_hashes = {
hashlib.md5(test_password.encode()).hexdigest(): "MD5",
hashlib.sha1(test_password.encode()).hexdigest(): "SHA1",
}
# If hash matches any weak algorithm, it's vulnerable
# Real testing requires access to stored hashes
print("[*] Test for weak password hashing requires:")
print(" - Access to stored password hashes")
print(" - Comparison with known hash outputs")
print(" - Check for absence of salt")
| Tool | Description |
|---|---|
| hashcat | Hash identification and cracking |
| john | Password hash analysis |
| CyberChef | Crypto analysis |
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
import os
# Use AES-256-GCM (authenticated encryption)
key = os.urandom(32) # 256 bits
nonce = os.urandom(12)
aesgcm = AESGCM(key)
ciphertext = aesgcm.encrypt(nonce, plaintext, associated_data)
import bcrypt
# Or use Argon2 for better security
# Hash password
hashed = bcrypt.hashpw(password.encode(), bcrypt.gensalt(rounds=12))
# Verify
if bcrypt.checkpw(password.encode(), stored_hash):
# Valid password
| Finding | CVSS | Severity |
|---|---|---|
| MD5/SHA1 for passwords | 7.5 | High |
| ECB mode encryption | 5.3 | Medium |
| Hardcoded keys | 7.5 | High |
| DES/3DES encryption | 5.3 | Medium |
| CWE ID | Title |
|---|---|
| CWE-327 | Use of Broken or Risky Cryptographic Algorithm |
| CWE-328 | Reversible One-Way Hash |
| CWE-329 | Not Using a Random IV with CBC Mode |
[ ] Encryption algorithms identified
[ ] Key lengths checked
[ ] ECB mode usage tested
[ ] Hash algorithms analyzed
[ ] Hardcoded keys searched
[ ] IV randomness verified
[ ] Findings documented