Cryptographic algorithm and protocol test system

Through the cryptographic algorithm and protocol testing system, the problem that existing tools are unable to detect national cryptographic algorithms and protocols has been solved, and the security analysis and performance measurement of national cryptographic algorithms and protocols have been realized, meeting the evaluation requirements of national standards.

CN120602388APending Publication Date: 2025-09-05THE THIRD RES INST OF MIN OF PUBLIC SECURITY +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510540786.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

Existing cryptographic algorithms and protocol analysis tools lack compliance detection capabilities, are unable to identify and analyze China's proprietary national encryption algorithms and protocols, are unable to automatically detect security risks, cannot support cryptographic application security assessments, and cannot accurately measure performance losses during the national encryption transformation of information systems.

Method used

A cryptographic algorithm and protocol testing system is provided, including a traffic interception module, a scheduling control module and an analysis module, which can capture and analyze network traffic in transparent mode and middleman mode, and realize security analysis of international/national secret cryptographic algorithms and protocols.

Benefits of technology

It realizes the verification of compliance, correctness and effectiveness of cryptographic applications, meets national standard requirements, can identify security risks and measure performance loss, and improve the integrity and accuracy of assessments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602388A_ABST
    Figure CN120602388A_ABST
Patent Text Reader

Abstract

The invention discloses a cryptographic algorithm and protocol test system, the system is configured into two deployment modes: a transparent mode and a man-in-the-middle mode, the transparent mode can hide an IP or MAC address of a device, and certificate and algorithm information in a cryptographic protocol is identified and analyzed through a passive traffic analysis mode; the man-in-the-middle mode provides a dynamic packet changing function, realizes a dynamic interaction function with a server in an agent mode, can be used for application scenarios such as identity authentication, data encryption and decryption, protocol vulnerability analysis and performance test, can effectively improve the evaluation integrity and accuracy of a cryptographic algorithm and a cryptographic protocol, forms a complete and accurate test evaluation evidence chain, and improves the evaluation efficiency of the cryptographic algorithm and the cryptographic protocol. And the detection evaluation result is effectively supported. The system can be accessed to a production network to capture, identify and analyze network traffic, so that an international / national cryptographic algorithm and protocol security analysis function is realized, and verification and analysis on compliance, correctness, effectiveness and the like of password application in an important network and information system can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to software testing technology, and in particular to cryptographic application security assessment technology. Background Art

[0002] Cryptographic algorithms and protocols are fundamental to ensuring network and information system security. In recent years, security flaws, vulnerabilities, and attacks against cryptographic algorithms and protocols have become increasingly common. These attacks, through collision attacks, side-channel attacks, backdoor attacks, and exploitation of inherent vulnerabilities in cryptographic protocols, can lead to data leaks, identity theft, or other network security issues. With the implementation of laws and administrative regulations such as the "Cryptography Law," the "Regulations on the Administration of Commercial Cryptography," and the "Administrative Measures for the Security Assessment of Commercial Cryptography Applications," the national government has placed high priority on the security of cryptographic algorithms and protocols. A commercial cryptography security assessment system has been established, requiring security assessments of important networks and information systems, including critical information infrastructure.

[0003] Cryptographic algorithms are mainly divided into symmetric encryption algorithms, asymmetric encryption algorithms and hash algorithms. Cryptographic protocols mainly include TLS / SSL (Transport Layer Security), IPsec (Internet Protocol Security), SSH, PGP and other protocols. Cryptographic algorithm and protocol analysis mainly verifies and analyzes the compliance, correctness and effectiveness of cryptographic applications in important networks and information systems.

[0004] Currently, common algorithm and protocol analysis tools include Wireshark, OpenSSL, and Burp Suite. However, when using these tools to perform algorithm and protocol analysis, the following problems still exist:

[0005] 1. Lack of compliance detection and analysis capabilities. China has established a standard system for commercial cryptographic algorithms, cryptographic products, and application interfaces, such as GM / T 0015, GB / T 33560, and GB / T 38636. These standards cover aspects such as certificate compliance, general cryptographic service interface specifications, and cryptographic application identification specifications. However, there is currently a lack of such compliance checking tools and methods.

[0006] 2. According to existing research, some cryptographic algorithms, such as MD5, SHA-1, and RSA1024, are subject to security risks such as collision attacks and key guessing. The SSL protocol is subject to Heartbleed, and the web protocol is subject to packet replay. However, existing tools such as Wireshark, OpenSSL, and Burp Suite only provide network packet capture and analysis capabilities and lack automated detection methods for these cryptographic attacks.

[0007] 3. Currently, commercial cryptographic application security assessments primarily focus on testing and evaluating national cryptographic algorithms such as SM2, SM3, and SM4, national cryptographic protocols such as TLCP, and national cryptographic applications such as electronic signatures. Because the relevant algorithms and protocols are proprietary to China, commonly used tools are unable to identify and analyze them. This makes it impossible to verify the correctness and effectiveness of the implementation or configuration of the relevant cryptographic algorithms and protocols, and therefore cannot support cryptographic application security assessments.

