Data packet attack protection test method and device, electronic equipment and storage medium

By generating and sending abnormal data packets, the shortcomings of IP Option attack protection are solved, automated testing is achieved, device reliability is improved, and testing costs are reduced.

CN120658804APending Publication Date: 2025-09-16WUHAN SIPU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511063818.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-31
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing technologies lack effective methods to protect against IP Option attacks, resulting in insufficient device reliability.

Method used

By obtaining network card information and target machine IP address, generating and sending abnormal data packets, and using data packet construction models for customization or default generation, automatic attack protection testing of abnormal data packets is achieved.

Benefits of technology

The reliability of packet attack protection and testing methods is improved, and testing costs are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120658804A_ABST
    Figure CN120658804A_ABST
Patent Text Reader

Abstract

The invention provides a data packet attack protection test method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining network card information of a network card used for transmitting a data packet, and an IP address of a target drone to be attacked by the data packet in response to a test request; detecting whether a data packet setting request is received; when it is detected that the data packet setting request is received, the received data packet construction parameters are input into a preset data packet construction model, and an original data packet is generated; when it is detected that the data packet setting request is not received, an original data packet is generated according to default data packet construction parameters of a data packet construction model; abnormally changing data packet parameters of the original data packet to obtain an abnormal data packet; and sending the abnormal data packet through the network card, and sending the abnormal data packet to the target drone according to the IP address. According to the invention, the automatic attack protection test of the abnormal data packet can be realized, and the test cost can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security technology, and in particular to a test method, device, electronic device and storage medium for data packet attack protection. Background Art

[0002] An IP Option attack exploits the IP Option field (optional field) in IP packets to carry out network attacks. Attackers construct specialized IP Option fields to steal information, perform network detection, or disrupt services. The IP Option field carries additional control information. These options are intended for debugging, diagnostics, or specialized network control, but are rarely used in real-world networks, making them vulnerable to exploitation.

[0003] Therefore, there is an urgent need for a method for performing attack protection testing on devices to improve the reliability of the devices. Summary of the Invention

[0004] In view of this, the present application provides a test method, device, electronic device and storage medium for data packet attack protection, which can realize automatic attack protection testing of abnormal data packets and reduce testing costs.

[0005] A first aspect of an embodiment of the present application provides a testing method for data packet attack protection, comprising: responding to a test request, obtaining network card information of a network card used to send data packets, and an IP address of a target machine to be attacked by the data packet; detecting whether a data packet setting request is received, wherein the data packet setting request carries data packet construction parameters; in the case of detecting that the data packet setting request is received, inputting the received data packet construction parameters into a preset data packet construction model to generate an original data packet; in the case of detecting that the data packet setting request is not received, generating the original data packet according to the default data packet construction parameters of the data packet construction model; making an abnormal change to the data packet parameters of the original data packet to obtain an abnormal data packet; sending the abnormal data packet through the network card, and sending the abnormal data packet to the target machine according to the IP address.

[0006] In a possible implementation, abnormally changing the packet parameters of the original packet to obtain the abnormal packet includes: inputting the packet parameters into a preset abnormal packet construction model to generate abnormal packet parameters of the abnormal packet to obtain the abnormal packet.

[0007] In one possible implementation, the abnormal data packet construction model includes multiple abnormal data packet templates; the abnormal change of the data packet parameters of the original data packet to obtain the abnormal data packet includes: responding to a template selection request, determining a target abnormal data packet template from the multiple abnormal data packet templates; inputting the data packet parameters into the abnormal data packet construction model, and the abnormal data packet construction model generating the abnormal data packet parameters that match the target abnormal data packet template.

[0008] In one possible implementation, the method further includes: responding to the test request and obtaining a source MAC address; sending the abnormal data packet through a network card corresponding to the network card information includes: sending the abnormal data packet through the network card based on the source MAC address.

[0009] In one possible implementation, the response to the test request and obtaining the source MAC address includes: detecting whether the test request carries source MAC address construction information or source MAC address random generation information; when it is detected that the test request carries the source MAC address construction information, generating the source MAC address according to the source MAC address construction information; when it is detected that the test request carries the source MAC address random generation information, randomly generating the source MAC address according to the source MAC address random generation information; when it is detected that the test request does not carry the source MAC address construction information and the source MAC address random generation information, using the MAC address of the host where the network card is located as the source MAC address.

