Security risk verification method and apparatus, and electronic device
By obtaining the configuration information of security risks, generating verification messages, sending and verifying the results to the host to be verified, it solves the problem of difficulty in actively verifying security risks in the existing technology, and realizes security risk detection and verification without attack events. Improved detection efficiency and business security of network security risks.
Patent Information
- Application Number
- CN202310280500.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-21
- Publication Date
- 2024-09-24
AI Technical Summary
It is difficult for existing network security equipment to effectively determine and handle different types of network attacks. Especially when no attack event is detected, it is difficult to proactively verify security risks, resulting in business security risks not being discovered and dealt with in a timely manner.
Provide a security risk verification method and device, which generates a verification message by obtaining the configuration information of the security risk, and sends the verification message to the host to be verified according to the message-related information and verification method in the configuration information to obtain verification result data , determine whether the host has security risks. This method is suitable for different types of security risk verification and proactively performs verification without detecting attack events.
It achieves effective verification of the security risks of the host to be verified, improves the detection efficiency of network security risks and business security, is suitable for a variety of scenarios, including active verification in the absence of attack events, and reduces the technical requirements for relevant personnel.
Smart Images

Figure CN118694543A
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security technology, and in particular to a security risk verification method and device, and electronic equipment. Background Art
[0002] There are a lot of attacks on the Internet every day. Among these attacks, there are effective attacks that will cause harm to the business and ineffective attacks that will not cause harm to the business. Network security devices need to make risk assessments for these attacks and then decide on the next disposal strategy based on the assessment results. Summary of the invention
[0003] The present application provides a security risk verification method and device, and an electronic device, which can verify whether a host to be verified has a security risk.
[0004] In the first aspect, the present application provides a method for verifying a security risk. The method includes: obtaining configuration information of the security risk, the configuration information including the type of security risk and verification rules, the verification rules are used to indicate the message-related information and verification method corresponding to the type of security risk; generating a verification message according to the message-related information; sending the verification message to a host to be verified; obtaining verification result data associated with the verification message according to the verification method, the verification result data is used to indicate whether the host to be verified has the security risk.
[0005] The message-related information is used to indicate the content that the verification message corresponding to the type of security risk needs to contain, so that the required verification message can be generated. The verification method is used to indicate the verification method corresponding to the execution result of the verification message.
[0006] In this application, according to the configuration information obtained, a verification message is generated to start the verification process of the security risk. Furthermore, even if no attack event is detected, the security risk can still be verified, which can be applicable to the scenario of actively verifying the security risk in the scenario where no attack event is detected. In addition, by setting the message-related information and verification method according to the type of security risk in the configuration information, it can be applicable to the verification of different types of security risks.
[0007] Optionally, the configuration information may be obtained in any of the following ways:
[0008] The first method is to determine the type of security risk based on the description information of the alarm event; obtain the information extraction rules and verification methods corresponding to the type of security risk; and obtain the message-related information from the description information of the alarm event based on the information extraction rules. In this way, configuration information can be automatically extracted from the description information of the alarm event, improving the efficiency of security risk verification and reducing the technical requirements for relevant personnel.
[0009] The second method is to receive the configuration information. This method can realize manual configuration of the configuration information, and actively initiate verification of security risks in the case of manual configuration, so that the verification method of the present application is applicable to more scenarios.
[0010] Optionally, when the automatically generated configuration information and the previously input configuration information do not meet the current verification requirements, the configuration information can be modified. Therefore, the method can also include: modifying the configuration information according to the received modification instruction. The modification instruction is used to indicate that one or more information in the configuration information is modified. The modification method includes but is not limited to adding, deleting or modifying.
[0011] Exemplarily, modifying the configuration information includes at least one of the following: replacing suspected destructive characters in the configuration information with set characters; converting the target string in the configuration information, the conversion processing including at least one of encoding, adding comment characters, character concatenation, and variable replacement. Here, the suspected destructive characters and the target string can both be characters in the corresponding information in the attack payload.
[0012] In a possible implementation, the verification rule includes one sub-rule, or the verification rule includes multiple sub-rules. Each sub-rule is used to indicate message-related information and a verification method associated with a verification message. That is, each sub-rule is used to generate a verification message and obtain relevant data of the verification message.
[0013] When the verification rule includes multiple sub-rules, the verification result of the first sub-rule among the multiple sub-rules is the triggering condition of the second sub-rule, or the verification result of the first sub-rule is associated with the message related information corresponding to the second sub-rule.
[0014] Optionally, a verification message generated according to a sub-rule can be sent to a host to be verified to verify the single host, or a verification message generated according to a sub-rule can be sent to multiple hosts to be verified to verify multiple hosts at the same time to improve verification efficiency.
[0015] Optionally, the verification message is a hypertext transfer protocol (HTTP) request message, and the message-related information includes at least one of the following: a request method of the verification message, a request uniform resource locator URL of the verification message, a message header of the verification message, and a message body of the verification message. The attack payload carried in the verification message can be carried in the URL, or in the message header, or in the message body.
[0016] In some examples, the type of security risk is a cross site scripting (XSS) attack, the request method of the verification message is GET, the uniform resource locator (URL) of the verification message carries the attack payload, and the message header of the verification message includes an identifier of the host to be verified. Optionally, the identifier of the host to be verified can be an Internet Protocol (IP) address or a domain name.
[0017] In a first possible implementation, the verification message is used to trigger the host to be verified to respond to the execution result of the setting command carried in the verification message. According to the verification method, obtaining the verification result data associated with the verification message includes: receiving a response message sent by the host to be verified to the verification message; according to the verification method, obtaining the execution result of the setting command from the response message, and the execution result of the setting command belongs to the verification result data.
[0018] In a second possible implementation, the verification message is used to trigger the host to be verified to access the forensic server. According to the verification method, obtaining the verification result data associated with the verification message includes: obtaining the access record of the forensic server after the time point when the verification message is sent; according to the verification method, obtaining the access record related to the host to be verified from the access record, and the access record related to the host to be verified belongs to the verification result data.
[0019] In a third possible implementation, the verification message includes a first verification message and a second verification message, the first verification message is used to trigger the host to be verified to create or modify a specified file, and the second verification message is used to access the specified file. According to the verification method, the verification result data associated with the verification message is obtained, including: receiving a response message sent by the host to be verified to the second verification message; according to the verification method, obtaining a Hypertext Transfer Protocol HTTP response code from the response message, or obtaining a setting string from the message body of the response message, the setting string is used to indicate that the specified file is successfully accessed. Here, the HTTP response code or the setting string belongs to the verification result data.
[0020] Optionally, the method further includes: determining whether the host to be verified has a security risk based on the verification result data.
[0021] For the first possible implementation method, the following method 1 or 2 may be used to determine the security risk of the host to be verified:
[0022] Method 1: If, in the verification result data, the execution result of the host to be verified for the setting command carried in the verification message is the same as the expected result corresponding to the verification message, it is determined that the host to be verified has a security risk;
[0023] Method 2: If, in the verification result data, the execution result of the host to be verified for the setting command carried in the verification message satisfies the regular expression corresponding to the verification message, it is determined that the host to be verified has a security risk.
[0024] For the aforementioned second possible implementation, the security risk of the host to be verified can be determined in the following manner: if the verification result data indicates that the host to be verified accessed the forensic server after the time point when the verification message was sent, it is determined that the host to be verified has a security risk.
[0025] For the aforementioned third possible implementation, the security risk of the host to be verified can be determined in the following manner: if the verification result data indicates that the host to be verified creates or modifies a specified file after the verification message is sent, it is determined that the host to be verified has a security risk.
[0026] Optionally, the method further includes: obtaining a screenshot, the screenshot being used to display a display interface after the sender of the verification message receives a response message to the verification message. Based on the screenshot, it is possible to more intuitively determine whether the host to be verified has a security risk. In addition, for some special types of security risks, it is not possible to directly determine whether the host to be verified has the security risk based on the response data of the verification message, and it is necessary to determine whether the host to be verified has a security risk through a screenshot.
[0027] Optionally, the method further includes: saving the association relationship between the alarm event identifier associated with the security risk and the verification result data. By correspondingly saving the alarm event identifier and the verification result data, the efficiency of analyzing and judging the alarm event indicated by the alarm event identifier can be improved.
[0028] In a second aspect, a security risk verification device is provided, which has the function of implementing the method described in the first aspect or any optional method of the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more units corresponding to the above functions.
[0029] In a third aspect, an electronic device is provided. The electronic device includes a processor and a memory. The memory is used to store software programs and modules. The processor implements the method in the first aspect or any possible implementation of the first aspect by running or executing the software program and / or module stored in the memory.
[0030] Optionally, the number of the processors is one or more, and the number of the memories is one or more.
[0031] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0032] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips. This application does not limit the type of memory and the setting method of the memory and the processor.
[0033] In a fourth aspect, a security risk verification system is provided. The verification system includes a security analysis device and an attack detection device, wherein the security analysis device is used to generate configuration information of the security risk and send the configuration information to the attack detection device. For the relevant content of the configuration information, see the first aspect. The attack detection device is used to receive the configuration information, generate a verification message according to the message related information, and send the verification message to the host to be verified; according to the verification method, obtain the verification result data associated with the verification message, and the verification result data is used to indicate whether the host to be verified has the security risk.
[0034] In a fifth aspect, a computer program product is provided, wherein the computer program product comprises computer program code, and when the computer program code is executed by a computer, the computer executes the method in the first aspect or any possible implementation of the first aspect.
[0035] In a sixth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program codes executed by a processor, wherein the program codes include a method for implementing any possible implementation of the first aspect above.
[0036] In a seventh aspect, a chip is provided, comprising a processor, wherein the processor is used to call and execute instructions stored in a memory from the memory, so that an electronic device equipped with the chip executes a method in any possible implementation manner of the above-mentioned first aspect.
[0037] In an eighth aspect, another chip is provided. The another chip includes an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected via an internal connection path. The processor is used to execute the code in the memory, and when the code is executed, the processor is used to execute the method in any possible implementation of the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a structural schematic diagram of an application scenario provided by an embodiment of the present application;
[0039] Figure 2It is a structural diagram of another application scenario provided by an embodiment of the present application;
[0040] Figure 3 It is a flow chart of a security risk verification method provided by an embodiment of the present application;
[0041] Figure 4 It is a schematic diagram of an interface after a sender of a verification message receives a response message to the verification message provided by an embodiment of the present application;
[0042] Figure 5 It is a block diagram of a security risk verification device provided by an embodiment of the present application;
[0043] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0045] Some terms involved in the embodiments of the present application are explained below.
[0046] (1) Flow or data stream
[0047] Data flow refers to a series of messages exchanged between two communicating parties in a session. Data flow includes request messages initiated by the client to the server and response messages sent by the server to the request messages. Taking HTTP as an example, in a typical application scenario, after the attacker and the attacked host establish a connection, the attacker sends a series of HTTP requests to the attacked host, and the attacked host sends a series of HTTP responses to the attacker in response to these HTTP requests. The data flow used by the protection system for attack detection includes HTTP requests sent by the attacker and HTTP responses sent by the attacked host.
[0048] (2) Attack payload
[0049] Attack payload refers to any data used to launch a network attack. The attack payload can be carried in the message body, message header or URL. Attack payload includes but is not limited to attack commands, URLs of malicious files, address information of the control terminal, URLs of specified resources in the LAN, or address information of specified hosts in the LAN.
[0050] (3) Attack message
[0051] Attack messages refer to messages that carry attack payloads. The protocol types based on attack messages include but are not limited to HTTP, File Transfer Protocol (FTP), Domain Name System (DNS), Remote Method Invocation (RMI), Lightweight Directory Access Protocol (LDAP), Hyper Text Transfer Protocol over Secure Socket Layer (HTTPS), Transmission Control Protocol (TCP), User Datagram Protocol (UDP), Network File System (NFS), etc.
[0052] (4) Attack Command
[0053] Attack commands refer to any command with malicious purpose. For example, attack commands are used to instruct the host to run malicious files (such as viruses or Trojans), or to instruct the host to output sensitive or confidential data (such as user information, parameters of devices in the intranet) in the intranet to a specified address on the Internet, or to instruct the host to create a malicious file locally, or to instruct the host to write malicious code to a specified file already in the local area.
[0054] (5)Echo
[0055] Echo refers to the result of the command that the host responds to after executing the command. For example, input the echo command to the host: echo ognl_attack_test. After the host executes this echo command, it outputs ognl_attack_test. In this example, ognl_attack_test is the echo of the echo command.
[0056] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1 As shown, a security device 10 is deployed between the Internet and the protected network. Optionally, the protected network may be an enterprise network or a campus network, etc. Figure 1 An enterprise network is used as an example for illustration.
[0057] There are normal clients on the Internet. Normal clients are the initiators of normal traffic. Normal clients generate normal traffic and send it to the server to access the services provided by the server. There are also attackers on the Internet. Attackers generate and send attack traffic to the attacked device through tools, zombie hosts, or proxies.
[0058] The attacked device is located in a protected network and can also be called a protected device. From the perspective of the attacked device, the protected network where the attacked device is located is an internal network, and the Internet is an external network.
[0059] The attacked device may be a server or terminal for providing services to normal clients. The attacked device includes but is not limited to an application server or a web server. Among them, the application server includes but is not limited to a game server, a video application server, a file server, a search engine server, an instant messaging server, etc. A web server is also called a World Wide Web (web) server or a website server.
[0060] The security device 10 is used to detect attacks on network traffic between the Internet and the protected network, generate alarm description information for the detected attack events, and save the alarm description information in the alarm log. Alternatively, the security device 10 is used to obtain bidirectional traffic between the enterprise network and the Internet.
[0061] Exemplarily, the security device 10 may include a firewall 101, a probe 102, or a security analyzer 103. Alternatively, the firewall 101 may also be a web application firewall (WAF) (also known as a website application-level intrusion prevention system), an anti-virus (AV) device, an anti-distributed denial of service attack (anti-DDoS) device, or a next generation firewall (NGFW).
[0062] The firewall 101 is deployed at the exit of the enterprise network in a direct connection manner, and can obtain the bidirectional traffic at the deployment location. Optionally, the firewall 101 can perform attack detection and generate an alarm log.
[0063] The security analyzer 103 is deployed in bypass mode and can obtain the bidirectional traffic of the deployment location by mirroring. The security analyzer 103 uses the probe 102 to collect network traffic data at the exit of the enterprise network. Optionally, the probe 102 performs attack detection, or the probe 102 sends the collected data to the security analyzer 103, which performs attack detection and generates an alarm log.
[0064] The security analysis device 20 is in communication with the security device 10, and can obtain network traffic between the Internet and the protected network or obtain alarm logs from the security device 10. The security analysis device 20 is deployed with big data security analysis products, such as security information and event management (SIEM), situational awareness or security operation products.
[0065] Optionally, the security analysis device 20 may generate configuration information based on the alarm log, or perform attack detection on the network traffic, and when an attack event is detected, generate configuration information based on the attack message associated with the detected attack event; or, the security analysis device 20 may receive configuration information input by the user. The security analysis device 20 may also send a verification message based on the configuration information, and obtain verification result data corresponding to the verification message.
[0066] Figure 2 is a schematic diagram of another application scenario provided by an embodiment of the present application. Figure 1 The application scenario shown differs in that Figure 2 In the illustrated scenario, the security analysis device 20 is only used to obtain configuration information and send the configuration information to the attack detection device 30. The attack detection device 30 sends a verification message according to the configuration information and obtains the verification result data corresponding to the verification message. Optionally, the attack detection device 30 is also used to send the verification result data to the security analysis device 20.
[0067] Optionally, the attack detection device 30 includes but is not limited to a BAS (breach and attacksimulation) device or a vulnerability scanning device, etc. Since the attack detection device 30 itself has verification capabilities such as sending verification messages, sending verification messages through the attack detection device 30 and obtaining verification result data corresponding to the verification messages can fully utilize existing device resources and save costs.
[0068] It should be noted that in Figure 1 and Figure 2 In the illustrated scenario, the security analysis device 20 and the protection device 10 are two independent devices. In other scenarios, the security analysis device 20 may be integrated with the security device 10 , that is, the functions of the security analysis device 20 may be configured on the security device 10 .
[0069] Figure 3 FIG. 1 is a flow chart of a security risk verification method provided by an embodiment of the present application. Figure 3 As shown, the method includes the following steps S11 to S14. In a possible implementation, each step in the method can be Figure 1 The security analysis device 20 in the application scenario shown is executed. In another possible implementation, step S11 in the method is performed by Figure 2 The application is executed by the security analysis device 20 in the scene, and steps S12 to S14 are performed by Figure 2 The attack detection device 30 in the illustrated application scenario executes.
[0070] S11: Obtain configuration information of security risks.
[0071] Security risks include but are not limited to attack events or vulnerabilities that affect network security. The configuration information of security risks includes the type of security risk and verification rules.
[0072] The type of security risk may be the type of attack event or the vulnerability number. The types of attack events include but are not limited to XSS attacks, structured query language (SQL) injection attacks, command execution attacks, and web vulnerability attacks. Vulnerability numbers include but are not limited to vulnerability numbers beginning with the following letters: CVE, CAN, CNCVE, CNVD, and CNNVD. Different vulnerability numbers correspond to different vulnerabilities.
[0073] The verification rules are used to indicate the message-related information and verification method corresponding to the type of security risk. The message-related information is used to indicate the content that the verification message corresponding to the type of security risk needs to contain so that the required verification message can be generated. In an embodiment of the present application, the protocol type based on the verification message includes but is not limited to HTTP, FTP, DNS, RMI, LDAP, HTTPS, TCP, UDP, and NFS. The message-related information corresponding to the verification message based on different protocols may be different.
[0074] Exemplarily, when the verification message is an HTTP request message, the message-related information may include at least one of a request method, a request URL, a message header, and a message body. Among them, the message-related information needs to include at least a request method and a request URL to ensure the normal sending of the HTTP request.
[0075] The request method includes but is not limited to GET, POST, DELETE, HEAD, OPTIONS, PUT, TRACE, etc. The attack payload of the HTTP request message can be in any of the following forms: the message body contains an attack command, or the request line includes the URL of a malicious file, or the IP header encapsulated in the outer layer of the message header of the HTTP request message includes the IP address of the control end.
[0076] When the verification message is an FTP request, the message-related information may include at least one of an FTP address, port, user name, and password. The message-related information corresponding to the FTP request needs to include at least the FTP address and port to ensure the normal sending of the FTP request. When the user name and password dictionary in the FTP request uses a preset related weak password configuration file, the user name and password dictionary can be regarded as an attack payload. Here, the weak password configuration file includes some pre-configured relatively simple passwords that are easy to guess or cracked by cracking tools.
[0077] The embodiment of the present application does not limit the specific protocol type used by the verification message, and the message-related information corresponding to other protocol types can be adaptively modified based on the HTTP and FTP protocols.
[0078] The verification mode is used to indicate the verification mode corresponding to the execution result of the verification message. By verifying the execution result corresponding to the verification message according to the verification mode, it can be determined whether the host to be verified has the security risk.
[0079] Optionally, the verification rule may include one sub-rule or multiple sub-rules. Each sub-rule is used to indicate message-related information and a verification method associated with a verification message.
[0080] The verification method in each sub-rule may include at least one of a judgment condition and a query content. The judgment condition is used to determine whether the response data of the message to be verified meets the condition. The judgment condition includes but is not limited to the following: whether the response status is a set status, whether the size of the response message is within a set range, and whether the response data includes set characters.
[0081] For example, if the determination condition is status code statuscode==200, then the determination condition is whether the status code is 200. If the status code is 200, it means that the response status is the set status; otherwise, if the status code is not 200, it means that the response status is not the set status. Here, the set status means that the request has succeeded.
[0082] For another example, the judgment condition is response.body_length! = N. N is a set value. The judgment condition is whether the length of the body of the response message is equal to N. If the length of the body of the response message is not equal to N, it means that the size of the response message is within the set range; conversely, if the length of the body of the response message is equal to N, it means that the size of the response message is not within the set range. Here, the length of the body of the response message represents a judgment indicator of whether the attack has an impact on the business. For example, for the SQL injection scenario, when the length of the response message is inconsistent with the normal business return length, it means that the attack may be effective.
[0083] For another example, the judgment condition is response.body.contains("success"). The judgment condition is to judge whether the message body of the response message contains a string indicating success ("success").
[0084] The query content is used to query the target content from the response data associated with the verification message. The query method can be a regular query or a complete match search. For example, the query content is aaa.jsp, which is used to query the file aaa.jsp from the response data associated with the verification message.
[0085] When the verification rule includes multiple sub-rules, among the multiple sub-rules, the verification result of the first sub-rule is the triggering condition of the second sub-rule, or the verification result of the first sub-rule is associated with the message related information corresponding to the second sub-rule.
[0086] In some examples, the verification method in the first sub-rule includes a judgment condition, and the judgment result of the judgment condition is the trigger condition of the second sub-rule. For example, if the judgment result of the first sub-rule is false, the second sub-rule is no longer executed; if the judgment result of the first sub-rule is true, the second sub-rule continues to be executed.
[0087] In other examples, the verification method in the first sub-rule includes query content, and at least a part of the query result of the query content is a part of the corresponding verification message of the second sub-rule. Here, the first sub-rule and the second sub-rule are two associated sub-rules.
[0088] The following is an example of a case where a verification rule includes two sub-rules.
[0089]
[0090]
[0091] In the above example, the verification message corresponding to rule 1 is used to instruct the creation of the file aaa.jsp. The verification method in rule 1 includes a judgment condition and a query content. The judgment condition is to judge whether the status code is 200, and the query content is the file aaa.jsp. The verification message corresponding to rule 2 is used to request the file aaa.jsp. The verification method in rule 1 includes a judgment condition, which is to judge whether the status code is 200 and the message body of the response message contains success.
[0092] Optionally, the configuration information of the security risk may also include configuration description information. Exemplarily, the configuration description information includes but is not limited to the file name of the configuration file where the configuration information is located, the author of the configuration information (or the configuration file), and the alarm event identifier associated with the configuration information.
[0093] S12: Generate a verification message according to the message related information.
[0094] In some examples, various information in the message-related information may be filled into various fields of the verification message, thereby generating a verification message.
[0095] S13: Send a verification message to the host to be verified.
[0096] The host to be verified is the host that needs to be verified whether there is the security risk. By carrying the identifier of the host to be verified in the verification message, the verification message can be sent to the verification host. For HTTP messages, the identifier of the host to be verified can be carried in the message header of the HTTP message.
[0097] In a possible implementation manner, the identifier of the host to be verified is an IP address. By setting the destination address of the verification message to the IP address of the host to be verified, the verification message can be sent to the host to be verified.
[0098] In some examples, the destination address of the verification message may be an IP address of a host, which may be specified by a user, or may be the destination address of the attack message extracted from the description information of the alarm event.
[0099] In other examples, the destination address of the verification message may indicate the IP addresses of multiple hosts, for example, may be a network segment address. Optionally, the network segment address may be a default address, or may be specified by a user.
[0100] In another possible implementation, the identifier of the host to be verified is a domain name. By setting the destination address of the verification message to the domain name of the host to be verified, the verification message can be sent to the host to be verified.
[0101] S14: According to the verification method, obtain verification result data associated with the verification message.
[0102] The verification result data is used to indicate whether there is a security risk on the host to be verified.
[0103] In the embodiment of the present application, a verification message is generated based on the configuration information of the security risk obtained, and the verification process of the security risk is started. Even if no attack event is detected, the security risk can still be verified, which can be applicable to the scenario of actively verifying the security risk in the scenario where no attack event is detected. In addition, by setting the message-related information and verification rules according to the type of security risk in the configuration information, it can be applicable to the verification of different types of security risks.
[0104] In S11, there are multiple ways to obtain the configuration information of the security risk, and the following uses ways one to three as examples for description.
[0105] Method 1: Manually configure the configuration information of security risks.
[0106] In the first mode, configuration information of security risks input by a user is received.
[0107] For example, the configuration information input by the user is received through a configuration interface. The configuration interface may include multiple input fields, each of which is used to receive one or more items of information in the configuration information.
[0108] By manually configuring the configuration information of security risks, you can proactively initiate security risk verification when there is no attack event or when an alarm event declares the attack invalid. In this way, even if there is no obvious risk, you can verify whether there is a risk in the asset or business system, thereby better ensuring system security.
[0109] Method 2: Automatically generate security risk configuration information based on the description information of the alarm event.
[0110] In this second method, corresponding information extraction rules and verification methods can be configured for different types of security risks. The information extraction rules are used to extract message-related information from the description information of the alarm event. The description information of the alarm event includes multiple fields, each field including a field name and field information. The information extraction rules may include one or more matching fields. Each matching field is used to obtain the field information corresponding to the field name as message-related information.
[0111] The description information of the alarm event usually includes the vulnerability number or attack type (i.e., the type of security risk). Therefore, the type of security risk can be obtained from the description information of the alarm event, and then the information extraction rule corresponding to the type of security risk can be found, and finally, the message related information can be obtained from the description information of the alarm event based on the information extraction rule. The message related information is combined with the verification method corresponding to the type of security risk to obtain the configuration information of the security risk.
[0112] In a possible implementation, multiple matching templates may be pre-set, and different matching templates correspond to different types of security risks. For example, matching template 1 corresponds to XSS attacks, and matching template 2 corresponds to SSRF attacks. Each matching template includes information extraction rules and verification methods corresponding to the type of security risk. In this way, matching templates can be searched according to the type of security risk, and the matching templates can be modified as needed.
[0113] Method three: obtaining a pre-stored configuration file in a text format, wherein the configuration file includes configuration information of security risks.
[0114] Optionally, after obtaining the configuration information of the security risk through the first to third methods, the configuration information may be modified according to the received modification instruction. The modification instruction may be input by the user based on the configuration interface.
[0115] Here, the way of modifying the configuration information includes but is not limited to modifying or deleting one or more pieces of information in the configuration information, and / or adding one or more pieces of information in the configuration information.
[0116] In some cases, the modification of the configuration information is mainly aimed at modifying the attack payload in the configuration information.
[0117] In a possible implementation, the suspected destructive characters in the attack payload are replaced with set characters. Here, the suspected destructive characters may be pre-set characters that may cause substantial damage to the host to be verified, such as characters used to instruct the host to be verified to perform operations such as formatting a hard disk or deleting a file. The set characters are characters that will not cause substantial damage to the host to be verified, such as an echo command or a printf command. After this replacement, it is possible to avoid the verification message from causing substantial damage to the host to be verified.
[0118] During implementation, a set of suspected destructive characters may be pre-set, and each suspected destructive character in the set of suspected destructive characters may be searched in the configuration information. If a suspected destructive character is found in the configuration information, the found suspected destructive character is replaced with the set character; if no suspected destructive character is found in the configuration information, step S12 is executed.
[0119] In another possible implementation, the target string in the attack payload is converted, and the conversion methods include but are not limited to encoding, adding comment symbols, character concatenation and variable replacement. One or more of these methods can be used for conversion, and then the target string after conversion is used to replace the target string before conversion. In this way, the bypass capability of the attack payload can be tested. The bypass capability refers to the ability to reach the host to be verified through the protection device. The target string can be specified by the user through input instructions.
[0120] For example, for the webshell file upload attack verification scenario, the target string of normal plain text is as follows:
[0121] <? php'create_function'('$code','eval($_GET["code"]);')();? >
[0122] However, attackers often use deformation to evade defense system detection. In order to verify the current system's detection and defense capabilities, the target string can be actively deformed to form the following structure:
[0123] <? php$function='create'.'_function';$function=$function('$code','ev'.'al'.'($_'.'GET'.'["code"]);');$function();? >.
[0124] In this example, the target string is converted by variable replacement and character concatenation. For example, create_function in the target string is converted into 'create'.'_function' through character concatenation. At the same time, the characters '$code','eval($_GET["code"]);' in the target string are concatenated and assigned to $function, and then $function() is executed, thus realizing variable replacement.
[0125] In step S14, there are multiple ways to obtain the verification result data associated with the verification message according to the verification method, and the following three are used as examples for illustration.
[0126] The first one is that the verification message is used to trigger the host to be verified to respond to the execution result of the setting command carried in the verification message. The verification method is used to indicate that the execution result of the setting command is compared with the expected result corresponding to the verification message. In this case, the verification method is used to indicate that the execution result of the setting command is used as the verification result data. Then, according to the verification method, the verification result data associated with the verification message is obtained, including: receiving a response message sent by the host to be verified to the verification message; according to the verification method, obtaining the execution result of the setting command from the response message.
[0127] In some examples, the execution result of the setting command is the string following the operator (such as echo, print, etc.) in the setting command. For example, the setting command is "echo a predetermined string", and the expected result of the setting command is "a predetermined string".
[0128] In other examples, the execution result of the set command is a string that the grammatical specification of the command requires the execution party to return. For example, the set command is "id", and the expected result of the set command includes "uid=", "gid=", and "groups=". Assume that if the user name is root and the UID is 0, the expected result of the set command is "uid=0(root)gid=0(root)groups=0(root)".
[0129] In some other examples, the execution result of the setting command is the name of some parameters of the device. For example, the setting command is "ifconfig", and the expected result of the setting command includes "RUNNING", "mtu", "inet", "ether" and "netmask".
[0130] In some other examples, the execution result of the command is set to file related information, including but not limited to the files existing in the specified directory, the size of the file, the creation time, or the time of the most recent access or modification, etc. For example, the command is set to be a dir command or an ls -1 command, etc. The expected result of the command can be a regular expression, such as a regular expression containing time, etc.
[0131] The second type is that the verification message is used to trigger the host to be verified to access the forensic server. The verification method is used to determine whether the host to be verified has accessed the forensic server. In this case, the verification method is used to indicate that the record of the host to be verified accessing the forensic server is used as the verification result data. Then, according to the verification method, the verification result data associated with the verification message is obtained, including: the first step is to obtain the access record of the forensic server after the time point of sending the verification message; the second step is to obtain the access record related to the host to be verified from the access record according to the verification method.
[0132] In the embodiment of the present application, the forensic server is a device for collecting forensics of the access behavior of the host to be verified. Optionally, the forensic server can be an independent device, or can be integrated with the aforementioned security device 10 or security analysis platform 20 or attack detection device 30.
[0133] In this case, the verification message carries the address information of the evidence server. The address information of the evidence server includes but is not limited to at least one of the IP address, domain name or port number of the evidence server, so that the host to be verified can access the evidence server according to the address information of the evidence server.
[0134] The embodiment of the present application does not limit the method of obtaining the access record of the forensic server. For example, the access record can be obtained from the access log provided by the forensic server, and the access log is a file generated by the forensic server to record the visitor's operation. For another example, the traffic of the forensic server can be monitored to obtain the access record.
[0135] The third type, the verification message includes a first verification message and a second verification message. The first verification message is used to trigger the host to be verified to create or modify a specified file. The second verification message is used to access the specified file. In this case, the verification method is used to indicate that the access result of the specified file is used as the access result data. Then, according to the verification method, the verification result data associated with the verification message is obtained, including: the first step, receiving a response message sent by the host to be verified to the verification message; the second step, according to the verification method, obtaining a Hypertext Transfer Protocol HTTP response code from the response message, or obtaining a set string from the message body of the response message, and the set string is used to indicate that the specified file is successfully accessed.
[0136] For example, the first verification message includes an identifier of a specified file (e.g., a file name of a specified file). Optionally, the first verification message also includes a URL of a specified file and the content of a specified file. The specified file is a malicious file to be implanted on the host to be verified, for example, a web shell file. In some examples, after receiving the first verification message, the host to be verified creates and saves the specified file locally. In other examples, the host to be verified writes malicious code in a locally saved specified file, so that the specified file becomes a malicious file. The second verification message includes an identifier of the specified file and / or a URL of the specified file.
[0137] Taking the designated file as a file named ***.jsp as an example, the first verification message is used to instruct the host to be verified to create a webshell file ***.jsp. The second verification message is an access request for accessing the ***.jsp.
[0138] In some examples, the HTTP response code can be parsed from the response message of the second verification message, and if the HTTP response code indicates that the response code is successfully obtained, it means that the specified file is successfully accessed. For example, when the HTTP response code is 200, it is determined that the specified file is successfully accessed.
[0139] In other examples, the setting string can be obtained from the response message of the second verification message, for example, the echo identifier after the Trojan file is successfully connected. Exemplarily, the setting string can be "->|". One possible implementation method for obtaining the setting string is that the network security solution provider extracts features from the response messages triggered by some sample Trojan files (such as the one-sentence Trojan used by attack tools such as Cleaver and XISE) after the connection is successful, and obtains the above setting string.
[0140] In order to facilitate evidence collection, after obtaining the verification result data associated with the verification message, the association relationship between the alarm identifier associated with the security risk and the verification result data can also be saved. In this way, the verification result data corresponding to the alarm identifier can be searched later based on the association relationship, so as to verify whether the host to be verified has the security risk indicated by the alarm identifier based on the verification result data, that is, to facilitate the analysis of the alarm to determine whether the alarm is valid.
[0141] Optionally, the method may further include: obtaining a screenshot, where the screenshot is used to display a display interface after the sender of the verification message receives a response message to the verification message.
[0142] In some examples, after receiving the response message of the verification message, the sender of the verification message will take a screenshot of the display interface of the sender of the verification message to obtain at least one screenshot. When the sender of the verification message is an attack detection device, the attack detection device can also send the obtained screenshot to the security analysis device. The security analysis device will save the screenshot together with the verification result data. When the sender of the verification message is a security analysis device, the security analysis device will save the screenshot together with the verification result data.
[0143] Since the screenshot can more intuitively show the status of the sender of the verification message after receiving the response message of the verification message, saving the screenshot together with the verification result data can improve the efficiency of analyzing and judging the corresponding alarm event.
[0144] Exemplarily, after receiving the response message of the verification message, the sender of the verification message can take one or more screenshots within a time window. When taking multiple screenshots, the screenshot action can be performed at a set time interval. Here, the length of the time window, the number of screenshots, and the time interval can be set according to actual needs, and this application does not limit this.
[0145] Optionally, the method may further include step S15: determining whether the host to be verified has a security risk according to the verification result data.
[0146] In step S15, for the three situations of the aforementioned verification result data, the following method can be used to determine whether the host to be verified has a security risk.
[0147] For the first case mentioned above, the execution result of the setting command carried in the verification message by the host to be verified in the verification result data can be compared with the expected result corresponding to the verification message. If the execution result of the setting command is the same as the expected result, it means that there is a security risk in the host to be verified. Alternatively, if the execution result of the setting command carried in the verification message by the host to be verified in the verification result data satisfies the regular expression corresponding to the verification message, it is determined that there is a security risk in the host to be verified.
[0148] For the second situation mentioned above, it can be determined based on the verification result data whether the host to be verified has accessed the forensic server after the time point when the verification message was sent. If the verification result data indicates that the host to be verified has accessed the forensic server after the time point when the verification message was sent, it is determined that there is a security risk for the host to be verified; if the verification result data indicates that the host to be verified has not accessed the forensic server after the time point when the verification message was sent, it is determined that there is no security risk for the host to be verified.
[0149] For the third situation mentioned above, it can be determined based on the verification result data whether the host to be verified creates or modifies the specified file after the time point when the first verification message is sent. If the verification result data indicates that the host to be verified creates or modifies the specified file after the time point when the first verification message is sent, it is determined that there is a security risk for the host to be verified; if the verification result data indicates that the host to be verified does not create or modify the specified file after the time point when the first verification message is sent, it is determined that there is no security risk for the host to be verified.
[0150] The following is an example of the above Figure 3 The method shown is illustrated by taking as an example the case where configuration information is automatically generated based on the description information of the alarm event.
[0151] First, obtain the following alarm event description information:
[0152] GET / test / v / r / ? name=%3Cimg+src%3D%27%23%27+onerror%3D%22alert%28%2Fxss%2F%29%22%3E HTTP / 1.1
[0153] Referer:http: / / xx.xx.xx.xx / test / v / r / ?name=%3Cimg+src%3D%27%23%27+onerror%3D%22al ert%28%2Fxss%2F%29%22%3E
[0154] Cache-control:max-age=0
[0155] Accept:text / html,application / xhtml+xml,application / xml;q=0.9,* / *;q=0.8
[0156] Accept-Language:zh-Hans-cN,zh-Hans;q=0.5
[0157] User-Agent:Mozilla / 5.0(Windows NT 10.0;Win64;x64)AppleWebkit / 537.36(KHTML,like Gecko)Chrome / 70.0.3538.102Safari / 537.36Edge / 18.18363
[0158] Accept-Encoding:gzip,deflate
[0159] Host:xx.xx.xx.xx
[0160] Connection:Keep-Alive
[0161] Cookie:PHPSESSID=2n35l0632hgdlh8jlliti2klue
[0162] HTTP / 1.1 200OK
[0163] Date:Mon,19Dec 20xx 02:56:51GMT
[0164] Server:Apache / 2.4.39(Win64)OpenSSL / 1.1.1b mod_fcgid / 2.3.9a mod_log_rotate / 1.02
[0165] X-Powered-By:PHP / 7.3.4
[0166] Keep-Alive:timeout=5,max=100
[0167] Connection:Keep-Alive
[0168] Transfer-Encoding: chunked
[0169] Content-Type: text / html; charset=utf-8
[0170] Then, based on the description information of the alarm event, the following configuration information is generated:
[0171] Configuration file name (title): XSS warning verification
[0172] Author of configuration information: Automatic
[0173] Configuration information description: Verify XSS warning
[0174] Type of security risk: XSS
[0175] Alerts: Alert ID
[0176] rules:
[0177] rule1:
[0178] url: / test / v / r / ? name=%3Cimg+src%3D%27%23%27+onerror%3D%22alert%28%2Ftest%2F%29%22%3E
[0179] method:GET
[0180] header:#Select the fields in the request header as needed
[0181] Host:xx.xx.xx.xx
[0182] User-Agent: Mozilla / 5.0 (Windows NT 10.0; Win64; x64) AppleWebKit / 537.36 (KHTML, like Gecko) Chrome / 70.0.3538.102Safari / 537.36Edge / 18.18363
[0183] Cookie:PHPSESSID=xxxxx
[0184] Conditions:statuscode==200
[0185] In this example, the attack payload is in the URL, which is encoded as <img src=‘#’onerror=”alert( test )”> , which means that if there is an XSS vulnerability in the business, a browser pop-up window will appear.
[0186] Based on the configuration information, a verification message is generated and sent to the host to be verified. After receiving the verification message, the host to be verified sends a response message. The status code obtained from the response message is 200. The status code 200 indicates that the HTTP request is successful. The status code 200 is stored as the verification result data in association with the alarm identifier.
[0187] Figure 4 1 is a schematic diagram of an interface provided by an embodiment of the present application after a sender of a verification message receives a response message to the verification message. The schematic diagram of the interface is obtained by taking a screenshot of the display interface of the sender of the verification message. Figure 4 As shown in the figure, after the sender of the verification message receives the response message of the verification message, a browser pop-up window appears. Therefore, it can be quickly determined that the host to be verified has an XSS vulnerability. By associating and storing the interface diagram with the alarm identifier, it can be quickly determined that the alarm is valid.
[0188] Figure 5 1 is a block diagram of a security risk verification device provided by an embodiment of the present application. The security risk verification device can be implemented as all or part of a security analysis device and an attack detection device through software, hardware, or a combination of both. The security risk verification device may include: an information acquisition unit 501, a message generation unit 502, a sending unit 503, and a data acquisition unit 504.
[0189] The information acquisition unit 501 is used to obtain configuration information of security risks, and the configuration information includes the type of security risk and verification rules, and the verification rules are used to indicate the message-related information and verification method corresponding to the type of security risk. The message generation unit 502 is used to generate a verification message according to the message-related information. The sending unit 503 is used to send a verification message to the host to be verified. The data acquisition unit 504 is used to obtain the verification result data associated with the verification message according to the verification method, and the verification result data is used to indicate whether the host to be verified has a security risk.
[0190] In a possible implementation, the information acquisition unit 501 includes: a type determination subunit, a template acquisition subunit, and an information acquisition subunit. The type determination subunit is used to determine the type of security risk based on the description information of the alarm event. The template acquisition subunit is used to obtain information extraction rules corresponding to the type of security risk and a verification method corresponding to the type of security risk. The information acquisition subunit is used to obtain message related information from the description information of the alarm event based on the information extraction rules.
[0191] In another possible implementation, the information obtaining unit 501 is configured to receive configuration information.
[0192] Optionally, the device further includes: an information modification unit 505, and the information modification unit 505 is used to modify the configuration information according to the received modification instruction.
[0193] Optionally, the information modification unit 505 is used to modify the configuration information in any of the following ways: replacing suspected destructive characters in the configuration information with set characters; converting the target string in the configuration information, and the conversion method includes at least one of encoding, adding comment symbols, character splicing and variable replacement.
[0194] In one possible implementation, the verification message is used to trigger the host to be verified to respond to the execution result of the setting command carried in the verification message; the data acquisition unit 504 is used to receive a response message sent by the host to be verified to the verification message; and according to the verification method, the execution result of the setting command is obtained from the response message, and the execution result of the setting command belongs to the verification result data.
[0195] In another possible implementation, the verification message is used to trigger the host to be verified to access the forensic server; the data acquisition unit 504 is used to obtain the access record of the forensic server after the time point when the verification message is sent; and according to the verification method, the access record related to the host to be verified is obtained from the accessed record, and the access record related to the host to be verified belongs to the verification result data.
[0196] In another possible implementation, the verification message includes a first verification message and a second verification message, the first verification message is used to trigger the host to be verified to create or modify a specified file, and the second verification message is used to access the specified file. The data acquisition unit 504 is used to receive a response message sent by the host to be verified to the second verification message; and according to the verification method, obtain a hypertext transfer protocol HTTP response code from the response message, or obtain a set string from the message body of the response message, the set string is used to indicate that the specified file is successfully accessed, and the HTTP response code or the set string belongs to the verification result data.
[0197] Optionally, the device further includes: a screenshot obtaining unit 506, which is used to obtain a screenshot, and the screenshot is used to display a display interface after the sender of the verification message receives a response message to the verification message.
[0198] Optionally, the device further includes: a storage unit 507, and the storage unit 507 is used to store the association relationship between the alarm event identifier associated with the security risk and the verification result data.
[0199] Optionally, the device further includes: a determination unit 508, which is used to determine whether the host to be verified has a security risk according to the verification result data.
[0200] Optionally, the determination unit 508 is used to determine whether there is a security risk in the host to be verified in any of the following ways: if in the verification result data, the execution result of the host to be verified for the setting command carried in the verification message is the same as the expected result corresponding to the verification message, then it is determined that there is a security risk in the host to be verified; if in the verification result data, the execution result of the host to be verified for the setting command carried in the verification message satisfies the regular expression corresponding to the verification message, then it is determined that there is a security risk in the host to be verified; if the verification result data indicates that the host to be verified accessed the forensics server after the time point of sending the verification message, then it is determined that there is a security risk in the host to be verified; if the verification result data indicates that the host to be verified created or modified the specified file after the time point of sending the verification message, then it is determined that there is a security risk in the host to be verified.
[0201] It should be noted that the security risk verification device provided in the above embodiment only uses the division of the above functional units as an example when verifying security risks. In actual applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the device can be divided into different functional units to complete all or part of the functions described above. In addition, the security risk verification device provided in the above embodiment and the security risk verification method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0202] The descriptions of the processes corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process, please refer to the relevant descriptions of other processes.
[0203] Figure 6 6 is a schematic diagram of the structure of an electronic device 600 provided in an embodiment of the present application. The electronic device 600 includes at least one processor 601 , a memory 602 , and at least one network interface 603 .
[0204] Optionally, the electronic device 600 is a single physical computer. Alternatively, the electronic device 600 includes multiple physical computers, and at least one processor 601, a memory 602, and at least one network interface 603 of the electronic device 600 are distributed on different physical computers. For example, the electronic device 600 is a cluster computer.
[0205] The processor 601 is, for example, a general-purpose central processing unit (CPU), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solution of the present application. For example, the processor 601 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0206] The memory 602 is, for example, a read-only memory (ROM) or other static storage device that can store static information and instructions, a random access memory (RAM) or other dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. Optionally, the memory 602 exists independently and is connected to the processor 601 through the internal connection 604. Alternatively, the memory 602 and the processor 601 are optionally integrated together.
[0207] The network interface 603 uses any transceiver-like device for communicating with other devices or communication networks. The network interface 603 includes, for example, at least one of a wired network interface or a wireless network interface. The wired network interface is, for example, an Ethernet interface. The Ethernet interface is, for example, an optical interface, an electrical interface, or a combination thereof. The wireless network interface is, for example, a wireless local area network (WLAN) interface, a cellular network interface, or a combination thereof.
[0208] In some embodiments, the processor 601 includes one or more CPUs, such as Figure 6 CPU0 and CPU1 are shown in the figure.
[0209] In some embodiments, the electronic device 600 optionally includes multiple processors, such as Figure 6 601 and processor 605 are shown in FIG. Each of these processors is, for example, a single-core processor (single-CPU), or a multi-core processor (multi-CPU). The processor herein optionally refers to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0210] In some embodiments, the electronic device 600 further includes an internal connection 604. The processor 601, the memory 602, and the at least one network interface 603 are connected via the internal connection 604. The internal connection 604 includes a path to transmit information between the above components. Optionally, the internal connection 604 is a single board or a bus. Optionally, the internal connection 604 is divided into an address bus, a data bus, a control bus, etc.
[0211] In some embodiments, the electronic device 600 further includes an input-output interface 606. The input-output interface 606 is connected to the internal connection 604.
[0212] In some embodiments, the input / output interface 606 is used to connect to an input device to receive commands or data involved in the above method embodiments input by a user through an input device, such as setting commands, setting expected results of commands, setting regular expressions corresponding to commands, address information corresponding to a forensic server, setting strings, etc. Input devices include but are not limited to keyboards, touch screens, microphones, mice, or sensor devices, etc.
[0213] In some embodiments, the input / output interface 606 is also used to connect to an output device. The input / output interface 606 outputs the intermediate results and / or final results generated by the processor 301 executing the above method embodiment through the output device, such as information indicating whether the first attack event is a successful attack event. The output device includes but is not limited to a display, a printer, a projector, and the like.
[0214] Optionally, the processor 601 implements the method in the above embodiment by reading the program code 610 stored in the memory 602, or the processor 601 implements the method in the above embodiment by the program code stored internally. In the case where the processor 601 implements the method in the above embodiment by reading the program code 610 stored in the memory 602, the memory 602 stores the program code for implementing the method provided in the embodiment of the present application.
[0215] For more details on how the processor 601 implements the above functions, please refer to the descriptions in the previous method embodiments, which will not be repeated here.
[0216] In some embodiments, a computer-readable storage medium is also provided, which stores computer instructions. When the computer instructions stored in the computer-readable storage medium are executed by an electronic device, the electronic device executes the security risk verification method provided above.
[0217] In some embodiments, a computer program product is also provided, which includes one or more computer program instructions. When the computer program instructions are loaded and executed by a computer, the computer executes the method provided by the above method embodiment.
[0218] In some embodiments, a chip is also provided, including a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call and run the computer instructions from the memory to execute the method provided by the above method embodiment.
[0219] Unless otherwise defined, the technical or scientific terms used herein shall have the usual meanings understood by persons of ordinary skill in the field to which this application belongs. The words "first", "second", "third" and similar terms used in the patent application specification and claims of this application do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, similar words such as "one" or "one" do not indicate a quantitative limitation, but rather indicate the presence of at least one. Similar words such as "include" or "comprise" mean that the elements or objects appearing before "include" or "comprises" cover the elements or objects listed after "include" or "comprises" and their equivalents, and do not exclude other elements or objects.
[0220] The above is only an embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A security risk verification method, characterized in that: The method comprises: Obtaining configuration information, the configuration information including a type of security risk and a verification rule, the verification rule being used to indicate message related information and a verification method corresponding to the type of security risk; Generate a verification message according to the message related information; Sending the verification message to the host to be verified; According to the verification method, verification result data associated with the verification message is obtained, and the verification result data is used to indicate whether the host to be verified has the security risk.
2. The method according to claim 1, characterized in that The obtaining of configuration information includes: Determine the type of security risk based on the description information of the alarm event; Obtaining information extraction rules corresponding to the type of security risk and verification methods corresponding to the type of security risk; Based on the information extraction rule, the message related information is obtained from the description information of the alarm event.
3. The method according to claim 1, characterized in that The obtaining of configuration information includes: The configuration information is received.
4. The method according to claim 2 or 3, characterized in that: The method further comprises: The configuration information is modified according to the received modification instruction.
5. The method according to claim 4, characterized in that The modifying of the configuration information includes at least one of the following: Replacing the suspected destructive characters in the configuration information with set characters; The target character string in the configuration information is converted, wherein the conversion includes at least one of encoding, adding annotation symbols, character concatenation and variable replacement.
6. The method according to any one of claims 1 to 5, characterized in that: The verification rule includes a sub-rule, and the sub-rule is used to indicate message-related information and a verification method associated with a verification message; or, The verification rule includes multiple sub-rules, each sub-rule is used to indicate message-related information and a verification method associated with a verification message, and among the multiple sub-rules, the verification result of the first sub-rule is the trigger condition of the second sub-rule, or the verification result of the first sub-rule is associated with the message-related information corresponding to the second sub-rule.
7. The method according to any one of claims 1 to 6, characterized in that: The verification message is an HTTP request message, and the message-related information includes at least one of the following: a request method of the verification message, a request uniform resource locator URL of the verification message, a message header of the verification message, and a message body of the verification message.
8. The method according to claim 7, characterized in that The type of the security risk is a cross-site scripting attack, the request method of the verification message is GET, the URL of the verification message carries an attack payload, and the message header of the verification message includes an identifier of the host to be verified.
9. The method according to any one of claims 1 to 8, characterized in that: The verification message is used to trigger the host to be verified to respond to the execution result of the setting command carried in the verification message; The obtaining, according to the verification method, verification result data associated with the verification message includes: Receiving a response message sent by the host to be verified to the verification message; According to the verification method, the execution result of the setting command is obtained from the response message, and the execution result of the setting command belongs to the verification result data.
10. The method according to any one of claims 1 to 8, characterized in that: The verification message is used to trigger the host to be verified to access the forensics server; The obtaining, according to the verification method, verification result data associated with the verification message includes: Obtaining access records of the forensic server after the time point of sending the verification message; According to the verification method, the access record related to the host to be verified is obtained from the accessed record, and the access record related to the host to be verified belongs to the verification result data.
11. The method according to any one of claims 1 to 8, characterized in that: The verification message includes a first verification message and a second verification message, the first verification message is used to trigger the host to be verified to create or modify a specified file, and the second verification message is used to access the specified file; The obtaining, according to the verification method, verification result data associated with the verification message includes: receiving a response message sent by the host to be verified to the second verification message; According to the verification method, a Hypertext Transfer Protocol HTTP response code is obtained from the response message, or a setting string is obtained from the message body of the response message, wherein the setting string is used to indicate that the specified file is successfully accessed, and the HTTP response code or the setting string belongs to the verification result data.
12. The method according to any one of claims 1 to 11, characterized in that: The method further comprises: A screenshot is obtained, where the screenshot is used to display a display interface after the sender of the verification message receives a response message to the verification message.
13. The method according to any one of claims 1 to 12, characterized in that: The method further comprises: Save the association between the alarm event identifier associated with the security risk and the verification result data.
14. A security risk verification device, characterized in that: The device comprises: An information obtaining unit, used to obtain configuration information of security risks, the configuration information including the type of security risks and verification rules, the verification rules being used to indicate message related information and verification methods corresponding to the type of security risks; A message generating unit, used to generate a verification message according to the message related information; A sending unit, used for sending the verification message to the host to be verified; The data obtaining unit is used to obtain the verification result data associated with the verification message according to the verification method, and the verification result data is used to indicate whether the host to be verified has the security risk.
15. The device according to claim 14, characterized in that The information obtaining unit comprises: A type determination subunit, used to determine the type of the security risk based on the description information of the alarm event; A template obtaining subunit, used to obtain information extraction rules corresponding to the type of the security risk and a verification method corresponding to the type of the security risk; The information acquisition subunit is used to obtain the message related information from the description information of the alarm event based on the information extraction rule.
16. The device according to claim 14, characterized in that The information obtaining unit is used to receive the configuration information.
17. The device according to claim 14 or 15, characterized in that The device also includes: The information modification unit is used to modify the configuration information according to the received modification instruction.
18. The device according to claim 17, characterized in that The information modification unit is used to modify the configuration information in any of the following ways: Replacing the suspected destructive characters in the configuration information with set characters; The target character string in the configuration information is converted, and the conversion process includes at least one of encoding, adding comment symbols, character concatenation and variable replacement.
19. The device according to any one of claims 14 to 18, characterized in that The verification rule includes a sub-rule, and the sub-rule is used to indicate message-related information and a verification method associated with a verification message; Alternatively, the verification rule includes multiple sub-rules, each of which is used to indicate message-related information and a verification method associated with a verification message, and among the multiple sub-rules, the verification result of the first sub-rule is the trigger condition of the second sub-rule, or the verification result of the first sub-rule is associated with the message-related information corresponding to the second sub-rule.
20. The device according to any one of claims 14 to 19, characterized in that The verification message is an HTTP request message, and the message-related information includes at least one of the following: a request method of the verification message, a request uniform resource locator URL of the verification message, a message header of the verification message, and a message body of the verification message.
21. The device according to claim 20, characterized in that The type of the security risk is a cross-site scripting attack, the request method of the verification message is GET, the URL of the verification message carries an attack payload, and the message header of the verification message includes an identifier of the host to be verified.
22. The device according to any one of claims 14 to 21, characterized in that The verification message is used to trigger the host to be verified to respond to the execution result of the setting command carried in the verification message; The data obtaining unit is used to receive a response message sent by the host to be verified to the verification message; And according to the verification method, the execution result of the setting command is obtained from the response message, and the execution result of the setting command belongs to the verification result data.
23. The device according to any one of claims 14 to 21, characterized in that The verification message is used to trigger the host to be verified to access the forensics server; The data acquisition unit is used to obtain the access record of the forensic server after the time point of sending the verification message; and according to the verification method, obtain the access record related to the host to be verified from the access record, and the access record related to the host to be verified belongs to the verification result data.
24. The device according to any one of claims 14 to 21, characterized in that The verification message includes a first verification message and a second verification message, the first verification message is used to trigger the host to be verified to create or modify a specified file, and the second verification message is used to access the specified file; The data obtaining unit is configured to receive a response message sent by the host to be verified to the second verification message; According to the verification method, a Hypertext Transfer Protocol HTTP response code is obtained from the response message, or a setting string is obtained from the message body of the response message, wherein the setting string is used to indicate that the specified file is successfully accessed, and the HTTP response code or the setting string belongs to the verification result data.
25. The device according to any one of claims 14 to 24, characterized in that The device also includes: The screenshot obtaining unit is used to obtain a screenshot, wherein the screenshot is used to display a display interface after the sender of the verification message receives a response message to the verification message.
26. The device according to any one of claims 14 to 25, characterized in that The device also includes: The storage unit is used to store the association relationship between the alarm event identifier associated with the security risk and the verification result data.
27. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory is used to store a software program, and the processor runs or executes the software program stored in the memory so that the electronic device implements the method according to any one of claims 1 to 13.
28. A security risk verification system, characterized in that: The security risk verification system includes a security analysis device and an attack detection device. The security analysis device is used to obtain configuration information of security risks and send the configuration information to the attack detection device, the configuration information including the type of security risk and verification rules, the verification rules are used to indicate the message related information and verification method corresponding to the type of security risk; The attack detection device is used to receive the configuration information; generate a verification message according to the message related information; Sending the verification message to the host to be verified; According to the verification method, verification result data associated with the verification message is obtained, and the verification result data is used to indicate whether the host to be verified has the security risk.
29. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes executed by a processor, wherein the program codes include instructions for implementing the method according to any one of claims 1 to 13.
30. A computer program product, characterized in that The computer program product comprises program codes, and when a computer runs the computer program product, the computer is caused to execute the method according to any one of claims 1 to 13.