[0008] 4. During the national security transformation of information systems, the relevant data encryption and decryption processes and signature verification processes will cause certain losses to system performance. Due to the high requirements for real-time and availability of the system in some business scenarios, it is necessary to accurately measure the performance losses caused by the above-mentioned transformation functions after the transformation is completed, so as to evaluate whether the transformed business applications meet the actual business scenario requirements. Summary of the Invention

[0009] In response to the problems existing in existing cryptographic algorithm and protocol testing schemes, the purpose of the present invention is to provide a cryptographic algorithm and protocol testing system, which can be effectively connected to the production network, and based on innovative testing methods, it can capture, identify and analyze network traffic, realize international / national secret cryptographic algorithms and protocol security analysis functions, and effectively overcome the problems existing in the existing technology.

[0010] In order to achieve the above-mentioned purpose, the cryptographic algorithm and protocol testing system provided by the present invention includes a traffic interception module, a scheduling control module, an analysis module and an output module;

[0011] The traffic interception module is configured to collect and forward network traffic between the client and the server, and the traffic interception module is configured to operate in a first working mode and a second working mode. When operating in the first working mode, the traffic interception module can directly mirror the network traffic between the client and the server to the analysis module; when operating in the second working mode, the traffic interception module can establish a dynamic interactive connection with the server through a proxy mode, intercept the network traffic between the client and the server and forward it to the scheduling control module, and at the same time can perform cryptographic algorithm and / or protocol test operations with the server according to the instructions of the scheduling control module, and forward the request and server response results to the analysis module;

[0012] The scheduling control module is configured to interact with the traffic interception module in data exchange, and can control the traffic interception module to establish a dynamic interactive connection between the traffic interception module and the server in a proxy mode by dynamically modifying the client network message when the traffic interception module is operating in the second working mode, and perform cryptographic algorithm and / or protocol testing operations, and forward request and response results to the analysis module;

[0013] The analysis module is configured to interact with the traffic interception module data and can perform cryptographic algorithm and / or protocol security analysis on the network data sent by the traffic interception module and / or the request and response results of the server;

[0014] The output module is configured to interact with the analysis module data, and can be used to collect relevant output content of the analysis module and display it according to configuration requirements.

[0015] In some embodiments of the present invention, the traffic interception module is configured to collect and forward network traffic between the client and the server through a network port.

[0016] In some embodiments of the present invention, the traffic interception module controls the switching of the working mode through a physical switch.

[0017] In some embodiments of the present invention, when the traffic interception module operates in the first operating mode, it is configured to operate at the physical layer of the OSI reference model and broadcast the data packets received by the sending port to all other ports.

[0018] In some embodiments of the present invention, when the traffic interception module operates in the first working mode, it mirrors the network traffic through the network interface and identifies, analyzes or counts the network data packets related to the cryptographic algorithm and protocol for the mirrored data.

[0019] In some embodiments of the present invention, when the traffic interception module operates in the second working mode, it can identify, analyze, and modify cryptographic protocol data by deploying a self-signed certificate, receiving and forwarding client cryptographic protocol requests, and simulating the client to establish a connection with the server.

[0020] In some embodiments of the present invention, when the traffic interception module operates in the second working mode, it sends a data packet modification operation instruction according to the scheduling control module, locates and identifies the request parameters in the cryptographic protocol data packet, and replaces them with the attack payload to verify the security of the cryptographic protocol.

[0021] In some embodiments of the present invention, when the traffic interception module operates in the second operating mode, it can receive various instructions issued by the scheduling control module and support the selection, modification and copying of intercepted cryptographic algorithms and protocol data packets.

[0022] In some embodiments of the present invention, the scheduling control module modifies the client network message by controlling the traffic interception module, establishes a connection with the server, obtains the server's cryptographic protocol response data packet by controlling the traffic interception module, and transfers it to the algorithm and protocol analysis module to dynamically analyze and verify the cryptographic network protocol based on the specific parameters of the server's cryptographic protocol response data packet.

[0023] In some embodiments of the present invention, the scheduling control module is configured to construct a suitable POC module by modifying the client network message and obtaining the banner information to verify the security of the server cryptographic algorithm and protocol; and / or

[0024] The scheduling control module is configured to construct appropriate network request messages by adding or modifying client network messages, simulate concurrent testing and response delays, and verify the performance efficiency of the server-side cryptographic algorithms and protocols; and / or

[0025] The scheduling control module is configured to verify the robustness of the server-side cryptographic algorithm and protocol by modifying the cryptographic algorithm, digital certificate, etc. in the client-side network message; and / or

[0026] The scheduling control module is configured to verify the validity of the server-side cryptographic algorithm and protocol by modifying the cryptographic algorithm, digital certificate, etc. in the client-side network message; and / or

[0027] The scheduling control module is configured to verify the consistency of the server's cryptographic algorithm and protocol by modifying the cryptographic algorithm, digital certificate, etc. in the client's network message.

[0028] The cryptographic algorithm and protocol testing system solution provided by the present invention can be effectively connected to the production network, and can capture, identify and analyze network traffic based on innovative testing methods to realize the security analysis function of international / national secret cryptographic algorithms and protocols; it can verify and analyze the compliance, correctness, and effectiveness of cryptographic applications in important networks and information systems.

[0029] The cryptographic algorithm and protocol testing system solution provided by the present invention has the following beneficial effects when applied in practice:

