Abnormal scanning behavior detection method and device

By segmenting traffic data in a time window in an industrial Internet network and filtering out a combination of persistence and dispersion, identifying abnormal scanning behavior, the problem of detecting hidden low-speed port scanning behavior in the prior art is solved, and the network stealing is achieved Effective prevention and improvement of network security.

CN119051879APending Publication Date: 2024-11-29陕西陕煤榆北煤业有限公司榆林信息化运维分公司
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing detection methods cannot meet the real-time and accuracy requirements of abnormal detection in industrial Internet networks, especially the hidden low-speed port scanning behavior is difficult to effectively identify, making it difficult to prevent network security threats.

Method used

By segmenting the traffic data in a time window, filter out the combination of sip-dpt and sip-dip with persistent and dispersible properties, identify abnormal horizontal and vertical scan behaviors, and use the continuous incremental model to filter out suspicious port scanning behaviors. Achieve prevention of cybersecret espionage.

Benefits of technology

Effectively identify and prevent network espionage, improve network security, reduce the difficulty of abnormal detection, and enhance the detection ability of low-speed port scanning behavior.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The invention aims to provide an abnormal scanning behavior detection method and device based on flow analysis. The method comprises the following steps of: dividing a traffic data set into a plurality of windows according to a time sequence by utilizing a continuous increment model, respectively selecting a preset feature field in each window as a two-item set combination, counting the distribution condition of the corresponding feature fields, screening out traffic data with continuous features, and then carrying out dispersive judgment so as to identify suspicious port scanning behaviors. The method realizes prevention and discovery of network secret stealing, and is of great significance in guaranteeing network security and preventing network secret stealing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of network behavior analysis, and in particular relates to a detection method for abnormal scanning behavior and a detection device using the method. Background Art

[0002] As an important part of the new generation of information infrastructure, the Industrial Internet has promoted the digitization, intelligence and networking of industries. However, with the continuous expansion of network scale, the increasing complexity of network topology, the dynamic nature of network traffic itself, the continuous updating and change of malicious attack methods, and the increasingly hidden attack behaviors, the current detection methods cannot meet the requirements of real-time and accuracy of anomaly detection.

[0003] Situational awareness technology helps to timely grasp the current status of Internet network security and predict future security trends. However, feature analysis alone may fail to effectively defend against Trojans / viruses after they are packed or the packing method is changed. In response to this phenomenon, abnormal behavior analysis, as an important means of network attack analysis, can effectively defend against various abnormal behaviors in the network. Based on the machine learning-based industrial Internet security situation assessment and situation prediction methods, a security situation awareness model for the industrial Internet was established. Among them, network traffic anomaly detection is a key part of network abnormal behavior, which is of great significance to maintaining the security and stability of the network. Summary of the invention

[0004] Based on the above background, the present invention aims to provide a method and device for detecting abnormal scanning behavior based on traffic analysis.

[0005] First, a method for detecting abnormal scanning behavior is proposed, including identifying horizontal scanning behavior and vertical scanning behavior: The flow data is divided into time windows of a first length; different sip-dpt combinations within each first window period are screened, and sets are created for corresponding dips; the number of first windows of each sip-dpt combination is counted, combinations whose number of windows is greater than a first threshold are screened, and the corresponding dip is checked for dispersion, and if so, it is identified as abnormal horizontal scanning behavior; The flow data is divided into time windows of a second length; different sip-dip combinations within each second window period are screened, and a set is created for the corresponding dpt; the number of second windows of each sip-dip combination is counted, a combination with a number of windows greater than a second threshold is screened, and the corresponding dpt is checked whether it is dispersed, and if it is dispersed, it is identified as abnormal vertical scanning behavior; The above sip refers to the source ip, dip refers to the destination ip, and dpt refers to the destination port.

[0006] Preferably, to determine whether the dip has dispersibility, it includes: for a continuous combination with a window number of M, denote the dip set within the time window i (i < M) as dip_i. Denote the union of the dip sets before the i-th window as u_-dip. If there are no elements in the dip set corresponding to the current window that are different from u_-dip, then u_-dip is cleared; if the dip set conforms to the characteristic of increasing quantity, it has dispersibility.

[0007] To determine whether the dpt has dispersibility, it includes: for a continuous combination with a window number of N, denote the dpt set within the time window j (j < N) as dpt_j. Denote the union of the dpt sets before the j-th window as u_-dpt. If there are no elements in the dpt set corresponding to the current window that are different from u_-dpt, then u_-dpt is cleared; if the dpt set conforms to the characteristic of increasing quantity, it has dispersibility.

