[go: up one dir, main page]

CN112640513B - Method and device for detecting Bluetooth vulnerability attack - Google Patents

Method and device for detecting Bluetooth vulnerability attack Download PDF

Info

Publication number
CN112640513B
CN112640513B CN202080004433.8A CN202080004433A CN112640513B CN 112640513 B CN112640513 B CN 112640513B CN 202080004433 A CN202080004433 A CN 202080004433A CN 112640513 B CN112640513 B CN 112640513B
Authority
CN
China
Prior art keywords
communication data
bluetooth
encryption key
receiving device
communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202080004433.8A
Other languages
Chinese (zh)
Other versions
CN112640513A (en
Inventor
那键
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yinwang Intelligent Technology Co ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN112640513A publication Critical patent/CN112640513A/en
Application granted granted Critical
Publication of CN112640513B publication Critical patent/CN112640513B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/12Detection or prevention of fraud
    • H04W12/121Wireless intrusion detection systems [WIDS]; Wireless intrusion prevention systems [WIPS]
    • H04W12/122Counter-measures against attacks; Protection against rogue devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Small-Scale Networks (AREA)

Abstract

The application discloses a method and a device for detecting Bluetooth vulnerability attack, which can realize man-in-the-middle attack detection aiming at different communication stages involved in a Bluetooth protocol and solve the problem that effective precautionary measures aiming at the Bluetooth man-in-the-middle attack are rare in the prior art. The method comprises the following steps: identifying the Bluetooth equipment to be detected in a preset range, and determining the Bluetooth equipment pair to be detected according to the pairing result of the Bluetooth equipment to be detected; acquiring and analyzing first communication data from a communication data transmitting device in the first Bluetooth device pair, and acquiring and analyzing second communication data from a communication data receiving device in the first Bluetooth device pair; and judging whether the first communication data is the same as the second communication data, and if not, determining that the first Bluetooth equipment attacks the man-in-the-middle.

Description

一种检测蓝牙漏洞攻击的方法及装置Method and device for detecting Bluetooth vulnerability attack

技术领域technical field

本申请涉及通信技术领域,尤其涉及一种检测蓝牙漏洞攻击的方法及装置。The present application relates to the field of communication technologies, and in particular, to a method and device for detecting a Bluetooth vulnerability attack.

背景技术Background technique

蓝牙是一种在移动电话和其他配件间进行低成本、短距离无线通信的技术。随着智能手机、智能家居、智慧医疗的不断发展,蓝牙通信应用场景不断拓展,具有蓝牙功能的设备深入到日常工作生活的方方面面,随之而来的蓝牙攻击事件也不断增多,蓝牙漏洞已经成为公开漏洞库的重要组成部分,防范蓝牙漏洞攻击产生的危害也成为相关设备厂商的重要工作之一。Bluetooth is a technology for low-cost, short-range wireless communication between mobile phones and other accessories. With the continuous development of smart phones, smart homes, and smart medical care, the application scenarios of Bluetooth communication continue to expand, and devices with Bluetooth functions have penetrated into all aspects of daily work and life. The subsequent Bluetooth attacks are also increasing, and Bluetooth vulnerabilities have become Disclosing an important part of the vulnerability library and preventing the harm caused by Bluetooth vulnerability attacks has also become one of the important tasks of related equipment manufacturers.

目前,伴随着蓝牙技术的发展,针对蓝牙的攻击技术也不断进化,主要包括重放攻击、拒绝服务攻击和中间人攻击等攻击技术。在众多攻击技术中,中间人攻击是一种常用技术,中间人攻击可以监听、收集甚至篡改通信双方的通信内容,使得正常的通信中断,而通信双方往往很难发现,并且认为自己仍然是在正常通信,对于中间人攻击,目前的防范措施非常有限,起到的作用也是微乎其微,针对蓝牙的中间人攻击的有效防范措施就更加稀少。At present, with the development of Bluetooth technology, the attack technologies against Bluetooth are also evolving, mainly including replay attacks, denial-of-service attacks, and man-in-the-middle attacks. Among many attack technologies, man-in-the-middle attack is a commonly used technique. Man-in-the-middle attacks can monitor, collect and even tamper with the communication content of the two communication parties, interrupting normal communication, while the communication parties are often difficult to find and think that they are still in normal communication. , for the man-in-the-middle attack, the current preventive measures are very limited, and the effect is minimal, and the effective preventive measures against the Bluetooth man-in-the-middle attack are even rarer.

发明内容SUMMARY OF THE INVENTION

本申请提供一种检测蓝牙漏洞攻击的方法及装置,以解决现有技术中针对蓝牙的中间人攻击的有效防范措施稀少的问题。The present application provides a method and device for detecting Bluetooth vulnerability attacks, so as to solve the problem that effective preventive measures against Bluetooth man-in-the-middle attacks are scarce in the prior art.

第一方面,本申请实施例提供一种检测蓝牙漏洞攻击的方法,包括:识别预设范围内的待检测的蓝牙设备,根据所述待检测的蓝牙设备进行两两配对的结果,确定待检测的蓝牙设备对;从第一蓝牙设备对中的通信数据发送设备处采集并解析出第一通信数据,从所述第一蓝牙设备对中的通信数据接收设备处采集并解析出第二通信数据;其中,第一蓝牙设备对为所述待检测的任一蓝牙设备对,所述第一通信数据为所述通信数据发送设备通过蓝牙连接向所述通信数据接收设备发送的通信数据,所述第二通信数据为所述通信数据接收设备通过蓝牙连接接收的携带有所述通信数据发送设备的标识信息的通信数据;判断所述第一通信数据与所述第二通信数据是否相同,若不相同,确定所述第一蓝牙设备对存在中间人攻击。In a first aspect, an embodiment of the present application provides a method for detecting a Bluetooth vulnerability attack, including: identifying a Bluetooth device to be detected within a preset range, and determining a to-be-detected Bluetooth device according to a pairwise pairing result of the to-be-detected Bluetooth device. The pair of Bluetooth devices; the first communication data is collected and parsed from the communication data sending device in the first Bluetooth device pair, and the second communication data is collected and parsed from the communication data receiving device in the first Bluetooth device pair. ; wherein, the first pair of bluetooth devices is any pair of bluetooth devices to be detected, the first communication data is the communication data sent by the communication data sending device to the communication data receiving device through a Bluetooth connection, and the The second communication data is the communication data that is received by the communication data receiving device through the Bluetooth connection and carries the identification information of the communication data sending device; determine whether the first communication data and the second communication data are the same, if not Similarly, it is determined that there is a man-in-the-middle attack on the first pair of Bluetooth devices.

基于上述技术方案,针对蓝牙协议中涉及到的不同通信阶段,采集并解析出第一蓝牙设备对中的通信数据发送设备和通信数据接收设备在进行蓝牙通信时的同一通信阶段中的通信数据,即第一通信数据和第二通信数据,若通信数据发送设备与通信数据接收设备之间不存在中间人攻击,则同一通信阶段中通信数据发送设备的通信数据和通信数据接收设备的通信数据应相同,若通信数据发送设备与通信数据接收设备之间存在中间人攻击,则该中间人将篡改通信数据发送设备与通信数据接收设备在进行蓝牙通信时的同一通信阶段中的通信数据,导致同一通信阶段中通信数据发送设备的通信数据和通信数据接收设备的通信数据存在不同,通过判断第一通信数据与第二通信数据是否相同,确定第一蓝牙设备对是否存在中间人攻击。本申请实施例所提供的方法从蓝牙协议分层特性角度出发,扩大了中间人攻击检测的适用范围,检测方法不仅适用于加密密钥协商阶段的中间人攻击检测,也适用于加密会话建立之后的中间人攻击检测。且检测设备只需要具备采集解析功能和数据比对功能,不需要具备密码算法协商、数据加解密、设备配对等复杂功能,成本较低。Based on the above technical solutions, for different communication stages involved in the Bluetooth protocol, the communication data in the same communication stage when the communication data transmitting device and the communication data receiving device in the first Bluetooth device pair are collected and analyzed are obtained during Bluetooth communication, That is, the first communication data and the second communication data, if there is no man-in-the-middle attack between the communication data sending device and the communication data receiving device, the communication data of the communication data sending device and the communication data receiving device in the same communication stage should be the same. If there is a man-in-the-middle attack between the communication data sending device and the communication data receiving device, the middle man will tamper with the communication data in the same communication stage when the communication data sending device and the communication data receiving device are conducting Bluetooth communication, resulting in the same communication stage. The communication data of the communication data sending device is different from the communication data of the communication data receiving device. By judging whether the first communication data and the second communication data are the same, it is determined whether there is a man-in-the-middle attack on the first Bluetooth device. From the perspective of the layered characteristics of the Bluetooth protocol, the method provided by the embodiment of the present application expands the applicable scope of the man-in-the-middle attack detection. Attack detection. And the detection device only needs to have the function of collection and analysis and data comparison, and does not need to have complex functions such as cryptographic algorithm negotiation, data encryption and decryption, and device pairing, and the cost is low.

一种可能的设计中,所述从第一蓝牙设备对中的通信数据发送设备处采集并解析出第一通信数据,从所述第一蓝牙设备对中的通信数据接收设备处采集并解析出第二通信数据,包括:在所述第一蓝牙设备对进行加密密钥协商时,从所述通信数据发送设备处采集所述通信数据发送设备通过蓝牙连接发送的所有加密密钥长度协商请求,从所述通信数据接收设备处采集所述通信数据接收设备通过蓝牙连接接收的所有加密密钥长度协商请求;根据所述通信数据发送设备和所述通信数据接收设备的标识信息,从所述通信数据发送设备通过蓝牙连接发送的所有加密密钥长度协商请求中确定出向所述通信数据接收设备发送的第一加密密钥长度协商请求,从所述通信数据接收设备通过蓝牙连接接收的所有加密密钥长度协商请求中确定出携带有所述通信数据发送设备的标识信息的第二加密密钥长度协商请求;确定所述第一加密密钥长度协商请求中的第一加密密钥长度为所述第一通信数据,以及确定所述第二加密密钥长度协商请求中的第二加密密钥长度为所述第二通信数据。In a possible design, the first communication data is collected and parsed from the communication data sending device in the first Bluetooth device pair, and the first communication data is collected and parsed from the communication data receiving device in the first Bluetooth device pair. The second communication data includes: when the first Bluetooth device pair performs encryption key negotiation, collecting all encryption key length negotiation requests sent by the communication data transmission device through the Bluetooth connection from the communication data transmission device, Collect all encryption key length negotiation requests received by the communication data receiving device through the Bluetooth connection from the communication data receiving device; The first encryption key length negotiation request sent to the communication data receiving device is determined from all the encryption key length negotiation requests sent by the data sending device through the Bluetooth connection, and all encryption keys received from the communication data receiving device through the Bluetooth connection are determined. The second encryption key length negotiation request carrying the identification information of the communication data sending device is determined in the key length negotiation request; it is determined that the first encryption key length in the first encryption key length negotiation request is the the first communication data, and determining that the second encryption key length in the second encryption key length negotiation request is the second communication data.

一种可能的设计中,所述判断所述第一通信数据与所述第二通信数据是否相同,若不相同,确定所述第一蓝牙设备对存在中间人攻击,包括:判断所述第一加密密钥长度与所述第二加密密钥长度是否相同;若所述第一加密密钥长度与所述第二加密密钥长度不相同,则确定所述第一蓝牙设备对存在中间人攻击。In a possible design, the judging whether the first communication data and the second communication data are the same, and if not, determining that the first Bluetooth device has a man-in-the-middle attack, including: judging the first encryption Whether the length of the key is the same as the length of the second encryption key; if the length of the first encryption key is not the same as the length of the second encryption key, it is determined that there is a man-in-the-middle attack on the first Bluetooth device pair.

一种可能的设计中,所述从第一蓝牙设备对中的通信数据发送设备处采集并解析出第一通信数据,从所述第一蓝牙设备对中的通信数据接收设备处采集并解析出第二通信数据,包括:从第一蓝牙设备对中的通信数据发送设备处采集所述通信数据发送设备通过蓝牙连接发送的所有通信数据,从所述第一蓝牙设备对中的通信数据接收设备处采集所述通信数据接收设备通过蓝牙连接接收的所有通信数据;根据所述通信数据发送设备和所述通信数据接收设备的标识信息,从所述通信数据发送设备通过蓝牙连接发送的所有通信数据中确定出所述第一通信数据,从所述通信数据接收设备通过蓝牙连接接收的所有通信数据中确定出所述第二通信数据。In a possible design, the first communication data is collected and parsed from the communication data sending device in the first Bluetooth device pair, and the first communication data is collected and parsed from the communication data receiving device in the first Bluetooth device pair. The second communication data includes: collecting all communication data sent by the communication data sending device through the Bluetooth connection from the communication data sending device in the first Bluetooth device pair, and receiving the communication data from the communication data receiving device in the first Bluetooth device pair All communication data received by the communication data receiving device through the Bluetooth connection is collected at the The first communication data is determined from the communication data, and the second communication data is determined from all the communication data received by the communication data receiving device through the Bluetooth connection.

一种可能的设计中,所述识别预设范围内的待检测的蓝牙设备,包括:获取所述预设范围内的蓝牙设备的蓝牙广播消息;其中,所述蓝牙广播消息中携带蓝牙设备的标识信息;根据所述蓝牙广播消息,确定所述预设范围内的待检测的蓝牙设备。In a possible design, the identifying a Bluetooth device to be detected within a preset range includes: acquiring a Bluetooth broadcast message of the Bluetooth device within the preset range; wherein the Bluetooth broadcast message carries the information of the Bluetooth device. identification information; according to the Bluetooth broadcast message, determine the Bluetooth device to be detected within the preset range.

一种可能的设计中,所述确定所述第一蓝牙设备对存在中间人攻击之后,所述方法还包括:判断所述第一蓝牙设备对是否存在加密会话数据;若存在加密会话数据,则确定所述第一蓝牙设备对存在中间人攻击且攻击成功;若不存在加密会话数据,则确定所述第一蓝牙设备对存在中间人攻击但攻击未成功。In a possible design, after determining that the first Bluetooth device pair has a man-in-the-middle attack, the method further includes: judging whether the first Bluetooth device pair has encrypted session data; if there is encrypted session data, determining The first Bluetooth device pair has a man-in-the-middle attack and the attack is successful; if there is no encrypted session data, it is determined that the first Bluetooth device pair has a man-in-the-middle attack but the attack is unsuccessful.

一种可能的设计中,所述判断是否存在加密会话数据,包括:若从所述通信数据发送设备处采集到所述通信数据发送设备通过蓝牙连接向所述通信数据接收设备发送的开始加密传输请求,或从所述通信数据接收设备处采集到所述通信数据接收设备通过蓝牙连接接收的携带有所述通信数据发送设备的标识信息的开始加密传输请求,则确定存在加密会话数据;或者,采集并解析出所述通信数据发送设备与所述通信数据接收设备之间的通信数据,根据所述通信数据的统计特性,确定是否存在加密会话数据。In a possible design, the judging whether there is encrypted session data includes: starting encrypted transmission if the communication data sending device is collected from the communication data sending device and sent to the communication data receiving device through a Bluetooth connection. request, or a request to start encrypted transmission that carries the identification information of the communication data sending device and is received by the communication data receiving device through a Bluetooth connection and is collected from the communication data receiving device, then it is determined that encrypted session data exists; or, The communication data between the communication data sending device and the communication data receiving device is collected and analyzed, and whether there is encrypted session data is determined according to the statistical characteristics of the communication data.

基于上述技术方案,针对蓝牙协议中涉及到的加密密钥协商阶段,采集并解析出第一蓝牙设备对中的通信数据发送设备和通信数据接收设备在进行蓝牙通信时的加密密钥协商中的通信数据,即第一加密密钥长度与第二加密密钥长度,通过判断第一加密密钥长度与第二加密密钥长度是否相同,确定第一蓝牙设备对是否存在中间人攻击,实现了加密密钥协商阶段的中间人攻击检测。Based on the above technical solution, for the encryption key negotiation stage involved in the Bluetooth protocol, collect and parse out the encryption key negotiation between the communication data sending device and the communication data receiving device in the first Bluetooth device pair during Bluetooth communication. Communication data, that is, the length of the first encryption key and the length of the second encryption key, by judging whether the length of the first encryption key and the length of the second encryption key are the same, determine whether there is a man-in-the-middle attack on the first Bluetooth device, and realize the encryption Man-in-the-middle attack detection during key negotiation phase.

一种可能的设计中,所述从第一蓝牙设备对中的通信数据发送设备处采集并解析出第一通信数据,从所述第一蓝牙设备对中的通信数据接收设备处采集并解析出第二通信数据,包括:在所述第一蓝牙设备对进行加密传输时,从所述通信数据发送设备处采集所述通信数据发送设备与所述通信数据接收设备之间的第一双向通信数据,从所述通信数据接收设备处采集所述通信数据接收设备与所述通信数据发送设备之间的第二双向通信数据;根据所述第一双向通信数据和所述第二双向通信数据,确定第一加密会话数据和第二加密会话数据分别作为所述第一通信数据和所述第二通信数据。In a possible design, the first communication data is collected and parsed from the communication data sending device in the first Bluetooth device pair, and the first communication data is collected and parsed from the communication data receiving device in the first Bluetooth device pair. The second communication data includes: collecting first bidirectional communication data between the communication data transmission device and the communication data reception device from the communication data transmission device when the first Bluetooth device pair performs encrypted transmission , collect the second two-way communication data between the communication data receiving device and the communication data sending device from the communication data receiving device; according to the first two-way communication data and the second two-way communication data, determine The first encrypted session data and the second encrypted session data are used as the first communication data and the second communication data, respectively.

一种可能的设计中,所述判断所述第一通信数据与所述第二通信数据是否相同,若不相同,确定所述第一蓝牙设备对存在中间人攻击,包括:判断所述第一加密会话数据与所述第二加密会话数据是否相同;若所述第一加密会话数据与所述第二加密会话数据相同,则确定所述第一蓝牙设备对不存在中间人攻击;若所述第一加密会话数据与所述第二加密会话数据不相同,则确定所述第一蓝牙设备对存在中间人攻击。In a possible design, the judging whether the first communication data and the second communication data are the same, and if not, determining that the first Bluetooth device has a man-in-the-middle attack, including: judging the first encryption Whether the session data is the same as the second encrypted session data; if the first encrypted session data is the same as the second encrypted session data, it is determined that there is no man-in-the-middle attack on the first Bluetooth device; If the encrypted session data is different from the second encrypted session data, it is determined that there is a man-in-the-middle attack on the first Bluetooth device.

基于上述技术方案,针对蓝牙协议中涉及到的加密传输阶段,采集并解析出第一蓝牙设备对中的通信数据发送设备和通信数据接收设备在进行蓝牙通信时的加密传输中的通信数据,即第一加密会话数据与第二加密会话数据,通过判断第一加密会话数据与第二加密会话数据是否相同,确定第一蓝牙设备对是否存在中间人攻击,实现了加密会话建立之后的中间人攻击检测。Based on the above technical solution, for the encrypted transmission stage involved in the Bluetooth protocol, the communication data in the encrypted transmission of the communication data transmitting device and the communication data receiving device in the first Bluetooth device pair during the Bluetooth communication is collected and analyzed, that is, The first encrypted session data and the second encrypted session data are determined whether there is a man-in-the-middle attack on the first Bluetooth device by judging whether the first encrypted session data and the second encrypted session data are the same, so as to realize the man-in-the-middle attack detection after the encrypted session is established.

第二方面,本申请还提供一种检测蓝牙漏洞攻击的装置,所述检测蓝牙漏洞攻击的装置具有实现上述第一方面或者第一方面的任一种可能的设计中方法的功能,所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块,比如包括第一确定模块、采集解析模块、第二确定模块。In a second aspect, the present application further provides a device for detecting a Bluetooth vulnerability attack, the device for detecting a Bluetooth vulnerability attack having a function of implementing the first aspect or any possible method in design of the first aspect, the function It can be realized by hardware, or can be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions, such as a first determination module, a collection and analysis module, and a second determination module.

所述第一确定模块,用于识别预设范围内的待检测的蓝牙设备,根据所述待检测的蓝牙设备进行两两配对的结果,确定待检测的蓝牙设备对;The first determining module is used to identify the Bluetooth devices to be detected within a preset range, and to determine the pair of Bluetooth devices to be detected according to the result of pairing the Bluetooth devices to be detected in pairs;

所述采集解析模块,用于从第一蓝牙设备对中的通信数据发送设备处采集并解析出第一通信数据,从所述第一蓝牙设备对中的通信数据接收设备处采集并解析出第二通信数据;其中,第一蓝牙设备对为所述待检测的任一蓝牙设备对,所述第一通信数据为所述通信数据发送设备通过蓝牙连接向所述通信数据接收设备发送的通信数据,所述第二通信数据为所述通信数据接收设备通过蓝牙连接接收的携带有所述通信数据发送设备的标识信息的通信数据;The collection and analysis module is used to collect and parse the first communication data from the communication data sending device in the first Bluetooth device pair, and collect and parse the first communication data from the communication data receiving device in the first Bluetooth device pair. Two communication data; wherein, the first Bluetooth device pair is any Bluetooth device pair to be detected, and the first communication data is communication data sent by the communication data sending device to the communication data receiving device through a Bluetooth connection , the second communication data is the communication data that carries the identification information of the communication data sending device and is received by the communication data receiving device through a Bluetooth connection;

所述第二确定模块,用于判断所述第一通信数据与所述第二通信数据是否相同,若不相同,确定所述第一蓝牙设备对存在中间人攻击。The second determining module is configured to determine whether the first communication data and the second communication data are the same, and if not, determine that there is a man-in-the-middle attack on the first Bluetooth device.

一种可能的设计中,所述采集解析模块,具体用于:在所述第一蓝牙设备对进行加密密钥协商时,从所述通信数据发送设备处采集所述通信数据发送设备通过蓝牙连接发送的所有加密密钥长度协商请求,从所述通信数据接收设备处采集所述通信数据接收设备通过蓝牙连接接收的所有加密密钥长度协商请求;根据所述通信数据发送设备和所述通信数据接收设备的标识信息,从所述通信数据发送设备通过蓝牙连接发送的所有加密密钥长度协商请求中确定出向所述通信数据接收设备发送的第一加密密钥长度协商请求,从所述通信数据接收设备通过蓝牙连接接收的所有加密密钥长度协商请求中确定出携带有所述通信数据发送设备的标识信息的第二加密密钥长度协商请求;确定所述第一加密密钥长度协商请求中的第一加密密钥长度为所述第一通信数据,以及确定所述第二加密密钥长度协商请求中的第二加密密钥长度为所述第二通信数据。In a possible design, the collection and analysis module is specifically configured to: collect the communication data transmission device from the communication data transmission device and connect via Bluetooth when the first Bluetooth device pair performs encryption key negotiation. All encryption key length negotiation requests sent, collect all encryption key length negotiation requests received by the communication data receiving device through the Bluetooth connection from the communication data receiving device; send the device and the communication data according to the communication data The identification information of the receiving device, the first encryption key length negotiation request sent to the communication data receiving device is determined from all the encryption key length negotiation requests sent by the communication data sending device through the Bluetooth connection, and the first encryption key length negotiation request sent to the communication data receiving device is determined from the communication data. The receiving device determines the second encryption key length negotiation request that carries the identification information of the communication data sending device from all the encryption key length negotiation requests received through the Bluetooth connection; it is determined that the first encryption key length negotiation request contains The first encryption key length is the first communication data, and it is determined that the second encryption key length in the second encryption key length negotiation request is the second communication data.

一种可能的设计中,所述第二确定模块,具体用于:判断所述第一加密密钥长度与所述第二加密密钥长度是否相同;若所述第一加密密钥长度与所述第二加密密钥长度不相同,则确定所述第一蓝牙设备对存在中间人攻击。In a possible design, the second determination module is specifically configured to: determine whether the length of the first encryption key is the same as the length of the second encryption key; if the length of the first encryption key is the same as the length of the second encryption key; If the length of the second encryption key is different, it is determined that there is a man-in-the-middle attack on the first Bluetooth device.

一种可能的设计中,所述采集解析模块,具体用于:从第一蓝牙设备对中的通信数据发送设备处采集所述通信数据发送设备通过蓝牙连接发送的所有通信数据,从所述第一蓝牙设备对中的通信数据接收设备处采集所述通信数据接收设备通过蓝牙连接接收的所有通信数据;根据所述通信数据发送设备和所述通信数据接收设备的标识信息,从所述通信数据发送设备通过蓝牙连接发送的所有通信数据中确定出所述第一通信数据,从所述通信数据接收设备通过蓝牙连接接收的所有通信数据中确定出所述第二通信数据。In a possible design, the collection and analysis module is specifically configured to: collect all communication data sent by the communication data transmission device through the Bluetooth connection from the communication data transmission device in the first Bluetooth device pair, and from the first Bluetooth device pair. The communication data receiving device in a Bluetooth device pair collects all the communication data received by the communication data receiving device through the Bluetooth connection; The first communication data is determined from all communication data sent by the sending device through the Bluetooth connection, and the second communication data is determined from all the communication data received by the communication data receiving device through the Bluetooth connection.

一种可能的设计中,所述第一确定模块,具体用于:获取预设范围内的待检测的蓝牙设备的蓝牙广播消息;其中,所述蓝牙广播消息中携带蓝牙设备的标识信息;根据所述蓝牙广播消息,确定预设范围内的待检测的蓝牙设备。In a possible design, the first determining module is specifically configured to: obtain a Bluetooth broadcast message of a Bluetooth device to be detected within a preset range; wherein, the Bluetooth broadcast message carries the identification information of the Bluetooth device; according to The Bluetooth broadcast message determines the Bluetooth device to be detected within a preset range.

一种可能的设计中,所述第二确定模块确定所述第一蓝牙设备对存在中间人攻击之后,还用于:判断所述第一蓝牙设备对是否存在加密会话数据;若存在加密会话数据,则确定所述第一蓝牙设备对存在中间人攻击且攻击成功;若不存在加密会话数据,则确定所述第一蓝牙设备对存在中间人攻击但攻击未成功。In a possible design, after determining that there is a man-in-the-middle attack on the first Bluetooth device pair, the second determining module is further configured to: determine whether the first Bluetooth device pair has encrypted session data; if there is encrypted session data, Then it is determined that there is a man-in-the-middle attack on the first Bluetooth device pair and the attack is successful; if there is no encrypted session data, it is determined that there is a man-in-the-middle attack on the first Bluetooth device pair but the attack is unsuccessful.

一种可能的设计中,所述第二确定模块确定所述第一蓝牙设备对存在中间人攻击之后,具体用于:若从所述通信数据发送设备处采集到所述通信数据发送设备通过蓝牙连接向所述通信数据接收设备发送的开始加密传输请求,或从所述通信数据接收设备处采集到所述通信数据接收设备通过蓝牙连接接收的携带有所述通信数据发送设备的标识信息的开始加密传输请求,则确定存在加密会话数据;或者,采集并解析出所述通信数据发送设备与所述通信数据接收设备之间的通信数据,根据所述通信数据的统计特性,确定是否存在加密会话数据。In a possible design, after the second determination module determines that the first Bluetooth device has a man-in-the-middle attack, it is specifically used for: if the communication data transmission device is collected from the communication data transmission device and connected through Bluetooth A request to start encrypted transmission sent to the communication data receiving device, or a start encryption received by the communication data receiving device through a Bluetooth connection and carrying the identification information of the communication data sending device collected from the communication data receiving device If there is a transmission request, it is determined that encrypted session data exists; or, the communication data between the communication data sending device and the communication data receiving device is collected and analyzed, and whether there is encrypted session data is determined according to the statistical characteristics of the communication data. .

一种可能的设计中,所述采集解析模块,具体用于:在所述第一蓝牙设备对进行加密传输时,从所述通信数据发送设备处采集所述通信数据发送设备与所述通信数据接收设备之间的第一双向通信数据,从所述通信数据接收设备处采集所述通信数据接收设备与所述通信数据发送设备之间的第二双向通信数据;根据所述第一双向通信数据和所述第二双向通信数据,确定第一加密会话数据和第二加密会话数据分别作为所述第一通信数据和所述第二通信数据。In a possible design, the collection and analysis module is specifically configured to: collect the communication data transmission device and the communication data from the communication data transmission device when the first Bluetooth device pair performs encrypted transmission. receiving the first two-way communication data between the devices, and collecting the second two-way communication data between the communication data receiving device and the communication data sending device from the communication data receiving device; according to the first two-way communication data and the second bidirectional communication data, determining the first encrypted session data and the second encrypted session data as the first communication data and the second communication data, respectively.

一种可能的设计中,所述第二确定模块,具体用于:判断所述第一加密会话数据与所述第二加密会话数据是否相同;若所述第一加密会话数据与所述第二加密会话数据相同,则确定所述第一蓝牙设备对不存在中间人攻击;若所述第一加密会话数据与所述第二加密会话数据不相同,则确定所述第一蓝牙设备对存在中间人攻击。In a possible design, the second determination module is specifically configured to: determine whether the first encrypted session data is the same as the second encrypted session data; if the first encrypted session data is the same as the second encrypted session data If the encrypted session data is the same, it is determined that there is no man-in-the-middle attack on the first Bluetooth device pair; if the first encrypted session data and the second encrypted session data are different, it is determined that there is a man-in-the-middle attack on the first Bluetooth device pair .

第三方面,本申请还提供一种检测蓝牙漏洞攻击的装置,所述检测蓝牙漏洞攻击的装置可以包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器、通信接口;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述至少一个处理器通过执行所述存储器存储的指令,执行如上述第一方面或者第一方面的任一种可能的设计中方法的功能。In a third aspect, the present application further provides a device for detecting a Bluetooth vulnerability attack, the device for detecting a Bluetooth vulnerability attack may include: at least one processor; and a memory and a communication interface communicatively connected to the at least one processor; Wherein, the memory stores instructions that can be executed by the at least one processor, and the at least one processor executes the first aspect or any one of the possible first aspects by executing the instructions stored in the memory. The function of the method in the design.

第四方面,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质包括计算机程序,当计算机程序在计算机上运行时,使得所述计算机执行上述第一方面或者第一方面的任一种可能的设计中方法。In a fourth aspect, the present application further provides a computer-readable storage medium, where the computer-readable storage medium includes a computer program, and when the computer program runs on a computer, causes the computer to execute the first aspect or the first aspect. Any possible in-design approach.

第五方面,本申请还提供一种程序产品,当所述程序产品在计算机上运行时,使得所述计算机执行上述第一方面或者第一方面的任一种可能的设计中方法。In a fifth aspect, the present application further provides a program product that, when the program product runs on a computer, causes the computer to execute the first aspect or any possible method in design of the first aspect.

第六方面,本申请还提供一种芯片,所述芯片可以与检测蓝牙漏洞攻击的装置的存储器耦合,用于调用存储器中存储的计算机程序并执行上述第一方面或者第一方面的任一种可能的设计中方法。In a sixth aspect, the present application further provides a chip, which can be coupled to a memory of a device for detecting a Bluetooth vulnerability attack, and is used to call a computer program stored in the memory and execute the first aspect or any one of the first aspects. possible in-design methods.

附图说明Description of drawings

图1为现有的一种SSL中间人攻击的原理示意图;FIG. 1 is a schematic diagram of the principle of an existing SSL man-in-the-middle attack;

图2为本申请实施例提供的一种系统架构示意图;2 is a schematic diagram of a system architecture provided by an embodiment of the present application;

图3为本申请实施例提供的一种用户界面的示意图;3 is a schematic diagram of a user interface provided by an embodiment of the present application;

图4为本申请实施例提供的另一种用户界面的示意图;4 is a schematic diagram of another user interface provided by an embodiment of the present application;

图5为本申请实施例提供的一种检测蓝牙漏洞攻击的方法的流程示意图;5 is a schematic flowchart of a method for detecting a Bluetooth vulnerability attack provided by an embodiment of the present application;

图6a为本申请实施例提供的一种蓝牙通信的原理示意图;FIG. 6a is a schematic diagram of the principle of a Bluetooth communication provided by an embodiment of the application;

图6b为本申请实施例提供的一种加密密钥协商阶段的蓝牙漏洞攻击的示意图;6b is a schematic diagram of a Bluetooth vulnerability attack in an encryption key negotiation stage provided by an embodiment of the present application;

图6c为本申请实施例提供的一种加密传输阶段的蓝牙漏洞攻击的示意图;6c is a schematic diagram of a Bluetooth vulnerability attack in an encrypted transmission phase provided by an embodiment of the present application;

图7为本申请实施例提供的一种检测蓝牙漏洞攻击的装置的结构示意图;7 is a schematic structural diagram of an apparatus for detecting a Bluetooth vulnerability attack provided by an embodiment of the present application;

图8为本申请实施例提供的另一种检测蓝牙漏洞攻击的装置的结构示意图。FIG. 8 is a schematic structural diagram of another apparatus for detecting a Bluetooth vulnerability attack according to an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整的描述。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.

为便于理解本申请实施例,下面先对本申请实施例中涉及的专业术语进行解释说明。In order to facilitate understanding of the embodiments of the present application, the technical terms involved in the embodiments of the present application are explained below first.

伴随着蓝牙(bluetooth,BT)技术的发展,针对蓝牙的攻击技术也不断进化,主要包括重放攻击、拒绝服务攻击和中间人攻击等攻击技术。Along with the development of Bluetooth (bluetooth, BT) technology, the attack technology for Bluetooth also evolves continuously, mainly including attack technology such as replay attack, denial of service attack and man-in-the-middle attack.

一、重放攻击1. Replay attack

重放攻击又称重播攻击、回放攻击,是指攻击者向系统发送一个目的主机已接收过的数据包,来达到欺骗系统的目的,主要用于在身份认证过程中破坏认证的正确性。重放攻击可以由发起者,也可以由拦截并重发数据包的攻击者进行。攻击者利用网络监听或者其他方式盗取认证凭据,之后再把该认证凭据重新发给认证服务器。重放攻击在任何网络通信过程中都可能发生,是计算机世界黑客常用的攻击方式之一。Replay attack, also known as replay attack or replay attack, means that the attacker sends a data packet that the destination host has received to the system to deceive the system. It is mainly used to destroy the correctness of the authentication during the authentication process. Replay attacks can be carried out by the initiator or by an attacker who intercepts and resends the packets. The attacker uses network monitoring or other methods to steal the authentication credentials, and then resend the authentication credentials to the authentication server. Replay attacks can occur in any network communication process and are one of the common attack methods used by hackers in the computer world.

二、拒绝服务攻击The denial of service attack

拒绝服务攻击是指攻击者想办法让目标机器停止提供服务,是黑客常用的攻击手段之一。A denial of service attack means that the attacker tries to stop the target machine from providing services. It is one of the commonly used attack methods by hackers.

三、中间人攻击(Man-in-the-Middle Attack,简称“MITM攻击”)3. Man-in-the-Middle Attack ("MITM attack")

MITM攻击是一种“间接”的入侵攻击,这种攻击模式是通过各种技术手段将受入侵者控制的一台计算机虚拟放置在网络连接中的两台通信计算机之间,这台计算机就称为“中间人”。简而言之,所谓的MITM攻击就是通过拦截正常的网络通信数据,并进行数据篡改和嗅探,而通信的双方却毫不知情。MITM攻击是一种由来已久的网络攻击技术,至今仍有广泛的发展空间,如服务器消息块(server message block,SMB)会话劫持、域名系统(domainname system,DNS)欺骗等攻击都是典型的MITM攻击。MITM attack is an "indirect" intrusion attack. This attack mode is to virtually place a computer controlled by an intruder between two communicating computers in a network connection through various technical means. This computer is called for the "middleman". In short, the so-called MITM attack is to intercept normal network communication data, and perform data tampering and sniffing, without the two parties of the communication knowing. MITM attack is a long-standing network attack technology, and there is still extensive room for development, such as server message block (SMB) session hijacking, domain name system (domain name system, DNS) spoofing and other attacks are typical MITM attack.

随着网络技术的复杂化,MITM攻击也越来越多样化。最初,如超文本传输协议(hyperText transfer protocol,HTTP)、文件传输协议(file transfer protocol,FTP)、Telnet等网络均为明文传输,攻击者只要将计算机网卡设为混杂模式,伪装成代理服务器进行流量监听就可以完成攻击。后来,随着交换机的普遍使用,基于嗅探的中间人攻击已经不能成功,必须首先进行地址解析协议(address resolution protocol,ARP)欺骗操作。现在,大多数网络服务商(如网上银行,邮箱、社交软件、浏览器等)都采用基于安全套接层(secure sockets layer,SSL)协议的加密通信方式,如超文本传输安全协议(hyperTexttransfer protocol secure,HTTPS)、文件传输安全协议(file transfer protocolsecure,FTPS)等,都是建立在SSL上的加密协议。如图1所示,为现有的SSL中间人攻击的原理示意图,对客户端与服务器之间的通信进行中间人攻击需要更复杂的操作。在客户端与服务器建立通信的过程中,如果出现中间人攻击,实际的通信过程是:客户端与中间人建立通信,服务器与中间人建立通信;以及中间人伪装成客户端与服务器建立SSL通信,并且中间人伪造证书与客户端建立SSL通信。实现让客户端认为在与服务端通信,让服务端认为在与客户端通信,而后中间人分别与通信双方交换密钥,建立加密传输通道,完成攻击。With the complexity of network technology, MITM attacks are becoming more and more diverse. Initially, networks such as hypertext transfer protocol (HTTP), file transfer protocol (FTP), and Telnet are all plaintext transmissions. Attackers only need to set the computer's network card to promiscuous mode and pretend to be a proxy server. Traffic monitoring can complete the attack. Later, with the widespread use of switches, man-in-the-middle attacks based on sniffing have been unsuccessful, and address resolution protocol (ARP) spoofing must be performed first. Now, most network service providers (such as online banking, mailboxes, social software, browsers, etc.) use encrypted communication methods based on secure sockets layer (SSL) protocols, such as hypertext transfer protocol secure (hyperTexttransfer protocol secure). , HTTPS), file transfer protocol secure (file transfer protocolsecure, FTPS), etc., are encryption protocols built on SSL. As shown in Figure 1, which is a schematic diagram of the existing SSL man-in-the-middle attack, a man-in-the-middle attack on the communication between the client and the server requires more complex operations. In the process of establishing communication between the client and the server, if a man-in-the-middle attack occurs, the actual communication process is: the client establishes communication with the middleman, the server establishes communication with the middleman; and the middleman pretends to be the client and establishes SSL communication with the server, and the middleman forges The certificate establishes SSL communication with the client. Realize that the client thinks that it is communicating with the server, and the server thinks that it is communicating with the client, and then the middleman exchanges keys with the communication parties respectively, establishes an encrypted transmission channel, and completes the attack.

由此可知,目前中间人攻击检测技术主要针对TCP协议栈中的SSL协议,需要结合SSL加密协议涉及到的多个环节,因此对待此类中间人攻击的检测技术包括:基于证书校验的中间人检测技术、基于可信地址列表的DNS中间人检测、基于HTTP代理服务器识别的中间人检测技术,为加强检测效果,可以将上述方法组合使用,比如基于证书和可信地址列表相结合的SSL中间人攻击检测技术。而相比于IP加密通信协议SSL协议,作为短距离无线通信的蓝牙协议,中间人检测方法研究较少。It can be seen that the current man-in-the-middle attack detection technology is mainly aimed at the SSL protocol in the TCP protocol stack, and needs to combine multiple links involved in the SSL encryption protocol. Therefore, the detection technologies for such man-in-the-middle attacks include: certificate verification-based man-in-the-middle detection technology , DNS man-in-the-middle detection based on trusted address list, and man-in-the-middle detection technology based on HTTP proxy server identification. To enhance the detection effect, the above methods can be used in combination, such as SSL man-in-the-middle attack detection technology based on the combination of certificate and trusted address list. Compared with the IP encryption communication protocol SSL protocol, as the Bluetooth protocol for short-distance wireless communication, there are few researches on the man-in-the-middle detection method.

鉴于此,本申请实施例通过对蓝牙协议中涉及到的加密密钥协商和加密传输进行中间人攻击检测,实现针对蓝牙的中间人攻击的有效防范措施。In view of this, the embodiments of the present application implement effective preventive measures against the man-in-the-middle attack against Bluetooth by performing man-in-the-middle attack detection on the encryption key negotiation and encrypted transmission involved in the Bluetooth protocol.

应理解,本申请实施例可以应用到一种蓝牙漏洞攻击检测的系统中,该系统包括电子设备和至少两个蓝牙设备,电子设备用于对蓝牙设备之间的蓝牙通信进行蓝牙漏洞攻击检测(即实施本申请实施例方法)。It should be understood that the embodiments of the present application can be applied to a system for detecting a Bluetooth vulnerability attack. The system includes an electronic device and at least two Bluetooth devices, and the electronic device is used to perform Bluetooth vulnerability attack detection on the Bluetooth communication between the Bluetooth devices ( That is, the method of the embodiment of the present application is implemented).

其中,电子设备可以是包含诸如个人数字助理和/或音乐播放器等功能的便携式电子设备,诸如手机、平板电脑、具备无线通讯功能的可穿戴设备(如智能手表)等。便携式电子设备的示例性实施例包括但不限于搭载

Figure BDA0002934895350000071
或者其它操作系统的便携式电子设备。上述便携式电子设备也可以是其它便携式电子设备,诸如具有触敏表面(例如触控面板)的膝上型计算机(laptop)等。还应当理解的是,在本申请其他一些实施例中,上述电子设备也可以不是便携式电子设备,而是具有触敏表面(例如触控面板)的台式计算机。还应当理解的是,在本申请实施例中电子设备可以支持蓝牙功能,也可以是不支持蓝牙功能,当电子设备支持蓝牙功能时,为了避免该电子设备本身被中间人攻击,该电子设备将关闭蓝牙功能。为了方便说明,本申请实施例以电子设备支持蓝牙功能为例。The electronic device may be a portable electronic device including functions such as a personal digital assistant and/or a music player, such as a mobile phone, a tablet computer, a wearable device (such as a smart watch) with a wireless communication function, and the like. Exemplary embodiments of portable electronic devices include, but are not limited to, carry-on
Figure BDA0002934895350000071
Or portable electronic devices with other operating systems. The portable electronic device described above may also be other portable electronic devices, such as a laptop or the like having a touch-sensitive surface (eg, a touch panel). It should also be understood that, in some other embodiments of the present application, the above-mentioned electronic device may not be a portable electronic device, but a desktop computer having a touch-sensitive surface (eg, a touch panel). It should also be understood that, in this embodiment of the present application, the electronic device may support the Bluetooth function or may not support the Bluetooth function. When the electronic device supports the Bluetooth function, in order to avoid the electronic device itself being attacked by a man-in-the-middle, the electronic device will be turned off. Bluetooth function. For convenience of description, the embodiment of the present application takes the electronic device supporting the Bluetooth function as an example.

蓝牙设备可以包括手机、蓝牙耳机、蓝牙鼠标、平板电脑、笔记本电脑、台式机、显示屏、蓝牙键盘、蓝牙打印机、蓝牙传真机、车联网设备等,为了方便说明,本申请实施例以蓝牙设备为车联网设备为例。Bluetooth devices may include mobile phones, Bluetooth headsets, Bluetooth mice, tablet computers, notebook computers, desktop computers, display screens, Bluetooth keyboards, Bluetooth printers, Bluetooth fax machines, Internet of Vehicles devices, etc. Take IoT devices as an example.

示例性的,如图2所示,为本申请实施例提供的一种系统架构示意图,该系统中包括电子设备100,还可以包括多个车联网设备,图2中示例性的绘制三个车联网设备,分别为车联网设备200、车联网设备300以及车联网设备400。在本申请实施例中并不限定车联网设备的具体形态,凡是在车联网场景下进行蓝牙通信的设备均可以作为车联网设备。车辆之间可以在建立蓝牙连接后传输车辆信息(如车辆标识)、路况信息、车主信息等。Exemplarily, as shown in FIG. 2 , which is a schematic diagram of a system architecture provided in an embodiment of the present application, the system includes an electronic device 100 and may also include a plurality of IoV devices. In FIG. 2 , three vehicles are exemplarily drawn. The connected devices are respectively the connected car device 200 , the connected car device 300 and the connected car device 400 . The specific form of the Internet of Vehicles device is not limited in the embodiments of the present application, and any device that performs Bluetooth communication in the Internet of Vehicles scenario can be used as the Internet of Vehicles device. Vehicle information (such as vehicle identification), road condition information, vehicle owner information, etc. can be transmitted between vehicles after a Bluetooth connection is established.

车联网设备还可以是道路设施。道路设施可以是道路旁设置的测速装置或监控设备,能够监控来往车辆的行驶速度。道路设施还可以是基站,该基站可以向来往车辆广播信息,收集来往车辆的车辆信息或车主信息等。道路设施还可以是路口设置的智能交通灯,该智能交通灯可以根据实时的路口或路段的车辆流量调整红绿灯亮灯时间。道路设施也可以是路边设置的自动收费站或自动加油站,该自动收费站可以获取经过的车辆的信息,对经过的车辆进行扣费,该自动加油站可以获取需要加油的车辆的信息,在对车辆的信息认证通过后,可以为车辆加油,并向车辆发起扣费请求。道路设施除了与车辆存在交互,也可以与其他道路设施进行交互,如两个相邻路口的智能交通灯之间,一个智能交通灯可以在于另一个智能交通灯建立蓝牙连接后将实时的路口或路段的车辆流量发送给另一个智能交通灯,另一个智能交通灯在接收到车辆流量之后,可以根据路口或路段的车辆流量调整红绿灯亮灯时间。The connected vehicle device can also be a road facility. The road facility can be a speed measuring device or a monitoring device set on the side of the road, which can monitor the speed of passing vehicles. The road facility can also be a base station, and the base station can broadcast information to the passing vehicles, collect vehicle information or vehicle owner information of the passing vehicles, and the like. The road facility can also be an intelligent traffic light set at an intersection, and the intelligent traffic light can adjust the lighting time of the traffic light according to the real-time traffic flow at the intersection or road section. The road facility can also be an automatic toll station or an automatic gas station set on the roadside. The automatic toll station can obtain the information of the passing vehicles and deduct the fees for the passing vehicles. The automatic gas station can obtain the information of the vehicles that need to be refueled. After the information authentication of the vehicle is passed, the vehicle can be refueled and a charge deduction request can be initiated to the vehicle. In addition to interacting with vehicles, road facilities can also interact with other road facilities, such as between two smart traffic lights at adjacent intersections. One smart traffic light can connect to another smart traffic light after establishing a Bluetooth connection. The traffic flow of the road section is sent to another smart traffic light, and the other smart traffic light can adjust the lighting time of the traffic light according to the traffic flow of the intersection or road section after receiving the traffic flow.

在如图2所示系统架构中,仅以车联网设备200和车联网设备300是车辆,车联网设备400为道路设施为例,本申请实施例并不限定该系统中包括的车联网设备的数量以及具体形态。In the system architecture shown in FIG. 2 , only the IoV device 200 and IoV device 300 are vehicles, and the IoV device 400 is a road facility as an example, the embodiments of the present application do not limit the types of IoV devices included in the system. quantity and form.

电子设备100用于对车联网设备(如车联网设备200、车联网设备300以及车联网设备400)之间的蓝牙通信进行蓝牙漏洞攻击检测(即实施本申请实施例方法),应理解,在本申请实施例中电子设备100可以与车联网设备(如车联网设备200、车联网设备300以及车联网设备400)连接。例如,电子设备100与放置在车联网设备300上的采集设备有线连接,在车联网设备300与车联网设备200进行蓝牙通信时,电子设备100可以通过有线传输的方式获取放置在车联网设备300上的采集设备空口采集的车联网设备300在进行蓝牙通信时的通信数据,电子设备100可以通过无线传输的方式(例如WiFi)获取放置在车联网设备200上的采集设备空口采集的车联网设备200在进行蓝牙通信时的通信数据。电子设备100也可以不与车联网设备连接,本申请实施例对此不做具体限定,为了方便说明,本申请实施例以电子设备100不与车联网设备连接为例。The electronic device 100 is used to perform Bluetooth vulnerability attack detection (ie, implement the method of the embodiment of the present application) on the Bluetooth communication between the Internet of Vehicles devices (such as the Internet of Vehicles device 200, the Internet of Vehicles device 300, and the Internet of Vehicles device 400). In this embodiment of the present application, the electronic device 100 may be connected to a car networking device (eg, the car networking device 200 , the car networking device 300 , and the car networking device 400 ). For example, the electronic device 100 is wired to a collection device placed on the Internet of Vehicles device 300. When the Internet of Vehicles device 300 communicates with the Internet of Vehicles device 200 via Bluetooth, the electronic device 100 can acquire the data collected on the Internet of Vehicles device 300 through wired transmission. The communication data of the Internet of Vehicles device 300 during Bluetooth communication collected by the acquisition device on the Internet of Vehicles device 300 can be acquired by the electronic device 100 through wireless transmission (for example, WiFi). 200 Communication data during Bluetooth communication. The electronic device 100 may also not be connected to the Internet of Vehicles device, which is not specifically limited in this embodiment of the present application. For convenience of description, the embodiment of the present application takes the electronic device 100 not connected to the Internet of Vehicles device as an example.

应理解,在本申请实施例中,因为采集设备使用的采集技术为空口采集技术,只需要确定车联网设备位于采集设备有效作用范围内,即不需要改造车联网设备,若车联网设备为道路设施,则不需要将采集设备放置在车联网设备上,若车联网设备为车辆,因为车辆长期处于移动状态,则需要将采集设备放置在车联网设备上。It should be understood that in this embodiment of the present application, because the acquisition technology used by the acquisition device is the air interface acquisition technology, it is only necessary to determine that the Internet of Vehicles device is within the effective range of the acquisition device, that is, the Internet of Vehicles device does not need to be modified. If the Internet of Vehicles device is a road If the IoV is a vehicle, because the vehicle is in a moving state for a long time, the acquisition device needs to be placed on the IoV device.

应理解,本申请实施例中电子设备100通常是通过应用程序为用户提供各种功能的。示例性的,应用程序可以为系统应用(又可称之为原生应用),也可以为第三方应用。例如,绘图、演示、字处理、游戏、电话、视频播放器、音乐播放器、电子邮件、即时消息收发、照片管理、相机、浏览器、日历、时钟、支付、应用市场、桌面和健康管理等应用程序。示例性的,本申请实施例中的电子设备100可以同时运行多个应用程序。It should be understood that the electronic device 100 in this embodiment of the present application generally provides various functions for the user through an application program. Exemplarily, the application may be a system application (also referred to as a native application) or a third-party application. For example, drawing, presentation, word processing, gaming, telephony, video player, music player, email, instant messaging, photo management, camera, browser, calendar, clock, payment, marketplace, desktop and health management, etc. application. Exemplarily, the electronic device 100 in this embodiment of the present application may run multiple application programs at the same time.

示例性的,图3中的a为本申请实施例的一种图形用户界面的示意图。以下将图形用户界面简称为用户界面。其中,电子设备100是通过显示屏显示用户界面的。具体的,用户界面可以为主界面、负一屏或者某一应用的用户界面等。例如,主界面可以如图3中的a所示的用户界面300。如图所示用户界面300可以包括状态栏301、时间和天气Widget302、可隐藏的导航栏303,还有多个应用的图标例如设置图标304等。其中,状态栏301可以包括运营商的名称(中国移动)、移动网络(例如4G)、时间和剩余电量。在本申请的其它一些实施例中,状态栏301可以包括运营商的名称(中国移动)、移动网络的信号强度、时间和剩余电量。在本申请的其它一些实施例中,状态栏301还可以包括蓝牙图标、WiFi图标、屏幕锁定图标、外接设备图标等中的一个或多个。例如,以蓝牙图标为例,本申请实施例中电子设备100可以在开启了蓝牙功能后,在状态栏301中显示蓝牙图标,当关闭了蓝牙功能后,在状态栏301中不显示蓝牙图标。导航栏303可以包括后退按钮(back button)、主屏幕键按钮(homebutton)和历史任务查看按钮(menu button)。还可以理解的是,在其他一些实施例中,用户界面300还可以包括Dock栏。Dock栏中可以包括常用应用的图标,例如电话图标、短消息图标、邮件图标和天气图标等。应理解,用户可以根据自身的需求设置Dock栏中的常用应用的图标。Exemplarily, a in FIG. 3 is a schematic diagram of a graphical user interface according to an embodiment of the present application. Hereinafter, the graphical user interface is simply referred to as the user interface. The electronic device 100 displays the user interface through the display screen. Specifically, the user interface may be a main interface, a negative screen, or a user interface of an application, or the like. For example, the main interface may be a user interface 300 as shown in a in FIG. 3 . As shown in the figure, the user interface 300 may include a status bar 301, a time and weather widget 302, a hideable navigation bar 303, and icons of multiple applications such as a setting icon 304 and the like. Wherein, the status bar 301 may include the name of the operator (China Mobile), the mobile network (eg 4G), the time and the remaining power. In some other embodiments of the present application, the status bar 301 may include the name of the operator (China Mobile), the signal strength of the mobile network, the time and the remaining power. In some other embodiments of the present application, the status bar 301 may further include one or more of a Bluetooth icon, a WiFi icon, a screen lock icon, an external device icon, and the like. For example, taking the Bluetooth icon as an example, in the embodiment of the present application, the electronic device 100 may display the Bluetooth icon in the status bar 301 after the Bluetooth function is turned on, and do not display the Bluetooth icon in the status bar 301 when the Bluetooth function is turned off. The navigation bar 303 may include a back button, a home button, and a menu button for historical tasks. It is also understood that, in some other embodiments, the user interface 300 may also include a Dock bar. The Dock can include icons of commonly used applications, such as a phone icon, a short message icon, an email icon, and a weather icon. It should be understood that the user can set icons of commonly used applications in the Dock according to their own needs.

在其他一些实施例中,如图3中的a所示,电子设备100还可以包括主屏幕键305。其中,主屏幕键305可以是实体按键,也可以是虚拟按键。主屏幕键305用于根据用户的操作,将显示屏上显示的某一应用的用户界面或者负一屏等用户界面返回到主界面,这样可以方便用户随时查看主界面,并对主界面上的控件(例如图标等)进行操作。上述操作具体可以是用户按下主屏幕键305。在本申请其他一些实施例中,主屏幕键305还可以集成指纹传感器,这样用户可以在按下主屏幕键305的时候,电子设备100可以进行指纹采集,进而对用户身份进行确认。在另一些实施例中,电子设备100可以不包括主屏幕键305。In some other embodiments, as shown in a in FIG. 3 , the electronic device 100 may further include a home screen key 305 . The home screen key 305 may be a physical key or a virtual key. The home screen key 305 is used to return the user interface of a certain application displayed on the display screen or a user interface such as a negative screen to the main interface according to the user's operation, so that the user can view the main interface at any time, and the user interface on the main interface can be easily checked. Controls (such as icons, etc.) to operate. The above operation may specifically be that the user presses the home screen key 305 . In some other embodiments of the present application, the home screen key 305 may also integrate a fingerprint sensor, so that when the user presses the home screen key 305, the electronic device 100 can perform fingerprint collection, thereby confirming the user's identity. In other embodiments, the electronic device 100 may not include the home key 305 .

示例性的,当电子设备100的显示屏显示用户界面300时,可以响应于用户对设置图标304的触摸操作,在显示屏显示系统设置界面。其中,系统设置界面包括各种功能按钮,用于对电子设备100进行相应的设置。例如,系统设置界面可以为如图3中的b中所示的用户界面310,包括蓝牙按钮311。此外,用户界面310还可以包括账号登录、开启云备份、屏幕锁定等功能按钮。电子设备100可以响应于用户对蓝牙按钮311的操作,在显示屏显示蓝牙设置界面。其中,蓝牙设置界面用于开启或关闭蓝牙功能。Exemplarily, when the display screen of the electronic device 100 displays the user interface 300, the system setting interface may be displayed on the display screen in response to the user's touch operation on the setting icon 304. The system setting interface includes various function buttons, which are used to perform corresponding settings on the electronic device 100 . For example, the system setting interface may be a user interface 310 as shown in b in FIG. 3 , including a Bluetooth button 311 . In addition, the user interface 310 may further include function buttons such as account login, enabling cloud backup, and screen locking. The electronic device 100 may display a Bluetooth setting interface on the display screen in response to the user's operation of the Bluetooth button 311 . Among them, the bluetooth setting interface is used to turn on or turn off the bluetooth function.

示例性的,当电子设备100的蓝牙功能未开启时,蓝牙设置界面可以为如图3中的c所示的用户界面320。如图3中的c所示,用户界面320包括蓝牙按钮321,且蓝牙按钮321处于关闭(OFF)状态。当蓝牙按钮321处于关闭状态时,电子设备100的蓝牙功能是未开启的。电子设备100可以响应于用户对蓝牙按钮321操作,将蓝牙按钮321置于开启(ON),从而开启蓝牙功能,蓝牙设置界面可以为如图3中的d所示的用户界面320,可用设备列表322包括Sql、200和Watch。Exemplarily, when the Bluetooth function of the electronic device 100 is not enabled, the Bluetooth setting interface may be the user interface 320 shown in c in FIG. 3 . As shown in c in FIG. 3 , the user interface 320 includes a Bluetooth button 321, and the Bluetooth button 321 is in an OFF state. When the Bluetooth button 321 is in an off state, the Bluetooth function of the electronic device 100 is not enabled. The electronic device 100 may turn the Bluetooth button 321 on (ON) in response to the user's operation of the Bluetooth button 321, thereby enabling the Bluetooth function. The Bluetooth setting interface may be the user interface 320 shown in d in FIG. 3, and the list of available devices 322 includes Sql, 200 and Watch.

此外,在另一些实施例中,当电子设备100的显示屏在锁定或解锁后显示某一用户界面(例如用户界面300)时,可以响应于用户的下拉操作或上拉操作,在显示屏显示快捷设置用户界面。具体的,快捷设置界面上包括用于设置各种功能的快捷按钮,例如开启或关闭蓝牙功能的快捷按钮等。例如,快捷设置用户界面可以为如图4所示的用户界面400。其中,用户界面400上包括蓝牙按钮401。电子设备100可以响应于用户对蓝牙按钮401的操作,开启或关闭蓝牙功能。例如,电子设备100当蓝牙功能未开启时,可以响应于用户对蓝牙按钮401的操作,开启蓝牙功能。再例如,电子设备100当开启了蓝牙功能时,可以响应于用户对蓝牙按钮401的操作,关闭蓝牙功能。此外,在一些实施例中,用户界面400还可以包括WiFi、个人热点、飞行模式、免打扰、响铃、移动数据、亮度调节等功能按钮,从而可以实现用户对相应功能的快速设置。需要说明的是,本申请实施例中电子设备100还可以通过其它方式开启或关闭蓝牙功能,例如语音指令、快捷手势操作等,对此不作限定。In addition, in other embodiments, when the display screen of the electronic device 100 displays a certain user interface (eg, the user interface 300 ) after being locked or unlocked, the display screen may display a certain user interface (for example, the user interface 300 ) in response to the user's pull-down operation or pull-up operation. Quick settings user interface. Specifically, the shortcut setting interface includes shortcut buttons for setting various functions, such as a shortcut button for enabling or disabling the Bluetooth function. For example, the quick setting user interface may be the user interface 400 shown in FIG. 4 . The user interface 400 includes a Bluetooth button 401 . The electronic device 100 can turn on or turn off the Bluetooth function in response to the user's operation of the Bluetooth button 401 . For example, when the bluetooth function is not turned on, the electronic device 100 can turn on the bluetooth function in response to the user's operation on the bluetooth button 401 . For another example, when the bluetooth function is turned on, the electronic device 100 can turn off the bluetooth function in response to the user's operation on the bluetooth button 401 . In addition, in some embodiments, the user interface 400 may further include function buttons such as WiFi, personal hotspot, airplane mode, do not disturb, ringtone, mobile data, brightness adjustment, etc., so that the user can quickly set corresponding functions. It should be noted that, in the embodiment of the present application, the electronic device 100 may also enable or disable the Bluetooth function in other ways, such as voice commands, shortcut gesture operations, etc., which are not limited.

以上介绍了本申请实施例提供的电子设备以及车联网设备,接下来结合附图介绍本申请实施例提供的检测蓝牙漏洞攻击的方法。The electronic device and the Internet of Vehicles device provided by the embodiments of the present application are described above. Next, the method for detecting a Bluetooth vulnerability attack provided by the embodiments of the present application is introduced with reference to the accompanying drawings.

应理解,本申请实施例中的术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a和b,a和c,b和c,或a和b和c。It should be understood that the terms "first" and "second" in the embodiments of the present application are only used for description purposes, and cannot be interpreted as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may expressly or implicitly include one or more of that feature. "At least one" means one or more, and "plurality" means two or more. "And/or", which describes the association relationship of the associated objects, indicates that there can be three kinds of relationships, for example, A and/or B, which can indicate: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A, B can be singular or plural. The character "/" generally indicates that the associated objects are an "or" relationship. "At least one item(s) below" or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (a) of a, b, or c may represent: a, b, c, a and b, a and c, b and c, or a and b and c.

如图5所示,为本申请实施例提供的一种检测蓝牙漏洞攻击的方法的流程示意图,该检测蓝牙漏洞攻击的方法可以应用于上述图2-图4所示的或者与图2-图4功能结构类似的系统中。该检测蓝牙漏洞攻击的方法的具体流程描述如下。As shown in FIG. 5 , a schematic flowchart of a method for detecting a Bluetooth vulnerability attack provided by an embodiment of the present application, the method for detecting a Bluetooth vulnerability attack may be applied to the above-mentioned FIG. 2-FIG. 4 in a system with a similar functional structure. The specific process of the method for detecting a Bluetooth vulnerability attack is described as follows.

S501、电子设备100识别预设范围内的待检测的蓝牙设备。S501. The electronic device 100 identifies a Bluetooth device to be detected within a preset range.

在一些实施例中,当车联网设备开启了蓝牙功能后将广播消息,电子设备100可以接收预设范围内开启了蓝牙功能的车联网设备(例如车联网设备200、车联网设备300、车联网设备400)的广播消息,其中,预设范围内开启了蓝牙功能的车联网设备可以周期性广播消息,有助于电子设备100识别发现。In some embodiments, when the IoV device has the Bluetooth function enabled, it will broadcast a message, and the electronic device 100 can receive IoV devices (eg, the IoV device 200 , the IoV device 300 , the IoV device 300 , the IoV device 300 , the IoV device 300 , the IoV device 200 , the IoV device 300 , the IoV device 200 , the IoV device 300 , the IoV device 200 , the IoV device 300 The broadcast message of the device 400 ), wherein the IoV device with the Bluetooth function turned on within the preset range can periodically broadcast the message, which is helpful for the electronic device 100 to identify and discover.

需要说明的是,在本申请实施例中,广播消息可以是一个特定的蓝牙广播。该蓝牙广播可以是可连接的非定向广播(connectable undirected event type),可以包括广播数据和扫描响应数据。或者,该蓝牙广播可以是可扫描的非定向广播(scannableundirected event type),也可以称为可发现广播,这种广播不能用于发起蓝牙连接,但允许其他设备扫描发送该广播的设备,但不能根据该广播建立蓝牙连接。当然,该广播消息也可以是其他内容,在此不作限制。It should be noted that, in this embodiment of the present application, the broadcast message may be a specific Bluetooth broadcast. The Bluetooth broadcast may be a connectable undirected event type and may include broadcast data and scan response data. Alternatively, the Bluetooth broadcast may be a scannableundirected event type, also known as a discoverable broadcast, which cannot be used to initiate a Bluetooth connection, but allows other devices to scan for devices sending the broadcast, but not A Bluetooth connection is established based on this broadcast. Of course, the broadcast message may also be other content, which is not limited here.

以电子设备100接收到车联网设备200的广播消息为例,车联网设备200的广播消息包括车联网设备200的设备标识,具体的,设备标识为用于唯一标识车联网设备的信息,其中,若车联网设备200为车辆,车联网设备200的标识可以是车牌、车辆识别码(vehicleidentification number,VIN),若车联网设备200为道路设施,车联网设备200的标识还可以是道路设施的设备标识。本申请实施例并不限定标识的类型,凡是可以标识车联网设备200的信息均适用于本申请实施例。应理解,电子设备100接收到车联网设备200的广播消息,则电子设备100确定车联网设备200为预设范围内的待检测的蓝牙设备。Taking the electronic device 100 receiving the broadcast message of the Internet of Vehicles device 200 as an example, the broadcast message of the Internet of Vehicles device 200 includes the device identification of the Internet of Vehicles device 200. Specifically, the device identification is the information used to uniquely identify the Internet of Vehicles device, wherein, If the IoV device 200 is a vehicle, the identifier of the IoV device 200 may be a license plate and a vehicle identification number (VIN). If the IoV device 200 is a road facility, the identifier of the IoV device 200 may also be a device of a road facility logo. The embodiments of the present application do not limit the type of identification, and any information that can identify the IoV device 200 is applicable to the embodiments of the present application. It should be understood that when the electronic device 100 receives the broadcast message of the Internet of Vehicles device 200, the electronic device 100 determines that the Internet of Vehicles device 200 is a Bluetooth device to be detected within a preset range.

需要说明的是,本申请实施例中,电子设备100也可以广播识别请求,以使预设范围内开启了蓝牙功能的车联网设备(例如车联网设备200、车联网设备300、车联网设备400)在接收到该识别请求后,向电子设备100发送识别响应,从而使得电子设备100发现预设范围内开启了蓝牙功能的车联网设备。It should be noted that, in this embodiment of the present application, the electronic device 100 may also broadcast an identification request, so that the IoV devices (such as the IoV device 200 , the IoV device 300 , the IoV device 400 ) that have the Bluetooth function enabled within a preset range ) after receiving the identification request, send an identification response to the electronic device 100, so that the electronic device 100 discovers a connected vehicle device with the Bluetooth function enabled within a preset range.

