Fuzzy testing method for vulnerability mining and verification of SpringBoot Web application program

The fuzzy testing method automates vulnerability detection in SpringBoot Web applications using CodeQL and Fuzz testing, addressing inefficiencies in manual audits by improving detection accuracy and reducing false positives and negatives.

CN119089440AActive Publication Date: 2024-12-06ZHEJIANG UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411063326.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-12-06
Estimated Expiration
2044-08-05

AI Technical Summary

Technical Problem

Traditional manual source code audits for website security are inefficient, have low coverage, and are costly, necessitating a more effective method for automatically detecting and verifying security vulnerabilities in SpringBoot Web applications.

Method used

A fuzzy testing method using CodeQL static analysis to extract information and potential vulnerabilities, followed by Fuzz testing to construct verification messages and eliminate false positives, involving rule sets for routing, parameters, and class attributes, and utilizing Fuzz template scripts for dynamic verification.

Benefits of technology

Automatically constructs vulnerability verification messages, improving detection efficiency and reducing false positives and negatives, enhancing the security of SpringBoot Web applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089440A_ABST
    Figure CN119089440A_ABST
Patent Text Reader

Abstract

The invention discloses a fuzzy testing method for vulnerability mining and verification of a SpringBoot Web application program, and aims to improve code security by manually auditing a large number of codes, mining vulnerabilities and verifying the availability of the vulnerabilities before drinking software is put into the market. According to the method, based on CodeQL static analysis, Fuzz and other technologies, the vulnerability of the SpringBoot Web application program is mined, the availability of the vulnerability is verified, and finally the HTTP message which is successfully utilized is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of network security, and in particular relates to a fuzzy testing method for exploiting and verifying a SpringBoot Web application vulnerability. Background Art

[0002] With the improvement of social informatization, the Internet has been widely infiltrated into people's daily lives, bringing huge economic and social benefits. However, the rapid development of the Internet has also created more opportunities for malicious network attacks, and network security issues have become increasingly prominent. With the rapid development of the Internet, website applications are becoming more and more widespread, but at the same time, the security risks faced by websites are also increasing.

[0003] Before the website is officially launched, it is necessary to conduct a comprehensive security audit to discover potential security vulnerabilities. Traditional source code audits mainly rely on security researchers to manually analyze source code, manually construct vulnerability verification messages, and use experience to determine potential security issues. This method is inefficient, has low coverage, and is costly.

[0004] In order to improve the efficiency of source code auditing, it is of great significance to automatically construct vulnerability verification messages. Therefore, there is an urgent need for a system that can use program analysis technology to traverse the code and detect possible security vulnerabilities in the source code; and in order to improve the accuracy of vulnerability detection, it is necessary to automatically generate verification cases and perform vulnerability exploitation verification to eliminate false positives, so as to achieve the purpose of efficiently discovering various security vulnerabilities in the website, improving the code security of the website, and reducing security risks. Summary of the invention

[0005] The purpose of the present invention is to provide a fuzzy testing method for SpringBoot Web application vulnerability mining and verification in view of the deficiencies in the prior art.

[0006] The objective of the present invention is to achieve the following technical solution: a fuzzy testing method for SpringBoot Web application vulnerability mining and verification, comprising the following steps:

[0007] (1) Construct a set of SpringBoot Web application information extraction rules that can be recognized by the CodeQL static analysis tool, including routing information extraction rule sets, parameter information extraction rule sets, and class attribute information extraction rule sets;

[0008] (2) Construct a set of Java potential vulnerability feature rules that can be identified by the CodeQL static analysis tool;

[0009] (3) Use the CodeQL static analysis tool to extract key information and potential vulnerability information of the target SpringBoot Web application;

[0010] (4) Use the Fuzz template script to read the vulnerability information and build a Fuzz program for each vulnerability that needs fuzz testing;

[0011] (5) Configure the Fuzz running parameters, run the Fuzz program, and obtain the Crash set;

[0012] (6) Vote on the Crash set and construct the PoC feature.

[0013] Furthermore, in step (1), the routing information extraction rule set is used to extract routing information in the SpringBoot Web application, and the routing information includes a routing path and a request method type;

[0014] The parameter information extraction rule set is used to extract all parameter information corresponding to each route in the SpringBoot Web application, and the parameter information includes parameter name, parameter type and parameter request type;

[0015] The class attribute information extraction rule set is used to extract customized Class information in SpringBoot Web applications.

[0016] Furthermore, in step (2), the Java potential vulnerability feature rule set is used to extract the Sink points of potential vulnerabilities in the SpringBoot Web application and correspond to the extracted routing information and parameter information.

[0017] Furthermore, the step (3) specifically includes the following sub-steps:

[0018] (3.1) Build a database for the source code of the target SpringBoot Web application;

[0019] (3.2) Run the SpringBoot Web application information extraction rule set and the Java potential vulnerability feature rule set under CodeQL to obtain the encrypted bqrs file;

[0020] (3.3) Decrypt the encrypted bqrs file and convert it into a CSV file output containing the key information and potential vulnerability information of the target SpringBoot Web application.

