Movatterモバイル変換


[0]ホーム

URL:


CN106487630A - A kind of method and apparatus that vehicle safety is detected based on test case - Google Patents

A kind of method and apparatus that vehicle safety is detected based on test case
Download PDF

Info

Publication number
CN106487630A
CN106487630ACN201611109902.4ACN201611109902ACN106487630ACN 106487630 ACN106487630 ACN 106487630ACN 201611109902 ACN201611109902 ACN 201611109902ACN 106487630 ACN106487630 ACN 106487630A
Authority
CN
China
Prior art keywords
bus
test case
data
car
message data
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.)
Granted
Application number
CN201611109902.4A
Other languages
Chinese (zh)
Other versions
CN106487630B (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.)
Anxinxing Beijing Technology Co ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co LtdfiledCriticalBeijing Qihoo Technology Co Ltd
Priority to CN201611109902.4ApriorityCriticalpatent/CN106487630B/en
Publication of CN106487630ApublicationCriticalpatent/CN106487630A/en
Application grantedgrantedCritical
Publication of CN106487630BpublicationCriticalpatent/CN106487630B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention discloses a kind of method detecting vehicle safety based on test case, the method includes:Set up communication with automobile CAN-bus to be connected;Gather the message data on automobile CAN-bus and it is stored, the identification information according to the message data being stored forms test case;Described test case is sent to CAN, determines automobile whether safety according in response to the vehicle condition of described test case or automobile action.The method being proposed by the application, can be automatically formed test case according to the data of Real-time Collection such that it is able to the controlled probability of automatic detection automobile, and then be capable of detecting when the security breaches of automobile.Meanwhile, the invention also discloses a kind of based on test case detect vehicle safety device.

Description

Translated fromChinese
一种基于测试用例检测汽车安全性的方法和装置A method and device for detecting automobile safety based on test cases

技术领域technical field

本发明涉及汽车安全技术,尤其涉及一种基于测试用例检测汽车安全性的方法和装置。The invention relates to automobile safety technology, in particular to a method and device for detecting automobile safety based on test cases.

背景技术Background technique

现有技术中,随着人们对汽车的安全、节能和环保等性能要求的提高,在汽车上的电子设备越来越多,微控制器的数目多达几十个。汽车总线技术是现代汽车电子技术的发展趋势之一,它不仅解决了汽车电子化出现的线路复杂和线束增加的问题,而且实现了控制系统间信息和资源的共享,汽车总线技术是车上信息和控制系统的支撑,随着时代的发展,汽车总线技术在现代汽车电子技术中的地位越来越重要。但汽车总线的开发设计是建立在封闭式的网络上的,没有考虑安全因素。但随着汽车智能化发展,新能源在汽车上的使用,汽车之间通过网络联接,高科技汽车部件的配置,汽车被控制的可能性越来越大,因此汽车总线的安全性需要得到保证,因而汽车总线的安全性漏洞检测是亟待解决的技术问题。In the prior art, as people's requirements for safety, energy saving and environmental protection of automobiles increase, there are more and more electronic devices in automobiles, and the number of microcontrollers is as many as dozens. Automotive bus technology is one of the development trends of modern automotive electronic technology. It not only solves the problems of complex wiring and increased wiring harnesses in automotive electronics, but also realizes the sharing of information and resources between control systems. And the support of the control system, with the development of the times, the status of automotive bus technology in modern automotive electronic technology is becoming more and more important. However, the development and design of the automobile bus is based on a closed network without considering safety factors. However, with the development of intelligent automobiles, the use of new energy in automobiles, the connection between automobiles through the network, and the configuration of high-tech automobile components, the possibility of automobiles being controlled is increasing. Therefore, the safety of automobile buses needs to be guaranteed. , so the security vulnerability detection of the automobile bus is a technical problem to be solved urgently.

发明内容Contents of the invention

鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的基于测试用例检测汽车安全性的方法和装置。In view of the above problems, the present invention is proposed to provide a method and device for detecting vehicle safety based on test cases which overcome the above problems or at least partly solve the above problems.

本发明提供一种基于测试用例检测汽车安全性的方法,该方法包括:The invention provides a method for detecting automobile safety based on a test case, the method comprising:

与汽车CAN总线建立通讯连接;Establish a communication connection with the car CAN bus;

采集汽车CAN总线上的报文数据并对其进行存储,根据所存储的报文数据的标识信息形成测试用例;Collect the message data on the CAN bus of the car and store it, and form test cases according to the identification information of the stored message data;

对CAN总线发送所述测试用例,根据响应于所述测试用例的汽车状态或汽车动作来确定汽车是否安全。The test case is sent to the CAN bus, and whether the car is safe is determined according to the state or action of the car in response to the test case.

可选的,该方法在与汽车CAN总线建立通讯连接后,包括:在命令窗口输入预定命令,以采集汽车CAN总线上的报文数据。Optionally, after establishing a communication connection with the vehicle CAN bus, the method includes: inputting a predetermined command in a command window to collect message data on the vehicle CAN bus.

可选的,对CAN总线发送所述测试用例,具体包括:Optionally, sending the test case to the CAN bus specifically includes:

根据预定间隔时间对CAN总线发送所述测试用例;或者sending the test case to the CAN bus according to a predetermined interval; or

对CAN总线发送所述测试用例预定次数;或者sending said test case to the CAN bus a predetermined number of times; or

对CAN总线发送单个测试用例;或者Send a single test case to the CAN bus; or

对CAN总线发送缓存存储的多个测试用例。Multiple test cases for CAN bus send buffer storage.

可选的,该方法基于浏览器或者客户端应用程序执行。Optionally, the method is executed based on a browser or client application.

可选的,该方法还包括,设置采集CAN报文的速率。Optionally, the method further includes setting a rate of collecting CAN messages.

本申请还提供一种基于测试用例检测汽车安全性的装置,该装置包括:The present application also provides a device for detecting vehicle safety based on test cases, the device comprising:

通讯连接部件,用于与汽车CAN总线建立通讯连接;The communication connection part is used to establish a communication connection with the CAN bus of the vehicle;

采集部件,用于采集汽车CAN总线上的报文数据并对其进行存储;The collection part is used to collect the message data on the CAN bus of the car and store it;

测试用例产生部件,用于根据所存储的报文数据的标识信息形成测试用例;A test case generation component, configured to form a test case according to the identification information of the stored message data;

重放部件,用于对CAN总线发送所述测试用例,根据响应于所述测试用例的汽车状态或汽车动作来确定汽车是否安全。The replay component is used to send the test case to the CAN bus, and determine whether the car is safe according to the state of the car or the action of the car in response to the test case.

可选的,该装置还包括:命令窗口模块,用于提供命令输入窗口供用户输入预定命令,以采集汽车CAN总线上的报文数据。Optionally, the device further includes: a command window module, configured to provide a command input window for the user to input predetermined commands to collect message data on the CAN bus of the vehicle.

可选的,重放部件具体包括:Optionally, the replay component specifically includes:

第一测试用例发送单元,用于根据预定间隔时间对CAN总线发送所述测试用例;或者A first test case sending unit, configured to send the test case to the CAN bus according to a predetermined interval; or

第二测试用例发送单元,用于对CAN总线发送所述测试用例预定次数;或者The second test case sending unit is used to send the test case a predetermined number of times to the CAN bus; or

第三测试用例发送单元,用于对CAN总线发送单个测试用例;或者The third test case sending unit is used to send a single test case to the CAN bus; or