[0030] Meet the requirements for cryptographic application security assessment: By collecting relevant evidence, confirm that the cryptographic algorithms and protocols used meet the requirements of standards such as GB / T 39786;

[0031] Verify the security of cryptographic protocols, such as whether the login process can be bypassed, and whether there are security vulnerabilities in the cryptographic algorithm or protocol implementation;

[0032] Verify the strength and performance of cryptographic application protocols, such as whether they are unavailable in high-concurrency situations. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The present invention is further described below with reference to the accompanying drawings and specific embodiments.

[0034] Figure 1 This is an example diagram of the application of the cryptographic algorithm and protocol testing system of the present invention;

[0035] Figure 2 This is an example diagram of the structure of the cryptographic algorithm and protocol testing system of the present invention;

[0036] Figure 3 This is a test flow chart for transparent mode TLCP protocol compliance analysis in an example of the present invention;

[0037] Figure 4 This is a test flow chart for the security analysis of the TLCP protocol in the middleman mode in an example of the present invention. DETAILED DESCRIPTION

[0038] In order to make the technical means, creative features, objectives and effects achieved by the present invention easier to understand, the present invention is further described below with reference to specific illustrations.

[0039] See also Figure 1 The present invention provides a security testing and evaluation system 100 for cryptographic algorithms and protocols. The system can effectively access the production network, connect with the client 200 and the server 300 in the production network, and capture, identify and analyze network traffic to realize the security analysis function of international / national secret cryptographic algorithms and protocols.

[0040] The client 200 is configured to establish an HTTPS connection, perform identity authentication, data encryption and decryption, signature verification, etc. The server is configured to start a web service and call a password device login operation.

[0041] On this basis, the security testing and evaluation system 100 can also be deployed in two working modes: transparent mode and middleman mode, and can switch freely between the two working modes.

[0042] Furthermore, when this security testing and evaluation system works in transparent mode, it can hide the device IP or MAC address, evade network inspection, and identify and analyze the certificate and algorithm information in the cryptographic protocol through passive traffic analysis, that is, obtain the data flow information transmitted between the client 200 and the server 300 in a mirrored manner, and identify and analyze the certificate and algorithm information in the cryptographic protocol by directly analyzing the obtained data flow information.

[0043] When this security testing and evaluation system works in the middleman mode, it can provide dynamic packet modification function, realize dynamic interaction function with the server in proxy mode, and can be used to build application scenarios such as identity authentication, data encryption and decryption, protocol vulnerability analysis, and performance testing. It can effectively improve the evaluation integrity and accuracy of cryptographic algorithms and cryptographic protocols, form a complete and accurate test and evaluation evidence chain, and effectively support the detection and evaluation results.

[0044] See also Figure 2, which shows an example scheme of the composition of the cryptographic algorithm and protocol security testing and evaluation system 100 provided by the present invention.

[0045] Based on the diagram, the cryptographic algorithm and protocol security testing and evaluation system 100 provided by the present invention mainly includes four functional units: a traffic interception module 110, a scheduling control module 120, an algorithm and protocol analysis module 130, and a report and result output module 140.

[0046] The traffic interception module 110 in this system is configured to collect and forward network traffic between the client 200 and the server 300; at the same time, the traffic interception module 110 is specifically configured to operate in a first working mode and a second working mode, and to be able to switch freely between the two working modes.

[0047] The first working mode here is the transparent mode. When the traffic interception module 110 works in this mode, it can hide the device IP address or MAC address, and at the same time can directly mirror the network traffic between the client and the server to the algorithm and protocol analysis module 130.

[0048] The second working mode here is the middleman mode. When the traffic interception module 110 works in this mode, it can establish a dynamic interactive connection with the server 300 through the proxy mode, intercept the network traffic between the client 200 and the server 300 and forward it to the scheduling control module 120. At the same time, it can perform active cryptographic algorithm and / or protocol testing operations with the server 300 according to the instructions of the scheduling control module 120, and forward the request and server response results to the algorithm and protocol analysis module 130 for analysis and processing.

[0049] The scheduling control module 120 in this system is configured to interact with the traffic interception module 110 in data. When the traffic interception module 110 operates in the middleman mode, it can control the traffic interception module 110 to establish a dynamic interactive connection between the traffic interception module 110 and the server 120 in the proxy mode by dynamically modifying the client network message. On this basis, the traffic interception module 110 is further controlled to dynamically modify the obtained client network message according to the test requirements (such as cryptographic algorithm and / or protocol test requirements), and send the modified network message to the server 120 based on the dynamic interactive link established between the traffic interception module 110 and the server 120 in the proxy mode, and obtain the corresponding response result from the server 120. In this way, it is possible to intercept the network message data sent by the client, further dynamically modify the client network message, and then transmit the modified network message data to the server 120 in the proxy mode, thereby performing specific dynamic interaction with the server 120, and then performing cryptographic algorithm and / or protocol test operations, and forwarding the request and response results to the algorithm and protocol analysis module 130.

[0050] The algorithm and protocol analysis module 130 in this system is configured to interact with the traffic interception module 110 and can perform cryptographic algorithm and / or protocol security analysis on the network data traffic sent by the traffic interception module 110 and / or the request and response results of the server based on corresponding security standards.

