FTS抓包看蓝牙验证的过程

来源:互联网 发布:linux发行版本排行 编辑:程序博客网 时间:2024/05/08 15:41
1.概述
   在进行蓝牙设备的连接时,为了保护个人隐私和数据保密的需要,需要进行验证。

2.一些Frame
Frame74:本地发送Authentication requset command
00010001 00000100 00000010 00001001 00000000
Opcode: 0x0411
Connection Handle: 0x09 = 9

Frame75:Command Status event
00001111 00000100 00000000 00000010 00010001 00000100
Status: Success

Frame76:Link Key request event
该Event参数为BR_ADDR
00010111 00000110 10000000 10011001 00100011 01001100 11100000 00000000
Bluetooth Device Address: 0x00-e0-4c-23-99-80
注:该Event应该是对Authentication requset command的后续回应,向本地的Host要Link key。

Frame77:Link Key Negative request command
00001100 00000100 00000110 10000000 10011001 00100011 01001100 11100000 00000000
Bluetooth Device Address: 0x00-e0-4c-23-99-80
注:回应远端slave的Link Key request event,表示本地没有存储的Link Key。

Frame78:Link Key Negative request command---command complete event

Frame79: IO Capability request event
00110001 00000110 10000000 10011001 00100011 01001100 11100000 00000000
BD_ADDR: 0x00e04c239980
注:该event表示远端的slave要求本地Host的IO_Capability,这个参数将在pair的过程中用到。

Frame80:IO Capability Request Reply command
这个command的参数如下:
BD_ADDR,
IO_Capability,
OOB_Data_Present,
Authentication_Requirements
00101011 00000100 00001001 10000000 10011001 00100011 01001100 11100000 00000000 0000000100000000 00000101
Bluetooth Device Address: 0x00-e0-4c-23-99-80
IO Capability: 0x01 DisplayYesNo
OOB Data Present: 0x00 OOB authentication data not present
Authentication_Requirements:0x05 MITM Protection Required – General Bonding. Use IO capabilities to determine authentication procedure.
注:这是本地的Host回应远端的IO Capability request event的,表明本地Host具有的IO Capability。

Frame81:IO Capability Request Reply command--command complete

Frame82:IO Capability response event
该Event参数如下:
BD_ADDR,
IO_Capability,
OOB_Data_Present,
Authentication_Requirements
00110010 00001001 10000000 10011001 00100011 01001100 11100000 00000000 0000000100000000 00000000
BD_ADDR: 0x00e04c239980
IO Capability: DisplayYesNo
OOB Data Present: OOB authentication data not present
Authentication_Requirements:0x05 MITM Protection Required – General Bonding. Use IO capabilities to determine authentication procedure.
注:这个event由远端的Slave产生,用来回复IO Capability Request Reply command,参数也都基本一样,作用就是表明你的IO capability我已经收到了,是不是感觉有点多此一举呢??

Frame83:User Confirmation Request event
参数如下:
BD_ADDR,
Numeric_Value
00110011 00001010 10000000 10011001 00100011 01001100 11100000 00000000 10110000 10111101 00001000 00000000
BD_ADDR: 0x00e04c239980
Numeric Value: 0x0008bdb0
注:远端的slave要求一个Numeric value,本地的Host可以用User_Confirmation_Request_Reply 或者the
User_Confirmation_Request_Negative_Reply command来进行回应。
 
Frame84:User Confirmation Request Reply command
00101100 00000100 00000110 10000000 10011001 00100011 01001100 11100000 00000000
Bluetooth Device Address: 0x00-e0-4c-23-99-80
注:响应User Confirmation Request event,表示这个Numeric value实在正确的。

Frame85:User Confirmation Request Reply command---command complete

Frame86: Simple Pairing Complete event
00110110 00000111 00000000 10000000 10011001 00100011 01001100 11100000 00000000
BD_ADDR: 0xe04c23998000
status:0x00 success
注:表示配对成功

Frame87:Link Key Notification Event
该Event参数如下:
BD_ADDR, 
Link_Key, 
Key_Type
0011000 00010111 10000000 10011001 00100011 01001100 11100000 00000000 00010110 01010001 10001111 00011101 00100101 00110001 01101001 00001000 00000011 10110101 11101101 00011110 11110111 00000010 01001111 10101110 00000101
Bluetooth Device Address: 0x00-e0-4c-23-99-80
Link Key: 0xae 4f 02 f7 1e ed b5 03 08 69 31 25 1d 8f 51 16
Link Key Types: 0x05 Authenticated Combination Key
注:通知Host新的Link Key已经产生用来建立连接。

Frame89:Authentication complete event
00000110 00000011 00000000 00001001 00000000
Status: Success
Connection Handle: 9
注:表示验证的过程完成。

3.总结 
   主要总结了设备在Authentication过程中交换的HCI数据包和一些重要的参数,在进行完Authentication过程后将进行Encryption的一些操作,将在下一篇介绍。
0 1
原创粉丝点击