[0010] In one possible implementation, the method further includes: responding to the test request to obtain the number of data packet attacks and the attack time interval; sending the abnormal data packet to the target machine according to the IP address includes: sending the abnormal data packet to the target machine multiple times according to the attack time interval until the number of times the abnormal data packet is sent reaches the number of data packet attacks.

[0011] In a possible implementation, the data packet is an IP Option data packet.

[0012] In the second aspect, an embodiment of the present application also provides a test device for data packet attack protection, comprising: an acquisition module, a detection module, a generation module, an abnormal change module and a sending module; the acquisition module is used to respond to a test request, obtain the network card information of the network card used to send the data packet, and the IP address of the target machine to be attacked by the data packet; the detection module is used to detect whether a data packet setting request is received, wherein the data packet setting request carries data packet construction parameters; the generation module is used to input the received data packet construction parameters into a preset data packet construction model to generate an original data packet when detecting that the data packet setting request is received; when detecting that the data packet setting request is not received, generate the original data packet according to the default data packet construction parameters of the data packet construction model; the abnormal change module is used to make abnormal changes to the data packet parameters of the original data packet to obtain an abnormal data packet; the sending module is used to send the abnormal data packet through the network card, and send the abnormal data packet to the target machine according to the IP address.

[0013] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a processor and a memory, wherein the memory is used to store instructions, and the processor is used to call the instructions in the memory so that the electronic device executes the test method for data packet attack protection as described in the first aspect.

[0014] In a fourth aspect, an embodiment of the present application further provides a storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the test method for data packet attack protection as described in the first aspect.

[0015] Compared with the related art, the embodiment of the present application has at least the following advantages: by generating the original data packet according to the carried data packet construction parameters when receiving a data packet setting request, the customized generation of the original data packet is realized, thereby being able to meet the personalized needs of the user; in the case of not receiving a data packet setting request, the original data packet is generated according to the default data packet construction parameters of the data packet construction model, ensuring that after responding to the test request, the original data packet can be generated regardless of whether the user has personalized setting requirements for the original data packet, thereby improving the reliability of the test method for data packet attack protection. By obtaining the network card information of the network card used to send the data packet and the IP address of the target target machine to be attacked by the data packet, the abnormal data packet can be sent through the network card, and the abnormal data packet is sent to the target target machine according to the IP address, thereby realizing the automatic attack protection test of the abnormal data packet, and this automated testing method only needs to determine the network card that sends the abnormal data packet and the IP address of the target target machine, thereby reducing the testing cost.

[0016] The technical effects obtained in the above-mentioned second, third and fourth aspects are similar to the technical effects obtained by the corresponding technical means in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A flowchart of the steps of a testing method for data packet attack protection provided in one embodiment of the present application.

[0018] Figure 2 Another step flow chart of a testing method for data packet attack protection provided in one embodiment of the present application.

[0019] Figure 3 A functional module diagram of a test device for data packet attack protection provided in one embodiment of the present application.

[0020] Figure 4 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to more clearly understand the above-mentioned objectives, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features therein can be combined with each other in the absence of conflict.

[0022] In the following description, many specific details are set forth to facilitate a full understanding of the present application. The described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application pertains. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0024] It should be further noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0025] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A alone, A and B together, and B alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," and so on (if any) in the specification, claims, and drawings of this application are used to distinguish similar objects, not to describe a specific order or precedence.

[0026] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being more preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0027] To facilitate understanding, some illustrations of concepts related to the embodiments of the present application are given as examples for reference.

[0028] Source MAC address: refers to the physical address of the data sending device, used to identify the source of the data packet in network communication.

[0029] IP Option Packet: This refers to the Options Field in the IPv4 packet header, which is used to store additional control information. IP Option Packets are primarily used to record routing information, timestamps, and other special functions.

[0030] Please refer to Figure 1 , Figure 1 This is a flowchart of the steps of an embodiment of the test method for packet attack protection of the present application. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0031] It should be noted that the packet attack protection testing method of the embodiments of the present application can be applied to automated testing scenarios for devices, and its execution entity can be a packet attack protection testing device. For example, in an automated testing scenario for a device, the packet attack protection testing device can be used to perform a packet attack protection test on the device. Of course, the packet attack protection testing method can also be applied to other scenarios requiring automated testing, and this application does not specifically limit this.