[0008] Furthermore, the specific steps to determine whether the dip has dispersibility are as follows: 1.1, Initialize the window number i = 0, denote dip0 as pre_dip, and the length of the pre_dip set as len0; 1.2, Increment i by 1, and let u_dip be the union of pre_dip and dip i ; 1.3, Calculate the interpolation d between the lengths of u_dip and pre_dip. If d = 0, then assign dip to pre_dip i ; otherwise, assign u_dip to pre_dip; 1.4, Let the value corresponding to window i, len i be the length of pre_dip. If i > M, end; otherwise, go to step 1.2.

[0009] The specific steps to determine whether the dpt has dispersibility are as follows: 2.1, Initialize the window number j = 0, denote dpt0 as pre_dpt, and the length of the pre_dpt set as len0; 2.2, Increment j by 1, and let u_dpt be the union of pre_dpt and dpt j ; 2.3, Calculate the interpolation e between the lengths of u_dpt and pre_dpt. If e = 0, then assign dpt to pre_dpt j ; otherwise, assign u_dpt to pre_dpt; 2.4, Let the value corresponding to window j, len j be the length of pre_dpt. If j > M, end; otherwise, go to step 2.2.

[0010] In a second aspect, a device for detecting abnormal scanning behavior is provided, comprising: The traffic acquisition module is used to segment and acquire traffic data according to a preset time window; The traffic detection module is used to screen and analyze the acquired traffic data and identify abnormal scanning traffic data according to a preset algorithm.

[0011] Preferably, the traffic detection module first screens out traffic data with persistence characteristics, and then determines whether the traffic data is an abnormal scanning behavior based on whether it is dispersed.

[0012] Further, the traffic acquisition module divides the traffic data into time windows of the first length; the traffic detection module screens different sip-dpt combinations within each first window period, and creates a set for the corresponding dip; counts the number of first windows of each sip-dpt combination, screens out the combination whose number of windows is greater than the first threshold, and checks whether the corresponding dip is dispersed, and if so, identifies it as abnormal horizontal scanning behavior; The flow detection module divides the flow data into time windows of the second length; the flow detection module screens different sip-dip combinations within each second window period and creates a set for the corresponding dpt; counts the number of second windows of each sip-dip combination, screens out the combination whose number of windows is greater than the second threshold, and checks whether the corresponding dpt has dispersion, and if so, identifies it as abnormal vertical scanning behavior; The sip refers to the source ip, dip refers to the destination ip, and dpt refers to the destination port.

[0013] The present invention adopting the above technical solution has at least the following beneficial effects: utilizing the continuous incremental model, dividing the traffic data set into multiple windows in chronological order, selecting preset feature fields in each window as a binomial combination, and statistically analyzing the distribution of the corresponding feature fields, first screening out traffic data with continuous characteristics, and then performing a dispersion judgment, thereby identifying suspicious port scanning behaviors and realizing the prevention and discovery of network theft, which is of great significance for ensuring network security and preventing network theft. DETAILED DESCRIPTION

[0014] In order to make the purpose, technical solution and advantages of the present invention more clear, the technical solution of the present invention will be clearly and completely described below in conjunction with embodiments.

[0015] Abnormal network behavior is an important aspect of network security. Any abnormal behavior on the network may threaten network security. As an important dimension of network defense, abnormal network behavior can stop network intrusion as early as possible.

[0016] According to the national security standards, abnormal behaviors are divided into: abnormal login, abnormal access, abnormal operation, abnormal data download, suspicious domain name access, etc., but these only exist at the user level. Later, we learned that the abnormal behavior scenarios after subdivision also exist: abnormal account login, abnormal behavior of legitimate users, account blasting, database abnormality, external connection abnormality, external data abnormality, external file abnormality, DNS traffic abnormality, access abnormality, external to internal access abnormality, port scanning, etc.

[0017] Common abnormal traffic behaviors in the network include: Dos / DDos attacks, port scanning, network scanning, worms, Flash Crowd, Alpha attacks. Port scanning is a common and effective intrusion technology used to search for vulnerable hosts and ports.

[0018] Horizontal scanning and vertical scanning are two different network scanning technologies in the field of computer security. They are mainly used in network penetration testing and security auditing to discover devices, services and potential security vulnerabilities in the network.

[0019] Horizontal scanning refers to port scanning of all or part of the hosts in the same network segment (a set of IP addresses with the same network prefix). In other words, it is to check multiple ports on each IP address within a specific IP address range to find out which hosts are active and which services are open on these hosts. This type of scanning helps security researchers or attackers understand the service distribution of each machine in the network, thereby finding potential attack entry points.

