CVE-2023-7004
Executive Summary
CVE-2023-7004 exposes a critical flaw in the TTLock mobile application, where the app fails to properly verify the identity of the Bluetooth device it connects to. This allows an attacker to spoof the MAC address of a legitimate lock and establish a connection, effectively compromising the lock's integrity. The vulnerability is rooted in improper certificate or device identity validation (CWE-295), enabling a man-in-the-middle or device spoofing attack. No patch or public exploit code has been identified at this time.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (No official vector assigned)
- Attack Vector (AV): Adjacent Network (Bluetooth)
- Attack Complexity (AC): Low
- Privileges Required (PR): None
- User Interaction (UI): Required (user must open app and attempt to connect)
- Scope (S): Unchanged
- Confidentiality (C): High (attacker can intercept lock state)
- Integrity (I): High (attacker can send commands to lock)
- Availability (A): Low (attacker could lock/unlock device)
- Threat Level: High – Exploitation requires physical proximity but no authentication bypass.
Deep Dive & Mechanics
The TTLock app communicates with smart locks over Bluetooth Low Energy (BLE). During pairing or connection, the app should verify the lock's identity using a cryptographic challenge or certificate. CVE-2023-7004 indicates that this verification is absent or flawed. An attacker can:
- Scan for BLE devices advertising as a TTLock.
- Spoof the MAC address of a legitimate lock (easily done with tools like
hcitoolorbluetoothctl). - When the user opens the app, it connects to the attacker's device instead of the real lock.
- The attacker can then relay commands, capture credentials, or send malicious commands to the lock.
The root cause is the lack of mutual authentication or device certificate validation in the BLE communication protocol.
Vulnerable vs. Patched Code
No specific code diff is available. The vulnerability is architectural: the app does not implement a secure pairing mechanism (e.g., using BLE Secure Connections with numeric comparison or out-of-band verification). A patched version would:
- Implement BLE Secure Connections with MITM protection.
- Require the lock to present a signed certificate or shared secret.
- Validate the lock's identity before accepting commands.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A Bluetooth-capable device (e.g., Raspberry Pi with Bluetooth adapter).
- Tools:
bluez,gatttool,hcitool,bettercap(BLE module).
Steps:
- Identify the target lock's MAC address using
hcitool lescan. - Spoof the MAC address:
sudo hcitool cmd 0x3f 0x001 0x01 <new_mac>. - Advertise as the lock using a custom BLE GATT server that mimics the lock's services.
- Wait for the user to open the TTLock app – it will connect to your spoofed device.
- Intercept or inject commands.
Lab Setup:
- Use two BLE devices: one as the victim lock (real), one as attacker.
- Run
bettercapwith BLE module to automate spoofing and MITM.
Blue Team
Detection:
- Monitor for multiple BLE devices advertising the same MAC address (duplicate MAC detection).
- Use BLE sniffer (e.g., Ubertooth) to capture and analyze connection attempts.
- Log all BLE pairing events on the mobile device.
Prevention:
- Ensure the app uses BLE Secure Connections with MITM protection.
- Implement out-of-band verification (e.g., QR code scan on lock).
- Use a rotating session key or certificate pinning.
Indicators of Compromise (IOCs)
- Network: BLE packets with duplicate MAC addresses in close proximity.
- Host: Mobile device logs showing unexpected BLE connection drops or reconnections.
- File: No specific file IOCs.
- Registry: N/A (mobile app).
- Behavior: Lock responds to commands without physical interaction.
Detection Engineering
YARA Rule
rule CVE_2023_7004_TTLock_Spoofing {
meta:
description = "Detects TTLock app BLE connection without proper verification"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2023-7004"
strings:
$ble_service = "0000fff0-0000-1000-8000-00805f9b34fb" // TTLock BLE service UUID
$no_auth = "No authentication" // indicative log string
condition:
$ble_service and $no_auth
}
Sigma Rule
title: TTLock BLE Spoofing Detection
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects BLE connections to TTLock without proper device verification
author: Valters IT
logsource:
product: mobile_device
service: bluetooth
detection:
selection:
EventID: 1001 // BLE connection event
ServiceUUID: "0000fff0-0000-1000-8000-00805f9b34fb"
Authentication: "None"
condition: selection
falsepositives:
- Legitimate connections with older app versions
level: high
Suricata Rule
alert tcp any any -> any any (msg:"CVE-2023-7004 TTLock BLE Spoofing Attempt"; flow:to_server; content:"|00 00 ff f0|"; distance:0; within:4; content:"|00 00 10 00|"; distance:0; within:4; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable Bluetooth when not in use. Use physical key override if available.
- Vendor: TTLock must release an update implementing BLE Secure Connections with MITM protection and device certificate validation.
- User: Update the TTLock app to the latest version (if patch becomes available). Avoid using the app in untrusted environments.
- Network: No network-level mitigation possible due to BLE local nature.
Valters IT
DevSecOps & Cyber Threat Intelligence
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.