Unmanned aerial vehicle Mavlinkv2 signature frame security detection method and device

By tampering and forging Mavlinkv2 communication messages, the security detection results of the signed frame are determined, which solves the possible security vulnerabilities in the signed frame, reduces the security attack risk of drone communication messages, and optimizes the communication security protection mechanism .

CN119031371APending Publication Date: 2024-11-26NAT COMP NETWORK & INFORMATION SECURITY MANAGEMENT CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411072082.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

Mavlinkv2 signature frames may have security vulnerabilities, resulting in a higher risk of security attacks during transmission of UAV communication packets.

Method used

By obtaining the communication packets of the UAV based on the Mavlinkv2 protocol, determining whether to enable the signature mechanism based on the signature flag bit, and tampering and forging the communication packets, generating target packets, and using the current flight data and forged flight data to determine the signature frame. Security detection results, characterize whether there are security vulnerabilities in the signature frame.

Benefits of technology

It reduces the risk of UAV communication packets being subject to security attacks during transmission and optimizes the communication security protection mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119031371A_ABST
    Figure CN119031371A_ABST
Patent Text Reader

Abstract

The invention provides an unmanned aerial vehicle Mavlinkv2 signature frame security detection method and device, and the method comprises the steps: obtaining a communication message of an unmanned aerial vehicle based on a Mavlinkv2 protocol, the communication message carrying a signature frame; determining whether the communication message starts a signature mechanism according to the signature flag bit in the communication message; based on a determination result, performing tampering and forging processing on the communication message to obtain a target message, the target message including forged flight data; based on the current flight data and the forged flight data of the unmanned aerial vehicle, determining a security detection result corresponding to the signature frame, the security detection result being used for representing whether the signature frame has security vulnerabilities, thereby facilitating subsequent optimization of a communication security protection mechanism of the unmanned aerial vehicle; the risk that communication messages of the unmanned aerial vehicle suffer from security attacks in the transmission process is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication security technology, and in particular to a method and device for detecting the security of a Mavlinkv2 signature frame of an unmanned aerial vehicle. Background Art

[0002] Mavlink is a widely used drone communication protocol. Mavlinkv2 adds a signature mechanism based on Mavlink to prevent drone communication messages from being tampered with, retransmitted, and other security attacks during transmission.

[0003] Mavlinkv2 adds a signature frame at the end of the communication message to protect the integrity of the data carried by the communication message. The data before the signature frame in the communication message is still transmitted in plain text, and some implementation libraries support a rollback mechanism. Therefore, the signature frame may have security vulnerabilities, making the drone's communication message at high risk of security attacks during transmission. Summary of the invention

[0004] The present invention provides a method and device for detecting the security of a Mavlinkv2 signature frame of an unmanned aerial vehicle, so as to solve the defect in the prior art that a signature frame may have a security vulnerability, so that the communication message of the unmanned aerial vehicle is at a high risk of being subjected to security attacks during transmission. The method obtains a target message (including forged flight data) by tampering and forging the communication message (carrying a signature frame), and then determines the security detection result corresponding to the signature frame based on the current flight data of the unmanned aerial vehicle and the forged flight data. The security detection result is used to characterize whether there is a security vulnerability in the signature frame, so as to facilitate the subsequent optimization of the communication security protection mechanism of the unmanned aerial vehicle, so as to reduce the risk of the communication message of the unmanned aerial vehicle being subjected to security attacks during transmission.

[0005] The present invention provides a method for detecting the security of a Mavlinkv2 signature frame of an unmanned aerial vehicle, comprising the following steps.

[0006] Obtain the communication message of the drone based on the Mavlinkv2 protocol, where the communication message carries a signature frame.

[0007] Determine whether the communication message uses a signature mechanism according to the signature flag in the communication message.

[0008] Based on the determination result, the communication message is tampered with and forged to obtain a target message, which includes forged flight data.

[0009] Based on the current flight data of the drone and the forged flight data, a security detection result corresponding to the signature frame is determined.

[0010] According to a UAV Mavlinkv2 signature frame security detection method provided by the present invention, based on the determination result, the communication message is tampered with and forged to obtain a target message, including: when the determination result indicates that the signature mechanism is not enabled for the communication message, the data frame in the communication message is tampered with multiple times to obtain multiple first messages; based on the signature flag in the communication message, the communication message is forged multiple times to generate multiple second messages; the multiple first messages and the multiple second messages are determined as the target message.