第四测试用例发送单元,用于对CAN总线发送缓存存储的多个测试用例。The fourth test case sending unit is configured to send the buffered and stored multiple test cases to the CAN bus.

可选的,所述采集部件、测试用例产生部件、重复部件通过浏览器实现。Optionally, the acquisition component, test case generation component, and repetition component are implemented through a browser.

可选的,该装置还包括,设置部件,用于设置采集CAN报文的速率。Optionally, the device also includes a setting component, configured to set the rate of collecting CAN messages.

通过本申请所提出的上述方法,能够根据实时采集的数据自动形成测试用例,从而能够自动检测汽车被控制的可能性,进而能够检测出汽车的安全漏洞。Through the above-mentioned method proposed in this application, test cases can be automatically formed according to the data collected in real time, so that the possibility of the car being controlled can be automatically detected, and furthermore, the safety loopholes of the car can be detected.

上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.

附图说明Description of drawings

通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same parts. In the attached picture:

图1示出了本发明汽车总线与汽车各部件的连接示意图;Fig. 1 has shown the connection schematic diagram of automobile bus of the present invention and each component of automobile;

图2示出了根据本发明一个实施例的一种基于测试用例检测汽车安全性的方法的流程图;Fig. 2 shows a flow chart of a method for detecting vehicle safety based on test cases according to an embodiment of the present invention;

图3示出基于测试用例检测汽车安全性的装置采集的数据的实时更新界面图;Fig. 3 shows the real-time update interface diagram of the data collected by the device for detecting automobile safety based on the test case;

图4示出了基于测试用例检测汽车安全性的装置采集的新数据包的实时更新界面图;Fig. 4 shows the real-time update interface diagram of the new data packet collected by the device for detecting automobile safety based on the test case;

图5示出了根据本发明一个实施例的一种基于测试用例检测汽车安全性的装置的结构示意图。Fig. 5 shows a schematic structural diagram of a device for detecting vehicle safety based on test cases according to an embodiment of the present invention.

具体实施方式detailed description

下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

汽车总线数据包括控制汽车的泊车辅助系统、车道偏离预警系统、发动机电子控制系统、制动防抱死系统、电动助力转向系统、自适应巡航控制系统、前方碰撞预警系统等的数据,汽车总线数据如果被攻击,那么利用被攻击到的汽车总线数据就能够控制汽车的上述各种系统,从而导致汽车的安全问题。Automobile bus data includes the data of the parking assist system, lane departure warning system, engine electronic control system, brake anti-lock braking system, electric power steering system, adaptive cruise control system, forward collision warning system, etc., which control the car. If the data is attacked, the above-mentioned various systems of the car can be controlled by using the attacked car bus data, which will lead to car safety problems.

