Vulnerability detection method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202610880814.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-17
- Publication Date
- 2026-10-27
AI Technical Summary
但是,相关技术中,存在应用的漏洞扫描效率低,漏洞扫描误报率高的问题
[0015]本申请实施例提供的一种漏洞检测方法、装置、电子设备及存储介质,在本申请中,响应于对目标对象的漏洞检测请求,从预置的服务清单中获取目标对象提供的目标服务的目标服务标识以及目标服务的服务端口的服务端口信息,然后通过预设黑盒检测工具来基于目标服务标识以及服务端口信息,对目标对象进行漏洞检测,以得到目标服务的漏洞检测结果。由此,不再是直接通过预设黑盒检测工具来对目标服务对应的全量服务端口信息指示的全量服务端口进行全量扫描来实现漏洞检测,而是仅针对目标服务的服务端口信息所指示的服务端口进行扫描,避免了预设黑盒检测工具全量扫描导致的扫描效率低的问题,提高了漏洞检测效率。并且,通过预设黑盒检测工具来进行目标服务的漏洞检测,不是通过白盒检测工具来进行目标服务的漏洞检测,能够减少通过白盒检测工具对目标服务进行漏洞检测时带来的漏洞误报率高、检测准确率较低的情况发生,提高了针对目标对象的目标服务的漏洞检测效率和漏洞检测准确率。
Smart Images