[0051] The report and result output module 140 in this system is configured to interact with the algorithm and protocol analysis module 130 for data collection and display of the relevant output content of the algorithm and protocol analysis module 130 in accordance with relevant requirements.

[0052] In some embodiments of the present invention, the traffic interception module 110 in the system preferably collects and forwards the network traffic between the client 200 and the server 300 through a network port during specific implementation.

[0053] In a specific implementation, the traffic interception module 110 is specifically configured to operate at the physical layer of the OSI reference model and broadcast the data packets received by the sending port to all other ports.

[0054] As an example, the traffic interception module 110 may use a PHY (Physical Layer) chip to process signal conversion and transmission at the physical layer, and the corresponding Ethernet port supports 10 / 100 / 1000 Mbps.

[0055] Furthermore, the traffic interception module 110 controls the switching of the operating mode through a physical switch. Specifically, the traffic interception module 110 uses a microcontroller in conjunction with the physical switch to implement the switching control of the operating mode, wherein the microcontroller is configured to read the physical switch state and control the switching of the operating mode of the traffic interception module 110 based on the read physical switch state.

[0056] As a supplementary note, the microcontroller here can be Arduino or Raspberry Pi, etc.

[0057] When the traffic interception module 110 works in transparent mode, it works as a whole at the physical layer of the OSI reference model. On this basis, it hides the device IP address or MAC address by line switching, thereby not exposing the system's IP, MAC address and other information, thereby realizing hidden network packet capture behavior.

[0058] When the traffic interception module 110 works in transparent mode, it mirrors the network traffic through the network interface, and realizes the identification and analysis of the certificate and algorithm information in the cryptographic protocol in a passive traffic analysis manner.

[0059] Specifically, when the traffic interception module 110 operates in transparent mode, it obtains data flow information transmitted between the client and server in a mirrored manner and directly analyzes the resulting mirrored data to identify and analyze the certificate and algorithm information in the cryptographic protocol. The entire analysis process does not process the data flow information transmitted between the client and server in any way; it only passively analyzes the mirrored data.

[0060] Furthermore, the traffic interception module 110 is provided with an input interface, an output interface and a mirror port, wherein the input interface and the output interface are configured to be connected in series between the client and the server, and the mirror port is configured to be able to identify, analyze or count the incoming and outgoing network traffic when the input interface and the output interface are connected in series between the client and the server.

[0061] Accordingly, when the traffic interception module 110 is switched to transparent mode through physical switch control, the input interface and output interface in the traffic interception module 110 will be connected in series between the client and the server. At the same time, the mirror port will identify, analyze or count the network traffic entering and leaving the network through the input interface and output interface, thereby realizing the mirroring of network traffic through the network interface, and identifying, analyzing or counting network messages related to cryptographic algorithms and protocols.

[0062] As an example, the traffic interception module 110 targets the SSL cryptographic protocol connection establishment process between the client and the server by mirroring the relevant fields in the request packets such as Client Hello, Server Hello, Certificate, SKE, SHD, and performing format analysis on the digital certificate in the request packet to evaluate the consistency and security of the cryptographic protocol implementation.

[0063] When the traffic interception module 110 works in the middleman mode, it can dynamically modify the content and / or form of the request packet between the client and the server to achieve dynamic interaction with the server in the proxy mode, thereby being able to be used to construct application scenarios such as identity authentication, data encryption and decryption, protocol vulnerability analysis, and performance testing.

[0064] The traffic interception module 110 can also forward the original request sent by the client, the dynamically modified request sent by the client and the response result fed back by the server based on the request to the algorithm and protocol analysis module for analysis.

[0065] Furthermore, when the traffic interception module 110 works in the middleman mode, it captures, identifies and modifies the network traffic between the client and the server according to the instructions of the scheduling control module, establishes connections, performs identity authentication, data encryption and decryption and other operations with the server in a proxy manner, and forwards the request and response results to the algorithm and protocol analysis module for analysis.

[0066] Furthermore, when the traffic interception module 110 works in the middleman mode, when simulating the establishment of a network connection between the client and the server through the proxy mode, it deploys a self-signed certificate, receives and forwards client cryptographic protocol (such as SSL cryptographic protocol) requests and simulates the establishment of a connection between the client and the server, and can identify, analyze, and modify cryptographic protocol data.

[0067] The traffic interception module 110 generates a self-signed certificate, which can be used to replace the server to establish a communication connection with the client. When the traffic interception module 110 receives a client request, it establishes a connection with the client using the generated self-signed certificate that the client trusts. At the same time, it establishes communication with the server using another cryptographic protocol connection and forwards the decrypted data, thereby achieving SSL / TLS interception.

[0068] On this basis, the traffic interception module 110 selects, modifies and copies the data packets (such as cryptographic algorithms and protocol data packets) sent by the intercepted client according to the various data packet modification operation instructions issued by the scheduling control module 120, so as to carry out tests of various cryptographic algorithms and protocols.

[0069] Specifically, when the traffic interception module 110 works in the middleman mode, it can modify the operation instructions according to the data packet of the scheduling control module 120, and replace the intercepted cryptographic algorithm and protocol data packets with attack payloads by locating and identifying the request parameters in the cryptographic protocol data packets, and forward the modified data packets to the server to verify the security of the cryptographic protocol.