如图1所示,汽车CAN总线不仅连接有汽车的部件,如电机控制部件、主动悬挂部件、变速控制部件、ABS、电动门锁、安全气囊、电动窗等,还连接有车身网络通信模块(汽车与蜂窝网络、3g,4g等网络通信的移动通信模块,蓝牙通信模块,局域网通信模块、广播通信模块等)、OBD((On-Board Diagnostics车载自动诊断系统)、其他用户私自接入的后装设备,CAN总线上传输的数据包括有各个模块的控制数据,本申请提出了一种利用CAN总线上传输的数据来进行汽车安全检测的新思路。As shown in Figure 1, the automotive CAN bus is not only connected to automotive components, such as motor control components, active suspension components, transmission control components, ABS, electric door locks, airbags, electric windows, etc., but also connected to the body network communication module ( Mobile communication modules for communication between cars and cellular networks, 3G, 4G and other networks, Bluetooth communication modules, LAN communication modules, broadcast communication modules, etc.), OBD ((On-Board Diagnostics on-board automatic diagnosis system), after other users access without permission The data transmitted on the CAN bus includes the control data of each module. This application proposes a new idea of using the data transmitted on the CAN bus to carry out vehicle safety detection.

本申请提供一种基于测试用例检测汽车安全性的方法,如图2所示,该方法包括:The present application provides a method for detecting automobile safety based on test cases, as shown in Figure 2, the method includes:

S1.与汽车CAN总线建立通讯连接;S1. Establish a communication connection with the CAN bus of the car;

S2.采集汽车CAN总线上的报文数据并对其进行存储,根据所存储的报文数据的标识信息形成测试用例;S2. Collect the message data on the CAN bus of the automobile and store it, and form a test case according to the identification information of the stored message data;

S3.对CAN总线发送所述测试用例,根据响应于所述测试用例的汽车状态或汽车动作来确定汽车是否安全。S3. Send the test case to the CAN bus, and determine whether the car is safe according to the state or action of the car in response to the test case.

该方法可承载在一个检测平台上,具体检测平台可通过浏览器实现。该方法可在移动终端、平板电脑、PC机等设备上实现,在步骤S1中,与汽车建立通讯连接前将所述设备与汽车总线建立硬件连接,在建立硬件连接后,在命令窗口通过输入系统命令pythonmain.py来建立硬件连接接口与浏览器的通信通道,在建立该通信通道后,通过浏览器输入预定网址,便可在设备上运行该检测平台,即通过浏览器的运行将上述每个步骤的运行结果以网页的形式进行显示,用户基于网页对报文数据的显示,可选择哪些报文数据进行存储,也可选择将报文数据存储在一个缓存区或者多个缓存区。在对数据进行缓存后,根据所存储的报文数据的标识信息形成测试用例;一个测试用例对应于汽车的一个状态或者动作。实时采集CAN总线上的数据,一般来说,与一个状态或者动作相关的CAN总线上的数据具有相同的标识ID,基于这些数据进行处理能够形成测试用例。为了检测汽车的安全性,将所形成的测试用例再发送到总线上,汽车根据发送到总线上的测试用例数据进行响应,根据响应就能判断汽车的安全性,如果测试用例是汽车打开车门的总线数据,那么汽车的响应如果是打开车门,那么说明汽车能够被完全控制,安全性很低。The method can be carried on a detection platform, and the specific detection platform can be realized through a browser. The method can be implemented on devices such as mobile terminals, tablet computers, and PCs. In step S1, before establishing a communication connection with the automobile, the hardware connection between the device and the automobile bus is established. After the hardware connection is established, enter the The system commands pythonmain.py to establish a communication channel between the hardware connection interface and the browser. After the communication channel is established, enter the predetermined URL through the browser to run the detection platform on the device, that is, through the operation of the browser, each of the above The operation results of each step are displayed in the form of a web page. Based on the display of the message data on the web page, the user can choose which message data to store, and can also choose to store the message data in one buffer or multiple buffers. After the data is cached, a test case is formed according to the identification information of the stored message data; a test case corresponds to a state or action of the car. Collect data on the CAN bus in real time. Generally speaking, data on the CAN bus related to a state or action has the same identification ID, and processing based on these data can form a test case. In order to detect the safety of the car, the formed test case is sent to the bus, and the car responds according to the test case data sent to the bus, and the safety of the car can be judged according to the response. If the test case is that the car opens the door Bus data, if the response of the car is to open the door, it means that the car can be fully controlled and the safety is very low.

通过本申请所提出的上述方法,能够根据实时采集的数据自动形成测试用例,从而能够自动检测汽车被控制的可能性,进而能够检测出汽车的安全漏洞。Through the above-mentioned method proposed in this application, test cases can be automatically formed according to the data collected in real time, so that the possibility of the car being controlled can be automatically detected, and furthermore, the safety loopholes of the car can be detected.

作为其他的实施例,在与汽车CAN总线建立通讯连接后,根据设备的操作系统不同,命令的窗口会有所不同,建立浏览器与硬件连接接口的通信通道的命令也会有所不同。而且上述方法也可通过电子客户端、APP等应用程序来实现,在这种实现方式中,即便是相同的设备操作系统,因为实现的方式不同,通信通道就会不同,输入的命令也会有所不同,本申请在此不做局限限定。As another embodiment, after the communication connection is established with the CAN bus of the vehicle, the window of the command will be different according to the operating system of the device, and the commands for establishing the communication channel between the browser and the hardware connection interface will also be different. Moreover, the above method can also be realized through application programs such as electronic clients and APPs. In this implementation mode, even if it is the same device operating system, the communication channel will be different because of the different implementation methods, and the input commands will also have differences. different, the present application does not make limitations here.

作为一种具体实施方式,在采集汽车CAN总线上的报文数据时,将当前数据信息存储到缓冲区,这个缓冲区信息是系统自动确定的缓冲区,缓冲区以一定的序号进行标识。如果用户确定将具有一标识信息ID的报文数据或者具有一类标识信息ID的报文数据存储在一个新的缓冲区,可以通过选择所采集的报文数据并通过预定命令或者触发预定按钮将其存为一个新的缓冲区。通过这样的技术手段,方便用户进行测试用例的选择和查找,也方便以缓存区为单位进行测试用例的重放。As a specific implementation, when collecting the message data on the CAN bus of the automobile, the current data information is stored in the buffer. This buffer information is a buffer automatically determined by the system, and the buffer is identified with a certain serial number. If the user determines to store the message data with an identification information ID or the message data with a type of identification information ID in a new buffer, you can select the collected message data and set the It is saved as a new buffer. Through such technical means, it is convenient for users to select and search for test cases, and it is also convenient for replaying test cases in units of cache areas.

作为一种具体实施方式,在采集汽车CAN总线上的报文数据时,通过界面实时显示所采集的当前数据信息,具体显示内容包括报文标识信息canID,可通过列名称Mid来标识,包括报文数据,具体可通过列名称Data来标识,包括采集次数,即一个报文出现的次数,具体可通过列名称Count来标识,包括时间间隔,即每条报文之间的时间间隔,具体可通过列名称Interval来标识。在显示报文数据相关信息的情况,用户可选择要重放的报文数据,基本上一个测试用例至少包括具有一个标识信息ID的报文数据,比如是对应于汽车完成一个动作的控制报文数据,或者是有关ABS系统的所有控制报文数据、前方碰撞预警系统的所有控制数据等。As a specific implementation, when collecting the message data on the CAN bus of the automobile, the current data information collected is displayed in real time through the interface, and the specific display content includes the message identification information canID, which can be identified by the column name Mid, including the message Text data, which can be identified by the column name Data, including the number of collections, that is, the number of times a message appears, specifically can be identified by the column name Count, including the time interval, that is, the time interval between each message, which can be specifically Identified by the column name Interval. In the case of displaying message data-related information, the user can select the message data to be replayed. Basically, a test case includes at least message data with an identification information ID, such as a control message corresponding to the completion of an action by the car Data, or all control message data about the ABS system, all control data of the forward collision warning system, etc.

对CAN总线发送所述测试用例(即测试用例的重放),具体可包括:Sending the test case (i.e. the replay of the test case) to the CAN bus may specifically include:

根据预定间隔时间对CAN总线发送所述测试用例;或者sending the test case to the CAN bus according to a predetermined interval; or

对CAN总线发送所述测试用例预定次数;或者sending said test case to the CAN bus a predetermined number of times; or

对CAN总线发送单个测试用例;或者Send a single test case to the CAN bus; or

对CAN总线发送缓存存储的多个测试用例。Multiple test cases for CAN bus send buffer storage.

上述预定间隔时间、预定次数都可以通过设置模块来进行灵活设置,从而能够保证利用测试用例来检测汽车安全性的灵活性、可重复性,也帮助提高检测汽车安全性的准确度。The above predetermined interval time and predetermined times can be flexibly set through the setting module, so as to ensure the flexibility and repeatability of using test cases to detect automobile safety, and also help to improve the accuracy of automobile safety detection.

在一个具体实施例中,该方法基于客户端软件或者PC执行。具体过程为:将所述设备与汽车总线建立硬件连接,在建立硬件连接后,在命令窗口通过输入系统命令pythonmain.py来建立硬件连接接口与浏览器的通信通道,在建立该通信通道后,通过启动客户端软件,便可在设备上运行该检测平台,即通过客户端软件的运行将上述每个步骤的运行结果以图形用户界面的形式进行显示,用户基于图形用户界面对报文数据的显示,可选择哪些报文数据进行存储,也可选择将报文数据存储在一个缓存区或者多个缓存区。在对数据进行缓存后,根据所存储的报文数据的标识信息形成测试用例;一个测试用例对应于汽车的一个状态或者动作。实时采集CAN总线上的数据,一般来说,与一个状态或者动作相关的CAN总线上的数据具有相同的标识ID,基于这些数据进行处理能够形成测试用例。为了检测汽车的安全性,将所形成的测试用例再发送到总线上,汽车根据发送到总线上的测试用例数据进行响应,根据响应就能判断汽车的安全性,如果测试用例是汽车打开车门的总线数据,那么汽车的响应如果是打开车门,那么说明汽车能够被完全控制,安全性很低。In a specific embodiment, the method is executed based on client software or PC. The specific process is: set up the hardware connection between the device and the automobile bus. After the hardware connection is established, the communication channel between the hardware connection interface and the browser is established by entering the system command pythonmain.py in the command window. After the communication channel is established, By starting the client software, the detection platform can be run on the device, that is, through the operation of the client software, the operation results of each of the above steps are displayed in the form of a graphical user interface, and the user can analyze the message data based on the graphical user interface. Display, you can choose which message data to store, and you can also choose to store the message data in one buffer or multiple buffers. After the data is cached, a test case is formed according to the identification information of the stored message data; a test case corresponds to a state or action of the car. Collect data on the CAN bus in real time. Generally speaking, data on the CAN bus related to a state or action has the same identification ID, and processing based on these data can form a test case. In order to detect the safety of the car, the formed test case is sent to the bus, and the car responds according to the test case data sent to the bus, and the safety of the car can be judged according to the response. If the test case is that the car opens the door Bus data, if the response of the car is to open the door, it means that the car can be fully controlled and the safety is very low.

通过本申请所提出的上述方法,能够根据实时采集的数据自动形成测试用例,从而能够自动检测汽车被控制的可能性,进而能够检测出汽车的安全漏洞。Through the above-mentioned method proposed in this application, test cases can be automatically formed according to the data collected in real time, so that the possibility of the car being controlled can be automatically detected, and furthermore, the safety loopholes of the car can be detected.

在重放测试用例时,通过预定功能按钮或者命令进行重放报文的选择。作为一种具体实施方式,设置Replay功能模块,在该功能模块下,设置重放模式设定输入框,输入框的标签可为Replay mode,通过该输入框用户可选择重放模式,可选择的重放模式有单条重放模式(用于单条报文的重放)、单缓存区重放模式(一个缓存区中的报文进行重放)、多缓存区重放模式(几个缓存区中的报文进行重放)。通过Interval输入框设定报文之间重放replay的间隔;通过Replay time设定框设定replay的次数;通过Mid输入框设定要重放报文的标识Id;通过Data输入框设定报文的数据内容。通过该实施例,用户能够对要重放的报文进行灵活设定,从而能够对对应于一个汽车的安全方面集中、全面地进行检测,使得对汽车的安全检测能够按照用户的意愿进行。When replaying the test case, select the replay message through the predetermined function button or command. As a kind of specific embodiment, set Replay function module, under this function module, replay mode setting input box is set, the label of input box can be Replay mode, the user can select playback mode by this input box, selectable The replay modes include single replay mode (for replay of a single message), single buffer replay mode (replay of messages in one buffer), multi-buffer replay mode (replay of several buffers) packets are replayed). Set the replay interval between messages through the Interval input box; set the replay times through the Replay time setting box; set the ID of the message to be replayed through the Mid input box; set the replay through the Data input box The data content of the text. Through this embodiment, the user can flexibly set the message to be replayed, so that the safety aspect corresponding to a car can be detected intensively and comprehensively, so that the safety detection of the car can be carried out according to the user's wishes.

作为一种具体实施方式,通过控制模块来设定采集Can报文的线速率,可以定位125,250,500,通过这样的手段能够灵活控制单位时间采集的数据量。对于不同的时间段或者不同的测试车型,可以设置不同的线速率进行Can总线数据的采集。As a specific implementation mode, the line rate of collecting Can messages can be set by the control module, and can be positioned at 125, 250, 500. By this method, the amount of data collected per unit time can be flexibly controlled. For different time periods or different test models, different line rates can be set to collect Can bus data.

作为另一具体实施方式,在采集CAN总线上的报文数据并对其进行存储后,对所采集的报文数据按照ID分类,基于所分类的类别实时更新数据,根据实时更新的数据显示数据位变化。具体如图3所示,分类的报文标识信息ID以格式0x12D-(301)、ox12F-(303)、0x133-(307)、0x1EB-(491)、0x2B6-(694)等显示,与上述ID信息对应的,具体报文数据内容如下:11500010041902FF、48A5110000000030、00310000140200D0、A900000000000000、0B0312161A000500,与上述ID信息对应的,采集次数如下:96,57,48,59,104,与上述ID信息对应的,采集报文的时间间隔为1000.2532005310059,1000.25296211224268,999.5129108428955,1024.0538120269775,499.3319511413574。从上面几个具体例子可以看出,报文数据实时显示情况,根据报文数据的标识信息、具体数据内容可以看出数据位变化,数据位的变化在时间上可以精确到毫秒级,从而对汽车安全漏洞的检测提供了非常准确的测试用例数据基础。As another specific implementation, after collecting the message data on the CAN bus and storing it, the collected message data is classified according to ID, the data is updated in real time based on the classified category, and the data is displayed according to the real-time updated data bit changes. Specifically as shown in Figure 3, the classified message identification information ID is displayed in the format 0x12D-(301), ox12F-(303), 0x133-(307), 0x1EB-(491), 0x2B6-(694), etc. Corresponding to the ID information, the specific message data content is as follows: 11500010041902FF, 48A5110000000030, 00310000140200D0, A900000000000000, 0B0312161A000500, corresponding to the above ID information, the collection times are as follows: 96, 57, 48, 59, 104, corresponding to the above ID information The intervals for collecting packets are 1000.2532005310059, 1000.25296211224268, 999.5129108428955, 1024.0538120269775, 499.3319511413574. It can be seen from the above specific examples that the message data is displayed in real time, and the data bit changes can be seen according to the identification information and specific data content of the message data. The change of data bits can be accurate to the millisecond level in time, so that The detection of automotive security vulnerabilities provides a very accurate test case data base.

也就是说,通过对总线报文数据的采集,能够采集到涉及到总线控制安全的几乎所有的数据,而且这些数据在重放再发送到CAN总线上时,能够几乎检测到几乎所有安全漏洞。That is to say, through the collection of bus message data, almost all data related to bus control security can be collected, and when these data are replayed and sent to the CAN bus, almost all security vulnerabilities can be detected.

实际上,上面的具体实施例中都是重放采集并缓存后的完整报文数据。作为变形的一种实施方式,还可以是在重放数据报文之前,对数据进行管理,具体过程为:对采集并缓存至缓存区的报文数据进行与非逻辑运算,与非逻辑运算针对报文数据的标识信息ID进行,从而对前后接收到的数据包取非交集,能够根据标识信息ID获取到新数据包。然后对于新数据包,在数据内容上进行去重运算,去重后的数据内容反映针对具体汽车功能的控制信息,利用进行去重运算后的数据内容单个数据包的进行重放,以进行汽车是否能够被控制的测试,去重后的数据的显示界面可如图4所示。In fact, in the above specific embodiments, the collected and cached complete packet data is replayed. As a modified implementation, it is also possible to manage the data before replaying the data message. The specific process is: perform an AND non-logical operation on the message data collected and cached in the buffer area, and the non-logical operation for The identification information ID of the message data is carried out, so that the data packets received before and after are non-intersected, and a new data packet can be obtained according to the identification information ID. Then, for the new data packet, de-duplication operation is performed on the data content, and the de-duplication data content reflects the control information for specific vehicle functions, and the data content after de-duplication operation is used to replay a single data packet to perform vehicle For the test of whether it can be controlled, the display interface of the deduplicated data can be shown in Figure 4.

对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明实施例并不受所描述的动作顺序的限制,因为依据本发明实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本发明实施例所必须的。For the method embodiment, for the sake of simple description, it is expressed as a series of action combinations, but those skilled in the art should know that the embodiment of the present invention is not limited by the described action order, because according to the embodiment of the present invention , certain steps may be performed in other order or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

本申请还提供一种基于测试用例检测汽车安全性的装置,如图5所示,该装置包括:The present application also provides a device for detecting automobile safety based on test cases, as shown in Figure 5, the device includes:

通讯连接部件100,用于与汽车CAN总线建立通讯连接;The communication connection part 100 is used to establish a communication connection with the automobile CAN bus;

采集部件200,用于采集汽车CAN总线上的报文数据并对其进行存储;The collecting part 200 is used for collecting the message data on the CAN bus of the automobile and storing it;

测试用例产生部件300,用于根据所存储的报文数据的标识信息形成测试用例;A test case generating component 300, configured to form a test case according to the identification information of the stored message data;

重放部件400,用于对CAN总线发送所述测试用例,根据响应于所述测试用例的汽车状态或汽车动作来确定汽车是否安全。The replay component 400 is configured to send the test case to the CAN bus, and determine whether the car is safe according to the state or action of the car in response to the test case.

在该装置中,所述通讯连接部件100硬件上可由数据线和数据接口组成,用于建立所述装置与汽车总线的数据传输通道。In this device, the communication connection part 100 may consist of a data line and a data interface in hardware, and is used to establish a data transmission channel between the device and the vehicle bus.

所述采集部件200,测试用例产生部件300,重放部件400硬件上由移动终端、PC机、平板电脑上等具有处理功能的设备的处理器来实现,主要功能基于浏览器应用软件或者客户端应用软件的功能模块实现。所述建立所述装置与汽车总线的数据传输通道设备的操作系统中的命令界面来实现。The acquisition component 200, the test case generation component 300, and the replay component 400 are realized by the processors of devices with processing functions such as mobile terminals, PCs, tablet computers, etc. on the hardware, and the main functions are based on browser application software or client Realization of functional modules of application software. The establishment of the data transmission channel between the device and the vehicle bus is realized through the command interface in the operating system of the equipment.

通过本申请所提出的上述装置,能够根据实时采集的数据自动形成测试用例,并及时和可控制地将测试用例返回到汽车Can总线上从而能够自动检测汽车被控制的可能性,进而能够检测出汽车的安全漏洞。Through the above-mentioned device proposed in this application, test cases can be automatically formed according to the data collected in real time, and the test cases can be returned to the car CAN bus in a timely and controllable manner, so that the possibility of the car being controlled can be automatically detected, and then can be detected Car security breach.

如果所述设备通过浏览器应用程序来实现报文数据的采集、显示与管理,那么与汽车建立通讯连接前将所述设备与汽车总线建立硬件连接,在建立硬件连接后,在命令窗口通过输入系统命令python main.py来建立硬件连接接口与浏览器的通信通道,在建立该通信通道后,通过浏览器输入预定网址,便可在设备上运行该检测平台,即通过浏览器的运行将上述每个步骤的运行结果以网页的形式进行显示,用户基于网页对报文数据的显示,可选择哪些报文数据进行存储,也可选择将报文数据存储在一个缓存区或者多个缓存区。在对数据进行缓存后,根据所存储的报文数据的标识信息形成测试用例;一个测试用例对应于汽车的一个状态或者动作。实时采集CAN总线上的数据,一般来说,与一个状态或者动作相关的CAN总线上的数据具有相同的标识ID,基于这些数据进行处理能够形成测试用例。为了检测汽车的安全性,将所形成的测试用例再发送到总线上,汽车根据发送到总线上的测试用例数据进行响应,根据响应就能判断汽车的安全性,如果测试用例是汽车打开车门的总线数据,那么汽车的响应如果是打开车门,那么说明汽车能够被完全控制,安全性很低。If the device realizes the collection, display and management of message data through the browser application program, then establish a hardware connection between the device and the automobile bus before establishing a communication connection with the automobile, and after establishing the hardware connection, enter the The system commands python main.py to establish a communication channel between the hardware connection interface and the browser. After the communication channel is established, enter the predetermined URL through the browser to run the detection platform on the device, that is, through the operation of the browser, the above The operation result of each step is displayed in the form of a web page. Based on the display of the message data on the web page, the user can choose which message data to store, and can also choose to store the message data in one cache or multiple caches. After the data is cached, a test case is formed according to the identification information of the stored message data; a test case corresponds to a state or action of the car. Collect data on the CAN bus in real time. Generally speaking, data on the CAN bus related to a state or action has the same identification ID, and processing based on these data can form a test case. In order to detect the safety of the car, the formed test case is sent to the bus, and the car responds according to the test case data sent to the bus, and the safety of the car can be judged according to the response. If the test case is that the car opens the door Bus data, if the response of the car is to open the door, it means that the car can be fully controlled and the safety is very low.

作为其他的实施例,在与汽车CAN总线建立通讯连接后,根据设备的操作系统不同,命令的窗口会有所不同,建立浏览器与硬件连接接口的通信通道的命令也会有所不同。而且上述方法也可通过电子客户端、APP等应用程序来实现,在这种实现方式中,即便是相同的设备操作系统,因为实现的方式不同,通信通道就会不同,输入的命令也会有所不同,本申请在此不做局限限定。As another embodiment, after the communication connection is established with the CAN bus of the vehicle, the window of the command will be different according to the operating system of the device, and the commands for establishing the communication channel between the browser and the hardware connection interface will also be different. Moreover, the above method can also be realized through application programs such as electronic clients and APPs. In this implementation mode, even if it is the same device operating system, the communication channel will be different because of the different implementation methods, and the input commands will also have differences. different, the present application does not make limitations here.

作为一种具体实施方式,在采集汽车CAN总线上的报文数据时,将当前数据信息存储到缓冲区,这个缓冲区信息是系统自动确定的缓冲区,缓冲区以一定的序号进行标识。如果用户确定将具有一标识信息ID的报文数据或者具有一类标识信息ID的报文数据存储在一个新的缓冲区,可以通过选择所采集的报文数据并通过预定命令或者触发预定按钮将其存为一个新的缓冲区。通过这样的技术手段,方便用户进行测试用例的选择和查找,也方便以缓存区为单位进行测试用例的重放。As a specific implementation, when collecting the message data on the CAN bus of the automobile, the current data information is stored in the buffer. This buffer information is a buffer automatically determined by the system, and the buffer is identified with a certain serial number. If the user determines to store the message data with an identification information ID or the message data with a type of identification information ID in a new buffer, you can select the collected message data and set the It is saved as a new buffer. Through such technical means, it is convenient for users to select and search for test cases, and it is also convenient for replaying test cases in units of cache areas.

作为一种具体实施方式,在采集汽车CAN总线上的报文数据时,通过界面实时显示所采集的当前数据信息,具体显示内容包括报文标识信息canID,可通过列名称Mid来标识,包括报文数据,具体可通过列名称Data来标识,包括采集次数,即一个报文出现的次数,具体可通过列名称Count来标识,包括时间间隔,即每条报文之间的时间间隔,具体可通过列名称Interval来标识。在显示报文数据相关信息的情况,用户可选择要重放的报文数据,基本上一个测试用例至少包括具有一个标识信息ID的报文数据,比如是对应于汽车完成一个动作的控制报文数据,或者是有关ABS系统的所有控制报文数据、前方碰撞预警系统的所有控制数据等。As a specific implementation, when collecting the message data on the CAN bus of the automobile, the current data information collected is displayed in real time through the interface, and the specific display content includes the message identification information canID, which can be identified by the column name Mid, including the message Text data, which can be identified by the column name Data, including the number of collections, that is, the number of times a message appears, specifically can be identified by the column name Count, including the time interval, that is, the time interval between each message, which can be specifically Identified by the column name Interval. In the case of displaying message data-related information, the user can select the message data to be replayed. Basically, a test case includes at least message data with an identification information ID, such as a control message corresponding to the completion of an action by the car Data, or all control message data about the ABS system, all control data of the forward collision warning system, etc.

在一个具体实施例中,终端设备基于客户端软件或者PC执行。具体过程为:将所述设备与汽车总线建立硬件连接,在建立硬件连接后,在命令窗口通过输入系统命令pythonmain.py来建立硬件连接接口与浏览器的通信通道,在建立该通信通道后,通过启动客户端软件,便可在设备上运行该检测平台,即通过客户端软件的运行将上述每个步骤的运行结果以图形用户界面的形式进行显示,用户基于图形用户界面对报文数据的显示,可选择哪些报文数据进行存储,也可选择将报文数据存储在一个缓存区或者多个缓存区。在对数据进行缓存后,根据所存储的报文数据的标识信息形成测试用例;一个测试用例对应于汽车的一个状态或者动作。实时采集CAN总线上的数据,一般来说,与一个状态或者动作相关的CAN总线上的数据具有相同的标识ID,基于这些数据进行处理能够形成测试用例。为了检测汽车的安全性,将所形成的测试用例再发送到总线上,汽车根据发送到总线上的测试用例数据进行响应,根据响应就能判断汽车的安全性,如果测试用例是汽车打开车门的总线数据,那么汽车的响应如果是打开车门,那么说明汽车能够被完全控制,安全性很低。In a specific embodiment, the terminal device is executed based on client software or PC. The specific process is: set up the hardware connection between the device and the automobile bus. After the hardware connection is established, the communication channel between the hardware connection interface and the browser is established by entering the system command pythonmain.py in the command window. After the communication channel is established, By starting the client software, the detection platform can be run on the device, that is, through the operation of the client software, the operation results of each of the above steps are displayed in the form of a graphical user interface, and the user can analyze the message data based on the graphical user interface. Display, you can choose which message data to store, and you can also choose to store the message data in one buffer or multiple buffers. After the data is cached, a test case is formed according to the identification information of the stored message data; a test case corresponds to a state or action of the car. Collect data on the CAN bus in real time. Generally speaking, data on the CAN bus related to a state or action has the same identification ID, and processing based on these data can form a test case. In order to detect the safety of the car, the formed test case is sent to the bus, and the car responds according to the test case data sent to the bus, and the safety of the car can be judged according to the response. If the test case is that the car opens the door Bus data, if the response of the car is to open the door, it means that the car can be fully controlled and the safety is very low.

在重放测试用例时,通过预定功能按钮或者命令进行重放报文的选择。作为一种具体实施方式,设置Replay功能模块,在该功能模块下,设置重放模式设定输入框,输入框的标签可为Replay mode,通过该输入框用户可选择重放模式,可选择的重放模式有单条重放模式(用于单条报文的重放)、单缓存区重放模式(一个缓存区中的报文进行重放)、多缓存区重放模式(几个缓存区中的报文进行重放)。通过Interval输入框设定报文之间重放replay的间隔;通过Replay time设定框设定replay的次数;通过Mid输入框设定要重放报文的标识Id;通过Data输入框设定报文的数据内容。通过该实施例,用户能够对要重放的报文进行灵活设定,从而能够对对应于一个汽车的安全方面集中、全面地进行检测,使得对汽车的安全检测能够按照用户的意愿进行。When replaying the test case, select the replay message through the predetermined function button or command. As a kind of specific embodiment, set Replay function module, under this function module, replay mode setting input box is set, the label of input box can be Replay mode, the user can select playback mode by this input box, selectable The replay modes include single replay mode (for replay of a single message), single buffer replay mode (replay of messages in one buffer), multi-buffer replay mode (replay of several buffers) packets are replayed). Set the replay interval between messages through the Interval input box; set the replay times through the Replay time setting box; set the ID of the message to be replayed through the Mid input box; set the replay through the Data input box The data content of the text. Through this embodiment, the user can flexibly set the message to be replayed, so that the safety aspect corresponding to a car can be detected intensively and comprehensively, so that the safety detection of the car can be carried out according to the user's wishes.