[0021] Further, in step (4), the Fuzz template script includes an initialization module, a data processing module and a simulation request module;

[0022] The initialization module is used to read and store the vulnerability information to be detected, and to initialize and configure the program parameters;

[0023] The data processing module is used to perform data processing on the vulnerability point information read in and stored: classify and store the vulnerability point information according to parameter request type and parameter type;

[0024] The simulated request module is used to utilize Java reflection to construct a Junit test unit and simulate access to a target detection point.

[0025] Furthermore, in step (5), the configuration of the Fuzz running parameters is specifically:

[0026] (a.1) Configure the Fuzz instrumentation scope to all SpringBoot Web program source codes;

[0027] (a.2) Configure the upper limit of the number of crashes output by Fuzz;

[0028] (a.3) Configure the maximum duration of the Fuzz.

[0029] Furthermore, the step (6) specifically includes the following sub-steps:

[0030] (6.1) Create a voting map, where the key of the map is the voting object and the key value is the number of votes;

[0031] (6.2) Select any two results in the Crash set and extract the set of strings that are the same between them;

[0032] (6.3) Add the values ​​in the string set as key values ​​to the voting map, and increment the number of votes by one. If a string already exists in the voting map, the number of votes will be incremented by one directly;

[0033] (6.4) Select any two results from the Crash set again and repeat steps (6.2) to (6.3) until all pairwise combinations of the results in the Crash set are selected;

[0034] (6.5) Finally, all the keys with the highest number of votes in the voting map are used as PoC features.

[0035] The beneficial effects of the present invention are:

[0036] 1) Automatically construct vulnerability verification messages and perform vulnerability exploitation verification to eliminate false positives, so as to efficiently discover various security vulnerabilities in the website, improve the website's code security, and reduce security risks;

[0037] 2) Use static analysis to extensively search for potential vulnerabilities in SpringBoot Web applications, and then use Fuzz for dynamic verification, which improves the detection rate of vulnerabilities and reduces the false negative rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 This is a flowchart of a fuzz testing method for SpringBoot Web application vulnerability mining and verification;

[0039] Figure 2 Schematic diagram of the static analysis process and results. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical scheme and advantages of the present invention more clear, the present invention is further described in detail in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0041] The fuzzy testing method for SpringBoot Web application vulnerability mining and verification provided by the present invention uses static analysis to find potential vulnerability points in the SpringBoot Web application, and then uses Fuzz to perform dynamic verification to construct a vulnerability verification message.

[0042] like Figure 1 As shown, the present invention provides a fuzzy testing method for SpringBoot Web application vulnerability mining and verification, comprising the following steps:

[0043] (1) Construct a set of SpringBoot Web application information extraction rules that can be recognized by the CodeQL static analysis tool, including routing information extraction rule sets, parameter information extraction rule sets, and class attribute information extraction rule sets.

[0044] In step (1), the routing information extraction rule set is used to extract routing information in the SpringBoot Web application, and the routing information includes a routing path and a request method type.

[0045] The parameter information extraction rule set is used to extract all parameter information corresponding to each route in the SpringBoot Web application, and the parameter information includes parameter name, parameter type and parameter request type.

[0046] The class attribute information extraction rule set is used to extract customized Class information in SpringBoot Web applications.

[0047] (2) Construct a set of Java potential vulnerability feature rules that can be identified by the CodeQL static analysis tool.

[0048] In step (2), the Java potential vulnerability feature rule set is used to extract the Sink points of potential vulnerabilities in the SpringBoot Web application and correspond to the extracted routing information and parameter information.

[0049] (3) Use the CodeQL static analysis tool to extract key information and potential vulnerability information of the target SpringBoot Web application.

[0050] The step (3) specifically includes the following sub-steps:

[0051] (3.1) Build a database for the source code of the target SpringBoot Web application;

[0052] (3.2) Run the SpringBoot Web application information extraction rule set and the Java potential vulnerability feature rule set under CodeQL to obtain the encrypted bqrs file;

[0053] (3.3) Decrypt the encrypted bqrs file and convert it into a CSV file output containing the key information and potential vulnerability information of the target SpringBoot Web application.

[0054] (4) Use the Fuzz template script to read the vulnerability information and build a Fuzz program for each vulnerability that needs fuzz testing.

[0055] In step (4), the Fuzz template script includes an initialization module, a data processing module and a simulation request module;

[0056] The initialization module is used to read and store the vulnerability information to be detected, and to initialize and configure the program parameters;

[0057] The data processing module is used to perform data processing on the vulnerability point information read in and stored: classify and store the vulnerability point information according to parameter request type and parameter type;

[0058] The simulated request module is used to utilize Java reflection to construct a Junit test unit and simulate access to a target detection point.

[0059] (5) Configure the Fuzz running parameters, run the Fuzz program, and obtain the Crash set.

[0060] In step (5), the configuration of the Fuzz running parameters is specifically:

[0061] (a.1) Configure the Fuzz instrumentation scope to all SpringBoot Web program source codes;

[0062] (a.2) Set the upper limit of the number of crashes output by Fuzz to 5;