[0032] The specific process of this embodiment is as follows Figure 1 As shown, the following steps are included: S101, responding to a test request, obtaining network card information of a network card used to send a data packet, and an IP address of a target machine to be attacked by the data packet.

[0033] In some embodiments, the user enters the network card information and IP address through a command line on the attacking device.

[0034] It is understood that the attack device of this embodiment can be an independent server, or a server network or server cluster composed of servers. For example, the attack device described in the embodiments of this application includes but is not limited to a computer, a network host, a single network server, a set of multiple network servers, or a cloud server composed of multiple servers. Among them, the cloud server is composed of a large number of computers or network servers based on cloud computing.

[0035] In some embodiments, after receiving the network card information, the network card status is also checked to see if it is enabled. Only when the network card status is enabled will the abnormal data packet be subsequently sent based on the network card. If the network card status is disabled, a target network card in the attacking device that is enabled will be searched again, and the abnormal data packet will be sent through the target network card. Since the network card cannot send data packets when it is disabled, this method can ensure the successful transmission of subsequent abnormal data packets, thereby improving the reliability of the data packet attack protection testing method.

[0036] In some embodiments, the data packet is an IP Option data packet.

[0037] S102, detecting whether a data packet setting request is received, the data packet setting request carrying data packet construction parameters; if it is detected that the data packet setting request is received, executing S103; otherwise, executing S104.

[0038] In some embodiments, taking the data packet as an IP Option data packet as an example, the data packet construction parameters include but are not limited to 0×01 describing the end of the Option, 0×07 describing the record path, 0×44 describing the path timestamp, 0×83 describing the loose source routing, and 0×89 describing the strict source routing.

[0039] S103: Input the received data packet construction parameters into a preset data packet construction model to generate an original data packet.

[0040] In some embodiments, the data packet construction model is an IP Option built-in template set on the attacking device. It is understandable that by inputting data packet construction parameters into the IP Option built-in template, the original data packet can be generated.

[0041] S104: Generate an original data packet according to the default data packet construction parameters of the data packet construction model.

[0042] In some embodiments, the default data packet construction parameters may be construction parameters carried by the data packet construction model itself, or may be data packet construction parameters input by the user last time. This embodiment does not specifically limit the values ​​of the default data packet construction parameters.

[0043] S105: abnormally changing the data packet parameters of the original data packet to obtain an abnormal data packet.

[0044] In some embodiments, the data packet parameters are input into a preset abnormal data packet construction model to generate abnormal data packet parameters of the abnormal data packet to obtain the abnormal data packet.

[0045] In some embodiments, the abnormal data packet construction model includes multiple abnormal data packet templates; abnormally modifying the data packet parameters of the original data packet to obtain the abnormal data packet includes: responding to a template selection request, determining a target abnormal data packet template from the multiple abnormal data packet templates; inputting the data packet parameters into the abnormal data packet construction model, and the abnormal data packet construction model generating abnormal data packet parameters that match the target abnormal data packet template. This method enables personalized generation of abnormal data packets, thereby meeting the diverse testing needs of users and improving the reliability of the data packet attack protection testing method.

[0046] S106, sending the abnormal data packet through the network card, and sending the abnormal data packet to the target machine according to the IP address.

[0047] In some embodiments, after responding to the test request, the source MAC address is also obtained, and based on the source MAC address, the abnormal data packet is sent through the network card.

[0048] In some embodiments, the user enters the source MAC address through a command line on the attacking device.

[0049] In some embodiments, if a test request is detected to contain source MAC address construction information, a source MAC address is generated based on the source MAC address construction information; if a test request is detected to contain source MAC address random generation information, a source MAC address is randomly generated based on the source MAC address random generation information; if a test request is detected to contain neither source MAC address construction information nor source MAC address random generation information, the MAC address of the host computer where the network card is located is used as the source MAC address. In this way, the true source MAC address of the attacking device can be concealed, further meeting the user's personalized needs for the packet attack protection test method and improving the test effectiveness of the packet attack protection test method.