需要说明的是,本申请实施例中,电子设备100作为检测蓝牙漏洞攻击的设备,为了避免电子设备100本身被中间人攻击,电子设备100将关闭蓝牙功能,例如,电子设备100可以响应于用户对第一蓝牙按钮的操作,在显示屏显示蓝牙设置界面,其中,蓝牙设置界面包括用于开启或关闭蓝牙功能的功能键(例如:第二蓝牙按钮),当第二蓝牙按钮处于关闭(OFF)状态时,电子设备100的蓝牙功能是未开启的,电子设备100可以响应于用户对第二蓝牙按钮操作,将第二蓝牙按钮置于关闭(OFF),从而关闭蓝牙功能。It should be noted that, in this embodiment of the present application, the electronic device 100 is used as a device for detecting Bluetooth vulnerability attacks. In order to prevent the electronic device 100 from being attacked by a man-in-the-middle, the electronic device 100 will turn off the Bluetooth function. For example, the electronic device 100 may respond to the user's The operation of the first bluetooth button displays a bluetooth setting interface on the display screen, wherein the bluetooth setting interface includes a function key for enabling or disabling the bluetooth function (for example: the second bluetooth button), when the second bluetooth button is turned off (OFF) In the state, the Bluetooth function of the electronic device 100 is not enabled, and the electronic device 100 can turn off the second Bluetooth button in response to the user's operation of the second Bluetooth button, thereby turning off the Bluetooth function.