[0063] (a.3) Configure the maximum duration of Fuzz to 5 minutes.

[0064] (6) Vote on the Crash set and construct the PoC feature.

[0065] The step (6) specifically includes the following sub-steps:

[0066] (6.1) Create a voting map, where the key of the map is the voting object and the key value is the number of votes;

[0067] (6.2) Select any two results in the Crash set and extract the set of strings that are the same between them;

[0068] (6.3) Add the values ​​in the string set as key values ​​to the voting map, and increment the number of votes by one. If a string already exists in the voting map, the number of votes will be incremented by one directly;

[0069] (6.4) Select any two results from the Crash set again and repeat steps (6.2) to (6.3) until all pairwise combinations of the results in the Crash set are selected;

[0070] (6.5) Finally, all the keys with the highest number of votes in the voting map are used as PoC features.

[0071] The schematic diagram of the static analysis process and results is as follows Figure 2 shown.

[0072] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A fuzzy testing method for SpringBoot Web application vulnerability mining and verification, characterized in that: The following steps are involved: (1) Construct a set of SpringBoot Web application information extraction rules that can be recognized by the CodeQL static analysis tool, including routing information extraction rule sets, parameter information extraction rule sets, and class attribute information extraction rule sets; (2) Construct a set of Java potential vulnerability feature rules that can be identified by the CodeQL static analysis tool; (3) Use the CodeQL static analysis tool to extract key information and potential vulnerability information of the target SpringBoot Web application; (4) Use the Fuzz template script to read the vulnerability information and build a Fuzz program for each vulnerability that needs fuzz testing; (5) Configure the Fuzz running parameters, run the Fuzz program, and obtain the Crash set; (6) Vote on the Crash set and construct the PoC feature.

2. A fuzzy testing method for SpringBoot Web application vulnerability mining and verification according to claim 1, characterized in that: In step (1), the routing information extraction rule set is used to extract routing information in the SpringBoot Web application, and the routing information includes a routing path and a request method type; The parameter information extraction rule set is used to extract all parameter information corresponding to each route in the SpringBoot Web application, and the parameter information includes parameter name, parameter type and parameter request type; The class attribute information extraction rule set is used to extract customized Class information in SpringBoot Web applications.

3. A fuzzy testing method for SpringBoot Web application vulnerability mining and verification according to claim 2, characterized in that: In step (2), the Java potential vulnerability feature rule set is used to extract the Sink points of potential vulnerabilities in the SpringBoot Web application and correspond to the extracted routing information and parameter information.

4. A fuzzy testing method for SpringBoot Web application vulnerability mining and verification according to claim 1, characterized in that: The step (3) specifically includes the following sub-steps: (3.1) Build a database for the source code of the target SpringBoot Web application; (3.2) Run the SpringBoot Web application information extraction rule set and the Java potential vulnerability feature rule set under CodeQL to obtain the encrypted bqrs file; (3.3) Decrypt the encrypted bqrs file and convert it into a CSV file output containing the key information and potential vulnerability information of the target SpringBoot Web application.

5. A fuzzy testing method for SpringBoot Web application vulnerability mining and verification according to claim 1, characterized in that: In step (4), the Fuzz template script includes an initialization module, a data processing module and a simulation request module; The initialization module is used to read and store the vulnerability information to be detected, and to initialize and configure the program parameters; The data processing module is used to perform data processing on the vulnerability point information read in and stored: classify and store the vulnerability point information according to parameter request type and parameter type; The simulated request module is used to utilize Java reflection to construct a Junit test unit and simulate access to a target detection point.

6. A fuzzy testing method for SpringBoot Web application vulnerability mining and verification according to claim 1, characterized in that: In step (5), the configuration of the Fuzz running parameters is specifically: (a.1) Configure the Fuzz instrumentation scope to all SpringBoot Web program source codes; (a.2) Configure the upper limit of the number of crashes output by Fuzz; (a.3) Configure the maximum duration of the Fuzz.

7. A fuzzy testing method for SpringBoot Web application vulnerability mining and verification according to claim 1, characterized in that: The step (6) specifically includes the following sub-steps: (6.1) Create a voting map, where the key of the map is the voting object and the key value is the number of votes; (6.2) Select any two results in the Crash set and extract the set of strings that are the same between them; (6.3) Add the values ​​in the string set as key values ​​to the voting map, and increment the number of votes by one. If a string already exists in the voting map, the number of votes will be incremented by one directly; (6.4) Select any two results from the Crash set again and repeat steps (6.2) to (6.3) until all pairwise combinations of the results in the Crash set are selected; (6.5) Finally, all the keys with the highest number of votes in the voting map are used as PoC features.

Citation Information

Patent Citations

  • Access control vulnerability detection method and system based on RBAC mode Web application security

    CN116094808A

  • Method and system for detecting unauthorized vulnerabilities of Java Web system

    CN116738437A

  • Method for detecting vulnerabilities in software

    EP3495978A1

  • Verifying application security vulnerabilities

    US20130312102A1

  • Intelligent terminal operating system vulnerability repairing method and system based on vulnerability intelligence

    WO2023015783A1