[0070] Furthermore, when the traffic interception module 110 works in the middleman mode, it can modify the operation instructions according to the data packet of the scheduling control module 120, number the cryptographic protocol data packets in the communication process, adjust the sending timing (such as time.sleep() function), set weights to adjust the number of requests sent for different requests (rand() random number generator), modify key login requests, important POST parameters in signature verification data packets, carry out concurrent testing of the cryptographic protocol, record response time, response status information, etc., thereby verifying the algorithm strength and performance of the cryptographic protocol.

[0071] Furthermore, when the traffic interception module 110 works in the middleman mode, it can modify the operation instructions according to the data packet of the scheduling control module 120, and dynamically adjust the client request parameters according to the different response status code information of the cryptographic service, such as highlighting the request packet with too long response time; the concurrent test simulates the virtual IP and MAC address, and based on the number of session connections, uses different combinations of IP addresses and MAC addresses, and uses the number of connections of different IP addresses to make concurrent requests to verify the stability of the cryptographic service under high concurrency.

[0072] In some embodiments of the present invention, the scheduling control module 120 in the system specifically modifies the client network message by controlling the traffic interception module 110, establishes a connection between the traffic interception module 110 and the server, and further dynamically analyzes and verifies the cryptographic network protocol, including the HTTPS protocol, SSH protocol, etc., identifies the key operations of the cryptographic protocol, so as to verify the security and performance efficiency of the cryptographic protocol.

[0073] Specifically, the scheduling control module 120 controls the traffic interception module 110 to obtain the server's cryptographic protocol response data packet. The algorithm and protocol analysis module 130 then dynamically analyzes and verifies the cryptographic network protocol based on the specific parameters of the server's cryptographic protocol response data packet. Based on this, the scheduling control module 120 further uses the traffic interception module 110 to dynamically adjust transmission parameters, such as adjusting the transmission frequency based on the HTTP response status code, to obtain the corresponding server's cryptographic protocol response data packet and complete the corresponding security analysis.

[0074] Furthermore, the scheduling control module 120 specifically controls the traffic interception module 110 to modify the client network message, and constructs a suitable POC module based on the obtained Banner information to verify the security of the server-side cryptographic algorithm and protocol.

[0075] Furthermore, the scheduling control module 120 specifically controls the traffic interception module 110 to add and modify client network messages, construct appropriate network request messages, simulate concurrent testing and response delays, and verify the performance efficiency of the server-side cryptographic algorithm and protocol.

[0076] Furthermore, the scheduling control module 120 specifically modifies the cryptographic algorithm, digital certificate, etc. in the client network message by controlling the traffic interception module 110 to verify the robustness of the server-side cryptographic algorithm and protocol.

[0077] Furthermore, the scheduling control module 120 specifically modifies the cryptographic algorithm, digital certificate, etc. in the client network message by controlling the traffic interception module 110 to verify the validity of the server cryptographic algorithm and protocol.

[0078] Furthermore, the scheduling control module 120 specifically modifies the cryptographic algorithm, digital certificate, etc. in the client network message by controlling the traffic interception module 110 to verify the consistency of the server cryptographic algorithm and protocol.

[0079] In some embodiments of the present invention, the algorithm and protocol analysis module 130 in the system can receive the response from the server received by the traffic interception module 110, and automatically identify, analyze and verify digital certificates, key operations, etc. in the process of protocol establishment, data encryption and decryption, signature verification, identity authentication, electronic signature, etc.

[0080] Furthermore, the algorithm and protocol analysis module 130 can check relevant fields according to national standards, industry standard data formats, data identification requirements, etc., and verify whether there are any unreasonable implementation situations in processes such as identity authentication.

[0081] Furthermore, the algorithm and protocol analysis module 130 can record, count and analyze the server response message, and can identify whether the server response message contains an abnormality such as an error during the performance test.

[0082] Furthermore, the algorithm and protocol analysis module 130 can record and analyze the server response message, and can identify whether there are security vulnerabilities in the server response report during security testing.

[0083] Furthermore, this algorithm and protocol analysis module 130 can conduct compliance analysis on commercial cryptographic digital certificates, commercial cryptographic algorithms and protocols in accordance with relevant requirements of the national commercial cryptographic application security assessment based on relevant standard requirements, and form a more complete evaluation evidence chain information.

[0084] In some embodiments of the present invention, the report and result output module 140 in the system can count, analyze, and display evidence such as national cryptographic algorithms, protocols, and applications in accordance with the requirements of commercial cryptographic application security assessment;

[0085] This report and result output module 140 can also perform statistical analysis on the test results according to the requirements of the performance test;

[0086] The report and result output module 140 can also verify and display the results of vulnerability verification according to the requirements of security analysis;

[0087] The report and result output module 140 can also perform statistical analysis on the test results according to the requirements of robustness, consistency and effectiveness.

[0088] The cryptographic algorithm and protocol security testing and evaluation system provided by the solution of the present invention can be implemented by constructing corresponding software and hardware programs, wherein the corresponding software programs can execute the test plan according to the strategy when running, and are stored in the corresponding storage medium for the processor to call and execute.