S502、根据待检测的蓝牙设备进行两两配对的结果,确定待检测的蓝牙设备对。S502: Determine the pair of Bluetooth devices to be detected according to the result of pairing the Bluetooth devices to be detected.

在一些实施例中,电子设备100在识别预设范围内的开启了蓝牙功能的车联网设备(例如车联网设备200、车联网设备300、车联网设备400)后,可以根据车联网设备进行两两配对的结果,确定待检测的蓝牙设备对,从而对待检测的任一蓝牙设备对进行蓝牙漏洞攻击检测,确定该蓝牙设备对之间是否存在中间人攻击。具体的,电子设备100确定预设范围内的开启了蓝牙功能的车联网设备为车联网设备200、车联网设备300和车联网设备400,则根据车联网设备200、车联网设备300和车联网设备400进行两两配对的结果,确定待检测的蓝牙设备对为车联网设备200和车联网设备300、车联网设备200和车联网设备400以及车联网设备300和车联网设备400,电子设备100可以对待检测的蓝牙设备对中的任一蓝牙设备对进行检测。In some embodiments, the electronic device 100 may perform two steps according to the Internet of Vehicles device after recognizing the Internet of Vehicles devices (such as the Internet of Vehicles device 200 , the Internet of Vehicles device 300 , and the Internet of Vehicles device 400 ) with the Bluetooth function turned on within a preset range. Based on the results of the two pairings, the pair of Bluetooth devices to be detected is determined, so that any Bluetooth device pair to be detected is detected for Bluetooth vulnerability attacks to determine whether there is a man-in-the-middle attack between the pair of Bluetooth devices. Specifically, if the electronic device 100 determines that the IoV devices with the Bluetooth function turned on within the preset range are the IoV device 200, the IoV device 300, and the IoV device 400, then according to the IoV device 200, IoV device 300 and IoV device 400 As a result of pairing the devices 400, it is determined that the pair of Bluetooth devices to be detected are the IoV device 200 and IoV device 300, the IoV device 200 and IoV device 400, the IoV device 300 and IoV device 400, and the electronic device 100 Any one of the pair of Bluetooth devices to be detected can be detected.

