Local area network access asset scanning risk checking method
Through distributed or parallel scanning technology and intelligent network security detection terminals, the problems of inefficient and complex reporting of existing asset scanning tools are solved, and network security is quickly identified and network equipment is improved and security response efficiency is improved.
Patent Information
- Application Number
- CN202411006959.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-12
AI Technical Summary
Existing asset scanning and risk investigation tools are inefficient, have long scanning time and complex reporting, resulting in management difficulties and high resource utilization, and are unable to respond quickly to cyber threats.
Using distributed or parallel scanning technology, the intelligent network security detection terminal uses Nmap tools to scan TCP SYN and UDP, record the device IP, MAC address and operating system information, establish a database, use the MAC address to determine the device brand, and index it through the database. Improve query efficiency.
It achieves a fast and comprehensive understanding of network equipment, improves network management and security response efficiency, reduces manual intervention and error rates, and enhances network security.
Abstract
Description
Technical Field
[0001] The present invention is applicable to the technical field of asset scanning risk screening, and provides a method for screening risks of asset scanning accessed through a local area network. Background Art
[0002] In today's highly developed information technology environment, the number of enterprise LAN network assets is huge and diverse, including but not limited to servers, workstations, network equipment, etc. These assets are not only the basis for the normal operation of the enterprise, but also an important part of network security. However, as network attacks become increasingly complex and prevalent, the network security threats faced by enterprises are becoming increasingly severe. In order to effectively prevent and reduce the losses caused by these threats, it is particularly important to conduct regular risk inspections and security scans on all assets in the enterprise LAN.
[0003] Currently, most enterprises use automated methods based on network scanners and security tools to perform asset scanning and risk investigation. These tools can perform comprehensive port scanning, service identification, vulnerability detection and other operations on various assets in the enterprise LAN, and generate detailed security reports by analyzing the scanning results. These reports can help security administrators quickly locate and prioritize risky assets, thereby effectively protecting the enterprise network from potential attacks and threats.
[0004] However, although existing asset scanning and risk investigation tools can realize automated operations and generate detailed reports, there are still some significant limitations. First, some scanning tools are not efficient and may take a long time to complete the scan of the entire network, which leads to a long time of network resource occupation and management difficulties. Second, the reports generated by existing tools are often too large and complex, and security administrators need to spend a lot of time and energy to parse and understand the information in the reports, which is obviously not conducive to taking quick countermeasures. Summary of the invention
[0005] In view of the above-mentioned defects, the purpose of the present invention is to provide a method for scanning risk screening of local area network access assets, which aims to solve the problems raised in the background technology, and includes the following steps:
[0006] Step 1: Accept the asset scanning task;
[0007] Step 2: Take a single IP, and use distributed scanning or parallel scanning to scan and obtain multiple IPs at the same time;
[0008] Step 3: Scan the IP address.
[0009] Step 4. If the device exists, record the device IP and MAC address and operating system information;
[0010] Step 5: Determine the device brand based on the MAC address;
[0011] Step 6: Record the scanned device information and create a database of the device information;
[0012] Step 7: Determine whether it is the last IP set; if not, add one to the IP; if yes, display the data in the database.
[0013] Furthermore, the specific steps of accepting the asset scanning task in step 1 are:
[0014] 1.1. The terminal equipment administrator shall set the task name before scanning;
[0015] 1.2. The Nmap network scanning tool inside the intelligent network security detection terminal determines the target area group IP range through the network topology map and network configuration file.
[0016] Furthermore, in step 1.2, the IP address range can be manually determined by manually consulting a network device configuration document or a network topology diagram using an intelligent network security detection terminal.
[0017] Furthermore, the sending of the IP scanning request in step 3 includes the following two methods:
[0018] Use TCP SYN scanning: By sending TCP SYN packets to each port of the target host, it detects whether the target host is online and responding, and identifies its open ports.
[0019] Use UDP scanning: Scan using ICMP port unreachable messages. When a UDP port receives a UDP datagram: if it is closed, send an ICMP port unreachable datagram back to the requester; if it is open, ignore the datagram and do not return any information.
[0020] Furthermore, in step three, multiple IP addresses are scanned simultaneously through multi-threading or asynchronous operation by using concurrent scanning.
[0021] Furthermore, the specific steps of recording the device IP, MAC address and operating system information in step 4 are as follows:
[0022] 4.1. Collect information;
[0023] Obtain and record the IP address information of this log through the returned server log, collect the MAC address through ARP cache, and obtain the operating system information through the operating system feature recognition and SNMP protocol;
[0024] 4.2、Format data;
[0025] The collected information is organized into a unified JSON data format (JavaScript Object Notation).
[0026] 4.3、Store data;
[0027] Establish a relational database, which contains a database table to store device information, where the database table contains fields such as device ID, IP address, MAC address, operating system information, etc. In the database table, add indexes for each IP according to query requirements to improve query efficiency, such as querying by IP address or operating system type.
[0028] Furthermore, the implementation method of determining the device brand according to the MAC address in step 5 is as follows:
[0029] 5.1、MAC address prefix lookup: Determine the manufacturer of the device based on the OUI part of the MAC address;
[0030] 5.2. Device feature identification: Identification through the device’s unique network behavior, response mode or operating system identification;
[0031] 5.3. Mark unknown or generic devices: When a MAC address cannot be matched in the database, it is marked as an unknown device or a generic device.
[0032] Furthermore, the processing and feedback method of the unknown or common device is specifically as follows:
[0033] 5.3.1. Locate unknown or common devices to the corresponding database table for device marking and add them to the abnormal items to be processed as abnormal devices;
[0034] 5.3.2. Upload in the regularly updated database of MAC address database;
[0035] 5.3.3. The administrator manually adds or edits device information.
[0036] Furthermore, in step 6, detailed information of each device scanned is recorded and integrated into the device information database.
[0037] The device information database is imported into the relational database in step 4, and the device brand information determined by the MAC address in step 5 is included to create an IP device list stored in the device information database; the IP device list includes: device ID, IP address, MAC address, operating system information, device brand, and last updated time; the IP device list creates an index based on the MAC address and device brand fields.
[0038] Therefore, the beneficial effects of this solution are as follows:
[0039] 1. Through network device discovery and port scanning, you can gain a comprehensive understanding of the devices in the network, including their IP addresses, open services, and ports.
[0040] 2. Through operating system identification and device brand identification, the operating system type, brand and manufacturer of the device can be accurately identified, which will help further network optimization and security management.
[0041] 3. Store all equipment information in the database to facilitate unified management and query, and improve management efficiency and accuracy.
[0042] 4. Through optimized database indexing, device information queries and updates can be responded to quickly, improving the efficiency of network maintenance and security response.
[0043] 5. By combining multiple steps such as device discovery, port scanning, operating system identification and device brand identification, comprehensive management and identification of devices in the network are achieved, ensuring the integrity and accuracy of network information.
[0044] 6. The use of automated tools and database storage enables efficient collection, storage and query of equipment information, reducing manual intervention and error rates.
[0045] 7. Through device brand identification and unknown device processing, network security is enhanced and the potential risks of unknown devices to the network are reduced. DETAILED DESCRIPTION
[0046] The technical solutions in the embodiments of the present invention will be clearly and completely described below in combination with the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0047] In order to make the purpose, technical solution and advantages of the present invention more clear, the present invention is further described in detail below. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0048] The purpose of the present invention is to provide a method for scanning and risk screening of LAN access assets. The execution carrier of the risk screening program uses an intelligent network security detection terminal. The intelligent network security detection terminal adopts the video network security detection platform developed by the applicant, model Discern-D6000, which is managed based on WEB. As a security supervision and inspection tool for video surveillance systems, it can quickly survey assets, accurately locate risk hazards, respond to notifications in a timely manner, and promote rectification. As a video network security management and monitoring platform, it helps users manage video network assets in combination with security incidents, evaluate the impact of vulnerabilities, and quickly deal with them, forming a closed loop of security management.
[0049] The LAN access asset scanning risk investigation method includes the following steps:
[0050] Step 1: Accept the asset scanning task;
[0051] In this step, first determine the task name of the scan and the target zone group IP range of the scan. The task name is usually a unique identifier used to identify and record the scanning activity, while the zone group IP range specifies the range of IP addresses that the scanner will detect. This range is usually a subnet or a group of consecutive IP addresses to ensure that all possible devices and systems can be scanned.
[0052] The specific steps for accepting an asset scanning task are as follows:
[0053] 1.1. Determine the task name
[0054] The task name is set by the terminal device administrator before the scan. The task can be named based on the project name, scan type (such as network asset scan), scan date or other identifiers.
[0055] 1.2. Determine the target area group IP range:
[0056] The intelligent network security detection terminal determines the target area group IP range through the network topology map and network configuration file.
[0057] The Nmap network scanning tool inside the intelligent network security detection terminal can quickly determine the target area group IP range by entering the starting IP address and the ending IP address. The intelligent network security detection terminal has an easy-to-operate interface and command line options that enable administrators to easily define the target range of the scan.
[0058] At the same time, the IP address range can be manually determined by manually consulting the network device configuration document or network topology diagram using an intelligent network security detection terminal, and then scanning these ranges.
[0059] Step 2: Get a single IP, or use distributed scanning or parallel scanning to scan and obtain multiple IPs at the same time;
[0060] The simultaneous scanning mode uses a comprehensive port scan: the terminal attempts to connect to all ports of the target host for a more detailed IP acquisition scan.
[0061] Acquire multiple IP addresses simultaneously through distributed scanning: This process is implemented through multi-threading or asynchronous IO operations to improve scanning speed and efficiency.
[0062] Acquire multiple IP addresses simultaneously through parallel scanning: In a large-scale network environment, multiple intelligent network security detection terminals can be used to perform scanning tasks simultaneously, each processing a different IP address range, and then aggregating the results.
[0063] Step 3: Scan the IP address.
[0064] Request each individual IP address. This step sends a request to the target IP address in order to obtain detailed information about the device associated with the IP address. Scanning includes the following two methods:
[0065] Use TCP SYN scanning: By sending TCP SYN packets (Synchronize Sequence Numbers) to each port of the target host, detect whether the target host is online and responding, and identify open ports. Use this method to establish a TCP network connection between the host to be tested and the terminal. The terminal sends a SYN message, the host server to be tested responds with SYN+ACK, and finally the terminal responds with an ACK message to complete the IP scan request.
[0066] Use UDP scanning: Use ICMP (Internet Control Message Protocol) port unreachable messages for scanning. The principle is that when a UDP port (Open Systems Interconnection) receives a UDP datagram: if it is closed, it will send an ICMP port unreachable datagram back to the requesting end; if it is open, it will ignore the datagram, that is, discard it without returning any information. This method can allow datagrams to be sent at the same time, specifying the data to be sent, the source port and the destination port and the address. The ICMP message format makes each ICMP message contain the complete IP header of the data packet that triggers this ICMP message, and the ICMP message is encapsulated inside the IP data packet as the data part of the IP data packet.
[0067] At the same time, by using concurrent scanning: Nmap can scan multiple IP addresses at the same time through multi-threading or asynchronous operation. This improves scanning efficiency when scanning within a large range of IP addresses.
[0068] Step 4. If the device exists, record the device IP, MAC address and operating system information;
[0069] Once the scanned IP address does have an associated device, the IP address, MAC address and operating system information of the device will be recorded. The IP address is the location identifier of the device in the network, the MAC address is the physical address of the device, and the operating system information refers to the detailed information such as the type and version of the operating system running on the device. The specific process is:
[0070] 4.1. Collecting Information
[0071] Obtain and record the IP address information of this log through the returned server log, collect the MAC address through ARP cache, and obtain the operating system information through the operating system feature recognition and SNMP protocol;
[0072] 4.2 Formatting Data
[0073] The collected information is organized into a unified JSON data format (JavaScript Object Notation).
[0074] 4.3 Storing Data
[0075] Establish a relational database, which contains a database table to store device information, where the database table contains fields such as device ID, IP address, MAC address, operating system information, etc. In the database table, add indexes for each IP according to query requirements to improve query efficiency, such as querying by IP address or operating system type.
[0076] This method is suitable for scenarios that require complex queries. It uses the database tables and associations in the above steps to store device information, which has high data consistency. At the same time, organizing the information into a unified JSON data format can meet the needs of processing large amounts of unstructured data or data management scenarios that require horizontal expansion; it can store flexible document structures, which is suitable for storing changes and expansions in device information.
[0077] Step 5: Determine the device brand based on the MAC address;
[0078] Identify the brand of the device through the MAC address. The MAC address can usually indicate the information of the device manufacturer, which helps to further analyze and evaluate the device type and its potential security risks. The implementation method of determining the device brand based on the MAC address is as follows:
[0079] 5.1、MAC address prefix lookup: Determine the manufacturer of the device based on the OUI part of the MAC address. The OUI part of the MAC address can be queried through a public MAC address database (such as the IEEE MA-L list) as the prefix of the MAC address to determine the device brand and manufacturer.
[0080] 5.2. Device feature identification: Identify the device through its unique network behavior, response mode or operating system identification. Used in conjunction with MAC address prefix lookup to improve accuracy.
[0081] 5.3. Mark unknown or generic devices: When a MAC address cannot be matched in the database, it will be marked as an unknown device or generic device for further management or investigation.
[0082] Handling and feedback of unknown or generic devices:
[0083] 5.3.1. Locate unknown or common devices to the corresponding database table for device marking and add them to the abnormal items to be processed as abnormal devices.
[0084] 5.3.2. Upload in the regular update database of MAC address database: New devices are constantly introduced into the market, so the database needs to be updated regularly to cover new MAC addresses and brands, ensuring regular feedback to update the MAC address database.
[0085] 5.3.3. The administrator manually adds or edits device information; this method is suitable for some special devices that have not been widely recognized or newly released devices.
[0086] Step 6: Record the scanned device information and create a database of the device information;
[0087] The detailed information of each scanned device is recorded and integrated into the device information database. This database is used to store and manage the information of all scanned devices, including IP address, MAC address, operating system, device brand, etc., for subsequent analysis and management.
[0088] Specifically, the device information database is imported into the relational database in step 4, and the device brand information determined according to the MAC address in step 5 is included to make an IP device list and store it in the device information database.
[0089] The IP device list includes: Device ID: unique identifier (primary key). IP address: stores the IP address of the device. MAC address: stores the MAC address of the device. Operating system information: stores the operating system information of the device. Device brand: stores the device brand identified by the MAC address. Last updated: records the timestamp of the last update of the device information.
[0090] The IP device list creates indexes based on the MAC address and device brand fields to quickly query and identify devices. The MAC address index can accelerate queries based on the MAC address; the device brand index can be used to count or manage device brands.
[0091] Step 7: Determine whether it is the last IP set; if not, add one to the IP; if yes, display the data in the database;
[0092] Check whether the currently processed IP address is the last one in the set IP range. If it is not the last IP, continue to process the next IP address (usually increase the current IP address by one). Once the scan is completed for all IP addresses in the set range, all data stored in the database can be displayed or reported for further security assessment or management decision-making.
[0093] In summary, this method can be used to detect devices and their IP addresses in the local area network by using a network scanning tool, and perform port scanning on the discovered devices to understand the services and ports opened by the devices. By analyzing network traffic or system response, the operating system type and version of the device are identified, and the IP address, MAC address, operating system information, etc. of the device are stored in the database. Then, based on the MAC address of the device, the MAC address database is queried to determine the device brand and manufacturer. In the process, unrecognizable devices are processed and marked as unknown devices or generic devices. And indexes are created in the database table to speed up the query and management of device information.
[0094] Of course, the present invention may have many other embodiments. Without departing from the spirit and essence of the present invention, technicians familiar with the field may make various corresponding changes and modifications based on the present invention, but these corresponding changes and modifications should all fall within the scope of protection of the claims attached to the present invention.
Claims
1. A method for scanning risk investigation of assets accessed by a local area network, characterized in that: The following steps are involved: Step 1: Accept the asset scanning task; Step 2: Take a single IP, and use distributed scanning or parallel scanning to scan and obtain multiple IPs at the same time; Step 3: Scan the IP address. Step 4. If the device exists, record the device IP and MAC address and operating system information; Step 5: Determine the device brand based on the MAC address; Step 6: Record the scanned device information and create a database of the device information; Step 7: Determine whether it is the last IP set; if not, add one to the IP; If yes, display the data in the database.
2. The LAN access asset scanning risk screening method according to claim 1 is characterized in that: The specific steps for accepting the asset scanning task in step 1 are: 1.
1. The terminal equipment administrator shall set the task name before scanning; 1.
2. The Nmap network scanning tool inside the intelligent network security detection terminal determines the target area group IP range through the network topology map and network configuration file.
3. The LAN access asset scanning risk screening method according to claim 2 is characterized in that: In step 1.2, the IP address range can be manually determined by manually consulting the network device configuration document or the network topology diagram using an intelligent network security detection terminal.
4. The LAN access asset scanning risk screening method according to claim 1 is characterized in that: The sending of the IP scanning request in step 3 includes the following two methods: Use TCP SYN scanning: By sending TCP SYN packets to each port of the target host, it detects whether the target host is online and responding, and identifies its open ports. Use UDP scanning: Scan using ICMP port unreachable messages. When a UDP port receives a UDP datagram: if it is closed, send an ICMP port unreachable datagram back to the requester; if it is open, ignore the datagram and do not return any information.
5. The LAN access asset scanning risk screening method according to claim 4 is characterized in that: In step three, by using concurrent scanning, multiple IP addresses are scanned simultaneously through multi-threading or asynchronous operation.
6. The LAN access asset scanning risk screening method according to claim 1 is characterized in that: The specific steps for recording the device IP, MAC address and operating system information in step 4 are as follows: 4.
1. Collect information; Obtain and record the IP address information of this log through the returned server log, collect the MAC address through ARP cache, and obtain the operating system information through the operating system feature recognition and SNMP protocol; 4.2、Format data; Organize the above collected information into a unified JSON data format; 4.3、Store data; A relational database is established, which contains a database table to store device information, where the database table contains fields such as device ID, IP address, MAC address, operating system information, etc.; an index is added to each IP in the database table according to query requirements.
7. The LAN access asset scanning risk screening method according to claim 1, characterized in that: The implementation method of determining the device brand based on the MAC address in step 5 is as follows: 5.1、MAC address prefix lookup: Determine the manufacturer of the device based on the OUI part of the MAC address; 5.
2. Device feature identification: Identification through the device’s unique network behavior, response mode or operating system identification; 5.
3. Mark unknown or generic devices: When a MAC address cannot be matched in the database, it is marked as an unknown device or a generic device.
8. The LAN access asset scanning risk screening method according to claim 7 is characterized in that: The processing and feedback methods of the unknown or common device are as follows: 5.3.
1. Locate unknown or common devices to the corresponding database table for device marking and add them to the abnormal items to be processed as abnormal devices; 5.3.
2. Upload in the regularly updated database of MAC address database; 5.3.
3. The administrator manually adds or edits device information.
9. The LAN access asset scanning risk screening method according to claim 1, characterized in that: In step 6, the detailed information of each scanned device is recorded and integrated into the device information database. The device information database is imported into the relational database in step 4, and the device brand information determined according to the MAC address in step 5 is included, and an IP device list is made and stored in the device information database; The IP device list includes: device ID, IP address, MAC address, operating system information, device brand, and last updated time; The IP device list creates an index based on the MAC address and device brand fields.
