[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

WO2022166166A1 - Function verification method and apparatus for security component - Google Patents

Function verification method and apparatus for security component Download PDF

Info

Publication number
WO2022166166A1
WO2022166166A1 PCT/CN2021/113909 CN2021113909W WO2022166166A1 WO 2022166166 A1 WO2022166166 A1 WO 2022166166A1 CN 2021113909 W CN2021113909 W CN 2021113909W WO 2022166166 A1 WO2022166166 A1 WO 2022166166A1
Authority
WO
WIPO (PCT)
Prior art keywords
test sample
test
result
function
protective device
Prior art date
Application number
PCT/CN2021/113909
Other languages
French (fr)
Chinese (zh)
Inventor
杨利东
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022166166A1 publication Critical patent/WO2022166166A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability

Definitions

  • Protection devices In order to improve the security of the local area network, many enterprises have set up protective equipment such as firewalls and security gateways. Protection devices usually integrate many security components, such as fragmentation serialization processing components, session reassembly components, traffic detection components, file restoration components, file detection components, protocol identification components, domain name detection components and many more. The protection device uses a series of security components to detect attacks on packets, so as to block attacks in time when an attack is discovered, thereby ensuring the network security of the local area network.
  • security components such as fragmentation serialization processing components, session reassembly components, traffic detection components, file restoration components, file detection components, protocol identification components, domain name detection components and many more.
  • the protection device uses a series of security components to detect attacks on packets, so as to block attacks in time when an attack is discovered, thereby ensuring the network security of the local area network.
  • the method further includes: generating a function verification result according to whether the detection result is consistent with the expected result, the The function verification result is used to indicate whether the function of the safety component is normal.
  • the above method helps to avoid functional verification failure due to interception of test samples.
  • the detection result includes an attack type, a protocol type, a virus type, a malicious domain name, a malicious Internet protocol (IP) address, or an indicator of no attack.
  • IP Internet protocol
  • test server in a third aspect, includes a memory, a network interface, and at least one processor, and the test server is configured to implement the functions of the first aspect or any optional manner of the first aspect.
  • a network system in a fourth aspect, includes the test server and the protection device provided in the third aspect.
  • the embodiment of the present application provides a method for realizing high-efficiency security component function verification based on the linkage between a test server and a protection device.
  • a test sample is delivered to a test sample deployed in an actual network environment, and the test sample flows through the protection device as input traffic in sequence.
  • each safety component detects the test sample to generate the corresponding test result, compares the test result with the expected result, and determines whether the safety component in the protective device functions normally according to the comparison result.
  • the method supports the execution of the use process when the protection device is deployed in the existing network, thereby finally realizing all-weather guarantee for the security components of the existing network device.
  • the test server 11 is optionally deployed in the Internet (or referred to as an extranet), and the test server 11 is sometimes also referred to as a cloud server.
  • the test server 11 stores test samples, and the test samples include attack packets, packet streams carrying malicious files, and the like.
  • the test server 11 includes a result comparison module.
  • the result comparison module is used to compare the detection result sent by the protective device with the expected result to determine whether the function of the safety component in the protective device is normal.
  • the protective device 21 , the protective device 22 , the protective device 23 , and the protective device 24 are respectively deployed in the local area networks of different customers. As shown in FIG. 1 , the protection device 21 is deployed at the boundary of the local area network of customer one, the protection device 22 is deployed at the boundary of the local area network of customer two, the protection device 23 is deployed at the boundary of the local area network of customer three, and the protection device 24 is deployed at the boundary of the local area network of customer N. boundary.
  • a specific description is given below by taking a protective device 24 in FIG. 1 as an example. For the principles of other protective devices in FIG. 1 , reference may be made to the protective device 24 .
  • the protection device 24 includes but is not limited to firewalls, security gateways (such as routers or switches), intrusion detection system (intrusion detection system, IDS) type devices, intrusion prevention system (intrusion prevention system, IPS) type devices, unified threat management (unified threat management) management, UTM) equipment, anti-virus (anti-virus, AV) equipment, anti-distributed denial-of-service attack (distributed denial-of-service attack, DDoS) (anti-DDoS) equipment, next generation firewall (next generation firewall, NGFW) ) of one or more of .
  • firewalls security gateways (such as routers or switches), intrusion detection system (intrusion detection system, IDS) type devices, intrusion prevention system (intrusion prevention system, IPS) type devices, unified threat management (unified threat management) management, UTM) equipment, anti-virus (anti-virus, AV) equipment, anti-distributed denial-of-service attack (distributed denial-of-service attack, DDoS) (anti
  • the protection device 24 performs security detection on the packet flow in and out of the local area network through multiple security components, thereby confirming whether the packets in the packet flow are attack packets and whether the files carried in the packet flow are malicious files.
  • the plurality of security components in the protective device 24 can optionally be in a serial-processed relationship or a parallel-processed relationship. The function of each safety component in the protective device 24 is described below.
  • the session reassembly component is used to arrange the individual packets in order.
  • the session reorganization component is specifically used to reorganize each TCP message in the TCP flow into a complete TCP session after sorting.
  • the packets processed by the session reassembly component are obtained after being processed by the fragment serialization processing component.
  • the protocol identification component is used to identify the protocol on which the message is based.
  • the protocol identification component is specifically configured to identify the application layer protocol on which the message is based, such as hypertext transfer protocol (hyper text transfer protocol, HTTP), file transfer protocol (file transfer protocol, FTP), Simple mail transfer protocol (simple mail transfer protocol, SMTP) and so on.
  • the file restore component is used to obtain files from messages. Specifically, after the protocol identification component identifies the application layer protocol, the file restoration module performs application layer protocol analysis on one or more packets based on the application layer protocol, and reorganizes the payload field of the analysis result to obtain the file.
  • the blacklist component is used to detect whether the source address of the packet matches the blacklist. If the source address of the packet matches the blacklist, the packet is discarded and the subsequent detection process is not continued.
  • the whitelist component is used to detect whether the source address of the packet matches the whitelist. If the source address of the packet matches the whitelist, the packet will be released instead of continuing the further detection process.
  • the reputation detection component is used to detect the content contained in the message, such as URLs or files.
  • the reputation comes from the alarm hash (hash) generated by the historical detection content. By comparing the hash of the new file with the hash in the reputation, it can achieve high Efficient content detection, no need to scan and detect the content again.
  • Attack packets refer to packets that initiate network attacks through packets.
  • the attack packets are flood attack packets, buffer overflow attack packets, and single-packet attack packets (eg, malformed packets, scan attack packets, etc.).
  • the normal message is, for example, a service message from a client.
  • Test files include but are not limited to malicious files or normal files.
  • the malicious file used as the test file is, for example, an executable file. After the malicious file is executed on the client, it will cause an attack on the client. Malicious files contain malicious code. For example, malicious files are files that contain viruses, Trojans, or worms.
  • Fig. 3, Fig. 4 and Fig. 5 show the contents of three PCAP files.
  • FIG. 4 shows the content of the mining login attack message.
  • the meaning of the data in Figure 4 is the four interactive processes of the mining login attack. Among them, the first step is for the client to send a mining login request; the second step is for the server to return the mining work content; the third step is for the client to send a heartbeat request to the server; the fourth step is for the server to confirm the client’s heartbeat ask.
  • Implementation mode 1 The test server sends the test sample to the protective device.
  • the protective device pulls the test samples from the test server. Specifically, the protective device sends a sample acquisition request to the test server. The test server sends a test sample to the protective device in response to the sample acquisition request from the protective device.
  • the sample acquisition request is triggered by a command input by the administrator to the protective device; alternatively, the sample acquisition request is triggered every set time period.
  • Test server stores the test sample in a designated storage address accessible by the protective device.
  • the file transfer server acts as a relay between the test server and the protective device, and the file transfer server is responsible for sending test samples to the protective device.
  • the test server and the file transfer server provide test samples through linkage.
  • the test server sends a transfer instruction to the file transfer server.
  • the meaning of the transfer instruction is to instruct the file transfer server to send a test sample to the protective device.
  • the file transfer server sends the test sample to the protective device in response to the transfer instruction from the test server.
  • Step S203 the protection device detects the test sample through the security component, and generates a detection result.
  • the protocol type is the type of protocol based on which the attack is launched.
  • the protocol type is the detection result of the above protocol identification component.
  • test samples are the 3 attack PCAPs shown in Table 1.
  • Attacking PCAP is an offensive PCAP file, and the content of attacking PCAP includes attacking packet flow.
  • the registration request is used to request the registration of an administrator account.
  • the registration request contains the administrator account and the device ID of the protective device.
  • the registration request is triggered by the registration action of the administrator of the protective device.
  • Step C In response to the query request, the test server queries the account information table and the result information table according to the administrator account, so as to obtain the function verification result corresponding to the device identification.
  • the query request is used to query the functional verification results of the security components in the protective device.
  • the query request contains the administrator account.
  • the account information table stores the correspondence between one administrator account and the device identifiers of multiple protection devices.
  • the test server queries the account information table and the result information table according to the administrator account, so as to obtain multiple functional verification results corresponding to multiple device IDs, and provide multiple functional verification results to the initiator of the query request, so that the administrator can view each item in batches. condition of protective equipment.
  • the test server determines whether the administrator account is in the logged-in state, provides the function verification result if the administrator account is in the logged-in state, and rejects the administrator account in the unlogged state Provides functional verification results.
  • One way to log in with the administrator account is that the administrator triggers a login request, and the login request includes the administrator account and password.
  • the test server receives the login request, queries the account information table according to the administrator account in the login request, and obtains the password corresponding to the administrator account. If the password in the login request is the same as the one obtained from the account information table, it is determined that the password is correct and the login request is approved. If the password in the login request is different from the password queried from the account information table, it is determined that the password is incorrect and the login request is rejected.
  • Scenario 2 Trigger the component upgrade according to the functional verification result.
  • the test server sends a notification message if the functional verification result indicates that the security component is not functioning properly.
  • the notification message is used to inform the administrator of the protective device or the functional verification result of the protective device.
  • the test server sends a notification message to the administrator through email, SMS, etc., so as to notify the administrator that the security component is not functioning properly, so that the administrator can deal with the failure on the security component.
  • the destination of the notification message is a protective device
  • the test server sends a notification message to notify the protective device that the security component is not functioning properly, so that the protective device can upgrade the security component to automatically correct the fault.
  • step S201 in the method shown in FIG. 2 is implemented by means of encrypted downloading.
  • the test server encrypts the test sample to obtain the encrypted test sample.
  • the test server sends encrypted test samples to the guard.
  • the protection device receives the encrypted test sample from the test server, the protection device decrypts the encrypted test sample, obtains the test sample in plaintext, and detects the test sample in plaintext.
  • the protection device is the firewall in FIG. 6 .
  • the firewall acts as a client for detecting the protection loopholes in the local area network.
  • the firewall is placed inside the local area network, and multiple switches are deployed in front of the firewall. If the test sample enters the LAN from the Internet and reaches the firewall after passing through multiple switches, it is determined that there is a loophole in the network protection of the LAN.
  • This usage mode supports attack demonstration or network security defense evaluation scenarios, which is of high value.
  • Example 1 includes the following steps 1 to 5.
  • the test sample in Figure 2 is the attack PCAP in Figure 7.
  • the protection device in FIG. 2 is the firewall deployed in the customer N local area network in FIG. 7 .
  • the test server in FIG. 2 is the test server deployed in the Internet in FIG. 7 .
  • the firewall is connected to the customer's N local area network to ensure network connectivity. It can fully provide the forwarding function and can connect to the Internet at the same time.
  • the firewall administrator registers an account in the cloud (test server in the Internet), and sets the option to connect to the test server to enable the pull attack PCAP operation.
  • the firewall administrator configures the firewall security policy (each security component), and upgrades the detection library of each component (in actual use, due to the long sales and deployment time, the firewall component detection library lags behind the latest detection library, the latest detection library is daily In order to ensure the detection ability and effect, it is necessary to ensure that the component detection function is up-to-date).
  • the firewall uses the attacking PCAP pulled from the test server as the input of the detection function, and each security component cooperates with each other in the detection process to detect the attacking PCAP.
  • Each security component processes the network traffic in the attacking PCAP and generates corresponding detection results.
  • attack PCAP is processed in the firewall in the form of packet flow. During the processing, after each security component detects the packet flow, each security component generates corresponding detection logs after processing the attack PCAP.
  • the firewall uploads the detection results corresponding to each component to the test server in the Internet.
  • the firewall After the firewall generates detection results, the firewall will actively upload the detection results to the Internet server. When uploading the detection result, the device ID of the firewall, such as ESN, will be carried.
  • the test server compares the detection result uploaded by the firewall with the expected result, so as to determine whether the function of the security component is normal. If the security component does not function properly, the test server notifies the administrator to deal with the corresponding failure or automatically correct the failure.
  • test server also associates the acquired detection log with the account created by the firewall administrator in the above step 1 according to the device identification.
  • the test server After the test server completes the functional verification, it synchronizes the functional verification results to the firewall. If the firewall determines that a certain component is not functioning properly according to the function verification result returned by the test server, the firewall will actively upgrade the corresponding component or notify the administrator to deal with it, so as to eliminate the fault.
  • synchronization includes two ways. The first synchronization method is that after the firewall uploads the detection log, the test server in the Internet directly returns the function verification result. The second is that after the firewall uploads the detection log, it actively sends requests to the test server in the Internet at intervals to obtain the function verification results in batches.
  • the above embodiment is based on the cloud-firewall architecture, and realizes efficient verification and evaluation of the functions of firewall security components. Compared with related technologies, the use effect and use cost will be greatly improved. Tested in actual data, 100% of the security components can be realized. Functional verification and evaluation can detect component functional failures in advance, so as to avoid security risks in the customer LAN due to component failures.
  • the deployment location of the test server in FIG. 7 is changed from being deployed in the Internet to being deployed in a local area network.
  • a common server or a third-party device is placed in the local area network as a test server to provide test services, and this method can also achieve the desired goal.
  • test server in Figure 7 can also be placed inside the protective device.
  • the test service is placed in the firewall (a kind of protective device), and the firewall calls the internal test service to test the security components, thereby providing the function verification service.
  • test server The following is an example of the basic hardware structure of the test server.
  • the test server 600 shown in FIG. 10 is the test server 11 in FIG. 1 .
  • the test server 600 shown in FIG. 10 is the test server in the method shown in FIG. 2 .
  • Test server 600 includes at least one processor 601 , memory 602 and at least one network interface 603 .
  • test server 600 optionally includes multiple processors, such as processor 601 and processor 605 shown in FIG. 10 .
  • processors are, for example, a single-core processor (single-CPU), or a multi-core processor (multi-CPU).
  • a processor herein optionally refers to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • the input and output interface 606 is used to connect with an input device, and receive commands or data input by a user through the input device related to the above embodiments, such as expected results corresponding to test samples, administrator accounts, and addresses of test servers.
  • Input devices include, but are not limited to, keyboards, touch screens, microphones, mice, or sensing devices.
  • the processor 601 is further configured to, after reading the program code 610 stored in the memory 602, perform the following operations: generate a function verification result according to whether the detection result is consistent with the expected result, and the function verification result is used to indicate the safety component's Is the function normal.
  • the processing unit 703 is further configured to support the apparatus 700 to encrypt the test sample.
  • a unit 701 is provided for supporting the apparatus 700 to send the encrypted test sample to the protective device.
  • a computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server, or data center over a wire (e.g.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present application relates to the technical field of networks, and provides a function verification method and apparatus for a security component. In the present application, a test packet or a packet stream carrying a test packet as a test sample is provided to a protection device; the test sample as input traffic flows through the security component in the protection device, sequentially; the security component performs a test on the test sample to generate a test result; the test result generated by the security component is compared with an expected result; whether a function of the security component is normal is determined according to the comparison result. The method supports function verification when the protection device has been deployed in an actual network, and thus, the method is suitable for scenarios of frequently upgrading and changing a security component, and facilitates timely discovery of a security component having a function failure in an actual application. Moreover, the method supports automatic execution of a function verification process, thereby avoiding tedious operations of manual testing, and improving test efficiency.

Description

安全组件的功能验证方法及装置Method and device for functional verification of security components
本申请要求于2021年2月3日提交的申请号为202110152435.8、发明名称为“安全组件的功能验证方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application No. 202110152435.8 filed on February 3, 2021 and titled "Method and Device for Functional Verification of Security Components", the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请涉及网络技术领域,特别涉及一种安全组件的功能验证方法及装置。The present application relates to the field of network technologies, and in particular, to a method and device for functional verification of a security component.
背景技术Background technique
为了提升局域网的安全性,很多企业设置了防火墙、安全网关等防护设备。防护设备中通常会集成很多安全组件,例如分片(fragmentation)序列化(serialization)处理组件、会话重组(reassembly)组件、流量检测组件、文件还原组件、文件检测组件、协议识别组件、域名检测组件等等。防护设备通过一系列安全组件对报文进行攻击检测,以便在发现攻击时及时地阻断攻击从而保证局域网的网络安全。In order to improve the security of the local area network, many enterprises have set up protective equipment such as firewalls and security gateways. Protection devices usually integrate many security components, such as fragmentation serialization processing components, session reassembly components, traffic detection components, file restoration components, file detection components, protocol identification components, domain name detection components and many more. The protection device uses a series of security components to detect attacks on packets, so as to block attacks in time when an attack is discovered, thereby ensuring the network security of the local area network.
目前,依赖防护设备出厂前的功能测试流程来保证防护设备中安全组件的功能。例如,主要依赖于防护设备厂商的测试人员对防护设备中包括的安全组件的功能进行测试,测试人员根据测试结果判断安全组件的功能是否正常。At present, the functional testing process of the protective equipment before it leaves the factory is relied on to ensure the function of the safety components in the protective equipment. For example, testers who mainly rely on the protective equipment manufacturer test the functions of the security components included in the protective equipment, and the testers judge whether the functions of the security components are normal according to the test results.
然而上述方法只能保证防护设备在出厂时功能正常,在防护设备部署至现网后的使用过程中,防护设备中的安全组件经常频繁升级变动,变动过程中可能发生安全组件功能失效,同时没有测试人员对安全组件进行功能测试,导致无法及时发现功能失效的安全组件。由此可见,上述方法对安全组件功能验证的效果不佳。However, the above methods can only ensure that the protective equipment functions normally when it leaves the factory. During the use process after the protective equipment is deployed to the live network, the security components in the protective equipment are frequently upgraded and changed. During the change process, the function of the security components may fail. Testers perform functional tests on security components, resulting in failure to find security components with functional failures in time. It can be seen that the above method is not effective for functional verification of security components.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种安全组件的功能验证方法及装置,能够提升对安全组件功能验证的效果。所述技术方案如下。The embodiments of the present application provide a method and device for functional verification of security components, which can improve the effect of functional verification of security components. The technical solution is as follows.
第一方面,提供了一种安全组件的功能验证方法,该方法包括:向防护设备提供测试样本,所述测试样本包括测试报文或承载测试文件的报文流中的至少一项;获取所述防护设备中安全组件对所述测试样本进行检测而产生的检测结果;将所述检测结果与所述测试样本对应的预期结果进行对比;如果所述检测结果与所述预期结果一致,确定所述安全组件的功能正常。In a first aspect, a method for functional verification of a security component is provided, the method comprising: providing a protection device with a test sample, where the test sample includes at least one of a test packet or a packet stream carrying a test file; The test result generated by the safety component in the protective device testing the test sample; compare the test result with the expected result corresponding to the test sample; if the test result is consistent with the expected result, determine the test result. The security components described above are functioning properly.
上述方法将测试报文或者承载测试文件的报文流等作为测试样本提供给防护设备,测试样本作为输入流量依次流经防护设备中的安全组件,由安全组件对测试样本进行测试后产生检测结果,将安全组件产生的检测结果与预期结果进行比对,根据比对的结果判定安全组件是否功能正常。该方法支持在防护设备已部署于实际网络中的情况下做功能验证,因此适于安全组件频繁升级变动的场景,有助于及时发现实际应用中功能失效的安全组件。同时,该方法支持功能验证流程的自动化执行,避免人工测试的繁琐操作,提升测试效率。因此,该方法提升对安全组件功能验证的效果。The above method provides the test packet or the packet stream carrying the test file as a test sample to the protection device, and the test sample flows through the security component in the protection device as input traffic in turn, and the security component tests the test sample and generates a detection result. , compare the detection result generated by the security component with the expected result, and determine whether the security component functions normally according to the comparison result. This method supports functional verification when the protection device has been deployed in the actual network, so it is suitable for scenarios where security components are frequently upgraded and changed, and is helpful for timely discovery of security components that fail in practical applications. At the same time, the method supports the automatic execution of the functional verification process, avoids the tedious operation of manual testing, and improves the testing efficiency. Therefore, the method improves the effect of functional verification of the security component.
可选地,所述测试样本包括第一测试样本,所述向防护设备提供测试样本之前,所述方法还包括:接收来自于所述防护设备的下载请求,所述下载请求包括所述防护设备的设备标 识;根据所述设备标识从样本库查询得到所述第一测试样本,所述第一测试样本是所述样本库中所述设备标识对应的测试样本,所述样本库包括至少一组设备标识与测试样本之间的对应关系。Optionally, the test sample includes a first test sample, and before providing the test sample to the protective device, the method further includes: receiving a download request from the protective device, where the download request includes the protective device The first test sample is obtained by querying the sample library according to the device identification, and the first test sample is the test sample corresponding to the device identification in the sample library, and the sample library includes at least one set of Correspondence between equipment identification and test samples.
上述方式有助于提供与设备的具体功能更加匹配的测试样本,便于在不同设备上用不同测试样本针对性地做验证,有助于功能验证更精细、更灵活。The above method helps to provide test samples more matching with the specific functions of the device, facilitates targeted verification with different test samples on different devices, and helps function verification to be more refined and flexible.
可选地,所述将所述检测结果与所述测试样本对应的预期结果进行对比之后,所述方法还包括:根据所述检测结果与所述预期结果是否一致,生成功能验证结果,所述功能验证结果用于指示所述安全组件的功能是否正常。Optionally, after comparing the detection result with the expected result corresponding to the test sample, the method further includes: generating a function verification result according to whether the detection result is consistent with the expected result, the The function verification result is used to indicate whether the function of the safety component is normal.
可选地,所述方法还包括:响应于包含管理员账号以及所述防护设备的设备标识的注册请求,在账号信息表中保存所述设备标识与所述管理员账号之间的对应关系;在结果信息表中保存所述功能验证结果与所述设备标识之间的对应关系;响应于包含所述管理员账号的查询请求,根据所述管理员账号查询所述账号信息表以及所述结果信息表,从而得到所述设备标识对应的功能验证结果,向所述查询请求的发起方提供所述设备标识对应的功能验证结果。Optionally, the method further includes: in response to a registration request including an administrator account and a device identification of the protective device, saving a correspondence between the device identification and the administrator account in an account information table; The corresponding relationship between the function verification result and the device identifier is stored in the result information table; in response to the query request including the administrator account, the account information table and the result are queried according to the administrator account information table, thereby obtaining the function verification result corresponding to the device identification, and providing the function verification result corresponding to the device identification to the initiator of the query request.
上述方式一方面给管理员提供信息渠道,帮助管理员了解防护设备各组件的功能是否正常,另一方面基于账号进行访问控制,持有管理员账号的访问者能获得防护设备组件功能是否正常的信息,未持有管理员账号的访问者无法获得防护设备组件功能是否正常的信息,提高信息安全。On the one hand, the above methods provide administrators with information channels to help administrators understand whether the functions of various components of the protective equipment are normal. Information, visitors who do not hold an administrator account cannot obtain information on whether the components of the protective equipment are functioning properly, improving information security.
可选地,所述生成功能验证结果之后,所述方法还包括:若所述功能验证结果指示所述安全组件的功能不正常,对所述安全组件进行升级;或者,若所述功能验证结果指示所述安全组件的功能不正常,发送通知消息,所述通知消息用于告知所述防护设备的管理员或者所述防护设备所述功能验证结果。Optionally, after generating the function verification result, the method further includes: if the function verification result indicates that the function of the security component is abnormal, upgrading the security component; or, if the function verification result indicates that the function of the security component is abnormal, upgrading the security component; Indicates that the function of the security component is abnormal, and sends a notification message, where the notification message is used to notify the administrator of the protection device or the protection device of the function verification result.
在测试发现安全组件功能不正常的情况下,通过自动对安全组件升级,或者将组件不正常的情况主动通知给管理员或防护设备,有助于组件的故障得到闭环处置,实现自动化纠正故障。In the event that the function of the security component is found to be abnormal, by automatically upgrading the security component, or proactively notifying the administrator or protective equipment of the abnormality of the component, it is helpful for the component failure to be handled in a closed-loop, and the failure can be automatically corrected.
可选地,所述向防护设备提供测试样本,包括:对所述测试样本进行加密,向所述防护设备发送加密后的测试样本。Optionally, the providing the test sample to the protective device includes: encrypting the test sample, and sending the encrypted test sample to the protective device.
上述方式有助于避免测试样本被拦截导致功能验证失败。The above method helps to avoid functional verification failure due to interception of test samples.
可选地,所述方法由部署在互联网中的服务器执行,所述防护设备部署在局域网中,其中,所述局域网配置有访问控制策略,所述访问控制策略用于禁止所述局域网中的防护设备接收来自于所述互联网的数据,所述向防护设备提供测试样本,包括:向所述局域网中的所述防护设备发送所述测试样本;所述方法还包括:如果所述测试样本被成功传输至所述防护设备,确定所述局域网的防护存在漏洞。Optionally, the method is performed by a server deployed in the Internet, and the protection device is deployed in a local area network, wherein the local area network is configured with an access control policy, and the access control policy is used to prohibit the protection in the local area network. The device receives data from the Internet, and the providing the test sample to the protective device includes: sending the test sample to the protective device in the local area network; the method further includes: if the test sample is successful It is transmitted to the protection device, and it is determined that there is a loophole in the protection of the local area network.
上述方式能够评估局域网的网络安全性,支持攻击演示或网络安全防御评估场景。The above methods can evaluate the network security of the local area network, and support attack demonstration or network security defense evaluation scenarios.
可选地,所述检测结果包括攻击类型、协议类型、病毒类型、恶意域名、恶意互联网协议(internet protocol,IP)地址或者无攻击的指示符。Optionally, the detection result includes an attack type, a protocol type, a virus type, a malicious domain name, a malicious Internet protocol (IP) address, or an indicator of no attack.
上述方式支持入侵防御系统(intrusion prevention system,IPS)组件、协议识别组件、文件检测组件、域名检测组件、IP地址检测组件等多种组件的测试,让测试功能更加全面和多样化。The above method supports the testing of various components such as intrusion prevention system (IPS) components, protocol identification components, file detection components, domain name detection components, and IP address detection components, making the testing functions more comprehensive and diverse.
第二方面,提供了一种安全组件的功能验证装置,该安全组件的功能验证装置具有实现 上述第一方面或上述第一方面的任意一种可选方式所述方法的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的单元。In a second aspect, a function verification device for a security component is provided, and the function verification device for a security component has the function of implementing the method described in the above-mentioned first aspect or any optional manner of the above-mentioned first aspect. The functions can be implemented by hardware, and can also be implemented by hardware executing corresponding software. The hardware or software includes one or more units corresponding to the above functions.
第三方面,提供了一种测试服务器,测试服务器包括存储器、网络接口和至少一个处理器,该测试服务器用于实现上述第一方面或第一方面任一种可选方式的功能。In a third aspect, a test server is provided. The test server includes a memory, a network interface, and at least one processor, and the test server is configured to implement the functions of the first aspect or any optional manner of the first aspect.
第四方面,提供了一种网络系统,该网络系统包括第三方面提供的测试服务器以及防护设备。In a fourth aspect, a network system is provided, and the network system includes the test server and the protection device provided in the third aspect.
第五方面,提供了一种计算机可读存储介质,该存储介质中存储有至少一条指令,该指令在计算机上运行时,使得计算机执行上述第一方面或第一方面任一种可选方式所提供的方法。A fifth aspect provides a computer-readable storage medium, where at least one instruction is stored in the storage medium, and when the instruction is executed on a computer, causes the computer to execute the above-mentioned first aspect or any optional manner of the first aspect. provided method.
第六方面,提供了一种计算机程序产品,所述计算机程序产品包括一个或多个计算机程序指令,当所述计算机程序指令被计算机加载并运行时,使得所述计算机执行上述第一方面或第一方面任一种可选方式所提供的方法。In a sixth aspect, a computer program product is provided, the computer program product includes one or more computer program instructions, when the computer program instructions are loaded and executed by a computer, cause the computer to execute the first aspect or the first aspect. A method provided by any of the alternatives on the one hand.
第七方面,提供了一种芯片,包括存储器和处理器,存储器用于存储计算机指令,处理器用于从存储器中调用并运行该计算机指令,以执行上述第一方面及其第一方面任意可能的实现方式中的方法。In a seventh aspect, a chip is provided, including a memory and a processor, the memory is used for storing computer instructions, and the processor is used for calling and running the computer instructions from the memory to execute the above-mentioned first aspect and any possible possible aspects of the first aspect. method in the implementation.
附图说明Description of drawings
图1是本申请实施例提供的一种应用场景的示意图;1 is a schematic diagram of an application scenario provided by an embodiment of the present application;
图2是本申请实施例提供的一种安全组件的功能验证方法的流程图;2 is a flowchart of a method for functional verification of a security component provided by an embodiment of the present application;
图3是本申请实施例提供的一种PCAP文件的内容示意图;3 is a schematic diagram of the content of a PCAP file provided by an embodiment of the present application;
图4是本申请实施例提供的另一种PCAP文件的内容示意图;4 is a schematic diagram of the content of another PCAP file provided by an embodiment of the present application;
图5是本申请实施例提供的另一种PCAP文件的内容示意图;5 is a schematic diagram of the content of another PCAP file provided by an embodiment of the present application;
图6是本申请实施例提供的另一种应用场景的示意图;6 is a schematic diagram of another application scenario provided by an embodiment of the present application;
图7是本申请实施例提供的另一种安全组件的功能验证方法的流程图;7 is a flowchart of another method for functional verification of a security component provided by an embodiment of the present application;
图8是本申请实施例提供的另一种安全组件的功能验证方法的流程图;8 is a flowchart of another method for functional verification of a security component provided by an embodiment of the present application;
图9是本申请实施例提供的另一种安全组件的功能验证方法的流程图;9 is a flowchart of another method for functional verification of a security component provided by an embodiment of the present application;
图10是本申请实施例提供的一种测试服务器的结构示意图;10 is a schematic structural diagram of a test server provided by an embodiment of the present application;
图11是本申请实施例提供的一种安全组件的功能验证装置的结构示意图。FIG. 11 is a schematic structural diagram of an apparatus for functional verification of a security component provided by an embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
相关技术依赖防护设备出厂前的功能测试流程来保证防护设备中安全组件的功能。然而这种方式存在诸多缺陷。第一,无法保障经过出厂前功能测试的防护设备部署到实际网络环境后,检测功能仍然正常。第二,防护设备发生故障后需要人工手动定位故障点。第三,故障排查较为被动,防护设备中的组件发生故障后才进行排查而无法提前预知。The related technology relies on the functional testing process of the protective equipment before it leaves the factory to ensure the function of the safety components in the protective equipment. However, this approach has many flaws. First, there is no guarantee that the detection function of protective equipment that has undergone pre-factory functional testing is deployed in the actual network environment. Second, after the protective equipment fails, it is necessary to manually locate the fault point. Third, the troubleshooting is relatively passive, and the components in the protective equipment are checked after the failure and cannot be predicted in advance.
本申请实施例提供了一种基于测试服务器与防护设备联动从而实现高效率安全组件功能验证的方法,向部署于实际网络环境中的测试样本下发测试样本,测试样本作为输入流量依次流经防护设备中各个安全组件,由各个安全组件对测试样本进行检测从而生成对应的检测结果,将检测结果与预期结果进行比对,根据比对的结果判定防护设备中安全组件是否功能 正常。第一,该方法支持在防护设备部署在现网中的使用过程执行,从而最终实现对现网设备安全组件全天候保障。第二,该方法能够由测试服务器自动执行,降低对人工操作的依赖,从而有助于快速地对安全组件进行功能检测。测试服务器能够对大量防护设备进行测试,对测试样本和测试结果进行统一管理和维护,从而能够从整体视角对网络中大量防护设备的安全性进行分析,发现防护薄弱点和漏洞。第三,通过主动对组件发起功能验证流程,有助于提前感知组件功能故障,从而避免因为组件故障造成网络安全风险。The embodiment of the present application provides a method for realizing high-efficiency security component function verification based on the linkage between a test server and a protection device. A test sample is delivered to a test sample deployed in an actual network environment, and the test sample flows through the protection device as input traffic in sequence. For each safety component in the device, each safety component detects the test sample to generate the corresponding test result, compares the test result with the expected result, and determines whether the safety component in the protective device functions normally according to the comparison result. First, the method supports the execution of the use process when the protection device is deployed in the existing network, thereby finally realizing all-weather guarantee for the security components of the existing network device. Second, the method can be automatically executed by the test server, reducing the reliance on manual operations, thereby helping to quickly perform functional testing of security components. The test server can test a large number of protective devices, manage and maintain the test samples and test results in a unified manner, so as to analyze the security of a large number of protective devices in the network from an overall perspective, and find the weak points and loopholes of the protection. Third, by actively initiating a functional verification process for components, it is helpful to sense component functional failures in advance, thereby avoiding network security risks caused by component failures.
下面对本申请实施例的应用场景举例说明。The application scenarios of the embodiments of the present application are described below with examples.
附图1是本申请实施例提供的一种应用场景的示意图。附图1示出了测试服务器11与防护设备21、防护设备22、防护设备23以及防护设备24进行交互的场景。FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present application. FIG. 1 shows a scenario in which the test server 11 interacts with the protective device 21 , the protective device 22 , the protective device 23 , and the protective device 24 .
测试服务器11可选地部署在互联网(或称外网)中,测试服务器11有时也称为云端服务器。测试服务器11存储有测试样本,测试样本包括攻击报文、承载恶意文件的报文流等。测试服务器11包括结果比对模块。结果比对模块用于对防护设备发送的检测结果与预期结果进行对比从而判定防护设备中安全组件的功能是否正常。The test server 11 is optionally deployed in the Internet (or referred to as an extranet), and the test server 11 is sometimes also referred to as a cloud server. The test server 11 stores test samples, and the test samples include attack packets, packet streams carrying malicious files, and the like. The test server 11 includes a result comparison module. The result comparison module is used to compare the detection result sent by the protective device with the expected result to determine whether the function of the safety component in the protective device is normal.
防护设备21、防护设备22、防护设备23以及防护设备24分别部署在不同客户的局域网中。如附图1所示,防护设备21部署在客户一局域网的边界,防护设备22部署在客户二局域网的边界,防护设备23部署在客户三局域网的边界,防护设备24部署在客户N的局域网的边界。下面以附图1中一个防护设备24为例进行具体说明,附图1中其他防护设备的原理可参考防护设备24。The protective device 21 , the protective device 22 , the protective device 23 , and the protective device 24 are respectively deployed in the local area networks of different customers. As shown in FIG. 1 , the protection device 21 is deployed at the boundary of the local area network of customer one, the protection device 22 is deployed at the boundary of the local area network of customer two, the protection device 23 is deployed at the boundary of the local area network of customer three, and the protection device 24 is deployed at the boundary of the local area network of customer N. boundary. A specific description is given below by taking a protective device 24 in FIG. 1 as an example. For the principles of other protective devices in FIG. 1 , reference may be made to the protective device 24 .
防护设备24用于保护客户N的局域网。如附图1所示,客户N的局域网包括客户端、服务器、交换机等设备,这些设备是防护设备24要保护的设备。防护设备24具体用于保护局域网中的这些设备免受攻击者从互联网发起的攻击,或者保护局域网中的这些设备不被攻击者利用来传播威胁。The protective device 24 is used to protect Client N's local area network. As shown in FIG. 1 , the local area network of the client N includes devices such as clients, servers, and switches, and these devices are the devices to be protected by the protection device 24 . The protection device 24 is specifically used to protect these devices in the local area network from attacks initiated by attackers from the Internet, or to protect these devices in the local area network from being exploited by attackers to spread threats.
防护设备24包括而不限于防火墙、安全网关(如路由器或交换机)、入侵检测系统(intrusion detection system,IDS)类设备、入侵防御系统(intrusion prevention system,IPS)类设备、统一威胁管理(unified threat management,UTM)设备、反病毒(anti-virus,AV)设备、抗分布式拒绝服务攻击(distributed denial-of-service attack,DDoS)(anti-DDoS)设备、下一代防火墙(next generation firewall,NGFW)中一项或多项的集成。The protection device 24 includes but is not limited to firewalls, security gateways (such as routers or switches), intrusion detection system (intrusion detection system, IDS) type devices, intrusion prevention system (intrusion prevention system, IPS) type devices, unified threat management (unified threat management) management, UTM) equipment, anti-virus (anti-virus, AV) equipment, anti-distributed denial-of-service attack (distributed denial-of-service attack, DDoS) (anti-DDoS) equipment, next generation firewall (next generation firewall, NGFW) ) of one or more of .
防护设备24包括多个安全组件。如附图1所示,防护设备24中安全组件包括而不限于分片序列化处理组件、会话重组组件、流量检测组件、文件检测组件、协议识别组件、文件还原组件、域名检测组件、黑名单组件、白名单组件、或者信誉检测组件等。需要说明的是,图1只是示例性说明,防护设备中可能包含图1所示的组件中的部分组件,或者包含更多组件。防护设备24通过多个安全组件对进、出局域网的报文流进行安全性检测,从而确认报文流中的报文是否是攻击报文,以及报文流中承载的文件是否是恶意文件。防护设备24中多个安全组件可选是串行处理的关系或者并行处理的关系。下面对防护设备24中各安全组件的功能进行介绍。 Guard 24 includes a number of safety components. As shown in FIG. 1 , the security components in the protection device 24 include, but are not limited to, a fragmentation serialization processing component, a session reassembly component, a traffic detection component, a file detection component, a protocol identification component, a file restoration component, a domain name detection component, and a blacklist. component, whitelist component, or reputation detection component, etc. It should be noted that FIG. 1 is only an exemplary illustration, and the protective equipment may include some of the components shown in FIG. 1 , or include more components. The protection device 24 performs security detection on the packet flow in and out of the local area network through multiple security components, thereby confirming whether the packets in the packet flow are attack packets and whether the files carried in the packet flow are malicious files. The plurality of security components in the protective device 24 can optionally be in a serial-processed relationship or a parallel-processed relationship. The function of each safety component in the protective device 24 is described below.
分片序列化处理组件用于对互联网协议(internet protocol,IP)分片进行重新排序以及重新组装,丢弃其中重叠、不完整或者其他无效的分片。The fragment serialization processing component is used to reorder and reassemble Internet Protocol (IP) fragments, and discard overlapping, incomplete or otherwise invalid fragments.
会话重组组件用于将各个报文按照顺序排列。其中,对于传输控制协议(transmission control protocol,TCP)来说,会话重组组件具体用于将TCP流中的各个TCP报文排序后重 组为完整的TCP会话。可选地,会话重组组件所处理的报文是基于分片序列化处理组件处理后得到的。The session reassembly component is used to arrange the individual packets in order. Wherein, for the transmission control protocol (transmission control protocol, TCP), the session reorganization component is specifically used to reorganize each TCP message in the TCP flow into a complete TCP session after sorting. Optionally, the packets processed by the session reassembly component are obtained after being processed by the fragment serialization processing component.
流量检测组件用于对报文中的数据与签名库中的攻击签名进行匹配(attack signature matching),如果报文中的数据与攻击签名匹配则确定报文具有攻击性。攻击签名用来描述网络入侵行为的特征。签名库包含各种已知攻击行为的签名或者管理员自定义设置的签名。The traffic detection component is used to match the data in the packet with the attack signature in the signature library (attack signature matching). If the data in the packet matches the attack signature, the packet is determined to be offensive. Attack signatures are used to describe the characteristics of network intrusion behaviors. The signature library contains signatures of various known attack behaviors or signatures customized by administrators.
文件检测模块用于对文件中的数据与特征库中的攻击特征进行匹配,如果文件中的数据与特征库中的攻击特征匹配则确定文件为恶意文件。攻击特征用于描述病毒、木马等恶意文件的特征。特征库包含各种已知恶意文件的特征。The file detection module is used to match the data in the file with the attack signature in the signature database, and if the data in the file matches the attack signature in the signature database, the file is determined to be a malicious file. Attack signatures are used to describe the characteristics of malicious files such as viruses and Trojans. The signature library contains the signatures of various known malicious files.
协议识别组件用于识别报文所基于的协议。在一些实施例中,协议识别组件具体用于识别报文所基于的应用层协议,应用层协议例如超文本传输协议(hyper text transfer protocol,HTTP)、文件传输协议(file transfer protocol,FTP)、简单邮件传输协议(simple mail transfer protocol,SMTP)等。The protocol identification component is used to identify the protocol on which the message is based. In some embodiments, the protocol identification component is specifically configured to identify the application layer protocol on which the message is based, such as hypertext transfer protocol (hyper text transfer protocol, HTTP), file transfer protocol (file transfer protocol, FTP), Simple mail transfer protocol (simple mail transfer protocol, SMTP) and so on.
文件还原组件用于从报文中获得文件。具体地,协议识别组件识别出应用层协议后,文件还原模块基于该应用层协议对一个或多个报文进行应用层协议解析,并对解析结果的载荷字段进行重组,从而获得文件。The file restore component is used to obtain files from messages. Specifically, after the protocol identification component identifies the application layer protocol, the file restoration module performs application layer protocol analysis on one or more packets based on the application layer protocol, and reorganizes the payload field of the analysis result to obtain the file.
黑名单组件用于检测报文的源地址是否命中黑名单,若报文的源地址命中黑名单,则报文被丢弃,不再继续后续检测流程。The blacklist component is used to detect whether the source address of the packet matches the blacklist. If the source address of the packet matches the blacklist, the packet is discarded and the subsequent detection process is not continued.
白名单组件用于检测报文的源地址是否命中白名单,若报文的源地址命中白名单,则不再继续后续的进一步检测流程而是放行报文。The whitelist component is used to detect whether the source address of the packet matches the whitelist. If the source address of the packet matches the whitelist, the packet will be released instead of continuing the further detection process.
域名检测组件用于检测报文的发起方的域名或者文件内包含的域名。The domain name detection component is used to detect the domain name of the originator of the packet or the domain name contained in the file.
信誉检测组件用于检测报文中包含的内容,例如URL或文件,信誉来自于历史检测内容产生的告警哈希(hash),通过比对新文件的哈希与信誉中的哈希,实现高效率内容检测,不必对内容再次扫描检测。The reputation detection component is used to detect the content contained in the message, such as URLs or files. The reputation comes from the alarm hash (hash) generated by the historical detection content. By comparing the hash of the new file with the hash in the reputation, it can achieve high Efficient content detection, no need to scan and detect the content again.
下面对本申请实施例的方法流程举例说明。The method flow of the embodiment of the present application is illustrated below with an example.
附图2是本申请实施例提供的一种安全组件的功能验证方法的流程图。附图2所示方法包括以下步骤S201至步骤S207。FIG. 2 is a flowchart of a method for functional verification of a security component provided by an embodiment of the present application. The method shown in FIG. 2 includes the following steps S201 to S207.
可选地,附图2所示方法所基于的网络部署场景如附图1所示。例如,结合附图1来看,附图2所示方法中的防护设备为附图1中的防护设备24,附图2所示方法中的测试服务器为附图1中的测试服务器11,附图2所示方法测试的安全组件为附图1中防护设备24内部的分片序列化处理组件、会话重组组件、流量检测组件、文件检测组件、协议识别组件、文件还原组件、域名检测组件、IP地址检测组件、黑名单组件、白名单组件或者信誉检测组件中的至少一项。Optionally, the network deployment scenario on which the method shown in FIG. 2 is based is shown in FIG. 1 . For example, referring to FIG. 1, the protective device in the method shown in FIG. 2 is the protective device 24 in FIG. 1, the test server in the method shown in FIG. 2 is the test server 11 in FIG. The security components tested by the method shown in FIG. 2 are the fragmentation serialization processing component, session reorganization component, traffic detection component, file detection component, protocol identification component, file restoration component, domain name detection component, At least one of an IP address detection component, a blacklist component, a whitelist component, or a reputation detection component.
附图2所示方法以测试服务器和防护设备分设为例描述流程,防护设备主要负责对测试样本进行检测,执行附图2中步骤S202、步骤S203、步骤S204,测试服务器主要负责对检测结果与预期结果进行比对从而判定安全组件是否工作正常,执行附图2中步骤S201、步骤S205、步骤S206和步骤S207。在测试服务器和防护设备合设实现时,步骤S201、步骤S202、步骤S203、步骤S204、步骤S205、步骤S206和步骤S207均由测试服务器和防护设备所集成的设备执行。比如,测试服务器集成在防护设备上时,以下测试服务器执行的步骤实际上是防护设备执行的。The method shown in FIG. 2 takes the test server and the protection equipment as an example to describe the process. The protection equipment is mainly responsible for testing the test samples, and performing steps S202, S203 and S204 in FIG. The expected results are compared to determine whether the security component works normally, and steps S201, S205, S206 and S207 in FIG. 2 are performed. When the test server and the protection device are combined, step S201, step S202, step S203, step S204, step S205, step S206 and step S207 are all performed by the device integrated with the test server and the protection device. For example, when the test server is integrated on the guard, the following steps performed by the test server are actually executed by the guard.
步骤S201、测试服务器向防护设备提供测试样本。Step S201, the test server provides a test sample to the protective device.
测试样本用于测试防护设备中安全组件功能是否正常。测试样本包括测试报文或承载测试文件的报文流中的至少一项。测试报文包括而不限于攻击报文或者正常报文。Test samples are used to test the proper functioning of safety components in protective equipment. The test sample includes at least one of a test packet or a packet stream carrying a test file. Test packets include but are not limited to attack packets or normal packets.
攻击报文是指通过报文发起网络攻击的报文。例如,攻击报文是泛洪(flood)攻击报文、缓冲区溢出攻击报文、单包攻击报文(如畸形报文、扫描类攻击报文等)。正常报文例如是来自客户端的业务报文。Attack packets refer to packets that initiate network attacks through packets. For example, the attack packets are flood attack packets, buffer overflow attack packets, and single-packet attack packets (eg, malformed packets, scan attack packets, etc.). The normal message is, for example, a service message from a client.
测试文件包括而不限于恶意文件或者正常文件。作为测试文件的恶意文件例如是可执行文件,客户端上执行恶意文件后会造成对客户端的攻击。恶意文件包含恶意代码。例如,恶意文件是包含病毒、木马或者蠕虫的文件。Test files include but are not limited to malicious files or normal files. The malicious file used as the test file is, for example, an executable file. After the malicious file is executed on the client, it will cause an attack on the client. Malicious files contain malicious code. For example, malicious files are files that contain viruses, Trojans, or worms.
在一些实施例中,测试样本为至少一个数据包捕获(packet capture,PCAP)文件。PCAP文件是指通过接口捕获网络流量后生成的文件。PCAP文件的内容包含报文流。具体地,PCAP文件的数据结构类似于文件头、数据包1、数据包2……数据包n,数据包1、数据包2……数据包n为PCAP文件中的报文流。可选地,作为测试样本的PCAP文件中的报文流承载了文件,PCAP文件中报文流承载的文件为测试文件。可替代地,作为测试样本的PCAP文件中报文流承载的内容为文件之外的其他数据,例如网页、多媒体数据等。In some embodiments, the test sample is at least one packet capture (PCAP) file. A PCAP file is a file generated after capturing network traffic through an interface. The content of the PCAP file contains the message flow. Specifically, the data structure of the PCAP file is similar to the file header, the data packet 1, the data packet 2...the data packet n, and the data packet 1, the data packet 2...the data packet n is the packet flow in the PCAP file. Optionally, the message flow in the PCAP file serving as the test sample carries a file, and the file carried by the message flow in the PCAP file is a test file. Alternatively, the content carried by the message stream in the PCAP file serving as the test sample is other data other than the file, such as web pages, multimedia data, and the like.
下面对作为测试样本的PCAP文件的内容做举例说明。请参考附图3、附图4和附图5,附图3、附图4和附图5示出了三个PCAP文件的内容。The content of the PCAP file serving as the test sample is illustrated below. Please refer to Fig. 3, Fig. 4 and Fig. 5. Fig. 3, Fig. 4 and Fig. 5 show the contents of three PCAP files.
附图3示出了powershell脚本攻击(powershell attack)报文的内容。附图3中加下划线的部分表示请求报文的内容,附图3中未加下划线的部分表示响应报文的内容。附图3中加粗字体表示恶意文件vercheck.ps1的内容。附图3中get/vercheck.ps1HTTP/1.1、host:185.128.41.90:44的含义是客户端基于HTTP 1.1协议、采用get方法、向IP地址为185.128.41.90:44的服务器请求获取文件vercheck.ps1。附图3中HTTP/1.1 200 ok表示服务器响应成功。FIG. 3 shows the content of a powershell script attack (powershell attack) message. The underlined part in FIG. 3 represents the content of the request message, and the ununderlined part in FIG. 3 represents the content of the response message. The bold font in Figure 3 represents the content of the malicious file vercheck.ps1. The meaning of get/vercheck.ps1HTTP/1.1 and host:185.128.41.90:44 in Figure 3 is that the client requests the file vercheck.ps1 from the server with IP address 185.128.41.90:44 based on the HTTP 1.1 protocol and using the get method. . In Figure 3, HTTP/1.1 200 ok indicates that the server responded successfully.
附图4示出了挖矿登录攻击(mining login attack)报文的内容。附图4中数据的含义为挖矿登录攻击的四次交互过程。其中,第一步为客户端发送挖矿登陆请求;第二步为服务端返回挖矿工作内容;第三步为客户端向服务端发送保持心跳请求;第四步为服务端确认客户端心跳请求。FIG. 4 shows the content of the mining login attack message. The meaning of the data in Figure 4 is the four interactive processes of the mining login attack. Among them, the first step is for the client to send a mining login request; the second step is for the server to return the mining work content; the third step is for the client to send a heartbeat request to the server; the fourth step is for the server to confirm the client’s heartbeat ask.
附图5示出了承载挖矿病毒的报文的内容。附图5中加下划线的部分表示请求报文的内容,附图5中未加下划线的部分表示响应报文的内容。附图5中加粗字体表示文件cohernece.txt的内容。附图5中get/w/cohernece.txt HTTP/1.1host:185.128.41.90:443的含义是客户端基于HTTP1.1协议采用get方法、向IP地址为185.128.41.90:443的服务器请求获取文件cohernece.txt。附图5中HTTP/1.1 200 ok表示服务器响应成功。文件cohernece.txt是一个包含挖矿病毒(coin miner病毒)的恶意文件。FIG. 5 shows the content of the message carrying the mining virus. The underlined part in FIG. 5 represents the content of the request message, and the ununderlined part in FIG. 5 represents the content of the response message. The bold font in FIG. 5 indicates the content of the file cohernece.txt. The meaning of get/w/cohernece.txt HTTP/1.1host:185.128.41.90:443 in Figure 5 is that the client uses the get method based on the HTTP1.1 protocol to request the server whose IP address is 185.128.41.90:443 to obtain the file cohernece .txt. In Figure 5, HTTP/1.1 200 ok indicates that the server responded successfully. The file cohernece.txt is a malicious file containing a coin miner virus.
通过采用PCAP文件充当验证防护设备组件功能时使用的样本,便于防护设备批量化地获取多个测试报文,同时也便于测试服务器将不同攻击类型的测试报文分开提供给防护设备。By using the PCAP file as a sample for verifying the functions of the protection device components, it is convenient for the protection device to obtain multiple test packets in batches, and it is also convenient for the test server to separately provide test packets of different attack types to the protection device.
测试服务器提供测试样本的具体实现方式包括而不限于下述实现方式一至实现方式二。The specific implementation manners for the test server to provide the test sample include but are not limited to the following implementation manners 1 to 2.
实现方式一、测试服务器将测试样本发送给防护设备。Implementation mode 1: The test server sends the test sample to the protective device.
在一些实施例中,防护设备从测试服务器拉取测试样本。具体地,防护设备向测试服务器发送样本获取请求。测试服务器响应于防护设备的样本获取请求,向防护设备发送测试样 本。可选地,样本获取请求由管理员向防护设备输入的命令触发;可替代地,样本获取请求每隔设定时间周期触发一次。In some embodiments, the protective device pulls the test samples from the test server. Specifically, the protective device sends a sample acquisition request to the test server. The test server sends a test sample to the protective device in response to the sample acquisition request from the protective device. Optionally, the sample acquisition request is triggered by a command input by the administrator to the protective device; alternatively, the sample acquisition request is triggered every set time period.
在另一些实施例中,测试服务器主动向防护设备推送测试样本。例如,测试服务器定时推送测试样本。或者,每当出现新增测试样本时,测试服务器向防护设备推送新增测试样本。In other embodiments, the test server actively pushes the test samples to the protective device. For example, the test server regularly pushes test samples. Alternatively, whenever a new test sample appears, the test server pushes the new test sample to the protective device.
实现方式二、测试服务器将测试样本存储至防护设备能够访问的指定存储地址。Implementation Mode 2: The test server stores the test sample in a designated storage address accessible by the protective device.
该指定存储地址例如为文件传输服务器上的存储目录。文件传输服务器包括而不限于HTTP服务器、FTP服务器、安全文件传送协议(SSH File Transfer Protocol或Secure FTP,SFTP)服务器、网络文件系统(Network File System,NFS)服务器等。The designated storage address is, for example, a storage directory on a file transfer server. File transfer servers include but are not limited to HTTP servers, FTP servers, Secure File Transfer Protocol (SSH File Transfer Protocol or Secure FTP, SFTP) servers, Network File System (Network File System, NFS) servers, and the like.
在采用实现方式二的情况下,文件传输服务器充当测试服务器与防护设备之间的中转,由文件传输服务器负责向防护设备发送测试样本。可选地,测试服务器和文件传输服务器通过联动提供测试样本。具体地,测试服务器将测试样本保存至该文件传输服务器之后,测试服务器向该文件传输服务器发送传输指示。传输指示的含义是指示文件传输服务器向防护设备发送测试样本。文件传输服务器响应于测试服务器的传输指示,向防护设备发送测试样本。In the case of the second implementation, the file transfer server acts as a relay between the test server and the protective device, and the file transfer server is responsible for sending test samples to the protective device. Optionally, the test server and the file transfer server provide test samples through linkage. Specifically, after the test server saves the test sample to the file transfer server, the test server sends a transfer instruction to the file transfer server. The meaning of the transfer instruction is to instruct the file transfer server to send a test sample to the protective device. The file transfer server sends the test sample to the protective device in response to the transfer instruction from the test server.
步骤S202、防护设备接收来自于测试服务器的测试样本。Step S202, the protective device receives the test sample from the test server.
例如请参考附图1所示的场景,防护设备24从测试服务器11拉取得到测试样本。For example, referring to the scenario shown in FIG. 1 , the protective device 24 pulls the test sample from the test server 11 .
步骤S203、防护设备通过安全组件对测试样本进行检测,产生检测结果。Step S203, the protection device detects the test sample through the security component, and generates a detection result.
检测结果的内容包括多种情况。可选地,检测结果用于指示测试样本是否存在攻击。例如,检测结果为有攻击的指示符或者无攻击的指示符。或者,可选地,检测结果为测试样本中攻击相关的信息。例如,检测结果包括攻击类型、协议类型、病毒类型、恶意域名或者恶意IP地址。The content of the test results includes a variety of situations. Optionally, the detection result is used to indicate whether there is an attack on the test sample. For example, the detection result is an indicator of an attack or an indicator of no attack. Or, optionally, the detection result is attack-related information in the test sample. For example, the detection results include attack type, protocol type, virus type, malicious domain name or malicious IP address.
攻击类型为测试样本存在的攻击所属的类型。攻击类型为防护设备中IPS组件的检测结果。IPS组件包括上述分片序列化处理组件、会话重组组件、流量检测组件、协议识别组件和域名检测组件。The attack type is the type of the attack that exists in the test sample. The attack type is the detection result of the IPS component in the protection device. The IPS component includes the above-mentioned fragmentation serialization processing component, session reorganization component, traffic detection component, protocol identification component and domain name detection component.
协议类型为发起攻击所基于的协议的类型。协议类型为上述协议识别组件的检测结果。The protocol type is the type of protocol based on which the attack is launched. The protocol type is the detection result of the above protocol identification component.
病毒类型为测试文件中病毒的类型。病毒类型为上述文件检测组件的检测结果。Virus type is the type of virus in the test file. The virus type is the detection result of the above-mentioned file detection component.
恶意域名为充当测试报文的攻击报文中的域名。恶意域名为上述域名检测组件的检测结果。The malicious domain name is the domain name in the attack packet serving as the test packet. The malicious domain name is the detection result of the above domain name detection component.
恶意IP地址为充当测试样本的攻击报文的源IP地址,或者为充当测试文件的恶意文件包含的IP地址。恶意IP地址为上述IP地址检测组件的检测结果。The malicious IP address is the source IP address of the attack packet serving as the test sample, or the IP address contained in the malicious file serving as the test file. The malicious IP address is the detection result of the above IP address detection component.
无攻击的指示符用于指示测试样本中不存在攻击。无攻击的指示符为防护设备中IPS组件或者文件检测组件的检测结果。The no-attack indicator is used to indicate that no attack is present in the test sample. The indicator of no attack is the detection result of the IPS component or the file detection component in the protection device.
例如,参见下表1,测试样本为表1所示的3个攻击PCAP。攻击PCAP即具有攻击性的PCAP文件,攻击PCAP的内容包括攻击报文流。For example, see Table 1 below, the test samples are the 3 attack PCAPs shown in Table 1. Attacking PCAP is an offensive PCAP file, and the content of attacking PCAP includes attacking packet flow.
表1Table 1
Figure PCTCN2021113909-appb-000001
Figure PCTCN2021113909-appb-000001
Figure PCTCN2021113909-appb-000002
Figure PCTCN2021113909-appb-000002
表1中,编号为1的攻击PCAP为001.PCAP,001.PCAP包括挖矿登录攻击的报文,001.PCAP经过防护设备中各个安全组件之后,IPS组件产生的检测结果为mining login attack(挖矿登录攻击,一种攻击类型),协议识别组件产生的检测结果为Jsonrpc/Stratum(一种协议类型),文件检测组件的检测结果为无,域名或IP组件的检测结果为ss.antpool.com(一个恶意域名)。In Table 1, the attack PCAP numbered 1 is 001.PCAP, 001.PCAP includes mining login attack packets, and 001.PCAP passes through each security component in the protection device, and the detection result generated by the IPS component is mining login attack ( Mining login attack, a type of attack), the detection result generated by the protocol identification component is Jsonrpc/Stratum (a protocol type), the detection result of the file detection component is none, and the detection result of the domain name or IP component is ss.antpool. com (a malicious domain name).
编号为2的攻击PCAP为002.PCAP,002.PCAP包括powershell脚本攻击的报文,002.PCAP经过防护设备中各个安全组件之后,IPS组件产生的检测结果为powershell attack(powershell脚本攻击,一种攻击类型),协议识别组件产生的检测结果为HTTP(一种协议类型),文件检测组件的检测结果为无,域名或IP组件的检测结果为evail.com(一个恶意域名)。The attack PCAP numbered 2 is 002.PCAP, 002.PCAP includes packets of powershell script attack, 002.PCAP passes through each security component in the protection device, and the detection result generated by the IPS component is powershell attack (powershell script attack, a type of powershell attack). attack type), the detection result generated by the protocol identification component is HTTP (a protocol type), the detection result of the file detection component is none, and the detection result of the domain name or IP component is evail.com (a malicious domain name).
编号为3的攻击PCAP为003.PCAP。003.PCAP包括承载文件coherence.txt的报文流。coherence.txt为包含coin miner病毒的文件。coherence.txt经过防护设备中各个安全组件之后,IPS组件产生的检测结果为无,协议识别组件产生的检测结果为HTTP(一种协议类型),文件检测组件的检测结果为coin miner病毒,域名或IP组件的检测结果为185.128.41.90(一个恶意IP地址)。Attack PCAP number 3 is 003.PCAP. 003.PCAP includes a packet stream carrying the file coherence.txt. coherence.txt is the file containing the coin miner virus. After coherence.txt passes through each security component in the protection device, the detection result generated by the IPS component is none, the detection result generated by the protocol identification component is HTTP (a protocol type), and the detection result of the file detection component is coin miner virus, domain name or The detection result of the IP component is 185.128.41.90 (a malicious IP address).
可选地,防护设备中各个安全组件串行处理测试样本。例如,首先安全组件1对测试样本进行检测,安全组件1将检测后的测试样本发送给安全组件2;然后安全组件2对安全组件1检测后的测试样本进行检测。或者,可选地,防护设备中各个安全组件并行处理测试样本,例如,安全组件1和安全组件2同时对测试样本进行检测。Optionally, each safety component in the protective device processes the test samples serially. For example, firstly, the security component 1 detects the test sample, and the security component 1 sends the detected test sample to the security component 2; then the security component 2 detects the test sample detected by the security component 1. Or, optionally, each safety component in the protective device processes the test sample in parallel, for example, the safety component 1 and the safety component 2 detect the test sample at the same time.
步骤S204、防护设备向测试服务器发送检测结果。Step S204, the protection device sends the detection result to the test server.
例如请参考附图1所示的场景,防护设备24将检测结果上传至测试服务器11。For example, referring to the scenario shown in FIG. 1 , the protective device 24 uploads the detection result to the test server 11 .
步骤S205、测试服务器获取防护设备的检测结果。Step S205, the test server obtains the detection result of the protective device.
可选地,上述检测结果为检测日志(也称check日志)的内容。检测日志是安全组件对测试样本进行检测而产生的日志。检测日志至少包括如表1所示的检测结果。可选地,检测日志还包括检测时间、安全组件的标识等。上述步骤S204的实现方式是,防护设备发送包含检测结果的检测日志。上述步骤S205的实现方式是,测试服务器接收来自于防护设备的检测日志,测试服务器从检测日志中获取检测结果。Optionally, the above detection result is the content of a detection log (also referred to as a check log). The detection log is the log generated by the security component detecting the test sample. The detection log includes at least the detection results shown in Table 1. Optionally, the detection log further includes detection time, identification of the security component, and the like. The implementation manner of the above step S204 is that the protection device sends a detection log including the detection result. The implementation manner of the above step S205 is that the test server receives the detection log from the protection device, and the test server obtains the detection result from the detection log.
步骤S206、测试服务器将检测结果与测试样本对应的预期结果进行对比。Step S206, the test server compares the detection result with the expected result corresponding to the test sample.
预期结果指示功能正常的安全组件对测试样本进行检测而产生的检测结果。例如,在测试样本包括攻击报文或者承载恶意文件的报文流的情况下,测试样本对应的预期结果指示测试样本存在攻击,例如,预期结果包括攻击类型、协议类型、病毒类型、恶意域名或者恶意IP地址。又如,在测试样本包括正常报文或者承载正常文件的报文流的情况下,测试样本对应的预期结果指示测试样本中不存在攻击(或者说测试样本是正常的)。例如,预期结果包括无攻击的指示符、协议类型、正常域名或者正常IP地址。The expected result indicates the detection result of a test sample performed by a functioning security component. For example, when the test sample includes attack packets or packet flows carrying malicious files, the expected result corresponding to the test sample indicates that the test sample has an attack. For example, the expected result includes attack type, protocol type, virus type, malicious domain name or Malicious IP address. For another example, in the case where the test sample includes normal packets or packet streams carrying normal files, the expected result corresponding to the test sample indicates that there is no attack in the test sample (or the test sample is normal). For example, expected results include indicators of no attack, protocol type, normal domain name, or normal IP address.
在一些实施例中,测试服务器预先保存上述预期结果。例如,测试服务器保存预期结果 库,预期结果库包括测试样本与预期结果之间的对应关系。测试服务器根据测试样本从预期结果库中查询得到上述预期结果。In some embodiments, the test server pre-stores the above expected results. For example, the test server maintains a library of expected results, which includes correspondence between test samples and expected results. The test server obtains the above-mentioned expected result by querying the expected result database according to the test sample.
可选地,预期结果由管理员人工标注产生。Optionally, the expected results are manually annotated by an administrator.
步骤S207、如果检测结果与预期结果一致,测试服务器确定安全组件的功能正常。Step S207, if the detection result is consistent with the expected result, the test server determines that the function of the security component is normal.
例如,在测试样本包括攻击报文或者承载恶意文件的报文流的情况下,如果检测结果包括无攻击的指示符,测试服务器确定安全组件的功能不正常。又如,在测试样本包括正常报文或者承载正常文件的报文流的情况下,如果检测结果包括攻击类型,测试服务器确定安全组件的功能不正常。For example, in the case where the test sample includes an attack packet or a packet flow carrying a malicious file, if the detection result includes an indicator of no attack, the test server determines that the function of the security component is abnormal. For another example, in the case where the test sample includes normal packets or packet flows carrying normal files, if the detection result includes an attack type, the test server determines that the function of the security component is abnormal.
此外可选地,如果检测结果与预期结果不一致,测试服务器确定安全组件的功能不正常。Also optionally, if the detection result is inconsistent with the expected result, the test server determines that the security component is not functioning properly.
本实施例提供的方法,将测试报文或者承载测试文件的报文流等作为测试样本提供给防护设备,测试样本作为输入流量依次流经防护设备中的安全组件,由安全组件对测试样本进行测试后产生检测结果,将安全组件产生的检测结果与预期结果进行比对,根据比对的结果判定安全组件是否功能正常。该方法支持在防护设备已部署于实际网络中的情况下做功能验证,因此适于安全组件频繁升级变动的场景,有助于及时发现实际应用中功能失效的安全组件。同时,该方法支持功能验证流程的自动化执行,避免人工测试的繁琐操作,提升测试效率。因此,该方法提升对安全组件功能验证的效果。In the method provided in this embodiment, test packets or packet streams carrying test files are provided to the protection device as test samples, and the test samples are used as input traffic to flow through the security components in the protection device in turn, and the security components process the test samples. After the test, a test result is generated, the test result generated by the security component is compared with the expected result, and whether the security component is functioning normally is determined according to the comparison result. This method supports functional verification when the protection device has been deployed in the actual network, so it is suitable for scenarios where security components are frequently upgraded and changed, and is helpful for timely discovery of security components that fail in practical applications. At the same time, the method supports the automatic execution of the functional verification process, avoids the tedious operation of manual testing, and improves the testing efficiency. Therefore, the method improves the effect of functional verification of the security component.
下面对附图2所示方法中步骤S201进行进一步说明,详见下述步骤S2011至步骤S2014。下述步骤S2011至步骤S2014以提供的测试样本为第一测试样本为例进行说明。Step S201 in the method shown in FIG. 2 will be further described below. For details, see steps S2011 to S2014 below. The following steps S2011 to S2014 are described by taking the provided test sample as the first test sample as an example.
步骤S2011、防护设备生成下载请求,向测试服务器发送下载请求。Step S2011, the protection device generates a download request, and sends the download request to the test server.
下载请求用于请求从测试服务器下载测试样本。下载请求包括防护设备的设备标识以及测试服务器的地址。下载请求例如是基于文件传输协议的请求。例如,下载请求为HTTP请求或者FTP请求。The download request is used to request the download of test samples from the test server. The download request includes the device ID of the guard and the address of the test server. The download request is, for example, a request based on a file transfer protocol. For example, the download request is an HTTP request or an FTP request.
设备标识用于标识防护设备。可选地,本实施例中的设备标识为电子序列号(electronic serial number,ESN)。ESN是用于唯一标识一个设备的数据,也称设备自身的电子标签,ESN例如1020608946。由于ESN是唯一ID,根据ESN能够确定设备类型,因此对于后续处理过程更为方便。可替代地,设备标识为IP地址或MAC地址。在一些实施例中,设备标识预先保存在防护设备中。Equipment identification is used to identify protective equipment. Optionally, the device identifier in this embodiment is an electronic serial number (electronic serial number, ESN). ESN is data used to uniquely identify a device, also known as the electronic label of the device itself, for example, ESN 1020608946. Since the ESN is a unique ID, the device type can be determined according to the ESN, which is more convenient for subsequent processing. Alternatively, the device identification is an IP address or a MAC address. In some embodiments, the device identification is pre-stored in the protective device.
测试服务器的地址例如为测试服务器的IP地址或域名。在一些实施例中,测试服务器的地址由管理员输入至防护设备。例如,防护设备的配置说明书中包含测试服务器的地址,管理员将说明书给出的地址配置到防护设备中。在另一些实施例中,防护设备出厂前,厂商会将测试服务器的地址预先保存在防护设备的配置文件中,防护设备在实际网络中部署上电后,会自动从配置文件中读取测试服务器的地址,在满足设定条件时,向测试服务器发送下载请求。设定条件包括但不限于初始化完成后,或者在实际网络中工作超过预定时间段后。在另一些实施例中,厂商会将测试服务器的地址随着组件更新包一并发送给已经在实际网络中部署的防护设备,以便于能更新测试服务器的地址。The address of the test server is, for example, the IP address or domain name of the test server. In some embodiments, the address of the test server is entered into the guard by an administrator. For example, the configuration manual of the protective device contains the address of the test server, and the administrator configures the address given in the manual into the protective device. In other embodiments, before the protective device leaves the factory, the manufacturer will save the address of the test server in the configuration file of the protective device in advance. After the protective device is deployed in the actual network and powered on, it will automatically read the test server from the configuration file. When the set conditions are met, a download request is sent to the test server. The setting conditions include, but are not limited to, after the initialization is completed, or after working in the actual network for more than a predetermined period of time. In other embodiments, the manufacturer will send the address of the test server together with the component update package to the protection devices that have been deployed in the actual network, so that the address of the test server can be updated.
在一个示例性实施例中,上述下载请求为HTTP请求,上述测试服务器的地址为sec.huawei.com,上述设备标识为防护设备的ESN,ESN的具体取值为1020608946,上述测试样本为攻击PCAP文件。防护设备发送包含如下内容的下载请求,从而以HTTP download方式从测试服务器拉取攻击PCAP文件。In an exemplary embodiment, the download request is an HTTP request, the address of the test server is sec.huawei.com, the device identifier is the ESN of the protection device, the specific value of the ESN is 1020608946, and the test sample is an attack PCAP document. The protection device sends a download request containing the following content to pull the attack PCAP file from the test server in HTTP download mode.
GET/PCAP?esn=1020608946HTTP/1.1GET/PCAP? esn=1020608946HTTP/1.1
host:sec.huawei.comhost:sec.huawei.com
步骤S2012、测试服务器接收来自于防护设备的下载请求。Step S2012, the test server receives the download request from the protection device.
步骤S2013、测试服务器根据下载请求中携带的设备标识,从样本库查询得到第一测试样本。Step S2013 , the test server obtains a first test sample by querying the sample library according to the device identifier carried in the download request.
第一测试样本是样本库中设备标识对应的测试样本,样本库包括至少一组设备标识与测试样本之间的对应关系。The first test sample is a test sample corresponding to the device identifier in the sample library, and the sample library includes at least one set of correspondences between the device identifier and the test sample.
步骤S2014、测试服务器向防护设备发送第一测试样本。Step S2014, the test server sends the first test sample to the protective device.
例如,上述设备标识为ESN,上述测试样本为攻击PCAP文件,样本库中保存ESN与攻击PCAP文件之间的一一对应关系。测试服务器获得下载请求携带的ESN,根据下载请求携带的ESN查询样本库,从而得到ESN对应的攻击PCAP文件,测试服务器向防护设备返回ESN对应的攻击PCAP文件。For example, the above device identifier is ESN, the above test sample is an attack PCAP file, and a one-to-one correspondence between the ESN and the attack PCAP file is stored in the sample library. The test server obtains the ESN carried in the download request, and queries the sample library according to the ESN carried in the download request to obtain the attack PCAP file corresponding to the ESN, and the test server returns the attack PCAP file corresponding to the ESN to the protection device.
可选地,样本库包括不同类型的防护设备的设备标识与不同类型的测试样本之间的对应关系,以便测试服务器利用样本库为不同类型的防护设备提供不同类型的测试样本。例如,样本库包括防火墙的设备标识与服务器信息块(Server Message Block,SMB)暴力破解攻击PCAP之间的对应关系、态势感知设备的设备标识与命令和控制(command and control,C&C)远控攻击PCAP之间的对应关系、IPS设备的设备标识与结构化查询语言(Structured Query Language,SQL)注入攻击PCAP之间的对应关系。测试服务器接收到来自于防火墙的下载请求后,根据下载请求中的防火墙的设备标识,从样本库中查询SMB暴力破解攻击PCAP,向防火墙提供SMB暴力破解攻击PCAP;测试服务器接收到来自于态势感知设备的下载请求后,根据下载请求中的态势感知设备的设备标识,从样本库中查询C&C远控攻击PCAP,向态势感知设备提供C&C远控攻击PCAP。Optionally, the sample library includes correspondences between device identifiers of different types of protective equipment and different types of test samples, so that the test server uses the sample library to provide different types of test samples for different types of protective equipment. For example, the sample library includes the correspondence between the device ID of the firewall and the Server Message Block (SMB) brute force attack PCAP, the device ID of the situational awareness device and the command and control (C&C) remote control attack Correspondence between PCAP, device identification of IPS device and Structured Query Language (SQL) injection attack PCAP. After the test server receives the download request from the firewall, it queries the SMB brute force attack PCAP from the sample library according to the device identification of the firewall in the download request, and provides the SMB brute force attack PCAP to the firewall; the test server receives the SMB brute force attack PCAP; After the download request of the device, according to the device identification of the situational awareness device in the download request, the C&C remote control attack PCAP is queried from the sample library, and the C&C remote control attack PCAP is provided to the situational awareness device.
考虑到不同设备所需验证的功能可能有所区别,测试服务器通过上述步骤S2011至步骤S2014来提供测试样本,有助于提供与设备的具体功能更加匹配的测试样本,便于在不同设备上用不同测试样本针对性地做验证,有助于功能验证更精细、更灵活。Considering that the functions required to be verified by different devices may be different, the test server provides test samples through the above steps S2011 to S2014, which helps to provide test samples that better match the specific functions of the device, and is convenient for different devices. Targeted verification of test samples is helpful for finer and more flexible functional verification.
在一些实施例中,测试服务器在执行附图2所示方法中步骤S206之后,测试服务器根据检测结果与预期结果是否一致,生成功能验证结果,保存生成的功能验证结果,以便后续通过交互功能验证结果给出功能是否正常。In some embodiments, after the test server performs step S206 in the method shown in FIG. 2, the test server generates a function verification result according to whether the detection result is consistent with the expected result, and saves the generated function verification result, so as to pass the interactive function verification later The result gives whether the function is normal.
功能验证结果用于指示安全组件的功能是否正常。例如,功能验证结果包括第一指示符或者第二指示符。如果功能验证结果包括第一指示符,指示安全组件的功能正常;如果功能验证结果包括第二指示符,指示安全组件的功能不正常。可选地,功能验证结果还包括安全组件的标识,从而指明结果对应的具体安全组件。The functional verification result is used to indicate whether the function of the safety component is normal. For example, the functional verification result includes the first indicator or the second indicator. If the function verification result includes the first indicator, it indicates that the function of the safety component is normal; if the function verification result includes the second indicator, it indicates that the function of the safety component is abnormal. Optionally, the function verification result further includes the identifier of the security component, so as to indicate the specific security component corresponding to the result.
下面对如何使用上述功能验证结果举例说明,详见下述情况一至情况三。The following is an example of how to use the above-mentioned functional verification results, see the following cases 1 to 3 for details.
情况一、向管理员账号的注册者提供功能验证结果。 Situation 1. Provide the function verification result to the registrant of the administrator account.
情况一包括以下步骤A至步骤D。Case one includes the following steps A to D.
步骤A、测试服务器响应于注册请求,在账号信息表中保存设备标识与管理员账号之间的对应关系。Step A: In response to the registration request, the test server saves the correspondence between the device identifier and the administrator account in the account information table.
注册请求用于请求注册管理员账号。注册请求包含管理员账号以及防护设备的设备标识。注册请求由防护设备的管理员的注册操作触发。The registration request is used to request the registration of an administrator account. The registration request contains the administrator account and the device ID of the protective device. The registration request is triggered by the registration action of the administrator of the protective device.
账号信息表用于保存管理员账号相关的信息。账号信息表包括至少一组设备标识与管理员账号之间的对应关系。测试服务器接收到注册请求之后,测试服务器从注册请求中获得设备标识与管理员账号,将获得的设备标识与管理员账号对应存储至账号信息表。The account information table is used to save the information related to the administrator account. The account information table includes at least one set of correspondences between device identifiers and administrator accounts. After the test server receives the registration request, the test server obtains the device identification and the administrator account from the registration request, and stores the obtained device identification and the administrator account in the account information table correspondingly.
在一些实施例中,注册请求还包括密码。测试服务器从注册请求中获得密码,在账号信息表中保存管理员账号与密码之间的对应关系。In some embodiments, the registration request also includes a password. The test server obtains the password from the registration request, and stores the correspondence between the administrator account and the password in the account information table.
示例性地,管理员根据防护设备的ESN注册独有的管理员账号,注册时填写三个字段:ESN、用户名(username)和密码(password),从而触发上述注册请求。其中,ESN字段的内容为设备标识,username字段的内容为管理员账号,password字段的内容为密码。Exemplarily, the administrator registers a unique administrator account according to the ESN of the protective device, and fills in three fields during registration: ESN, username (username) and password (password), thereby triggering the above registration request. The content of the ESN field is the device ID, the content of the username field is the administrator account, and the content of the password field is the password.
可选地,步骤A在附图2所示方法中步骤S201之前执行。Optionally, step A is performed before step S201 in the method shown in FIG. 2 .
步骤B、测试服务器在结果信息表中保存功能验证结果与设备标识之间的对应关系。Step B: The test server saves the corresponding relationship between the function verification result and the device identification in the result information table.
结果信息表用于保存功能验证结果相关的信息。结果信息表包括至少一组设备标识与功能验证结果之间的对应关系。The result information table is used to save the information related to the functional verification result. The result information table includes at least one set of correspondences between device identifiers and function verification results.
可选地,防护设备在执行附图2步骤S202时,在向测试服务器发送检测结果的基础上,还向测试服务器发送防护设备的设备标识。比如,防护设备将检测结果和设备标识封装在同一个报文中上送给测试服务器。测试服务器在执行附图2中步骤S203时,在接收到来自于防护设备的检测结果的基础上,还接收到来自于防护设备的设备标识。测试服务器在执行本步骤B时,将防护设备随检测结果一起上送的设备标识与功能验证结果之间的对应关系保存至结果信息表。Optionally, when the protective device performs step S202 in FIG. 2 , on the basis of sending the detection result to the test server, the device identifier of the protective device is also sent to the test server. For example, the protection device encapsulates the detection result and the device ID in the same packet and sends it to the test server. When the test server performs step S203 in FIG. 2 , on the basis of receiving the detection result from the protective device, it also receives the device identification from the protective device. When the test server executes this step B, the corresponding relationship between the device identification and the function verification result sent by the protective device together with the detection result is saved in the result information table.
步骤C、响应于查询请求,测试服务器根据管理员账号查询账号信息表以及结果信息表,从而得到设备标识对应的功能验证结果。Step C: In response to the query request, the test server queries the account information table and the result information table according to the administrator account, so as to obtain the function verification result corresponding to the device identification.
查询请求用于查询防护设备中安全组件的功能验证结果。查询请求包含管理员账号。The query request is used to query the functional verification results of the security components in the protective device. The query request contains the administrator account.
可选地,测试服务器从查询请求获得管理员账号之后,测试服务器先根据管理员账号查询账号信息表,从而得到管理员账号对应的设备标识;之后,测试服务器根据设备标识查询结果信息表,从而得到设备标识对应的功能验证结果。Optionally, after the test server obtains the administrator account from the query request, the test server first queries the account information table according to the administrator account, so as to obtain the device identification corresponding to the administrator account; after that, the test server queries the result information table according to the device identification, thereby Obtain the function verification result corresponding to the device ID.
步骤D、测试服务器向查询请求的发起方提供设备标识对应的功能验证结果。Step D: The test server provides the function verification result corresponding to the device identification to the initiator of the query request.
可选地,查询请求的发起方为管理员或者第三方。Optionally, the initiator of the query request is an administrator or a third party.
可选地,在存在多个防护设备的场景下,账号信息表保存一个管理员账号与多个防护设备的设备标识之间的对应关系。测试服务器根据管理员账号查询账号信息表以及结果信息表,从而得到多个设备标识对应的多个功能验证结果,向查询请求的发起方提供多个功能验证结果,以便管理员批量化地查看每个防护设备的状况。Optionally, in a scenario where there are multiple protection devices, the account information table stores the correspondence between one administrator account and the device identifiers of multiple protection devices. The test server queries the account information table and the result information table according to the administrator account, so as to obtain multiple functional verification results corresponding to multiple device IDs, and provide multiple functional verification results to the initiator of the query request, so that the administrator can view each item in batches. condition of protective equipment.
在一些实施例中,测试服务器提供功能验证结果之前,判断管理员账号是否为登录状态,在管理员账号为登录状态的情况下提供功能验证结果,在管理员账号为未登录状态的情况下拒绝提供功能验证结果。管理员账号登录的一种方式是,管理员触发登录请求,登录请求包括管理员账号以及密码。测试服务器接收登录请求,根据登录请求中管理员账号查询账号信息表,得到管理员账号对应的密码。如果登录请求中的密码与从账号信息表查询得到的密码相同,则确定密码正确,同意登录请求。如果登录请求中的密码与从账号信息表查询得到的密码不同,则确定密码错误,拒绝登录请求。In some embodiments, before providing the function verification result, the test server determines whether the administrator account is in the logged-in state, provides the function verification result if the administrator account is in the logged-in state, and rejects the administrator account in the unlogged state Provides functional verification results. One way to log in with the administrator account is that the administrator triggers a login request, and the login request includes the administrator account and password. The test server receives the login request, queries the account information table according to the administrator account in the login request, and obtains the password corresponding to the administrator account. If the password in the login request is the same as the one obtained from the account information table, it is determined that the password is correct and the login request is approved. If the password in the login request is different from the password queried from the account information table, it is determined that the password is incorrect and the login request is rejected.
通过上述步骤A至步骤D提供的方式,一方面给管理员提供信息渠道,帮助管理员了解防护设备各组件的功能是否正常,另一方面基于账号进行访问控制,持有管理员账号的访问 者能获得防护设备组件功能是否正常的信息,未持有管理员账号的访问者无法获得防护设备组件功能是否正常的信息,提高信息安全。Through the methods provided in the above steps A to D, on the one hand, an information channel is provided for the administrator to help the administrator understand whether the functions of each component of the protective device are normal; It is possible to obtain information on whether the function of the protective equipment components is normal. Visitors who do not hold an administrator account cannot obtain information on whether the functions of the protective equipment components are normal, which improves information security.
情况二、根据功能验证结果触发组件升级。Scenario 2: Trigger the component upgrade according to the functional verification result.
在一些实施例中,若功能验证结果指示安全组件的功能不正常,测试服务器或防护设备对安全组件进行升级。例如,测试服务器向防护设备发送升级指令,升级指令携带升级安全组件所需的资源,例如补丁文件或者最新版本的安装包。防护设备执行升级指令从而对安全组件进行升级。In some embodiments, if the function verification result indicates that the function of the security component is abnormal, the test server or the protective device upgrades the security component. For example, the test server sends an upgrade instruction to the protection device, and the upgrade instruction carries the resources required to upgrade the security component, such as a patch file or an installation package of the latest version. The protective device executes the upgrade instructions to upgrade the safety components.
情况三、根据功能验证结果进行通知。Situation 3. Notification according to the result of functional verification.
在一些实施例中,若功能验证结果指示安全组件的功能不正常,测试服务器发送通知消息。通知消息用于告知防护设备的管理员或者防护设备功能验证结果。例如,在通知消息的目的方为管理员的情况下,测试服务器通过邮件、短信等方式向管理员发送通知消息,从而通知管理员安全组件功能不正常,以便管理员处理安全组件上存在的故障;又如,在通知消息的目的方为防护设备的情况下,测试服务器通过发送通知消息,从而通知防护设备安全组件功能不正常,以便防护设备对安全组件进行升级,从而自动化纠正故障。In some embodiments, the test server sends a notification message if the functional verification result indicates that the security component is not functioning properly. The notification message is used to inform the administrator of the protective device or the functional verification result of the protective device. For example, when the destination of the notification message is an administrator, the test server sends a notification message to the administrator through email, SMS, etc., so as to notify the administrator that the security component is not functioning properly, so that the administrator can deal with the failure on the security component. For another example, when the destination of the notification message is a protective device, the test server sends a notification message to notify the protective device that the security component is not functioning properly, so that the protective device can upgrade the security component to automatically correct the fault.
在一些实施例中,附图2所示方法中步骤S201采用加密下载的方式实现。具体地,测试服务器对测试样本进行加密,得到加密后的测试样本。测试服务器向防护设备发送加密后的测试样本。防护设备接收来自于测试服务器的加密后的测试样本,防护设备对加密后的测试样本进行解密,得到明文形式的测试样本,对明文形式的测试样本进行检测。In some embodiments, step S201 in the method shown in FIG. 2 is implemented by means of encrypted downloading. Specifically, the test server encrypts the test sample to obtain the encrypted test sample. The test server sends encrypted test samples to the guard. The protection device receives the encrypted test sample from the test server, the protection device decrypts the encrypted test sample, obtains the test sample in plaintext, and detects the test sample in plaintext.
可选地,基于HTTPS实现加密下载测试样本,具体地,上述步骤S201的具体流程包括:防护设备在需要获取测试样本时与测试服务器协商建立HTTPS连接,防护设备生成超文本传输安全协议(hyper text transfer protocol secure,HTTPS)请求,通过HTTPS连接向测试服务器发送HTTPS请求。测试服务器接收来自于防护设备的HTTPS请求,生成HTTPS响应。HTTPS响应包括加密后的测试样本。测试服务器通过HTTPS连接向防护设备发送HTTPS响应。防护设备接收来自于测试服务器的HTTPS响应,从HTTPS响应中获得加密后的测试样本。Optionally, the encrypted download test sample is implemented based on HTTPS. Specifically, the specific process of the above step S201 includes: the protection device negotiates with the test server to establish an HTTPS connection when it needs to obtain the test sample, and the protection device generates a hypertext transmission security protocol (hypertext transmission security protocol). transfer protocol secure, HTTPS) request, send an HTTPS request to the test server through an HTTPS connection. The test server receives HTTPS requests from the protection device and generates HTTPS responses. HTTPS responses include encrypted test samples. The test server sends an HTTPS response to the guard over an HTTPS connection. The protection device receives the HTTPS response from the test server, and obtains the encrypted test sample from the HTTPS response.
可选地,测试服务器加密和防护设备解密时使用相同的密钥。或者可选地,测试服务器使用防护设备的公钥对测试样本加密,防护设备使用防护设备的私钥对加密后的测试样本进行解密。Optionally, use the same key for test server encryption and guard decryption. Or optionally, the test server encrypts the test sample by using the public key of the protection device, and the protection device decrypts the encrypted test sample by using the private key of the protection device.
通过采用加密下载的方式,有助于避免测试样本被拦截导致功能验证失败。具体来说,局域网中可能部署多个防护设备,在测试样本是攻击报文或者承载恶意文件的报文流的情况下,如果测试样本以明文的形式传输,测试样本可能被部署位置在待测试的防护设备靠前的安全设备拦截,导致无法传输到待测试的防护设备上,进而无法继续后续的功能验证流程。而通过对测试样本进行加密,测试样本以密文的形式传输,能够降低测试样本被部署位置靠前的安全设备拦截的概率,提高测试样本的传输成功率。By adopting the encrypted download method, it helps to avoid the interception of test samples and the failure of functional verification. Specifically, multiple protection devices may be deployed in the local area network. When the test sample is an attack packet or a packet stream carrying malicious files, if the test sample is transmitted in plaintext, the test sample may be deployed at the location to be tested. The security device in front of the protective device intercepted, resulting in the failure to transmit to the protective device to be tested, and thus unable to continue the subsequent functional verification process. By encrypting the test sample, the test sample is transmitted in the form of ciphertext, which can reduce the probability of the test sample being intercepted by the security device at the front deployment position, and improve the transmission success rate of the test sample.
在一些实施例中,利用附图2所示方法评估局域网的网络安全性。具体而言,附图2所示方法中防护设备部署在局域网中,附图2所示方法中测试服务器部署在互联网中。其中,局域网配置有访问控制策略,访问控制策略用于禁止局域网中的防护设备接收来自于互联网的数据。例如,访问控制策略包括匹配条件和动作。访问控制策略中匹配条件的源地址包括互联网的IP地址或网段,访问控制策略中的动作包括禁止。In some embodiments, the network security of the local area network is assessed using the method shown in FIG. 2 . Specifically, in the method shown in FIG. 2 , the protection device is deployed in a local area network, and in the method shown in FIG. 2 , the test server is deployed in the Internet. The local area network is configured with an access control policy, and the access control policy is used to prohibit the protection equipment in the local area network from receiving data from the Internet. For example, an access control policy includes matching conditions and actions. The source address of the matching condition in the access control policy includes the IP address or network segment of the Internet, and the action in the access control policy includes prohibition.
互联网中测试服务器向局域网中的防护设备发送测试样本之后,如果测试样本被成功传输至防护设备,互联网中测试服务器确定局域网的防护存在漏洞。确定测试样本被成功传输至防护设备的一种可能实现方式是,如果防护设备成功接收到来自于互联网中测试服务器的测试样本,防护设备生成确认消息,向互联网中测试服务器发送确认消息。互联网中测试服务器发送测试样本之后,如果在一定时长内接收到来自于防护设备的确认消息,则确定测试样本被成功传输至防护设备。After the test server in the Internet sends the test sample to the protection device in the local area network, if the test sample is successfully transmitted to the protection device, the test server in the Internet determines that there is a loophole in the protection of the local area network. One possible way of determining that the test sample was successfully transmitted to the protective device is that if the protective device successfully receives the test sample from the test server in the Internet, the protective device generates a confirmation message and sends the confirmation message to the test server in the Internet. After the test server in the Internet sends the test sample, if a confirmation message from the protective device is received within a certain period of time, it is determined that the test sample has been successfully transmitted to the protective device.
通过上述方式,在实际网络使用中,不仅能评估防护设备检测功能是否正常,同时能评估局域网是否安全部署,例如参见附图6,防护设备为附图6中的防火墙。如附图6所示,防火墙作为检测局域网防护漏洞的客户端,防火墙放置在局域网内部,并在防火墙之前部署多个交换机。如果测试样本从互联网进入局域网经过多个交换机之后到达防火墙,判定局域网的网络防护存在漏洞。此种使用模式下支持攻击演示或网络安全防御评估场景,价值较高。Through the above method, in actual network use, not only can the detection function of the protection device be normal, but also whether the local area network is safely deployed, for example, see FIG. 6 , the protection device is the firewall in FIG. 6 . As shown in FIG. 6 , the firewall acts as a client for detecting the protection loopholes in the local area network. The firewall is placed inside the local area network, and multiple switches are deployed in front of the firewall. If the test sample enters the LAN from the Internet and reaches the firewall after passing through multiple switches, it is determined that there is a loophole in the network protection of the LAN. This usage mode supports attack demonstration or network security defense evaluation scenarios, which is of high value.
下面结合一个实例,对上述附图2所示方法举例说明。The method shown in FIG. 2 is described below with reference to an example.
实例1Example 1
如附图7所示,实例1包括以下步骤1至步骤5。附图2中的测试样本为附图7中攻击PCAP。附图2中的防护设备为附图7中部署在客户N局域网中的防火墙。附图2中的测试服务器为附图7中部署在互联网中的测试服务器。As shown in FIG. 7, Example 1 includes the following steps 1 to 5. The test sample in Figure 2 is the attack PCAP in Figure 7. The protection device in FIG. 2 is the firewall deployed in the customer N local area network in FIG. 7 . The test server in FIG. 2 is the test server deployed in the Internet in FIG. 7 .
1.防火墙接入客户N局域网,保障网络连通,可完整提供转发功能,同时可连接互联网。防火墙管理员在云端(互联网中的测试服务器)注册账号,同时设置选项连接测试服务器,开启拉取攻击PCAP操作。1. The firewall is connected to the customer's N local area network to ensure network connectivity. It can fully provide the forwarding function and can connect to the Internet at the same time. The firewall administrator registers an account in the cloud (test server in the Internet), and sets the option to connect to the test server to enable the pull attack PCAP operation.
此外,防火墙管理员配置防火墙安全策略(各个安全组件),并升级各组件检测库(实际使用过程中,由于销售部署时间较久原因,防火墙组件检测库滞后于最新检测库,最新检测库每日均会更新,为保证检测能力及效果,需要保证组件检测功能为最新状态)。In addition, the firewall administrator configures the firewall security policy (each security component), and upgrades the detection library of each component (in actual use, due to the long sales and deployment time, the firewall component detection library lags behind the latest detection library, the latest detection library is daily In order to ensure the detection ability and effect, it is necessary to ensure that the component detection function is up-to-date).
防火墙管理员登录互联网服务器地址(地址由产品说明书给出),防火墙管理员完成注册后,在防火墙开启检测功能。检测功能开启后,防火墙主动连接互联网服务器的地址,防火墙从互联网服务器拉取攻击PCAP文件。The firewall administrator logs in to the Internet server address (the address is given by the product manual). After the firewall administrator completes the registration, the detection function is enabled on the firewall. After the detection function is enabled, the firewall actively connects to the address of the Internet server, and the firewall pulls the attacking PCAP file from the Internet server.
2.防火墙将从测试服务器拉取的攻击PCAP作为检测功能的输入,在检测流程中各个安全组件相互协作从而对攻击PCAP进行检测。2. The firewall uses the attacking PCAP pulled from the test server as the input of the detection function, and each security component cooperates with each other in the detection process to detect the attacking PCAP.
3.各个安全组件对攻击PCAP中的网络流量处理,产生对应检测结果。3. Each security component processes the network traffic in the attacking PCAP and generates corresponding detection results.
在实际部署的情况下,用户从互联网下载文件,携带文件的流量通过防火墙,最终文件传输到用户设备上。在此过程中,下载的文件会完整通过各个安全组件。防火墙拉取到对应攻击PCAP的过程与实际部署的情况保持一致。攻击PCAP以报文流的形式在防火墙中被处理,在处理过程中,各安全组件报文流进行检测后,各个安全组件对攻击PCAP处理后会生成对应检测日志。In actual deployment, users download files from the Internet, the traffic carrying the files passes through the firewall, and the final files are transferred to the user's device. During this process, the downloaded file goes through the various security components in its entirety. The process of pulling the firewall to the corresponding attack PCAP is consistent with the actual deployment. Attack PCAP is processed in the firewall in the form of packet flow. During the processing, after each security component detects the packet flow, each security component generates corresponding detection logs after processing the attack PCAP.
4.防火墙将各个组件对应的检测结果上传至互联网中的测试服务器。4. The firewall uploads the detection results corresponding to each component to the test server in the Internet.
防火墙生成检测结果之后,防火墙会主动将检测结果上传至互联网服务器。上传检测结果的同时会携带防火墙的设备标识,例如ESN。After the firewall generates detection results, the firewall will actively upload the detection results to the Internet server. When uploading the detection result, the device ID of the firewall, such as ESN, will be carried.
5.测试服务器对防火墙上传的检测结果与预期结果进行比对,从而确定安全组件的功能是否正常。如果安全组件的功能不正常,则测试服务器通知管理员处理对应故障或自动化纠正故障。5. The test server compares the detection result uploaded by the firewall with the expected result, so as to determine whether the function of the security component is normal. If the security component does not function properly, the test server notifies the administrator to deal with the corresponding failure or automatically correct the failure.
此外,测试服务器还根据设备标识将获取到检测日志与上述步骤1中防火墙管理员创建的账号相关联。In addition, the test server also associates the acquired detection log with the account created by the firewall administrator in the above step 1 according to the device identification.
此外,测试服务器完成功能验证后,将功能验证结果同步至防火墙。如果防火墙根据测试服务器返回的功能验证结果,确定某一组件功能不正常,则防火墙主动升级对应组件或消息通知管理员处理,从而排除故障。其中,同步包括两种方式。第一种同步方式为防火墙上传检测日志后,互联网中的测试服务器直接返回功能验证结果。第二种为防火墙上传检测日志后,间隔一段时间主动向互联网中的测试服务器发送请求,批量获取功能验证结果。In addition, after the test server completes the functional verification, it synchronizes the functional verification results to the firewall. If the firewall determines that a certain component is not functioning properly according to the function verification result returned by the test server, the firewall will actively upgrade the corresponding component or notify the administrator to deal with it, so as to eliminate the fault. Among them, synchronization includes two ways. The first synchronization method is that after the firewall uploads the detection log, the test server in the Internet directly returns the function verification result. The second is that after the firewall uploads the detection log, it actively sends requests to the test server in the Internet at intervals to obtain the function verification results in batches.
上述实施例基于云端—防火墙的架构,实现高效率对防火墙安全组件功能验证评估,其使用效果及使用成本相比相关技术会有大幅度提升,在实际数据中测试,可100%实现对安全组件功能验证评估,提前感知组件功能故障,从而避免因为组件故障造成客户局域网存在安全风险。The above embodiment is based on the cloud-firewall architecture, and realizes efficient verification and evaluation of the functions of firewall security components. Compared with related technologies, the use effect and use cost will be greatly improved. Tested in actual data, 100% of the security components can be realized. Functional verification and evaluation can detect component functional failures in advance, so as to avoid security risks in the customer LAN due to component failures.
可替换地,附图7中的测试服务器的部署位置由部署在互联网中变更为部署在局域网中。如附图8所示,将普通服务器或第三方设备作为测试服务器放置在局域网中,提供测试服务,此种方式也可实现预期目标。Alternatively, the deployment location of the test server in FIG. 7 is changed from being deployed in the Internet to being deployed in a local area network. As shown in FIG. 8 , a common server or a third-party device is placed in the local area network as a test server to provide test services, and this method can also achieve the desired goal.
附图7中的测试服务器的功能也可放置在防护设备内部。如附图9所示,将测试服务放置在防火墙(一种防护设备)中,防火墙调用内部的测试服务对安全组件进行测试,从而提供功能验证服务。The functionality of the test server in Figure 7 can also be placed inside the protective device. As shown in FIG. 9 , the test service is placed in the firewall (a kind of protective device), and the firewall calls the internal test service to test the security components, thereby providing the function verification service.
下面对测试服务器的基本硬件结构举例说明。The following is an example of the basic hardware structure of the test server.
附图10是本申请实施例提供的一种测试服务器的结构示意图。附图10所示的测试服务器600用于实施上述各个实施例中测试服务器所执行的方法。FIG. 10 is a schematic structural diagram of a test server provided by an embodiment of the present application. The test server 600 shown in FIG. 10 is used to implement the methods performed by the test server in the above-mentioned various embodiments.
可选地,结合附图1来看,附图10所示的测试服务器600是附图1中的测试服务器11。Optionally, referring to FIG. 1 , the test server 600 shown in FIG. 10 is the test server 11 in FIG. 1 .
可选地,结合附图2来看,附图10所示的测试服务器600是附图2所示方法中测试服务器。Optionally, with reference to FIG. 2 , the test server 600 shown in FIG. 10 is the test server in the method shown in FIG. 2 .
测试服务器600包括至少一个处理器601、存储器602以及至少一个网络接口603。 Test server 600 includes at least one processor 601 , memory 602 and at least one network interface 603 .
处理器601例如是通用中央处理器(central processing unit,CPU)、网络处理器(network processer,NP)、图形处理器(graphics processing unit,GPU)、神经网络处理器(neural-network processing units,NPU)、数据处理单元(data processing unit,DPU)、微处理器或者一个或多个用于实现本申请方案的集成电路。例如,处理器601包括专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。PLD例如是复杂可编程逻辑器件(complex programmable logic device,CPLD)、现场可编程逻辑门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合。The processor 601 is, for example, a general-purpose central processing unit (central processing unit, CPU), a network processor (network processor, NP), a graphics processing unit (graphics processing unit, GPU), a neural-network processing unit (neural-network processing units, 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.
存储器602例如是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,又如是随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,又如是电可擦可编程只读存储器(electrically erasable programmable read-only Memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。可选地,存 储器602独立存在,并通过内部连接604与处理器601相连接。或者,可选地存储器602和处理器601集成在一起。The memory 602 is, for example, a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (RAM) or a memory device that can store information and instructions. Other types of dynamic storage devices, such as electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical disks storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of Any other medium accessed by a computer without limitation. Optionally, memory 602 exists independently and is connected to processor 601 through internal connection 604. Alternatively, the memory 602 and the processor 601 are optionally integrated.
网络接口603使用任何收发器一类的装置,用于与其它设备或通信网络通信。网络接口603例如包括有线网络接口或者无线网络接口中的至少一项。其中,有线网络接口例如为以太网接口。以太网接口例如是光接口,电接口或其组合。无线网络接口例如为无线局域网(wireless local area networks,WLAN)接口,蜂窝网络接口或其组合等。 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 (wireless local area network, WLAN) interface, a cellular network interface, or a combination thereof.
在一些实施例中,处理器601包括一个或多个CPU,如附图10中所示的CPU0和CPU1。In some embodiments, processor 601 includes one or more CPUs, such as CPU0 and CPU1 shown in FIG. 10 .
在一些实施例中,测试服务器600可选地包括多个处理器,如附图10中所示的处理器601和处理器605。这些处理器中的每一个例如是一个单核处理器(single-CPU),又如是一个多核处理器(multi-CPU)。这里的处理器可选地指一个或多个设备、电路、和/或用于处理数据(如计算机程序指令)的处理核。In some embodiments, test server 600 optionally includes multiple processors, such as processor 601 and processor 605 shown in FIG. 10 . Each of these processors is, for example, a single-core processor (single-CPU), or a multi-core processor (multi-CPU). A processor herein optionally refers to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
在一些实施例中,测试服务器600还包括内部连接604。处理器601、存储器602以及至少一个网络接口603通过内部连接604连接。内部连接604包括通路,在上述组件之间传送信息。可选地,内部连接604是单板或总线。可选地,内部连接604分为地址总线、数据总线、控制总线等。In some embodiments, the test server 600 also includes an internal connection 604 . The processor 601 , the memory 602 and at least one network interface 603 are connected by an internal connection 604 . Internal connections 604 include pathways that transfer information between the aforementioned components. Optionally, the internal connection 604 is a single board or bus. Optionally, the internal connection 604 is divided into an address bus, a data bus, a control bus, and the like.
在一些实施例中,测试服务器600还包括输入输出接口606。输入输出接口606连接到内部连接604上。In some embodiments, the test server 600 also includes an input-output interface 606 . Input output interface 606 is connected to internal connection 604 .
在一些实施例中,输入输出接口606用于与输入设备连接,接收用户通过输入设备输入的上述实施例涉及的命令或数据,例如测试样本对应的预期结果、管理员账号、测试服务器的地址。输入设备包括但不限于键盘、触摸屏、麦克风、鼠标或传感设备等。In some embodiments, the input and output interface 606 is used to connect with an input device, and receive commands or data input by a user through the input device related to the above embodiments, such as expected results corresponding to test samples, administrator accounts, and addresses of test servers. Input devices include, but are not limited to, keyboards, touch screens, microphones, mice, or sensing devices.
在一些实施例中,输入输出接口606还用于与输出设备连接。输入输出接口606通过输出设备输出处理器301执行上述附图2所示方法产生的中间结果和/或最终结果,例如功能验证结果。输出设备包括但不限于显示器、打印机、投影仪等等。In some embodiments, the input-output interface 606 is also used to interface with output devices. The input and output interface 606 outputs the intermediate result and/or the final result, such as the function verification result, generated by the processor 301 executing the method shown in FIG. 2 above through the output device. Output devices include, but are not limited to, displays, printers, projectors, and the like.
可选地,处理器601通过读取存储器602中保存的程序代码610实现上述实施例中的方法,或者,处理器601通过内部存储的程序代码实现上述实施例中的方法。在处理器601通过读取存储器602中保存的程序代码610实现上述实施例中的方法的情况下,存储器602中保存实现本申请实施例提供的功能验证方法的程序代码。Optionally, the processor 601 implements the methods in the foregoing embodiments by reading program codes 610 stored in the memory 602, or the processor 601 implements the methods in the foregoing embodiments by using internally stored program codes. When 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 function verification method provided by the embodiment of the present application.
存储器602用于存储程序代码610;处理器601,用于读取存储器602中存储的程序代码610后,执行以下操作:指示网络接口603向防护设备提供测试样本,测试样本包括测试报文或承载测试文件的报文流中的至少一项;通过网络接口603获取防护设备中安全组件对测试样本进行检测而产生的检测结果;将检测结果与测试样本对应的预期结果进行对比;如果检测结果与预期结果一致,确定安全组件的功能正常。The memory 602 is used to store the program code 610; the processor 601 is used to read the program code 610 stored in the memory 602, and perform the following operations: instruct the network interface 603 to provide a test sample to the protective device, and the test sample includes a test message or bearer At least one item in the message flow of the test file; obtain the test result generated by the security component in the protection device detecting the test sample through the network interface 603; compare the test result with the expected result corresponding to the test sample; The expected results are consistent, confirming that the security components are functioning properly.
可选地,存储器602,还用于存储样本库。处理器601,还用于读取存储器602中存储的程序代码610后,执行以下操作:通过网络接口603接收来自于防护设备的下载请求,下载请求包括防护设备的设备标识;根据设备标识从存储器602保存的样本库查询得到第一测试样本。Optionally, the memory 602 is also used for storing the sample library. After the processor 601 is further configured to read the program code 610 stored in the memory 602, the following operations are performed: receiving a download request from the protection device through the network interface 603, where the download request includes the device identification of the protection device; 602 Query the stored sample library to obtain the first test sample.
可选地,处理器601,还用于读取存储器602中存储的程序代码610后,执行以下操作:根据检测结果与预期结果是否一致,生成功能验证结果,功能验证结果用于指示安全组件的功能是否正常。Optionally, the processor 601 is further configured to, after reading the program code 610 stored in the memory 602, perform the following operations: generate a function verification result according to whether the detection result is consistent with the expected result, and the function verification result is used to indicate the safety component's Is the function normal.
可选地,存储器602,还用于存储账号信息表以及结果信息表。处理器601,还用于读取存储器602中存储的程序代码610后,执行以下操作:响应于网络接口603接收的包含管理员账号以及防护设备的设备标识的注册请求,在存储器602存储的账号信息表中保存设备标识与管理员账号之间的对应关系;在存储器602存储的结果信息表中保存功能验证结果与设备标识之间的对应关系;响应于网络接口603接收的包含管理员账号的查询请求,根据管理员账号查询存储器602中的账号信息表以及结果信息表,从而得到设备标识对应的功能验证结果,指示网络接口603向查询请求的发起方提供设备标识对应的功能验证结果。Optionally, the memory 602 is further configured to store the account information table and the result information table. The processor 601 is further configured to, after reading the program code 610 stored in the memory 602, perform the following operations: in response to the registration request received by the network interface 603 including the administrator account and the device identification of the protective device, the account stored in the memory 602 The correspondence between the device identification and the administrator account is preserved in the information table; the corresponding relationship between the function verification result and the device identification is preserved in the result information table stored in the memory 602; For the query request, query the account information table and the result information table in the storage 602 according to the administrator account, thereby obtaining the function verification result corresponding to the device identification, and instructing the network interface 603 to provide the function verification result corresponding to the device identification to the initiator of the query request.
可选地,处理器601,还用于读取存储器602中存储的程序代码610后,执行以下操作:若功能验证结果指示安全组件的功能不正常,对安全组件进行升级;或者,若功能验证结果指示安全组件的功能不正常,通过网络接口603发送通知消息,通知消息用于告知防护设备的管理员或者防护设备功能验证结果。Optionally, the processor 601 is further configured to perform the following operations after reading the program code 610 stored in the memory 602: if the function verification result indicates that the function of the security component is abnormal, upgrade the security component; If the result indicates that the function of the security component is abnormal, a notification message is sent through the network interface 603, and the notification message is used to inform the administrator of the protective device or the function verification result of the protective device.
可选地,处理器601,还用于读取存储器602中存储的程序代码610后,执行以下操作:对测试样本进行加密,通过网络接口603向防护设备发送加密后的测试样本。Optionally, the processor 601 is further configured to perform the following operations after reading the program code 610 stored in the memory 602 : encrypt the test sample, and send the encrypted test sample to the protection device through the network interface 603 .
可选地,测试服务器600为部署在互联网中的服务器,防护设备部署在局域网中,其中,局域网配置有访问控制策略,访问控制策略用于禁止局域网中的防护设备接收来自于互联网的数据,处理器601,用于通过网络接口603向局域网中的防护设备发送测试样本;处理器601,还用于读取存储器602中存储的程序代码610后,执行以下操作:如果测试样本被成功传输至防护设备,确定局域网的防护存在漏洞。Optionally, the test server 600 is a server deployed in the Internet, and the protective equipment is deployed in a local area network, wherein the local area network is configured with an access control policy, and the access control policy is used to prohibit the protective equipment in the local area network from receiving data from the Internet, and processing. The processor 601 is configured to send the test sample to the protection device in the local area network through the network interface 603; the processor 601 is further configured to read the program code 610 stored in the memory 602, and perform the following operations: if the test sample is successfully transmitted to the protection device equipment to determine that there are loopholes in the protection of the local area network.
处理器601实现上述功能的更多细节请参考前面各个方法实施例中的描述,在这里不再重复。For more details of implementing the above functions by the processor 601, please refer to the descriptions in the foregoing method embodiments, which will not be repeated here.
附图11是本申请实施例提供的一种安全组件的功能验证装置的结构示意图。附图11所示的装置700例如实现附图2所示方法中测试服务器的功能。FIG. 11 is a schematic structural diagram of a function verification device for a security component provided by an embodiment of the present application. The apparatus 700 shown in FIG. 11 implements, for example, the function of the test server in the method shown in FIG. 2 .
请参考附图11,装置700包括提供单元701、获取单元702和处理单元703。装置700中的各个单元全部或部分地通过软件、硬件、固件或者其任意组合来实现。提供单元701用于支持装置700执行附图2所示方法中S201。获取单元702用于支持装置700执行附图2所示方法中S205。处理单元703用于支持装置700执行附图2所示方法中S206和S207。Referring to FIG. 11 , the apparatus 700 includes a providing unit 701 , an obtaining unit 702 and a processing unit 703 . Each unit in the apparatus 700 is implemented in whole or in part by software, hardware, firmware or any combination thereof. The providing unit 701 is used to support the apparatus 700 to perform S201 in the method shown in FIG. 2 . The obtaining unit 702 is configured to support the apparatus 700 to perform S205 in the method shown in FIG. 2 . The processing unit 703 is configured to support the apparatus 700 to execute S206 and S207 in the method shown in FIG. 2 .
可选地,装置700还包括接收单元和查询单元,接收单元用于支持装置700执行步骤S2012。查询单元用于支持装置700执行步骤S2013。Optionally, the apparatus 700 further includes a receiving unit and a querying unit, and the receiving unit is configured to support the apparatus 700 to perform step S2012. The query unit is used to support the apparatus 700 to perform step S2013.
可选地,处理单元703还用于支持装置700生成功能验证结果。Optionally, the processing unit 703 is further configured to support the apparatus 700 to generate a function verification result.
可选地,装置700还包括保存单元和查询单元,保存单元用于支持装置700在账号信息表中保存设备标识与管理员账号之间的对应关系。查询单元用于支持装置700根据管理员账号查询账号信息表以及结果信息表,从而得到设备标识对应的功能验证结果。Optionally, the apparatus 700 further includes a storage unit and a query unit, and the storage unit is configured to support the apparatus 700 to store the correspondence between the device identifier and the administrator account in the account information table. The query unit is used to support the apparatus 700 to query the account information table and the result information table according to the administrator account, so as to obtain the function verification result corresponding to the device identification.
可选地,处理单元703还用于支持装置700对安全组件进行升级。Optionally, the processing unit 703 is further configured to support the apparatus 700 to upgrade the security components.
可选地,装置700还包括发送单元,发送单元用于支持装置700发送通知消息。Optionally, the apparatus 700 further includes a sending unit, where the sending unit is configured to support the apparatus 700 to send a notification message.
可选地,处理单元703还用于支持装置700对测试样本进行加密。提供单元701,用于支持装置700向防护设备发送加密后的测试样本。Optionally, the processing unit 703 is further configured to support the apparatus 700 to encrypt the test sample. A unit 701 is provided for supporting the apparatus 700 to send the encrypted test sample to the protective device.
附图11所描述的装置实施例仅仅是示意性的,例如,上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。在本申请各个实施例中的各功能单元可以 集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。附图11中上述各个单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。例如,采用软件实现时,上述处理单元703和查询单元可以是由附图10中的处理器601读取存储器602中存储的程序代码后,生成的软件功能单元来实现。附图11中上述各个单元也可以由附图10所示设备中的不同硬件分别实现,例如处理单元703由附图10中的处理器601中的一部分处理资源(例如多核处理器中的一个核或两个核)实现,而查询单元由附图10中处理器601中的其余部分处理资源(例如多核处理器中的其他核),或者采用现场可编程门阵列(field-programmable gate array,FPGA)、或协处理器等可编程器件来完成。提供单元701、获取单元702和发送单元由附图10中的网络接口603实现。显然上述功能单元也可以采用软件硬件相结合的方式来实现,例如查询单元由硬件可编程器件实现,而处理单元703是由CPU读取存储器中存储的程序代码后,生成的软件功能单元。The apparatus embodiment described in FIG. 11 is only illustrative. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or may be Integration into another system, or some features can be ignored, or not implemented. Each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned units in FIG. 11 may be implemented in the form of hardware, or may be implemented in the form of software functional units. For example, when implemented in software, the above-mentioned processing unit 703 and the query unit may be implemented by software functional units generated after the processor 601 in FIG. 10 reads the program code stored in the memory 602 . The above units in FIG. 11 can also be implemented by different hardware in the device shown in FIG. 10, for example, the processing unit 703 is implemented by a part of the processing resources in the processor 601 in FIG. 10 (for example, a core in a multi-core processor or two cores), and the query unit is implemented by the rest of the processing resources (such as other cores in the multi-core processor) in the processor 601 in FIG. ), or programmable devices such as coprocessors. The providing unit 701 , the obtaining unit 702 and the sending unit are realized by the network interface 603 in FIG. 10 . Obviously, the above functional units can also be implemented by a combination of software and hardware. For example, the query unit is implemented by a hardware programmable device, and the processing unit 703 is a software functional unit generated after the CPU reads the program code stored in the memory.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分可互相参考,每个实施例重点说明的都是与其他实施例的不同之处。其中,A参考B,指的是A与B相同或者A为B的简单变形。The various embodiments in this specification are described in a progressive manner, and the same and similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. Among them, A refers to B, which means that A is the same as B or A is a simple deformation of B.
上述实施例可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例描述的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。The above-described embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with the embodiments of the present application are generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device. Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server, or data center over a wire (e.g. coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.) to another website site, computer, server, or data center. A computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes an integration of one or more available media. Useful media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)), and the like.
以上,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Above, the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the above-mentioned embodiments, those of ordinary skill in the art should understand that: it can still be used for the above-mentioned implementations The technical solutions described in the examples are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims (20)

  1. 一种安全组件的功能验证方法,其特征在于,所述方法包括:A method for functional verification of a security component, characterized in that the method comprises:
    向防护设备提供测试样本,所述测试样本包括测试报文或承载测试文件的报文流中的至少一项;providing a test sample to the protective device, the test sample including at least one of a test message or a message stream carrying a test file;
    获取所述防护设备中安全组件对所述测试样本进行检测而产生的检测结果;Obtain the detection result generated by the detection of the test sample by the safety component in the protective device;
    将所述检测结果与所述测试样本对应的预期结果进行对比;Compare the detection result with the expected result corresponding to the test sample;
    如果所述检测结果与所述预期结果一致,确定所述安全组件的功能正常。If the detection result is consistent with the expected result, it is determined that the function of the safety component is normal.
  2. 根据权利要求1所述的方法,其特征在于,所述测试样本包括第一测试样本,所述向防护设备提供测试样本之前,所述方法还包括:The method of claim 1, wherein the test sample comprises a first test sample, and before the providing the test sample to the protective device, the method further comprises:
    接收来自于所述防护设备的下载请求,所述下载请求包括所述防护设备的设备标识;receiving a download request from the protective device, the download request including the device identification of the protective device;
    根据所述设备标识从样本库查询得到所述第一测试样本,所述第一测试样本是所述样本库中所述设备标识对应的测试样本,所述样本库包括至少一组设备标识与测试样本之间的对应关系。The first test sample is obtained by querying a sample library according to the device identifier, the first test sample is a test sample corresponding to the device identifier in the sample library, and the sample library includes at least one set of device identifiers and test samples. Correspondence between samples.
  3. 根据权利要求1所述的方法,其特征在于,所述将所述检测结果与所述测试样本对应的预期结果进行对比之后,所述方法还包括:The method according to claim 1, wherein after comparing the detection result with the expected result corresponding to the test sample, the method further comprises:
    根据所述检测结果与所述预期结果是否一致,生成功能验证结果,所述功能验证结果用于指示所述安全组件的功能是否正常。According to whether the detection result is consistent with the expected result, a function verification result is generated, and the function verification result is used to indicate whether the function of the security component is normal.
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:The method according to claim 3, wherein the method further comprises:
    响应于包含管理员账号以及所述防护设备的设备标识的注册请求,在账号信息表中保存所述设备标识与所述管理员账号之间的对应关系;In response to the registration request including the administrator account and the device identification of the protective device, the corresponding relationship between the device identification and the administrator account is saved in the account information table;
    在结果信息表中保存所述功能验证结果与所述设备标识之间的对应关系;Save the corresponding relationship between the functional verification result and the device identification in the result information table;
    响应于包含所述管理员账号的查询请求,根据所述管理员账号查询所述账号信息表以及所述结果信息表,从而得到所述设备标识对应的功能验证结果,向所述查询请求的发起方提供所述设备标识对应的功能验证结果。In response to the query request including the administrator account, query the account information table and the result information table according to the administrator account, so as to obtain the function verification result corresponding to the device identification, and initiate the query request. The party provides the function verification result corresponding to the device identification.
  5. 根据权利要求3所述的方法,其特征在于,所述生成功能验证结果之后,所述方法还包括:The method according to claim 3, wherein after generating the function verification result, the method further comprises:
    若所述功能验证结果指示所述安全组件的功能不正常,对所述安全组件进行升级;或者,If the function verification result indicates that the function of the security component is abnormal, upgrade the security component; or,
    若所述功能验证结果指示所述安全组件的功能不正常,发送通知消息,所述通知消息用于告知所述防护设备的管理员或者所述防护设备所述功能验证结果。If the function verification result indicates that the function of the security component is abnormal, a notification message is sent, where the notification message is used to inform the administrator of the protection device or the protection device of the function verification result.
  6. 根据权利要求1所述的方法,其特征在于,所述向防护设备提供测试样本,包括:The method of claim 1, wherein the providing a test sample to the protective device comprises:
    对所述测试样本进行加密,向所述防护设备发送加密后的测试样本。The test sample is encrypted, and the encrypted test sample is sent to the protective device.
  7. 根据权利要求1所述的方法,其特征在于,所述方法由部署在互联网中的服务器执行,所述防护设备部署在局域网中,其中,所述局域网配置有访问控制策略,所述访问控制策略用于禁止所述局域网中的防护设备接收来自于所述互联网的数据,The method according to claim 1, wherein the method is executed by a server deployed in the Internet, and the protection device is deployed in a local area network, wherein the local area network is configured with an access control policy, and the access control policy for prohibiting the protective equipment in the local area network from receiving data from the Internet,
    所述向防护设备提供测试样本,包括:向所述局域网中的所述防护设备发送所述测试样本;The providing the test sample to the protective device includes: sending the test sample to the protective device in the local area network;
    所述方法还包括:如果所述测试样本被成功传输至所述防护设备,确定所述局域网的防护存在漏洞。The method further includes: if the test sample is successfully transmitted to the protection device, determining that there is a vulnerability in the protection of the local area network.
  8. 根据权利要求1所述的方法,其特征在于,所述检测结果包括攻击类型、协议类型、病毒类型、恶意域名、恶意IP地址或者无攻击的指示符。The method according to claim 1, wherein the detection result includes an attack type, a protocol type, a virus type, a malicious domain name, a malicious IP address, or an indicator of no attack.
  9. 一种安全组件的功能验证装置,其特征在于,所述装置包括:A functional verification device for a security component, characterized in that the device comprises:
    提供单元,用于向防护设备提供测试样本,所述测试样本包括测试报文或承载测试文件的报文流中的至少一项;a providing unit for providing a test sample to the protective device, where the test sample includes at least one of a test message or a message stream carrying a test file;
    获取单元,用于获取所述防护设备中安全组件对所述测试样本进行检测而产生的检测结果;an acquiring unit, configured to acquire the detection result generated by the security component in the protective device detecting the test sample;
    处理单元,用于将所述检测结果与所述测试样本对应的预期结果进行对比;a processing unit for comparing the detection result with the expected result corresponding to the test sample;
    所述处理单元,还用于如果所述检测结果与所述预期结果一致,确定所述安全组件的功能正常。The processing unit is further configured to determine that the function of the safety component is normal if the detection result is consistent with the expected result.
  10. 根据权利要求9所述的装置,其特征在于,所述测试样本包括第一测试样本,所述装置还包括:接收单元和查询单元;The device according to claim 9, wherein the test sample comprises a first test sample, and the device further comprises: a receiving unit and a query unit;
    所述接收单元,用于接收来自于所述防护设备的下载请求,所述下载请求包括所述防护设备的设备标识;the receiving unit, configured to receive a download request from the protective device, where the download request includes a device identifier of the protective device;
    所述查询单元,用于根据所述设备标识从样本库查询得到所述第一测试样本,所述第一测试样本是所述样本库中所述设备标识对应的测试样本,所述样本库包括至少一组设备标识与测试样本之间的对应关系。The query unit is configured to query and obtain the first test sample from a sample library according to the device identifier, where the first test sample is a test sample corresponding to the device identifier in the sample library, and the sample library includes Correspondence between at least one set of device identifiers and test samples.
  11. 根据权利要求9所述的装置,其特征在于,所述处理单元,还用于根据所述检测结果与所述预期结果是否一致,生成功能验证结果,所述功能验证结果用于指示所述安全组件的功能是否正常。The device according to claim 9, wherein the processing unit is further configured to generate a function verification result according to whether the detection result is consistent with the expected result, and the function verification result is used to indicate the safety Whether the function of the component is normal.
  12. 根据权利要求11所述的装置,其特征在于,所述装置还包括:保存单元和查询单元;The device according to claim 11, wherein the device further comprises: a saving unit and a query unit;
    所述保存单元,用于响应于包含管理员账号以及所述防护设备的设备标识的注册请求,在账号信息表中保存所述设备标识与所述管理员账号之间的对应关系;在结果信息表中保存所述功能验证结果与所述设备标识之间的对应关系;The storage unit is configured to, in response to a registration request including an administrator account and a device identification of the protective device, save the correspondence between the device identification and the administrator account in the account information table; in the result information The corresponding relationship between the functional verification result and the device identification is stored in the table;
    所述查询单元,用于响应于包含所述管理员账号的查询请求,根据所述管理员账号查询所述账号信息表以及所述结果信息表,从而得到所述设备标识对应的功能验证结果,向所述查询请求的发起方提供所述设备标识对应的功能验证结果。The query unit is configured to query the account information table and the result information table according to the administrator account in response to a query request including the administrator account, so as to obtain a function verification result corresponding to the device identifier, The function verification result corresponding to the device identification is provided to the initiator of the query request.
  13. 根据权利要求11所述的装置,其特征在于,所述处理单元,还用于若所述功能验证结果指示所述安全组件的功能不正常,对所述安全组件进行升级;The apparatus according to claim 11, wherein the processing unit is further configured to upgrade the security component if the function verification result indicates that the function of the security component is abnormal;
    所述装置还包括:发送单元,用于若所述功能验证结果指示所述安全组件的功能不正常,发送通知消息,所述通知消息用于告知所述防护设备的管理员或者所述防护设备所述功能验证结果。The apparatus further includes: a sending unit, configured to send a notification message if the function verification result indicates that the function of the security component is abnormal, where the notification message is used to notify the administrator of the protective device or the protective device The functional verification result.
  14. 根据权利要求9所述的装置,其特征在于,所述处理单元,用于对所述测试样本进行加密;The apparatus according to claim 9, wherein the processing unit is configured to encrypt the test sample;
    所述提供单元,用于向所述防护设备发送加密后的测试样本。The providing unit is configured to send the encrypted test sample to the protective device.
  15. 根据权利要求9所述的装置,其特征在于,所述装置为部署在互联网中的服务器,所述防护设备部署在局域网中,其中,所述局域网配置有访问控制策略,所述访问控制策略用于禁止所述局域网中的防护设备接收来自于所述互联网的数据,The device according to claim 9, wherein the device is a server deployed in the Internet, and the protection device is deployed in a local area network, wherein the local area network is configured with an access control policy, and the access control policy uses in order to prohibit the protection equipment in said local area network from receiving data from said Internet,
    所述提供单元,用于向所述局域网中的所述防护设备发送所述测试样本;the providing unit, configured to send the test sample to the protective device in the local area network;
    所述处理单元,还用于如果所述测试样本被成功传输至所述防护设备,确定所述局域网的防护存在漏洞。The processing unit is further configured to determine that there is a loophole in the protection of the local area network if the test sample is successfully transmitted to the protection device.
  16. 一种测试服务器,其特征在于,所述测试服务器包括:存储器、网络接口和至少一个处理器;A test server, characterized in that the test server comprises: a memory, a network interface and at least one processor;
    所述存储器用于存储程序代码;the memory is used to store program codes;
    所述至少一个处理器,用于读取所述存储器中存储的程序代码后,执行以下操作:The at least one processor is configured to perform the following operations after reading the program code stored in the memory:
    指示所述网络接口向防护设备提供测试样本,所述测试样本包括测试报文或承载测试文件的报文流中的至少一项;instructing the network interface to provide a test sample to the protection device, where the test sample includes at least one of a test packet or a packet stream carrying a test file;
    通过所述网络接口获取所述防护设备中安全组件对所述测试样本进行检测而产生的检测结果;Obtain, through the network interface, a detection result generated by the security component in the protective device detecting the test sample;
    将所述检测结果与所述测试样本对应的预期结果进行对比;comparing the detection result with the expected result corresponding to the test sample;
    如果所述检测结果与所述预期结果一致,确定所述安全组件的功能正常。If the detection result is consistent with the expected result, it is determined that the function of the safety component is normal.
  17. 根据权利要求16所述的测试服务器,其特征在于,所述测试样本包括第一测试样本,所述至少一个处理器,还用于读取所述存储器中存储的程序代码后,执行以下操作:The test server according to claim 16, wherein the test sample comprises a first test sample, and the at least one processor is further configured to perform the following operations after reading the program code stored in the memory:
    通过所述网络接口接收来自于所述防护设备的下载请求,所述下载请求包括所述防护设备的设备标识;receiving a download request from the protective device through the network interface, the download request including the device identification of the protective device;
    根据所述设备标识从所述存储器保存的样本库查询得到所述第一测试样本,所述第一测试样本是所述样本库中所述设备标识对应的测试样本,所述样本库包括至少一组设备标识与测试样本之间的对应关系。The first test sample is obtained by querying a sample library stored in the memory according to the device identifier, the first test sample is a test sample corresponding to the device identifier in the sample library, and the sample library includes at least one Correspondence between group device IDs and test samples.
  18. 根据权利要求16所述的测试服务器,其特征在于,所述至少一个处理器,还用于读取所述存储器中存储的程序代码后,执行以下操作:The test server according to claim 16, wherein the at least one processor is further configured to perform the following operations after reading the program code stored in the memory:
    根据所述检测结果与所述预期结果是否一致,生成功能验证结果,所述功能验证结果用于指示所述安全组件的功能是否正常。According to whether the detection result is consistent with the expected result, a function verification result is generated, and the function verification result is used to indicate whether the function of the security component is normal.
  19. 根据权利要求18所述的测试服务器,其特征在于,所述至少一个处理器,还用于读取所述存储器中存储的程序代码后,执行以下操作:The test server according to claim 18, wherein the at least one processor is further configured to perform the following operations after reading the program code stored in the memory:
    响应于所述网络接口接收的包含管理员账号以及所述防护设备的设备标识的注册请求,在所述存储器存储的账号信息表中保存所述设备标识与所述管理员账号之间的对应关系;In response to the registration request including the administrator account and the device identification of the protection device received by the network interface, the corresponding relationship between the device identification and the administrator account is stored in the account information table stored in the memory. ;
    在所述存储器存储的结果信息表中保存所述功能验证结果与所述设备标识之间的对应关系;Save the correspondence between the functional verification result and the device identification in the result information table stored in the memory;
    响应于所述网络接口接收的包含所述管理员账号的查询请求,根据所述管理员账号查询所述存储器中的所述账号信息表以及所述结果信息表,从而得到所述设备标识对应的功能验证结果,指示所述网络接口向所述查询请求的发起方提供所述设备标识对应的功能验证结果。In response to the query request including the administrator account received by the network interface, query the account information table and the result information table in the memory according to the administrator account, so as to obtain the corresponding device identifier. The function verification result, instructing the network interface to provide the function verification result corresponding to the device identification to the initiator of the query request.
  20. 一种计算机程序产品,其特征在于,所述计算机程序产品包括一个或多个计算机程序指令,当所述计算机程序指令被计算机加载并运行时,使得所述计算机执行权利要求1至8中任意一项所述的安全组件的功能验证方法。A computer program product, characterized in that the computer program product includes one or more computer program instructions that, when loaded and executed by a computer, cause the computer to execute any one of claims 1 to 8 The functional verification method of the security component described in item.