以车联网设备200为例,当车联网设备200开启了蓝牙功能后,可以作为从设备(slave)被附近开启了蓝牙功能的车联网设备扫描发现,也可以作为主设备(master)扫描发现附近开启了蓝牙功能的车联网设备。示例性的,若车联网设备200和车联网设备300均开启了蓝牙功能,且车联网设备300位于车联网设备200的附近,以车联网设备200为主设备,车联网设备300为从设备,则车联网设备200在开启了蓝牙功能后,可以执行设备扫描过程,以发现车联网设备300,从而使得车联网设备200可以与车联网设备300建立蓝牙连接。若车联网设备200与车联网设备300均为电子设备100确定的预设范围内的待检测的蓝牙设备,则在车联网设备200与车联网设备300建立蓝牙连接后,电子设备100可以对车联网设备200与车联网设备300之间的蓝牙通信进行检测。Taking the IoV device 200 as an example, when the IoV device 200 has the Bluetooth function enabled, it can be scanned and discovered as a slave device (slave) by a nearby IoV device with the Bluetooth function enabled, or it can be used as a master device (master) to scan and discover nearby IoV devices. Connected vehicles with Bluetooth enabled. Exemplarily, if both the IoV device 200 and the IoV device 300 have the Bluetooth function enabled, and the IoV device 300 is located near the IoV device 200, the IoV device 200 is the master device and the IoV device 300 is the slave device, The IoV device 200 can perform a device scanning process to discover the IoV device 300 after the Bluetooth function is enabled, so that the IoV device 200 can establish a Bluetooth connection with the IoV device 300 . If the IoV device 200 and the IoV device 300 are both Bluetooth devices to be detected within the preset range determined by the electronic device 100, after the IoV device 200 and the IoV device 300 establish a Bluetooth connection, the electronic device 100 can connect to the vehicle The Bluetooth communication between the Internet-connected device 200 and the car-connected device 300 is detected.

需要说明的是,在本申请实施例中,当车联网设备200开启了蓝牙功能后,在车联网设备200的可操作显示屏显示的用户界面上可以包括车联网设备200当前可被附近车联网设备发现的提示信息、可用设备列表等,其中,可用设备列表中包括至少一个设备标识,每个设备标识用于标识一个车联网设备200扫描发现的附近开启了蓝牙功能的车联网设备,从而有助于提示用户,设备标识可以包括设备名称、设备类型、或MAC地址等中的一个或多个,设备标识可以以图形或者文字等形式在可用设备列表中呈现给用户,设备名称可以为设备型号,也可以为用户设置的,对此不作限定。例如,车联网设备200扫描发现车联网设备300、车联网设备400,其中,车联网设备300的标识为300和车联网设备400的标识为400,则车联网设备200显示的用户界面中的可用设备列表包括300和400,可用设备列表可以根据车联网设备200扫描发现的电子设备进行更新。在车联网设备200扫描并根据扫描结果更新可用设备列表后,车联网设备200可以响应于用户对可用设备列表的操作,选择与车联网设备300和车联网设备400中的任一车联网设备建立蓝牙连接。It should be noted that, in the embodiment of the present application, after the IoV device 200 enables the Bluetooth function, the user interface displayed on the operable display screen of the IoV device 200 may include that the IoV device 200 can currently be connected to nearby IoVs. The prompt information of device discovery, the list of available devices, etc., wherein, the list of available devices includes at least one device identifier, and each device identifier is used to identify a nearby IoV device that has been scanned and discovered by the IoV device 200 with the Bluetooth function turned on, so that there are To help prompt the user, the device ID can include one or more of the device name, device type, or MAC address, etc. The device ID can be presented to the user in the form of graphics or text in the list of available devices, and the device name can be the device model. , or can be set by the user, which is not limited. For example, the IoV device 200 scans and finds the IoV device 300 and IoV device 400, wherein the IoV device 300 is identified as 300 and the IoV device 400 is identified as 400. The device list includes 300 and 400, and the available device list can be updated according to the electronic devices found by the IoV device 200 by scanning. After the IoV device 200 scans and updates the list of available devices according to the scan result, the IoV device 200 may select to establish a connection with any IoV device 300 and the IoV device 400 in response to the user's operation on the list of available devices. Bluetooth connection.

