Anti-detection method and device
By setting up monitoring and identification units in network devices, identifying and responding to the detection behavior of external devices, and adding IP addresses to the blacklist, the problem of network security devices being easily attacked is solved, and security and protection effects are improved.
Patent Information
- Application Number
- CN202210859880.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-21
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2042-07-21
AI Technical Summary
Existing network security equipment is easily detected and discovered by attackers, resulting in inability to work properly and lack of security protection.
By setting up a monitoring unit, an interactive unit and an identification unit in the network device, monitoring the port to be monitored, using a preset interactive response method to answer the service request of the external device, and identifying whether it is a detection behavior. If it is a detection behavior, the IP address is placed Add to the background management access blacklist to prohibit access.
It effectively improves the security of network security equipment, reduces the risk of being detected by attackers, and ensures the normal operation and security protection of network equipment.
Smart Images

Figure CN115118518B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network security, and in particular to an anti-detection method and device. Background Art
[0002] At present, in order to maintain network security, a large number of network security devices are deployed in the network, such as firewalls, application security firewalls (WAF), intrusion detection systems (IDS), etc. The core function of the above network security devices is to maintain network security from different angles.
[0003] Each network security device provides a web backend management interface. Network security device administrators and users can log in to the network security device through the web backend management interface. After logging in, network security device administrators and users can manage, view, and export security events on the network security device. Usually, when logging in using the web backend management interface, the access protocol uses the http or https protocol, and the default open port numbers of the web backend management interface are 80, 8080, 443, etc.
[0004] Since the access protocol and open port numbers used by the web backend management interface are common communication protocols and port numbers, network security devices are easily detected and discovered by attackers, and then attacked. Moreover, after the network security device is detected and discovered by the attacker, it will use all means to attack and obtain the authority to control the network security device, which will result in serious consequences such as the network security device not being able to work properly and the lack of security protection within the network. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides an anti-detection method and device, which solves the problem that existing network security equipment is easily detected and attacked by attackers, making the network security equipment unable to work normally and lacking security protection in the network.
[0006] In a first aspect, an embodiment of the present invention provides an anti-detection method, the method being applied to a network device, the network device comprising a background management port and a port to be monitored, the method comprising:
[0007] Monitoring the port to be monitored;
[0008] When any port to be monitored receives a service request sent by an external device, responding to the service request in a preset interactive response manner;
[0009] Identify whether the service request is a detection behavior initiated by the external device;
[0010] If the service request is identified as a detection behavior initiated by the external device, the IP address of the external device is added to the background management access blacklist, and the external device is prohibited from accessing the background management port according to the background management access blacklist.
[0011] In a second aspect, an embodiment of the present invention provides an anti-detection device, which is applied to a network device, wherein the network device includes a background management port and a port to be monitored, and the device includes:
[0012] A monitoring unit, used for monitoring the port to be monitored;
[0013] The interactive unit is used to respond to the service request through a preset interactive response mode when monitoring any port to be monitored receives a service request sent by an external device;
[0014] An identification unit, used to identify whether the service request is a detection behavior initiated by the external device;
[0015] The processing unit is used to add the IP address of the external device to the background management access blacklist if it is identified that the service request is a detection behavior initiated by the external device, and prohibit the external device from accessing the background management port according to the background management access blacklist.
[0016] In a third aspect, an embodiment of the present invention provides a network device, comprising: a shell, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the shell, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned network device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute an anti-detection method described in the first aspect above.
[0017] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement an anti-detection method described in the first aspect.
[0018] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, which can be executed by one or more processors to implement the anti-detection method described in the first aspect.
[0019] An anti-detection method and device provided by an embodiment of the present invention comprises the following steps: a network device monitors a port to be monitored; when any port to be monitored receives a service request sent by an external device, the network device responds to the service request in a preset interactive response manner; the network device identifies whether the service request is a detection behavior initiated by an external device; if the service request is identified as a detection behavior initiated by an external device, the network device adds the IP address of the external device to a background management access blacklist, and prohibits the external device from accessing the background management port according to the background management access blacklist.
[0020] While responding to the service request sent by the external device using the preset interactive response method, identify whether the service request is a detection behavior initiated by the external device. If it is determined to be a detection behavior, the IP address of the external device is added to the background management access blacklist, and the external device is prohibited from accessing the background management port again. The above solution can solve the problem that the existing network security equipment is easily detected and attacked by attackers, resulting in the inability of network security equipment to work normally and the lack of security protection within the network. It improves the security of network security equipment and reduces the risk of network security equipment being detected and discovered by attackers. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1 A flow chart of an anti-detection method provided by an embodiment of the present invention;
[0023] Figure 2 A schematic diagram of a deception response performed by a deception module provided in an embodiment of the present invention;
[0024] Figure 3 A schematic diagram of an application scenario of the anti-detection method provided by an embodiment of the present invention;
[0025] Figure 4 A schematic diagram of an anti-detection device provided by an embodiment of the present invention;
[0026] Figure 5 A schematic diagram of a network device structure provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0028] It should be clear that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] The following is combined with Figure 1 , the scheme provided by the embodiment of the present invention is described in detail, Figure 1 The flowchart of an anti-detection method provided by an embodiment of the present invention is a network device. The network device is a device with an application layer service port. For example, a firewall, an application security firewall (WAF), an intrusion detection system (IDS), etc. Figure 1 As shown, the method of this embodiment specifically includes the following steps:
[0030] Step 110: Monitor the port to be monitored.
[0031] In this step, the application layer service port included in the network device includes at least one conventional port corresponding to a standard application layer protocol, including but not limited to the following ports: the default port of the ssh service, port number 22, the default port of the telnet service, port number 23, and the default port of the mysql service, port number 3306.
[0032] In the embodiment of the present invention, at least one regular port is also referred to as a port to be monitored.
[0033] A network device listens for service requests received on one or more of its regular ports.
[0034] Optionally, in this embodiment, the network device further includes one or more background management ports. The one or more background management ports are ports used for page management, including but not limited to the following ports: ports used to support the Http protocol are identified as 80 (default) and 8080 (commonly used); ports used to support the Https protocol are identified as 443 (default), etc.
[0035] Prior to this step, the network device configures the one or more background management ports as unconventional ports, which are ports other than conventional ports corresponding to preset standard application layer protocols in the network device.
[0036] Furthermore, the network device configures the background management port as a non-conventional port, and the specific process is: the network device configures the port identifier of the background management port as a port identifier other than the port identifier of the conventional port.
[0037] For example, the number of port identifiers configured in the network device is 65535. Except for the port identifiers of regular ports, the remaining port identifiers are all unconventional port identifiers. The network device changes the port identifier 80 (default) supporting the Http protocol to 6000, and changes the port 8080 (common) to 7000; the port identifier 443 (default) supporting the Https protocol is changed to 9000.
[0038] After the network device configures the background management port as an unconventional port, the administrator or real user can access the system background by accessing the unconventional port, and the business module included in the network device returns the business management page to the administrator or real user through the unconventional port.
[0039] Step 120: When any port to be monitored receives a service request sent by an external device, the service request is responded to in a preset interactive response manner.
[0040] In this step, the network device enables a preset response function for the regular port. When any regular port is monitored to receive a service request sent by an external device, the network security responds to the service request through a preset interactive response method.
[0041] Optionally, the preset interactive response mode is a low interactive response mode. That is, when any regular port is monitored to receive a service request sent by an external device, the network device fraudulently responds to the service request in a low interactive response mode, so that the external device mistakenly believes that the connection is to a service that provides real business, thereby inducing the external device to perform further attack operations on the service.
[0042] From the perspective of network devices, the external device can be any device in the network that sends a service request to the network device, such as a switch, a router, or a gateway; of course, the external device can also be a terminal device used by a user.
[0043] Step 130: Identify whether the service request is a detection behavior initiated by an external device.
[0044] In this step, the network device identifies the service request received by the regular port and determines whether the service request is a detection behavior initiated by an external device.
[0045] If it is identified that the service request is a detection behavior initiated by an external device, the network device executes step 140; if it is identified that the service request is not a detection behavior initiated by an external device, the network device continues to execute step 120, that is, the network security device continues to listen to whether the regular port receives the service request, and after receiving the service request, it responds to the service request in a low-interactive response manner.
[0046] It should be noted that, in the embodiment of the present invention, the specific execution sequence of step 130 is not limited. That is, in one implementation, while the network device responds to the service request in a low-interaction response manner, it can perform a detection behavior to identify whether the service request is initiated by an external device.
[0047] In another implementation, after the network device monitors the service request sent by the external device through the regular port, it can perform a detection behavior to identify whether the service request is initiated by the external device. When it is determined that the service request is not a detection behavior initiated by the external device, a business response is made to the service request in a low-interactive response mode; when it is determined that the service request is a detection behavior initiated by the external device, step 140 is executed.
[0048] Optionally, the above detection behavior specifically includes port scanning detection behavior, or background path traversal behavior, or vulnerability detection behavior. Before performing vulnerability detection, the network device usually performs port scanning detection behavior and background path traversal detection behavior.
[0049] Step 140: If the service request is identified as a detection behavior initiated by an external device, the IP address of the external device is added to the background management access blacklist, and the external device is prohibited from accessing the background management port according to the background management access blacklist.
[0050] In this step, if the network device recognizes that the service request is a detection behavior initiated by an external device, the network device adds the IP address of the network device to the background management access blacklist, and prohibits the external device from accessing unconventional ports based on the background management access blacklist.
[0051] It is understandable that external devices corresponding to IP addresses in the backend management access blacklist are prohibited from accessing regular ports.
[0052] Therefore, while responding to the service request sent by the external device using the preset interactive response method, it is identified whether the service request is a detection behavior initiated by the external device. If it is determined to be a detection behavior, the IP address of the external device is added to the background management access blacklist, and the external device is prohibited from accessing the background management port again. The above solution can solve the problem that the existing network security equipment is easily detected and attacked by attackers, resulting in the inability of network security equipment to work normally and the lack of security protection within the network. It improves the security of network security equipment and reduces the risk of network security equipment being detected and discovered by attackers.
[0053] Optionally, in an embodiment of the present invention, a deception module is included in the network device, and the deception module can make a deception response to the service request in a low-interaction response manner.
[0054] like Figure 2As shown, Figure 2 A schematic diagram of a deception response performed by a deception module provided in an embodiment of the present invention. Figure 2 In this example, the default port (port number 23) for accessing the telnet service from an external device is used to illustrate.
[0055] The external device attempts to access the telnet application included in the network device. The external device generates and sends a request to log in to the telnet application to the port identified as port 23. The deception module responds to the request to log in to the telnet application in a low-interactive response mode. When the external device thinks that it has successfully logged in, the deception module sends a login success message to the external device.
[0056] It is understandable that when an external device logs in to a telnet application, it needs to communicate and interact with the spoofing module for multiple times before logging in successfully. It is the same as the process of logging in to an existing telnet application, and is only briefly described here.
[0057] For example, the external device first sends a login request to the deception module, and the deception module sends a login page to the external device. The external device sends a user name and password to the deception module, and the deception unit sends a login success to the external device.
[0058] It should be noted that, since the deception module is performing a deception response, no matter what form of user name and password the external device sends, the deception module will send a successful login.
[0059] After the external device determines that it has successfully logged into the telnet application, it sends a command execution request to the spoofing module. The spoofing module spoofs the command execution request in a low-interactive response mode and sends the command execution result to the external device.
[0060] For example, the command execution request may specifically be a display command; or a close command.
[0061] The above-mentioned low-interaction response method can also be called a low-interaction honeypot (or a low-interaction honeypot + a medium-interaction honeypot). It usually refers to a honeypot system with a low degree of interaction with the operating system. In a low-interaction honeypot, some simple services or ports are opened for detection scanning and connection, and some simple interactive responses can be simulated. Using a low-interaction honeypot can make the attacker think that the other end is a real service provider, and thus launch an attack on it. In this way, the honeypot can obtain more valuable information.
[0062] In actual applications, highly interactive honeypots are also included. The following is a brief description of highly interactive honeypots.
[0063] Highly interactive honeypots usually refer to honeypot systems that have a high degree of interaction with the operating system. They can provide a more realistic environment and are more likely to attract attackers. Using highly interactive honeypots is conducive to understanding the attackers' new attack methods and types, but there are also hidden dangers, that is, attackers can attack the real network.
[0064] In the embodiment of the present invention, the reason for adopting the low-interactive response mode is that the deployment and development of the low-interactive response mode occupies less network device resources than the high-interactive response mode, and is easier and more convenient. In actual application, the response mode can also be selected according to the current state of the network device.
[0065] In the embodiment of the present invention, the deception module includes a simulation submodule and a traffic forwarding submodule. The simulation submodule opens low-interaction simulation services of some common applications (e.g., telnet applications). After the application layer service port receives a service request sent by an external device, the service request is transmitted to the simulation submodule.
[0066] The simulation submodule determines the service to which the service request belongs, and uses the enabled low-interaction simulation service to spoof the service request. The traffic forwarding submodule forwards the spoof response of the simulation submodule to an external device.
[0067] Optionally, in step 130, the network device identifies whether the service request is a detection behavior initiated by an external device. The specific process is: the network device identifies whether the service request is a port scanning detection behavior initiated by an external device; or; the network device identifies whether the service request is a background path traversal detection behavior initiated by an external device.
[0068] Optionally, the process of the network device identifying whether the service request is a port scanning detection behavior initiated by an external device is as follows:
[0069] The network device determines whether the service request is the first service request sent by the external device. If the service request is the first service request sent by the external device to the regular port, the network device records the time of receiving the service request, the source IP address included in the service request, the port identifier of the regular port accessed by the source IP address, and the number of times the source IP address accessed the regular port in the database. At the same time, the network device also responds to non-first service requests through a preset interactive response method.
[0070] If the service request is not the first service request sent by the external device to the regular port, when the current time is within the first preset time period, the network device searches the database for the corresponding record item according to the source IP address included in the non-first service request, and adds the number of times the source IP address has accessed the regular port to 1. At the same time, the network device also responds to the non-first service request in a preset interactive response manner.
[0071] It is understandable that the network device records in the database the time of receiving each service request (including the first service request and non-first service request), the source IP address of each external device that sends the service request (different external devices), the port identifier of the source IP address accessing the regular port (the source IP address accesses the same or different regular port identifiers), and the number of times the source IP address accesses the regular port (the number of times the source IP address accesses the same or different regular ports).
[0072] The network device traverses the database at a high frequency to determine whether the number of times the source IP address accesses the regular port is greater than the first count threshold.
[0073] It should be noted that the number of times a source IP address accesses a regular port specifically refers to the total number of times an external device with the same source IP address accesses the regular port.
[0074] If it is greater than the first numerical threshold, the network device determines that the external device corresponding to the source IP address has initiated a port scanning detection behavior; if it is not greater than the first threshold, the network device determines that the external device corresponding to the source IP address has not initiated a port scanning detection behavior.
[0075] Among them, the first preset time period can be set between 2s-10s; the first number threshold can be set to 3 times.
[0076] For example, the network device receives service request 1-service request 7 sent by external device 1, and receives service request 8 sent by external device 2. The network device obtains the source IP address included in each service request. The network device records the receiving time, each source IP address, port identifier, and access times of each service request. As shown in Table 1 below.
[0077] Table 1 Receiving time-source IP address-port identifier-access times
[0078] Receiving time Source IP address Port ID Number of visits 08:00 1.1.1.1 2233 1 08:01 2.2.2.2 23 1 08:01 1.1.1.1 2224 2 08:02 1.1.1.1 2256 1 08:05 1.1.1.1 2212 2 08:06 1.1.1.1 2267 1
[0079] In the above example, the first preset time period is specifically 08:00-08:10, and the first number threshold can be set to 3 times. It can be seen from Table 1 that the network device 1 with the source IP address of 1.1.1.1 initiated 7 connections to the ports with port identifiers 2233, 2224, 2256, 2212, and 2267 respectively during the time period of 08:00-08:10. The total number of visits is greater than 3 times. The network device determines that the network device 1 corresponding to 1.1.1.1 has initiated a port scanning detection behavior. The network device 2 with the source IP address of 2.2.2.2 initiated 1 connection to the port with port identifier 23 during the time period of 08:00-08:10. The total number of visits is less than 3 times. The network device determines that the network device 2 corresponding to 2.2.2.2 did not initiate a port scanning detection behavior, that is, normal port access.
[0080] Optionally, in step 130, the process of the network device identifying whether the service request is a background path traversal detection behavior initiated by the external device is:
[0081] After receiving the service request, the network device first identifies whether the service request belongs to the Http protocol or the Https protocol and is a Get type service request.
[0082] If so, the network device determines whether the service request is the first service request sent by the external device. If the service request is the first service request sent by the external device, the network device records the time of receiving the service request, the source IP address included in the service request, the file path requested by the source IP address, the request result, and the number of times the source IP address requested the file path in the database. At the same time, the network device also responds to non-first service requests through a preset interactive response method.
[0083] If the service request is not the first service request sent by the external device, when the current time of the network device is within the second preset time period, the network device searches for the corresponding record item in the database according to the source IP address included in the non-first service request, and adds the number of times the recorded source IP address requests the file path by 1. At the same time, the network device also responds to the non-first service request in a preset interactive response manner.
[0084] It is understandable that the network device simulates a response to a Get-type request message and returns a response message to the external device. The response message is a response message of an unsuccessful response request (i.e., a Get-type request fails, and the response message includes a return failure code, for example, the HTTP protocol returns 500 indicating a request failure).
[0085] The network device records in the database the time of receiving each service request (including the first service request and non-first service request), the source IP address of each external device that sends the service request (different external devices), the file path requested by the source IP address, the request result (success or failure, both are failures in the embodiment of the present invention), and the number of times the source IP address requests the file path (the number of times the source IP address requests the same or different file paths).
[0086] The network device traverses the database at a high frequency to determine whether the number of times the source IP address requests the file path is greater than the second count threshold.
[0087] It should be noted that the number of times the source IP address requests the file path specifically refers to the total number of times the external device with the same source IP address requests the file path, and the total number of times is the total number of failures.
[0088] If it is greater than the second numerical threshold, the network device determines that the external device corresponding to the source IP address has initiated a background path traversal detection behavior; if it is not greater than the second numerical threshold, the network device determines that the external device corresponding to the source IP address has not initiated a background path traversal detection behavior.
[0089] The second preset time period can be set between 2s and 10s; and the second number threshold can be set to 10 times.
[0090] For example, the network device receives service request 1-service request 14 sent by external device 1, and receives service request 15 sent by external device 2. The network device obtains the source IP address included in each service request. The network device records the receiving time of each service request, each source IP address, the requested file path, the request result, and the number of failures. As shown in Table 2 below.
[0091] Table 2 Request time - source IP address - background file path - request result - number of failures
[0092] Request time Source IP address Background file path Request results Number of failures 08:00 1.1.1.1 / index.php / Admin / index / A fail 1 08:01 2.2.2.2 / index.php?ctrl=login&act=index fail 1 08:01 1.1.1.1 / index.php / Admin / index / B fail 1 08:02 1.1.1.1 / index.php / Admin / index / C fail 2 08:05 1.1.1.1 / index.php / Admin / index / D fail 1 08:03 1.1.1.1 / index.php / Admin / index / E fail 1 08:04 1.1.1.1 / index.php / Admin / index / F fail 1 08:05 1.1.1.1 / index.php / Admin / index / G fail 1 08:06 1.1.1.1 / index.php / Admin / index / H fail 2 08:07 1.1.1.1 / index.php / Admin / index / I fail 1 08:08 1.1.1.1 / index.php / Admin / index / J fail 2 08:09 1.1.1.1 / index.php / Admin / index / K fail 1
[0093] In the above example, the first preset time period is specifically 08:00-08:10, and the first count threshold can be set to 10 times. It can be seen from Table 2 that the external device 1 with the source IP address of 1.1.1.1 has failed in response to each request to / index.php / Admin / index / AK (AK represents a different path) during the time period of 08:00-08:10. The total number of failures is greater than 14 times. The network device determines that the external device 1 corresponding to 1.1.1.1 has initiated a background path traversal detection behavior. The external device 2 with the source IP address of 2.2.2.2 requested / index.php? ctrl=login&act=index once during the time period of 08:00-08:10 and the response failed. The total number of failures is less than 10 times. The network device determines that the external device 2 corresponding to 2.2.2.2 has not initiated a background path traversal detection behavior, that is, normal background path access.
[0094] It is understandable that the above-mentioned background file path is not limited to the path in Table 1, and may also include / index.php / Admin / index / login, / admin / hjdxx / login.php, / index.php?s= / admin / account / login.html, etc.
[0095] Optionally, in an embodiment of the present invention, a perception interception module is included in the network device, which can execute the above-mentioned detection behavior of identifying whether the service request is initiated by an external device, adding the IP address of the external device to the background management access blacklist, and prohibiting the external device from accessing the background management port based on the background management access blacklist.
[0096] The following is combined with Figure 3 , the scheme provided by the embodiment of the present invention is described in detail, Figure 3 A schematic diagram of an application scenario of the anti-detection method provided in an embodiment of the present invention.
[0097] exist Figure 3 In the present invention, the network equipment includes unconventional ports, conventional ports, service modules, deception modules and perception and interception modules.
[0098] The network device configures the backend management port as an unconventional port. The conventional port can specifically refer to the application layer service port. Real users can access the system backend and interact with the business module by accessing the unconventional port.
[0099] The attacker accesses the regular port and transmits the service request to the deception module, which responds to the service request in a low-interactive response mode.
[0100] At the same time, the deception module also transmits the service request to the perception interception module. The perception interception module identifies whether the service request is a detection behavior initiated by the attacker. If the service request is a detection behavior initiated by the attacker, the perception interception module adds the IP address of the external device used by the attacker to the background management access blacklist, and prohibits the attacker from using the external device to access the background management port again based on the background management access blacklist.
[0101] It can be understood that the specific execution process of the above-mentioned deception module and perception interception module can refer to the description of the previous embodiment and will not be repeated here.
[0102] The following is combined with Figure 4 , the scheme provided by the embodiment of the present invention is described in detail, Figure 4 A schematic diagram of an anti-detection device provided in an embodiment of the present invention, wherein the device is applied to a network device, wherein the network device includes a background management port and a port to be monitored, and the device includes:
[0103] A monitoring unit 410, configured to monitor the port to be monitored;
[0104] The interactive unit 420 is used to respond to the service request through a preset interactive response mode when monitoring any port to be monitored receives a service request sent by an external device;
[0105] An identification unit 430, configured to identify whether the service request is a detection behavior initiated by the external device;
[0106] The processing unit 440 is used to add the IP address of the external device to the background management access blacklist if it is identified that the service request is a detection behavior initiated by the external device, and prohibit the external device from accessing the background management port according to the background management access blacklist.
[0107] Optionally, the device further includes: a configuration unit (not shown in the figure), which is used to configure the background management port as an unconventional port, and the unconventional port is other ports in the network device except the regular ports corresponding to the preset standard application layer protocol.
[0108] Optionally, the configuration unit (not shown in the figure) is specifically used to configure the port identifier of the background management port to be a port identifier other than the port identifier of a regular port.
[0109] Optionally, the identification unit 430 is specifically used to identify whether the service request is a port scanning detection behavior initiated by the external device;
[0110] or;
[0111] Identify whether the service request is a background path traversal detection behavior initiated by the external device.
[0112] Optionally, the identification unit 430 is further specifically configured to determine whether the service request is the first service request sent by the external device to the port to be monitored;
[0113] If yes, then record the time of receiving the service request, the source IP address included in the service request, and the number of times the source IP address accesses the port to be monitored, and respond to the service request in a preset interactive response mode;
[0114] If not, when the current time is within the first preset time period, the number of times the source IP address included in the recorded service request accesses the port to be monitored is increased by 1, and the service request is responded to in a preset interactive response manner;
[0115] Determine whether the number of times the source IP address accesses the port to be monitored is greater than a first number threshold;
[0116] If it is greater than the first number threshold, it is determined that the external device has initiated a port scanning detection behavior.
[0117] Optionally, the type of the service request is an acquisition type of a standard application layer protocol;
[0118] The identification unit 430 is further specifically configured to determine whether the service request is the first service request sent by the external device;
[0119] If yes, then record the time of receiving the service request, the source IP address included in the service request, the file path requested by the source IP address, the request result, and the number of times the source IP address requests the file path, and respond to the service request through a preset interactive response method;
[0120] If not, when the current time is within the second preset time period, the recorded number of times the source IP address requests the file path is increased by 1, and the service request is responded to in a preset interactive response manner;
[0121] Determine whether the number of times the source IP requests the file path is greater than a second number threshold;
[0122] If it is greater than the second numerical threshold, it is determined that the external device has initiated a background path traversal detection behavior.
[0123] Optionally, the interaction unit 420 is specifically configured to simulate a response to the service request in a low-interactive response manner.
[0124] Accordingly, Figure 5A schematic diagram of a network device embodiment provided by the present invention can implement the present invention Figure 1-Figure 3 The process of the embodiment shown is as follows: Figure 5 As shown, the network device may include: a housing 51, a processor 52, a memory 53, a circuit board 54, and a power supply circuit 55. The circuit board 54 is placed inside the space enclosed by the housing 51, and the processor 52 and the memory 53 are arranged on the circuit board 54; the power supply circuit 55 is used to supply power to each circuit or device of the network device; the memory 53 is used to store executable program codes; the processor 52 runs a program corresponding to the executable program code by reading the executable program code stored in the memory 53, so as to execute the anti-detection method and device described in the above embodiments.
[0125] For details on the specific execution process of the above steps by the processor 52 and the steps further executed by the processor 52 by running the executable program code, please refer to the present invention. Figure 1-Figure 3 The description of the illustrated embodiment will not be repeated here.
[0126] The network device: a device that provides computing services. The network device consists of a processor, hard disk, memory, system bus, etc. The network device is similar to the general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, manageability, etc.
[0127] It should be noted that, in this article, terms such as "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0128] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0129] In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0130] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0131] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0132] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof.
[0133] In the above embodiments, multiple steps or methods may be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it may be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0134] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0135] For the convenience of description, the above device is described by dividing the functions into various units / modules. Of course, when implementing the present invention, the functions of each unit / module can be implemented in the same or multiple software and / or hardware.
[0136] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or certain parts of the embodiments.
Claims
1. An anti-detection method, characterized in that: The method is applied to a network device, the network device includes a background management port and a port to be monitored, the port to be monitored includes at least one conventional port corresponding to a standard application layer protocol, and the method includes: Monitoring the port to be monitored; When any monitored port receives a service request sent by an external device, respond to the service request through a preset interactive response method; identify whether the service request is a detection behavior initiated by the external device; the preset interactive response method is a low-interactive honeypot or a high-interactive honeypot, and a low-interactive honeypot or a high-interactive honeypot is selected according to the current state of the network device; If the service request is identified as a detection behavior initiated by the external device, the IP address of the external device is added to the background management access blacklist, and the external device is prohibited from accessing the background management port according to the background management access blacklist; Wherein, the identifying whether the service request is a detection behavior initiated by the external device includes: identifying whether the service request is a port scanning detection behavior initiated by the external device; or identifying whether the service request is a background path traversal detection behavior initiated by the external device; The identifying whether the service request is a port scanning detection behavior initiated by the external device includes: determining whether the service request is the first service request sent by the external device to the port to be monitored; if so, recording the time of receiving the service request, the source IP address included in the service request, and the number of times the source IP address accesses the port to be monitored, and responding to the service request through a preset interactive response method; if not, when the current time is within a first preset time period, adding 1 to the number of times the source IP address included in the recorded service request accesses the port to be monitored, and responding to the service request through a preset interactive response method; determining whether the number of times the source IP address accesses the port to be monitored is greater than a first number threshold; if greater than the first number threshold, determining that the external device has initiated a port scanning detection behavior; The type of the service request is an acquisition type of a standard application layer protocol; the identification of whether the service request is a background path traversal detection behavior initiated by the external device includes: determining whether the service request is the first service request sent by the external device; if so, recording the time of receiving the service request, the source IP address included in the service request, the file path requested by the source IP address, the request result, and the number of times the source IP address requests the file path, and responding to the service request through a preset interactive response method; if not, when the current time is within a second preset time period, adding 1 to the recorded number of times the source IP address requests the file path, and responding to the service request through a preset interactive response method; determining whether the number of times the source IP requests the file path is greater than a second number threshold; if greater than the second number threshold, determining that the external device has initiated a background path traversal detection behavior.
2. The method according to claim 1, characterized in that Before monitoring the port to be monitored, the method further includes: The background management port is configured as an unconventional port, and the unconventional port is other ports in the network device except the conventional ports corresponding to the preset standard application layer protocol.
3. The method according to claim 2, characterized in that The configuring the background management port as an unconventional port specifically includes: The port identifier of the background management port is configured as a port identifier other than the port identifier of the regular port.
4. The method according to claim 1, characterized in that: The responding to the service request in a preset interactive response manner includes: The service request is simulated responded to in a low-interaction response manner.
5. An anti-detection device, characterized in that: The device is applied to a network device, the network device includes a background management port and a port to be monitored, and the device includes: A monitoring unit, used for monitoring the port to be monitored; The interactive unit is used to respond to the service request through a preset interactive response mode when monitoring any port to be monitored receives a service request sent by an external device; the preset interactive response mode is a low-interactive honeypot or a high-interactive honeypot, and the low-interactive honeypot or the high-interactive honeypot is selected according to the current state of the network device; An identification unit, used to identify whether the service request is a detection behavior initiated by the external device; A processing unit, configured to add the IP address of the external device to a background management access blacklist if it is identified that the service request is a detection behavior initiated by the external device, and prohibit the external device from accessing the background management port according to the background management access blacklist; Wherein, the identification module is specifically used to: identify whether the service request is a port scanning detection behavior initiated by the external device; or; identify whether the service request is a background path traversal detection behavior initiated by the external device; The identification module is specifically used to: determine whether the service request is the first service request sent by the external device to the port to be monitored; if so, record the time of receiving the service request, the source IP address included in the service request, and the number of times the source IP address accesses the port to be monitored, and respond to the service request through a preset interactive response method; if not, when the current time is within a first preset time period, add 1 to the number of times the source IP address included in the recorded service request accesses the port to be monitored, and respond to the service request through a preset interactive response method; determine whether the number of times the source IP address accesses the port to be monitored is greater than a first number threshold; if it is greater than the first number threshold, determine that the external device has initiated a port scanning detection behavior; The identification module is specifically used to: determine whether the service request is the first service request sent by the external device; if so, record the receiving time of the service request, the source IP address included in the service request, the file path requested by the source IP address, the request result and the number of times the source IP address requests the file path, and respond to the service request through a preset interactive response method; if not, when the current time is within a second preset time period, add 1 to the recorded number of times the source IP address requests the file path, and respond to the service request through a preset interactive response method; determine whether the number of times the source IP requests the file path is greater than a second number threshold; if greater than the second number threshold, determine that the external device has initiated background path traversal detection behavior.
6. A network device, characterized in that: The network device includes: a shell, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the shell, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned network device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the anti-detection method described in any one of claims 1 to 4.
7. A computer-readable storage medium storing one or more programs, wherein the one or more programs can be executed by one or more processors to implement the anti-detection method according to any one of claims 1 to 4.
8. A computer program product, comprising a computer program, wherein the computer program can be executed by one or more processors and is used to implement the anti-detection method according to any one of claims 1 to 4.