PCT/CN2021/113909 2021-02-03 2021-08-20 Function verification method and apparatus for security component WO2022166166A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110152435.8A CN114928564A (en) 2021-02-03 2021-02-03 Function verification method and device of security component
CN202110152435.8 2021-02-03

Publications (1)

Publication Number Publication Date
WO2022166166A1 true WO2022166166A1 (en) 2022-08-11

Family

ID=82740652

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/113909 WO2022166166A1 (en) 2021-02-03 2021-08-20 Function verification method and apparatus for security component

Country Status (2)

Country Link
CN (1) CN114928564A (en)
WO (1) WO2022166166A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113704749A (en) * 2020-05-20 2021-11-26 中国移动通信集团浙江有限公司 Malicious excavation detection processing method and device
CN116669064A (en) * 2022-12-08 2023-08-29 荣耀终端有限公司 Wireless protocol testing method and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160277357A1 (en) * 2013-03-18 2016-09-22 British Telecommunications Public Limited Company Firewall testing
CN108521354A (en) * 2018-04-17 2018-09-11 中国人民解放军战略支援部队信息工程大学 A kind of IPv6 Firewall Protections aptitude tests device and test method
CN110430096A (en) * 2019-08-06 2019-11-08 深圳市同维通信技术有限公司 A kind of gateway test method and equipment
CN111600781A (en) * 2020-07-27 2020-08-28 中国人民解放军国防科技大学 Firewall system stability testing method based on tester

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160277357A1 (en) * 2013-03-18 2016-09-22 British Telecommunications Public Limited Company Firewall testing
CN108521354A (en) * 2018-04-17 2018-09-11 中国人民解放军战略支援部队信息工程大学 A kind of IPv6 Firewall Protections aptitude tests device and test method
CN110430096A (en) * 2019-08-06 2019-11-08 深圳市同维通信技术有限公司 A kind of gateway test method and equipment
CN111600781A (en) * 2020-07-27 2020-08-28 中国人民解放军国防科技大学 Firewall system stability testing method based on tester

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113704749A (en) * 2020-05-20 2021-11-26 中国移动通信集团浙江有限公司 Malicious excavation detection processing method and device
CN113704749B (en) * 2020-05-20 2024-03-19 中国移动通信集团浙江有限公司 Malicious mining detection processing method and device
CN116669064A (en) * 2022-12-08 2023-08-29 荣耀终端有限公司 Wireless protocol testing method and electronic equipment
CN116669064B (en) * 2022-12-08 2024-04-05 荣耀终端有限公司 Wireless protocol testing method and electronic equipment