需要说明的是,在本申请实施例中,车联网设备200可以按照下列方式执行设备扫描过程:It should be noted that, in this embodiment of the present application, the IoV device 200 may perform the device scanning process in the following manner:

方式一,车联网设备200作为主设备在开启了蓝牙功能后,广播扫描请求,附近开启了蓝牙功能的车联网设备(例如车联网设备300)作为从设备可以在接收到扫描请求后,向车联网设备200发送扫描响应,从而使得车联网设备200发现附近开启了蓝牙功能的电子设备;Mode 1, the IoV device 200 as the master device broadcasts a scan request after the Bluetooth function is turned on, and a nearby IoV device (such as the IoV device 300 ) with the Bluetooth function turned on can serve as a slave device after receiving the scan request. The Internet-connected device 200 sends a scan response, so that the Internet-of-Vehicle device 200 discovers a nearby electronic device with the Bluetooth function turned on;

方式二,车联网设备200作为主设备可以在开启了蓝牙功能后,接收附近开启了蓝牙功能的车联网设备(从设备)的广播消息,而不需要发送扫描请求。其中,附近开启了蓝牙功能的车联网设备可以周期性广播消息,有助于其它开启了蓝牙功能的电子设备扫描发现。例如,车联网设备200在开启了蓝牙功能后,接收到车联网设备300的广播消息,从而扫描发现车联网设备300。In a second way, the IoV device 200 as the master device can receive broadcast messages from nearby IoV devices (slave devices) with the Bluetooth function enabled after the Bluetooth function is enabled, without sending a scan request. Among them, the nearby IoV devices with the Bluetooth function turned on can periodically broadcast messages, which is helpful for other electronic devices with the Bluetooth function turned on to scan and discover. For example, after the Bluetooth function is turned on, the Internet of Vehicles device 200 receives a broadcast message from the Internet of Vehicles device 300 , so as to scan and discover the Internet of Vehicles device 300 .

S503、从第一蓝牙设备对中的通信数据发送设备处采集并解析出第一通信数据,从第一蓝牙设备对中的通信数据接收设备处采集并解析出第二通信数据,判断第一通信数据与第二通信数据是否相同,若不相同,则确定第一蓝牙设备对存在中间人攻击。S503: Collect and parse the first communication data from the communication data sending device in the first Bluetooth device pair, collect and parse the second communication data from the communication data receiving device in the first Bluetooth device pair, and determine the first communication data Whether the data is the same as the second communication data, if not, it is determined that there is a man-in-the-middle attack on the first Bluetooth device.

在一些实施例中,电子设备100在根据车联网设备进行两两配对的结果,确定待检测的蓝牙设备对后,可以分别从待检测的任一蓝牙设备对的通信数据发送设备和通信数据接收设备处采集并解析出通信数据,若未采集并解析出通信数据,则确定该蓝牙设备对中的两个蓝牙设备并未建立蓝牙连接,若采集并解析出通信数据,则判断该通信数据是否相同,根据判断结果确定该蓝牙设备对是否存在中间人攻击,例如,从第一蓝牙设备对中的通信数据发送设备处采集并解析出第一通信数据,从第一蓝牙设备对中的通信数据接收设备处采集并解析出第二通信数据,其中,第一通信数据为通信数据发送设备向通信数据接收设备发送的通信数据,第二通信数据为通信数据接收设备接收的携带有通信数据发送设备的标识信息的通信数据,判断第一通信数据与第二通信数据是否相同,根据判断结果,确定第一蓝牙设备对是否存在中间人攻击。In some embodiments, after the electronic device 100 determines the pair of Bluetooth devices to be detected according to the result of paired pairing of IoV devices, the electronic device 100 can respectively send and receive communication data from any pair of Bluetooth devices to be detected. The device collects and parses the communication data. If the communication data is not collected and parsed, it is determined that the two Bluetooth devices in the Bluetooth device pair have not established a Bluetooth connection. If the communication data is collected and parsed, it is determined whether the communication data is The same, determine whether there is a man-in-the-middle attack in the pair of Bluetooth devices according to the judgment result, for example, collect and parse the first communication data from the communication data sending device in the first pair of Bluetooth devices, and receive the communication data from the first pair of Bluetooth devices. The device collects and parses the second communication data, wherein the first communication data is the communication data sent by the communication data sending device to the communication data receiving device, and the second communication data is the communication data received by the communication data receiving device and carrying the communication data sending device. For the communication data of the identification information, it is judged whether the first communication data is the same as the second communication data, and according to the judgment result, it is determined whether there is a man-in-the-middle attack on the first Bluetooth device.

需要说明的是,在本申请实施例中,在对待检测的任一蓝牙设备对进行蓝牙漏洞攻击检测时,可以先确定该蓝牙设备对中的两个蓝牙设备的标识信息,根据该标识信息分别从两个蓝牙设备处获取需要比对的数据。例如,可以从第一蓝牙设备对中的通信数据发送设备处采集发送的所有通信数据,从第一蓝牙设备对中的通信数据接收设备处采集通信数据接收设备接收的所有通信数据,根据通信数据发送设备和通信数据接收设备的标识信息,从通信数据发送设备发送的所有通信数据中确定出向通信数据接收设备发送的第一通信数据,从通信数据接收设备接收的所有通信数据中确定出携带有通信数据发送设备的标识信息的第二通信数据。若在第一蓝牙设备对进行加密密钥协商时进行蓝牙漏洞攻击检测,上述的通信数据可以为加密密钥长度协商请求中的加密密钥长度,若在第一蓝牙设备对进行加密传输时进行蓝牙漏洞攻击检测,上述的通信数据可以为加密会话数据。It should be noted that, in the embodiment of the present application, when any Bluetooth device pair to be detected is detected for Bluetooth vulnerability attack, the identification information of the two Bluetooth devices in the Bluetooth device pair may be determined first, and the identification information may be used according to the identification information. Obtain the data to be compared from two Bluetooth devices. For example, all communication data sent from the communication data sending device in the first pair of Bluetooth devices may be collected and sent, and all communication data received by the communication data receiving device may be collected from the communication data receiving device in the first Bluetooth device pair, and according to the communication data The identification information of the sending device and the communication data receiving device, the first communication data sent to the communication data receiving device is determined from all the communication data sent by the communication data sending device, and the first communication data sent to the communication data receiving device is determined from all the communication data received by the communication data receiving device. The communication data transmits the second communication data of the identification information of the device. If the Bluetooth vulnerability attack detection is performed when the first Bluetooth device pair performs encryption key negotiation, the above-mentioned communication data may be the encryption key length in the encryption key length negotiation request. Bluetooth vulnerability attack detection, the above communication data can be encrypted session data.

以第一蓝牙设备对为车联网设备200和车联网设备300为例,从车联网设备200处采集车联网设备200发送和接收的所有通信数据,从车联网设备300处采集车联网设备300发送和接收的所有通信数据,根据车联网设备200和车联网设备300的标识信息,从车联网设备200发送和接收的所有通信数据中筛选出车联网设备200发送给车联网设备300和接收的来自车联网设备300的通信数据,从车联网设备300发送和接收的所有通信数据中筛选出车联网设备300发送给车联网设备200和接收的来自车联网设备200的通信数据。Taking the first Bluetooth device pair as the Internet of Vehicles device 200 and the Internet of Vehicles device 300 as an example, collect all the communication data sent and received by the Internet of Vehicles device 200 from the Internet of Vehicles device 200 , and collect the data sent by the Internet of Vehicles device 300 from the Internet of Vehicles device 300 And all the communication data received, according to the identification information of the car networking device 200 and the car networking device 300, from all the communication data sent and received by the car networking device 200, the car networking device 200 sent to the car networking device 300 and received from the car networking device 300 are screened out. For the communication data of the Internet of Vehicles device 300 , the communication data sent by the Internet of Vehicles device 300 to and received from the Internet of Vehicles device 200 is filtered from all the communication data sent and received by the Internet of Vehicles device 300 .

需要说明的是,在本申请实施例中,第一通信数据和第二通信数据是第一蓝牙设备对中的通信数据发送设备与通信数据接收设备在进行蓝牙通信时的同一通信阶段中的通信数据,例如,通信数据发送设备与通信数据接收设备在进行蓝牙通信时的加密密钥协商阶段或加密传输阶段的通信数据,若通信数据发送设备与通信数据接收设备之间不存在中间人攻击,则第一通信数据与第二通信数据应相同,若通信数据发送设备与通信数据接收设备之间存在中间人攻击,则该中间人将篡改通信数据发送设备与通信数据接收设备在进行蓝牙通信时的同一通信阶段中的通信数据,导致第一通信数据与第二通信数据存在不同。It should be noted that, in this embodiment of the present application, the first communication data and the second communication data are the communication between the communication data transmitting device and the communication data receiving device in the first Bluetooth device pair in the same communication stage when performing Bluetooth communication. For example, the communication data in the encryption key negotiation stage or the encrypted transmission stage during the Bluetooth communication between the communication data sending device and the communication data receiving device, if there is no man-in-the-middle attack between the communication data sending device and the communication data receiving device, then The first communication data and the second communication data should be the same. If there is a man-in-the-middle attack between the communication data sending device and the communication data receiving device, the middle man will tamper with the same communication between the communication data sending device and the communication data receiving device during Bluetooth communication. The communication data in the stage causes the difference between the first communication data and the second communication data.

以车联网设备200和车联网设备300为第一蓝牙设备对为例,车联网设备200为第一蓝牙设备对中的通信数据发送设备,车联网设备300为第一蓝牙设备对中的通信数据接收设备,放置在车联网设备200上的采集设备空口采集并解析出车联网设备200向车联网设备300发送的第一通信数据,并将第一通信数据通过无线传输的方式(例如WiFi)发送给电子设备100,放置在车联网设备300上的采集设备空口采集并解析出车联网设备300接收的来自车联网设备200的第二通信数据,并将第二通信数据通过无线传输的方式(例如WiFi)发送给电子设备100,其中,第一通信数据与第二通信数据分别是车联网设备200与车联网设备300在进行蓝牙通信时的同一通信阶段中的通信数据,若车联网设备200与车联网设备300之间不存在中间人攻击,则第一通信数据与第二通信数据相同,若车联网设备200与车联网设备300之间存在中间人攻击,则该中间人将篡改车联网设备200与车联网设备300在进行蓝牙通信时的同一通信阶段中的通信数据,导致第一通信数据与第二通信数据存在不同,电子设备100可以通过判断第一通信数据与第二通信数据是否相同,若相同,则确定车联网设备200与车联网设备300之间不存在中间人攻击,若不同,则确定车联网设备200与车联网设备300之间存在中间人攻击。Taking the Internet of Vehicles device 200 and the Internet of Vehicles device 300 as the first Bluetooth device pair as an example, the Internet of Vehicles device 200 is the communication data sending device in the first Bluetooth device pair, and the Internet of Vehicles device 300 is the communication data in the first Bluetooth device pair. The receiving device, the acquisition device placed on the Internet of Vehicles device 200 collects and parses the first communication data sent by the Internet of Vehicles device 200 to the Internet of Vehicles device 300 through the air interface, and sends the first communication data through wireless transmission (eg WiFi) For the electronic device 100, the collection device placed on the Internet of Vehicles device 300 collects and parses the second communication data from the Internet of Vehicles device 200 received by the Internet of Vehicles device 300 through the air interface, and transmits the second communication data wirelessly (eg WiFi) to the electronic device 100, wherein the first communication data and the second communication data are the communication data in the same communication stage when the car networking device 200 and the car networking device 300 are performing Bluetooth communication. If there is no man-in-the-middle attack between the IoV devices 300, the first communication data is the same as the second communication data. If there is a man-in-the-middle attack between the IoV device 200 and the IoV device 300, the man-in-the-middle will tamper with the IoV device 200 and the IoV device 300. The communication data of the networked device 300 in the same communication stage during Bluetooth communication, resulting in the difference between the first communication data and the second communication data, the electronic device 100 can determine whether the first communication data and the second communication data are the same, if they are the same. , it is determined that there is no man-in-the-middle attack between the IoV device 200 and the IoV device 300 , and if different, it is determined that there is a man-in-the-middle attack between the IoV device 200 and the IoV device 300 .

需要说明的是,在本申请实施例中,可以只采集并解析出第一蓝牙设备对中的通信数据发送设备与通信数据接收设备在进行蓝牙通信时的一个通信阶段中的通信数据,也可以采集并解析出第一蓝牙设备对中的通信数据发送设备与通信数据接收设备在进行蓝牙通信时的多个通信阶段中的通信数据,即在不同的通信阶段从第一蓝牙设备对中的通信数据发送设备处采集并解析出不同的第一通信数据,从第一蓝牙设备对中的通信数据接收设备处采集并解析出不同的第二通信数据,即按照采集和解析的先后顺序将不同的第一通信数据和第二通信数据进行组合,然后比对多个数据组合,从而提高判断第一蓝牙设备对是否存在中间人攻击的可靠性,本申请实施例对此不做具体限定。It should be noted that, in this embodiment of the present application, only the communication data in one communication phase of the Bluetooth communication between the communication data transmitting device and the communication data receiving device in the first Bluetooth device pair may be collected and analyzed, or Collect and parse out the communication data of the communication data sending device and the communication data receiving device in the first Bluetooth device pair in multiple communication stages during Bluetooth communication, that is, the communication data from the first Bluetooth device pair in different communication stages Different first communication data is collected and parsed at the data sending device, and different second communication data is collected and parsed from the communication data receiving device in the first Bluetooth device pair, that is, according to the sequence of collection and analysis, the different second communication data is collected and parsed. The first communication data and the second communication data are combined, and then multiple data combinations are compared, thereby improving the reliability of determining whether the first Bluetooth device has a man-in-the-middle attack, which is not specifically limited in this embodiment of the present application.

需要说明的是,在本申请实施例中,若电子设备100确定的待检测的蓝牙设备对的数量为多个,则电子设备100可以串行对待检测的蓝牙设备对进行蓝牙漏洞攻击检测,也可以并行对待检测的蓝牙设备对进行蓝牙漏洞攻击检测,例如,电子设备100确定了两个待检测的蓝牙设备对,可以先对第一蓝牙设备对进行蓝牙漏洞攻击检测,再对第二蓝牙设备对进行蓝牙漏洞攻击检测,也可以同时对第一蓝牙设备对和第二蓝牙设备对进行蓝牙漏洞攻击检测。It should be noted that, in this embodiment of the present application, if the number of Bluetooth device pairs to be detected determined by the electronic device 100 is multiple, the electronic device 100 can serially perform Bluetooth vulnerability attack detection on the Bluetooth device pairs to be detected, and also Bluetooth vulnerability attack detection may be performed on the pair of Bluetooth devices to be detected in parallel. For example, if the electronic device 100 determines two Bluetooth device pairs to be detected, Bluetooth vulnerability attack detection may be performed on the first Bluetooth device pair first, and then on the second Bluetooth device. The Bluetooth vulnerability attack detection is performed on the pair, and the Bluetooth vulnerability attack detection may also be performed on the first Bluetooth device pair and the second Bluetooth device pair at the same time.

需要说明的是,在本申请实施例中,中间人常针对蓝牙通信过程中的加密密钥协商阶段和加密传输阶段进行攻击,篡改这两个阶段的通信数据。例如,如图6a所示,为本申请实施例提供的一种蓝牙通信的原理示意图,在车联网设备200和车联网设备300建立蓝牙连接后,车联网设备200和车联网设备300之间的蓝牙通信将分为4个阶段:(1)车联网设备200作为通信数据发送设备(即蓝牙连接发起方)将向通信数据接收设备车联网设备300(即蓝牙连接接收方)发送加密模式请求,车联网设备300向车联网设备200发送接受加密模式请求;(2)车联网设备200向车联网设备300发送加密密钥长度协商请求,车联网设备300向车联网设备200发送接受加密密钥长度协商请求;(3)车联网设备200向车联网设备300发送开始加密传输请求,车联网设备300向车联网设备200发送接受开始加密传输请求;(4)车联网设备200与车联网设备300开始加密传输,若车联网设备200与车联网设备300之间存在中间人,则中间人可以篡改车联网设备200向车联网设备300发送加密密钥长度协商请求和车联网设备300向车联网设备200发送接受加密密钥长度协商请求,或者中间人可以篡改车联网设备200与车联网设备300进行加密传输时的加密会话数据。It should be noted that, in the embodiments of the present application, the intermediary often attacks the encryption key negotiation phase and the encryption transmission phase in the Bluetooth communication process, and tampers with the communication data in these two phases. For example, as shown in FIG. 6a , which is a schematic diagram of a Bluetooth communication principle provided by an embodiment of the present application, after a Bluetooth connection is established between the Internet of Vehicles device 200 and the Internet of Vehicles device 300, the communication between the Internet of Vehicles device 200 and the Internet of Vehicles device 300 The Bluetooth communication will be divided into 4 stages: (1) The Internet of Vehicles device 200 as the communication data sending device (that is, the Bluetooth connection initiator) will send an encryption mode request to the communication data receiving device, the Internet of Vehicles device 300 (that is, the Bluetooth connection receiver), The IoV device 300 sends a request to accept the encryption mode to the IoV device 200; (2) The IoV device 200 sends an encryption key length negotiation request to the IoV device 300, and the IoV device 300 sends the IoV device 200 to accept the encryption key length Negotiation request; (3) IoV device 200 sends a request to start encrypted transmission to IoV device 300, and IoV device 300 sends a request to accept and start encrypted transmission to IoV device 200; (4) IoV device 200 starts with IoV device 300 Encrypted transmission. If there is an intermediary between the Internet of Vehicles device 200 and the Internet of Vehicles device 300, the intermediary can tamper with the Internet of Vehicles device 200 to send an encryption key length negotiation request to the Internet of Vehicles device 300 and the Internet of Vehicles device 300 to send an acceptance to the Internet of Vehicles device 200 Encryption key length negotiation request, or an intermediary can tamper with encrypted session data during encrypted transmission between the IoV device 200 and the IoV device 300 .