[0011] According to a method for detecting the security of a UAV Mavlinkv2 signature frame provided by the present invention, based on a determination result, the communication message is tampered with or forged to obtain a target message, comprising: when the determination result indicates that the communication message enables a signature mechanism, receiving an abnormal message from the UAV based on the Mavlinkv2 protocol, wherein the field of the message identification bit in the abnormal message satisfies a first threshold; downgrading the communication message to obtain a third message; forging or tampering with the field of the third message multiple times to obtain multiple fourth messages; and determining the multiple fourth messages as the target message.

[0012] According to a UAV Mavlinkv2 signature frame security detection method provided by the present invention, the communication message is downgraded to obtain a third message, including: setting the field of the signature flag bit in the communication message to the second threshold to obtain a fifth message; deleting the signature frame in the fifth message to obtain the third message; or deleting the signature frame in the communication message to obtain a sixth message; setting the field of the signature flag bit in the sixth message to the second threshold to obtain the third message.

[0013] According to a UAV Mavlinkv2 signature frame security detection method provided by the present invention, the third message is forged or the field is tampered multiple times to obtain multiple fourth messages, including: the target frame in the third message is forged or the field is tampered multiple times to obtain multiple seventh messages, and the target frame includes at least one of the following: a frame header, a data frame and a signature frame in the third message; the field of the message identification bit carried by each of the multiple seventh messages is set to the first threshold to obtain the multiple fourth messages.

[0014] According to a method for detecting the security of a Mavlinkv2 signature frame of a drone provided by the present invention, the security detection result corresponding to the signature frame is determined based on the current flight data of the drone and the forged flight data, including: when the current flight data matches the forged flight data, determining that the signature frame has a security vulnerability as the security detection result; when the current flight data does not match the forged flight data, determining that the signature frame does not have a security vulnerability as the security detection result.

[0015] According to a UAV Mavlinkv2 signature frame security detection method provided by the present invention, determining whether the communication message enables the signature mechanism according to the signature flag in the communication message includes: when the field of the signature flag in the communication message is equal to a third threshold, determining that the communication message enables the signature mechanism; when the field of the signature flag in the communication message is equal to a second threshold, determining that the communication message does not enable the signature mechanism.

[0016] The present invention also provides a UAV Mavlinkv2 signature frame security detection device, comprising the following modules.

[0017] The acquisition module is used to obtain the communication message of the drone based on the Mavlinkv2 protocol, and the communication message carries a signature frame.

[0018] A processing module is used to determine whether the communication message uses a signature mechanism according to a signature flag in the communication message; based on the determination result, the communication message is tampered with and forged to obtain a target message, wherein the target message includes forged flight data.

[0019] The detection module is used to determine the security detection result corresponding to the signature frame based on the current flight data of the drone and the forged flight data.

[0020] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the Mavlinkv2 signature frame security detection method for a drone as described above is implemented.

[0021] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the UAV Mavlinkv2 signature frame security detection method as described in any one of the above is implemented.

[0022] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned drone Mavlinkv2 signature frame security detection methods.

[0023] The Mavlinkv2 signature frame security detection method and device provided by the present invention obtain the communication message of the drone based on the Mavlinkv2 protocol, and the communication message carries the signature frame; according to the signature flag in the communication message, determine whether the communication message enables the signature mechanism; based on the determination result, tamper and forge the communication message to obtain the target message, which includes forged flight data; based on the current flight data and forged flight data of the drone, determine the security detection result corresponding to the signature frame. The method tamper and forge the communication message (carrying the signature frame) to obtain the target message (including forged flight data), and then determine the security detection result corresponding to the signature frame based on the current flight data of the drone and the forged flight data. The security detection result is used to characterize whether there is a security vulnerability in the signature frame, which is convenient for the subsequent optimization of the communication security protection mechanism of the drone, so as to reduce the risk of the drone's communication message being subjected to security attacks during transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0025] Figure 1 It is a flow chart of the UAV Mavlinkv2 signature frame security detection method provided by the present invention.

[0026] Figure 2 It is a schematic diagram of the structure of the communication message provided by the present invention.

[0027] Figure 3 It is a structural schematic diagram of the UAV Mavlinkv2 signature frame security detection device provided by the present invention.