[0020] Vertical scanning, also known as deep scanning or port scanning, focuses on checking multiple ports on a single host. Unlike horizontal scanning, which covers multiple IP addresses, vertical scanning focuses on services and ports on a single IP address. It attempts to connect to all possible ports on a specific IP address to determine which services are running, the version information of these services, and whether there are known security vulnerabilities. Vertical scanning is very useful for a detailed assessment of the security status of a single system or service.

[0021] At present, the detection of fast port scans has been mature, but the detection effect of covert low-speed port scans needs to be improved.

[0022] Sip represents the source host IP address, dip represents the destination host IP address, and dpt represents the destination port. When the attack occurs, the protocols and message lengths used by the same sip and dip messages are partially consistent. Within a certain period of time, the protocol types of the messages are usually the same, mostly TCP, UDP and ICMP. Since port scanning is mainly used to detect the open status of ports, it only requires a small amount of header information to complete. In order to reduce network overhead, attackers usually control the data part of the message to a lower range, and the message length is mostly below 300Bytes.

[0023] After a large number of analysis experiments on network traffic, the applicant discovered several characteristics of low-speed port scanning in abnormal network behavior: 1. Concealment. Low-speed attacks conceal their tracks by controlling the speed of scanning messages, and when an attack occurs, it will not cause a significant change in the number of messages.

[0024] 2. Persistence. Since the port is scanned in a low-speed and covert manner, this attack takes time, so the attack is persistent. The horizontal scanning SIP-DPT combination and the vertical scanning SIP-DIP combination usually last for more than 10 minutes.

[0025] 3. Dispersion. The total amount of DPT corresponding to the sip-dpt combination of horizontal scanning is large, and the overall distribution is loose, with a low repetition rate; the total amount of dip corresponding to the sip-dip combination of vertical scanning is large, and the overall distribution is loose, with a low repetition rate.

[0026] The distribution of normal traffic is significantly different from low-speed scanning behavior in terms of persistence and dispersion. Reasonable use of these two characteristics can effectively screen out suspicious traffic and provide assistance for rapid anomaly detection.

[0027] Based on the above content, the present invention aims to propose a method and device for detecting abnormal scanning, especially low-speed port scanning behavior, based on traffic analysis. Example

[0028] A method for detecting abnormal scanning behavior, including identifying horizontal scanning behavior and vertical scanning behavior: The flow data is divided into time windows of a first length; different sip-dpt combinations within each first window period are screened, and sets are created for corresponding dips; the number of first windows of each sip-dpt combination is counted, combinations whose number of windows is greater than a first threshold are screened, and the corresponding dip is checked for dispersion, and if so, it is identified as abnormal horizontal scanning behavior; Split the traffic data with a time window of the second length; filter different sip-dip combinations within each second time window, and create a set for the corresponding dpt; count the number of second windows for each sip-dip combination, filter out the combinations with the number of windows greater than the second threshold, and check whether the corresponding dpt has dispersion. If it has dispersion, it is identified as an abnormal vertical scanning behavior. The above-mentioned sip refers to the source ip, dip refers to the destination ip, and dpt refers to the destination port.

[0029] Low-speed scanning hides itself by reducing the attack speed. When an attack occurs, the proportion of attack traffic per unit time is mostly less than 5% and is easily diluted by normal traffic. If the proportion of attack data can be amplified and the impact of normal traffic can be reduced, the difficulty of anomaly detection can be reduced. Due to the differences in the nature of normal traffic and low-speed port scanning, if data is filtered according to the criteria of persistence and dispersion, the proportion of normal traffic in the filtered data will drop rapidly.

[0030] As a preferred embodiment, the above-mentioned first time window and second time window include 1 minute, and the first threshold and second threshold include 10 times.

[0031] For horizontal scanning attacks, the data set is divided into multiple windows in chronological order. In each window, the sip-dpt feature field is selected as a binomial set combination, and the distribution of the dip feature field corresponding to the sip-dpt combination is counted. The sip-dpt combinations of low-speed horizontal scanning attacks are persistent, and the number of dips corresponding to the sip-dpt continues to grow until a scan is completed. However, the connection time of most sip-dpt combinations of normal traffic is less than 1 minute, without persistence, and the distribution of the number of packets and packet lengths corresponding to the sip-dpt combinations of normal traffic is irregular, with a high repetition rate of dips in the window and it is difficult for the number of dips to continue to grow.