示例性的,如图6b所示,为本申请实施例提供的一种加密密钥协商阶段的蓝牙漏洞攻击的示意图,若车联网设备200与车联网设备300之间存在中间人,车联网设备200向车联网设备300发送请求16字节的加密密钥的加密密钥长度协商请求时,该加密密钥长度协商请求中将被中间人拦截,中间人将原本请求16字节的加密密钥的请求信息篡改为请求1字节的加密密钥的请求信息,并发送给车联网设备300,车联网设备300向车联网设备200发送接受1字节的加密密钥的接受加密密钥长度协商请求,该接受加密密钥长度协商请求也将被中间人拦截,但中间人并未篡改该接受加密密钥长度协商请求,直接将该接受加密密钥长度协商请求发送给车联网设备200。则中间人在密钥长度协商时进行主动攻击并攻击成功的结果是当车联网设备200与车联网设备300之间开始加密传输时,车联网设备200与车联网设备300之间的会话数据的加密密钥长度仅为1字节,在正常的蓝牙通信当中加密密钥长度可达到16字节,此时中间人只需要嗅探到加密流量,采用密钥爆破即可以破解加密数据,解密获取明文内容。Exemplarily, as shown in FIG. 6b , which is a schematic diagram of a Bluetooth vulnerability attack in the encryption key negotiation stage provided by an embodiment of the present application, if there is a middleman between the Internet of Vehicles device 200 and the Internet of Vehicles device 300 , the Internet of Vehicles device 200 When sending an encryption key length negotiation request requesting a 16-byte encryption key to the IoV device 300, the encryption key length negotiation request will be intercepted by a middleman, and the middleman will originally request the 16-byte encryption key request information Tamper with the request information requesting a 1-byte encryption key, and send it to the IoV device 300, and the IoV device 300 sends a request for accepting the encryption key length negotiation to accept the 1-byte encryption key to the IoV device 200. The request for accepting encryption key length negotiation will also be intercepted by the intermediary, but the intermediary does not tamper with the request for accepting encryption key length negotiation, and directly sends the request for accepting encryption key length negotiation to the IoV device 200 . Then the man-in-the-middle conducts an active attack during the key length negotiation and the result of the successful attack is that when the encrypted transmission between the car networking device 200 and the car networking device 300 starts, the encryption of the session data between the car networking device 200 and the car networking device 300 is encrypted. The length of the key is only 1 byte. In normal Bluetooth communication, the length of the encryption key can reach 16 bytes. At this time, the middleman only needs to sniff the encrypted traffic, and the encrypted data can be decrypted by key blasting, and the plaintext content can be obtained by decryption. .

示例性的,如图6c所示,为本申请实施例提供的一种加密传输阶段的蓝牙漏洞攻击的示意图,若车联网设备200与车联网设备300之间存在中间人,则车联网设备200向车联网设备300发送的加密会话数据以及车联网设备300向车联网设备200发送的加密会话数据将被中间人拦截,中间人将篡改车联网设备200与车联网设备300之间的加密会话数据,影响车联网设备200与车联网设备300之间正常的蓝牙通信。Exemplarily, as shown in FIG. 6c , which is a schematic diagram of a Bluetooth vulnerability attack in an encrypted transmission phase provided by an embodiment of the present application, if there is a man-in-the-middle between the car networking device 200 and the car networking device 300 , the car networking device 200 will send the The encrypted session data sent by the Internet of Vehicles device 300 and the encrypted session data sent by the Internet of Vehicles device 300 to the Internet of Vehicles device 200 will be intercepted by the middleman, who will tamper with the encrypted session data between the Internet of Vehicles device 200 and the Internet of Vehicles device 300, affecting the vehicle. Normal Bluetooth communication between the Internet-connected device 200 and the car-connected device 300 .

由此可见,当中间人针对蓝牙通信过程中的不同阶段(加密密钥协商阶段和加密传输阶段)进行攻击时,电子设备100需要从待检测的蓝牙设备对的通信数据发送设备和通信数据接收设备处采集并解析的通信数据不同,以下结合具体的实例分别对两个阶段的具体实现进行详细的描述:It can be seen that when the man-in-the-middle attacks different stages (encryption key negotiation stage and encrypted transmission stage) in the Bluetooth communication process, the electronic device 100 needs to send the communication data from the Bluetooth device pair to be detected and the communication data receiving device. The communication data collected and parsed at different places is different. The specific implementation of the two stages is described in detail below with specific examples:

(1)检测加密密钥协商阶段的蓝牙漏洞攻击(1) Detect the Bluetooth vulnerability attack in the encryption key negotiation stage

在一些实施例中,电子设备100在第一蓝牙设备对进行加密密钥协商时,可以从通信数据发送设备处获取放置在通信数据发送设备上的采集设备空口采集的向通信数据接收设备发送的第一加密密钥长度协商请求,从通信数据接收设备处获取放置在通信数据接收设备上的采集设备空口采集的接收的携带有通信数据发送设备的标识信息的第二加密密钥长度协商请求,在确定从通信数据发送设备处和通信数据接收设备处获取的都是加密密钥长度协商请求后,根据第一加密密钥长度协商请求和第二加密密钥长度协商请求,确定第一加密密钥长度和第二加密密钥长度分别作为第一通信数据和第二通信数据。判断第一加密密钥长度与第二加密密钥长度是否相同,若第一加密密钥长度与第二加密密钥长度相同,则确定第一蓝牙设备对不存在中间人攻击,若第一加密密钥长度与第二加密密钥长度不相同,则确定第一蓝牙设备对存在中间人攻击。In some embodiments, when the first Bluetooth device pair performs encryption key negotiation, the electronic device 100 may acquire, from the communication data sending device, the data collected by the air interface of the collection device placed on the communication data sending device and sent to the communication data receiving device. The first encryption key length negotiation request is obtained from the communication data receiving device, and the received second encryption key length negotiation request carrying the identification information of the communication data sending device and collected by the air interface of the collecting device placed on the communication data receiving device is obtained, After determining that both the encryption key length negotiation request is obtained from the communication data sending device and the communication data receiving device, determine the first encryption key length negotiation request according to the first encryption key length negotiation request and the second encryption key length negotiation request The key length and the second encryption key length are used as the first communication data and the second communication data, respectively. Determine whether the length of the first encryption key is the same as the length of the second encryption key. If the length of the first encryption key is the same as the length of the second encryption key, it is determined that there is no man-in-the-middle attack on the first Bluetooth device. If the key length is different from the second encryption key length, it is determined that there is a man-in-the-middle attack on the first Bluetooth device pair.

以车联网设备200和车联网设备300为第一蓝牙设备对为例,电子设备100可以在车联网设备200和车联网设备300进行加密密钥协商时,通过无线传输的方式(例如WiFi)从车联网设备200处获取放置在车联网设备200上的采集设备空口采集的车联网设备200向车联网设备300发送的第一加密密钥长度协商请求,从车联网设备300处获取放置在车联网设备300上的采集设备空口采集的车联网设备300接收的来自车联网设备200的第二加密密钥长度协商请求,若车联网设备200与车联网设备300之间存在中间人,中间人将拦截篡改第一加密密钥长度协商请求,导致第一加密密钥长度协商请求请求的加密密钥长度与第二加密密钥长度协商请求请求的加密密钥长度不同,则电子设备100可以在确定从车联网设备200处和车联网设备300处获取的都是加密密钥长度协商请求后,根据第一加密密钥长度协商请求和第二加密密钥长度协商请求,确定第一加密密钥长度和第二加密密钥长度,通过判断第一加密密钥长度与第二加密密钥长度是否相同确定车联网设备200与车联网设备300之间是否存在中间人,若第一加密密钥长度与第二加密密钥长度相同,则确定车联网设备200与车联网设备300之间不存在中间人攻击,若第一加密密钥长度与第二加密密钥长度不相同,则确定车联网设备200与车联网设备300之间存在中间人攻击。Taking the Internet of Vehicles device 200 and the Internet of Vehicles device 300 as the first Bluetooth device pair as an example, the electronic device 100 can use wireless transmission (for example, WiFi) from the Internet of Vehicles device 200 and the Internet of Vehicles device 300 to perform encryption key negotiation. The IoV device 200 obtains the first encryption key length negotiation request sent by the IoV device 200 to the IoV device 300 and collected by the collection device placed on the IoV device 200, and obtains the request from the IoV device 300 and places it on the IoV device 300. The second encryption key length negotiation request received by the Internet of Vehicles device 300 from the Internet of Vehicles device 200 collected by the collection device on the device 300 over the air interface, if there is an intermediary between the Internet of Vehicles device 200 and the Internet of Vehicles device 300, the intermediary will intercept and tamper with the first encryption key length negotiation request. An encryption key length negotiation request causes the encryption key length requested by the first encryption key length negotiation request to be different from the encryption key length requested by the second encryption key length negotiation request, then the electronic device 100 can determine the After both the device 200 and the IoV device 300 obtain the encryption key length negotiation request, the first encryption key length and the second encryption key length negotiation request are determined according to the first encryption key length negotiation request and the second encryption key length negotiation request. The length of the encryption key is determined by judging whether the length of the first encryption key and the length of the second encryption key are the same to determine whether there is an intermediary between the IoV device 200 and the IoV device 300. If the length of the first encryption key is the same as that of the second encryption key, it is determined that there is no man-in-the-middle attack between the IoV device 200 and the IoV device 300. There is a man-in-the-middle attack.

需要说明的是,在本申请实施例中,电子设备100在确定第一蓝牙设备对存在中间人攻击之后,还可以通过判断第一蓝牙设备对是否存在加密会话数据确定中间人攻击是否成功,若存在加密会话数据,则确定第一蓝牙设备对存在中间人攻击且攻击成功,若不存在加密会话数据,则确定第一蓝牙设备对存在中间人攻击但攻击未成功,具体的,电子设备100若从通信数据发送设备处获取到向通信数据接收设备发送的开始加密传输请求,从通信数据接收设备处获取到接收的携带有通信数据发送设备的标识信息的开始加密传输请求,则确定存在加密会话数据,或者,电子设备100在获取到通信数据发送设备与通信数据接收设备之间的通信数据后,可以根据通信数据的统计特性,确定通信数据是否为加密会话数据。It should be noted that, in this embodiment of the present application, after determining that the first Bluetooth device pair has a man-in-the-middle attack, the electronic device 100 can also determine whether the first Bluetooth device pair has encrypted session data to determine whether the man-in-the-middle attack is successful. session data, it is determined that there is a man-in-the-middle attack on the first Bluetooth device and the attack is successful, and if there is no encrypted session data, it is determined that there is a man-in-the-middle attack on the first Bluetooth device but the attack is unsuccessful. The device obtains a request to start encrypted transmission sent to the communication data receiving device, and obtains a received start encrypted transmission request that carries the identification information of the communication data sending device from the communication data receiving device, then it is determined that there is encrypted session data, or, After acquiring the communication data between the communication data sending device and the communication data receiving device, the electronic device 100 can determine whether the communication data is encrypted session data according to statistical characteristics of the communication data.

(2)检测加密传输阶段的蓝牙漏洞攻击(2) Detection of Bluetooth vulnerability attacks in encrypted transmission phase

在一些实施例中,电子设备100在第一蓝牙设备对进行加密传输时,从通信数据发送设备处获取放置在通信数据发送设备上的采集设备空口采集的通信数据发送设备与通信数据接收设备之间的第一双向通信数据,从通信数据接收设备处获取放置在通信数据接收设备上的采集设备空口采集的通信数据接收设备与通信数据发送设备之间的第二双向通信数据,在确定从通信数据发送设备处和通信数据接收设备处获取的都是双向通信数据后,根据第一双向通信数据和第二双向通信数据,确定第一加密会话数据和第二加密会话数据分别作为第一通信数据和第二通信数据。判断第一加密会话数据与第二加密会话数据是否相同,若第一加密会话数据与第二加密会话数据相同,则确定第一蓝牙设备对不存在中间人攻击,若第一加密会话数据与第二加密会话数据不相同,则确定第一蓝牙设备对存在中间人攻击。In some embodiments, when the first Bluetooth device pair performs encrypted transmission, the electronic device 100 obtains, from the communication data sending device, the difference between the communication data sending device and the communication data receiving device collected by the air interface of the collecting device placed on the communication data sending device. The first two-way communication data between the two-way communication data is obtained from the communication data receiving device, and the second two-way communication data collected between the communication data receiving device and the communication data sending device collected by the acquisition device placed on the communication data receiving device is obtained. After both the data sending device and the communication data receiving device obtain the two-way communication data, according to the first two-way communication data and the second two-way communication data, the first encrypted session data and the second encrypted session data are determined as the first communication data respectively. and second communication data. Determine whether the first encrypted session data is the same as the second encrypted session data. If the first encrypted session data is the same as the second encrypted session data, it is determined that there is no man-in-the-middle attack on the first Bluetooth device. If the encrypted session data are not the same, it is determined that there is a man-in-the-middle attack on the first pair of Bluetooth devices.

以车联网设备200和车联网设备300为第一蓝牙设备对为例,电子设备100可以在车联网设备200和车联网设备300进行加密传输时,通过无线传输的方式(例如WiFi)从车联网设备200处获取放置在车联网设备200上的采集设备空口采集的车联网设备200向车联网设备300发送的第一双向通信数据,从车联网设备300处获取放置在车联网设备300上的采集设备空口采集的车联网设备300接收的来自车联网设备200的第二双向通信数据,若车联网设备200与车联网设备300之间存在中间人,中间人将拦截篡改双向通信数据,导致车联网设备200处的加密会话数据与车联网设备300处的加密会话数据不同,则电子设备100可以在确定从车联网设备200处和车联网设备300处采集的都是双向通信数据后,根据第一双向通信数据和第二双向通信数据,确定第一加密会话数据和第二加密会话数据,通过判断第一加密会话数据与第二加密会话数据是否相同确定车联网设备200与车联网设备300之间是否存在中间人,若第一加密会话数据与第二加密会话数据相同,则确定车联网设备200与车联网设备300之间不存在中间人攻击,若第一加密会话数据与第二加密会话数据不相同,则确定车联网设备200与车联网设备300之间存在中间人攻击。Taking the Internet of Vehicles device 200 and the Internet of Vehicles device 300 as the first Bluetooth device pair as an example, the electronic device 100 can transmit from the Internet of Vehicles through wireless transmission (eg WiFi) when the Internet of Vehicles device 200 and the Internet of Vehicles device 300 perform encrypted transmission. The device 200 obtains the first two-way communication data sent by the Internet of Vehicles device 200 to the Internet of Vehicles device 300 collected by the acquisition device placed on the Internet of Vehicles device 200, and obtains the collected data placed on the Internet of Vehicles device 300 from the Internet of Vehicles device 300 The second two-way communication data from the Internet of Vehicles device 200 and received by the Internet of Vehicles device 300 collected by the device air interface, if there is a middleman between the Internet of Vehicles device 200 and the Internet of Vehicles device 300, the intermediary will intercept and tamper with the two-way communication data, causing the Internet of Vehicles device 200 The encrypted session data at the IoV device 300 is different from the encrypted session data at the IoV device 300, then the electronic device 100 may determine that the data collected from the IoV device 200 and the IoV device 300 are both two-way communication data, according to the first two-way communication data. data and the second two-way communication data, determine the first encrypted session data and the second encrypted session data, and determine whether there is a connection between the car networking device 200 and the car networking device 300 by judging whether the first encrypted session data and the second encrypted session data are the same Man-in-the-middle, if the first encrypted session data is the same as the second encrypted session data, it is determined that there is no man-in-the-middle attack between the IoV device 200 and the IoV device 300; if the first encrypted session data and the second encrypted session data are different, then It is determined that there is a man-in-the-middle attack between the IoV device 200 and the IoV device 300 .

上述各个实施例可以单独使用,也可以相互结合使用,以达到不同的技术效果。The above embodiments can be used alone or in combination with each other to achieve different technical effects.

上述本申请提供的实施例中,从电子设备作为执行主体的角度对本申请实施例提供的方法进行了介绍。为了实现上述本申请实施例提供的方法中的各功能,电子设备可以包括硬件结构和/或软件模块,以硬件结构、软件模块、或硬件结构加软件模块的形式来实现上述各功能。上述各功能中的某个功能以硬件结构、软件模块、还是硬件结构加软件模块的方式来执行,取决于技术方案的特定应用和设计约束条件。In the above-mentioned embodiments of the present application, the methods provided by the embodiments of the present application are introduced from the perspective of an electronic device as an execution subject. In order to implement the functions in the methods provided by the above embodiments of the present application, the electronic device may include a hardware structure and/or software modules, and implement the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether one of the above functions is performed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.

基于同一技术构思,本申请实施例还提供一种检测蓝牙漏洞攻击的装置700,该装置700可以是电子设备,或者是电子设备中的装置700,该装置700包括用于执行上述图5-图6c所示方法的模块。示例性的,参见图7,该装置700可以包括:Based on the same technical concept, an embodiment of the present application further provides an apparatus 700 for detecting a Bluetooth vulnerability attack. The apparatus 700 may be an electronic device, or an apparatus 700 in an electronic device. Module for the method shown in 6c. Exemplarily, referring to FIG. 7 , the apparatus 700 may include:

第一确定模块701,用于识别预设范围内的待检测的蓝牙设备,根据所述待检测的蓝牙设备进行两两配对的结果,确定待检测的蓝牙设备对;The first determining module 701 is configured to identify the Bluetooth devices to be detected within a preset range, and determine the pair of Bluetooth devices to be detected according to the result of pairing the Bluetooth devices to be detected;

采集解析模块702,用于从第一蓝牙设备对中的通信数据发送设备处采集并解析出第一通信数据,从所述第一蓝牙设备对中的通信数据接收设备处采集并解析出第二通信数据;其中,第一蓝牙设备对为所述待检测的任一蓝牙设备对,所述第一通信数据为所述通信数据发送设备通过蓝牙连接向所述通信数据接收设备发送的通信数据,所述第二通信数据为所述通信数据接收设备通过蓝牙连接接收的携带有所述通信数据发送设备的标识信息的通信数据;The collection and analysis module 702 is used to collect and parse the first communication data from the communication data sending device in the first Bluetooth device pair, and collect and parse the second communication data from the communication data receiving device in the first Bluetooth device pair. Communication data; wherein, the first Bluetooth device pair is any Bluetooth device pair to be detected, and the first communication data is communication data sent by the communication data sending device to the communication data receiving device through a Bluetooth connection, The second communication data is communication data that is received by the communication data receiving device through a Bluetooth connection and carries the identification information of the communication data sending device;

第二确定模块703,用于判断所述第一通信数据与所述第二通信数据是否相同,若不相同,确定所述第一蓝牙设备对存在中间人攻击。The second determination module 703 is configured to determine whether the first communication data and the second communication data are the same, and if not, determine that there is a man-in-the-middle attack on the first Bluetooth device.

一种可能的设计中,所述采集解析模块702,具体用于:In a possible design, the collection and analysis module 702 is specifically used for:

