offensive-tls-attacks
Comprehensive methodology for auditing and exploiting TLS/SSL implementations and misconfigurations across network services and mobile applications. Covers protocol downgrade attacks including POODLE (CVE-2014-3566) against SSLv3 CBC padding, DROWN (CVE-2016-0800) cross-protocol attack leveraging SSLv2 export ciphers to decrypt TLS sessions, and FREAK (CVE-2015-0204) forcing RSA export-grade key exchange. Addresses BEAST (CVE-2011-3389) exploiting CBC IV predictability in TLS 1.0, CRIME (CVE-2012-4929) and BREACH targeting TLS-level and HTTP-level compression oracles respectively, and Heartbleed (CVE-2014-0160) for OpenSSL memory disclosure. Covers certificate validation bypass techniques for applications with improper hostname verification or chain validation, certificate pinning bypass using Frida and Objection for mobile application interception, HSTS bypass via NTP manipulation and subdomain exploitation, TLS 1.3 0-RTT replay attacks against non-idempotent endpoints, mutual TLS (mTLS) authentication attacks including client certificate theft and relay, and Certificate Transparency log monitoring for reconnaissance. Primary tooling includes testssl.sh for comprehensive TLS auditing, sslyze for Python-integrated scanning, sslscan for quick cipher enumeration, and tlsx for high-speed TLS probing at scale. Maps to CWE-295 (Improper Certificate Validation), CWE-319 (Cleartext Transmission of Sensitive Information), and CWE-757 (Selection of Less-Secure Algorithm During Negotiation).
git clone --depth 1 https://github.com/SnailSploit/Claude-Red /tmp/offensive-tls-attacks && cp -r /tmp/offensive-tls-attacks/Skills/crypto/offensive-tls-attacks ~/.claude/skills/offensive-tls-attacksSKILL.md
# TLS/SSL Attacks and Misconfiguration Exploitation You are performing offensive TLS/SSL analysis against target infrastructure. This skill covers the full attack surface of transport layer security -- from protocol-level cryptographic weaknesses to implementation bugs, certificate validation failures, and deployment misconfigurations. You treat every TLS handshake as an opportunity for enumeration and every certificate chain as a trust boundary to probe. ## Quick Workflow 1. Enumerate the target's TLS configuration -- supported protocols, cipher suites, certificate chain, extensions. 2. Identify deprecated protocols (SSLv2, SSLv3, TLS 1.0, TLS 1.1) and weak cipher suites (export, NULL, RC4, DES, 3DES). 3. Check for known protocol vulnerabilities -- POODLE, DROWN, FREAK, BEAST, Heartbleed. 4. Test compression oracle exposure -- CRIME at the TLS layer, BREACH at the HTTP layer. 5. Validate certificate handling -- chain verification, hostname matching, pinning enforcement, revocation checking. 6. Assess TLS 1.3 features -- 0-RTT replay, downgrade sentinel presence, supported groups. 7. For mobile targets, bypass certificate pinning and intercept traffic. 8. Document findings with protocol evidence and remediation priorities. --- ## TLS Enumeration and Scanning Begin every TLS engagement with comprehensive enumeration. Use testssl.sh as the primary tool -- it requires no dependencies beyond bash and OpenSSL and produces detailed output covering protocols, ciphers, vulnerabilities, and certificate details. ```bash # Full scan with all checks, output to JSON and HTML testssl.sh --jsonfile results.json --htmlfile results.html \ --ip one --sneaky --warnings batch \ target.com:443 # Quick protocol and cipher check testssl.sh --protocols --ciphers target.com:443 # Check only for specific vulnerabilities testssl.sh --heartbleed --ccs-injection --ticketbleed \ --robot --poodle --beast --crime --breach --drown --freak \ --logjam --sweet32 target.com:443 # Scan multiple targets from a file testssl.sh --file targets.txt --parallel 10 --jsonfile bulk_results.json ``` Use sslyze for Python-integrated scanning and CI/CD pipeline integration: ```bash # Standard scan with all plugins sslyze --regular target.com # JSON output for programmatic processing sslyze --json_out results.json target.com # Check specific vulnerability classes sslyze --heartbleed --openssl_ccs --robot target.com # Scan with client certificate authentication sslyze --cert /path/to/client.pem --key /path/to/client.key target.com ``` Use sslscan for rapid cipher enumeration and tlsx for high-speed probing at scale: ```bash # sslscan quick enumeration sslscan --no-fallback target.com:443 # tlsx high-speed probing across many hosts cat hosts.txt | tlsx -p 443,8443,9443 -json -o tls_results.json # tlsx specific checks cat hosts.txt | tlsx -san -cn -so -json # Extract SANs, CNs, server orgs cat hosts.txt | tlsx -tls-version tls10 # Find hosts still accepting TLS 1.0 cat hosts.txt | tlsx -expired -self-signed -mismatched # Certificate issues ``` --- ## Protocol Downgrade Attacks Protocol downgrade attacks force a TLS connection to negotiate a weaker protocol version that has known vulnerabilities. These attacks exploit the backward-compatible fallback mechanisms built into TLS. **POODLE (CVE-2014-3566)** exploits the non-deterministic padding in SSLv3 CBC mode. Unlike TLS, SSLv3 does not specify the padding byte values, and the receiver does not verify them -- only the padding length byte matters. This allows an active attacker to decrypt one byte of plaintext per 256 requests on average. ```bash # Check if the target supports SSLv3 testssl.sh --poodle target.com:443 openssl s_client -ssl3 -connect target.com:443 # TLS POODLE variant: check for CBC padding oracle in TLS implementations testssl.sh --poodle target.com:443 # Look for "POODLE, TLS" in output -- indicates vulnerable TLS implementation ``` **DROWN (CVE-2016-0800)** is a cross-protocol attack. If a server (or any server sharing the same RSA key) supports SSLv2, an attacker can decrypt passively captured TLS sessions. The attack adapts Bleichenbacher's RSA padding oracle using SSLv2 export cipher handshakes. ```bash # Check for SSLv2 support (direct DROWN) testssl.sh --drown target.com:443 # Check with OpenSSL (requires a build with SSLv2 enabled) openssl s_client -ssl2 -connect target.com:443 # General DROWN also applies when another server shares the same RSA key # Extract the certificate and search for key reuse across infrastructure openssl s_client -connect target.com:443 </dev/null 2>/dev/null | \ openssl x509 -noout -modulus | md5sum # Compare this modulus hash across all servers in scope ``` **FREAK (CVE-2015-0204)** forces a downgrade to RSA_EXPORT cipher suites with 512-bit RSA keys, which are factorable in hours on commodity hardware: ```bash # Check for export cipher support testssl.sh --freak target.com:443 sslyze --openssl_ccs target.com # Enumerate export ciphers directly openssl s_client -cipher EXPORT -connect target.com:443 nmap --script ssl-enum-ciphers -p 443 target.com | grep -i export ``` --- ## BEAST Attack BEAST (CVE-2011-3389) exploits the predictable IV in TLS 1.0 CBC mode. In TLS 1.0, the IV for each record is the last ciphertext block of the previous record, making it known to an attacker who can observe the ciphertext. Combined with a chosen-plaintext capability (via JavaScript in a browser), this enables blockwise decryption of targeted bytes. ```bash # Check for BEAST vulnerability testssl.sh --beast target.com:443 # Verify TLS 1.0 with CBC ciphers is available openssl s_client -tls1 -cipher 'AES128-SHA' -connect target.com:443 ``` BEAST requires the attacker to inject chosen plaintext into the same TLS connection (typically via JavaScript in adjacent browser contexts). Modern mitigations include 1/n-1 record splitting (implemented in all current browsers) and upgrading to TLS 1.2+ where explicit IVs
Active Directory attack methodology for internal network red team engagements. Covers reconnaissance (BloodHound, PowerView, ADExplorer), credential abuse (Kerberoasting, ASREProasting, NTLM relay, LLMNR/NBT-NS poisoning), privilege escalation (ACL abuse, GPO abuse, unconstrained/constrained delegation), lateral movement (Pass-the-Hash, Pass-the-Ticket, Overpass-the-Hash, WMI/WinRM/PsExec), persistence (Golden/Silver/Diamond Tickets, DCSync, DCShadow, AdminSDHolder, Skeleton Key), forest trust attacks, ADCS abuse (ESC1-ESC15), and modern MDI/Defender for Identity evasion. Use when assessing on-prem AD, hybrid AD/Entra ID environments, or ADCS deployments.
Comprehensive red team operations methodology covering full engagement lifecycle from planning through reporting. Addresses engagement scoping and rules of engagement negotiation, multi-tier C2 infrastructure design with redirectors and domain fronting, malleable traffic profiles and beacon tradecraft, OPSEC discipline including attribution avoidance and indicator management, EDR and AMSI evasion techniques using direct syscalls and unhooking, data collection with chain-of-custody controls, and structured reporting with purple team debrief workflows. Covers assumed-breach, external-to-internal, insider threat, and hybrid physical-cyber engagement scenarios with MITRE ATT&CK mapping throughout. Targets operators planning or executing adversary simulation engagements against mature defenders.
Anti-forensics and evidence destruction techniques for red team operators conducting authorized engagements. Covers log clearing on Windows (wevtutil, Clear-EventLog, ETW provider patching) and Linux (journal truncation, utmp/wtmp binary editing, syslog manipulation), timestamp manipulation via Timestomp and SetMACE to defeat timeline analysis, filesystem-level anti-forensics including NTFS Alternate Data Streams for payload hiding and secure deletion with sdelete/shred, memory artifact removal to counter live forensics, disk artifact manipulation targeting MFT entries and USN journal records, network forensics evasion through encrypted C2 channels and DNS-over-HTTPS tunneling, and anti-VM/sandbox detection to avoid dynamic analysis environments. Tools: Timestomp, wevtutil, sdelete, shred, MimiPenguin, Invoke-Phant0m. Aligns to MITRE ATT&CK T1070 (Indicator Removal), T1027 (Obfuscated Files or Information), T1497 (Virtualization/Sandbox Evasion). Each technique includes the forensic artifact it targets, the destruction or manipulation method, and the defender perspective so operators understand detection gaps they must account for.
Advanced API exploitation methodology focused on business logic abuse and sophisticated attack patterns that bypass traditional security controls. Covers business logic bypass through API call chaining and workflow manipulation. Addresses GraphQL-specific attacks including batching for credential brute-force, query depth exploitation, and introspection abuse. Includes pagination exploitation for data exfiltration, webhook hijacking for SSRF and data interception, and resource exhaustion through algorithmic complexity attacks. Covers race conditions in API transactions using parallel request techniques. Provides comprehensive JWT manipulation including algorithm confusion, kid injection, jku/x5u abuse, and claim tampering. Details API key leakage detection across source repositories, client-side code, and error messages. Covers undocumented endpoint discovery through predictable naming, debug routes, and source map analysis. Tooling includes Arjun, ParamSpider, jwt_tool, and GraphQL Voyager. Designed for authorized penetration testers targeting business logic layers that automated scanners miss.
Comprehensive API security testing methodology covering REST, gRPC, and WebSocket attack surfaces. Addresses the full OWASP API Security Top 10 2023 including BOLA/IDOR, broken authentication, excessive data exposure, rate limiting bypass, BFLA, mass assignment, SSRF, and security misconfiguration. Includes REST-specific attacks such as HTTP verb tampering, content-type switching, and parameter pollution. Covers gRPC exploitation through protobuf interception, reflection API enumeration, and metadata injection. Addresses WebSocket vulnerabilities including origin bypass, message injection, and cross-site WebSocket hijacking. Provides tooling guidance for Burp Suite, Postman, grpcurl, websocat, and mitmproxy. Each technique includes detection signatures and defensive indicators so you understand what artifacts your testing leaves behind. Designed for authorized penetration testing engagements against API-driven architectures.
Bluetooth Low Energy (BLE) attack methodology — GATT enumeration, characteristic read/write without auth, pairing downgrade (Just Works forced), LE Secure Connections bypass, MITM via active relay, sniffing with Sniffle (TI CC1352) / Ubertooth / Frontline, encryption key extraction (LE Legacy Pairing crackable, LE Secure Connections strong), proximity authentication abuse (cars, locks), and companion-app trust analysis. Use for IoT BLE devices, smart locks, fitness trackers, medical devices, BLE beacons, or any device pairing over BLE.