[0089] The cryptographic algorithm and protocol security testing and evaluation system 100 provided by the solution of the present invention can be effectively connected to the production network, connected to the client 200 and the server 300 in the production network, and can be deployed based on two working modes: transparent mode and middleman mode, so as to realize the capture, identification and analysis of the network traffic between the client 200 and the server 300, and perform international / national secret cryptographic algorithms and protocol security analysis, thereby realizing verification and analysis of the compliance, correctness, and effectiveness of cryptographic applications in important networks and information systems.

[0090] Regarding the cryptographic algorithm and protocol security testing and evaluation system solution provided by the present invention, the following further illustrates its implementation process and corresponding technical features through specific examples.

[0091] This example first constructs the corresponding hardware and software programs based on the above-mentioned cryptographic algorithm and protocol security test and evaluation system structure scheme. The hardware device consists of physical interfaces such as the network input port, network output port, USB interface, etc., and the software program is stored in the corresponding storage medium for the processor to call and execute, and can realize the corresponding functions of the traffic interception module, scheduling control module, algorithm and protocol analysis module, and report and result output module, thereby forming a cryptographic algorithm and protocol security test and evaluation system.

[0092] Combine Figure 1 As shown, when this cryptographic algorithm and protocol security testing and evaluation system is used, the network inlet and outlet are connected to the production network, and data connections are made with the client and server in the production network respectively to capture, identify and analyze network traffic, thereby realizing the security analysis function of international / national secret cryptographic algorithms and protocols.

[0093] The following specifically describes the security testing process of cryptographic algorithms and protocols using the cryptographic algorithm and protocol security testing and evaluation system through two test examples.

[0094] Test Example 1

[0095] This test embodiment takes the TLCP protocol compliance analysis as the test goal, captures the network data packets between the client and the national secret WEB service through the constructed cryptographic algorithm and protocol security test and evaluation system, and performs compliance analysis on the data messages of each request and response packet in transparent mode.

[0096] See also Figure 3 In this example, the cryptographic algorithm and protocol security test and evaluation system is switched to transparent mode, and the client and the national secret web service are subjected to transparent mode TLCP protocol compliance analysis. The corresponding test process is as follows:

[0097] Step 1: Analyze the TLCP protocol Client Hello request data packet to obtain the request fields such as Version, Random, and Cipher Suite. Perform format analysis according to GB / T 38636 "Information Security Technology Transport Layer Cryptography Protocol (TLCP)". For example, if the client version number is 1.1, the random number content should include the clock and random number, and the cipher suite should be one of the national cipher suites.

[0098] In this step, the traffic interception module in the cryptographic algorithm and protocol security test and evaluation system obtains the TLCP protocol Client Hello request data packet transmitted between the client and the server in a mirrored manner.

[0099] On this basis, we further analyze the TLCP protocol Client Hello request data packet to obtain fields such as request Version, Random, and Cipher Suite.

[0100] Step 2: Analyze the TLCP protocol Server Hello response data packet. If the connection is successfully established, obtain the response fields such as Version, Random, and Cipher Suite, and perform format analysis. If the server cannot find a matching cipher suite, obtain the handshake failure alarm information.

[0101] Step 3: Analyze the TLCP protocol Certificate, Server Key Exchange, and Server Hello Done response packets.

[0102] Specifically, if the cipher suite in step 2 uses the RSA, ECC, or ECDHE algorithm, the digital certificates in this message are the server's signature certificate and encryption certificate;

[0103] If the cipher suite in step 2 uses the IBC or IBSDH algorithm, the digital certificate in this message serves as the server identifier and IBC public parameters, which are used by the client and server to negotiate the IBC public parameters.

[0104] On this basis, the corresponding distribution process is as follows:

[0105] (3.1) Obtain and analyze signature and encryption certificates, and conduct certificate format analysis. Based on GM / T0015-2012 "Digital Certificate Format Specification Based on SM2 Cryptographic Algorithm," conduct compliance analysis of the SM2 digital certificate format and content, including testing and analysis of signature algorithms, identifiers, standard extensions, etc.

[0106] (3.2) Obtain and analyze the ECC-SM2-EXPORT signature value (SM2 algorithm) and perform signature value analysis. Calculate the signature value information based on the client random number, server random number, server encryption certificate, and other fields, and compare it with the Server Key Exchange information in the message to verify the TLCP protocol's one-way identity authentication.

[0107] Step 4: Analyze the TLCP protocol Client Key Exchange, Change Cipher Spec, and Encrypted Handshake Message request packets. Obtain the Client Key ciphertext value (SM2 algorithm) and perform SM2 ciphertext analysis based on algorithm-related characteristics, including the TLV structure integer type and length characteristics.

[0108] Step 5: Analyze the TLCP protocol Change Cipher Spec, Encrypted Handshake Message response packet. Obtain the Change Cipher Spec, Encrypted Handshake Message flag to verify the validity of the session key.