在所述第一蓝牙设备对进行加密密钥协商时,从所述通信数据发送设备处采集所述通信数据发送设备通过蓝牙连接发送的所有加密密钥长度协商请求,从所述通信数据接收设备处采集所述通信数据接收设备通过蓝牙连接接收的所有加密密钥长度协商请求;When the first pair of Bluetooth devices performs encryption key negotiation, collect all encryption key length negotiation requests sent by the communication data transmission device through the Bluetooth connection from the communication data transmission device, and obtain from the communication data reception device collecting all encryption key length negotiation requests received by the communication data receiving device through the Bluetooth connection;

根据所述通信数据发送设备和所述通信数据接收设备的标识信息,从所述通信数据发送设备通过蓝牙连接发送的所有加密密钥长度协商请求中确定出向所述通信数据接收设备发送的第一加密密钥长度协商请求,从所述通信数据接收设备通过蓝牙连接接收的所有加密密钥长度协商请求中确定出携带有所述通信数据发送设备的标识信息的第二加密密钥长度协商请求;According to the identification information of the communication data sending device and the communication data receiving device, the first communication data sent to the communication data receiving device is determined from all the encryption key length negotiation requests sent by the communication data sending device through the Bluetooth connection. An encryption key length negotiation request, which determines a second encryption key length negotiation request that carries the identification information of the communication data sending device from all the encryption key length negotiation requests received by the communication data receiving device through the Bluetooth connection;

确定所述第一加密密钥长度协商请求中的第一加密密钥长度为所述第一通信数据,以及确定所述第二加密密钥长度协商请求中的第二加密密钥长度为所述第二通信数据。determining that the first encryption key length in the first encryption key length negotiation request is the first communication data, and determining that the second encryption key length in the second encryption key length negotiation request is the second communication data.

一种可能的设计中,所述第二确定模块703,具体用于:In a possible design, the second determining module 703 is specifically used for:

判断所述第一加密密钥长度与所述第二加密密钥长度是否相同;Determine whether the length of the first encryption key is the same as the length of the second encryption key;

若所述第一加密密钥长度与所述第二加密密钥长度不相同,则确定所述第一蓝牙设备对存在中间人攻击。If the length of the first encryption key is different from the length of the second encryption key, it is determined that there is a man-in-the-middle attack on the first Bluetooth device pair.

一种可能的设计中,所述采集解析模块702,具体用于:In a possible design, the collection and analysis module 702 is specifically used for:

从第一蓝牙设备对中的通信数据发送设备处采集所述通信数据发送设备通过蓝牙连接发送的所有通信数据,从所述第一蓝牙设备对中的通信数据接收设备处采集所述通信数据接收设备通过蓝牙连接接收的所有通信数据;All communication data sent by the communication data transmission device through the Bluetooth connection is collected from the communication data transmission device in the first Bluetooth device pair, and the communication data is collected from the communication data reception device in the first Bluetooth device pair. All communication data received by the device over the Bluetooth connection;

根据所述通信数据发送设备和所述通信数据接收设备的标识信息,从所述通信数据发送设备通过蓝牙连接发送的所有通信数据中确定出所述第一通信数据,从所述通信数据接收设备通过蓝牙连接接收的所有通信数据中确定出所述第二通信数据。According to the identification information of the communication data sending device and the communication data receiving device, the first communication data is determined from all the communication data sent by the communication data sending device through the Bluetooth connection, and the first communication data is determined from the communication data receiving device. The second communication data is determined from all communication data received through the Bluetooth connection.

一种可能的设计中,所述第一确定模块701,具体用于:In a possible design, the first determining module 701 is specifically used for:

获取预设范围内的待检测的蓝牙设备的蓝牙广播消息;其中,所述蓝牙广播消息中携带蓝牙设备的标识信息;Obtaining a Bluetooth broadcast message of a Bluetooth device to be detected within a preset range; wherein, the Bluetooth broadcast message carries the identification information of the Bluetooth device;

根据所述蓝牙广播消息,确定预设范围内的待检测的蓝牙设备。According to the Bluetooth broadcast message, a Bluetooth device to be detected within a preset range is determined.

一种可能的设计中,所述第二确定模块703确定所述第一蓝牙设备对存在中间人攻击之后,还用于:In a possible design, after the second determining module 703 determines that there is a man-in-the-middle attack on the first Bluetooth device pair, it is further used to:

判断所述第一蓝牙设备对是否存在加密会话数据;judging whether the first pair of Bluetooth devices has encrypted session data;

若存在加密会话数据,则确定所述第一蓝牙设备对存在中间人攻击且攻击成功;If there is encrypted session data, it is determined that there is a man-in-the-middle attack on the first Bluetooth device and the attack is successful;

若不存在加密会话数据,则确定所述第一蓝牙设备对存在中间人攻击但攻击未成功。If there is no encrypted session data, it is determined that there is a man-in-the-middle attack on the first Bluetooth device, but the attack is unsuccessful.

一种可能的设计中,所述第二确定模块703确定所述第一蓝牙设备对存在中间人攻击之后,具体用于:In a possible design, after the second determining module 703 determines that there is a man-in-the-middle attack on the first Bluetooth device, it is specifically used to:

若从所述通信数据发送设备处采集到所述通信数据发送设备通过蓝牙连接向所述通信数据接收设备发送的开始加密传输请求,或从所述通信数据接收设备处采集到所述通信数据接收设备通过蓝牙连接接收的携带有所述通信数据发送设备的标识信息的开始加密传输请求,则确定存在加密会话数据;或者,If the request to start encrypted transmission sent by the communication data sending device to the communication data receiving device through the Bluetooth connection is collected from the communication data sending device, or the communication data receiving device is collected from the communication data receiving device a request to start encrypted transmission that carries the identification information of the communication data sending device received by the device through the Bluetooth connection, it is determined that encrypted session data exists; or,

采集并解析出所述通信数据发送设备与所述通信数据接收设备之间的通信数据,根据所述通信数据的统计特性,确定是否存在加密会话数据。The communication data between the communication data sending device and the communication data receiving device is collected and analyzed, and whether there is encrypted session data is determined according to the statistical characteristics of the communication data.

一种可能的设计中,所述采集解析模块702,具体用于:In a possible design, the collection and analysis module 702 is specifically used for:

在所述第一蓝牙设备对进行加密传输时,从所述通信数据发送设备处采集所述通信数据发送设备与所述通信数据接收设备之间的第一双向通信数据,从所述通信数据接收设备处采集所述通信数据接收设备与所述通信数据发送设备之间的第二双向通信数据;When the first pair of Bluetooth devices performs encrypted transmission, first two-way communication data between the communication data transmission device and the communication data reception device is collected from the communication data transmission device, and received from the communication data collecting the second bidirectional communication data between the communication data receiving device and the communication data sending device at the device;

根据所述第一双向通信数据和所述第二双向通信数据,确定第一加密会话数据和第二加密会话数据分别作为所述第一通信数据和所述第二通信数据。According to the first bidirectional communication data and the second bidirectional communication data, the first encrypted session data and the second encrypted session data are determined as the first communication data and the second communication data, respectively.

一种可能的设计中,所述第二确定模块703,具体用于:In a possible design, the second determining module 703 is specifically used for:

判断所述第一加密会话数据与所述第二加密会话数据是否相同;determining whether the first encrypted session data is the same as the second encrypted session data;

若所述第一加密会话数据与所述第二加密会话数据相同,则确定所述第一蓝牙设备对不存在中间人攻击;If the first encrypted session data is the same as the second encrypted session data, determining that there is no man-in-the-middle attack on the first Bluetooth device pair;

若所述第一加密会话数据与所述第二加密会话数据不相同,则确定所述第一蓝牙设备对存在中间人攻击。If the first encrypted session data is different from the second encrypted session data, it is determined that there is a man-in-the-middle attack on the first Bluetooth device pair.

基于同一技术构思,参见图8,本申请实施例还提供一种检测蓝牙漏洞攻击的装置800,包括:Based on the same technical concept, referring to FIG. 8 , an embodiment of the present application further provides an apparatus 800 for detecting a Bluetooth vulnerability attack, including:

至少一个处理器801;以及,与所述至少一个处理器801通信连接的通信接口803;at least one processor 801; and, a communication interface 803 communicatively connected to the at least one processor 801;

其中,所述至少一个处理器801通过执行存储器802存储的指令,使得所述装置800执行图5-图6c所示的方法。Wherein, the at least one processor 801 causes the apparatus 800 to execute the method shown in FIG. 5 to FIG. 6c by executing the instructions stored in the memory 802 .

可选的,所述存储器802位于所述装置800之外。Optionally, the memory 802 is located outside the apparatus 800 .

可选的,所述装置800包括所述存储器802,所述存储器802与所述至少一个处理器801相连,所述存储器802存储有可被所述至少一个处理器801执行的指令。附图8用虚线表示存储器802对于装置800是可选的。Optionally, the apparatus 800 includes the memory 802 , the memory 802 is connected to the at least one processor 801 , and the memory 802 stores instructions executable by the at least one processor 801 . FIG. 8 shows with dashed lines that memory 802 is optional to apparatus 800 .

其中,所述处理器801和所述存储器802可以通过接口电路耦合,也可以集成在一起,这里不做限制。The processor 801 and the memory 802 may be coupled through an interface circuit, or may be integrated together, which is not limited here.

本申请实施例中不限定上述处理器801、存储器802以及通信接口803之间的具体连接介质。本申请实施例在图8中以处理器801、存储器802以及通信接口803之间通过总线804连接,总线在图8中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The specific connection medium between the processor 801 , the memory 802 , and the communication interface 803 is not limited in the embodiments of the present application. In the embodiment of the present application, the processor 801, the memory 802, and the communication interface 803 are connected through a bus 804 in FIG. 8, and the bus is represented by a thick line in FIG. 8. The connection between other components is only for schematic illustration. , is not limited. The bus can be divided into an address bus, a data bus, a control bus, and the like. For convenience of representation, only one thick line is used in FIG. 8, but it does not mean that there is only one bus or one type of bus.

应理解,本申请实施例中提及的处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。It should be understood that the processor mentioned in the embodiments of the present application may be implemented by hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like. When implemented in software, the processor may be a general-purpose processor implemented by reading software codes stored in memory.