[0032] As a preferred embodiment, determining whether the dip has dispersion includes: for a continuous combination with the number of windows being M, denote the dip set within the time window ⅈ (ⅈ < M) as dip_i. Denote the union of the dip sets before the i-th window as u_-dⅈp. If there are no elements different from u_-dⅈp in the dip set corresponding to the current window, then u_-dⅈp is cleared; if the dip set conforms to the characteristic of increasing quantity, it has dispersion.

[0033] Specific steps: (1) Initialize the window number i = 0, denote dip0 as pre_dip, and the length of the pre_dip set as len0; (2) Increment ⅈ by 1, and let u_dⅈp be the union of pre_dip and dip i of them. (3) Calculate the interpolation d of the lengths of u_dⅈp and pre_dip. If d = 0, assign pre_dip the value of dip i ; otherwise, assign pre_dip the value of u_dⅈp; (4) Let the value len corresponding to window i i be the length of pre_dip. If i > M, end; otherwise, go to step (2).

[0034] As a preferred embodiment, to determine whether dpt has dispersion, it includes: for a continuous combination with a window number of N, denote the set of dpt within time window j (j < N) as dpt_j. Denote the union of the sets of dpt before the j-th window as u_-dpt. If there are no elements in the dpt set corresponding to the current window that are different from u_-dpt, then clear u_-dpt; if the dpt set conforms to the characteristic of increasing quantity, it has dispersion.

[0035] Specific steps: (1) Initialize the window number j = 0, denote dpt0 as pre_dpt, and the length of the pre_dpt set as len0; (2) Increment j by 1, and let u_dpt be the union of pre_dpt and dpt j ; (3) Calculate the interpolation e of the lengths of u_dpt and pre_dpt. If e = 0, assign pre_dpt the value of dpt j ; otherwise, assign pre_dpt the value of u_dpt; (4) Let the value len corresponding to window j j be the length of pre_dpt. If j > M, end; otherwise, go to step (2).

[0036] In the embodiment of the abnormal scan behavior detection method as described above, using the continuous increment model, the traffic data set is divided into multiple windows in chronological order. In each window, a preset feature field is selected as a binomial set combination, and the distribution of the corresponding feature field is statistically analyzed. First, the traffic data with persistent features is screened out, and then the dispersion is judged, so as to identify suspicious port scan behaviors, realizing the prevention and discovery of network secrecy theft, which is of great significance for ensuring network security and preventing network secrecy theft. Embodiment

[0037] An abnormal scan behavior detection device, comprising: A traffic acquisition module, configured to divide and acquire traffic data according to a preset time window; A traffic detection module, configured to screen and analyze the acquired traffic data, and identify abnormal scan traffic data therein according to a preset algorithm.

[0038] Preferably, the traffic detection module first screens out traffic data with persistence characteristics, and then determines whether the traffic data is an abnormal scanning behavior based on whether it is dispersed.

[0039] Further, the traffic acquisition module divides the traffic data into time windows of the first length; the traffic detection module screens different sip-dpt combinations within each first window period, and creates a set for the corresponding dip; counts the number of first windows of each sip-dpt combination, screens out the combination whose number of windows is greater than the first threshold, and checks whether the corresponding dip is dispersed, and if so, identifies it as abnormal horizontal scanning behavior; The flow detection module divides the flow data into time windows of the second length; the flow detection module screens different sip-dip combinations within each second window period and creates a set for the corresponding dpt; counts the number of second windows of each sip-dip combination, screens out the combination whose number of windows is greater than the second threshold, and checks whether the corresponding dpt has dispersion, and if so, identifies it as abnormal vertical scanning behavior; The sip refers to the source ip, dip refers to the destination ip, and dpt refers to the destination port.

[0040] The abnormal scanning behavior detection device embodiment described above utilizes a continuous incremental model to divide the traffic data set into multiple windows in chronological order, selects preset feature fields as a binomial combination in each window, and counts the distribution of the corresponding feature fields. Traffic data with continuous characteristics is first screened out, and then a dispersion judgment is performed, thereby identifying suspicious port scanning behaviors and achieving prevention and discovery of network theft, which is of great significance for ensuring network security and preventing network theft.

[0041] A person skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc.

[0042] The above description of the above disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but will conform to the broadest scope consistent with the principles disclosed herein.

Claims