[0050] Compared with the related art, the embodiment of the present application has at least the following advantages: by generating the original data packet according to the carried data packet construction parameters when receiving a data packet setting request, the customized generation of the original data packet is realized, thereby being able to meet the personalized needs of the user; in the case of not receiving a data packet setting request, the original data packet is generated according to the default data packet construction parameters of the data packet construction model, ensuring that after responding to the test request, the original data packet can be generated regardless of whether the user has personalized setting requirements for the original data packet, thereby improving the reliability of the test method for data packet attack protection. By obtaining the network card information of the network card used to send the data packet and the IP address of the target target machine to be attacked by the data packet, the abnormal data packet can be sent through the network card, and the abnormal data packet is sent to the target target machine according to the IP address, thereby realizing the automatic attack protection test of the abnormal data packet, and this automated testing method only needs to determine the network card that sends the abnormal data packet and the IP address of the target target machine, thereby reducing the testing cost.

[0051] Please refer to Figure 2 , Figure 2 This is a flowchart of the steps of one embodiment of the packet attack protection testing method of the present application. Depending on different needs, the order of the steps in this flowchart may be changed, and some steps may be omitted. This packet attack protection testing method can be applied to the aforementioned packet attack protection testing device, but is not limited thereto, and the embodiments of the present application are not limited thereto.

[0052] This embodiment further improves upon the previous one, primarily by acquiring the number of packet attacks and the attack interval. Based on the attack interval, the system sends abnormal packets to the target machine multiple times until the number of abnormal packet transmissions reaches the number of packet attacks. This approach further enhances the effectiveness of the packet attack protection testing method.

[0053] The specific process of this embodiment is as follows Figure 2 As shown, the following steps are included: S201, responding to a test request, obtaining the network card information of the network card used to send the data packet, the IP address of the target machine to be attacked by the data packet, the number of data packet attacks, and the attack time interval.

[0054] S202, detecting whether a data packet setting request is received, the data packet setting request carrying data packet construction parameters; if it is detected that the data packet setting request is received, executing S203; otherwise, executing S204.

[0055] S203: Input the received data packet construction parameters into a preset data packet construction model to generate an original data packet.

[0056] S204: Generate an original data packet according to the default data packet construction parameters of the data packet construction model.

[0057] S205: abnormally changing the data packet parameters of the original data packet to obtain an abnormal data packet.

[0058] S206, sending abnormal data packets through the network card, sending abnormal data packets to the target machine multiple times according to the attack time interval, until the number of times the abnormal data packets are sent reaches the number of data packet attacks.

[0059] In some embodiments, there is no specific limitation on the attack time interval and the number of data packet attacks, and they can be set according to actual needs.

[0060] In some embodiments, if the number of packet attacks is empty and an infinite loop is entered, unlimited packets are sent to the target machine.

[0061] Compared with the related art, the embodiment of the present application has at least the following advantages: by generating the original data packet according to the carried data packet construction parameters when receiving a data packet setting request, the customized generation of the original data packet is realized, thereby being able to meet the personalized needs of the user; in the case of not receiving a data packet setting request, the original data packet is generated according to the default data packet construction parameters of the data packet construction model, ensuring that after responding to the test request, the original data packet can be generated regardless of whether the user has personalized setting requirements for the original data packet, thereby improving the reliability of the test method for data packet attack protection. By obtaining the network card information of the network card used to send the data packet and the IP address of the target target machine to be attacked by the data packet, the abnormal data packet can be sent through the network card, and the abnormal data packet is sent to the target target machine according to the IP address, thereby realizing the automatic attack protection test of the abnormal data packet, and this automated testing method only needs to determine the network card that sends the abnormal data packet and the IP address of the target target machine, thereby reducing the testing cost.

[0062] Based on the same concept as the packet attack protection test method in the above-mentioned embodiment, the present application also provides a packet attack protection test device, which can be used to perform the above-mentioned packet attack protection test method. For ease of explanation, the structural diagram of the packet attack protection test device embodiment only shows the parts related to the embodiment of the present application. Those skilled in the art will understand that the illustrated structure does not constitute a limitation of the device, and it may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0063] like Figure 3As shown, the packet attack protection testing device 30 includes an acquisition module 301, a detection module 302, a generation module 303, an abnormal change module 304, and a sending module 305. In some embodiments, these modules may be programmable software instructions stored in a memory and executed by a processor. It is understood that in other embodiments, these modules may also be program instructions or firmware embedded in the processor.