[0028] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0030] It should be noted that the execution subject involved in the embodiment of the present invention can be a drone Mavlinkv2 signature frame security detection device or an electronic device. Optionally, the electronic device can include: a computer, a mobile terminal, a wearable device, etc.

[0031] The embodiment of the present invention is further described below by taking an electronic device as an example.

[0032] Figure 1 : is a flow chart of the UAV Mavlinkv2 signature frame security detection method provided by the present invention, such as Figure 1 As shown, the method includes the following steps 101 to 104.

[0033] Step 101: Obtain the communication message of the drone based on the Mavlinkv2 protocol, where the communication message carries a signature frame.

[0034] Optionally, the electronic device can obtain the communication message of the drone based on the Mavlinkv2 protocol through an intermediate wireless device or a pseudo base station.

[0035] For example, Figure 2 It is a schematic diagram of the structure of the communication message provided by the present invention. Figure 2 As can be seen, the size of the signature frame (SIGNATURE) can be set to 13 bytes, and the signature frame can include: link identification bit (link id), timestamp (timestamp, abbreviated as tm.stamp) and signature bit (signature).

[0036] The link flag refers to the link number, which is usually the same as the channel number. The size of the link flag can be set to 1 byte.

[0037] The unit of the timestamp can be seconds or milliseconds, and the size of the timestamp can be set to 6 bytes.

[0038] The signature bit is calculated by the electronic device using a preset algorithm (such as the Secure Hash Algorithm 256-bit, SHA-256) on all the data before the signature bit in the communication message. The size of the signature bit can be set to 6 bytes.

[0039] also, Figure 2 In the embodiment, STX (Start of Text) is the start flag of the data packet; LEN (Length) is the length bit of the data frame, which is used to store the length value of the data frame (PAYLOAD); INC FLAGS (Incompatibility Flags) is the incompatibility flag, that is, the signature flag involved in the embodiment of the present invention; CMP FLAGS (Compatibility Flags) is the compatibility flag; SEQ (Sequence) is the data packet sequence number bit, which is used to store the data packet sequence number; SYS ID (System Identification) is the system identification bit, which is used to store the ID of the system; COMP ID (Component Identification) is the component identification bit, which is used to store the ID of the communication component in the system; MSG ID (Message Identification) is the message identification bit, which is used to identify the specific message type carried in the data packet, and the size of the message identification bit can be set to 3 bytes; PAYLOAD is a data frame, which is used to store the communication data actually transmitted, and the size of the data frame can be set to 0~255 bytes; CHECKSUM is a check bit, which is used to check the integrity and correctness of the data packet, and the check bit can be set to 2 bytes.

[0040] Step 102: Determine whether the signature mechanism is enabled for the communication message according to the signature flag in the communication message.

[0041] The signature flag is the above-mentioned INC FLAGS.

[0042] The signature mechanism is a security mechanism introduced by Mavlinkv2 based on Mavlink to prevent the drone's communication messages from being tampered with, retransmitted, and other security attacks during transmission.

[0043] After acquiring the communication message, the electronic device can determine whether the signature mechanism is enabled for the communication message according to the signature flag in the communication message, so as to subsequently perform tampering and forgery processing on the communication message.

[0044] In some embodiments, the electronic device determines whether the communication message has the signature mechanism enabled based on the signature flag in the communication message, which may include: when the field of the signature flag in the communication message is equal to a third threshold, the electronic device determines that the communication message has the signature mechanism enabled; when the field of the signature flag in the communication message is equal to a second threshold, the electronic device determines that the communication message has not the signature mechanism enabled.

[0045] Exemplarily, the third threshold may be 0x01 in hexadecimal notation, and the second threshold may be 0x00 in hexadecimal notation.

[0046] When the signature flag field in the communication message is equal to the third threshold value (such as 0x01), it means that the signature mechanism is enabled for the communication message at this time, and the electronic device uses the signature mechanism enabled for the communication message as the determination result; when the signature flag field in the communication message is equal to the second threshold value (such as 0x00), it means that the signature mechanism is not enabled for the communication message at this time, and the electronic device uses the signature mechanism not enabled for the communication message as the determination result.

[0047] Step 103: Based on the determination result, the communication message is tampered with and forged to obtain a target message, which includes forged flight data.