[0109] From the above, it can be seen that in this example, during the test process of transparent mode TLCP protocol compliance analysis through the cryptographic algorithm and protocol security test and evaluation system, the network traffic of the client and server is intercepted by the traffic interception module, and the network traffic data packets are forwarded to the algorithm and protocol analysis module for algorithm and protocol analysis, including field compliance analysis, digital certificate analysis, cryptographic algorithm analysis, etc. The relevant analysis results are sent to the report and result output module, and the relevant results are queried, counted and analyzed. The corresponding test report is generated based on the relevant detection and evaluation requirements and stored in the system storage medium through the USB interface.

[0110] At the same time, the overall test environment is deployed in transparent mode, without exposing hardware information such as the device MAC address, which can evade detection by relevant security equipment of the evaluated system and realize device stealth analysis; the overall detection and evaluation analyzes the relevant connection establishment requests of the client and server one by one against the standard requirements, and performs linkage calculation and verification on the relevant signature algorithms and encryption algorithm data packets to form a closed-loop evidence chain of cryptographic algorithms and protocols, thereby improving the accuracy and rationality of the evaluation evidence in the detection and evaluation process.

[0111] Combined with the relevant content of the test method presented in this test case, the following examples illustrate the technical requirements for the specific implementation of this example:

[0112] 1. When network traffic is intercepted in transparent mode, the relevant data packets are in TCP format, and the data packets are sorted and analyzed based on information such as message time and sequence number;

[0113] 2. There are certain differences in the implementation of the National Cryptography TLCP protocol by different manufacturers, including the extended protocol format of digital certificates. Some manufacturers use non-standard ports for implementation, and adaptation parameters need to be adjusted in the identification and analysis of the protocol;

[0114] 3. In case of connection errors, the system has corresponding detection mechanisms, covering public key algorithms, key exchange algorithms, national secret algorithms, etc.

[0115] 4. For standard algorithms and protocols, the system can identify and analyze the support for weak algorithms in the standard algorithm suite, and send relevant weak algorithms and protocol POC scripts for verification through the scheduling control module. The response traffic is forwarded to the algorithm and protocol analysis module for result recording and statistics, and the results of the exploitation of relevant algorithm security vulnerabilities are dynamically verified.

[0116] Test Example 2

[0117] This test embodiment also takes the TLCP protocol security analysis as the test target. Through the constructed cryptographic algorithm and protocol security test and evaluation system, the client is simulated in the middleman mode to exchange data with the national secret WEB service, and security analysis is carried out based on the data message of the server network response packet.

[0118] See also Figure 4 In this example, the constructed cryptographic algorithm and protocol security test and evaluation system is switched to the middleman mode to perform TLCP protocol security analysis in the middleman mode. The corresponding test process is as follows:

[0119] Step 1: Construct a TLCP protocol Client Hello request packet, analyze the response message, and verify the security of the server.

[0120] The system works as a cryptographic algorithm and protocol security testing and evaluation system in man-in-the-middle mode, establishing a connection with the client using a self-signed certificate that the client trusts, while establishing communication with the server using another SSL connection.

[0121] On this basis, we intercept the TLCP protocol Client Hello request packet sent by the client, locate and identify the request parameters in the TLCP protocol Client Hello request packet, replace them with the attack payload, complete the TLCP protocol Client Hello request packet reconstruction, and forward the reconstructed request packet to the server to verify the security of the TLCP protocol. The corresponding verification process is as follows:

[0122] (1.1) Carry out random number testing to verify the robustness of random values ​​on the server side;

[0123] (1.2) Send a large amount of Client Hello request data packets by forging IP addresses to verify the server response and whether there is DDOS phenomenon;

[0124] (1.3) Analyze the cryptographic algorithm suites supported by the server to determine whether any weak algorithm cryptographic algorithm suites are supported.

[0125] Step 2: The cryptographic algorithm and protocol security test and evaluation system working in the middleman mode obtains the TLCP protocol Server Hello response data packet of the server for the constructed TLCP protocol Client Hello request data packet, and further analyzes the TLCP protocol Server Hello response data packet, analyzes the TLCP protocol Certificate, Server KeyExchage, Server Hello Done response data packets, and analyzes the server response to see if there are any abnormalities.

[0126] Combined with the relevant content of the test method presented in this test case, the following examples illustrate the technical requirements for the specific implementation of this example:

[0127] 1. Randomness in cryptography is crucial to ensuring data security and reliability. Generate random numbers using a PRNG pseudo-random number generator, pseudo-random number generator, or artificial intelligence algorithm to verify the robustness of random numbers on the server.

[0128] 2. When launching a large volume of Client Hello request packets by forging IP addresses, consider combining traditional network DDOS attack methods, such as SYN flood, CC attack, and ACK flood, to launch a combined DDOS attack. In the algorithm and protocol analysis module, statistically analyze the time it takes for the server to respond to data and calculate the relevant message response time to evaluate the overall performance of the web service.

[0129] 3. Standard algorithms and protocols have known security vulnerabilities, such as the Heartbleed vulnerability, the Sweet32 vulnerability, and the TLS / SSL weak cipher suite vulnerability. By constructing a vulnerability POC through the scheduling control module and modifying the request data packet, the vulnerability exploitation of the response data packet can be verified.

[0130] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0131] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0132] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0133] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products of the embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as the combination of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0134] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0135] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.