Figure CN122993981A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic information technology, and more specifically, to a vulnerability detection method, apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, to locate application vulnerabilities, some pre-defined tools can be used for vulnerability scanning. However, these technologies suffer from low vulnerability scanning efficiency and a high false positive rate. Summary of the Invention
[0003] In view of this, embodiments of this application propose a vulnerability detection method, apparatus, electronic device, and storage medium.
[0004] In a first aspect, embodiments of this application provide a vulnerability detection method, the method comprising: responding to a vulnerability detection request for a target object, obtaining a target service identifier and service port information of a target service provided by the target object from a preset service list; and performing vulnerability detection on the target service provided by the target object based on the target service identifier and service port information using a preset black-box detection tool to obtain a vulnerability detection result for the target service.
[0005] Secondly, embodiments of this application provide a vulnerability detection device, which includes: a response module, configured to respond to a vulnerability detection request for a target object by obtaining the target service identifier and service port information of the target service provided by the target object from a preset service list; and a detection module, configured to perform vulnerability detection on the target service provided by the target object based on the target service identifier and service port information using a preset black-box detection tool, so as to obtain the vulnerability detection result of the target service.
[0006] Optionally, the device further includes a service detection module for performing service detection on the target object, obtaining the target service identifier and the service port information of the target service's service port, and adding the target service identifier and service port information to the service list.
[0007] Optionally, the service detection module is also used to respond to a white-box detection request for a target object by performing service detection on the target object using a preset white-box detection tool to obtain the target service identifier and the service port information of the target service's service port.
[0008] Optionally, the service detection module is also used to log in to the target object using the login information of the target object; after logging in to the target object, it uses a preset white-box detection tool to perform in-depth vulnerability detection on the target service provided by the target object, so as to obtain the in-depth vulnerability detection results of the target service.
[0009] Optionally, the service detection module is also used to perform service detection on the target object in response to the service scanning conditions being met, so as to obtain the target service identifier of the target service and the service port information of the service port of the target service; the service scanning conditions include the time elapsed since the last service detection of the target object reaching a preset time, and / or the service provided by the target object changing.
[0010] Optionally, the service detection module is also used to send a query request to the management device, so that the management device responds to the query request and returns the network address of the target object; based on the network address of the target object, service detection is performed on the target object to obtain the target service identifier and the service port information of the target service.
[0011] Optionally, the detection module is also used to perform vulnerability detection on the target object using a preset white-box detection tool to obtain additional vulnerability detection results for the target service; and to determine the target vulnerability detection results for the target service based on the vulnerability detection results and the additional vulnerability detection results.
[0012] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory; the memory stores computer-readable instructions, which, when executed by the processor, implement the above-described method.
[0013] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-readable instructions that, when executed by a processor, implement the above-described method.
[0014] Fifthly, embodiments of this application provide a computer program product including computer-readable instructions that, when executed by a processor, implement the method described above.
[0015] This application provides a vulnerability detection method, apparatus, electronic device, and storage medium. In response to a vulnerability detection request for a target object, the method obtains the target service identifier and service port information of the target service provided by the target object from a pre-set service list. Then, a pre-set black-box detection tool is used to perform vulnerability detection on the target object based on the target service identifier and service port information to obtain the vulnerability detection result for the target service. Therefore, instead of directly scanning all service ports indicated by the full service port information of the target service using a pre-set black-box detection tool, the method only scans the service ports indicated by the service port information of the target service. This avoids the low scanning efficiency caused by a full scan using a pre-set black-box detection tool, thus improving vulnerability detection efficiency. Furthermore, using a pre-set black-box detection tool for vulnerability detection, rather than a white-box detection tool, reduces the high false positive rate and low detection accuracy associated with white-box detection, thereby improving the vulnerability detection efficiency and accuracy for the target object's service. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A schematic diagram is shown illustrating the application scenarios applicable to the embodiments of this application; Figure 2 A flowchart of a vulnerability detection method according to an embodiment of this application is shown; Figure 3 A flowchart of a vulnerability detection method according to yet another embodiment of this application is shown; Figure 4 This illustration shows a schematic diagram of service port information in an embodiment of this application; Figure 5 A flowchart of a vulnerability detection method according to another embodiment of this application is shown; Figure 6 A schematic diagram of a vulnerability detection process according to an embodiment of this application is shown; Figure 7 A schematic diagram illustrating a service list acquisition process according to an embodiment of this application is shown; Figure 8 A block diagram of a vulnerability detection device according to an embodiment of this application is shown; Figure 9 A structural block diagram of an electronic device for performing a vulnerability detection method according to an embodiment of this application is shown. Detailed Implementation
[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0019] In the following description, the terms "first" and "second" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first" and "second" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit the application. It should be noted that "multiple" as used herein refers to two or more. "And / or" describes the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.
[0021] Please refer to Figure 1 The diagram illustrates an application scenario applicable to the embodiments of this application. This application scenario includes a business terminal 110 and a server terminal 120.
[0022] The business terminal 110 can be, for example, a smartphone, tablet, e-book reader, music player, wearable device, smart home device, in-vehicle business terminal, etc. A scanning client is installed on the business terminal 110. This scanning client can respond to user requests and send vulnerability detection requests for the target object to the server terminal 120. The server terminal 120 then performs vulnerability detection on the target object, obtains the vulnerability detection results, and returns the results to the business terminal 110.
[0023] Server 120 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Server 120 may include at least one target object, which can be a physical node or virtual node used to provide services; of course, the target object can refer to server 120 itself. The service categories provided by the target object can include web application services, API (Application Programming Interface) services, network services, and database services, etc.
[0024] In some implementations, the business terminal 110 may initiate a vulnerability detection request for the target object provided by the server terminal 120. In response to the vulnerability detection request for the target object, the server terminal 120 may obtain the target service identifier and the service port information of the target service provided by the target object from a pre-set service list. Then, the server terminal 120 may use a pre-set black-box detection tool to perform vulnerability detection on the target object based on the target service identifier and the service port information to obtain the vulnerability detection result of the target service and return the vulnerability detection result to the business terminal 110.
[0025] In some other implementations, a terminal (communicating with the service terminal 110 and the service terminal 120) can send a vulnerability detection request for a target object provided by the service terminal 120 through the service terminal 110. After receiving the vulnerability detection request, the service terminal 110 sends the vulnerability detection request to the service terminal 120, so that the service terminal 120 can respond to the vulnerability detection request for the target object, obtain the vulnerability detection result of the target service, and return the vulnerability detection result to the terminal through the service terminal 110, or directly return the vulnerability detection result to the terminal.
[0026] Alternatively, the business terminal 110 may initiate a vulnerability detection request for the target object provided by the server terminal 120 (or the vulnerability detection request may be initiated by the terminal to the business terminal 110). In response to the vulnerability detection request for the target object, the business terminal 110 obtains the target service identifier and the service port information of the target service provided by the target object from the pre-set service list. Then, the business terminal 110 uses a pre-set black-box detection tool to perform vulnerability detection on the target object in the server terminal 120 based on the target service identifier and the service port information to obtain the vulnerability detection result of the target service.
[0027] In some other implementations, the service terminal 110 may include a target object. Thus, the service terminal 110 initiates a vulnerability detection request for the target object (or the vulnerability detection request is initiated to the service terminal 110 via a terminal). Then, in response to the vulnerability detection request for the target object, the service terminal 110 obtains the target service identifier and the service port information of the target service provided by the target object from a pre-set service list. Then, the service terminal 110 performs vulnerability detection on the target object based on the target service identifier and the service port information using a pre-set black-box detection tool to obtain the vulnerability detection result of the target service (of course, when sending a vulnerability detection request via a terminal, the vulnerability detection result can also be returned to the terminal).
[0028] Similarly, server 120 can have a target object. Therefore, server 120 initiates a vulnerability detection request for the target object (or the terminal initiates a vulnerability detection request to server 120). Then, in response to the vulnerability detection request for the target object, server 120 obtains the target service identifier and the service port information of the target service provided by the target object from the pre-set service list. Then, server 120 uses a pre-set black-box detection tool to perform vulnerability detection on the target object based on the target service identifier and service port information to obtain the vulnerability detection result of the target service (of course, when the vulnerability detection request is sent through the terminal, the vulnerability detection result can also be returned to the terminal).
[0029] For ease of explanation, the following embodiments of this application use an electronic device as the subject of the vulnerability detection method for explanation.
[0030] Please see Figure 2 , Figure 2 This application illustrates a flowchart of a vulnerability detection method according to an embodiment of the present application. The method is applied to an electronic device, which may be... Figure 1 The methods for server-side 120 or business-side 110 can include: S110. In response to a vulnerability detection request for the target object, obtain the target service identifier and the service port information of the target service provided by the target object from the pre-configured service list.
[0031] The target object can be a physical or virtual node deployed on a device or device cluster. The services provided by the target object are designated as target services. The target object can provide at least one target service, and the service categories can include web application services, API services, network services, and database services. For example, the target object could provide MySQL and MariaDB services.
[0032] The service identifier of a service refers to the service name, number, and code of the service, while the target service identifier refers to the service identifier of the target service, which is used to directly indicate the target service.
[0033] A vulnerability detection request is a request used to detect vulnerabilities in the services provided by a target object. Usually, it is difficult to locate the target service provided by the target object before vulnerability detection is performed. Therefore, vulnerability detection requests are usually targeted at the target object and cannot specify the target service.
[0034] Therefore, the electronic device directly responds to the vulnerability detection request, obtains the target service identifier and service port information of the target service provided by the target object from the pre-set service list, and realizes the location of the target service provided by the target object and the location of the service port of the target service.
[0035] The service list can be a single list: the service list includes the target service identifiers of multiple target services and the service port information of the service ports, and thus, the target service identifiers of the target services and the service port information of the target services of the target services can be obtained from the service list.
[0036] Alternatively, there can be multiple service lists: each target service corresponds to a service list, and each service list includes a target service identifier and the service port information of the target service's service port. Thus, a service request for the corresponding target service can be directly obtained to retrieve the target service identifier and the service port information of the target service from the service list corresponding to the target service.
[0037] In this embodiment, the target object can be pre-detected and located to determine the target service identifier and service port information of the target service provided by the target object. Then, the target service identifier and service port information of the target service are added to the service list. After obtaining the service list, the vulnerability detection request of the target object can be directly responded to by obtaining the target service identifier and service port information of the target service provided by the target object from the pre-set service list.
[0038] S120. Using a pre-set black-box detection tool, based on the target service identifier and service port information, perform vulnerability detection on the target service provided by the target object to obtain the vulnerability detection results of the target service.
[0039] The preset black-box testing tool refers to a pre-defined black-box testing tool, which can be OWASP ZAP, Burp Suite Pro, FSCAN, Nessus, Acunetix, AppScan, etc. The black-box testing tool is used to perform a BlackBox Scan (also known as an external scan) during the security assessment process.
[0040] After identifying the target service (Best Inc.) and its service port information, a pre-set black-box detection tool is used to perform a black-box scan on the target object based on the target service identifier and service port information to detect vulnerabilities. The detection results are then used as the vulnerability detection results for the target service provided to the target object.
[0041] In other words, by using a pre-set black-box detection tool to detect the target object in a black-box scanning manner, the detection process targets the target service provided by the target object and the service ports indicated by the service port information of the target service, rather than performing a full scan of all server ports indicated by the full service port information corresponding to the target service to achieve vulnerability detection, which greatly reduces the number of service ports that need to be scanned.
[0042] For example, for a certain target service, the total number of service ports corresponding to the target service (referring to the set of reasonable service ports that the target service may involve) is 65,535, from 1 to 65,535. However, the actual service ports of the target service are 3306, 3307, 13306, 33306, 33061, and 33062. Therefore, using the method of this embodiment, after obtaining the service port information of these 6 service ports of the target service, the method directly uses a preset black-box detection tool to scan the 6 service ports of the target service provided by the target object in a black-box scanning manner to achieve vulnerability detection and obtain the vulnerability detection results of the target service, instead of scanning all 65,535 service ports.
[0043] In this embodiment, in response to a vulnerability detection request for a target object, the target service identifier and service port information of the target service provided by the target object are obtained from a pre-set service list. Then, a pre-set black-box detection tool is used to perform vulnerability detection on the target object based on the target service identifier and service port information to obtain the vulnerability detection result of the target service. Therefore, instead of directly performing a full scan of all service ports indicated by the full service port information corresponding to the target service using the pre-set black-box detection tool, vulnerability detection is only performed on the service ports indicated by the target service's service port information. This avoids the low scanning efficiency caused by a full scan by the pre-set black-box detection tool, thus improving vulnerability detection efficiency. Furthermore, using a pre-set black-box detection tool for vulnerability detection, rather than a white-box detection tool, reduces the high false positive rate and low detection accuracy that occurs when using white-box detection tools, thereby improving the vulnerability detection efficiency and accuracy for the target object's service.
[0044] In some embodiments, such as Figure 3 As shown, before S110, the method further includes: S210. Perform service detection on the target object to obtain the target service identifier and the service port information of the target service's service port.
[0045] In other words, electronic devices can perform service detection on the target service provided by the target object in order to locate the target service identifier and the service port information of the target service.
[0046] In some implementations, technicians can write detection scripts and then use these scripts to perform service detection on the target object in order to locate the target service identifier and the service port information of the target service's service port.
[0047] In some other implementations, in response to a white-box inspection request for the target object, a pre-set white-box inspection tool can be used to perform service inspection on the target object to obtain the target service identifier and the service port information of the target service's service port.
[0048] The white-box inspection request can be triggered by the electronic device or by a device communicating with it. Preset white-box inspection tools refer to pre-defined white-box inspection tools, which may include Fortify, Checkmarx, VScan, Veracode, and Syhunt Code. Among them, VSCAN provides the nmap-services database, which integrates over 2200 known service fingerprints for service and application version detection. VScan is an open-source project designed to implement service version detection functionality, and nmap-services is used to complete the detection of service and application versions.
[0049] After receiving a white-box inspection request, the electronic device performs white-box inspection on the target object using a pre-set white-box inspection tool to detect services and obtain the target service identifier and service port information of the target service. White-box scanning specifically refers to the security assessment process where the user logs into the target object first using methods such as binding a password / key, and then scans the target object to identify services and vulnerabilities. Alternatively, a "shallow" vulnerability scan can be performed without logging into the target object.
[0050] For example, the target service identifier and service port information of the target service detected by the preset white-box detection tool are as follows: Figure 4 As shown, the detected services include the sshd service and the minio service. The service port of the sshd service is 22345, and the service port of the minio service is 19001.
[0051] In some implementations, prior to S210, the method further includes: in response to meeting service scanning conditions, performing service detection on the target object to obtain the target service identifier and service port information of the target service's service port; the service scanning conditions include a preset time interval since the last service detection of the target object, and / or a change in the services provided by the target object. The preset time interval is, for example, 1 day or 1 week.
[0052] In other words, when changes in the services provided by the target object are detected, service detection can be performed on the target object to ensure that the target service identifier and the service port information of the target service are up-to-date, and that the target service identifier and the service port information of the target service are timely and accurate.
[0053] Alternatively, if the time elapsed since the last service detection of the target object before the distance was detected reaches a preset time, and it is determined that the service identifier and service port information of the existing service may be outdated or inaccurate, service detection of the target object can be performed to ensure that the obtained target service identifier and service port information are up-to-date, and that the target service identifier and service port information are timely and accurate.
[0054] Typically, before performing service detection on the target object, a query request can be sent to the management device, so that the management device responds to the query request and returns the network address of the target object; accordingly, S210 may include: performing service detection on the target object based on the network address of the target object, so as to obtain the target service identifier of the target service and the service port information of the target service's service port.
[0055] The management device refers to a device that manages the target object. It can be a server containing the target object, or a device that communicates with and is connected to a server containing the target object. The management device is used to manage the target object. This management device stores at least the network address of the target object so that it can access the target object based on its network address and perform service detection on the target object.
[0056] S220. Add the target service identifier and service port information to the service list.
[0057] Once the target service identifier and the service port information of the target service are determined, they can be added to the service list.
[0058] Of course, before adding the target service identifier and the service port information of the target service to the service list, the service list can be empty, or it can store the historical service identifier and corresponding historical service port information of historical services in historical states. The target service can be an updated version of a historical service; this update can involve adding, deleting, or modifying services. Naturally, for the same target service, if the target service is changed, the service port and service identifier of the target service may also change.
[0059] In some implementations, after S220, the method further includes: logging into the target object using login information for the target object; and after logging into the target object, performing deep vulnerability detection on the target service provided by the target object using a preset white-box detection tool to obtain the deep vulnerability detection result of the target service.
[0060] Login information may include a login password and / or login account used to log in to the target object. This allows login to the target object using the password and / or account, followed by in-depth vulnerability detection to obtain more comprehensive and accurate results. Specifically, in-depth vulnerability detection can be performed using the target service's identifier and the service port information.
[0061] In some implementations, a scanning client (Agent) can be configured in the electronic device to log in to the target object. Alternatively, the electronic device can log in to the target object in a non-Agent manner without configuring a scanning client. Here, "non-Agent" means logging in to the target object without relying on deploying an agent.
[0062] For example, to collect data from a data server, an agent is usually deployed on the host. The agent communicates with the data server to obtain data. Non-agent management methods, such as Ansible / Puppet, do not deploy agents on electronic devices. Instead, they use SSH to send remote commands to the data server to obtain data.
[0063] In this embodiment, the target object and the service port of the target service provided by the target object are located by white-box detection request, so that the accuracy of the target service identifier and the service port information of the target service is high. Therefore, when the preset black-box detection tool performs vulnerability detection based on the target service identifier and the service port information of the target service, the vulnerability detection accuracy is high.
[0064] Furthermore, after service location is performed, in-depth vulnerability detection can be conducted to obtain in-depth vulnerability detection results, thereby achieving accurate and comprehensive location of vulnerabilities in the target service and improving the accuracy of vulnerability detection.
[0065] In some embodiments, such as Figure 5 As shown, after S120, the method further includes: S310. Perform vulnerability detection on the target object using a preset white-box detection tool to obtain additional vulnerability detection results for the target service.
[0066] S320. Based on the vulnerability detection results and additional vulnerability detection results, determine the target vulnerability detection results for the target service.
[0067] In other words, after obtaining vulnerability detection results for the target service by using a pre-set black-box detection tool based on the target service and service port information, a more comprehensive detection can be achieved by using a pre-set white-box detection tool to obtain additional vulnerability detection results for the target service. Combining the original vulnerability detection results and the additional vulnerability detection results, the final target vulnerability detection result for the target service is determined. This achieves both black-box and white-box detection, resulting in more comprehensive and accurate target vulnerability detection results. Here, white-box detection can be performed using the target service identifier and the service port information of the service port.
[0068] In some implementations, after obtaining the additional vulnerability detection results, the target object can be logged into using its login information. Then, after logging in, a pre-defined white-box detection tool is used to perform deep vulnerability testing on the target object, obtaining additional deep vulnerability detection results for the target service provided by the target object. Finally, based on the additional deep vulnerability detection results, the vulnerability detection results, and the additional vulnerability detection results, the target vulnerability detection results for the target service are determined, making the obtained target vulnerability detection results for the target service more comprehensive. Of course, here, deep vulnerability testing can be performed using the target service identifier and the service port information of the service port.
[0069] In this embodiment, not only is black-box detection achieved through a preset black-box detection tool, but white-box detection is also achieved through a preset white-box detection tool. The target vulnerability detection result is determined by combining the vulnerability detection results obtained from black-box detection, the additional deep vulnerability detection results obtained from white-box detection, and the additional vulnerability detection results. This makes the target vulnerability detection results more comprehensive and accurate, and improves the accuracy of vulnerability detection for the target service.
[0070] To better understand the solution presented in this application, the vulnerability detection method will be explained below with an example. For example... Figure 6 As shown in the figure, the nodes involved in scanning the target object in this application include the user (referring to the terminal used by the user), the reporting node, the scanning agent node, the bastion host agent node, and the scanning object, where the scanning object refers to the target object to be detected for vulnerabilities.
[0071] In this example, the user, reporting node, scanning agent node, and bastion host agent node each deploy some functions, and the sum of the functions of these four nodes implements the vulnerability detection method of this application.
[0072] First, the user queries the reporting node for the scanned object. Based on the user's query, the reporting node obtains the IP address of the scanned object from the bastion host proxy node and returns the IP address to the reporting node. At this point, the bastion host proxy node effectively implements the device management function described in the previous embodiment.
[0073] Afterwards, the user sends an inspection request to the reporting node, which may refer to a vulnerability detection request for the scanned object.
[0074] In response to a detection request, the reporting node performs a black-box scan of the target object by scanning the proxy node based on the target service and the service port information of the target service provided by the target object, and obtains the black-box scan result, which serves as the vulnerability detection result.
[0075] Subsequently, the reporting node continues to perform white-box scanning on the scanned object through the bastion host proxy node: the bastion host proxy node uses white-box scanning tools to perform polling scans on the scanned object to obtain white-box scan results (including additional vulnerability detection results and / or additional deep vulnerability detection results).
[0076] Finally, the black-box and white-box scan results are combined to obtain the complete scan result – the target vulnerability detection result.
[0077] In this example, to implement the black-box scanning process, a pre-configured service list can be set up. The configuration process for the service list is as follows: Figure 7 As shown.
[0078] First, asset identification is performed, and the target object (i.e., the scanning object in this example) is located by fingerprint scanning. The target service and the service port of the target service are indicated by the service port information. The white-box scanning strategy is enhanced by locating the target service and the service port of the target service: scanning is performed based on the target service and the service port information of the target service when performing black-box scanning.
[0079] like Figure 7 As shown, in order to achieve better scanning, you can also choose a suitable black-box scanning tool to scan different target objects, and add the selected black-box scanning tool to the service list.
[0080] For example, when identifying the target objects MySQL and MariaDB using VSCAN, a white-box scanning tool identifies the service ports for MySQL and MariaDB as 3306, 3307, 13306, 33306, 33061, and 33062. This information is then compiled into the service list for the target objects. This approach avoids the need for a complete scan, significantly saving time, and accurately adds the service ports corresponding to specific services to the service list. An example service list could look like this: asset:elastic type: 11 keyword: ["elasticsearch", "es", "elastic", "Elastic"] ports: [9200, 9300, 32032, 30920, 30382, 32138] account: ["elastic","admin", "kibana"] asset: rabbitmq type: 12 keyword: [“rabbitmq”] ports: [5672, 5671, 15672, 15671] account:["guest", "admin", "administrator", "rabbit", "rabbitmq", "root"] Here, Asset refers to the type of asset, which is actually the target service provided by the target object; type refers to the type identifier of the target service; keywords refers to the keyword identifier of the target service; ports refers to the service port; and account refers to the account used to perform the probe.
[0081] In this example, by automatically updating the services / ports identified by white-box scanning to the black-box scanning strategy, accurate service identification is achieved, thereby improving service detection efficiency and service identification capabilities, and ultimately increasing the vulnerability identification rate.
[0082] Please see Figure 8 , Figure 8 This illustration shows a block diagram of a vulnerability detection apparatus according to an embodiment of this application. The vulnerability detection apparatus 800 includes: The response module 810 is used to respond to a vulnerability detection request for the target object by obtaining the target service identifier and the service port information of the target service provided by the target object from a pre-configured service list. The detection module 820 is used to perform vulnerability detection on the target service provided by the target object based on the target service identifier and service port information using a preset black-box detection tool, so as to obtain the vulnerability detection results of the target service.
[0083] Optionally, the device further includes a service detection module for performing service detection on the target object to obtain the target service identifier and the service port information of the target service's service port; and adding the target service identifier and service port information to the service list.
[0084] Optionally, the service detection module is also used to respond to a white-box detection request for a target object by performing service detection on the target object using a preset white-box detection tool to obtain the target service identifier and the service port information of the target service's service port.
[0085] Optionally, the service detection module is also used to log in to the target object using the login information of the target object; after logging in to the target object, it uses a preset white-box detection tool to perform in-depth vulnerability detection on the target service provided by the target object, so as to obtain the in-depth vulnerability detection results of the target service.
[0086] Optionally, the service detection module is also used to perform service detection on the target object in response to the service scanning conditions being met, so as to obtain the target service identifier of the target service and the service port information of the service port of the target service; the service scanning conditions include the time elapsed since the last service detection of the target object reaching a preset time, and / or the service provided by the target object changing.
[0087] Optionally, the service detection module is also used to send a query request to the management device, so that the management device responds to the query request and returns the network address of the target object; based on the network address of the target object, service detection is performed on the target object to obtain the target service identifier and the service port information of the target service.
[0088] Optionally, the detection module 810 is also used to perform vulnerability detection on the target object using a preset white-box detection tool to obtain additional vulnerability detection results for the target service; and to determine the target vulnerability detection results for the target service based on the vulnerability detection results and the additional vulnerability detection results.
[0089] It should be noted that the device embodiments in this application correspond to the aforementioned method embodiments. The specific principles in the device embodiments can be found in the content of the aforementioned method embodiments, and will not be repeated here.
[0090] Figure 9 A structural block diagram of an electronic device for performing a vulnerability detection method according to an embodiment of this application is shown. The electronic device may be... Figure 1 For example, the business side can use 110 or the server side can use 120, etc. It should be noted that... Figure 9 The computer system 1200 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0091] like Figure 9 As shown, the computer system 1200 includes a Central Processing Unit (CPU) 1201, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 1202 or programs loaded from storage portion 1208 into Random Access Memory (RAM) 1203. The RAM 1203 also stores various programs and data required for system operation. The CPU 1201, ROM 1202, and RAM 1203 are interconnected via a bus 1204. An Input / Output (I / O) interface 1205 is also connected to the bus 1204.
[0092] The following components are connected to I / O interface 1205: an input section 1206 including a keyboard, mouse, etc.; an output section 1207 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to I / O interface 1205 as needed. Removable media 1211, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1210 as needed so that computer programs read from them can be installed into storage section 1208 as needed.
[0093] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1209, and / or installed from removable medium 1211. When the computer program is executed by central processing unit (CPU) 1201, it performs various functions defined in the system of this application.
[0094] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0095] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer-readable instructions.
[0096] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0097] In another aspect, this application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable storage medium carries computer-readable instructions that, when executed by a processor, implement the methods in any of the above embodiments.
[0098] According to one aspect of the embodiments of this application, a computer program product is provided, the computer program product including computer-readable instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer-readable instructions from the computer-readable storage medium, and the processor executes the computer-readable instructions, causing the electronic device to perform the methods of any of the above embodiments.
[0099] In the embodiments of this application, the terms "module" or "unit" refer to a part of a computer program with a predetermined function, which works together with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (e.g., processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that functions as a whole.
[0100] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0101] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause an electronic device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the methods according to the embodiments of this application.
[0102] Other embodiments of this application will readily conceive of by those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. It should be understood that this application is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A vulnerability detection method, characterized in that, The method includes: In response to a vulnerability detection request for a target object, the target service identifier of the target service provided by the target object and the service port information of the service port of the target service are obtained from a pre-set service list. By using a pre-set black-box detection tool, based on the target service identifier and service port information, vulnerability detection is performed on the target service provided by the target object to obtain the vulnerability detection results of the target service.
2. The method according to claim 1, characterized in that, Before retrieving the target service identifier of the target service provided by the target object and the service port information of the service port of the target service from a pre-set service list in response to a vulnerability detection request for the target object, the method further includes: Perform service detection on the target object to obtain the target service identifier and the service port information of the target service's service port; Add the target service identifier and the service port information to the service list.
3. The method according to claim 2, characterized in that, The step of performing service detection on the target object to obtain the target service identifier and the service port information of the target service's service port includes: In response to a white-box inspection request for the target object, a preset white-box inspection tool is used to perform service inspection on the target object to obtain the target service identifier and the service port information of the target service's service port.
4. The method according to claim 3, characterized in that, In response to a white-box inspection request for the target object, after performing service inspection on the target object using a preset white-box inspection tool to obtain the target service identifier and the service port information of the target service, the method further includes: Log in to the target object using the login information provided for the target object; After logging into the target object, the preset white-box detection tool is used to perform deep vulnerability detection on the target service provided by the target object to obtain the deep vulnerability detection results of the target service.
5. The method according to claim 2, characterized in that, The step of performing service detection on the target object to obtain the target service identifier and the service port information of the target service's service port includes: In response to the fulfillment of service scanning conditions, service detection is performed on the target object to obtain the target service identifier and the service port information of the target service's service port; the service scanning conditions include the time elapsed since the last service detection of the target object reaching a preset time, and / or the service provided by the target object changing.
6. The method according to claim 2, characterized in that, Before performing service detection on the target object to obtain the target service identifier and the service port information of the target service's service port, the method further includes: Send a query request to the management device, so that the management device responds to the query request and returns the network address of the target object; The step of performing service detection on the target object to obtain the target service identifier and the service port information of the target service's service port includes: Based on the network address of the target object, service detection is performed on the target object to obtain the target service identifier and the service port information of the target service.
7. The method according to claim 1, characterized in that, After obtaining the vulnerability detection results of the target service by using a preset black-box detection tool to perform vulnerability detection on the target service provided by the target object based on the target service identifier and service port information, the method further includes: The target object is subjected to vulnerability detection using a pre-set white-box detection tool to obtain additional vulnerability detection results for the target service; Based on the vulnerability detection results and the additional vulnerability detection results, the target vulnerability detection results for the target service are determined.
8. A vulnerability detection device, characterized in that, The device includes: The response module is used to respond to a vulnerability detection request for the target object by obtaining the target service identifier of the target service provided by the target object and the service port information of the service port of the target service from a pre-set service list. The detection module is used to perform vulnerability detection on the target service provided by the target object based on the target service identifier and service port information using a preset black-box detection tool, so as to obtain the vulnerability detection result of the target service.
9. An electronic device, characterized in that, include: processor; A memory storing computer-readable instructions that, when executed by the processor, implement the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that, when executed by a processor, implement the method as described in any one of claims 1-7.
11. A computer program product, characterized in that, It includes computer-readable instructions that, when executed by a processor, implement the method as described in any one of claims 1-7.
