Automated Testing Method and Apparatus for Unauthorized Access Based on Permission Matrix
By generating a three-dimensional permission matrix and automatically generating unauthorized access test requests, combined with multi-dimensional judgment rules, the problem of low coverage and inaccurate judgment of unauthorized access tests in banking systems has been solved, achieving full-process automation and accurate risk identification, and meeting financial compliance requirements.
Patent Information
- Application Number
- CN202611467254.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-20
- Publication Date
- 2026-11-17
AI Technical Summary
Unauthorized access testing in banking systems suffers from low coverage, frequent omissions, and inaccurate assessments, failing to meet bank compliance and deployment control requirements.
Based on the permission matrix, a three-dimensional permission matrix is generated, and unauthorized access test requests are automatically generated. Unauthorized behavior is identified through multi-dimensional permission compliance judgment, including status code judgment, baseline comparison and sensitive field scanning, to achieve fully automated testing.
It has achieved full-process automation, full-scenario coverage, and precise risk classification for unauthorized access testing of banking systems, improving testing efficiency and accuracy and meeting financial compliance audit requirements.
Smart Images

Figure CN123122971A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network security testing technology, and more specifically, to an automated testing method and apparatus for unauthorized access based on a permission matrix. Background Technology
[0002] As banks accelerate their digital transformation, the architectural complexity of core business systems, counter operating systems, mobile banking, and online banking systems continues to increase. This presents characteristics such as multiple role layers, a large number of interfaces, sensitive business data, and stringent compliance requirements. For example, the role system covers multiple levels, including ordinary tellers, business supervisors, branch / head office administrators, and individual / corporate customers, with finely defined and hierarchically linked permissions. The number of system interfaces often reaches hundreds or even thousands, covering all business scenarios such as customer management, account transactions, loan approval, and counter operations. Business data includes highly sensitive information such as customer privacy, account funds, transaction records, and loan contracts; any leakage could trigger major security incidents such as customer fund risks and penalties. Bank systems undergo frequent version iterations and strict deployment controls, while also needing to meet the information security compliance audit requirements of the financial industry, placing extremely high demands on the efficiency, accuracy, and traceability of permission security testing.
[0003] Unauthorized access is one of the most frequent and dangerous security vulnerabilities in banking systems, directly affecting customer fund security and bank compliance operations. Therefore, unauthorized access testing is a core security testing step before a banking system goes live.
[0004] Currently, the banking industry's approach to privilege escalation testing is a hybrid approach combining manual testing with some semi-automatic tools. For example, the testing process involves testers manually reviewing the banking system's role permissions and business interfaces, and manually writing privilege escalation test cases; manually constructing test requests (such as using a low-privilege account to access a high-privilege interface, or replacing parameters to access someone else's data); manually reviewing the interface's return results after execution, and subjectively judging whether privilege escalation has occurred; and finally, manually compiling test reports and archiving test records. Regarding the capabilities of auxiliary tools: some semi-automatic tools only support simple interface request sending and parameter replacement, and cannot automatically collect role and interface information, build permission baselines, or have standardized privilege escalation judgment logic. They can only assist manual execution of some operations, and the core testing process still relies on manual intervention. Moreover, these tools can only achieve single-point, sampling testing, and cannot cover the bank's complex multi-level roles, massive interfaces, and full volume of sensitive data; essentially, they still do not deviate from the core logic of manual testing.
[0005] There is currently no effective solution to the above problems. Summary of the Invention
[0006] This invention provides an automated testing method and apparatus for unauthorized access based on a permission matrix, which at least solves the technical problems of low coverage, serious omissions, and inaccurate judgments in manual unauthorized access testing in related technologies, and is unable to adapt to bank compliance and online management.
[0007] According to one aspect of the present invention, an automated testing method for unauthorized access based on a permission matrix is provided, comprising: acquiring interface metadata, role permission information, and sensitive data identifiers of a target business system; generating a three-dimensional permission matrix based on the interface metadata, the role permission information, and the sensitive data identifiers, wherein the three-dimensional permission matrix is used to define the business interfaces and data resource ranges that each role in the target business system is allowed to access and operate on under legal conditions; automatically generating an unauthorized access test request for the target business system based on the three-dimensional permission matrix; sending the unauthorized access test request to the target business system and acquiring the response result of the target business system to the unauthorized access test request; and performing a multi-dimensional permission compliance determination on the response result according to a preset judgment rule and a sensitive data feature library to identify unauthorized access behavior.
[0008] Optionally, obtaining the interface metadata, role permission information, and sensitive data identifiers of the target business system includes: extracting the interface's Uniform Resource Locator (URL), request method, parameter structure, permission identifier, and transaction code as interface metadata by parsing the interface document, wherein the interface document is a standardized structured data file describing the application programming interface (API) functions, parameters, return values, and permission control, and the interface is an API provided by the target business system; obtaining the role permission information by connecting to the identity authentication and permission management subsystem, acquiring the target business system's role hierarchy information, role relationships, permission authorization scope, and identity authentication token generation rules; and obtaining the customer unique identifier, business account identifier, transaction flow identifier, and business document identifier as the sensitive data identifiers through a data dictionary or sample data collection.
[0009] Optionally, based on the three-dimensional permission matrix, an unauthorized access test request for the target business system is automatically generated, including at least one of the following: based on the three-dimensional permission matrix, a vertical privilege escalation test request is generated to access a business interface or functional module exclusive to a high-privilege role using the identity credentials of a low-privilege role; based on the three-dimensional permission matrix, a horizontal privilege escalation test request is generated to access business data or resources exclusively managed by a second user using the identity credentials of a first user, wherein the first user and the second user belong to the same permission level; based on the three-dimensional permission matrix, a data privilege escalation test request is generated to access business data records containing sensitive information using role credentials lacking specific data access permissions.
[0010] Optionally, a multi-dimensional permission compliance determination is performed on the response result, including: a first-level status code determination: checking the HTTP status code or business status code returned by the target business system; if the check result indicates that a success status code was returned for a request without permission, then unauthorized access is determined; a second-level baseline comparison determination: parsing the business data content in the response result and comparing the business data content with the three-dimensional permission matrix; if the comparison result indicates that the returned data resource is not within the allowed access range of the current requesting role, then it is determined to be unauthorized access; a third-level sensitive field determination: scanning the data structure in the response result; if the scan result indicates that a field in the sensitive data feature library is hit, then it is determined to be high-risk unauthorized access, wherein the high-risk unauthorized access is an access operation with an access risk higher than the risk threshold.
[0011] Optionally, the unauthorized access automated testing method further includes: if the third-level sensitive field determination is hit, the authorized access behavior is determined to be high-risk; if the second-level baseline comparison determination is hit but the third-level sensitive field determination is not hit, or only the first-level status code determination is hit and no critical business operation is detected, the authorized access behavior is determined to be medium-risk; if only the first-level status code determination is hit and non-sensitive information or test probe response is detected, the authorized access behavior is determined to be low-risk.
[0012] Optionally, a three-dimensional permission matrix is generated based on the interface metadata, the role permission information, and the sensitive data identifier, including: generating a mapping table between the role identifier in the role permission information, the interface unified resource locator in the interface metadata, and the data resource identifier; when a change in the permission configuration of the target business system is detected, an incremental collection mechanism is triggered to update the three-dimensional permission matrix.
[0013] Optionally, after performing multi-dimensional permission compliance judgment on the response result according to preset judgment rules and a sensitive data feature library to identify unauthorized access behavior, the unauthorized access automated testing method further includes: statistically analyzing the number of roles, interfaces, and data dimensions covered by the test to obtain a first statistical result; statistically analyzing the number, type distribution, and risk level of the identified unauthorized access vulnerabilities to obtain a second statistical result; and generating a full-link operation log based on the first statistical result and the second statistical result, wherein the full-link operation log records the test trigger time, executor, test parameters, and judgment result.
[0014] According to another aspect of the present invention, an automated testing device for unauthorized access based on a permission matrix is also provided, comprising: an acquisition module, configured to acquire interface metadata, role permission information, and sensitive data identifiers of a target business system, and generate a three-dimensional permission matrix based on the interface metadata, the role permission information, and the sensitive data identifiers, wherein the three-dimensional permission matrix is used to define the business interfaces and data resource ranges that each role in the target business system is allowed to access and operate on under legal conditions; a generation module, configured to automatically generate an unauthorized access test request for the target business system based on the three-dimensional permission matrix; a sending module, configured to send the unauthorized access test request to the target business system and acquire the response result of the target business system to the unauthorized access test request; and a judgment module, configured to perform multi-dimensional permission compliance judgment on the response result according to preset judgment rules and a sensitive data feature library to identify unauthorized access behavior.
[0015] Optionally, the acquisition module includes: an extraction unit, used to extract the interface's Uniform Resource Locator, request method, parameter structure, permission identifier, and transaction code as interface metadata by parsing the interface document, wherein the interface document is a standardized structured data file describing the application programming interface's functions, parameters, return values, and permission control, and the interface is an application programming interface provided by the target business system; a first acquisition unit, used to obtain the target business system's role hierarchy information, role relationships, permission authorization scope, and identity authentication token generation rules by connecting to the identity authentication and permission management subsystem, so as to obtain the role permission information; and a second acquisition unit, used to obtain the customer's unique identifier, business account identifier, transaction flow identifier, and business document identifier as the sensitive data identifier through a data dictionary or sample data collection.
[0016] Optionally, the generation module includes at least one of the following: a first generation unit, configured to generate, based on the three-dimensional permission matrix, a vertical privilege escalation test request using the identity credentials of a low-privilege role to request access to a business interface or functional module exclusive to a high-privilege role; a second generation unit, configured to generate, based on the three-dimensional permission matrix, a horizontal privilege escalation test request using the identity credentials of a first user to request access to business data or resources exclusively managed by a second user, wherein the first user and the second user belong to the same permission level; and a third generation unit, configured to generate, based on the three-dimensional permission matrix, a data privilege escalation test request using the identity credentials of a role lacking specific data access permissions to request access to business data records containing sensitive information.
[0017] Optionally, the determination module includes: a first determination unit for first-level status code determination: checking the HTTP status code or business status code returned by the target business system; if the check result indicates that a success status code was returned for a request without permission, then unauthorized access behavior is determined; a second determination unit for second-level baseline comparison determination: parsing the business data content in the response result and comparing the business data content with the three-dimensional permission matrix; if the comparison result indicates that the returned data resource is not within the allowed access range of the current requesting role, then it is determined to be unauthorized access; a third determination unit for third-level sensitive field determination: scanning the data structure in the response result; if the scan result indicates that a field in the sensitive data feature library is hit, then it is determined to be high-risk unauthorized access, wherein the high-risk unauthorized access is an access operation with an access risk higher than a risk threshold.
[0018] Optionally, the unauthorized access automated testing device further includes: a first determining unit, configured to determine the authorized access behavior as high-risk if the third-layer sensitive field determination is hit; a second determining unit, configured to determine the authorized access behavior as medium-risk if the second-layer baseline comparison determination is hit but the third-layer sensitive field determination is not hit, or only the first-layer status code determination is hit and no critical business operation is detected; and a third determining unit, configured to determine the authorized access behavior as low-risk if only the first-layer status code determination is hit and non-sensitive information or test probe response is detected.
[0019] Optionally, the acquisition module includes: a fourth generation unit, used to generate a mapping table between the role identifier in the role permission information, the interface unified resource locator in the interface metadata, and the data resource identifier; and a triggering unit, used to trigger an incremental acquisition mechanism to update the three-dimensional permission matrix when a change in the permission configuration of the target business system is detected.
[0020] Optionally, the unauthorized access automated testing device further includes: a first statistics module, used to perform multi-dimensional permission compliance judgment on the response result according to preset judgment rules and a sensitive data feature library to identify unauthorized access behavior, and then statistically analyze the number of roles, number of interfaces, and data dimensions covered by the test to obtain a first statistical result; a second statistics module, used to statistically analyze the number, type distribution, and risk level of the identified unauthorized access vulnerabilities to obtain a second statistical result; and a generation module, used to generate a full-link operation log based on the first and second statistical results, wherein the full-link operation log records the test trigger time, executor, test parameters, and judgment result.
[0021] According to another aspect of the present invention, a computer program product is also provided, including computer instructions, which, when executed by a processor, perform the unauthorized access automation testing method based on a permission matrix as described above.
[0022] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein the program executes the unauthorized access automation testing method based on a permission matrix as described in any one of the above embodiments.
[0023] According to another aspect of the present invention, a processor is also provided, the processor being used to run a program, wherein the program, when running, executes the unauthorized access automation testing method based on a permission matrix as described above.
[0024] In this embodiment of the invention, interface metadata, role permission information, and sensitive data identifiers of the target business system are obtained. A three-dimensional permission matrix is generated based on these metadata, role permission information, and sensitive data identifiers. The three-dimensional permission matrix defines the business interfaces and data resource ranges that each role in the target business system is allowed to access and operate on under legal conditions. Based on the three-dimensional permission matrix, an unauthorized access test request for the target business system is automatically generated. The unauthorized access test request is sent to the target business system, and the response result of the target business system to the unauthorized access test request is obtained. According to preset judgment rules and a sensitive data feature library, a multi-dimensional permission compliance judgment is performed on the response result to identify unauthorized access. Authorized access behavior is addressed by using a three-dimensional permission matrix automatically constructed based on interface metadata, role permission information, and sensitive data identifiers to reverse-generate unauthorized access test requests covering vertical, horizontal, and data dimensions. Combined with status codes, business baselines, and multi-dimensional compliance judgment rules for sensitive fields, the response results are automatically and accurately identified. This achieves the goal of automating the entire process of unauthorized access testing in banking systems, covering all scenarios, and accurately classifying risks. This improves testing efficiency and accuracy, ensures data security, and meets financial compliance audit requirements. Furthermore, it solves the technical problems of low coverage, serious omissions, and inaccurate judgments in manual unauthorized access testing, which are unsuitable for bank compliance and deployment control. Attached Figure Description
[0025] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0026] Figure 1 This is a hardware structure block diagram of a mobile terminal for an automated testing method for unauthorized access based on a permission matrix, according to an embodiment of the present invention.
[0027] Figure 2 This is a flowchart of an automated testing method for unauthorized access based on a permission matrix according to an embodiment of the present invention;
[0028] Figure 3 This is a schematic diagram of an automated testing device for unauthorized access based on a permission matrix according to an embodiment of the present invention.
[0029] The above figures include the following reference numerals:
[0030] 102. Processor; 104. Memory; 106. Transmission device; 108. Input / output device. Detailed Implementation
[0031] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0033] As described in the background section, related technologies suffer from low coverage, serious omissions, and inaccurate judgments in manual unauthorized access testing, failing to meet the requirements of bank compliance and online control. This invention provides an automated testing method and apparatus for unauthorized access based on a permission matrix, a computer-readable storage medium, a processor, and a computer program product.
[0034] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0035] The methods and embodiments provided in this invention can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for an automated testing method for unauthorized access based on a permission matrix, according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0036] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the automated testing method for unauthorized access based on a permission matrix in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0037] According to an embodiment of the present invention, a method embodiment of an automated testing method for unauthorized access based on a permission matrix is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0038] Figure 2 This is a flowchart of an automated testing method for unauthorized access based on a permission matrix according to an embodiment of the present invention, such as... Figure 2 As shown, the method includes the following steps:
[0039] Step S202: Obtain the interface metadata, role permission information, and sensitive data identifiers of the target business system, and generate a three-dimensional permission matrix based on the interface metadata, role permission information, and sensitive data identifiers. The three-dimensional permission matrix is used to define the business interfaces that each role in the target business system is allowed to access and the range of data resources that are allowed to operate under legal conditions.
[0040] In this embodiment, by automatically collecting interface metadata, role permission information, and sensitive data identifiers and constructing a three-dimensional permission matrix, a clear legal mapping baseline between roles, interfaces, and data resources can be established. This replaces the inefficient traditional method of manually sorting out role permissions and provides structured data support for the subsequent automatic generation of full-scenario unauthorized test requests and accurate judgment.
[0041] Step S204: Based on the three-dimensional permission matrix, automatically generate unauthorized access test requests for the target business system.
[0042] In this embodiment, by parsing the missing or abnormal mapping relationships in the three-dimensional permission matrix, three typical test requests of vertical privilege escalation, horizontal privilege escalation, and data privilege escalation are automatically constructed in reverse. This can transform the abstract permission baseline into specific attack simulation scenarios, thereby replacing manual writing of test cases and sampling tests. It can achieve full coverage of the bank's complex role hierarchy, massive interfaces, and all sensitive data, ensuring the comprehensiveness and accuracy of privilege escalation vulnerability discovery.
[0043] Step S206: Send an unauthorized access test request to the target business system and obtain the response result of the target business system to the unauthorized access test request.
[0044] In this embodiment, by automating the sending of test requests to the target business system and obtaining response results, unattended and automated closed-loop testing can be achieved, thereby reducing labor costs and significantly improving testing efficiency. This ensures that real feedback from interfaces can be obtained quickly and in real time in scenarios with high-frequency version iterations in banking systems, providing the original data foundation for subsequent accurate permission compliance determination.
[0045] Step S208: Based on the preset judgment rules and the sensitive data feature library, perform multi-dimensional permission compliance judgment on the response result to identify unauthorized access behavior.
[0046] In this embodiment, by combining preset judgment rules with a sensitive data feature library to perform multi-dimensional permission compliance judgment on the response results, standardized logic can be used to replace manual judgment, thereby achieving accurate identification and risk classification of status code anomalies, unauthorized access to business baselines, and sensitive data leakage, ensuring the objectivity and consistency of test results, and meeting the requirements for security test compliance and traceability.
[0047] As described above, in this embodiment of the invention, the interface metadata, role permission information, and sensitive data identifiers of the target business system are obtained, and a three-dimensional permission matrix is generated based on these metadata, role permission information, and sensitive data identifiers. The three-dimensional permission matrix defines the business interfaces and data resource ranges that each role in the target business system is allowed to access and operate on under legal conditions. Based on the three-dimensional permission matrix, an unauthorized access test request for the target business system is automatically generated. This unauthorized access test request is sent to the target business system, and the response result of the target business system to the unauthorized access test request is obtained. According to preset judgment rules and a sensitive data feature library, a multi-dimensional permission compliance judgment is performed on the response result to identify unauthorized access behavior. By utilizing the three-dimensional permission matrix automatically constructed based on interface metadata, role permission information, and sensitive data identifiers, unauthorized access test requests covering vertical, horizontal, and data dimensions are generated in reverse. Combined with status codes, business baselines, and multi-dimensional compliance judgment rules for sensitive fields, the response result is automatically and accurately identified. This achieves the goal of automating the entire process of unauthorized access testing in the banking system, covering all scenarios, and accurately classifying risks. This results in improved testing efficiency and accuracy, ensured data security, and met the technical requirements of financial compliance audits.
[0048] The technical solutions provided by the embodiments of the present invention solve the technical problems of low coverage, serious omissions, and inaccurate judgments in related technologies, which make them unsuitable for bank compliance and online management.
[0049] According to the above embodiments of the present invention, obtaining interface metadata, role and permission information, and sensitive data identifiers of a target business system includes: parsing the interface document to extract the interface's Uniform Resource Locator (URL), request method, parameter structure, permission identifier, and transaction code as interface metadata, wherein the interface document is a standardized structured data file describing the application programming interface (API) functions, parameters, return values, and permission control, and the interface is an API provided by the target business system; obtaining role and permission information by connecting to the identity authentication and permission management subsystem, acquiring the target business system's role hierarchy information, role relationships, permission authorization scope, and identity authentication token generation rules; and obtaining customer unique identifiers, business account identifiers, transaction flow identifiers, and business document identifiers as sensitive data identifiers through a data dictionary or sample data collection.
[0050] In this embodiment, by parsing standardized interface documents, connecting to the permission management subsystem, and collecting data dictionaries or sample data, interface metadata, role permission information, and sensitive data identifiers are obtained respectively. This enables the comprehensive and accurate extraction of key configurations and data features of the banking system in an automated manner, replacing the inefficiency and omission risks caused by manual sorting. This ensures that the subsequently constructed three-dimensional permission matrix has completeness and real-time performance, laying a data foundation for accurately defining legal access boundaries and generating fully covered unauthorized access test requests.
[0051] Specifically, the automated testing task is initiated, triggering the bank permission information collection module. The bank permission information collection module automatically connects to the bank system to collect three types of information: interface collection, which connects to the Swagger / OpenAPI interface documentation to extract full metadata such as interface URL, request method, parameters, permission identifier, and transaction code, completing the full automatic collection of interface, role, and sensitive data.
[0052] Optionally, the above-mentioned role collection may include, but is not limited to: connecting to the bank's unified access management platform (Identity and Access Management, IAM) and teller management system to retrieve role level, association relationship, permission scope, token acquisition rules, etc.; the above-mentioned data collection may include, but is not limited to: automatically capturing sensitive financial data identifiers such as customer ID, business characters, and transaction serial numbers.
[0053] According to the above embodiments of the present invention, based on a three-dimensional permission matrix, an unauthorized access test request for a target business system is automatically generated, including at least one of the following: based on the three-dimensional permission matrix, generating a vertical privilege escalation test request using the identity credentials of a low-privilege role to request access to a business interface or functional module exclusive to a high-privilege role; based on the three-dimensional permission matrix, generating a horizontal privilege escalation test request using the identity credentials of a first user to request access to business data or resources exclusively managed by a second user, wherein the first user and the second user belong to the same permission level; based on the three-dimensional permission matrix, generating a data privilege escalation test request using the identity credentials of a role lacking specific data access permissions to request access to business data records containing sensitive information.
[0054] In this embodiment, by using a three-dimensional permission matrix to reverse deduce permission missing or conflict scenarios, three types of unauthorized access test requests—vertical, horizontal, and data—are automatically generated. This transforms the abstract permission baseline into specific automated attack simulation test cases, comprehensively covering core unauthorized access scenarios in the banking system, such as cross-level, cross-user, and sensitive data leakage. This replaces the limitations of manually writing test cases and the blind spots of sampling tests, achieving full traversal and accurate detection of complex permission logic.
[0055] Specifically, the three-dimensional permission matrix construction module automatically generates a bank-specific permission baseline matrix based on the collected information. That is, based on the collected information, the three-dimensional permission matrix construction module automatically generates a three-dimensional permission matrix for bank roles R → allowed access to business interfaces I → allowed access to financial data D, clarifying the legal access scope of each role and forming the permission baseline for unauthorized access testing. The financial scenario unauthorized access request generation module automatically generates three types of unauthorized access test requests adapted to banking business based on the permission matrix. This allows ordinary salespersons and ordinary users with low-authority credentials to access high-authority exclusive interfaces such as business approval.
[0056] According to the above embodiments of the present invention, a multi-dimensional permission compliance determination is performed on the response result, including: a first-level status code determination: checking the HTTP status code or business status code returned by the target business system; if the check result indicates that a success status code was returned for a request without permission, then unauthorized access behavior is determined; a second-level baseline comparison determination: parsing the business data content in the response result and comparing the business data content with the three-dimensional permission matrix; if the comparison result indicates that the returned data resource is not within the allowed access range of the current requesting role, then it is determined to be unauthorized access; a third-level sensitive field determination: scanning the data structure in the response result; if the scan result indicates that a field in the sensitive data feature library is hit, then it is determined to be high-risk unauthorized access, wherein high-risk unauthorized access is an access operation with an access risk higher than the risk threshold.
[0057] In this embodiment, by sequentially executing status code determination, baseline comparison determination, and sensitive field determination, a multi-dimensional compliance review mechanism from surface response to deep data can be constructed. By using standardized rules and a sensitive data feature library to accurately analyze the response results, it is possible to effectively identify hidden unauthorized access and sensitive data leakage risks, achieve objective and automated identification and high-risk classification of unauthorized behavior, thereby improving the accuracy and compliance of test determination and meeting the financial industry's requirements for rigorous security testing.
[0058] Specifically, the unauthorized request generation module is based on a matrix and automatically generates three types of unauthorized test requests: vertical, horizontal, and data-based. It automatically sends the test requests to the system under test and obtains the interface return results. The unauthorized judgment module performs three-layer judgment to complete unauthorized identification and risk classification. The bank-specific unauthorized judgment module has built-in bank-specific judgment rules and a sensitive field library to perform three-layer intelligent judgment.
[0059] It should be noted that the aforementioned unauthorized access refers to a user accessing system interfaces, business data, or operational functions beyond their authorized scope through illegal means. This is divided into three categories: vertical unauthorized access, horizontal unauthorized access, and data unauthorized access. Vertical unauthorized access is when a low-authority role (such as a regular salesperson) accesses the exclusive interfaces / operations of a high-authority role (such as the salesperson's superior or an administrator). Horizontal unauthorized access is when a role with the same permissions (such as salesperson A) accesses private business data managed by other users at the same level (such as salesperson B). Data unauthorized access is when a role without the corresponding data permissions illegally accesses sensitive customer financial data (such as account balances and transaction records).
[0060] According to the above embodiments of the present invention, the unauthorized access automated testing method further includes: if the third-level sensitive field determination is hit, the authorized access behavior is determined to be high-risk; if the second-level baseline comparison determination is hit but the third-level sensitive field determination is not hit, or only the first-level status code determination is hit and no key business operation is detected, the authorized access behavior is determined to be medium-risk; if only the first-level status code determination is hit and non-sensitive information or test probe response is detected, the authorized access behavior is determined to be low-risk.
[0061] In this embodiment, by classifying unauthorized access behavior into three risk levels—high, medium, and low—based on the combination of hit determination layers, a refined risk quantification assessment system can be established. By distinguishing whether it involves sensitive data leakage and critical business operations, it helps the security team prioritize the location and handling of high-risk vulnerabilities, optimize the allocation efficiency of security operation resources, and provide a basis for decision-making for subsequent compliance report generation and automated blocking strategies.
[0062] Specifically, the three-layer intelligent judgment includes status code judgment, business baseline judgment, and sensitive field judgment. Among them, the status code judgment should return 401 / 403 No permission, but returns 200 success status, which initially judges unauthorized access; the business baseline judgment compares with the permission matrix and returns business data that the role does not have permission for, which directly judges unauthorized access; the sensitive field judgment matches the bank's sensitive field database, and if a match is found, it is directly judged as high-risk financial unauthorized access; then, the risk classification is automatically completed: high risk (sensitive data leakage), medium risk (business operation unauthorized access), and low risk (unauthorized access to non-sensitive information).
[0063] It should be noted that the role-resource matrix is a three-dimensional permission baseline that clarifies the legal mapping relationship between each role (R), the allowed access interface (I), and the allowed operation of financial data resources (D) in the bank. The above-mentioned horizontal privilege violation is using the login credentials of salesperson A to access the user data managed by salesperson B, or using the same user role to access other user account information. Data privilege violation is using a role without data permissions to access sensitive financial data such as user balance, transaction records, and approval opinions.
[0064] According to the above embodiments of the present invention, a three-dimensional permission matrix is generated based on interface metadata, role permission information, and sensitive data identifiers, including: generating a mapping table between role identifiers in role permission information, interface unified resource locators in interface metadata, and data resource identifiers; when a change in the permission configuration of the target business system is detected, an incremental collection mechanism is triggered to update the three-dimensional permission matrix.
[0065] In this embodiment, by establishing a standardized mapping table between roles, interfaces and data resources, and introducing an incremental collection mechanism when permission configuration changes, a dynamic and maintainable permission baseline can be constructed to ensure that the three-dimensional permission matrix can reflect the latest security configuration status of the system in real time. This ensures the accuracy of subsequent unauthorized access test requests and the timeliness of test results, and avoids false alarms or missed alarms caused by outdated baselines.
[0066] According to the above embodiments of the present invention, after performing multi-dimensional permission compliance judgment on the response result based on preset judgment rules and sensitive data feature library to identify unauthorized access behavior, the unauthorized access automated testing method further includes: statistically analyzing the number of roles, number of interfaces, and data dimensions covered by the test to obtain a first statistical result; statistically analyzing the number, type distribution, and risk level of the identified unauthorized access vulnerabilities to obtain a second statistical result; and generating a full-link operation log based on the first and second statistical results, wherein the full-link operation log records the test trigger time, executor, test parameters, and judgment result.
[0067] In this embodiment, by statistically analyzing test coverage and vulnerability details and generating a full-link operation log containing key elements, the traceability and audit compliance of the testing process can be achieved. This ensures that the bank system can provide a complete and tamper-proof chain of evidence when facing security audits, reconstructing the entire process from test triggering to judgment results, and meeting the regulatory requirements of the financial industry for the retention of security test records and the tracing of responsibility.
[0068] Specifically, the compliance reporting module automatically generates test reports and retains full-chain audit logs. The CI / CD (Continuous Integration and Continuous Delivery / Deployment) integration module connects to the deployment pipeline, implements deployment access control, blocks deployment of high-risk vulnerabilities, and pushes test results and vulnerability information to relevant personnel after testing. The compliance report generation module automatically generates test reports that meet the bank's compliance requirements, including test system information, test coverage, statistics on privilege escalation vulnerabilities, vulnerability details, risk level, reproduction steps, and complete request / return messages. At the same time, it retains test audit logs throughout the process to meet audit traceability requirements. The CI / CD access control integration module connects to the bank's internal CI / CD version release platform, configures automatic triggering of test rules before deployment, and automatically blocks the version deployment process when high-risk privilege escalation vulnerabilities are detected, pushing vulnerability information to the development / testing teams.
[0069] It should be noted that the aforementioned CI / CD deployment access control is a security verification step in the bank's version release pipeline. It automatically performs security tests before the system goes live, preventing the release of versions containing high-risk vulnerabilities. The aforementioned financially sensitive fields refer to user privacy and business data that require strict control in the bank's system. The aforementioned permission baseline is a standard permission range generated based on the system's allowed permission configuration, serving as the core basis for determining unauthorized access. The corresponding test system implementing the above methods includes six major modules: information collection, matrix construction, request generation, judgment, reporting, and CI / CD integration.
[0070] As described above, in this embodiment of the invention, a method for constructing a three-dimensional permission matrix of bank-specific roles, interfaces, and business data is proposed and implemented for banking systems, serving as the permission baseline for unauthorized access testing. Based on the three-dimensional matrix, a method for automatically generating three types of unauthorized access test requests—vertical, horizontal, and data—adapted to banking business scenarios is provided. A three-layer intelligent unauthorized access judgment mechanism (status code judgment + business baseline judgment + sensitive field judgment) is implemented for banking systems to achieve accurate identification and risk classification of unauthorized access. A fully automated solution for unauthorized access testing in banking systems is provided, integrating CI / CD deployment access control and compliance audit retention. This solution can automatically collect bank interface, role, and sensitive data information, construct a three-dimensional permission matrix, generate three types of unauthorized access requests, perform bank-specific rule judgment, generate compliance reports, and integrate deployment access control. This achieves full-process automation, full-scenario coverage, and accurate judgment of unauthorized access testing in banking systems, ensuring the security of sensitive financial data and meeting financial compliance requirements.
[0071] The technical solutions provided by the above embodiments of the present invention solve the following technical problems: 1) The banking system has a complex role hierarchy, a large number of interfaces, and scattered sensitive data. It is impossible for humans to exhaustively enumerate all combinations of "role-interface-data". Only sampling tests can be performed on core interfaces and high-privilege roles. Therefore, a large number of peripheral interfaces, niche roles, and cross-level / cross-customer unauthorized scenarios cannot be covered, directly leading to undetected unauthorized vulnerabilities and causing major risks such as data leakage and fund security in the production environment; 2) Existing solutions lack standardized unauthorized judgment rules and rely on testers to manually judge whether the interface return results are unauthorized. The interface return logic is complex and there are many sensitive data types. Humans are prone to misjudgment and omissions, especially for scenarios of implicit unauthorized access and leakage of sensitive fields. It is impossible to accurately identify them, and the test results are not objective and cannot meet the compliance requirements for security testing; 3) 1) From test case writing, request construction, test execution to report compilation, the entire process relies on manual labor, resulting in long testing cycles, high labor costs, and frequent system version iterations. Manual testing cannot keep up with the rapid iteration pace and cannot be integrated into CI / CD deployment pipelines, leading to a lack of pre-deployment access control and allowing high-risk vulnerabilities to easily enter the production environment; 2) Manual testing can only retain scattered test records and cannot completely retain full-chain audit evidence such as test request messages, return results, and operation logs. When a security incident occurs, it is impossible to complete vulnerability tracing, which does not meet the compliance audit requirements of security testing in the financial industry; 3) Existing general testing solutions are not designed for specific business scenarios such as multi-level roles and sensitive financial data in banks. They cannot cover bank unauthorized scenarios such as tellers approving across customers and levels, and customers approving across accounts. The testing is not targeted enough and cannot guarantee the security of bank system permissions.
[0072] Meanwhile, it has the following beneficial effects: 1) By automatically constructing a bank-specific three-dimensional permission matrix, it achieves exhaustive traversal of the entire combination of "role-interface-data," replacing manual sampling testing. Therefore, no matter how complex the roles or how large the interfaces in the bank system are, it can fully cover all unauthorized scenarios, eliminating missed tests at the source and ensuring the security of bank system permissions; 2) It establishes three-layer standardized unauthorized access judgment rules and has a built-in bank sensitive field library, replacing subjective human judgment. Therefore, the test results are objective and accurate, and risk levels can be automatically classified. At the same time, complete audit logs are retained throughout the process, fully meeting the compliance requirements of security testing in the financial industry; 3) From information collection, test case generation, test execution to report output, the entire process requires no manual intervention, and the testing efficiency is improved by more than 90% compared to manual solutions. Simultaneously, it can be seamlessly integrated into CI / CD pipelines to achieve automatic access control before deployment, adapt to high-frequency version iterations of banks, and ensure deployment security; 4) Designed for business scenarios such as multi-level roles, sensitive financial data, and counter / mobile banking, it covers core banking unauthorized access scenarios such as tellers approving across customers and levels, and customers approving across accounts. The testing is far more targeted than general testing solutions and is more adapted to the security requirements of banking systems; 5) It only connects to the bank's existing systems through interfaces, without the need to modify the code of core business systems. It can be quickly deployed to various systems such as the bank's core systems, counters, and mobile banking. The deployment cost is low, the implementation difficulty is small, and it is extremely practical.
[0073] In other words, the technical solution provided by the embodiments of the present invention comprehensively considers various factors and addresses the pain points of permission testing in financial systems such as core banking systems, counter systems, and mobile banking. By connecting to the bank's interface platform and permission management system, it automatically collects three types of information: multi-level roles, business interfaces, and sensitive financial data of the bank, and constructs a bank-specific three-dimensional permission matrix of roles, interfaces, and business data as the permission baseline. Based on the matrix, it automatically generates three types of illegal test requests adapted to banking business scenarios: vertical unauthorized access, horizontal unauthorized access, and data unauthorized access. Through a built-in bank sensitive field library and exclusive judgment rules, it intelligently identifies unauthorized access vulnerabilities and classifies risk levels. It retains audit logs throughout the process, automatically generates compliance test reports, and connects to the bank's CI / CD deployment pipeline to automatically block the deployment of high-risk vulnerabilities without manual intervention. This solves the problems of low coverage, serious missed tests, inaccurate judgments, and inability to adapt to bank compliance and deployment control in traditional manual unauthorized access testing.
[0074] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0075] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0076] According to embodiments of the present invention, an automated testing apparatus for unauthorized access based on a permission matrix is also provided for implementing the above-described automated testing method for unauthorized access based on a permission matrix. Figure 3 This is a schematic diagram of an automated testing device for unauthorized access based on a permission matrix according to an embodiment of the present invention, such as... Figure 3 As shown, the device includes: an acquisition module 301, a generation module 303, a sending module 305, and a judgment module 307. The following is a description of this automated unauthorized access testing device based on a permission matrix.
[0077] The acquisition module 301 is used to acquire the interface metadata, role permission information and sensitive data identifiers of the target business system, and generate a three-dimensional permission matrix based on the interface metadata, role permission information and sensitive data identifiers. The three-dimensional permission matrix is used to define the business interfaces that each role in the target business system is allowed to access and the range of data resources that are allowed to operate under legal conditions.
[0078] The generation module 303 is used to automatically generate unauthorized access test requests for the target business system based on the three-dimensional permission matrix.
[0079] The sending module 305 is used to send an unauthorized access test request to the target business system and obtain the response result of the target business system to the unauthorized access test request.
[0080] The judgment module 307 is used to perform multi-dimensional permission compliance judgment on the response result according to the preset judgment rules and the sensitive data feature library, so as to identify unauthorized access behavior.
[0081] It should be noted that the above-mentioned acquisition module 301, generation module 303, sending module 305 and determination module 307 correspond to steps S202 to S208 in the above embodiments. The four modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments.
[0082] As can be seen from the above, in the solution described in the above embodiments of the present invention, firstly, the acquisition module can be used to acquire the interface metadata, role permission information, and sensitive data identifiers of the target business system, and a three-dimensional permission matrix can be generated based on the interface metadata, role permission information, and sensitive data identifiers. The three-dimensional permission matrix is used to define the business interfaces that each role in the target business system is allowed to access and the range of data resources that are allowed to operate under legal conditions. Secondly, the generation module can be used to automatically generate an unauthorized access test request for the target business system based on the three-dimensional permission matrix. Then, the sending module can be used to send the unauthorized access test request to the target business system and obtain the response result of the target business system to the unauthorized access test request. Finally, the judgment module can be used to perform multi-dimensional permission compliance judgment on the response results based on preset judgment rules and sensitive data feature library to identify unauthorized access behavior. By using a three-dimensional permission matrix automatically constructed based on interface metadata, role permission information and sensitive data identifiers, unauthorized access test requests covering vertical, horizontal and data dimensions can be generated in reverse. Combined with the multi-dimensional compliance judgment rules of status codes, business baselines and sensitive fields, the response results are automatically and accurately identified. This achieves the goal of automating the entire process of unauthorized access testing in the banking system, covering all scenarios and accurately classifying risks. As a result, it achieves the technical effects of improving testing efficiency and accuracy, ensuring data security and meeting financial compliance audit requirements.
[0083] The technical solutions provided by the embodiments of the present invention solve the technical problems of low coverage, serious omissions, and inaccurate judgments in related technologies, which make them unsuitable for bank compliance and online management.
[0084] In one optional embodiment, the acquisition module includes: an extraction unit, configured to extract the interface's Uniform Resource Locator (URL), request method, parameter structure, permission identifier, and transaction code as interface metadata by parsing the interface document, wherein the interface document is a standardized structured data file describing the application programming interface (API) functions, parameters, return values, and permission control, and the interface is an API provided by the target business system; a first acquisition unit, configured to obtain the target business system's role hierarchy information, role relationships, permission authorization scope, and identity authentication token generation rules by connecting to the identity authentication and permission management subsystem, in order to obtain role permission information; and a second acquisition unit, configured to obtain customer unique identifiers, business account identifiers, transaction flow identifiers, and business document identifiers as sensitive data identifiers through a data dictionary or sample data collection.
[0085] In one optional embodiment, the generation module includes at least one of the following: a first generation unit, configured to generate, based on a three-dimensional permission matrix, a vertical privilege escalation test request using the identity credentials of a low-privilege role to request access to a business interface or functional module exclusive to a high-privilege role; a second generation unit, configured to generate, based on a three-dimensional permission matrix, a horizontal privilege escalation test request using the identity credentials of a first user to request access to business data or resources exclusively managed by a second user, wherein the first user and the second user belong to the same permission level; and a third generation unit, configured to generate, based on a three-dimensional permission matrix, a data privilege escalation test request using the identity credentials of a role lacking specific data access permissions to request access to business data records containing sensitive information.
[0086] In an optional embodiment, the determination module includes: a first determination unit for first-level status code determination: checking the HTTP status code or business status code returned by the target business system; if the check result indicates that a success status code was returned for a request without permission, then unauthorized access behavior is determined; a second determination unit for second-level baseline comparison determination: parsing the business data content in the response result and comparing the business data content with the three-dimensional permission matrix; if the comparison result indicates that the returned data resource is not within the allowed access range of the current requesting role, then it is determined to be unauthorized access; and a third determination unit for third-level sensitive field determination: scanning the data structure in the response result; if the scanning result indicates that a field in the sensitive data feature library is hit, then it is determined to be high-risk unauthorized access, wherein high-risk unauthorized access is an access operation with an access risk higher than a risk threshold.
[0087] In one optional embodiment, the unauthorized access automated testing device further includes: a first determining unit, configured to determine that the authorized access behavior is high-risk if the third-level sensitive field determination is hit; a second determining unit, configured to determine that the authorized access behavior is medium-risk if the second-level baseline comparison determination is hit but the third-level sensitive field determination is not hit, or only the first-level status code determination is hit and no critical business operation is detected; and a third determining unit, configured to determine that the authorized access behavior is low-risk if only the first-level status code determination is hit and non-sensitive information or test probe response is detected.
[0088] In one optional embodiment, the acquisition module includes: a fourth generation unit, used to generate a mapping table between role identifiers in role permission information, interface unified resource locators in interface metadata, and data resource identifiers; and a triggering unit, used to trigger an incremental acquisition mechanism to update the three-dimensional permission matrix when a change in the permission configuration of the target business system is detected.
[0089] In an optional embodiment, the unauthorized access automated testing device further includes: a first statistics module, used to perform multi-dimensional permission compliance judgment on the response result according to preset judgment rules and a sensitive data feature library to identify unauthorized access behavior, and then statistically analyze the number of roles, number of interfaces, and data dimensions covered by the test to obtain a first statistical result; a second statistics module, used to statistically analyze the number, type distribution, and risk level of the identified unauthorized access vulnerabilities to obtain a second statistical result; and a generation module, used to generate a full-link operation log based on the first and second statistical results, wherein the full-link operation log records the test trigger time, executor, test parameters, and judgment result.
[0090] According to another aspect of the present invention, a computer program product is also provided, including computer instructions, which, when executed by a processor, perform any of the above-described unauthorized access automation testing methods based on a permission matrix.
[0091] According to another aspect of the present invention, a processor is also provided, which is used to run a program, wherein the program executes any of the above-described automated testing methods for unauthorized access based on a permission matrix.
[0092] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein the program executes the unauthorized access automation testing method based on a permission matrix according to any one of the above.
[0093] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any communication device in a group of communication devices.
[0094] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: obtaining interface metadata, role permission information, and sensitive data identifiers of the target business system, and generating a three-dimensional permission matrix based on the interface metadata, role permission information, and sensitive data identifiers, wherein the three-dimensional permission matrix is used to define the business interfaces and data resource ranges that each role in the target business system is allowed to access and operate on under legal conditions; automatically generating an unauthorized access test request for the target business system based on the three-dimensional permission matrix; sending the unauthorized access test request to the target business system and obtaining the response result of the target business system to the unauthorized access test request; and performing multi-dimensional permission compliance judgment on the response result according to preset judgment rules and a sensitive data feature library to identify unauthorized access behavior.
[0095] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: parsing the interface document to extract the interface's Uniform Resource Locator (URL), request method, parameter structure, permission identifier, and transaction code as interface metadata, wherein the interface document is a standardized structured data file describing the application programming interface (API) functions, parameters, return values, and permission control; the interface is an API provided by the target business system; interfacing with the identity authentication and permission management subsystem to obtain the target business system's role hierarchy information, role relationships, permission authorization scope, and identity authentication token generation rules to obtain role permission information; and obtaining customer unique identifiers, business account identifiers, transaction flow identifiers, and business document identifiers as sensitive data identifiers through a data dictionary or sample data collection.
[0096] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: generating a vertical privilege escalation test request based on a three-dimensional permission matrix, using the identity credentials of a low-privilege role to request access to a business interface or functional module exclusive to a high-privilege role; generating a horizontal privilege escalation test request based on a three-dimensional permission matrix, using the identity credentials of a first user to request access to business data or resources exclusively managed by a second user, wherein the first user and the second user belong to the same permission level; and generating a data privilege escalation test request based on a three-dimensional permission matrix, using the identity credentials of a role lacking specific data access permissions to request access to business data records containing sensitive information.
[0097] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: First-level status code determination: Check the HTTP status code or business status code returned by the target business system. If the check result indicates that a success status code was returned for a request without permission, it is determined that there is unauthorized access behavior; Second-level baseline comparison determination: Parse the business data content in the response result and compare the business data content with the three-dimensional permission matrix. If the comparison result indicates that the returned data resource is not within the allowed access range of the current requesting role, it is determined to be unauthorized access; Third-level sensitive field determination: Scan the data structure in the response result. If the scan result indicates that a field in the sensitive data feature library is hit, it is determined to be high-risk unauthorized access, wherein high-risk unauthorized access is an access operation with an access risk higher than the risk threshold.
[0098] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: if the third-level sensitive field determination is hit, the authorized access behavior is determined to be high-risk; if the second-level baseline comparison determination is hit but the third-level sensitive field determination is not hit, or only the first-level status code determination is hit and no critical business operation is detected, the authorized access behavior is determined to be medium-risk; if only the first-level status code determination is hit and non-sensitive information or test probe response is detected, the authorized access behavior is determined to be low-risk.
[0099] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: generating a mapping table between role identifiers in role permission information, interface unified resource locators in interface metadata, and data resource identifiers; and triggering an incremental acquisition mechanism to update the three-dimensional permission matrix when a change in the permission configuration of the target business system is detected.
[0100] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: statistically analyzing the number of roles, interfaces, and data dimensions covered by the test to obtain a first statistical result; statistically analyzing the number, type distribution, and risk level of identified unauthorized access vulnerabilities to obtain a second statistical result; and generating a full-link operation log based on the first and second statistical results, wherein the full-link operation log records the test trigger time, executor, test parameters, and judgment results.
[0101] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0102] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0103] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.
[0104] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0105] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0106] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0107] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0108] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. An automated testing method for unauthorized access based on a permission matrix, characterized in that, include: Obtain the interface metadata, role permission information, and sensitive data identifiers of the target business system, and generate a three-dimensional permission matrix based on the interface metadata, role permission information, and sensitive data identifiers. The three-dimensional permission matrix is used to define the business interfaces that each role in the target business system is allowed to access and the range of data resources that are allowed to operate under legal conditions. Based on the three-dimensional permission matrix, an unauthorized access test request for the target business system is automatically generated; Send the unauthorized access test request to the target business system and obtain the response result of the target business system to the unauthorized access test request; Based on preset judgment rules and a sensitive data feature library, a multi-dimensional permission compliance judgment is performed on the response result to identify unauthorized access behavior.
2. The automated testing method for unauthorized access based on a permission matrix according to claim 1, characterized in that, Obtain the target business system's interface metadata, role and permission information, and sensitive data identifiers, including: By parsing the interface document, the Uniform Resource Locator, request method, parameter structure, permission identifier, and transaction code of the interface are extracted as interface metadata. The interface document is a standardized structured data file that describes the functions, parameters, return values, and permission control of the application programming interface. The interface is the application programming interface provided by the target business system. By connecting to the identity authentication and permission management subsystem, the role hierarchy information, role associations, permission authorization scope, and identity authentication token generation rules of the target business system are obtained to obtain the role permission information; The customer's unique identifier, business account identifier, transaction record identifier, and business document identifier are obtained through data dictionary or sample data collection and used as the sensitive data identifier.
3. The automated testing method for unauthorized access based on a permission matrix according to claim 1, characterized in that, Based on the three-dimensional permission matrix, an unauthorized access test request for the target business system is automatically generated, including at least one of the following: Based on the three-dimensional permission matrix, a vertical privilege escalation test request is generated to request access to the business interface or functional module exclusive to the high-permission role using the identity credentials of the low-permission role. Based on the three-dimensional permission matrix, a horizontal privilege escalation test request is generated using the identity credentials of the first user to request access to business data or resources exclusively managed by the second user, wherein the first user and the second user belong to the same permission level; Based on the three-dimensional permission matrix, a data overreach test request is generated, which uses role credentials lacking specific data access permissions to request access to business data records containing sensitive information.
4. The automated testing method for unauthorized access based on a permission matrix according to any one of claims 1 to 3, characterized in that, Perform a multi-dimensional permission compliance determination on the response result, including: First-level status code determination: Check the HTTP status code or business status code returned by the target business system. If the check result indicates that a success status code was returned for a request without permission, it is determined that there is unauthorized access behavior. The second-layer baseline comparison and judgment: parse the business data content in the response result and compare the business data content with the three-dimensional permission matrix. If the comparison result indicates that the returned data resource is not within the allowed access range of the current requesting role, it is judged as unauthorized access. The third layer of sensitive field determination: scan the data structure in the response result. If the scan result indicates that a field in the sensitive data feature library has been hit, it is determined to be a high-risk unauthorized access. The high-risk unauthorized access is an access operation with an access risk higher than the risk threshold.
5. The automated testing method for unauthorized access based on a permission matrix according to claim 4, characterized in that, The automated testing method for unauthorized access also includes: If the third layer of sensitive fields is hit, the authorized access behavior is determined to be high-risk. If the second-layer baseline comparison judgment is hit but the third-layer sensitive field judgment is not hit, or only the first-layer status code judgment is hit but no key business operation is detected, then the authorized access behavior is determined to be of medium risk. If only the first-level status code is hit and non-sensitive information or a test probe response is detected, then the authorized access behavior is determined to be low-risk.
6. The automated testing method for unauthorized access based on a permission matrix according to claim 1, characterized in that, A three-dimensional permission matrix is generated based on the interface metadata, the role permission information, and the sensitive data identifier, including: Generate a mapping table between the role identifier in the role permission information, the interface uniform resource locator in the interface metadata, and the data resource identifier; When a change in the permission configuration of the target business system is detected, an incremental collection mechanism is triggered to update the three-dimensional permission matrix.
7. The automated testing method for unauthorized access based on a permission matrix according to any one of claims 1 to 3, characterized in that, After performing multi-dimensional permission compliance judgment on the response result according to preset judgment rules and a sensitive data feature library to identify unauthorized access behavior, the unauthorized access automated testing method further includes: The first statistical result is obtained by statistically analyzing the number of roles, interfaces, and data dimensions covered by the test. The second statistical result is obtained by statistically analyzing the number, type distribution, and risk level of the identified unauthorized access vulnerabilities. A full-link operation log is generated based on the first statistical result and the second statistical result. The full-link operation log records the test trigger time, executor, test parameters and judgment results.
8. An automated testing device for unauthorized access based on a permission matrix, characterized in that, include: The acquisition module is used to acquire interface metadata, role permission information and sensitive data identifiers of the target business system, and generate a three-dimensional permission matrix based on the interface metadata, role permission information and sensitive data identifiers. The three-dimensional permission matrix is used to define the business interfaces and data resource ranges that each role in the target business system is allowed to access and operate under legal conditions. The generation module is used to automatically generate unauthorized access test requests for the target business system based on the three-dimensional permission matrix. The sending module is used to send the unauthorized access test request to the target business system and obtain the response result of the target business system to the unauthorized access test request; The determination module is used to perform multi-dimensional permission compliance determination on the response result according to preset determination rules and a sensitive data feature library, so as to identify unauthorized access behavior.
9. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, the automated testing method for unauthorized access based on a permission matrix as described in any one of claims 1 to 7 is performed.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program executes the automated testing method for unauthorized access based on a permission matrix as described in any one of claims 1 to 7.
