[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AEA86F7M5XTEDPTMNAT6R6":3,"skill-same:01M6AEA86F7M5XTEDPTMNAT6R6":105},{"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":26,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":64,"commitSha":65,"skillDirectory":66,"forksCount":67,"repositoryHtmlUrl":68,"repositoryHomepageUrl":69,"ownerHtmlUrl":70,"ownerBlogUrl":71,"ownerDescription":72,"updatedAt":73,"install":74,"resources":87},"01M6AEA86F7M5XTEDPTMNAT6R6","detecting-bluetooth-low-energy-attacks",null,"Detects and analyzes Bluetooth Low Energy (BLE) security attacks including sniffing, replay attacks, GATT enumeration abuse, and Man-in-the-Middle interception. Uses Ubertooth One and nRF52840 sniffers for packet capture, the bleak Python library for GATT service enumeration, and crackle for BLE encryption cracking. Use when assessing IoT device BLE security, monitoring for BLE-based attacks on wireless infrastructure, or performing authorized BLE penetration testing. Activates for requests involving BLE security assessment, Ubertooth sniffing, GATT enumeration, or BLE replay detection.","mukul975\u002FAnthropic-Cybersecurity-Skills","mukul975","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42860185?v=4","01M6ADEQR8T5M4EEG6C67BQCWF","Mahipal","01M6ADJPMYWG1E5GM1FWBE3128",36078,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fdetecting-bluetooth-low-energy-attacks\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"detecting bluetooth low energy attacks","man-in-the-middle","replay-attack","iot-security","wireless-security","gatt","nrf-sniffer","ubertooth","bluetooth","ble","testing","enumeration","encryption","penetration testing","monitoring","iot","assessment","pr","cybersecurity","python","2026-11-10 10:12:30",false,"---\nname: detecting-bluetooth-low-energy-attacks\ndescription: 'Detects and analyzes Bluetooth Low Energy (BLE) security attacks including\n  sniffing, replay attacks, GATT enumeration abuse, and Man-in-the-Middle interception.\n  Uses Ubertooth One and nRF52840 sniffers for packet capture, the bleak Python library\n  for GATT service enumeration, and crackle for BLE encryption cracking. Use when\n  assessing IoT device BLE security, monitoring for BLE-based attacks on wireless\n  infrastructure, or performing authorized BLE penetration testing. Activates for\n  requests involving BLE security assessment, Ubertooth sniffing, GATT enumeration,\n  or BLE replay detection.\n\n  '\ndomain: cybersecurity\nsubdomain: wireless-security\nauthor: mukul975\ntags:\n- ble\n- bluetooth\n- ubertooth\n- nrf-sniffer\n- gatt\n- wireless-security\n- iot-security\n- replay-attack\nversion: 1.0.0\nlicense: Apache-2.0\nnist_csf:\n- PR.IR-01\n- DE.CM-01\n- ID.AM-03\nmitre_attack:\n- T1011.001\n- T1557\n- T1040\n- T1200\n---\n# Detecting Bluetooth Low Energy Attacks\n\n## Disclaimer\n\nThis skill is intended for authorized security testing, penetration testing engagements, CTF competitions, and educational purposes only. Sniffing, intercepting, or manipulating Bluetooth communications without authorization may violate federal wiretapping laws and local regulations. Always obtain explicit written permission before conducting any wireless security assessment.\n\n## When to Use\n\nUse this skill when:\n- Performing authorized BLE security assessments of IoT devices, medical devices, or smart locks\n- Monitoring a wireless environment for BLE-based replay attacks, spoofing, or unauthorized enumeration\n- Analyzing BLE packet captures to detect Man-in-the-Middle attacks or pairing exploitation\n- Enumerating GATT services and characteristics to identify insecure read\u002Fwrite permissions on BLE peripherals\n- Assessing BLE encryption strength and testing for crackable pairing exchanges\n- Building BLE intrusion detection capabilities for wireless security monitoring\n\n**Do not use** for intercepting BLE communications without explicit authorization. Do not deploy BLE scanning tools in environments where wireless monitoring is prohibited.\n\n## Prerequisites\n\n- Ubertooth One hardware for passive BLE sniffing, or Nordic nRF52840 USB Dongle with nRF Sniffer firmware\n- Python 3.10+ with pip\n- bleak library: `pip install bleak` (cross-platform BLE GATT client)\n- Wireshark with BLE dissector plugins for packet analysis\n- crackle tool for BLE encryption analysis: built from source at github.com\u002Fmikeryan\u002Fcrackle\n- ubertooth-btle CLI tools: `apt install ubertooth` (Linux) or build from source\n- Bluetooth 4.0+ adapter on the host system for bleak-based scanning\n- Linux recommended for full Ubertooth\u002FnRF sniffer support\n\n## Workflow\n\n### Step 1: BLE Environment Discovery and Device Scanning\n\nScan the environment to identify BLE devices and their advertising data:\n\n```bash\n# Scan for BLE devices using bleak (cross-platform)\npython -c \"\nimport asyncio\nfrom bleak import BleakScanner\n\nasync def scan():\n    devices = await BleakScanner.discover(timeout=10.0)\n    for d in devices:\n        print(f'{d.address} | RSSI: {d.rssi} | Name: {d.name or \\\"Unknown\\\"}')\n        for uuid in d.metadata.get('uuids', []):\n            print(f'  Service: {uuid}')\n\nasyncio.run(scan())\n\"\n\n# Passive BLE sniffing with Ubertooth One (promiscuous mode)\nubertooth-btle -p -r capture.pcapng\n\n# Follow a specific BLE connection\nubertooth-btle -f -t AA:BB:CC:DD:EE:FF -r connection.pcapng\n\n# Use nRF Sniffer with Wireshark (via extcap interface)\nwireshark -i nRF_Sniffer -k\n```\n\n### Step 2: GATT Service and Characteristic Enumeration\n\nConnect to target BLE peripherals and enumerate their GATT profile:\n\n```bash\n# Enumerate all services, characteristics, and descriptors\npython -c \"\nimport asyncio\nfrom bleak import BleakClient\n\nasync def enum_gatt(address):\n    async with BleakClient(address) as client:\n        print(f'Connected: {client.is_connected}')\n        for service in client.services:\n            print(f'Service: {service.uuid} - {service.description}')\n            for char in service.characteristics:\n                props = ','.join(char.properties)\n                print(f'  Char: {char.uuid} | Props: {props}')\n                for desc in char.descriptors:\n                    val = await client.read_gatt_descriptor(desc.handle)\n                    print(f'    Desc: {desc.uuid} = {val}')\n\nasyncio.run(enum_gatt('AA:BB:CC:DD:EE:FF'))\n\"\n```\n\nSecurity-relevant findings during GATT enumeration:\n- Characteristics with `write-without-response` or `write` without authentication\n- Readable characteristics exposing device configuration, credentials, or firmware versions\n- Missing Client Characteristic Configuration Descriptor (CCCD) protection on notification characteristics\n\n### Step 3: BLE Packet Capture and Analysis\n\nCapture BLE traffic for offline analysis:\n\n```bash\n# Capture with Ubertooth in PcapNG format (recommended)\nubertooth-btle -f -r capture.pcapng\n\n# Capture in PCAP\u002FPPI format for crackle compatibility\nubertooth-btle -f -c capture_ppi.pcap\n\n# Analyze capture in Wireshark\nwireshark capture.pcapng\n# Apply display filter: btle\n# Filter connection requests: btle.advertising_header.pdu_type == 0x05\n# Filter data packets: btle.data_header\n\n# Extract pairing information with tshark\ntshark -r capture.pcapng -Y \"btle.control_opcode == 0x01\" -T fields \\\n  -e btle.master_bd_addr -e btle.slave_bd_addr\n```\n\n### Step 4: BLE Encryption Analysis with Crackle\n\nAnalyze captured pairing exchanges to test encryption strength:\n\n```bash\n# Crack BLE Legacy Pairing (Just Works \u002F passkey)\ncrackle -i capture_ppi.pcap -o decrypted.pcap\n\n# Crack with known Temporary Key (TK)\ncrackle -i capture_ppi.pcap -o decrypted.pcap -l 000000\n\n# Analyze decrypted traffic\nwireshark decrypted.pcap\n```\n\nBLE Legacy Pairing with Just Works mode uses a TK of all zeros, making it trivially\ncrackable. Passkey entry uses a 6-digit PIN (000000-999999) that can be brute-forced\nin under a second. Only BLE Secure Connections (LE Secure Connections with ECDH)\nprovides adequate protection against passive eavesdropping.\n\n### Step 5: Replay Attack Detection and Testing\n\nMonitor for and test BLE replay attack susceptibility:\n\n```bash\n# Capture characteristic write operations\n# Record the raw bytes written to a target characteristic\n# Then replay the exact same bytes to test if the device accepts stale commands\n\npython -c \"\nimport asyncio\nfrom bleak import BleakClient\n\nTARGET = 'AA:BB:CC:DD:EE:FF'\nCHAR_UUID = '0000fff1-0000-1000-8000-00805f9b34fb'\n\nasync def replay_test():\n    async with BleakClient(TARGET) as client:\n        # Step 1: Read current state\n        val = await client.read_gatt_char(CHAR_UUID)\n        print(f'Current value: {val.hex()}')\n\n        # Step 2: Write a command (captured from previous session)\n        captured_command = bytes.fromhex('0102030405')\n        await client.write_gatt_char(CHAR_UUID, captured_command)\n        print('Replayed captured command')\n\n        # Step 3: Verify if command was accepted\n        new_val = await client.read_gatt_char(CHAR_UUID)\n        print(f'New value: {new_val.hex()}')\n        if new_val != val:\n            print('VULNERABLE: Device accepted replayed command')\n\nasyncio.run(replay_test())\n\"\n```\n\nIndicators of replay vulnerability:\n- Device accepts previously captured write commands without freshness validation\n- No sequence number, timestamp, or challenge-response mechanism in the protocol\n- Device state changes in response to replayed commands\n\n### Step 6: Man-in-the-Middle Detection\n\nDetect BLE MITM attacks by monitoring for anomalous behavior:\n\n```bash\n# Monitor for BLE address spoofing (device impersonation)\n# Compare advertising data fingerprints over time\n\n# Monitor for unexpected connection parameter changes\ntshark -r capture.pcapng -Y \"btle.control_opcode == 0x00\" -T fields \\\n  -e btle.control.interval.min -e btle.control.interval.max\n\n# Detect GATTacker\u002FBTLEjuice MITM patterns:\n# - Cloned advertising data with different BD_ADDR\n# - Rapid connect\u002Fdisconnect cycles on the same channel\n# - Duplicate service UUIDs from different addresses\n\n# Monitor for suspicious pairing requests\ntshark -r capture.pcapng -Y \"btl2cap.cid == 0x0006\" -T fields \\\n  -e btsmp.opcode -e btsmp.io_capability -e btsmp.auth_req\n```\n\n### Step 7: Continuous BLE Security Monitoring\n\nDeploy ongoing BLE monitoring for threat detection:\n\n```bash\n# Run the agent in monitoring mode\npython agent.py --mode monitor --duration 3600 --output ble_alerts.json\n\n# Combine with Ubertooth for passive monitoring\nubertooth-btle -p -r - | python agent.py --mode analyze --pcap-stdin\n\n# Alert on specific threat indicators\npython agent.py --mode monitor --alert-on replay,spoofing,weak-pairing\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|-----------|\n| **BLE (Bluetooth Low Energy)** | Low-power wireless protocol (Bluetooth 4.0+) optimized for IoT devices, operating on 2.4 GHz with 40 channels (3 advertising, 37 data) |\n| **GATT (Generic Attribute Profile)** | BLE data model organizing device capabilities into services, characteristics, and descriptors; the primary interface for reading\u002Fwriting BLE device data |\n| **Ubertooth One** | Open-source 2.4 GHz wireless development platform capable of passive BLE and Bluetooth Classic sniffing across all BLE channels |\n| **nRF Sniffer** | Nordic Semiconductor firmware for nRF52840 USB dongle that enables BLE packet capture with Wireshark integration via extcap |\n| **Replay Attack** | Attack where previously captured BLE commands are retransmitted to a device to trigger unauthorized actions without knowledge of encryption keys |\n| **Just Works Pairing** | BLE Legacy Pairing method using TK=0 with no user confirmation, providing zero protection against passive eavesdropping and MITM attacks |\n| **LE Secure Connections** | BLE 4.2+ pairing mode using ECDH key exchange (P-256 curve) that provides protection against passive eavesdropping; recommended over Legacy Pairing |\n| **Crackle** | Open-source tool that exploits weaknesses in BLE Legacy Pairing to recover the Long Term Key (LTK) and decrypt captured BLE traffic |\n| **GATTacker** | BLE MITM framework that clones a peripheral's GATT profile and advertising data, then relays traffic between the real device and the victim central |\n\n## Tools & Systems\n\n- **Ubertooth One + ubertooth-btle**: Hardware sniffer and CLI tool for passive BLE packet capture in pcapng\u002Fpcap format\n- **nRF52840 USB Dongle + nRF Sniffer**: Nordic Semiconductor BLE sniffer with native Wireshark extcap integration\n- **bleak**: Cross-platform Python asyncio BLE GATT client library for device scanning, connection, and characteristic read\u002Fwrite\n- **crackle**: BLE Legacy Pairing encryption cracker that recovers LTK from captured pairing exchanges\n- **Wireshark**: Network protocol analyzer with BLE\u002FBTLE dissectors for packet-level inspection of captured traffic\n- **GATTacker \u002F BTLEjuice**: BLE Man-in-the-Middle frameworks for intercepting and modifying BLE traffic between central and peripheral\n- **tshark**: Command-line Wireshark for scripted BLE packet extraction and field analysis\n\n## Common Pitfalls\n\n- **Ubertooth channel hopping limitations**: Ubertooth follows one connection at a time. If multiple BLE connections are active, you must target a specific device address with `-t` to follow its data channels.\n- **BLE 5.0 extended advertising**: Devices using BLE 5.0 extended advertising on secondary channels may not be captured by older Ubertooth firmware. Update to the latest firmware.\n- **bleak platform differences**: BLE scanning behavior varies across OS backends. On Linux, scanning requires root or appropriate capabilities. On macOS, device addresses are randomized UUIDs.\n- **crackle requires Legacy Pairing**: crackle only works against BLE Legacy Pairing (Bluetooth 4.0\u002F4.1). LE Secure Connections (4.2+) use ECDH and cannot be cracked with this approach.\n- **BLE address randomization**: Many modern BLE devices use random resolvable private addresses (RPA) that rotate periodically, making device tracking and connection following more difficult.\n- **Capture format matters**: Use PCAP with PPI headers (`-c` flag) for crackle compatibility. PcapNG (`-r` flag) is recommended for Wireshark analysis but not supported by crackle.\n\n## Output Format\n\n```\n## Finding: BLE Smart Lock Accepts Replayed Unlock Commands\n\n**ID**: BLE-001\n**Severity**: Critical (CVSS 9.3)\n**Device**: SmartLock-Pro (AA:BB:CC:DD:EE:FF)\n**Attack Type**: Replay Attack\n\n**Description**:\nThe BLE smart lock accepts previously captured GATT write commands\non characteristic 0000fff1-0000-1000-8000-00805f9b34fb without\nany freshness validation. An attacker who captures a single unlock\ncommand can replay it indefinitely to unlock the device.\n\n**Proof of Concept**:\n1. Capture unlock command: ubertooth-btle -f -t AA:BB:CC:DD:EE:FF -r capture.pcap\n2. Extract write payload from characteristic fff1: 01 42 A3 7F 00\n3. Replay via bleak: await client.write_gatt_char(CHAR_UUID, bytes.fromhex('0142a37f00'))\n4. Lock disengages without re-authentication\n\n**Impact**:\nAny attacker within BLE range (~100m with directional antenna) who\ncaptures a single unlock event can replay it to gain physical access\nto the protected area indefinitely.\n\n**Remediation**:\nImplement challenge-response authentication with per-session nonces.\nEach command should include a server-generated challenge that expires\nafter use. Use LE Secure Connections for pairing to prevent passive\ncapture of the pairing exchange.\n```\n","# Detecting Bluetooth Low Energy Attacks\n\n## Disclaimer\n\nThis skill is intended for authorized security testing, penetration testing engagements, CTF competitions, and educational purposes only. Sniffing, intercepting, or manipulating Bluetooth communications without authorization may violate federal wiretapping laws and local regulations. Always obtain explicit written permission before conducting any wireless security assessment.\n\n## When to Use\n\nUse this skill when:\n- Performing authorized BLE security assessments of IoT devices, medical devices, or smart locks\n- Monitoring a wireless environment for BLE-based replay attacks, spoofing, or unauthorized enumeration\n- Analyzing BLE packet captures to detect Man-in-the-Middle attacks or pairing exploitation\n- Enumerating GATT services and characteristics to identify insecure read\u002Fwrite permissions on BLE peripherals\n- Assessing BLE encryption strength and testing for crackable pairing exchanges\n- Building BLE intrusion detection capabilities for wireless security monitoring\n\n**Do not use** for intercepting BLE communications without explicit authorization. Do not deploy BLE scanning tools in environments where wireless monitoring is prohibited.\n\n## Prerequisites\n\n- Ubertooth One hardware for passive BLE sniffing, or Nordic nRF52840 USB Dongle with nRF Sniffer firmware\n- Python 3.10+ with pip\n- bleak library: `pip install bleak` (cross-platform BLE GATT client)\n- Wireshark with BLE dissector plugins for packet analysis\n- crackle tool for BLE encryption analysis: built from source at github.com\u002Fmikeryan\u002Fcrackle\n- ubertooth-btle CLI tools: `apt install ubertooth` (Linux) or build from source\n- Bluetooth 4.0+ adapter on the host system for bleak-based scanning\n- Linux recommended for full Ubertooth\u002FnRF sniffer support\n\n## Workflow\n\n### Step 1: BLE Environment Discovery and Device Scanning\n\nScan the environment to identify BLE devices and their advertising data:\n\n```bash\n# Scan for BLE devices using bleak (cross-platform)\npython -c \"\nimport asyncio\nfrom bleak import BleakScanner\n\nasync def scan():\n    devices = await BleakScanner.discover(timeout=10.0)\n    for d in devices:\n        print(f'{d.address} | RSSI: {d.rssi} | Name: {d.name or \\\"Unknown\\\"}')\n        for uuid in d.metadata.get('uuids', []):\n            print(f'  Service: {uuid}')\n\nasyncio.run(scan())\n\"\n\n# Passive BLE sniffing with Ubertooth One (promiscuous mode)\nubertooth-btle -p -r capture.pcapng\n\n# Follow a specific BLE connection\nubertooth-btle -f -t AA:BB:CC:DD:EE:FF -r connection.pcapng\n\n# Use nRF Sniffer with Wireshark (via extcap interface)\nwireshark -i nRF_Sniffer -k\n```\n\n### Step 2: GATT Service and Characteristic Enumeration\n\nConnect to target BLE peripherals and enumerate their GATT profile:\n\n```bash\n# Enumerate all services, characteristics, and descriptors\npython -c \"\nimport asyncio\nfrom bleak import BleakClient\n\nasync def enum_gatt(address):\n    async with BleakClient(address) as client:\n        print(f'Connected: {client.is_connected}')\n        for service in client.services:\n            print(f'Service: {service.uuid} - {service.description}')\n            for char in service.characteristics:\n                props = ','.join(char.properties)\n                print(f'  Char: {char.uuid} | Props: {props}')\n                for desc in char.descriptors:\n                    val = await client.read_gatt_descriptor(desc.handle)\n                    print(f'    Desc: {desc.uuid} = {val}')\n\nasyncio.run(enum_gatt('AA:BB:CC:DD:EE:FF'))\n\"\n```\n\nSecurity-relevant findings during GATT enumeration:\n- Characteristics with `write-without-response` or `write` without authentication\n- Readable characteristics exposing device configuration, credentials, or firmware versions\n- Missing Client Characteristic Configuration Descriptor (CCCD) protection on notification characteristics\n\n### Step 3: BLE Packet Capture and Analysis\n\nCapture BLE traffic for offline analysis:\n\n```bash\n# Capture with Ubertooth in PcapNG format (recommended)\nubertooth-btle -f -r capture.pcapng\n\n# Capture in PCAP\u002FPPI format for crackle compatibility\nubertooth-btle -f -c capture_ppi.pcap\n\n# Analyze capture in Wireshark\nwireshark capture.pcapng\n# Apply display filter: btle\n# Filter connection requests: btle.advertising_header.pdu_type == 0x05\n# Filter data packets: btle.data_header\n\n# Extract pairing information with tshark\ntshark -r capture.pcapng -Y \"btle.control_opcode == 0x01\" -T fields \\\n  -e btle.master_bd_addr -e btle.slave_bd_addr\n```\n\n### Step 4: BLE Encryption Analysis with Crackle\n\nAnalyze captured pairing exchanges to test encryption strength:\n\n```bash\n# Crack BLE Legacy Pairing (Just Works \u002F passkey)\ncrackle -i capture_ppi.pcap -o decrypted.pcap\n\n# Crack with known Temporary Key (TK)\ncrackle -i capture_ppi.pcap -o decrypted.pcap -l 000000\n\n# Analyze decrypted traffic\nwireshark decrypted.pcap\n```\n\nBLE Legacy Pairing with Just Works mode uses a TK of all zeros, making it trivially\ncrackable. Passkey entry uses a 6-digit PIN (000000-999999) that can be brute-forced\nin under a second. Only BLE Secure Connections (LE Secure Connections with ECDH)\nprovides adequate protection against passive eavesdropping.\n\n### Step 5: Replay Attack Detection and Testing\n\nMonitor for and test BLE replay attack susceptibility:\n\n```bash\n# Capture characteristic write operations\n# Record the raw bytes written to a target characteristic\n# Then replay the exact same bytes to test if the device accepts stale commands\n\npython -c \"\nimport asyncio\nfrom bleak import BleakClient\n\nTARGET = 'AA:BB:CC:DD:EE:FF'\nCHAR_UUID = '0000fff1-0000-1000-8000-00805f9b34fb'\n\nasync def replay_test():\n    async with BleakClient(TARGET) as client:\n        # Step 1: Read current state\n        val = await client.read_gatt_char(CHAR_UUID)\n        print(f'Current value: {val.hex()}')\n\n        # Step 2: Write a command (captured from previous session)\n        captured_command = bytes.fromhex('0102030405')\n        await client.write_gatt_char(CHAR_UUID, captured_command)\n        print('Replayed captured command')\n\n        # Step 3: Verify if command was accepted\n        new_val = await client.read_gatt_char(CHAR_UUID)\n        print(f'New value: {new_val.hex()}')\n        if new_val != val:\n            print('VULNERABLE: Device accepted replayed command')\n\nasyncio.run(replay_test())\n\"\n```\n\nIndicators of replay vulnerability:\n- Device accepts previously captured write commands without freshness validation\n- No sequence number, timestamp, or challenge-response mechanism in the protocol\n- Device state changes in response to replayed commands\n\n### Step 6: Man-in-the-Middle Detection\n\nDetect BLE MITM attacks by monitoring for anomalous behavior:\n\n```bash\n# Monitor for BLE address spoofing (device impersonation)\n# Compare advertising data fingerprints over time\n\n# Monitor for unexpected connection parameter changes\ntshark -r capture.pcapng -Y \"btle.control_opcode == 0x00\" -T fields \\\n  -e btle.control.interval.min -e btle.control.interval.max\n\n# Detect GATTacker\u002FBTLEjuice MITM patterns:\n# - Cloned advertising data with different BD_ADDR\n# - Rapid connect\u002Fdisconnect cycles on the same channel\n# - Duplicate service UUIDs from different addresses\n\n# Monitor for suspicious pairing requests\ntshark -r capture.pcapng -Y \"btl2cap.cid == 0x0006\" -T fields \\\n  -e btsmp.opcode -e btsmp.io_capability -e btsmp.auth_req\n```\n\n### Step 7: Continuous BLE Security Monitoring\n\nDeploy ongoing BLE monitoring for threat detection:\n\n```bash\n# Run the agent in monitoring mode\npython agent.py --mode monitor --duration 3600 --output ble_alerts.json\n\n# Combine with Ubertooth for passive monitoring\nubertooth-btle -p -r - | python agent.py --mode analyze --pcap-stdin\n\n# Alert on specific threat indicators\npython agent.py --mode monitor --alert-on replay,spoofing,weak-pairing\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|-----------|\n| **BLE (Bluetooth Low Energy)** | Low-power wireless protocol (Bluetooth 4.0+) optimized for IoT devices, operating on 2.4 GHz with 40 channels (3 advertising, 37 data) |\n| **GATT (Generic Attribute Profile)** | BLE data model organizing device capabilities into services, characteristics, and descriptors; the primary interface for reading\u002Fwriting BLE device data |\n| **Ubertooth One** | Open-source 2.4 GHz wireless development platform capable of passive BLE and Bluetooth Classic sniffing across all BLE channels |\n| **nRF Sniffer** | Nordic Semiconductor firmware for nRF52840 USB dongle that enables BLE packet capture with Wireshark integration via extcap |\n| **Replay Attack** | Attack where previously captured BLE commands are retransmitted to a device to trigger unauthorized actions without knowledge of encryption keys |\n| **Just Works Pairing** | BLE Legacy Pairing method using TK=0 with no user confirmation, providing zero protection against passive eavesdropping and MITM attacks |\n| **LE Secure Connections** | BLE 4.2+ pairing mode using ECDH key exchange (P-256 curve) that provides protection against passive eavesdropping; recommended over Legacy Pairing |\n| **Crackle** | Open-source tool that exploits weaknesses in BLE Legacy Pairing to recover the Long Term Key (LTK) and decrypt captured BLE traffic |\n| **GATTacker** | BLE MITM framework that clones a peripheral's GATT profile and advertising data, then relays traffic between the real device and the victim central |\n\n## Tools & Systems\n\n- **Ubertooth One + ubertooth-btle**: Hardware sniffer and CLI tool for passive BLE packet capture in pcapng\u002Fpcap format\n- **nRF52840 USB Dongle + nRF Sniffer**: Nordic Semiconductor BLE sniffer with native Wireshark extcap integration\n- **bleak**: Cross-platform Python asyncio BLE GATT client library for device scanning, connection, and characteristic read\u002Fwrite\n- **crackle**: BLE Legacy Pairing encryption cracker that recovers LTK from captured pairing exchanges\n- **Wireshark**: Network protocol analyzer with BLE\u002FBTLE dissectors for packet-level inspection of captured traffic\n- **GATTacker \u002F BTLEjuice**: BLE Man-in-the-Middle frameworks for intercepting and modifying BLE traffic between central and peripheral\n- **tshark**: Command-line Wireshark for scripted BLE packet extraction and field analysis\n\n## Common Pitfalls\n\n- **Ubertooth channel hopping limitations**: Ubertooth follows one connection at a time. If multiple BLE connections are active, you must target a specific device address with `-t` to follow its data channels.\n- **BLE 5.0 extended advertising**: Devices using BLE 5.0 extended advertising on secondary channels may not be captured by older Ubertooth firmware. Update to the latest firmware.\n- **bleak platform differences**: BLE scanning behavior varies across OS backends. On Linux, scanning requires root or appropriate capabilities. On macOS, device addresses are randomized UUIDs.\n- **crackle requires Legacy Pairing**: crackle only works against BLE Legacy Pairing (Bluetooth 4.0\u002F4.1). LE Secure Connections (4.2+) use ECDH and cannot be cracked with this approach.\n- **BLE address randomization**: Many modern BLE devices use random resolvable private addresses (RPA) that rotate periodically, making device tracking and connection following more difficult.\n- **Capture format matters**: Use PCAP with PPI headers (`-c` flag) for crackle compatibility. PcapNG (`-r` flag) is recommended for Wireshark analysis but not supported by crackle.\n\n## Output Format\n\n```\n## Finding: BLE Smart Lock Accepts Replayed Unlock Commands\n\n**ID**: BLE-001\n**Severity**: Critical (CVSS 9.3)\n**Device**: SmartLock-Pro (AA:BB:CC:DD:EE:FF)\n**Attack Type**: Replay Attack\n\n**Description**:\nThe BLE smart lock accepts previously captured GATT write commands\non characteristic 0000fff1-0000-1000-8000-00805f9b34fb without\nany freshness validation. An attacker who captures a single unlock\ncommand can replay it indefinitely to unlock the device.\n\n**Proof of Concept**:\n1. Capture unlock command: ubertooth-btle -f -t AA:BB:CC:DD:EE:FF -r capture.pcap\n2. Extract write payload from characteristic fff1: 01 42 A3 7F 00\n3. Replay via bleak: await client.write_gatt_char(CHAR_UUID, bytes.fromhex('0142a37f00'))\n4. Lock disengages without re-authentication\n\n**Impact**:\nAny attacker within BLE range (~100m with directional antenna) who\ncaptures a single unlock event can replay it to gain physical access\nto the protected area indefinitely.\n\n**Remediation**:\nImplement challenge-response authentication with per-session nonces.\nEach command should include a server-generated challenge that expires\nafter use. Use LE Secure Connections for pairing to prevent passive\ncapture of the pairing exchange.\n```\n",{"name":5,"tags":52,"author":9,"domain":45,"license":15,"version":53,"nist_csf":54,"subdomain":31,"description":58,"mitre_attack":59},[36,35,34,33,32,31,30,29],"1.0.0",[55,56,57],"PR.IR-01","DE.CM-01","ID.AM-03","Detects and analyzes Bluetooth Low Energy (BLE) security attacks including sniffing, replay attacks, GATT enumeration abuse, and Man-in-the-Middle interception. Uses Ubertooth One and nRF52840 sniffers for packet capture, the bleak Python library for GATT service enumeration, and crackle for BLE encryption cracking. Use when assessing IoT device BLE security, monitoring for BLE-based attacks on wireless infrastructure, or performing authorized BLE penetration testing. Activates for requests involving BLE security assessment, Ubertooth sniffing, GATT enumeration, or BLE replay detection.\n",[60,61,62,63],"T1011.001","T1557","T1040","T1200","main","54a798831d2266a3ca61ce68a7acb80b81160d57","skills\u002Fdetecting-bluetooth-low-energy-attacks",4414,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","https:\u002F\u002Fmahipal.engineer\u002FAnthropic-Cybersecurity-Skills\u002F","https:\u002F\u002Fgithub.com\u002Fmukul975","Mahipal.engineer","🔐 Cybersecurity | 💻 Dev | 📷 Street Photographer\r\n🎓 MSc | 📚 Research & AI Security","2026-08-31 12:32:44",{"source":8,"skillName":5,"commands":75,"prompt":85,"zipAvailable":86},[76,79,82],{"tool":77,"command":78},"npx","npx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill detecting-bluetooth-low-energy-attacks",{"tool":80,"command":81},"bunx","bunx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill detecting-bluetooth-low-energy-attacks",{"tool":83,"command":84},"pnpm","pnpm dlx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill detecting-bluetooth-low-energy-attacks","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fdetecting-bluetooth-low-energy-attacks\u002FSKILL.md",true,[88,93,99],{"path":89,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":91,"sourceHtmlUrl":92},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fdetecting-bluetooth-low-energy-attacks\u002FLICENSE",{"path":94,"resourceType":95,"resourceTypeDesc":96,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002Fapi-reference.md","REFERENCE","参考文档",5350,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fdetecting-bluetooth-low-energy-attacks\u002Freferences\u002Fapi-reference.md",{"path":100,"resourceType":101,"resourceTypeDesc":102,"sizeBytes":103,"sourceHtmlUrl":104},"scripts\u002Fagent.py","SCRIPT","脚本",26357,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fdetecting-bluetooth-low-energy-attacks\u002Fscripts\u002Fagent.py",[106,132,156,181,207,234],{"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":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":113,"publishedAt":47},"01M6AGDM3HJXTKXX15ZZ0ZVCJ3","verifying-build-provenance-with-slsa-sigstore","Verifies artifact signatures and SLSA provenance using Sigstore's cosign (verify, verify-attestation, verify-blob-attestation) and slsa-verifier (verify-artifact), enforcing keyless OIDC builder identity and source repo against SLSA Build levels. Use in CI\u002FCD before deploying artifacts, when consuming third-party attestations, establishing a SLSA Build L3 pipeline, or confirming provenance during incident response or admission control.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fverifying-build-provenance-with-slsa-sigstore\u002FSKILL.md",[112],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[114,115,116,117,118,45,119,120,44,121,122,123,124,125,126,127,128,129,130,131],"sigstore","provenance","slsa","verifying build provenance with slsa sigstore","security","incident response","identity","code","artifacts","ci","supply-chain","pipeline","supply-chain-security","t1195","attestation","code-signing","cosign","keyless",{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":139,"publishedAt":47},"01M6AGDGBPWYVZ2F11GFKJ4HZ9","validating-tpm-measured-boot-attestation","Verifies TPM 2.0 measured-boot integrity and remote attestation with tpm2-tools -- reading PCRs (tpm2_pcrread), replaying the boot event log, generating and checking signed quotes (tpm2_quote\u002Ftpm2_checkquote), and sealing secrets to a PCR policy. Use to confirm a system booted trusted firmware\u002Fkernel for Zero Trust device posture, detect boot-chain tampering via PCR drift, or build a golden-value baseline for fleet attestation.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-tpm-measured-boot-attestation\u002FSKILL.md",[138],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[140,128,141,142,118,143,45,44,144,145,146,147,148,149,150,151,152,153,154,155],"boot","TPM","validating tpm measured boot attestation","policy","verification","ZeRO","firmware","Tools","measured-boot","PCR","integrity","secrets","remote-attestation","tpm2-tools","integrity-verification","trusted-computing",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":164,"publishedAt":47},"01M6AGDCW0Y4FXZ3362GT1941M","validating-backup-integrity-for-recovery","Validates backup integrity through cryptographic hash verification, automated restore testing, corruption detection, and recoverability checks to confirm backups are reliable for disaster recovery and ransomware response. Use before relying on backups for recovery, when building post-backup validation pipelines, auditing backup infrastructure for compliance, or checking immutable\u002Fair-gapped backups for silent corruption or tampering.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-backup-integrity-for-recovery\u002FSKILL.md",[162,163],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[150,165,166,167,37,45,168,169,144,170,171,172,173,174,175,176,177,178,179,180],"backup","recovery","validating backup integrity for recovery","infrastructure","validation","compliance","hash-verification","incident-response","ransomware","cryptocurrency","detection","t1078","t1490","immutable","disaster-recovery","restore-testing",{"skillNo":182,"name":183,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":185,"categories":186,"keywords":188,"publishedAt":47},"01M6AGD9GBG2KZ336AE763J3WH","triaging-windows-with-kape","Runs KAPE (Kroll Artifact Parser and Extractor) to collect targeted forensic artifacts (registry hives, $MFT, event logs, prefetch, browser data) via Targets and parse them with Modules wrapping Eric Zimmerman's EZ Tools (PECmd, MFTECmd, RECmd). Use during early incident containment\u002Ftriage when full disk imaging is impractical but a defensible, parseable Windows artifact set is needed quickly, including at-scale remote collection.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-windows-with-kape\u002FSKILL.md",[187],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[189,190,191,45,192,193,194,195,196,197,198,199,200,201,202,203,147,204,205,206],"windows","kape","triaging windows with kape","registry","browser","logs","windows-forensics","dfir","mft","mftecmd","data","prefetch","eric-zimmerman","digital-forensics","SET","collection","pecmd","artifact-collection",{"skillNo":208,"name":209,"nameZh":6,"description":210,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":211,"categories":212,"keywords":214,"publishedAt":47},"01M6AGD5PW5J4EVZM958WD74ZQ","triaging-vulnerabilities-with-ssvc-framework","Triages and prioritizes vulnerabilities with CISA's Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree, weighing exploitation status (via the CISA KEV catalog and FIRST EPSS API), technical impact, automatability, and mission prevalence to output Track\u002FTrack*\u002FAttend\u002FAct decisions. Use when prioritizing vulnerability scan results (OpenVAS, Nessus, Qualys) for remediation planning beyond raw CVSS scores.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-vulnerabilities-with-ssvc-framework\u002FSKILL.md",[213],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[215,216,217,45,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233],"vulnerabilities","framework","triaging vulnerabilities with ssvc framework","status","planning","CISA","vulnerability-management","risk-management","nessus","qualys","openvas","cvss","remediation","risk","vulnerability","api","prioritization","ssvc","decision-tree",{"skillNo":235,"name":236,"nameZh":6,"description":237,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":238,"categories":239,"keywords":241,"publishedAt":47},"01M6AGD24TTQQM4CXG69E3B9TJ","triaging-security-incident","Performs initial triage of security incidents using the NIST SP 800-61r3 and SANS PICERL frameworks, classifying incident type, assigning priority by business impact, and routing to the appropriate response team. Use when a SIEM\u002FEDR alert needs human classification, concurrent alerts must be prioritized, or a user report or threat-intel IOC match requires initial incident categorization.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-security-incident\u002FSKILL.md",[240],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[118,242,45,243,244,245,246,247,248,249,250,176,251,177,252,253,254,255,256,257],"triaging security incident","siem","file","ioc","soc","NIST-800-61","NIST","severity","edr","execution","analysis","classification","severity-classification","incident-triage","SANS-PICERL","SOC-operations"]