作为一种具体实施方式,通过控制模块来设定采集Can报文的线速率,可以定位125,250,500,通过这样的手段能够灵活控制单位时间采集的数据量。对于不同的时间段或者不同的测试车型,可以设置不同的线速率进行Can总线数据的采集。As a specific implementation mode, the line rate of collecting Can messages can be set by the control module, and can be positioned at 125, 250, 500. By this method, the amount of data collected per unit time can be flexibly controlled. For different time periods or different test models, different line rates can be set to collect Can bus data.

作为另一具体实施方式,在采集CAN总线上的报文数据并对其进行存储后,对所采集的报文数据按照ID分类,基于所分类的类别实时更新数据,根据实时更新的数据显示数据位变化。分类的报文标识信息ID以格式0x12D-(301)、ox12F-(303)、0x133-(307)、0x1EB-(491)、0x2B6-(694)等显示,与上述ID信息对应的,具体报文数据内容如下:11500010041902FF、48A5110000000030、00310000140200D0、A900000000000000、0B0312161A000500,与上述ID信息对应的,采集次数如下:96,57,48,59,104,与上述ID信息对应的,采集报文的时间间隔为1000.2532005310059,1000.25296211224268,999.5129108428955,1024.0538120269775,499.3319511413574。从上面几个具体例子可以看出,报文数据实时显示情况,根据报文数据的标识信息、具体数据内容可以看出数据位变化,数据位的变化在时间上可以精确到毫秒级,从而对汽车安全漏洞的检测提供了非常准确的测试用例数据基础。As another specific implementation, after collecting the message data on the CAN bus and storing it, the collected message data is classified according to ID, the data is updated in real time based on the classified category, and the data is displayed according to the real-time updated data bit changes. The classified message identification information ID is displayed in the format 0x12D-(301), ox12F-(303), 0x133-(307), 0x1EB-(491), 0x2B6-(694), etc. The content of the text data is as follows: 11500010041902FF, 48A5110000000030, 00310000140200D0, A900000000000000, 0B0312161A000500, corresponding to the above ID information, the collection times are as follows: 96, 57, 48, 59, 104, and the time interval corresponding to the above ID information is the collected text 1000.2532005310059, 1000.25296211224268, 999.5129108428955, 1024.0538120269775, 499.3319511413574. It can be seen from the above specific examples that the message data is displayed in real time, and the data bit changes can be seen according to the identification information and specific data content of the message data. The change of data bits can be accurate to the millisecond level in time, so that The detection of automotive security vulnerabilities provides a very accurate test case data base.