[0064] The acquisition module 301 is used to respond to the test request and obtain the network card information of the network card used to send the data packet and the IP address of the target machine to be attacked by the data packet; A detection module 302 is configured to detect whether a data packet setting request is received, wherein the data packet setting request carries data packet construction parameters; The generating module 303 is configured to input the received data packet construction parameters into a preset data packet construction model to generate an original data packet when detecting that the data packet setting request has been received; and to generate the original data packet according to default data packet construction parameters of the data packet construction model when detecting that the data packet setting request has not been received; An abnormal change module 304 is used to perform abnormal changes on the data packet parameters of the original data packet to obtain an abnormal data packet; The sending module 305 is used to send the abnormal data packet through the network card and send the abnormal data packet to the target machine according to the IP address.

[0065] The data packet attack protection test device 30 provided in the above embodiment can implement the technical solution described in the above embodiment of the data packet attack protection test method. The specific implementation principles of the above modules or units can refer to the corresponding contents in the above embodiment of the data packet attack protection test method, which will not be repeated here.

[0066] Please refer to 4, Figure 4 This is a schematic diagram of an embodiment of an electronic device of the present application.

[0067] In some embodiments, the processor 401 may be a central processing unit (CPU), a microprocessor, or other data processing chip, configured to execute program codes stored in the memory 402 or process data, such as the test method for data packet attack protection in the present invention.

[0068] In some embodiments, processor 401 may be a single server or a server group. The server group may be centralized or distributed. In some embodiments, processor 401 may be local or remote. In some embodiments, processor 401 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an on-premises cloud, a multi-cloud, or any combination thereof.

[0069] In some embodiments, the memory 402 may be an internal storage unit of the electronic device 400, such as a hard disk or memory of the electronic device 400. In other embodiments, the memory 402 may also be an external storage device of the electronic device 400, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 400.

[0070] Furthermore, the memory 402 may include both an internal storage unit of the electronic device 400 and an external storage device. The memory 402 is used to store application software installed in the electronic device 400 and various data.

[0071] In some embodiments, display 403 can be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 403 is used to display information on electronic device 400 and to display a visual user interface. Components 401-403 of electronic device 400 communicate with each other via a system bus.

[0072] In one embodiment, when the processor 401 executes the packet attack protection test program in the memory 402, the following steps may be implemented: Respond to the test request and obtain the network card information of the network card used to send the data packet and the IP address of the target machine to be attacked by the data packet; detecting whether a data packet setting request is received, wherein the data packet setting request carries data packet construction parameters; In the case of detecting that the data packet setting request has been received, inputting the received data packet construction parameters into a preset data packet construction model to generate an original data packet; in the case of detecting that the data packet setting request has not been received, generating the original data packet according to the default data packet construction parameters of the data packet construction model; Abnormally changing the data packet parameters of the original data packet to obtain an abnormal data packet; The abnormal data packet is sent through the network card, and the abnormal data packet is sent to the target machine according to the IP address.

[0073] It should be understood that, when the processor 401 executes the data packet attack protection test program in the memory 402 , in addition to the above functions, it can also implement other functions. For details, please refer to the description of the corresponding method embodiment above.

[0074] Furthermore, the embodiment of the present invention does not specifically limit the type of the electronic device 400 mentioned. The electronic device 400 may be a portable electronic device such as a mobile phone, a tablet computer, a personal digital assistant (PDA), a wearable device, a laptop computer, or the like. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices equipped with IOS, Android, Microsoft, or other operating systems. The above-mentioned portable electronic devices may also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 400 may not be a portable electronic device, but a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0075] Accordingly, an embodiment of the present application also provides a storage medium, which is used to store computer-readable programs or instructions. When the program or instructions are executed by the processor, the steps or functions in the test method for data packet attack protection provided by the above-mentioned method embodiments can be implemented.

[0076] Those skilled in the art will appreciate that all or part of the process flow of the above-described method embodiment can be implemented by instructing related hardware (such as a processor, controller, etc.) through a computer program, and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a magnetic disk, an optical disk, a read-only memory, or a random access memory.