[0048] Among them, the purpose of tampering and forgery processing is to detect whether the drone's system has activated the communication security protection mechanism against security attacks such as tampering and retransmission.

[0049] Optionally, falsifying flight data may include: tampering with falsified attitude information, speed information, altitude information, etc.

[0050] After determining whether the signature mechanism is enabled for the communication message, the electronic device can, based on the determination result, tamper with and forge the acquired communication message to obtain a target message, and send the target message to the drone.

[0051] In some embodiments, the electronic device tampering and forging the communication message based on the determination result to obtain the target message may include one of the following implementation methods.

[0052] Implementation method 1: When the determination result indicates that the signature mechanism is not enabled for the communication message, the electronic device performs multiple data tampering on the data frame in the communication message to obtain multiple first messages; the electronic device forges the communication message multiple times based on the signature flag in the communication message to generate multiple second messages; the electronic device determines the multiple first messages and the multiple second messages as target messages.

[0053] It should be noted that the timing of the electronic device determining the multiple first messages and the electronic device determining the multiple second messages is not limited.

[0054] When the determination result indicates that the signature mechanism is not enabled for the communication message, the electronic device performs multiple data tampering on the data frame (PAYLOAD) in the communication message to obtain multiple first messages. Specifically, the electronic device may tamper with the communication data stored in the data frame multiple times (for example, tamper with the posture information, speed information and altitude information in the communication data respectively), and each data tampering can obtain one first message; and the electronic device may also forge the communication message multiple times based on the signature flag bit (INC FLAGS) in the communication message to generate multiple second messages. Specifically, since the determination result indicates that the signature mechanism is not enabled for the communication message, that is, the field of the signature flag bit in the communication message is equal to the second threshold value (such as 0x00), the electronic device may set the field of the signature flag bit carried by each of the forged multiple messages to the second threshold value, and the electronic device may also set the field of the data frame carried by each of the forged multiple messages to hexadecimal 0xff, so that multiple second messages can be obtained; then, the electronic device determines the multiple first messages and the multiple second messages as target messages.

[0055] Implementation method 2: When the determination result indicates that the signature mechanism is enabled for the communication message, the electronic device receives an abnormal message from the drone based on the Mavlinkv2 protocol, and the field of the message identification bit in the abnormal message meets the first threshold; the electronic device downgrades the communication message to obtain a third message; the electronic device forges or tampers with the fields of the third message multiple times to obtain multiple fourth messages; the electronic device determines the multiple fourth messages as target messages.

[0056] Since the size of the message identification bit (MSG ID) is 3 bytes, the first threshold also satisfies 3 bytes, and the specific value of the first threshold is not specifically limited here.