也就是说,通过对总线报文数据的采集,能够采集到涉及到总线控制安全的几乎所有的数据,而且这些数据在重放再发送到CAN总线上时,能够几乎检测到几乎所有安全漏洞。That is to say, through the collection of bus message data, almost all data related to bus control security can be collected, and when these data are replayed and sent to the CAN bus, almost all security vulnerabilities can be detected.

实际上,上面的具体实施例中都是重放采集并缓存后的完整报文数据。作为变形的一种实施方式,还可以是在重放数据报文之前,对数据进行管理,具体过程为:对采集并缓存至缓存区的报文数据进行与非逻辑运算,与非逻辑运算针对报文数据的标识信息ID进行,从而对前后接收到的数据包取非交集,能够根据标识信息ID获取到新数据包。然后对于新数据包,在数据内容上进行去重运算,去重后的数据内容反映针对具体汽车功能的控制信息,利用进行去重运算后的数据内容单个数据包的进行重放,以进行汽车是否能够被控制的测试。因此测试用例产生部件300,具体包括有逻辑与非处理单元,用于基于报文数据的标识信息ID对数据报文进行逻辑与非运算,从而获取采集到的新数据包;数据去重单元,用于对数据内容上进行去重运算,重命名单元,对于去重后的数据包可对其进行命令,并将单个数据包发送至总线进行安全性测试。通过上述具体实施例,能够精确获取到总线控制信息,基于总线控制信息进行安全测试,更进一步提高了安全性检测的精度。In fact, in the above specific embodiments, the collected and cached complete packet data is replayed. As a modified implementation, it is also possible to manage the data before replaying the data message. The specific process is: perform an AND non-logical operation on the message data collected and cached in the buffer area, and the non-logical operation for The identification information ID of the message data is carried out, so that the data packets received before and after are non-intersected, and a new data packet can be obtained according to the identification information ID. Then, for the new data packet, de-duplication operation is performed on the data content, and the de-duplication data content reflects the control information for specific vehicle functions, and the data content after de-duplication operation is used to replay a single data packet to perform vehicle A test of whether it can be controlled. Therefore, the test case generation component 300 specifically includes a logic and non-processing unit, which is used to perform a logic and non-operation on the data message based on the identification information ID of the message data, thereby obtaining the new data packet collected; the data deduplication unit, It is used to de-duplicate the data content, rename the unit, command the de-duplicated data packet, and send a single data packet to the bus for security testing. Through the above specific embodiments, the bus control information can be accurately obtained, and the security test is performed based on the bus control information, which further improves the accuracy of the security test.