1. A method for detecting abnormal scanning behavior, characterized in that: Identify horizontal scanning behavior and vertical scanning behavior, including: Segment the traffic data with a time window of the first length; screen different sip-dpt combinations within each first time window, and create a set for the corresponding dip; count the number of first windows for each said sip-dpt combination, screen out the combinations with the number of windows greater than the first threshold, and check whether the corresponding dip has dispersion. If it has dispersion, it is identified as abnormal horizontal scanning behavior; Segment the traffic data with a time window of the second length; screen different sip-dip combinations within each second time window, and create a set for the corresponding dpt; count the number of second windows for each said sip-dip combination, screen out the combinations with the number of windows greater than the second threshold, and check whether the corresponding dpt has dispersion. If it has dispersion, it is identified as abnormal vertical scanning behavior; The sip refers to the source ip, the dip refers to the destination ip, and the dpt refers to the destination port.

2. The abnormal scanning behavior detection method according to claim 1, characterized in that: The judgment of whether the dip has dispersion includes: for a continuous combination with the number of windows being M, denote the dip set within the time window ⅈ (ⅈ < M) as dip_i; denote the union of the dip sets before the ⅈ-th window as u_-dⅈp. If there are no elements different from u_-dⅈp in the dip set corresponding to the current window, then u_-dⅈp is cleared; if the dip set conforms to the characteristic of increasing quantity, it has dispersion.

3. The abnormal scanning behavior detection method according to claim 2, characterized in that: Specific steps for judging whether the dip has dispersion: (1)Initialize the window number i = 0, denote dip0 as pre_dip, and the length of the pre_dip set as len0; (2) Add 1 to ⅈ, and let u_dⅈp be the sum of pre_dip and dip i The union of; (3) Find the interpolation value d of u_dⅈp and pre_dip length. If d=0, pre_dip is assigned the value dip i ; Otherwise, pre_dip is assigned the value of u_dⅈp; (4) Let the value len corresponding to window i be i is the length of pre_dip; if i>M, end; otherwise go to step (2).

4. The abnormal scanning behavior detection method according to claim 1, characterized in that: The judgment of whether the dpt has dispersion includes: for a continuous combination with the number of windows being N, denote the dpt set within the time window j (j < N) as dpt_j; denote the union of the dpt sets before the j-th window as u_-dpt. If there are no elements different from u_-dpt in the dpt set corresponding to the current window, then u_-dpt is cleared; if the dpt set conforms to the characteristic of increasing quantity, it has dispersion.

5. The abnormal scanning behavior detection method according to claim 4, characterized in that: Specific steps for judging whether the dpt has dispersion: (1)Initialize the window number j = 0, denote dpt0 as pre_dpt, and the length of the pre_dpt set as len0; (2) j increases by 1, and u_dpt is equal to pre_dpt and dpt j The union of; (3) Find the interpolation value e of the length of u_dpt and pre_dpt. If e = 0, pre_dpt is assigned the value of dpt. j ; Otherwise, pre_dpt is assigned the value of u_dpt; (4) Let the value len corresponding to window j be j is the length of pre_dpt; if j>M, end; otherwise go to step (2).

6. The abnormal scanning behavior detection method according to any one of claims 1 to 5, characterized in that: The first time window and the second time window include 1 minute, and the first threshold and the second threshold include 10 times.

7. An abnormal scanning behavior detection device, characterized in that: The device includes: A traffic acquisition module, configured to segment and acquire traffic data according to a preset time window; A traffic detection module, configured to screen and analyze the acquired traffic data, and identify abnormal scanning traffic data therein according to a preset algorithm.

8. The detection device according to claim 7, characterized in that: The traffic detection module first screens out traffic data with persistent characteristics, and then judges whether the traffic data is abnormal scanning behavior according to whether it has dispersion.

9. The detection device according to claim 8, characterized in that: The detection process of this device includes: The traffic acquisition module segments the traffic data with a time window of the first length; The traffic detection module selects different sip-dpt combinations within each first window period and creates a set for the corresponding dip; counts the number of first windows of each sip-dpt combination, selects the combination whose number of windows is greater than the first threshold, and checks whether the corresponding dip is dispersed, and if so, identifies it as abnormal horizontal scanning behavior; The sip refers to the source ip, dip refers to the destination ip, and dpt refers to the destination port.

10. The detection device according to claim 8, characterized in that: The detection process of the device includes: The traffic acquisition module divides the traffic data into time windows of a second length; The traffic detection module selects different sip-dip combinations in each second window period and creates a set for the corresponding dpt; counts the number of second windows of each sip-dip combination, selects the combination whose number of windows is greater than the second threshold, and checks whether the corresponding dpt has dispersion, and if so, identifies it as abnormal vertical scanning behavior; The sip refers to the source ip, dip refers to the destination ip, and dpt refers to the destination port.