Method, device and computer storage medium for device counterfeit identification
By sending network detection signals and building a device fingerprint library, identifying and verifying new devices, the problem of illegal users evading network security by modifying attribute information is solved, and the identification of counterfeit devices and network access is enhanced security.
Patent Information
- Application Number
- CN202411180690.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-08-27
AI Technical Summary
Illegal users evade network security measures by modifying device attribute information and achieve unauthorized or illegal network access.
By sending network detection signals to potential devices, identifying the surviving devices on the Internet, generating the original device ID, and building a device fingerprint library. If a new device is connected, the new device ID is obtained through its IP address or MAC address to match the device fingerprint library. , determine whether the new device is a counterfeit device.
Accurate identification of counterfeit devices and enhanced security of network access is achieved to prevent unauthorized or illegal network access.
Smart Images

Figure CN118713929B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security technology, and in particular to a method, device and computer storage medium for device counterfeit identification. Background Art
[0002] In the network field, device identity authentication usually relies on the binding authentication of the network address (Internet Protocol Address, IP address) and the physical address (Media Access Control Address, MAC address). However, the operating system provides the function of modifying device attributes, which includes not only the device IP and MAC address, but also other identification information. Therefore, illegal users may use this function to change various attribute information of the device, thereby circumventing network security measures based on binding authentication and achieving unauthorized or illegal network access. Summary of the invention
[0003] The main purpose of this application is to provide a method, device and computer storage medium for device counterfeit identification, aiming to solve the technical problem that illegal users circumvent network security measures by modifying device attribute information to achieve unauthorized or illegal network access.
[0004] To achieve the above object, an embodiment of the present application provides a method for identifying counterfeit devices, the method comprising:
[0005] Sending a network detection signal to a potential device, and identifying a surviving device on the network according to a response signal sent by the potential device;
[0006] Generate an original device ID of the surviving device on the network based on the IP address or MAC address of the surviving device on the network;
[0007] Construct a device fingerprint library according to the original device ID and the attribute data corresponding to the surviving device on the network;
[0008] If a new device is detected to be connected to the network, a new device ID of the new device is obtained through the IP address or MAC address of the new device;
[0009] A search and match is performed in the device fingerprint database according to the new device ID, and whether the new device is a counterfeit device is determined based on the matching result.
[0010] In one embodiment, the step of sending a network detection signal to a potential device and identifying a surviving device on the network according to a response signal sent by the potential device includes:
[0011] Configure network detection parameters to determine the target IP address segment, detection frequency, timeout threshold, and number of retries;
[0012] Using a preset network protocol to send a network detection signal to potential devices in the preset target IP address segment;
[0013] Receiving a response signal returned by the network detection signal, and recording a timestamp of the response signal;
[0014] Based on the timestamp, it is determined whether the potential device is a surviving device on the network.
[0015] In one embodiment, the step of determining whether the potential device is a surviving device on the network based on the timestamp includes:
[0016] Compare the timestamp of the received response signal with the timestamp of the sent network detection signal to calculate the response delay;
[0017] When the response delay is less than or equal to a preset timeout threshold, determining that the corresponding response signal is valid, and marking the potential device corresponding to the response signal as being in a network survival state;
[0018] When the response signal is not received or the response delay is greater than a preset timeout threshold, the corresponding response signal is determined to be invalid, and the potential device corresponding to the response signal is marked as being off-grid.
[0019] In one embodiment, when the response delay is less than or equal to a preset timeout threshold, determining that the corresponding response signal is valid and marking the potential device corresponding to the response signal as being in a network alive state comprises:
[0020] When it is determined for the first time that the potential device is in a network survival state, recording a timestamp of the first receipt of a valid response signal from the potential device, and initializing the network survival time of the potential device;
[0021] Continuously monitoring and recording the timestamps of all valid response signals received from the potential device;
[0022] Accumulate the time difference between the timestamp of the current valid response signal and the timestamp of the last consecutive valid response signal into the network survival time;
[0023] When the potential device changes to an off-network state, the on-network survival time is accumulated up to the timestamp of the last time a valid response signal is received in the on-network survival state;
[0024] When the potential device changes from an off-network state to an on-network survival state, jump to the step of accumulating the time difference between the timestamp of the current valid response signal and the timestamp of the last consecutive valid response signal into the on-network survival time, and continue to accumulate based on the existing on-network survival time;
[0025] When the accumulated network survival time reaches or exceeds a preset survival time threshold, the potential device is determined as a network surviving device.
[0026] In one embodiment, before the step of generating the original device ID of the surviving device on the network based on the IP address or MAC address of the surviving device on the network, the step includes:
[0027] Sending an identification request to the surviving device on the network, wherein the identification request includes at least one of an identification code and a query instruction;
[0028] When the surviving device on the network receives the identification code or the query instruction, it generates an identification response including the device fingerprint data;
[0029] Encapsulating the device fingerprint data in the identification response into a response message, and returning it to the requester;
[0030] The device fingerprint data contained in the response message is extracted, wherein the device fingerprint data includes the IP address, MAC address and attribute data of the surviving device on the network.
[0031] In one embodiment, the step of constructing a device fingerprint library according to the original device ID and the attribute data corresponding to the surviving device on the network includes:
[0032] Encode the IP address or MAC address of the surviving device on the network by using a hash algorithm to generate an original device ID of the surviving device on the network;
[0033] Associating the original device id with corresponding attribute data obtained by the identification means, ensuring that the attribute data corresponds to the original device id and the identification means used to obtain the attribute data;
[0034] A device fingerprint library is constructed according to the original device ID, the attribute data, and the identification means used to obtain the attribute data.
[0035] In one embodiment, the step of searching and matching in the device fingerprint library according to the new device ID and determining whether the new device is a counterfeit device according to the matching result includes:
[0036] Using the new device ID as a search condition, searching the device fingerprint data identical to the new device ID in the device fingerprint library;
[0037] If the identification means of the new device does not exist in the device fingerprint library, the new device is determined to be a counterfeit device;
[0038] When the new device ID of the new device exists in the device fingerprint library, the attribute data of the new device is compared with the attribute data of the same device ID in the device fingerprint library. If the attribute data of the new device does not match the attribute data in the device fingerprint library, the new device is determined to be a counterfeit device.
[0039] In one embodiment, if the attribute data of the new device does not match the attribute data in the device fingerprint library, the step of determining that the new device is a counterfeit device includes:
[0040] If the attribute data in the device fingerprint library is a non-null value, and the corresponding attribute data of the new device is missing or null, then the new device is determined to be a non-counterfeit device;
[0041] If the attribute data in the device fingerprint library is a non-null value, and the corresponding attribute data of the new device is another different non-null value, then the new device is determined to be a counterfeit device;
[0042] If the attribute data in the device fingerprint library is missing or has a null value, and the corresponding attribute data of the new device has a non-null value, then the new device is determined to be a counterfeit device.
[0043] An embodiment of the present application further provides a device for counterfeit identification, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the method for counterfeit identification of a device as described above.
[0044] The embodiment of the present application further provides a computer storage medium, which is a computer-readable storage medium. A computer program is stored on the computer storage medium. When the computer program is executed by a processor, the steps of the method for device counterfeit identification as described above are implemented.
[0045] The embodiment of the present application discloses a method for device counterfeit identification, which includes sending a network detection signal to a potential device, and identifying a surviving device on the network according to a response signal sent by the potential device; generating the original device ID of the surviving device on the network based on the IP address or MAC address of the surviving device on the network; building a device fingerprint library according to the original device ID and the attribute data corresponding to the surviving device on the network; if a new device is detected to be connected to the network, obtaining the new device ID of the new device through the IP address or MAC address of the new device; searching and matching in the device fingerprint library according to the new device ID, and judging whether the new device is a counterfeit device according to the matching result. The present application realizes the effective identification of counterfeit devices and enhances the security of network access by building a device fingerprint library and completing the identity authentication of the new device based on the device fingerprint library. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A flowchart of a first embodiment of a method for identifying counterfeit devices according to an embodiment of the present application;
[0047] Figure 2 This is an example diagram of the storage structure of the device fingerprint library in data of the first embodiment of the method for device counterfeiting identification involved in the embodiment of the present application;
[0048] Figure 3 A flowchart of a second embodiment of a method for identifying counterfeit devices according to an embodiment of the present application;
[0049] Figure 4 A schematic diagram of a process of determining a surviving device on the network according to a second embodiment of a method for identifying counterfeit devices involved in an embodiment of the present application;
[0050] Figure 5 This is a schematic diagram of the structure of the counterfeit identification device of the present application.
[0051] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0052] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0053] In the field of network security, device authentication is one of the key mechanisms to ensure that network resources are only accessed by authorized users. Traditional device authentication methods usually rely on binding authentication of IP addresses and MAC addresses, that is, the device identity is verified by binding the MAC address of the device's network interface card (NIC) to its assigned IP address. This method can prevent unauthorized devices from accessing the network to a certain extent, because the MAC address of each device is unique and the binding relationship with the IP address is fixed.
[0054] However, with the development of technology, operating systems provide more flexible device attribute modification functions. Users can not only change the IP address and MAC address of the device, but also modify other identification information, such as the device name, operating system version, etc. Although this flexibility provides convenience for legitimate users, it also provides opportunities for illegal users. Illegal users may modify the attribute information of the device, forge or simulate the identity of the legitimate device, thereby bypassing the security measures based on binding authentication and achieving unauthorized or illegal network access.
[0055] In addition, some advanced attackers may even exploit vulnerabilities or backdoors in the operating system to remotely modify device properties, further increasing the insecurity of the network.
[0056] In order to solve the above-mentioned defects existing in the related art, the embodiment of the present application proposes a method for device counterfeit identification, which sends a network detection signal to a potential device, and identifies the surviving device on the network according to the response signal sent by the potential device; generates the original device id of the surviving device on the network based on the IP address or MAC address of the surviving device on the network; builds a device fingerprint library according to the original device id and the attribute data corresponding to the surviving device on the network; if a new device is detected to access the network, obtains the device id of the new device through the IP address or MAC address of the new device; searches and matches in the device fingerprint library according to the device id, and determines whether the new device is a counterfeit device through the matching result. The present application sends a network detection signal to obtain the original device id and corresponding attribute data of the surviving device on the network to build a device fingerprint library, and completes the identity authentication of the new device based on the device fingerprint library, thereby achieving accurate identification of counterfeit devices and enhanced security of network access.
[0057] It should be noted that the execution subject of this embodiment may be a network detection device, or an electronic device capable of realizing the above functions, etc. In order to more clearly explain this technical solution, this application is described with the detection system as the execution subject.
[0058] For ease of understanding, the technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0059] The method for device counterfeit identification in the first embodiment of this application is provided in the following Figure 1 The method comprises steps S10 to S50:
[0060] S10: Sending a network detection signal to a potential device, and identifying a surviving device on the network according to a response signal sent by the potential device.
[0061] In an optional implementation scheme, before sending a network detection signal to a potential device, the network detection parameters are first configured, including determining the target IP address segment for detection, detection frequency, timeout threshold, and number of retries. Through a preset network protocol, one or more IP address ranges are defined as detection targets. These IP address segments can be continuous addresses or scattered addresses. At the same time, the frequency of sending the network detection signal is set. It can be set to a fixed time interval, or dynamically adjusted according to actual needs to adapt to different network conditions and device states. A time threshold is defined to determine the maximum time to wait for a response after the network detection signal is sent. If the time threshold is exceeded, the detection system will consider the corresponding potential device to be unresponsive.
[0062] The detection system uses the preset network protocol to send a network detection signal to the potential device in the preset target IP address segment. The preset network protocol includes Internet Control Message Protocol (ICMP), Address Resolution Protocol (ARP), etc. After the network detection signal is sent, the detection system receives the response signal sent by the potential device in the target IP address segment. The response signal includes ICMP echo reply, ARP response, etc., and records the source IP address and timestamp of the received response signal. Based on the recorded timestamp, analyze and determine whether the potential device is a surviving device on the network.
[0063] It should be noted that the detection frequency refers to the interval time at which the detection system sends network detection signals. This frequency can be fixed or dynamically adjusted according to the real-time status of the network to optimize the detection efficiency and reduce interference to the network.
[0064] It should be noted that the number of retries is the maximum number of times the detection system attempts to detect the same IP address when no response is received or the corresponding time threshold is exceeded. This helps the detection system give more detection opportunities when potential devices may fail to respond in time due to temporary network problems or response delays.
[0065] Exemplarily, the detection system first configures the network detection parameters. The detection system first determines that the target IP address segment to be detected is 192.168.1.0 / 24, sets the detection frequency to send a network detection signal every 5 seconds, sets the timeout threshold to 2 seconds, and sets the number of retries to 3. The detection system uses the ICMP protocol to send a network detection signal to the 192.168.1.0 / 24 address segment.
[0066] The timestamp of the network detection signal is set to 2024-07-18T11:59:59. After sending the network detection signal, the detection system monitors the network and receives the response signal from the 192.168.1.0 / 24 address segment. If the potential device with the IP address 192.168.1.10 is alive on the network, the potential device will send an ICMP echo reply. The detection system records the timestamp of the response signal of 192.168.1.10 as 2024-07-18T12:00:01. Then, the detection system compares the timestamp of the received response signal with the timestamp of the network detection signal, and calculates the response delay to be 2 seconds. Since the response delay is less than or equal to the preset timeout threshold of 2 seconds, the detection system determines that the response signal of 192.168.1.10 is valid and marks the potential device as alive on the network.
[0067] Optionally, if the detection system does not receive a response signal from a potential device, the detection system will resend the network detection signal according to a preset number of retries, which helps ensure that the device status can still be accurately identified in the event of network fluctuations or temporary device unavailability. When the number of times a network detection signal is sent to a potential device reaches a preset number of retries, the detection system will suspend sending network detection signals to the potential device. For potential devices that have reached the preset number of retries and still have not responded, the detection system can set a sending time interval and try to send a network detection signal to the potential device again after the preset sending time interval, and reset the number of network detection signals sent corresponding to the potential device.
[0068] Exemplarily, the network detection parameter configuration of the detection system still sets the timeout threshold to 2 seconds and the number of retries to 3 times. For potential devices that did not respond during the initial detection or potential devices or unidentified devices that exceeded the preset timeout threshold, the detection system will make additional detection attempts. When the detection system receives the timestamp of the response signal from 192.168.1.20 after the initial detection, and calculates that the response delay of the response signal exceeds the preset timeout threshold of 2 seconds, it will resend the network detection signal to 192.168.1.20. In the second detection, 192.168.1.20 sent a response signal within the preset timeout threshold, and the detection system recorded the timestamp of the response signal in the second detection. When the detection system receives a response signal within the preset timeout threshold, the calculation of the number of retries is reset, and the network detection signal continues to be sent according to the detection frequency.
[0069] Exemplarily, the network detection parameter configuration of the detection system still sets the number of retries to 3 times. For potential devices that have not responded after reaching the preset number of retries, the detection system sets the sending time interval to 3 minutes. For a potential device with an IP address of 192.168.1.21, the detection system did not receive a response during the initial detection, and the detection system will continue to send network detection signals according to the preset number of retries. After sending the network detection signal three times in a row, the potential device still does not respond, and the detection system will enter a 3-minute waiting state according to the preset sending time interval. During the waiting period, the detection system will suspend the detection of the potential device until the preset sending time interval is reached, at which time the system will reset the number of detections for the potential device and try to send the network detection signal again.
[0070] If the potential device at 192.168.1.21 still does not respond in three probes after resetting the probe times, the system will continue to wait for the preset sending time interval, then reset the probe times again and resend the network probe signal. This process will continue until the potential device starts to respond. This cyclic detection strategy helps reduce misjudgments caused by transient network problems. At the same time, by reasonably setting the detection sending time interval and retry times, the detection system effectively avoids network congestion caused by frequent detection, ensuring a stable and efficient network environment.
[0071] Optionally, the process of determining whether a potential device is a surviving device on the network involves determining the network status of the potential device. The detection system first compares the timestamp of the response signal received from the potential device with the timestamp of the network detection signal sent, and obtains the response delay by calculating the time difference between the two timestamps. If the response delay is less than or equal to a preset timeout threshold, the detection system will determine that the response signal of the potential device is valid, and mark the potential device corresponding to the response signal as being in a surviving state on the network. If the response delay is greater than the preset timeout threshold, the response signal of the potential device is determined to be invalid, and the potential device corresponding to the response signal is marked as being off-network.
[0072] Optionally, the online status of the corresponding potential device can be determined by the source IP address of the potential device. After sending the network detection signal, the detection system collects the source IP address in the received response signal and compares the source IP address with the preset target IP address segment. The preset target IP address segment can be a list of known surviving devices on the network, or the IP address of surviving devices on the network pre-acquired by other means. If the source IP address exists in the preset target IP address segment, the detection system preliminarily determines that the potential device is in the surviving state on the network. If the source IP address does not exist in the preset target IP address segment, the detection system preliminarily determines that the potential device is an unknown device. At the same time, the timestamp is used as an auxiliary verification method. The detection system will record the timestamp of the response signal and compare it with the preset timeout threshold. If the timestamp of the response signal is within the preset timeout threshold, the detection system finally confirms that the potential device is in the surviving state on the network. If the timestamp of the response signal is not within the preset timeout threshold, the detection system finally determines that the potential device is off-network. In addition, the detection system can set the number of retries. When an unrecognized device is detected for the first time, an additional number of detection attempts are made and the network detection signal is resent. The detection system records the results of each detection, including the source IP address, timestamp and judgment result.
[0073] Exemplarily, the detection system compares the source IP address of 192.168.1.10 with the preset target IP address segment 192.168.1.0 / 24. If 192.168.1.10 is in the preset target IP address segment, the detection system preliminarily determines that the potential device is in a live state. If the response delay of the potential device is within the preset timeout threshold, the detection system finally confirms that the potential device is in a live state.
[0074] S20: Generate an original device ID of the surviving device on the network based on the IP address or MAC address of the surviving device on the network.
[0075] In an optional implementation scheme, the detection system initiates an identification method to the surviving device on the network, and obtains the device fingerprint data such as the IP address, MAC address and attribute data of the surviving device on the network according to the identification method. Before generating the original device ID of the surviving device on the network according to the IP address or MAC address of the surviving device on the network, the detection system first sends an identification request to the surviving device on the network, and the identification request contains at least one of an identification code and a query instruction. Among them, the identification code and the query instruction are predefined and can trigger the surviving device on the network to return its own identification information. When the surviving device on the network receives the identification code and / or the query instruction, it will generate an identification response, which contains the IP address, MAC address and a series of attribute data of the device, which are encapsulated in a response message and sent back to the detection system. The detection system then extracts the IP address, MAC address and attribute data of the surviving device on the network contained in the response message to complete the process of identifying and extracting the device fingerprint data. Among them, the attribute data includes the type, brand, model, major version of the operating system, minor version of the operating system, hardware configuration, open port information, etc. of the device.
[0076] It can be understood that the response message is a data packet containing all identification information returned by the network surviving device when responding to the detection request. The detection system completes the identification and data extraction of the network surviving device by parsing the response message, and obtains the IP address, MAC address and attribute data of the network surviving device.
[0077] It should be noted that the detection system can use a variety of identification methods to obtain the attribute data of the surviving devices on the network. The identification methods include Banner capture, traffic data, Simple Network Management Protocol (SNMP), vendor private protocols, Windows identification protocols, port scanning, etc. The detection system uses these identification methods in combination to extract the type, brand, model, operating system major version, operating system minor version and other attribute data of the surviving devices on the network from the response message.
[0078] The identification method of Banner Capture is to extract the service identification information by sending a request to a surviving device on the network and receiving its response. The identification information usually includes the service name, version number, operating system, etc., which can provide preliminary information for identifying the device type and version.
[0079] Traffic data is obtained by analyzing data packets transmitted in the network to identify the behavior patterns of devices and the types of protocols used to understand the functions and purposes of the devices.
[0080] The SNMP protocol can obtain detailed information about a device, such as the operating system version and hardware configuration, by querying the device's Management Information Base (MIB).
[0081] The manufacturer's private protocol is a specific protocol provided by the device manufacturer to allow external systems to query the status and configuration of the device. Using this protocol, you can obtain more detailed device information, including the brand, model, and specific configuration of the device.
[0082] Windows identification protocols such as Windows Management Instrumentation (WMI) are specifically used to identify devices running Windows operating systems. Through this protocol, information such as the operating system version, patch level, and system configuration can be extracted, which helps to identify and manage Windows devices.
[0083] Port scanning is a method of identifying the services and applications running on a device by scanning its open ports. By analyzing the responses of open ports and related services, the network functions and services of the device can be identified, thereby obtaining the network properties of the device.
[0084] Optionally, the detection system further processes the identification information of the surviving device on the network to generate the original device ID of the surviving device on the network. The detection system uses a hash algorithm to encode the IP address or MAC address of the surviving device on the network to generate a unique original device ID of the surviving device on the network. The encoding process first converts the IP address or MAC address into a string format, and then inputs the string into the hash algorithm for processing. The hash algorithm will output a fixed-length hash value, which is the original device ID.
[0085] S30: constructing a device fingerprint library according to the original device ID and the attribute data corresponding to the surviving devices on the network.
[0086] In an optional implementation scheme, the detection system further processes the identification information of the surviving device on the network. First, the IP address or MAC address of the surviving device on the network is encoded using a hash algorithm to generate an original device ID. After the original device ID is generated, the detection system associates the original device ID with the corresponding attribute data obtained through the identification method to ensure that each attribute data corresponds to the original device ID and the identification method used to obtain the attribute data. For example, for the same surviving device on the network, the attribute data identified by SNMP identification means include the operating system version and hardware configuration; the attribute data identified by port scanning identification means may include open ports and service information. The detection system stores the associated original device ID, attribute data, and identification means in the database to build a device fingerprint library. Please refer to Figure 2 ,The storage structure of the device fingerprint library in the data is as follows: Figure 2 As can be seen from the figure, since there are multiple identification methods, the same device ID may have multiple data, each of which corresponds to an identification method and the corresponding attribute data obtained through the identification method.
[0087] S40: If it is detected that a new device is connected to the network, a new device ID of the new device is obtained through the IP address or MAC address of the new device.
[0088] Specifically, the detection system continuously monitors the network status in order to promptly detect any new devices that are connected to the network. The detection system monitors the network status by usually listening to data packets on the network, especially data packets that indicate that the new device is trying to communicate with other devices in the network. Once the detection system detects data packets in this situation, it triggers the identification process of the new device.
[0089] When a new device is detected to be connected to the network, the detection system will extract the IP address or MAC address of the new device contained in the header information of the data packet. Then, the detection system will use the same hash algorithm processing process as step S20 to convert the IP address or MAC address of the new device into a string format, and then use the hash algorithm to process the string, output a fixed-length hash value, and obtain the new device ID of the new device.
[0090] S50: searching and matching the new device in the device fingerprint database according to the new device ID, and judging whether the new device is a counterfeit device based on the matching result.
[0091] It is understandable that the device IP address, MAC address and device-related attribute data can all be referred to as the device fingerprint data of the device.
[0092] In an optional implementation, the detection system identifies and verifies new devices that access the network to determine whether the new device is a counterfeit device. When a new device accesses the network, the new device ID of the new device is obtained according to the IP address or MAC address of the new device, and the new device ID is used as a search condition to search for device fingerprint data with the same device ID as the new device in the device fingerprint library.
[0093] If the identification means in the device fingerprint data of the identified new device does not exist in the device fingerprint database, the detection system will directly determine that the new device is a counterfeit device.
[0094] When the new device ID in the new device fingerprint data exists in the device fingerprint library, the detection system compares the attribute data of the new device with the attribute data of the same device ID in the device fingerprint library. If the attribute data of the new device does not match the attribute data in the device fingerprint library, the detection system determines that the new device is a counterfeit device.
[0095] Optionally, if the attribute data of the new device does not match the attribute data in the device fingerprint library, the step of determining that the new device is a counterfeit device may be specifically divided into three situations.
[0096] If the attribute data in the device fingerprint library is a non-null value, and the corresponding attribute data of the new device is missing or null, this may mean that an omission occurred when scanning the attribute data of the new device, resulting in the corresponding attribute data of the new device being missing or null. Therefore, in this case, the detection system determines that the new device is a non-counterfeit device.
[0097] If the attribute data in the device fingerprint library is a non-null value, and the corresponding attribute data of the new device is another different non-null value, this indicates that for the same device, the attribute data of the device has changed. Therefore, the detection system determines that the new device is a counterfeit device, indicating that the device may have been replaced or tampered with, and a security check is required.
[0098] If the attribute data in the device fingerprint library is missing or null, and the corresponding attribute data of the new device is non-null, it means that the attribute data of the new device is inconsistent with the attribute data in the device fingerprint library. Since the device fingerprint data in the device fingerprint library is identified and extracted after multiple rounds of scanning, there will be no situation where the attribute data is missing or null due to missed scanning. Therefore, in this case, the detection system determines that the new device is a counterfeit device.
[0099] For example, the device fingerprint library contains the same original device ID as the new device ID, so the device fingerprint data with the same device ID can be compared, where 0 represents that the data is empty, and A and B represent data that actually exists and is different non-empty value data. The comparison results are as follows:
[0100] When the attribute data in the device fingerprint library is A and the corresponding attribute data of the new device is 0, the new device is determined to be a non-counterfeit device;
[0101] When the attribute data in the device fingerprint library is A and the corresponding attribute data of the new device is B, the new device is determined to be a counterfeit device;
[0102] When the attribute data in the device fingerprint library is 0 and the corresponding attribute data of the new device is A, the new device is determined to be a counterfeit device.
[0103] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 After the step of marking the potential device corresponding to the response signal as being in a network survival state, the following steps S60 to S110 are also included:
[0104] S60: When it is determined for the first time that the potential device is in the network survival state, a timestamp of the first receipt of a valid response signal from the potential device is recorded, and the network survival time of the potential device is initialized.
[0105] It should be noted that the timestamp records the specific date and time when the network event occurs. The timestamp provides a reference point for the detection system to calculate the total survival time of the potential device from the beginning of responding to the network detection signal to the current moment. When the detection system receives a valid response signal from a potential device, the detection system will record the timestamp of the first time the potential device sent a valid response signal. This timestamp represents the exact moment when the potential device was first identified by the detection system as being in a network survival state. At the same time, the detection system will initialize a timer or counter to track and record the network survival time of the potential device in the network survival state from the first response to the network detection signal to the current moment, that is, the network survival time of the potential device is calculated from the timestamp of the first receipt of the valid response signal.
[0106] S70: Continuously monitor and record the timestamps of all valid response signals received from the potential devices.
[0107] It should be noted that the detection system monitors potential devices in the network by sending network detection signals. When a potential device responds to the network detection signal, the detection system receives the response signal and records the timestamp of the response signal corresponding to the potential device. The timestamp represents the specific moment when the potential device responds to the network detection signal. The detection system will continuously monitor and record the timestamps of all response signals continuously returned by each potential device at the detection frequency, and continuously update and record new timestamps during subsequent detection processes.
[0108] S80: Accumulate the time difference between the timestamp of the current valid response signal and the timestamp of the last consecutive valid response signal into the network survival time.
[0109] It should be noted that after the detection system determines that the potential device is in an online survival state, it will continue to record the timestamps of all valid response signals corresponding to the potential device in the online survival state. Subsequently, the detection system calculates the time difference between the timestamp of the current valid response signal and the timestamp of the last consecutive valid response signal of the potential device based on the detection frequency. The time difference represents the continuous online duration of the potential device between two consecutive valid response signals. Then, the detection system accumulates the time difference into the online survival time of the potential device to update the online survival time of the potential device.
[0110] It is understandable that when the potential device is in the network survival state, all response signals recorded by the detection system according to the detection frequency are valid response signals.
[0111] S90: When the potential device changes to an off-network state, the on-network survival time is accumulated until the timestamp of the last time a valid response signal is received in the on-network survival state.
[0112] It should be noted that the detection system will continue to monitor the changes in the online status of the potential device to determine whether the potential device is still in the online survival state. When the detection system determines that the potential device has changed from the online survival state to the offline state, although the detection system continues to record the timestamp of the response signal returned by the potential device, it has stopped accumulating the online survival time of the potential device. The online survival time of the potential device is accumulated up to the timestamp of the last receipt of a valid response signal in the online survival state. That is, after the potential device changes to the offline state, the detection system will no longer update the online survival time of the potential device.
[0113] It is understandable that when the potential device is first determined to be in the network alive state, there is no consecutive timestamp of the last valid response signal before the first valid response signal for calculating the time difference. Therefore, the detection system needs to wait for receiving the second valid response signal returned by the potential device in the network alive state before starting to accumulate the time difference.
[0114] S100: When the potential device changes from an off-network state to an on-network survival state again, jump to execute the step of accumulating the time difference between the timestamp of the current valid response signal and the timestamp of the last consecutive valid response signal into the on-network survival time, and continue to accumulate based on the existing on-network survival time.
[0115] It should be noted that when the detection system determines that the potential device has changed from an off-network state to an on-network survival state, the detection system records the timestamp of the first valid response signal when the potential device is back on-network survival state. Then, the detection system will jump to execute step S80, that is, calculate the time difference between the timestamp of the current valid response signal and the timestamp of the last consecutive valid response signal, and accumulate it into the on-network survival time of the potential device. This operation continues to accumulate on the basis of the existing on-network survival time of the potential device, ensuring that the time difference that was suspended when the potential device was off-network can continue to accumulate when it is back online, thereby accurately recording the on-network survival time of the potential device after reconnecting to the network.
[0116] It is understandable that, since the potential device changes back to the online survival state, there may be no consecutive timestamp of the last valid response signal before the first valid response signal in the online survival state after the change to be used to calculate the time difference. At this time, the detection system needs to wait for the second valid response signal of the potential device in the online survival state before starting to accumulate the time difference.
[0117] S110: When the accumulated network survival time reaches or exceeds a preset survival time threshold, the potential device is determined as a network surviving device.
[0118] It should be noted that the detection system determines whether a potential device is a live device based on the accumulated live time of the potential device. When the accumulated live time of the potential device reaches or exceeds the preset live time threshold, the detection system will confirm that the potential device is a live device.
[0119] For example, to help understand the implementation process of determining a surviving device in the method for identifying counterfeit devices in this embodiment, please refer to Figure 4 , Figure 4 A flowchart for determining surviving devices on the network is provided.
[0120] The detection system first sends a network detection signal to the potential device, and then waits for and receives a response signal from the potential device. When the response delay of the response signal is less than or equal to the preset timeout threshold, the detection system considers that the potential device is in the network survival state, and records the timestamp of the first received valid response signal, and starts to initialize and track the network survival time of the potential device. In the following monitoring, the detection system will continue to record the timestamps of all valid response signals returned from the potential devices in the network survival state according to the preset detection frequency, and accumulate the time difference between the timestamp of the current valid response signal and the timestamp of the last consecutive valid response signal into the network survival time, so as to update the network survival time of the potential device. If the detection system detects that the potential device changes from the network survival state to the off-network state, it will stop accumulating the network survival time, and when the device becomes the network survival state again, the detection system will re-record the first timestamp and continue to accumulate the network survival time based on the original network survival time. Finally, when the accumulated network survival time reaches or exceeds the preset survival time threshold, the detection system will confirm that the potential device is a network survival device and complete the determination process of the network survival device.
[0121] The present application provides a device for counterfeit identification of a device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for counterfeit identification of a device in the first embodiment above.
[0122] Reference below Figure 5 , which shows a schematic diagram of the structure of a device counterfeit identification device suitable for implementing the embodiment of the present application. The device counterfeit identification device in the embodiment of the present application may include but is not limited to network element devices such as switches, routers, etc. Figure 5 The device counterfeit identification device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0123] like Figure 5As shown, the device counterfeit identification device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the device counterfeit identification device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the device counterfeit identification device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a device counterfeit identification device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0124] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0125] The device counterfeit identification device provided by the present application adopts the device counterfeit identification device method in the above embodiment, which can solve the technical problem that illegal users circumvent network security measures by modifying device attribute information to achieve unauthorized or illegal network access. Compared with the prior art, the beneficial effects of the device counterfeit identification device provided by the present application are the same as the beneficial effects of the device counterfeit identification method provided by the above embodiment, and other technical features in the counterfeit identification device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0126] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0127] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0128] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the device counterfeit identification method in the above-mentioned embodiment.
[0129] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0130] The computer-readable storage medium may be included in the device counterfeit identification device; or may exist independently without being assembled into the device counterfeit identification device.
[0131] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the device counterfeit identification device, the device counterfeit identification device: sends a network detection signal to a potential device, and identifies a surviving device on the network according to a response signal sent by the potential device; generates an original device ID of the surviving device on the network based on the IP address or MAC address of the surviving device on the network; builds a device fingerprint library according to the original device ID and the attribute data corresponding to the surviving device on the network; if a new device is detected to be connected to the network, obtains a new device ID of the new device through the IP address or MAC address of the new device; searches and matches in the device fingerprint library according to the new device ID, and determines whether the new device is a counterfeit device through the matching result.
[0132] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0133] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0134] The modules involved in the embodiments described in the present application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0135] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned device counterfeit identification method, and can solve the technical problem that illegal users circumvent network security measures by modifying device attribute information to achieve unauthorized or illegal network access. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the device counterfeit identification method provided by the above-mentioned embodiment, and will not be repeated here.
[0136] An embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the method for identifying counterfeit devices as described above when the computer program is executed by a processor.
[0137] The computer program product provided by the present application can solve the technical problem that illegal users can circumvent network security measures by modifying device attribute information to achieve unauthorized or illegal network access. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as the beneficial effects of the device counterfeit identification method provided by the above embodiment, which will not be repeated here.
[0138] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
[0139] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0140] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.
[0141] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for identifying counterfeit equipment, It is characterized in that The method includes: Sending a network detection signal to a potential device, and identifying a surviving device on the network according to a response signal sent by the potential device; Generate an original device ID of the surviving device on the network based on the IP address or MAC address of the surviving device on the network; Construct a device fingerprint library according to the original device ID and the attribute data corresponding to the surviving device on the network; If a new device is detected to be connected to the network, a new device ID of the new device is obtained through the IP address or MAC address of the new device; Search and match the new device in the device fingerprint database according to the new device ID, and determine whether the new device is a counterfeit device based on the matching result; The step of sending a network detection signal to a potential device and identifying a surviving device on the network according to a response signal sent by the potential device comprises: Configure network detection parameters to determine the target IP address segment, detection frequency, timeout threshold, and number of retries; Using a preset network protocol to send a network detection signal to potential devices in the target IP address segment; Receiving a response signal returned by the network detection signal, and recording a timestamp of the response signal; Based on the timestamp, determining whether the potential device is a surviving device on the network; The step of determining whether the potential device is a surviving device on the network based on the timestamp comprises: Compare the timestamp of the received response signal with the timestamp of the sent network detection signal to calculate the response delay; When the response delay is less than or equal to a preset timeout threshold, determining that the corresponding response signal is valid, and marking the potential device corresponding to the response signal as being in a network survival state; When the response signal is not received or the response delay is greater than a preset timeout threshold, determining that the corresponding response signal is invalid, and marking the potential device corresponding to the response signal as being in an off-grid state; When the response delay is less than or equal to a preset timeout threshold, determining that the corresponding response signal is valid and marking the potential device corresponding to the response signal as being in a network survival state comprises: When it is determined for the first time that the potential device is in a network survival state, recording a timestamp of the first receipt of a valid response signal from the potential device, and initializing the network survival time of the potential device; Continuously monitoring and recording the timestamps of all valid response signals received from the potential device; Accumulate the time difference between the timestamp of the current valid response signal and the timestamp of the last consecutive valid response signal into the network survival time; When the potential device changes to an off-network state, the on-network survival time is accumulated up to the timestamp of the last time a valid response signal is received in the on-network survival state; When the potential device changes from an off-network state to an on-network survival state, jump to the step of accumulating the time difference between the timestamp of the current valid response signal and the timestamp of the last consecutive valid response signal into the on-network survival time, and continue to accumulate based on the existing on-network survival time; When the accumulated network survival time reaches or exceeds a preset survival time threshold, the potential device is determined as a network surviving device.
2. The method according to claim 1, It is characterized in that Before the step of generating the original device ID of the surviving device on the network based on the IP address or MAC address of the surviving device on the network, the method includes: Sending an identification request to the surviving device on the network, wherein the identification request includes at least one of an identification code and a query instruction; When the surviving device on the network receives the identification code or the query instruction, it generates an identification response including the device fingerprint data; Encapsulating the device fingerprint data in the identification response into a response message, and returning it to the requester; The device fingerprint data contained in the response message is extracted, wherein the device fingerprint data includes the IP address, MAC address and attribute data of the surviving device on the network.
3. The method according to claim 1, It is characterized in that The step of constructing a device fingerprint library according to the original device ID and the attribute data corresponding to the surviving device on the network comprises: Encode the IP address or MAC address of the surviving device on the network by using a hash algorithm to generate an original device ID of the surviving device on the network; Associating the original device id with corresponding attribute data obtained by the identification means, ensuring that the attribute data corresponds to the original device id and the identification means used to obtain the attribute data; A device fingerprint library is constructed according to the original device ID, the attribute data, and the identification means used to obtain the attribute data.
4. The method according to claim 1, It is characterized in that The step of searching and matching in the device fingerprint database according to the new device ID and determining whether the new device is a counterfeit device according to the matching result includes: Using the new device ID as a search condition, searching the device fingerprint data identical to the new device ID in the device fingerprint library; If the identification means of the new device does not exist in the device fingerprint library, the new device is determined to be a counterfeit device; When the new device ID of the new device exists in the device fingerprint library, the attribute data of the new device is compared with the attribute data of the same device ID in the device fingerprint library. If the attribute data of the new device does not match the attribute data in the device fingerprint library, the new device is determined to be a counterfeit device.
5. The method according to claim 4, It is characterized in that If the attribute data of the new device does not match the attribute data in the device fingerprint library, the step of determining that the new device is a counterfeit device includes: If the attribute data in the device fingerprint library is a non-null value, and the corresponding attribute data of the new device is another different non-null value, then the new device is determined to be a counterfeit device; If the attribute data in the device fingerprint library is missing or has a null value, and the corresponding attribute data of the new device has a non-null value, then the new device is determined to be a counterfeit device.
6. The method according to claim 4, It is characterized in that The step of comparing the attribute data of the new device with the attribute data of the same device ID in the device fingerprint library when the new device ID of the new device exists in the device fingerprint library also includes: If the attribute data in the device fingerprint library is a non-null value and the corresponding attribute data of the new device is missing or a null value, it is determined that the new device is a non-counterfeit device.
7. A device for identifying counterfeit equipment, It is characterized in that The device comprises: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for device counterfeit identification according to any one of claims 1 to 6.
8. A computer storage medium, It is characterized in that The computer storage medium is a computer-readable storage medium, and a computer program is stored on the computer storage medium. When the computer program is executed by a processor, the steps of the device counterfeit identification method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and system for preventing equipment from being illegally used
CN112491888A