[0057] Optionally, the electronic device can remotely disguise itself as the channel0 port (the drone's default trusted port) or the local Universal Serial Bus (USB) port, and receive the drone's abnormal message based on the Mavlinkv2 protocol, where the message identification bit (MSG ID) field meets the first threshold (assuming it is x) by calling the accept_unsigned_callback function. This process is for the electronic device to remotely disguise the drone's trusted link and set a rollback condition for the drone.

[0058] The abnormal message may be an unsigned message or an incorrect message.

[0059] When the determination result indicates that the signature mechanism is enabled for the communication message, the electronic device can remotely disguise itself as a channel0 port or a locally used USB port, and receive abnormal messages from the drone based on the Mavlinkv2 protocol by calling the accept_unsigned_callback function; at the same time, the electronic device downgrades the communication message to obtain a third message, and then forges or tamper with the fields of the third message multiple times to obtain multiple fourth messages, and each forgery or field tampering can obtain one fourth message; then, the electronic device determines the multiple fourth messages as target messages.

[0060] In some embodiments, the electronic device downgrades the communication message to obtain a third message, which may include one of the following implementation methods.

[0061] Implementation method 1: The electronic device sets the field of the signature flag bit in the communication message to a second threshold value to obtain a fifth message; the electronic device deletes the signature frame in the fifth message to obtain a third message.

[0062] In the process of downgrading the communication message, since the determination result indicates that the communication message uses the signature mechanism, that is, the field of the signature flag bit (INC FLAGS) in the communication message is equal to the third threshold value (such as 0x01), at this time, the electronic device sets the field of the signature flag bit in the communication message to the second threshold value (such as 0x00), obtains the fifth message, and then deletes the signature frame (SIGNATURE) in the fifth message, that is, deletes the last 13 bytes in the fifth message, and obtains the third message. In this way, downgrading the communication message is achieved.

[0063] Implementation method 2: The electronic device deletes the signature frame in the communication message to obtain a sixth message; the electronic device sets the field of the signature flag bit in the sixth message to a second threshold to obtain a third message.

[0064] In the process of downgrading the communication message, the electronic device can delete the signature frame in the communication message, that is, delete the last 13 bytes in the communication message, and obtain the sixth message. Similarly, since the determination result indicates that the communication message enables the signature mechanism, that is, the field of the signature flag bit in the communication message is equal to the third threshold value (such as 0x01), and accordingly, the field of the signature flag bit in the sixth message is also equal to the third threshold value, the electronic device sets the field of the signature flag bit in the sixth message to the second threshold value (such as 0x00), and obtains the third message. This realizes the downgrading of the communication message.

[0065] In some embodiments, the electronic device forges a third message multiple times or tampers with fields multiple times to obtain multiple fourth messages, which may include: the electronic device forges a target frame in the third message multiple times or tampers with fields multiple times to obtain multiple seventh messages, where the target frame may include at least one of the following: a frame header, a data frame, and a signature frame in the third message; the electronic device sets the field of the message identification bit carried by each of the multiple seventh messages to a first threshold value to obtain multiple fourth messages.

[0066] Combination Figure 2 The frame header may include: STX, LEN, INC FLAGS (signature flag), CMP FLAGS, SEQ, SYSID, COMP ID and MSG ID (message identification bit); the data frame is PAYLOAD; the signature frame is SIGNATURE.

[0067] The electronic device can forge the target frame multiple times or tamper with the field multiple times to obtain multiple seventh messages, and each forgery or field tampering can obtain one seventh message; then, due to the rollback condition involved above, the electronic device sets the field of the message identification bit (MSG ID) carried by each of the multiple seventh messages to the first threshold value x to obtain multiple fourth messages. In this way, the electronic device can determine the multiple fourth messages as target messages.

[0068] Step 104: Based on the current flight data and the forged flight data of the drone, determine the security detection result corresponding to the signature frame.

[0069] After sending the target message to the drone, the electronic device can receive the current flight data sent by the drone in real time. Then, the electronic device compares the current flight data with the forged flight data to determine the security detection result corresponding to the signature frame. The security detection result is used to characterize whether there is a security vulnerability in the signature frame, which facilitates the subsequent optimization of the drone's communication security protection mechanism to reduce the risk of the drone's communication message being subjected to security attacks during transmission.

[0070] In some embodiments, the electronic device determines the security detection result corresponding to the signature frame based on the current flight data and the forged flight data of the drone, which may include: when the current flight data matches the forged flight data, the electronic device determines that there is a security vulnerability in the signature frame as the security detection result; when the current flight data does not match the forged flight data, the electronic device determines that there is no security vulnerability in the signature frame as the security detection result.

[0071] When the current flight data matches the forged flight data, it means that the drone is flying according to the forged flight data. In other words, the drone's system has not yet integrated an effective communication security protection mechanism to resist security attacks such as tampering and retransmission. This means that the drone has a signature mechanism rollback vulnerability. At this time, the electronic device determines the security vulnerability of the signature frame as a security detection result.

[0072] When the current flight data does not match the forged flight data, it means that the drone is not flying according to the forged flight data. In other words, the drone's system has integrated an effective communication security protection mechanism to resist security attacks such as tampering and retransmission. This means that the drone does not have a signature mechanism rollback vulnerability. At this time, the electronic device determines that there is no security vulnerability in the signature frame as the security detection result.

[0073] In an embodiment of the present invention, a communication message of a drone based on the Mavlinkv2 protocol is obtained, and the communication message carries a signature frame; according to the signature flag in the communication message, it is determined whether the communication message enables the signature mechanism; based on the determination result, the communication message is tampered and forged to obtain a target message, and the target message includes forged flight data; based on the current flight data and forged flight data of the drone, the security detection result corresponding to the signature frame is determined. The method obtains the target message (including forged flight data) by tampering and forging the communication message (carrying the signature frame), and then determines the security detection result corresponding to the signature frame based on the current flight data of the drone and the forged flight data. The security detection result is used to characterize whether there is a security vulnerability in the signature frame, which is convenient for the subsequent optimization of the communication security protection mechanism of the drone, so as to reduce the risk of the drone's communication message being subjected to security attacks during transmission.

[0074] The following is a description of the drone Mavlinkv2 signature frame security detection device provided by the present invention. The drone Mavlinkv2 signature frame security detection device described below and the drone Mavlinkv2 signature frame security detection method described above can be referenced to each other.

[0075] Figure 3 : is a schematic diagram of the structure of the UAV Mavlinkv2 signature frame security detection device provided by the present invention, such as Figure 3 As shown, the device includes the following acquisition module 301, processing module 302 and detection module 303.

[0076] The acquisition module 301 is used to obtain the communication message of the drone based on the Mavlinkv2 protocol, and the communication message carries a signature frame.

[0077] The processing module 302 is used to determine whether the communication message uses the signature mechanism according to the signature flag in the communication message; based on the determination result, the communication message is tampered with and forged to obtain a target message, which includes forged flight data.

[0078] The detection module 303 is used to determine the security detection result corresponding to the signature frame based on the current flight data of the drone and the forged flight data.

[0079] Optionally, the processing module 302 is specifically used to perform multiple data tampering on the data frames in the communication message to obtain multiple first messages when the determination result indicates that the signature mechanism is not enabled for the communication message; based on the signature flag in the communication message, perform multiple forgeries on the communication message to generate multiple second messages; and determine the multiple first messages and the multiple second messages as the target message.

[0080] Optionally, the processing module 302 is specifically used to receive an abnormal message from the drone based on the Mavlinkv2 protocol when the determination result indicates that the communication message enables the signature mechanism, and the field of the message identification bit in the abnormal message meets the first threshold; downgrade the communication message to obtain a third message; forge the third message multiple times or tamper with the fields multiple times to obtain multiple fourth messages; and determine the multiple fourth messages as the target message.

[0081] Optionally, the processing module 302 is specifically used to set the field of the signature flag bit in the communication message to the second threshold value to obtain a fifth message; delete the signature frame in the fifth message to obtain the third message; or delete the signature frame in the communication message to obtain a sixth message; set the field of the signature flag bit in the sixth message to the second threshold value to obtain the third message.

[0082] Optionally, the processing module 302 is specifically used to forge or tamper with the fields of the target frame in the third message multiple times to obtain multiple seventh messages, where the target frame includes at least one of the following: a frame header, a data frame, and a signature frame in the third message; and set the field of the message identification bit carried by each of the multiple seventh messages to the first threshold to obtain the multiple fourth messages.

[0083] Optionally, the detection module 303 is specifically used to, when the current flight data matches the forged flight data, determine that the signature frame has a security vulnerability as the security detection result; when the current flight data does not match the forged flight data, determine that the signature frame does not have a security vulnerability as the security detection result.

[0084] Optionally, the processing module 302 is specifically used to determine that the signature mechanism is enabled for the communication message when the field of the signature flag bit in the communication message is equal to a third threshold; and to determine that the signature mechanism is not enabled for the communication message when the field of the signature flag bit in the communication message is equal to a second threshold.

[0085] Figure 4 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 complete mutual communication through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the UAV Mavlinkv2 signature frame security detection method, the method comprising: obtaining a communication message of the UAV based on the Mavlinkv2 protocol, the communication message carrying a signature frame; determining whether the communication message enables the signature mechanism according to the signature flag bit in the communication message; based on the determination result, tampering and forging the communication message to obtain a target message, the target message including forged flight data; based on the current flight data of the UAV and the forged flight data, determining the security detection result corresponding to the signature frame.

[0086] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0087] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the drone Mavlinkv2 signature frame security detection method provided by the above methods, and the method includes: obtaining a communication message of the drone based on the Mavlinkv2 protocol, and the communication message carries a signature frame; according to the signature flag in the communication message, determining whether the communication message enables the signature mechanism; based on the determination result, tampering and forging the communication message to obtain a target message, and the target message includes forged flight data; based on the current flight data of the drone and the forged flight data, determining the security detection result corresponding to the signature frame.