Also Published As

Publication number Publication date
CN114928564A (en) 2022-08-19

Similar Documents

Publication Publication Date Title
US10992704B2 (en) Dynamic selection and generation of a virtual clone for detonation of suspicious content within a honey network
US10298610B2 (en) Efficient and secure user credential store for credentials enforcement using a firewall
US10425387B2 (en) Credentials enforcement using a firewall
US10354072B2 (en) System and method for detection of malicious hypertext transfer protocol chains
US9680860B1 (en) Endpoint-based man in the middle attack detection using multiple types of detection tests
US9401927B2 (en) Compromised insider honey pots using reverse honey tokens
US9356950B2 (en) Evaluating URLS for malicious content
US11240260B2 (en) System and method for detecting computer network intrusions
US8997201B2 (en) Integrity monitoring to detect changes at network device for use in secure network access
US10257213B2 (en) Extraction criterion determination method, communication monitoring system, extraction criterion determination apparatus and extraction criterion determination program
US20170070518A1 (en) Advanced persistent threat identification
JP2013011949A (en) Feature information extraction device, feature information extraction method and feature information extraction program
WO2022166166A1 (en) Function verification method and apparatus for security component
EP2541877A1 (en) Method for changing a server address and related aspects
WO2017217247A1 (en) Malignant event detection apparatus, malignant event detection method, and malignant event detection program
EP2541861A1 (en) Server security systems and related aspects
US20220337488A1 (en) Network device type classification
US20240333759A1 (en) Inline ransomware detection via server message block (smb) traffic
WO2022156197A1 (en) Attack success identification method and protection device
JP2023511095A (en) Systems and methods for network monitoring, reporting and risk mitigation
Ibitola et al. Analysis of Network-Based Intrusion Detection and Prevention System in an Enterprise Network Using Snort Freeware
Kenar An extensible framework for automated network attack signature generation

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21924165

Country of ref document: EP

Kind code of ref document: A1