Protection method for illegal Internet connection based on changes in network environment
By monitoring the changes in traffic packets and network status of terminal devices, combined with application layer detection and timeout mechanism, accurate and rapid protection of internal and external network interconnection behavior is achieved, and the problems of protection delays and false alarms in the existing technology are solved, which significantly improves the problem of protection delays and false alarms. Safety and efficiency.
Patent Information
- Application Number
- CN202210570389.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-24
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2042-05-24
AI Technical Summary
It is difficult for the existing technology to accurately detect and quickly protect the interconnection behavior of the internal and external networks, resulting in an increase in security risks.
By monitoring the traffic data packets of the terminal device, judge the changes in ARP broadcast packets and network status, enable network access control, and combine application layer detection and timeout mechanisms to achieve rapid protection of illegal Internet connection.
It realizes accurate discovery and rapid protection of internal and external network interconnection behavior, reduces the network impact on terminal devices, and avoids false alarms and protection delays.
Smart Images

Figure CN115189909B_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to the technical field of information security, and in particular to a method for protecting against illegal Internet connection behaviors based on changes in network environment. [Background technology]
[0002] According to the statistics of security incidents in recent years, various illegal access, illegal interconnection, information leakage and other behaviors on the intranet have become more and more serious, which has buried many security risks. This paper proposes a protection method for illegal Internet connection behaviors based on changes in the network environment. [Summary of the invention]
[0003] The purpose of the present invention is to solve the problems in the prior art and to propose a protection method for illegal Internet connection behaviors based on changes in the network environment, which can accurately detect internal and external network interconnection behaviors and quickly protect against them.
[0004] To achieve the above object, the present invention proposes a method for protecting against illegal Internet connection behaviors based on changes in the network environment, comprising the following steps:
[0005] S1 monitors the traffic data packets of the terminal device, and then proceeds to step S2;
[0006] S2. Determine whether the traffic data packet is an ARP broadcast packet. If so, proceed to step S3; otherwise, proceed to step S4;
[0007] S3. Determine whether the current configuration has changed. If so, proceed to step S5; otherwise, proceed to step S6;
[0008] S4. Determine whether it is a trusted IP. If so, return to step S1; otherwise, proceed to step S5;
[0009] S5. Turn on network access control, block the current network card network communication, and then proceed to step S6;
[0010] S6. Notify the application layer client to detect illegal Internet connection behavior, wait for the detection result, and then proceed to step S7;
[0011] S7. Determine whether the received result has timed out. If so, proceed to step S9; otherwise, proceed to step S8;
[0012] S8. Determine whether there is a violation. If there is a violation, turn on protection; if there is no violation, go to step S9;
[0013] S9. Turn off network control and record the IP into the temporary trusted IP list, then return to step S1.
[0014] Preferably, in step S2, after the NDIS intermediate layer driver captures the ARP broadcast packet, if it is determined that the network status of the terminal device has changed, the process proceeds to step S3; otherwise, the process proceeds to step S4.
[0015] Preferably, in step S3, it is determined whether the current configuration has changed by recording the non-violation configuration of the device; when the network status changes, if the current configuration is consistent with the recorded non-violation configuration, network access control is not enabled first, and step S6 is entered to make a detection notification. If the detection is a violation, protection is enabled, and the non-violation configuration is updated once for each detection.
[0016] Preferably, when the computer is turned on, it is determined whether the current configuration is consistent with the recorded non-violation configuration. If they are consistent, the process proceeds to step S6; if they are inconsistent, the process proceeds to step S5.
[0017] Preferably, the non-violation configuration includes non-violation IP, MAC, and device name.
[0018] Preferably, in step S4, an "observer" mode is also provided. In the "observer" mode, when a non-trusted IP requests, no protection action is taken, and step S6 is directly entered for subsequent detection. If it is determined by step S8 that there is no violation, in addition to recording the IP in the temporary trusted IP list, the IP file is also written; if S8 is determined to be a violation, the protection action is turned on, and the IP file is checked to see whether the IP exists. If it exists, it is deleted; after the "observer" mode ends, the record list of the IP file is merged into the configured temporary trusted IP list.
[0019] Preferably, in step S4, a blacklist is added according to the power-on situation, and the IPs in the blacklist are directly blocked.
[0020] Preferably, in step S7, a timeout mechanism is set to determine whether the terminal device is in a long-term control state, and when the application layer client does not return a detection result within a preset time, the network control is closed.
[0021] Preferably, the temporary trusted IP list has an extinction mechanism.
[0022] Preferably, in step S6, the routing situation when there is no violation is recorded, and routing detection is first performed during detection. If the routing changes, subsequent detection is continued; if the routing does not change, protection is directly released.
[0023] Beneficial effects of the present invention:
[0024] Accuracy: The ARP broadcast packet judgment adopted ensures the accuracy of the discovery of internal and external network interconnection behavior in principle, and can achieve zero false alarms.
[0025] Fast speed: Compared with application layer protection control, the packet capture judgment and control based on the driver layer middleware are faster and safer.
[0026] Low impact: Through "observer" mode, trusted IP, and records of illegal configuration, the network impact on terminal devices is minimized.
[0027] The features and advantages of the present invention will be described in detail through embodiments in conjunction with the accompanying drawings.
Brief Description of the Drawings
[0028] Figure 1 It is a flow chart of a method for protecting against illegal Internet connection behaviors based on changes in the network environment of the present invention. [Specific implementation method]
[0029] See also Figure 1 The present invention proposes a method for protecting against illegal Internet connection behaviors based on changes in the network environment, comprising the following steps:
[0030] S1 monitors the traffic data packets of the terminal device, and then proceeds to step S2;
[0031] S2. Determine whether the traffic data packet is an ARP broadcast packet: When the NDIS intermediate layer driver captures the ARP broadcast packet, it determines that the network status of the terminal device has changed, and proceeds to step S3; otherwise, proceeds to step S4;
[0032] S3. Determine whether the current configuration has changed. If so, proceed to step S5; otherwise, proceed to step S6;
[0033] Furthermore, in step S3, it is determined whether the current configuration has changed by recording the non-violation configuration of the device, and the non-violation configuration includes the non-violation IP, MAC, and device name; when the network status changes, if the current configuration is consistent with the recorded non-violation configuration, the network access control is not enabled first, and step S6 is entered to make a detection notification. If the detection is a violation, protection is enabled, and the non-violation configuration is updated once for each detection.
[0034] Furthermore, in step S3, when the computer is turned on, it is determined whether the current configuration is consistent with the recorded non-violation configuration. If they are consistent, the process proceeds to step S6; if they are inconsistent, the process proceeds to step S5.
[0035] S4. Determine whether it is a trusted IP. If so, return to step S1; otherwise, proceed to step S5;
[0036] Furthermore, in step S4, an "observer" mode is also provided. In the "observer" mode, when a non-trusted IP requests, no protective action is taken, and step S6 is directly entered for subsequent detection. If it is determined by step S8 that there is no violation, in addition to recording the IP in the temporary trusted IP list, the IP file is also written; if S8 is determined to be a violation, the protective action is turned on, and the IP file is checked to see whether the IP exists. If it exists, it is deleted; after the "observer" mode ends, the record list of the IP file is merged into the configured temporary trusted IP list.
[0037] Furthermore, in step S4, a blacklist is added according to the boot situation, and the IP in the blacklist is directly blocked.
[0038] S5. Turn on network access control, block the current network card network communication, and then proceed to step S6;
[0039] S6. Notify the application layer client to detect illegal Internet connection behavior, wait for the detection result, and then enter step S7; further, in step S6, record the routing situation when there is no violation, and perform routing detection first during detection. If the routing changes, continue with subsequent detection; if the routing does not change, directly release the protection.
[0040] S7. Determine whether the received result has timed out: Determine whether the terminal device is in a long-term control state by setting a timeout mechanism. When the application layer client does not return the detection result within a preset time, proceed to step S9; otherwise, proceed to step S8;
[0041] S8. Determine whether there is a violation. If there is a violation, turn on protection; if there is no violation, go to step S9;
[0042] S9. Turn off network control and record the IP in the temporary trusted IP list, and then return to step S1, wherein the temporary trusted IP list has an extinction mechanism.
[0043] Network environment changes can be divided into two situations:
[0044] 1. Changes in network status caused by a series of configuration changes such as changing the IP address of the terminal device, plugging and unplugging the network cable, etc.;
[0045] 2. Replace the configuration of the gateway and router without changing the network configuration of the terminal device.
[0046] When the user terminal modifies any configuration, resulting in changes in the network environment, the terminal device will send an ARP broadcast packet with the content of ARP request, senderip: 0.0.0.0. This packet is a preparation packet for using IP, informing the devices in the network segment that the local machine will use the IP and determine whether there is any conflict in the IP. Only after the ARP packet is completed can the IP be actually used. Therefore, the change in network status can be judged through this packet.
[0047] Example 1
[0048] After the NDIS intermediate layer driver captures the ARP broadcast packet, when it determines that the host network status has changed, it turns on network access control, blocks the current network card network communication, and notifies the application layer client to detect illegal Internet connection behaviors. If there is a violation, protection is turned on, otherwise network control is turned off. In order to prevent the device from being in a long-term control state, a timeout mechanism is set. If the application layer client does not return for a long time, network control is turned off.
[0049] Considering that the network environment of some terminal devices changes frequently, in order to avoid frequent disconnection of users, the device's non-violation IP, MAC, device name and other configurations can be recorded. When the network status changes, if the current configuration is consistent with the recorded non-violation configuration, network access control will not be enabled first, and only detection notification will be made. If the detection is a violation, protection will be enabled, and the non-violation configuration will be updated once for each detection.
[0050] In order to achieve boot protection and prevent the network access control time from being too long after booting, it is determined whether the current configuration is consistent with the recorded non-violation configuration during booting. If they are consistent, no control is performed. If they are inconsistent, network control is enabled.
[0051] Example 2
[0052] On the basis of Example 1, considering that the intranet environment is relatively clean and simple, trusted IPs can be divided, and the remaining IPs are unknown untrusted IPs. The trusted IP range is recorded in the device, and the IPs in this range are protected according to the above scheme. When an IP in a non-trusted IP range communicates with a terminal device, based on the principle of distrust, regardless of whether the current configuration has changed, network control is directly performed, and a violation detection request is initiated. If no violation is found, the IP is added to the temporary trust list. The next time it is accessed, it will be processed as an IP in the trust list. The temporary trust list has an extinction mechanism.
[0053] For this scenario, to prevent the network from being disconnected for too long due to protection during detection, record the routing status when there is no violation. Perform routing detection first during detection. If the routing changes, continue with subsequent detection. If there is no change, directly release the protection.
[0054] Due to the existence of external network management personnel, the inaccurate division of the network environment will lead to the problem that the undivided device range is frequently controlled. In order to facilitate the configuration of management personnel, the "Observer" mode is defined for the above solution. In the "Observer" mode, when a non-trusted IP requests, no protection action is taken, only subsequent detection is performed. If there is no violation, in addition to recording the IP in the temporary trust list, the IP file is also written. If there is a violation, the protection action is turned on and the IP file is checked to see if the IP exists. If it exists, it is deleted. After the "Observer" mode ends, the IP record list can be merged into the configured temporary trusted IP list.
[0055] In view of the startup situation, a blacklist is added, and the IPs in the blacklist are directly blocked to prevent some special IPs from escaping control when the device is turned on.
[0056] The above embodiments are intended to illustrate the present invention, not to limit the present invention. Any solution that is a simple transformation of the present invention belongs to the protection scope of the present invention.
Claims
1. A method for protecting against illegal Internet connection behaviors based on changes in the network environment, characterized in that: The following steps are involved: S1 monitors the traffic data packets of the terminal device, and then proceeds to step S2; S2. Determine whether the traffic data packet is an ARP broadcast packet: After the NDIS intermediate layer driver captures the ARP broadcast packet, if it is determined that the network status of the terminal device has changed, proceed to step S3; otherwise, proceed to step S4; S3. Determine whether the current configuration has changed. If so, proceed to step S5; Otherwise, proceed to step S6: determine whether the current configuration has been changed by recording the non-violation configuration of the device; the non-violation configuration includes the non-violation IP, MAC, and device name; When the network status changes, if the current configuration is consistent with the recorded non-violation configuration, network access control is not enabled first, and the process goes to step S6 to make a detection notification. If the detection is a violation, protection is enabled, and the non-violation configuration is updated once for each detection; S4. Determine whether it is a trusted IP. If so, return to step S1; otherwise, proceed to step S5; S5. Turn on network access control, block the current network card network communication, and then proceed to step S6; S6. Notify the application layer client to detect illegal Internet connection behavior, wait for the detection result, and then proceed to step S7; S7 determines whether the received result has timed out. If so, proceed to step S9; Otherwise, proceed to step S8; S8. Determine whether there is a violation. If there is a violation, turn on protection; if there is no violation, go to step S9; S9. Turn off network control and record the IP into the temporary trusted IP list, then return to step S1.
2. The method for protecting against illegal Internet connection behaviors based on network environment changes according to claim 1, characterized in that: When the machine is turned on, it is determined whether the current configuration is consistent with the recorded non-violation configuration. If they are consistent, the process proceeds to step S6; if they are inconsistent, the process proceeds to step S5.
3. The method for protecting against illegal Internet connection behaviors based on network environment changes according to claim 1, characterized in that: In step S4, an "observer" mode is also provided. In the "observer" mode, when a non-trusted IP requests, no protection action is taken, and the process directly enters step S6 for subsequent detection. If it is determined as no violation by step S8, in addition to recording the IP in the temporary trusted IP list, the IP file is also written; if S8 determines as a violation, the protection action is turned on, and the IP file is checked to see whether the IP exists, and if it exists, it is deleted; after the "observer" mode ends, the record list of the IP file is merged into the configured temporary trusted IP list.
4. The method for protecting against illegal Internet connection behaviors based on network environment changes according to claim 1, characterized in that: In step S4, a blacklist is added according to the power-on situation, and the IPs in the blacklist are directly blocked.
5. The method for protecting against illegal Internet connection behaviors based on network environment changes according to claim 1, characterized in that: In step S7, a timeout mechanism is set to determine whether the terminal device is in a long-term control state. When the application layer client does not return a detection result within a preset time, the network control is closed.
6. The method for protecting against illegal Internet connection behaviors based on network environment changes according to claim 1, characterized in that: The temporary trusted IP list has an extinction mechanism.
7. The method for protecting against illegal Internet connection behaviors based on network environment changes according to claim 1, characterized in that: In step S6, the routing situation when there is no violation is recorded. During detection, the routing detection is first performed. If the routing changes, the subsequent detection is continued; if the routing does not change, the protection is directly released.