[0077] The above is a detailed introduction to the test method, device, electronic device and storage medium for data packet attack protection provided by this application. Specific examples are used in this article to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core idea of ​​this application. At the same time, for technical personnel in this field, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on this application.

Claims

1. A test method for data packet attack protection, characterized in that: include: Respond to the test request and obtain the network card information of the network card used to send the data packet and the IP address of the target machine to be attacked by the data packet; detecting whether a data packet setting request is received, wherein the data packet setting request carries data packet construction parameters; In the case of detecting that the data packet setting request has been received, inputting the received data packet construction parameters into a preset data packet construction model to generate an original data packet; in the case of detecting that the data packet setting request has not been received, generating the original data packet according to the default data packet construction parameters of the data packet construction model; Abnormally changing the data packet parameters of the original data packet to obtain an abnormal data packet; The abnormal data packet is sent through the network card, and the abnormal data packet is sent to the target machine according to the IP address.

2. The method for testing packet attack protection according to claim 1, wherein: The abnormally changing the data packet parameters of the original data packet to obtain the abnormal data packet includes: The data packet parameters are input into a preset abnormal data packet construction model to generate abnormal data packet parameters of the abnormal data packet, thereby obtaining the abnormal data packet.

3. The method for testing data packet attack protection according to claim 2, wherein: The abnormal data packet construction model includes a plurality of abnormal data packet templates; The abnormally changing the data packet parameters of the original data packet to obtain the abnormal data packet includes: In response to the template selection request, determining a target abnormal data packet template from the plurality of abnormal data packet templates; The data packet parameters are input into the abnormal data packet construction model, and the abnormal data packet construction model generates the abnormal data packet parameters that match the target abnormal data packet template.

4. The method for testing data packet attack protection according to claim 1, wherein: The method further comprises: Respond to the test request and obtain the source MAC address; The sending of the abnormal data packet through the network card corresponding to the network card information includes: Based on the source MAC address, the abnormal data packet is sent through the network card.

5. The method for testing data packet attack protection according to claim 4, wherein: Responding to the test request and obtaining the source MAC address includes: Detecting whether the test request carries source MAC address construction information or source MAC address random generation information; When detecting that the test request carries the source MAC address construction information, generating the source MAC address according to the source MAC address construction information; In a case where it is detected that the test request carries the source MAC address random generation information, randomly generating the source MAC address according to the source MAC address random generation information; When it is detected that the test request does not carry the source MAC address construction information and the source MAC address random generation information, the MAC address of the host where the network card is located is used as the source MAC address.

6. The method for testing data packet attack protection according to claim 1, wherein: The method further comprises: Responding to the test request, obtaining the number of data packet attacks and the attack time interval; The sending the abnormal data packet to the target machine according to the IP address includes: The abnormal data packet is sent to the target machine multiple times according to the attack time interval until the number of times the abnormal data packet is sent reaches the number of data packet attacks.

7. The method for testing data packet attack protection according to any one of claims 1 to 6, characterized in that: The data packet is an IP Option data packet.

8. A test device for data packet attack protection, characterized in that: include: Acquisition module, detection module, generation module, abnormal change module and sending module; The acquisition module is used to respond to the test request and obtain the network card information of the network card used to send the data packet and the IP address of the target machine to be attacked by the data packet; The detection module is used to detect whether a data packet setting request is received, wherein the data packet setting request carries data packet construction parameters; The generating module is configured to input the received data packet construction parameters into a preset data packet construction model to generate an original data packet when detecting that the data packet setting request has been received; and to generate the original data packet according to the default data packet construction parameters of the data packet construction model when detecting that the data packet setting request has not been received; The abnormal change module is used to perform abnormal changes on the data packet parameters of the original data packet to obtain an abnormal data packet; The sending module is used to send the abnormal data packet through the network card, and send the abnormal data packet to the target machine according to the IP address.

9. An electronic device comprising a processor and a memory, characterized in that: The memory is used to store instructions, and the processor is used to call the instructions in the memory, so that the electronic device executes the data packet attack protection testing method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores computer instructions, and when the computer instructions are executed on the electronic device, the electronic device executes the data packet attack protection testing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • ARP attack detection method, apparatus and system based on Android system

    CN106790010A

  • Method and system for testing land base abnormal packet attack protection of gateway equipment

    CN116886381A