作为一种具体实施方式,该装置还包括:命令窗口模块,用于提供命令输入窗口供用户输入预定命令,以采集汽车CAN总线上的报文数据。As a specific implementation, the device further includes: a command window module, which is used to provide a command input window for the user to input predetermined commands to collect message data on the CAN bus of the vehicle.

所述重放部件具体包括:The replay component specifically includes:

第一测试用例发送单元,用于根据预定间隔时间对CAN总线发送所述测试用例;或者A first test case sending unit, configured to send the test case to the CAN bus according to a predetermined interval; or

第二测试用例发送单元,用于对CAN总线发送所述测试用例预定次数;或者The second test case sending unit is used to send the test case a predetermined number of times to the CAN bus; or

第三测试用例发送单元,用于对CAN总线发送单个测试用例;或者The third test case sending unit is used to send a single test case to the CAN bus; or

第四测试用例发送单元,用于对CAN总线发送缓存存储的多个测试用例。The fourth test case sending unit is configured to send the buffered and stored multiple test cases to the CAN bus.

上述预定间隔时间、预定次数都可以通过设置模块来进行灵活设置,从而能够保证利用测试用例来检测汽车安全性的灵活性、可重复性,也帮助提高检测汽车安全性的准确度。The above predetermined interval time and predetermined times can be flexibly set through the setting module, so as to ensure the flexibility and repeatability of using test cases to detect automobile safety, and also help to improve the accuracy of automobile safety detection.