[0088] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the drone Mavlinkv2 signature frame security detection method provided by the above methods, the method comprising: obtaining a communication message of the drone based on the Mavlinkv2 protocol, the communication message carrying a signature frame; determining whether the communication message enables the signature mechanism based on the signature flag in the communication message; based on the determination result, tampering and forging the communication message to obtain a target message, the target message including forged flight data; based on the current flight data of the drone and the forged flight data, determining the security detection result corresponding to the signature frame.

[0089] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0090] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still tamper with the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these tampering or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting the security of Mavlinkv2 signature frames of unmanned aerial vehicles, characterized in that: include: Obtain the communication message of the drone based on the Mavlinkv2 protocol, where the communication message carries a signature frame; Determining whether a signature mechanism is enabled for the communication message according to a signature flag in the communication message; Based on the determination result, the communication message is tampered with and forged to obtain a target message, wherein the target message includes forged flight data; Based on the current flight data of the drone and the forged flight data, a security detection result corresponding to the signature frame is determined.

2. The UAV Mavlinkv2 signature frame security detection method according to claim 1 is characterized in that: The method of tampering and falsifying the communication message based on the determination result to obtain the target message includes: When the determination result indicates that the signature mechanism is not enabled for the communication message, tampering the data frame in the communication message multiple times to obtain multiple first messages; Based on the signature flag in the communication message, the communication message is forged multiple times to generate multiple second messages; The multiple first messages and the multiple second messages are determined as the target messages.

