Vulnerability reachability analysis and detection system based on calling link JavaScript component
By building multi-level function call links and using vulnerability link rules, the problem of vulnerability omission in JavaScript applications is solved, improving the accuracy of vulnerability detection and system security.
Patent Information
- Application Number
- CN202411427495.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-02-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The failure to effectively analyze and detect the call link of JavaScript applications in the prior art, resulting in vulnerability and affecting system security.
By building a multi-level function call link, using the AST syntax tree for in-depth analysis, identifying nested calling functions and recursive calling functions, and using vulnerability link rules to query vulnerability calling link fragments in the multi-level function call link to determine the vulnerability Accessibility and generate vulnerability reports.
It improves the accuracy of vulnerability detection and system security, ensures the correctness of code logic and in-depth analysis of complex function call relationships.
Smart Images

Figure CN119397545A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security, and in particular to a vulnerability reachability analysis and detection system based on a call link JavaScript component. Background Art
[0002] With the development of information technology, web applications installed on the client are written in JavaScript code, the security of which is often ignored by developers, resulting in a large number of security vulnerabilities.
[0003] A patent document with Chinese patent application number CN117610012A discloses an SCA vulnerability reachability analysis method, which includes: obtaining an application and a dependent component corresponding to the application, and building a dependency tree corresponding to the application based on the application and the dependent component; wherein the dependent component includes a vulnerable component; determining a first call graph of the application and a second call graph of the dependent component based on the dependency tree; determining a vulnerable function call chain in the vulnerable component based on the first call graph and the second call graph; determining a control flow graph of the vulnerable function call chain based on the vulnerable function call chain in the vulnerable component; using a segmented path search method, determining path constraint information corresponding to the control flow graph of the vulnerable function call chain based on the control flow graph of the vulnerable function call chain; determining a reachability analysis result of the vulnerability in the vulnerable component based on the path constraint information corresponding to the control flow graph of the vulnerable function call chain.
[0004] The existing technology does not analyze the call chain of the application, resulting in the omission of vulnerabilities, thereby affecting the security of the system. Summary of the invention
[0005] To this end, the present invention provides a vulnerability reachability analysis and detection system based on a call link JavaScript component, which can determine vulnerability reachability by building a multi-level function call link to ensure system security.
[0006] To achieve the above object, the present invention provides a vulnerability reachability analysis and detection system based on a call link JavaScript component, comprising:
[0007] Get module to get several risk files from the project source code;
[0008] A construction module, connected to the acquisition module, for constructing an AST syntax tree according to a calling function of a code line in any risk file;
[0009] A link generation module is connected to the construction module, accesses the AST syntax tree through a traversal technique, obtains a function expression, and constructs a basic function call link, thereby identifying a hierarchical structure to form a multi-level function call link;
[0010] The vulnerability detection module is connected to the link generation module, and uses the vulnerability link rules to query the multi-level function call link. If a vulnerability call link fragment is found, it is determined that the vulnerability is reachable, and the vulnerability is collected to generate a vulnerability report.
[0011] Furthermore, the building blocks include:
[0012] A lexical analysis unit, which uses a lexical analyzer to decompose a character string in a code line of the risk file into lexical units;
[0013] A syntax analysis unit, connected to the lexical analysis unit, generates a nested grammatical structure from the lexical unit through a parser;
[0014] A syntax tree construction unit, connected to the syntax analysis unit, constructs the syntax structure into an AST syntax tree according to syntax rules using a syntax analyzer;
[0015] The semantic analysis unit is connected to the source code generation module and performs semantic analysis according to the AST syntax tree to check the correctness of the code semantics.
[0016] Further, the semantic analysis unit includes:
[0017] Create a subunit to create a data structure to store structure variables and function declaration information in the code;
[0018] The checking subunit is used to check the AST syntax tree node according to the data structure to ensure that all information in the AST syntax tree node is consistent with the code information and meets the type requirements.
[0019] Furthermore, the link generation module includes:
[0020] An expression extraction unit uses a traversal technique to access a function call node in the AST syntax tree and obtain a function expression according to the function call node;
[0021] A call information extraction unit, connected to the expression extraction unit, searches for corresponding function call information based on the function expression using an ack code search tool;
[0022] A link generation unit is connected to the call information extraction unit, pre-processes the function call information, obtains the function call sequence structure and the hierarchical structure, thereby determining a basic function call link, identifies nested call functions based on the hierarchical structure to construct a nested function call link, and constructs a recursive function call link by identifying recursive call functions, thereby expanding the basic function call link into a multi-level function call link. Further, the link generation unit includes:
[0023] A basic call chain construction subunit, which constructs a basic function call chain according to the function call sequence;
[0024] A nested call identification subunit, connected to the basic call chain construction subunit, identifies a nested call function according to the basic function call chain and the hierarchical structure, and constructs a nested function call chain in the basic function call chain;
[0025] A multi-level call link construction subunit is connected to the nested call identification subunit, identifies the recursive call function according to the nested function call link and the hierarchical structure, and constructs a recursive function call link in the nested function call link, thereby expanding the basic function call link into a multi-level function call link.
[0026] Furthermore, the basic call chain construction subunit can determine the main function body to be called according to the function call sequence and the function hierarchy structure, and construct a basic function call chain based on the main function body and the function call sequence.
[0027] Furthermore, the nested call identification subunit can identify the calling relationship of the main function body in the basic function call link during the program execution, and construct a nested function call link representing the main function body in the basic function call link to form an inter-level call chain from the parent to the child call chain.
[0028] Furthermore, the vulnerability detection module includes:
[0029] A vulnerability link building unit determines the vulnerability type to be detected and builds corresponding vulnerability link rules;
[0030] A call link query unit, connected to the vulnerability link construction unit, queries whether there is a vulnerability call link fragment matching the vulnerability link rule in the multi-level function call link, and if so, it is considered that the vulnerability is reachable in the system;
[0031] The vulnerability report generating unit is connected to the call link query unit, collects matched vulnerabilities, and generates a vulnerability report.
[0032] Furthermore, the vulnerability link construction unit can determine the vulnerability type that needs to be detected, search for vulnerability information and triggering methods of the vulnerability type in the vulnerability database, and construct vulnerability link rules based on the vulnerability information and triggering methods.
[0033] Furthermore, the call link query unit can convert the vulnerability link rule into a query statement using a query language, and execute the query statement in a multi-level function call link.
[0034] Compared with the prior art, the beneficial effect of the present invention is that the construction module deeply analyzes the project source code through the AST syntax tree, ensures the correctness of the code logic, and provides a basis for subsequent function analysis. The link generation module helps to understand the complex function call relationship by constructing a multi-level function call link, and helps to deeply analyze the code and identify the security issues of the system by identifying nested and recursive function calls. The vulnerability detection module queries the multi-level function call link through the vulnerability link rules to determine whether the vulnerability is reachable, and generates a vulnerability report, thereby improving the accuracy of vulnerability detection and the security of the system.
[0035] In particular, decomposing strings in source code into lexical units and generating nested grammatical structures from lexical units, and then constructing the grammatical structures into AST syntax trees according to grammatical rules, helps to clarify the logical structure of the code and ensure the accuracy of the code by performing semantic analysis on the AST syntax tree.
[0036] In particular, by creating a data structure to check the AST to ensure the consistency of variable and function declarations with code information, AST generation errors are reduced, thereby achieving accuracy of the results.
[0037] In particular, by extracting the expression of function calls, a basis is provided for the subsequent analysis of the basic function call chain. The corresponding function call information is found by using code search tools to ensure that all relevant function calls in the code can be captured, providing the necessary data for building a complete function call chain graph. By analyzing the complex call relationships in the code, a multi-level function call chain is constructed, providing a basis for the query of code vulnerabilities.
[0038] In particular, building a basic function call chain provides a basic framework for the subsequent construction of multi-level call chains, which is used for basic interactions between functions. By identifying nested calling functions and recursive calling functions, the structure of code logic is clarified, which helps to identify system vulnerabilities.
[0039] In particular, by determining the main function body and the function calling sequence, the basic function calling chain is constructed in a planned manner, making the underlying framework logic more complete.
[0040] In particular, by identifying and constructing nested function call chains, support is provided for analyzing recursive function call chains and the execution process is optimized.
[0041] In particular, by accurately determining the vulnerability type and building a vulnerability chain rule that matches it, the accessibility of the vulnerability is judged, thereby identifying vulnerabilities that match the vulnerability chain rule, maintaining the security of the software system and reducing potential security threats.
[0042] In particular, by precisely defining vulnerability characteristics and triggering conditions, false positives and negatives can be reduced and the accuracy of vulnerability detection can be improved.
[0043] In particular, vulnerability query improves the efficiency of vulnerability detection, which helps to timely discover and repair security vulnerabilities in software systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A schematic diagram of the structure of a vulnerability reachability analysis and detection system based on a call link JavaScript component provided by an embodiment of the present invention;
[0045] Figure 2 A schematic diagram of the construction module structure of a vulnerability reachability analysis and detection system based on a call link JavaScript component provided by an embodiment of the present invention;
[0046] Figure 3 A schematic diagram of the structure of a link generation module of a vulnerability reachability analysis and detection system based on a call link JavaScript component provided by an embodiment of the present invention;
[0047] Figure 4 A schematic diagram of the vulnerability detection module structure of the vulnerability reachability analysis and detection system based on the call link JavaScript component provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0048] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0049] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0050] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be understood as a limitation on the present invention.
[0051] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0052] See also Figure 1 As shown, the vulnerability reachability analysis and detection system based on the call link JavaScript component provided by the embodiment of the present invention includes:
[0053] An acquisition module 10, acquiring several risk files from the project source code;
[0054] A construction module 20, connected to the acquisition module, is used to construct an AST syntax tree according to the calling function of the code line in any risk file;
[0055] The link generation module 30 is connected to the construction module, accesses the AST syntax tree through traversal technology, obtains function expressions, and constructs basic function call links, thereby identifying hierarchical structures to form multi-level function call links;
[0056] The vulnerability detection module 40 is connected to the link generation module, and uses the vulnerability link rules to query the multi-level function call link. If a vulnerability call link fragment is found, it is determined that the vulnerability is reachable, and the vulnerability is collected to generate a vulnerability report.
[0057] Specifically, since JavaScript projects often rely on third-party components, it is necessary to download and install the dependent third-party component source files in the form of npm. After forming a complete project source code, parse the risk files with js, ts, and vue suffixes to obtain the code logic structure in the risk files, and build the code logic structure into an AST syntax tree. The syntax tree will present the logical structure of the project in a tree manner. The AST syntax tree is accessed through traversal technology to obtain function expressions. Based on the function expressions, all function call information (caller, callee, parameters and return value, etc.) is obtained. The sequential structure of the main function body is determined according to the function call information to establish a basic function call link. In the basic function call link, nested call functions are identified to construct a nested function call link. In the nested function call link, recursive call functions are identified to construct a recursive function call link, thereby establishing a complete multi-level function call link. By constructing vulnerability link rules, vulnerability call link fragments are queried in the multi-level function call link. If a vulnerability call link fragment is found, it is determined that the vulnerability is reachable, the vulnerability is collected, and a vulnerability report is generated.
[0058] Specifically, the construction module uses the AST syntax tree to perform in-depth analysis of the project source code, ensuring the correctness of the code logic and providing a basis for subsequent function analysis. The link generation module helps understand complex function call relationships by building multi-level function call links, and helps to deeply analyze the code and identify system security issues by identifying nested and recursive function calls. The vulnerability detection module uses vulnerability link rules to query multi-level function call links to determine whether the vulnerability is reachable, and generates a vulnerability report, thereby improving the accuracy of vulnerability detection and the security of the system.
[0059] See also Figure 2 As shown, the building module 20 includes:
[0060] A lexical analysis unit 21, which uses a lexical analyzer to decompose the character string in the code line of the risk file into lexical units;
[0061] A syntax analysis unit 22, connected to the lexical analysis unit, generates a nested grammatical structure from the lexical unit through a parser;
[0062] A syntax tree construction unit 23, connected to the syntax analysis unit, uses a syntax analyzer to construct the syntax structure into an AST syntax tree according to syntax rules;
[0063] The semantic analysis unit 24 is connected to the source code generation module and performs semantic analysis according to the AST syntax tree to check the correctness of the code semantics.
[0064] Specifically, the source code of the risk file is decomposed into a series of lexical units, which are the smallest fragments in the source code, such as keywords, identifiers, constants, operators, etc. AST is a special tree data structure in which the nodes represent various structures in the source code, such as function definitions, loops, conditional judgments, etc.
[0065] Specifically, the strings in the source code are decomposed into lexical units, and the lexical units are used to generate nested grammatical structures, which are then constructed into an AST syntax tree according to grammatical rules. This helps to clarify the logical structure of the code and to ensure the accuracy of the code by performing semantic analysis on the AST syntax tree.
[0066] Specifically, the semantic analysis unit includes:
[0067] Create a subunit to create a data structure to store structure variables and function declaration information in the code;
[0068] The checking subunit is used to check the AST syntax tree node according to the data structure to ensure that all information in the AST syntax tree node is consistent with the code information and meets the type requirements.
[0069] Specifically, the function declaration information includes a function name, a return type, a parameter list, and a pointer to a function body.
[0070] Specifically, by creating a data structure to check the AST to ensure the consistency of variable and function declarations, AST generation errors are reduced, thereby achieving accuracy of the results.
[0071] See also Figure 2 As shown, the link generation module 30 includes:
[0072] The expression extraction unit 31 uses a traversal technique to access the function call node in the AST syntax tree and obtains the function expression according to the function call node;
[0073] A call information extraction unit 32, connected to the expression extraction unit, uses an ack code search tool to search for corresponding function call information based on the function expression;
[0074] The link generation unit 33 is connected to the call information extraction unit, pre-processes the function call information, obtains the function call sequence structure and the hierarchical structure, thereby determining the basic function call link, identifies the nested call function based on the hierarchical structure to construct a nested function call link, and constructs a recursive function call link by identifying the recursive call function, thereby expanding the basic function call link into a multi-level function call link.
[0075] Specifically, by traversing the AST to identify and extract function call nodes, the function call nodes contain key information of the function call, such as the name of the function, the parameters passed to the function, and the body of the function; by using ack (code search tool) to find all the call instances of the function in the source code, the call instances provide specific information on where and how the function is called, receive the function call data provided by the call information, and pre-process it to determine the sequential structure and hierarchical structure of the function call, thereby constructing a basic function call link, that is, a direct call relationship between functions. Then, by analyzing the hierarchical structure to identify nested calls and recursive calls, the basic function call link is expanded to a multi-level function call link.
[0076] Specifically, by extracting the expression of function calls, a basis is provided for the subsequent analysis of the basic function call chain. The corresponding function call information is found by using code search tools to ensure that all relevant function calls in the code can be captured, providing the necessary data for building a complete function call chain graph. By analyzing the complex call relationships in the code, a multi-level function call chain is constructed, providing a basis for the query of code vulnerabilities.
[0077] Specifically, the link generation unit includes:
[0078] A basic call chain construction subunit, which constructs a basic function call chain according to the function call sequence;
[0079] A nested call identification subunit, connected to the basic call chain construction subunit, identifies a nested call function according to the basic function call chain and the hierarchical structure, and constructs a nested function call chain in the basic function call chain;
[0080] A multi-level call link construction subunit is connected to the nested call identification subunit, identifies the recursive call function according to the nested function call link and the hierarchical structure, and constructs a recursive function call link in the nested function call link, thereby expanding the basic function call link into a multi-level function call link.
[0081] Specifically, by calling the function in the information in a sequence of calling, and according to the function calling sequence, a basic function calling link is constructed, wherein the basic function calling link mainly represents the direct calling relationship between functions, that is, the sequential calling between functions, and by identifying the hierarchical structure of the function in the basic function calling link, the nested calling of the function is determined, and a nested function calling link is constructed in the basic function calling link, and according to the nested function calling link and the hierarchical structure, the recursive calling function is further identified and a recursive function calling link is constructed in the nested function calling link, thereby expanding the basic function calling link into a multi-level function calling link.
[0082] Specifically, the nested call refers to calling another function inside a function, and the recursive call refers to a function calling itself directly or indirectly.
[0083] Specifically, building a basic function call chain provides a basic framework for the subsequent construction of multi-level call chains, which is used for basic interactions between functions. By identifying nested calling functions and recursive calling functions, the structure of code logic is clarified, which helps to identify system vulnerabilities.
[0084] Specifically, the basic call chain construction subunit can determine the main function body to be called according to the function call sequence and the function hierarchy structure, and construct a basic function call chain based on the main function body and the function call sequence.
[0085] Specifically, a basic function call link is constructed to determine the entry point of the program, usually the main function. Starting from the program entry, the order of each function call is tracked and the level of each function call is determined, thereby constructing a basic function call link, which shows the order of function calls during program execution.
[0086] Specifically, determining the main function body is the starting point for analyzing the basic function call chain, because the main function body usually calls other functions to execute different parts of the program.
[0087] Specifically, by determining the main function body and the function calling sequence, the basic function calling chain is constructed in a planned manner, making the underlying framework logic more complete and clear.
[0088] Specifically, the nested call identification subunit can identify the calling relationship of the main function body in the basic function call link during the program execution, and construct a nested function call link representing the main function body in the basic function call link to form a call chain between levels from the parent level to the child level call chain.
[0089] Specifically, to construct a nested function call link representing the main function body in the basic function call link, it is necessary to identify each function called by the main function body, as well as other functions further called by each function, to form a nested call structure. The call chain between levels means to construct a call chain from the parent function to the child function.
[0090] Specifically, the call chain between levels describes the hierarchical structure in the function call relationship from the parent to the child. The parent refers to the function that initiates the call. In the function call relationship, the parent function is the function that is currently executed and decides to call another function. The child refers to the called function, and the child function is the function called by the parent function.
[0091] Specifically, by identifying and constructing nested function call chains, support is provided for analyzing recursive function call chains and the execution process is optimized.
[0092] See also Figure 3 As shown, the vulnerability detection module 40 includes:
[0093] A vulnerability link construction unit 41 determines the type of vulnerability detected and constructs a corresponding vulnerability link rule;
[0094] A call link query unit 42, connected to the vulnerability link construction unit, queries whether there is a vulnerability call link fragment matching the vulnerability link rule in the multi-level function call link, and if so, it is considered that the vulnerability is reachable in the system;
[0095] The vulnerability report generating unit 43 is connected to the call link query unit, collects matched vulnerabilities, and generates a vulnerability report.
[0096] Specifically, the vulnerability types include SQL injection, cross-site scripting (XSS) and buffer overflow, etc. The vulnerability link rules define how to identify and track the function call paths that lead to security vulnerabilities.
[0097] Specifically, the vulnerability link rule queries the multi-level function call link, which is the order of all function calls starting from the main function body, as well as the hierarchical relationship between functions, by comparing the multi-level function call link with the vulnerability link rule to check whether there is a match.
[0098] Specifically, when it is confirmed that a vulnerability matches a rule, detailed information about the vulnerability is collected, including the location of the vulnerability (such as which line in the code), the scope of impact, and the severity level of the vulnerability.
[0099] Specifically, by accurately determining the vulnerability type and building a vulnerability chain rule that matches it, the accessibility of the vulnerability is judged, thereby identifying vulnerabilities that match the vulnerability chain rule, maintaining the security of the software system and reducing potential security threats.
[0100] Specifically, the vulnerability link construction unit can determine the vulnerability type that needs to be detected, search for vulnerability information and triggering methods of the vulnerability type in the vulnerability database, and construct vulnerability link rules based on the vulnerability information and triggering methods.
[0101] Specifically, vulnerability link rules are defined by the characteristics of the vulnerability and its manifestation in the code, so that the subsequent detection process can identify the vulnerability.
[0102] Specifically, by accurately defining vulnerability characteristics and trigger conditions, false positives and negatives can be reduced and the accuracy of vulnerability detection can be improved.
[0103] Specifically, the call link query unit can convert the vulnerability link rule into a query statement using a query language, and execute the query statement in a multi-level function call link.
[0104] Specifically, the vulnerability link rules are converted into the query language Cypher, and vulnerabilities matching the vulnerability link rules are searched in the multi-level function call links.
[0105] Specifically, the vulnerability query method improves the efficiency of vulnerability detection, which helps to timely discover and repair security vulnerabilities in software systems.
[0106] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
[0107] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A vulnerability reachability analysis and detection system based on call link JavaScript components, characterized in that: include: Get module to get several risk files from the project source code; A construction module, connected to the acquisition module, for constructing an AST syntax tree according to a calling function of a code line in any risk file; A link generation module is connected to the construction module, accesses the AST syntax tree through a traversal technique, obtains a function expression, and constructs a basic function call link, thereby identifying a hierarchical structure to form a multi-level function call link; The vulnerability detection module is connected to the link generation module, and uses the vulnerability link rules to query the multi-level function call link. If a vulnerability call link fragment is found, it is determined that the vulnerability is reachable, and the vulnerability is collected to generate a vulnerability report.
2. According to the vulnerability reachability analysis and detection system based on the call link JavaScript component of claim 1, it is characterized in that: The building blocks include: A lexical analysis unit, which uses a lexical analyzer to decompose a character string in a code line of the risk file into lexical units; A syntax analysis unit, connected to the lexical analysis unit, generates a nested grammatical structure from the lexical unit through a parser; A syntax tree construction unit, connected to the syntax analysis unit, constructs the syntax structure into an AST syntax tree according to syntax rules using a syntax analyzer; The semantic analysis unit is connected to the source code generation module and performs semantic analysis according to the AST syntax tree to check the correctness of the code semantics.
3. According to claim 2, the vulnerability reachability analysis and detection system based on the call link JavaScript component is characterized in that: The semantic analysis unit comprises: Create a subunit to create a data structure to store structure variables and function declaration information in the code; The checking subunit is used to check the AST syntax tree node according to the data structure to ensure that all information in the AST syntax tree node is consistent with the code information and meets the type requirements.
4. According to claim 3, the vulnerability reachability analysis and detection system based on the call link JavaScript component is characterized in that: The link generation module comprises: An expression extraction unit uses a traversal technique to access a function call node in the AST syntax tree and obtain a function expression according to the function call node; A call information extraction unit, connected to the expression extraction unit, searches for corresponding function call information based on the function expression using an ack code search tool; A link generation unit is connected to the call information extraction unit, pre-processes the function call information, obtains the function call sequence structure and the hierarchical structure, thereby determining a basic function call link, identifies nested call functions based on the hierarchical structure to construct a nested function call link, and constructs a recursive function call link by identifying recursive call functions, thereby expanding the basic function call link into a multi-level function call link.
5. According to claim 4, the vulnerability reachability analysis and detection system based on the call link JavaScript component is characterized in that: The link generation unit comprises: A basic call chain construction subunit, which constructs a basic function call chain according to the function call sequence; A nested call identification subunit, connected to the basic call chain construction subunit, identifies a nested call function according to the basic function call chain and the hierarchical structure, and constructs a nested function call chain in the basic function call chain; A multi-level call link construction subunit is connected to the nested call identification subunit, identifies the recursive call function according to the nested function call link and the hierarchical structure, and constructs a recursive function call link in the nested function call link, thereby expanding the basic function call link into a multi-level function call link.
6. The vulnerability reachability analysis and detection system based on the call link JavaScript component according to claim 5 is characterized in that: The basic call chain construction subunit can determine the main function body to be called according to the function call sequence and the function hierarchy structure, and construct a basic function call chain based on the main function body and the function call sequence.
7. The vulnerability reachability analysis and detection system based on the call link JavaScript component according to claim 6 is characterized in that: The nested call identification subunit can identify the calling relationship of the main function body in the basic function call link during the program execution, and construct a nested function call link representing the main function body in the basic function call link to form a call chain between levels from the parent level to the child level call chain.
8. The vulnerability reachability analysis and detection system based on call link JavaScript component according to claim 7 is characterized in that: The vulnerability detection module includes: A vulnerability link building unit determines the vulnerability type to be detected and builds corresponding vulnerability link rules; A call link query unit, connected to the vulnerability link construction unit, queries whether there is a vulnerability call link fragment matching the vulnerability link rule in the multi-level function call link, and if so, considers that the vulnerability is reachable; The vulnerability report generating unit is connected to the call link query unit, collects matched vulnerabilities, and generates a vulnerability report.
9. The vulnerability reachability analysis and detection system based on the call link JavaScript component according to claim 8 is characterized in that: The vulnerability link construction unit can determine the vulnerability type that needs to be detected, search for vulnerability information and triggering methods of the vulnerability type in the vulnerability database, and construct vulnerability link rules based on the vulnerability information and triggering methods.
10. The vulnerability reachability analysis and detection system based on call link JavaScript component according to claim 9 is characterized in that: The call link query unit can convert the vulnerability link rule into a query statement using a query language, and execute the query statement in a multi-level function call link.
Citation Information
Patent Citations
Program vulnerability detection method and device, electronic equipment and medium
CN113312618A
Fastjson deserialization vulnerability call chain mining method and system
CN116760573A
Code data processing method and device, computer equipment and storage medium
CN116974554A
Vulnerability reachability detection method, device and equipment and readable storage medium
CN117216765A
SCA vulnerability accessibility analysis method and apparatus, and electronic device
CN117610012A
Cited By
AI-based security vulnerability automatic repair suggestion generation method and system
CN120632894A
A method and system for generating automated security vulnerability remediation suggestions based on AI
CN120632894B