该装置还包括,设置部件,用于设置采集CAN报文的速率。The device also includes a setting component, which is used to set the rate of collecting CAN messages.

基于本实施例所介绍的检测汽车安全性的方法和装置,本领域所属技术人员能够了解本实施例的电子设备的具体实施方式以及其各种变化形式,所以在此对于该电子设备如何实现本申请实施例中的做标记的方法不再详细介绍。只要本领域所属技术人员实施本申请实施例中做标记的方法所采用的装置,都属于本申请所欲保护的范围。Based on the method and device for detecting automobile safety introduced in this embodiment, those skilled in the art can understand the specific implementation of the electronic device in this embodiment and its various variations, so how to implement this electronic device here The marking method in the embodiment of the application will not be described in detail. As long as those skilled in the art implement the marking method in the embodiment of the present application, the devices used by them all belong to the protection scope of the present application.

一般来说,在传送总线数据时,为了保证传输安全,会进行端到端的加密,在一端接收总线数据时会进行时间戳的校验,数据的检验和比对。本申请利用直接采集总线数据,再将所采集的总线数据重放发送至总线的原理,仅需要对采集的数据进行缓存和选择,再重放发送至总线,根据汽车的响应即可检测出汽车的安全性,而不需要对总线数据进行复杂的解密、加密、校验、数据比对等复杂的数据处理过程,因此节省了大量的数据处理资源。并且因为几乎所有的控制数据均会通过总线发送,因此利用总线数据的重放几乎能够检测所有控制方面的安全漏洞。Generally speaking, when transmitting bus data, in order to ensure transmission security, end-to-end encryption will be performed, and when receiving bus data at one end, time stamp verification, data verification and comparison will be performed. This application uses the principle of directly collecting bus data, and then replaying the collected bus data to the bus. It only needs to cache and select the collected data, and then replay and send it to the bus. The car can be detected according to the response of the car. It does not need complex data processing processes such as complex decryption, encryption, verification, and data comparison for bus data, thus saving a lot of data processing resources. And because almost all the control data will be sent through the bus, the replay of the bus data can detect almost all control security loopholes.

在此提供的方法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The methods and displays presented herein are not inherently related to any particular computer, virtual system, or other device. Various generic systems can also be used with the teachings based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the contents of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.

在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.

类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.

本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

此外,本领域的技术人员能够理解,尽管在此的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. And form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.

本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的网关、代理服务器、系统中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in the gateway, proxy server, and system according to the embodiments of the present invention. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.

应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.

Claims (10)

Translated fromChinese
1.一种基于测试用例检测汽车安全性的方法,其特征在于,该方法包括:1. A method for detecting automobile safety based on test cases, characterized in that the method comprises:与汽车CAN总线建立通讯连接;Establish a communication connection with the car CAN bus;采集汽车CAN总线上的报文数据并对其进行存储,根据所存储的报文数据的标识信息形成测试用例;Collect the message data on the CAN bus of the car and store it, and form test cases according to the identification information of the stored message data;对CAN总线发送所述测试用例,根据响应于所述测试用例的汽车状态或汽车动作来确定汽车是否安全。The test case is sent to the CAN bus, and whether the car is safe is determined according to the state of the car or the action of the car in response to the test case.2.根据权利要求1所述的方法,其特征还在于,该方法在与汽车CAN总线建立通讯连接后,包括:在命令窗口输入预定命令,以采集汽车CAN总线上的报文数据。2. The method according to claim 1, further characterized in that, after establishing a communication connection with the automobile CAN bus, the method comprises: inputting a predetermined command in a command window to collect message data on the automobile CAN bus.3.根据权利要求1所述的方法,其特征还在于,对CAN总线发送所述测试用例,具体包括:3. method according to claim 1, is characterized in that also, sending described test case to CAN bus, specifically comprises:根据预定间隔时间对CAN总线发送所述测试用例;或者sending the test case to the CAN bus according to a predetermined interval; or对CAN总线发送所述测试用例预定次数;或者sending said test case to the CAN bus a predetermined number of times; or对CAN总线发送单个测试用例;或者Send a single test case to the CAN bus; or对CAN总线发送缓存存储的多个测试用例。Multiple test cases for CAN bus send buffer storage.4.根据权利要求1所述的方法,其特征还在于,该方法基于浏览器应用程序或者客户端应用程序执行。4. The method according to claim 1, further characterized in that the method is executed based on a browser application or a client application.5.根据权利要求1所述的方法,其特征还在于,该方法还包括,设置采集CAN报文的速率。5. The method according to claim 1, further comprising, setting the rate of collecting CAN messages.6.一种基于测试用例检测汽车安全性的装置,其特征在于,该装置包括:6. A device for detecting automobile safety based on a test case, characterized in that the device comprises:通讯连接部件,用于与汽车CAN总线建立通讯连接;The communication connection part is used to establish a communication connection with the CAN bus of the vehicle;采集部件,用于采集汽车CAN总线上的报文数据并对其进行存储;The collection part is used to collect the message data on the CAN bus of the car and store it;测试用例产生部件,用于根据所存储的报文数据的标识信息形成测试用例;A test case generation component, configured to form a test case according to the identification information of the stored message data;重放部件,用于对CAN总线发送所述测试用例,根据响应于所述测试用例的汽车状态或汽车动作来确定汽车是否安全。The replay component is used to send the test case to the CAN bus, and determine whether the car is safe according to the state of the car or the action of the car in response to the test case.7.根据权利要求6所述的装置,其特征还在于,该装置还包括:命令窗口模块,用于提供命令输入窗口供用户输入预定命令,以采集汽车CAN总线上的报文数据。7. The device according to claim 6, further comprising: a command window module for providing a command input window for the user to input a predetermined command to collect message data on the CAN bus of the vehicle.8.根据权利要求6或7所述的装置,其特征还在于,重放部件具体包括:8. The device according to claim 6 or 7, further characterized in that the replay component specifically comprises:第一测试用例发送单元,用于根据预定间隔时间对CAN总线发送所述测试用例;或者A first test case sending unit, configured to send the test case to the CAN bus according to a predetermined interval; or第二测试用例发送单元,用于对CAN总线发送所述测试用例预定次数;或者The second test case sending unit is used to send the test case a predetermined number of times to the CAN bus; or第三测试用例发送单元,用于对CAN总线发送单个测试用例;或者The third test case sending unit is used to send a single test case to the CAN bus; or第四测试用例发送单元,用于对CAN总线发送缓存存储的多个测试用例。The fourth test case sending unit is configured to send the buffered and stored multiple test cases to the CAN bus.9.根据权利要求1所述的装置,其特征还在于,所述采集部件、测试用例产生部件、重复部件通过浏览器应用程序或者客户端应用程序实现。9. The device according to claim 1, further characterized in that, the collection component, the test case generation component, and the repeating component are implemented through a browser application program or a client application program.10.根据权利要求1所述的装置,其特征还在于,该装置还包括,设置部件,用于设置采集CAN报文的速率。10. The device according to claim 1, characterized in that the device further comprises, a setting unit for setting the rate of collecting CAN messages.
CN201611109902.4A2016-12-022016-12-02A kind of method and apparatus based on test case detection vehicle safetyActiveCN106487630B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201611109902.4ACN106487630B (en)2016-12-022016-12-02A kind of method and apparatus based on test case detection vehicle safety

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201611109902.4ACN106487630B (en)2016-12-022016-12-02A kind of method and apparatus based on test case detection vehicle safety