[0136] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0137] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0138] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0139] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0140] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0141] The aforementioned methods, or specific system units, or portions thereof, of the present invention are purely software-based and can be implemented as program code on physical media, such as a hard drive, optical disk, or any electronic device (e.g., a smartphone or computer-readable storage medium). When a machine loads and executes the program code (e.g., a smartphone), the machine becomes a device for implementing the present invention. The aforementioned methods and devices of the present invention can also be transmitted in program code form via some transmission medium, such as a cable, optical fiber, or any other transmission method. When the program code is received, loaded, and executed by a machine (e.g., a smartphone), the machine becomes a device for implementing the present invention.

[0142] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the foregoing embodiments. The foregoing embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.

Claims

1. Cryptographic algorithm and protocol testing system, characterized in that, It includes traffic interception module, scheduling control module, analysis module and output module; The traffic interception module is configured to collect and forward network traffic between the client and the server, and the traffic interception module is configured to operate in a first working mode and a second working mode. When operating in the first working mode, the traffic interception module can directly mirror the network traffic between the client and the server to the analysis module; When operating in the second working mode, the traffic interception module can establish a dynamic interactive connection with the server through the proxy mode, intercept the network traffic between the client and the server and forward it to the scheduling control module, and can also perform cryptographic algorithm and / or protocol testing operations with the server according to the instructions of the scheduling control module, and forward the request and server response results to the analysis module; The scheduling control module is configured to interact with the traffic interception module in data exchange, and can control the traffic interception module to establish a dynamic interactive connection between the traffic interception module and the server in a proxy mode by dynamically modifying the client network message when the traffic interception module is operating in the second working mode, and perform cryptographic algorithm and / or protocol testing operations, and forward request and response results to the analysis module; The analysis module is configured to interact with the traffic interception module data and can perform cryptographic algorithm and / or protocol security analysis on the network data sent by the traffic interception module and / or the request and response results of the server; The output module is configured to interact with the analysis module data, and can be used to collect relevant output content of the analysis module and display it according to configuration requirements.

2. The cryptographic algorithm and protocol testing system according to claim 1, characterized in that: The traffic interception module is configured to collect and forward network traffic between the client and the server via a network port.

3. The cryptographic algorithm and protocol testing system according to claim 1 or 2, characterized in that: The traffic interception module controls the switching of the working mode through a physical switch.

4. The cryptographic algorithm and protocol testing system according to claim 1 or 2, characterized in that: When the traffic interception module operates in the first operating mode, it is configured to operate at the physical layer of the OSI reference model and broadcast the data packets received by the sending port to all other ports.

5. The cryptographic algorithm and protocol testing system according to claim 1, characterized in that: When the traffic interception module operates in the first working mode, it mirrors the network traffic through the network interface and identifies, analyzes or counts the network data packets related to the cryptographic algorithm and protocol for the mirrored data.

6. The cryptographic algorithm and protocol testing system according to claim 1, characterized in that: When the traffic interception module works in the second working mode, it can identify, analyze and modify the cryptographic protocol data by deploying a self-signed certificate, receiving and forwarding client cryptographic protocol requests and simulating the client to establish a connection with the server.

7. The cryptographic algorithm and protocol testing system according to claim 6, characterized in that: When the traffic interception module operates in the second working mode, it issues a data packet modification operation instruction according to the scheduling control module, locates and identifies the request parameters in the cryptographic protocol data packet, and replaces them with the attack payload to verify the security of the cryptographic protocol.

8. The cryptographic algorithm and protocol testing system according to claim 6, characterized in that: When the traffic interception module operates in the second operating mode, it can receive various instructions issued by the scheduling control module and complete the selection, modification and copying of the intercepted cryptographic algorithms and protocol data packets.

9. The cryptographic algorithm and protocol testing system according to claim 1, characterized in that: The scheduling control module modifies the client network message by controlling the traffic interception module, establishes a connection with the server, obtains the server's cryptographic protocol response data packet by controlling the traffic interception module, and transfers it to the algorithm and protocol analysis module to dynamically analyze and verify the cryptographic network protocol based on the specific parameters of the server's cryptographic protocol response data packet.

10. The cryptographic algorithm and protocol testing system according to claim 9, characterized in that: The scheduling control module is configured to construct a suitable POC module by modifying the client network message based on the obtained banner information to verify the security of the server cryptographic algorithm and protocol; and / or The scheduling control module is configured to construct appropriate network request messages by adding or modifying client network messages, simulate concurrent testing and response delay, and verify the performance efficiency of the server-side cryptographic algorithm and protocol; and / or The scheduling control module is configured to verify the robustness of the server-side cryptographic algorithm and protocol by modifying the cryptographic algorithm, digital certificate, etc. in the client-side network message; and / or The scheduling control module is configured to verify the validity of the server-side cryptographic algorithm and protocol by modifying the cryptographic algorithm, digital certificate, etc. in the client-side network message; and / or The scheduling control module is configured to verify the consistency of the server's cryptographic algorithm and protocol by modifying the cryptographic algorithm, digital certificate, etc. in the client's network message.

Citation Information

Cited By

  • Method, device and equipment for evaluating comprehensive performance of anti-quantum public key cryptographic algorithm

    CN121966875A

  • Methods, apparatus and equipment for comprehensive performance evaluation of quantum-resistant public-key cryptography algorithms

    CN121966875B