示例性的,处理器可以是中央处理单元(central进程ing unit,CPU),还可以是其他通用处理器、数字信号处理器(digital signal进程or,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(fieldprogrammable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。Exemplarily, the processor may be a central processing unit (central processing unit, CPU), and may also be other general-purpose processors, digital signal processors (digital signal processing or, DSP), application specific integrated circuits (application specific integrated circuits, ASIC), off-the-shelf programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

应理解,本申请实施例中提及的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data eateSDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(directrambus RAM,DR RAM)。It should be understood that the memory mentioned in the embodiments of the present application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically programmable Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory. Volatile memory may be random access memory (RAM), which acts as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data eateSDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synchlink DRAM, SLDRAM) And direct memory bus random access memory (directrambus RAM, DR RAM).

需要说明的是,当处理器为通用处理器、DSP、ASIC、FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件时,存储器(存储模块)可以集成在处理器中。It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, the memory (storage module) can be integrated in the processor.

应注意,本文描述的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It should be noted that the memory described herein is intended to include, but not be limited to, these and any other suitable types of memory.

基于同一技术构思,本申请实施例还提供一种计算机可读存储介质,包括程序或指令,当所述程序或指令在计算机上运行时,使得如图5-图6c所示的方法被执行。Based on the same technical concept, embodiments of the present application also provide a computer-readable storage medium, including a program or an instruction, when the program or instruction is executed on a computer, the method shown in FIG. 5-FIG. 6c is executed.

基于同一技术构思,本申请实施例还提供一种芯片,所述芯片与存储器耦合,用于读取并执行所述存储器中存储的程序指令,使得图5-图6c所示的方法被执行。Based on the same technical concept, an embodiment of the present application further provides a chip, which is coupled to a memory and used to read and execute program instructions stored in the memory, so that the methods shown in FIGS. 5-6c are executed.

基于同一技术构思,本申请实施例还提供一种计算机程序产品,包括指令,当其在计算机上运行时,使得图5-图6c所示的方法被执行。Based on the same technical concept, an embodiment of the present application also provides a computer program product, including instructions, which, when executed on a computer, cause the methods shown in FIG. 5 to FIG. 6c to be executed.

应理解,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。It should be understood that, all relevant contents of the steps involved in the above method embodiments can be cited in the functional descriptions of the corresponding functional modules, which will not be repeated here.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by those skilled in the art, the embodiments of the present application may be provided as a method, a system, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the present application. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.

显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的保护范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the protection scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims (20)

1.一种检测蓝牙漏洞攻击的方法,其特征在于,包括:1. a method for detecting bluetooth vulnerability attack, is characterized in that, comprises: 识别预设范围内的待检测的蓝牙设备;Identify the Bluetooth device to be detected within the preset range; 根据所述待检测的蓝牙设备的配对结果,确定第一蓝牙设备对,所述第一蓝牙设备对包括属于所述待检测的蓝牙设备的通信数据发送设备和通信数据接收设备;According to the pairing result of the bluetooth device to be detected, determine a first pair of bluetooth devices, and the first pair of bluetooth devices includes a communication data sending device and a communication data receiving device belonging to the bluetooth device to be detected; 通过解析从所述通信数据发送设备处采集的数据获得第一通信数据,以及通过解析从所述通信数据接收设备处采集的数据获得第二通信数据,其中,所述第一通信数据为所述通信数据发送设备通过蓝牙连接向所述通信数据接收设备发送的通信数据,所述第二通信数据为所述通信数据接收设备通过蓝牙连接接收的携带有所述通信数据发送设备的标识信息的通信数据;The first communication data is obtained by parsing the data collected from the communication data sending device, and the second communication data is obtained by parsing the data collected from the communication data receiving device, wherein the first communication data is the Communication data sent by the communication data sending device to the communication data receiving device through a Bluetooth connection, and the second communication data is the communication carried by the communication data receiving device through the Bluetooth connection and carrying the identification information of the communication data sending device data; 基于所述第一通信数据与所述第二通信数据不相同,确定存在对所述第一蓝牙设备对的中间人攻击。Based on the difference between the first communication data and the second communication data, it is determined that there is a man-in-the-middle attack on the first pair of Bluetooth devices. 2.如权利要求1所述的方法,其特征在于,所述通过解析从所述通信数据发送设备处采集的数据获得第一通信数据,以及通过解析从所述通信数据接收设备处采集的数据获得第二通信数据,包括:2. The method of claim 1, wherein the first communication data is obtained by parsing data collected from the communication data sending device, and the first communication data is obtained by parsing data collected from the communication data receiving device Obtain second communication data, including: 在所述第一蓝牙设备对进行加密密钥协商时,从所述通信数据发送设备处采集所述通信数据发送设备通过蓝牙连接发送的所有加密密钥长度协商请求,从所述通信数据接收设备处采集所述通信数据接收设备通过蓝牙连接接收的所有加密密钥长度协商请求;When the first pair of Bluetooth devices performs encryption key negotiation, collect all encryption key length negotiation requests sent by the communication data transmission device through the Bluetooth connection from the communication data transmission device, and obtain from the communication data reception device collecting all encryption key length negotiation requests received by the communication data receiving device through the Bluetooth connection; 根据所述通信数据发送设备和所述通信数据接收设备的标识信息,从所述通信数据发送设备通过蓝牙连接发送的所有加密密钥长度协商请求中确定出向所述通信数据接收设备发送的第一加密密钥长度协商请求,从所述通信数据接收设备通过蓝牙连接接收的所有加密密钥长度协商请求中确定出携带有所述通信数据发送设备的标识信息的第二加密密钥长度协商请求;According to the identification information of the communication data sending device and the communication data receiving device, the first communication data sent to the communication data receiving device is determined from all the encryption key length negotiation requests sent by the communication data sending device through the Bluetooth connection. An encryption key length negotiation request, which determines a second encryption key length negotiation request that carries the identification information of the communication data sending device from all the encryption key length negotiation requests received by the communication data receiving device through the Bluetooth connection; 确定所述第一加密密钥长度协商请求中的第一加密密钥长度为所述第一通信数据,以及确定所述第二加密密钥长度协商请求中的第二加密密钥长度为所述第二通信数据。determining that the first encryption key length in the first encryption key length negotiation request is the first communication data, and determining that the second encryption key length in the second encryption key length negotiation request is the second communication data. 3.如权利要求2所述的方法,其特征在于,所述基于所述第一通信数据与所述第二通信数据不相同,确定存在对所述第一蓝牙设备对的中间人攻击,包括:3. The method of claim 2, wherein determining that there is a man-in-the-middle attack on the first pair of Bluetooth devices based on the difference between the first communication data and the second communication data, comprising: 确定所述第一加密密钥长度与所述第二加密密钥长度不相同;determining that the length of the first encryption key is not the same as the length of the second encryption key; 确定存在所述中间人攻击。It is determined that the man-in-the-middle attack exists. 4.如权利要求1所述的方法,其特征在于,所述通过解析从所述通信数据发送设备处采集的数据获得第一通信数据,以及通过解析从所述通信数据接收设备处采集的数据获得第二通信数据,包括:4. The method of claim 1, wherein the first communication data is obtained by parsing data collected from the communication data sending device, and the first communication data is obtained by parsing data collected from the communication data receiving device Obtain second communication data, including: 在所述第一蓝牙设备对进行加密传输时,从所述通信数据发送设备处采集所述通信数据发送设备与所述通信数据接收设备之间的第一双向通信数据,从所述通信数据接收设备处采集所述通信数据接收设备与所述通信数据发送设备之间的第二双向通信数据;When the first pair of Bluetooth devices performs encrypted transmission, first two-way communication data between the communication data transmission device and the communication data reception device is collected from the communication data transmission device, and received from the communication data collecting the second bidirectional communication data between the communication data receiving device and the communication data sending device at the device; 根据所述第一双向通信数据确定第一加密会话数据作为所述第一通信数据,以及根据所述第二双向通信数据确定第二加密会话数据作为所述第二通信数据。The first encrypted session data is determined as the first communication data according to the first two-way communication data, and the second encrypted session data is determined as the second communication data according to the second two-way communication data. 5.如权利要求4所述的方法,其特征在于,所述基于所述第一通信数据与所述第二通信数据不相同,确定存在对所述第一蓝牙设备对的中间人攻击,包括:5. The method according to claim 4, wherein the determining that there is a man-in-the-middle attack on the first pair of Bluetooth devices based on the difference between the first communication data and the second communication data comprises: 基于所述第一加密会话数据与所述第二加密会话数据不相同,确定存在所述中间人攻击。It is determined that the man-in-the-middle attack exists based on the difference between the first encrypted session data and the second encrypted session data. 6.如权利要求1所述的方法,其特征在于,所述通过解析从所述通信数据发送设备处采集的数据获得第一通信数据,以及通过解析从所述通信数据接收设备处采集的数据获得第二通信数据,包括:6. The method of claim 1, wherein the first communication data is obtained by parsing data collected from the communication data sending device, and the first communication data is obtained by parsing data collected from the communication data receiving device Obtain second communication data, including: 从所述通信数据发送设备处采集所述通信数据发送设备通过蓝牙连接发送的所有通信数据,从所述通信数据接收设备处采集所述通信数据接收设备通过蓝牙连接接收的所有通信数据;Collect all communication data sent by the communication data sending device through the Bluetooth connection from the communication data sending device, and collect all the communication data received by the communication data receiving device through the Bluetooth connection from the communication data receiving device; 根据所述通信数据发送设备和所述通信数据接收设备的标识信息,从所述通信数据发送设备通过蓝牙连接发送的所有通信数据中确定出所述第一通信数据,从所述通信数据接收设备通过蓝牙连接接收的所有通信数据中确定出所述第二通信数据。According to the identification information of the communication data sending device and the communication data receiving device, the first communication data is determined from all the communication data sent by the communication data sending device through the Bluetooth connection, and the first communication data is determined from the communication data receiving device. The second communication data is determined from all communication data received through the Bluetooth connection. 7.如权利要求1~6任一所述的方法,其特征在于,所述识别预设范围内的待检测的蓝牙设备,包括:7. The method according to any one of claims 1 to 6, wherein the identifying a Bluetooth device to be detected within a preset range comprises: 获取所述预设范围内的蓝牙设备的蓝牙广播消息;其中,所述蓝牙广播消息中携带蓝牙设备的标识信息;acquiring a Bluetooth broadcast message of a Bluetooth device within the preset range; wherein, the Bluetooth broadcast message carries identification information of the Bluetooth device; 根据所述蓝牙广播消息,确定所述预设范围内的待检测的蓝牙设备。Determine the to-be-detected Bluetooth device within the preset range according to the Bluetooth broadcast message. 8.如权利要求1~6任一所述的方法,其特征在于,所述确定存在对所述第一蓝牙设备对的中间人攻击之后,所述方法还包括:8. The method according to any one of claims 1 to 6, wherein after determining that there is a man-in-the-middle attack on the first pair of Bluetooth devices, the method further comprises: 判断所述第一蓝牙设备对是否存在加密会话数据;judging whether the first pair of Bluetooth devices has encrypted session data; 若存在加密会话数据,则确定存在所述中间人攻击且攻击成功;If there is encrypted session data, it is determined that the man-in-the-middle attack exists and the attack is successful; 若不存在加密会话数据,则确定存在所述中间人攻击但攻击未成功。If there is no encrypted session data, it is determined that the man-in-the-middle attack exists but the attack is unsuccessful. 9.如权利要求8所述的方法,其特征在于,所述判断是否存在加密会话数据,包括:9. The method of claim 8, wherein the judging whether there is encrypted session data comprises: 若从所述通信数据发送设备处采集到所述通信数据发送设备通过蓝牙连接向所述通信数据接收设备发送的开始加密传输请求,或从所述通信数据接收设备处采集到所述通信数据接收设备通过蓝牙连接接收的携带有所述通信数据发送设备的标识信息的开始加密传输请求,则确定存在加密会话数据;或者,If the request to start encrypted transmission sent by the communication data sending device to the communication data receiving device through the Bluetooth connection is collected from the communication data sending device, or the communication data receiving device is collected from the communication data receiving device a request to start encrypted transmission that carries the identification information of the communication data sending device received by the device through the Bluetooth connection, it is determined that encrypted session data exists; or, 采集并解析所述通信数据发送设备与所述通信数据接收设备之间的通信数据,根据所述通信数据的统计特性,确定是否存在加密会话数据。Collect and analyze the communication data between the communication data sending device and the communication data receiving device, and determine whether there is encrypted session data according to the statistical characteristics of the communication data. 10.一种检测蓝牙漏洞攻击的装置,其特征在于,包括:10. A device for detecting a Bluetooth vulnerability attack, comprising: 第一确定模块,用于识别预设范围内的待检测的蓝牙设备,根据所述待检测的蓝牙设备的配对结果,确定第一蓝牙设备对,所述第一蓝牙设备对包括属于所述待检测的蓝牙设备的通信数据发送设备和通信数据接收设备;The first determination module is used to identify the Bluetooth device to be detected within a preset range, and to determine a first Bluetooth device pair according to the pairing result of the Bluetooth device to be detected, and the first Bluetooth device pair includes belonging to the to-be-detected Bluetooth device. The communication data sending device and the communication data receiving device of the detected Bluetooth device; 采集解析模块,用于通过解析从所述通信数据发送设备处采集的数据获得第一通信数据,以及用于通过解析从所述通信数据接收设备处采集的数据获得第二通信数据;其中,所述第一通信数据为所述通信数据发送设备通过蓝牙连接向所述通信数据接收设备发送的通信数据,所述第二通信数据为所述通信数据接收设备通过蓝牙连接接收的携带有所述通信数据发送设备的标识信息的通信数据;a collection and analysis module, configured to obtain first communication data by analyzing the data collected from the communication data sending device, and obtain second communication data by analyzing the data collected from the communication data receiving device; The first communication data is the communication data sent by the communication data sending device to the communication data receiving device through the Bluetooth connection, and the second communication data is the communication data received by the communication data receiving device through the Bluetooth connection and carries the communication data. Communication data of the identification information of the data sending device; 第二确定模块,用于基于所述第一通信数据与所述第二通信数据不相同,确定存在对所述第一蓝牙设备对的中间人攻击。A second determining module, configured to determine that there is a man-in-the-middle attack on the first pair of Bluetooth devices based on the difference between the first communication data and the second communication data. 11.如权利要求10所述的装置,其特征在于,所述采集解析模块,具体用于:11. The device according to claim 10, wherein the acquisition and analysis module is specifically used for: 在所述第一蓝牙设备对进行加密密钥协商时,从所述通信数据发送设备处采集所述通信数据发送设备通过蓝牙连接发送的所有加密密钥长度协商请求,从所述通信数据接收设备处采集所述通信数据接收设备通过蓝牙连接接收的所有加密密钥长度协商请求;When the first pair of Bluetooth devices performs encryption key negotiation, collect all encryption key length negotiation requests sent by the communication data transmission device through the Bluetooth connection from the communication data transmission device, and obtain from the communication data reception device collecting all encryption key length negotiation requests received by the communication data receiving device through the Bluetooth connection; 根据所述通信数据发送设备和所述通信数据接收设备的标识信息,从所述通信数据发送设备通过蓝牙连接发送的所有加密密钥长度协商请求中确定出向所述通信数据接收设备发送的第一加密密钥长度协商请求,从所述通信数据接收设备通过蓝牙连接接收的所有加密密钥长度协商请求中确定出携带有所述通信数据发送设备的标识信息的第二加密密钥长度协商请求;According to the identification information of the communication data transmission device and the communication data reception device, the first communication data transmission device sent to the communication data reception device is determined from all encryption key length negotiation requests sent by the communication data transmission device through the Bluetooth connection. An encryption key length negotiation request, which determines a second encryption key length negotiation request that carries the identification information of the communication data sending device from all the encryption key length negotiation requests received by the communication data receiving device through the Bluetooth connection; 确定所述第一加密密钥长度协商请求中的第一加密密钥长度为所述第一通信数据,以及确定所述第二加密密钥长度协商请求中的第二加密密钥长度为所述第二通信数据。determining that the first encryption key length in the first encryption key length negotiation request is the first communication data, and determining that the second encryption key length in the second encryption key length negotiation request is the second communication data. 12.如权利要求11所述的装置,其特征在于,所述第二确定模块,具体用于:12. The apparatus of claim 11, wherein the second determining module is specifically configured to: 确定所述第一加密密钥长度与所述第二加密密钥长度不相同;determining that the length of the first encryption key is not the same as the length of the second encryption key; 确定存在所述中间人攻击。It is determined that the man-in-the-middle attack exists. 13.如权利要求10所述的装置,其特征在于,所述采集解析模块,具体用于:13. The device of claim 10, wherein the acquisition and analysis module is specifically used for: 在所述第一蓝牙设备对进行加密传输时,从所述通信数据发送设备处采集所述通信数据发送设备与所述通信数据接收设备之间的第一双向通信数据,从所述通信数据接收设备处采集所述通信数据接收设备与所述通信数据发送设备之间的第二双向通信数据;When the first pair of Bluetooth devices performs encrypted transmission, first two-way communication data between the communication data transmission device and the communication data reception device is collected from the communication data transmission device, and received from the communication data collecting the second bidirectional communication data between the communication data receiving device and the communication data sending device at the device; 根据所述第一双向通信数据确定第一加密会话数据作为所述第一通信数据,以及根据所述第二双向通信数据确定第二加密会话数据作为所述第二通信数据。The first encrypted session data is determined as the first communication data according to the first two-way communication data, and the second encrypted session data is determined as the second communication data according to the second two-way communication data. 14.如权利要求13所述的装置,其特征在于,所述第二确定模块,具体用于:14. The apparatus of claim 13, wherein the second determining module is specifically configured to: 基于所述第一加密会话数据与所述第二加密会话数据不相同,确定存在所述中间人攻击。It is determined that the man-in-the-middle attack exists based on the difference between the first encrypted session data and the second encrypted session data. 15.如权利要求10所述的装置,其特征在于,所述采集解析模块,具体用于:15. The device of claim 10, wherein the acquisition and analysis module is specifically used for: 从所述通信数据发送设备处采集所述通信数据发送设备通过蓝牙连接发送的所有通信数据,从所述通信数据接收设备处采集所述通信数据接收设备通过蓝牙连接接收的所有通信数据;Collect all communication data sent by the communication data sending device through the Bluetooth connection from the communication data sending device, and collect all the communication data received by the communication data receiving device through the Bluetooth connection from the communication data receiving device; 根据所述通信数据发送设备和所述通信数据接收设备的标识信息,从所述通信数据发送设备通过蓝牙连接发送的所有通信数据中确定出所述第一通信数据,从所述通信数据接收设备通过蓝牙连接接收的所有通信数据中确定出所述第二通信数据。According to the identification information of the communication data sending device and the communication data receiving device, the first communication data is determined from all the communication data sent by the communication data sending device through the Bluetooth connection, and the first communication data is determined from the communication data receiving device. The second communication data is determined from all communication data received through the Bluetooth connection. 16.如权利要求10~15任一所述的装置,其特征在于,所述第一确定模块,具体用于:16. The apparatus according to any one of claims 10 to 15, wherein the first determining module is specifically configured to: 获取所述预设范围内的蓝牙设备的蓝牙广播消息;其中,所述蓝牙广播消息中携带蓝牙设备的标识信息;acquiring a Bluetooth broadcast message of a Bluetooth device within the preset range; wherein, the Bluetooth broadcast message carries identification information of the Bluetooth device; 根据所述蓝牙广播消息,确定所述预设范围内的待检测的蓝牙设备。Determine the to-be-detected Bluetooth device within the preset range according to the Bluetooth broadcast message. 17.如权利要求10~15任一所述的装置,其特征在于,所述第二确定模块确定所述第一蓝牙设备对存在中间人攻击之后,还用于:17. The apparatus according to any one of claims 10 to 15, wherein after determining that the first Bluetooth device pair has a man-in-the-middle attack, the second determining module is further configured to: 判断所述第一蓝牙设备对是否存在加密会话数据;judging whether the first pair of Bluetooth devices has encrypted session data; 若存在加密会话数据,则确定存在所述中间人攻击且攻击成功;If there is encrypted session data, it is determined that the man-in-the-middle attack exists and the attack is successful; 若不存在加密会话数据,则确定存在所述中间人攻击但攻击未成功。If there is no encrypted session data, it is determined that the man-in-the-middle attack exists but the attack is unsuccessful. 18.如权利要求17所述的装置,其特征在于,所述第二确定模块确定所述第一蓝牙设备对存在中间人攻击之后,具体用于:18. The apparatus according to claim 17, wherein after the second determining module determines that there is a man-in-the-middle attack on the first Bluetooth device, the second determining module is specifically configured to: 若从所述通信数据发送设备处采集到所述通信数据发送设备通过蓝牙连接向所述通信数据接收设备发送的开始加密传输请求,或从所述通信数据接收设备处采集到所述通信数据接收设备通过蓝牙连接接收的携带有所述通信数据发送设备的标识信息的开始加密传输请求,则确定存在加密会话数据;或者,If the request to start encrypted transmission sent by the communication data sending device to the communication data receiving device through the Bluetooth connection is collected from the communication data sending device, or the communication data receiving device is collected from the communication data receiving device a request to start encrypted transmission that carries the identification information of the communication data sending device received by the device through the Bluetooth connection, it is determined that encrypted session data exists; or, 采集并解析所述通信数据发送设备与所述通信数据接收设备之间的通信数据,根据所述通信数据的统计特性,确定是否存在加密会话数据。Collect and analyze the communication data between the communication data sending device and the communication data receiving device, and determine whether there is encrypted session data according to statistical characteristics of the communication data. 19.一种检测蓝牙漏洞攻击的装置,其特征在于,所述装置包括存储器和处理器;所述存储器,用于存储计算机指令;所述处理器,用于调用所述存储器存储的计算机指令,以执行如权利要求1-9中任一项所述的检测蓝牙漏洞攻击的方法。19. A device for detecting a Bluetooth vulnerability attack, characterized in that the device comprises a memory and a processor; the memory is used to store computer instructions; the processor is used to call the computer instructions stored in the memory, to perform the method for detecting a Bluetooth vulnerability attack according to any one of claims 1-9. 20.一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-9中任一项所述的检测蓝牙漏洞攻击的方法。20. A computer storage medium, characterized by comprising computer instructions, when the computer instructions are executed on an electronic device, the electronic device is made to perform the Bluetooth vulnerability detection according to any one of claims 1-9 method of attack.
CN202080004433.8A 2020-12-04 2020-12-04 Method and device for detecting Bluetooth vulnerability attack Active CN112640513B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/133884 WO2022116147A1 (en) 2020-12-04 2020-12-04 Method and apparatus for detecting bluetooth vulnerability attack

Publications (2)

Publication Number Publication Date
CN112640513A CN112640513A (en) 2021-04-09
CN112640513B true CN112640513B (en) 2022-05-13

Family

ID=75291150

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080004433.8A Active CN112640513B (en) 2020-12-04 2020-12-04 Method and device for detecting Bluetooth vulnerability attack

Country Status (2)

Country Link
CN (1) CN112640513B (en)
WO (1) WO2022116147A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115001863B (en) * 2022-07-26 2022-11-22 浙江涂鸦智能电子有限公司 Network security vulnerability detection method, device, medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107154940A (en) * 2017-05-11 2017-09-12 济南大学 A kind of Internet of Things vulnerability scanning system and scan method
CN107967427A (en) * 2017-12-11 2018-04-27 北京奇虎科技有限公司 Monitor the method, apparatus and terminal device of loophole attack
US10427643B1 (en) * 2018-07-13 2019-10-01 Nxp B.V. Defense against relay attack in passive keyless entry systems

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102957704B (en) * 2012-11-09 2016-02-24 北京神州绿盟信息安全科技股份有限公司 A kind ofly determine method, Apparatus and system that MITM attacks
US9602531B1 (en) * 2016-02-16 2017-03-21 Cylance, Inc. Endpoint-based man in the middle attack detection
CN110557355B (en) * 2018-05-31 2021-07-27 上海连尚网络科技有限公司 A method and device for detecting man-in-the-middle attack by user equipment
CN109040137B (en) * 2018-10-10 2021-04-09 杭州安恒信息技术股份有限公司 Method and device for detecting man-in-the-middle attack and electronic equipment
CN110138734A (en) * 2019-04-10 2019-08-16 天津大学 The safety enhancing system and method for confrontation man-in-the-middle attack based on tls protocol

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107154940A (en) * 2017-05-11 2017-09-12 济南大学 A kind of Internet of Things vulnerability scanning system and scan method
CN107967427A (en) * 2017-12-11 2018-04-27 北京奇虎科技有限公司 Monitor the method, apparatus and terminal device of loophole attack
US10427643B1 (en) * 2018-07-13 2019-10-01 Nxp B.V. Defense against relay attack in passive keyless entry systems

Also Published As

Publication number Publication date
CN112640513A (en) 2021-04-09
WO2022116147A1 (en) 2022-06-09

Similar Documents

Publication Publication Date Title
US20220116771A1 (en) Devices, systems and methods for connecting and authenticating local devices to common gateway device
WO2021027554A1 (en) Information sharing method, terminal apparatus, storage medium, and computer program product
EP2575318B1 (en) Portable security device and methods for providing network security
EP2405622B1 (en) Device communication
JP4879980B2 (en) Wireless connection provisioning for devices using NFC (PROVISIONING)
US10009359B2 (en) System, apparatus and method for transferring ownership of a device from manufacturer to user using an embedded resource
US20140282978A1 (en) Method and apparatus for secure interaction with a computer service provider
US20200036792A1 (en) Low energy sensor data collection
KR101528851B1 (en) Apc(access point controller), control method thereof, and recording medium for recording program for executing the control method
Jain et al. ETGuard: detecting D2D attacks using wireless evil twins
US20210127250A1 (en) Device for wireless communication with other devices
CN112640513B (en) Method and device for detecting Bluetooth vulnerability attack
WO2019112923A1 (en) Improving security via automated sideband communication for m2m/iot
JP2020108117A (en) Communication device and control method of the same
CN115379425A (en) Bluetooth attack detection method, device, storage medium and mobile terminal
CN115623013A (en) Strategy information synchronization method, system and related product
Jansen et al. Proximity Beacons and Mobile Device Authentication: An Overview and Implementation
US20250080983A1 (en) Method for low-power encryption secure wireless communication in advertising broadcast communication for bluetooth low energy (ble)
CN117353968A (en) Video monitoring method and device
CN116321126A (en) Intelligent equipment network access method and device
CN117561749A (en) Pre-configured headless WIFI equipment and related systems, methods and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20241030

Address after: 518129 Huawei Headquarters Office Building 101, Wankecheng Community, Bantian Street, Longgang District, Shenzhen, Guangdong

Patentee after: Shenzhen Yinwang Intelligent Technology Co.,Ltd.

Country or region after: China

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

Country or region before: China