Publications (2)

Publication NumberPublication Date
CN106487630Atrue CN106487630A (en)2017-03-08
CN106487630B CN106487630B (en)2019-05-31

Family

ID=58275125

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201611109902.4AActiveCN106487630B (en)2016-12-022016-12-02A kind of method and apparatus based on test case detection vehicle safety

Country Status (1)

CountryLink
CN (1)CN106487630B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108965001A (en)*2018-07-122018-12-07北京航空航天大学A kind of appraisal procedure and device of vehicle message data model
CN110730091A (en)*2019-09-062020-01-24深圳开源互联网安全技术有限公司Automobile data processing method and device
CN111061250A (en)*2019-12-192020-04-24中国汽车技术研究中心有限公司Automobile CAN bus information safety testing method
CN111682993A (en)*2020-08-112020-09-18广州汽车集团股份有限公司 A method and device for simulating an automobile CAN bus signal

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102592414A (en)*2012-02-232012-07-18北京智华驭新汽车电子技术开发有限公司Test platform of driver active safety early warning system
CN103219030A (en)*2013-04-182013-07-24重庆长安汽车股份有限公司Method for synchronous acquisition and playback of vehicle-mounted video and bus data
CN104914769A (en)*2015-06-192015-09-16陕西法士特齿轮有限责任公司CAN bus-based data acquisition system and acquisition processing method
CN106157572A (en)*2015-04-212016-11-23惠州市德赛西威汽车电子股份有限公司The method of testing of automobile active safety early warning system and test device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102592414A (en)*2012-02-232012-07-18北京智华驭新汽车电子技术开发有限公司Test platform of driver active safety early warning system
CN103219030A (en)*2013-04-182013-07-24重庆长安汽车股份有限公司Method for synchronous acquisition and playback of vehicle-mounted video and bus data
CN106157572A (en)*2015-04-212016-11-23惠州市德赛西威汽车电子股份有限公司The method of testing of automobile active safety early warning system and test device
CN104914769A (en)*2015-06-192015-09-16陕西法士特齿轮有限责任公司CAN bus-based data acquisition system and acquisition processing method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108965001A (en)*2018-07-122018-12-07北京航空航天大学A kind of appraisal procedure and device of vehicle message data model
CN108965001B (en)*2018-07-122020-08-25北京航空航天大学Method and device for evaluating vehicle message data model
CN110730091A (en)*2019-09-062020-01-24深圳开源互联网安全技术有限公司Automobile data processing method and device
CN111061250A (en)*2019-12-192020-04-24中国汽车技术研究中心有限公司Automobile CAN bus information safety testing method
CN111061250B (en)*2019-12-192021-06-04中国汽车技术研究中心有限公司Automobile CAN bus information safety testing method
CN111682993A (en)*2020-08-112020-09-18广州汽车集团股份有限公司 A method and device for simulating an automobile CAN bus signal

Also Published As

Publication numberPublication date
CN106487630B (en)2019-05-31

Similar Documents

PublicationPublication DateTitle
US11748474B2 (en)Security system and methods for identification of in-vehicle attack originator
CN106559431B (en)Visual analysis method and device for automobile safety detection
EP3787936B1 (en)Detecting abnormal events in vehicle operation based on machine learning analysis of messages transmitted over communication channels
CN106411956A (en)Method and device for analyzing automobile bus safety
WO2015192652A1 (en)Real-time vehicle operation monitoring system and method based on mobile terminal
US11514731B2 (en)Method and system for remote vehicle diagnostics
CN106487630A (en)A kind of method and apparatus that vehicle safety is detected based on test case
US20240411864A2 (en)System and method for detection of anomalous controller area network (can) messages
CN106650505A (en)Vehicle attack detection method and device
CN112019512B (en)Automobile network safety test system
WO2015018151A1 (en)Vehicle information acquisition method and device
CN106603360B (en) Method and device for testing vehicle bus safety based on bus batch data
CN117336191A (en)Attack simulation method, device, electronic equipment and storage medium
CN112543195A (en)Information security assessment method and device for intelligent networked automobile and electronic equipment
EP3726383B1 (en)Vehicle bus-based communication method and apparatus, and computer device
CN114022899B (en) Method, device and vehicle for detecting a body part of a vehicle occupant sticking out of a vehicle window
CN108494858A (en)A kind of vehicle window skylight monitoring system and method
CN212243228U (en)Vehicle-mounted T-BOX monitoring system and vehicle
WO2021073501A1 (en)Resource configuration method, apparatus, and system for in-vehicle service slices
CN118740370A (en) Data security
CN116165993A (en) Test device, method and system for vehicle intelligent cockpit
CN115766208A (en)Intrusion detection method and device for communication system and automatic driving system
CN115562954A (en)Test method and device of vehicle-mounted early warning system, computing equipment and medium
CN112019602A (en) A vehicle communication method and device
CN107885148B (en)Vehicle-mounted internet remote control method

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
CP01Change in the name or title of a patent holder
CP01Change in the name or title of a patent holder

Address after:100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee after:BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee after:Beijing Qizhi Business Consulting Co.,Ltd.

Address before:100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before:BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before:Qizhi software (Beijing) Co.,Ltd.

TR01Transfer of patent right
TR01Transfer of patent right

Effective date of registration:20220413

Address after:100016 1773, 15 / F, 17 / F, building 3, No.10, Jiuxianqiao Road, Chaoyang District, Beijing

Patentee after:Sanliu0 Digital Security Technology Group Co.,Ltd.

Address before:100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before:BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before:Beijing Qizhi Business Consulting Co.,Ltd.

TR01Transfer of patent right
TR01Transfer of patent right

Effective date of registration:20231121

Address after:1739, 17th Floor, 15th Floor, Building 3, No.10 Jiuxianqiao Road, Chaoyang District, Beijing, 100015

Patentee after:Anxinxing (Beijing) Technology Co.,Ltd.

Address before:100016 1773, 15 / F, 17 / F, building 3, No.10, Jiuxianqiao Road, Chaoyang District, Beijing

Patentee before:Sanliu0 Digital Security Technology Group Co.,Ltd.


[8]ページ先頭

©2009-2025 Movatter.jp