3. The UAV Mavlinkv2 signature frame security detection method according to claim 1 is characterized in that: The method of tampering and falsifying the communication message based on the determination result to obtain the target message includes: In a case where the determination result indicates that the communication message uses a signature mechanism, receiving an abnormal message from the drone based on the Mavlinkv2 protocol, wherein a field of a message identification bit in the abnormal message satisfies a first threshold; Downgrading the communication message to obtain a third message; Forging or tampering with the fields of the third message multiple times to obtain multiple fourth messages; The multiple fourth messages are determined as the target messages.

4. The UAV Mavlinkv2 signature frame security detection method according to claim 3 is characterized in that: The step of downgrading the communication message to obtain a third message includes: Setting the signature flag field in the communication message to a second threshold value to obtain a fifth message; Deleting the signature frame in the fifth message to obtain the third message; or, Deleting the signature frame in the communication message to obtain a sixth message; The field of the signature flag in the sixth message is set to the second threshold to obtain the third message.

5. The UAV Mavlinkv2 signature frame security detection method according to claim 3 is characterized in that: The method of performing multiple forging or multiple field tampering on the third message to obtain multiple fourth messages includes: Forging or tampering with the fields of the target frame in the third message multiple times to obtain multiple seventh messages, wherein the target frame includes at least one of the following: a frame header, a data frame, and a signature frame in the third message; The field of the message identification bit carried by each of the multiple seventh messages is set to the first threshold value to obtain the multiple fourth messages.

6. The UAV Mavlinkv2 signature frame security detection method according to any one of claims 1 to 5, characterized in that: The determining, based on the current flight data of the drone and the forged flight data, a security detection result corresponding to the signature frame includes: In a case where the current flight data matches the forged flight data, determining that the signature frame has a security vulnerability as the security detection result; In a case where the current flight data does not match the forged flight data, determining that there is no security vulnerability in the signature frame is the security detection result.

7. The UAV Mavlinkv2 signature frame security detection method according to any one of claims 1 to 5, characterized in that: The determining, according to the signature flag bit in the communication message, whether the communication message enables the signature mechanism includes: When the signature flag field in the communication message is equal to a third threshold, determining that the communication message enables a signature mechanism; When the field of the signature flag bit in the communication message is equal to the second threshold, it is determined that the signature mechanism is not enabled for the communication message.

8. A drone Mavlinkv2 signature frame security detection device, characterized in that: include: An acquisition module is used to acquire the communication message of the drone based on the Mavlinkv2 protocol, wherein the communication message carries a signature frame; A processing module, configured to determine whether the communication message uses a signature mechanism according to a signature flag in the communication message; and based on the determination result, perform tampering and forgery processing on the communication message to obtain a target message, wherein the target message includes forged flight data; The detection module is used to determine the security detection result corresponding to the signature frame based on the current flight data of the drone and the forged flight data.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the UAV Mavlinkv2 signature frame security detection method as described in any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the UAV Mavlinkv2 signature frame security detection method as described in any one of claims 1 to 7 is implemented.