Method for automatically generating SFR test case in CC security certification based on AI technology

Through natural language processing of AI technology, automated SFR test case generation solves the complexity and time-consuming problems of existing SFR testing methods, improves testing efficiency and accuracy, simplifies the compliance process, and improves the security of IT products. .

CN118690371APending Publication Date: 2024-09-24ZHEJIANG HATONG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410738104.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

The existing SFR testing methods have a significant impact on the workload, time and cost of the Common Criteria certification process, and manual analysis and test case design are complex and prone to omissions.

Method used

The natural language processing (NLP) method based on AI technology is used to automatically parse and interpret security function requirements, and the SFR test cases in CC security certification are automatically generated through the test case generation algorithm, reducing manual test case creation and the possibility of errors.

Benefits of technology

Significantly reduces the time and effort required for SFR analysis, improves test accuracy and coverage, simplifies the testing process, and improves the security and quality of IT products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690371A
    Figure CN118690371A
Patent Text Reader

Abstract

The invention provides a method for automatically generating an SFR test case in CC security certification based on an AI technology, relates to the technical field of information and network security, analyzes an SFR text through an NLP technology, extracts key information and converts the key information into structured data, and combines the test case in a knowledge base and optimal security practice to generate an SFR test case in CC security certification. And generating a test case comprehensively covering the security requirements by using a specific algorithm. According to the method, the efficiency and the accuracy of test case generation are remarkably improved, the manual writing cost is reduced, and improvement of the quality and the efficiency of CC security certification work is facilitated. According to the method, the problems that a traditional test method is complex and time-consuming are solved, the SFR test process is optimized, and the safety and quality of IT products are improved. In addition, the method is wide in protection range, is suitable for change or replacement in different technical fields, and has practical application value and important significance. Through application of the method, powerful support can be provided for enterprise security certification work, development of the information security field is promoted, and innovation is brought to system security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information and network security technology, and in particular to a method for automatically generating SFR test cases in CC security certification based on AI technology. Background Art

[0002] When it comes to evaluating the security of information technology products (such as software systems, hardware, or firmware), organizations often turn to frameworks like Common Criteria Security Evaluation (CC). Common Criteria provides a standardized way to evaluate the security of information technology products, ensuring that they meet specific requirements and can be trusted for use in sensitive environments.

[0003] A key aspect of Common Criteria assessments is testing of security functional requirements (SFRs). These SFRs outline the security features that a product should have. However, it is important to recognize that current SFR testing methods have a significant impact on the workload, time, and cost of the entire CC certification process. In fact, SFR testing alone accounts for nearly a third of these resources, highlighting its complexity and time-consuming nature. The process involves manual analysis and test case design, further increasing the complexity of SFR testing.

[0004] Traditionally, developers must parse the components of a security functional requirement (SFR), understand not only the requirements themselves, but also the required operations and dependencies between different requirements, and then test them. This testing process requires careful scrutiny to ensure that the product meets the specified security requirements. Once the components are parsed, developers design test cases that cover these requirements, taking into account the dependencies between the SFR components.

[0005] However, this manual approach poses challenges for both developers and assessors. Developers often rely on white-box testing or code reviews to ensure compliance, which can be tedious and prone to oversights. On the other hand, assessors face the daunting task of analyzing every line of code to provide evidence of SFR compliance. The process becomes more complicated when developers discover additional bugs or vulnerabilities during testing, requiring them to fix these issues before generating the necessary test reports. Summary of the invention

[0006] In order to solve the technical problems in the prior art, the present invention provides a method for automatically generating SFR test cases in CC security certification based on AI technology.

[0007] The technical solution provided by the embodiment of the present invention is as follows:

[0008] First aspect:

[0009] An embodiment of the present invention provides a method for automatically generating SFR test cases in CC security certification based on AI technology, including:

[0010] S1. SFR parsing and preprocessing: Parsing SFR in text format based on NLP technology, extracting key factors, and preprocessing the data for further analysis;

[0011] S2, SFR structure data, converting SFR data into a structured format suitable for subsequent analysis;

[0012] S3, knowledge base, stores existing test cases and security best practices related to SFR testing;

[0013] S4, a test case generation algorithm, receives the parsed SFR data and the knowledge base as input and generates test cases;

[0014] S5, integrate context, merge the context information in the original SFR into the test cases to ensure that they reflect the expected scenarios;

[0015] S6, Test Case Collection, is the final output, i.e., a comprehensive set of test cases designed to address the pending SFR requirements.

[0016] To simplify and optimize the SFR testing process, we leverage Natural Language Processing (NLP) technology, combining the power of artificial intelligence and linguistics to automatically analyze and interpret security functional requirements.

[0017] SFRs can be processed more efficiently by applying NLP techniques such as text parsing, semantic analysis, and pattern recognition. NLP is able to extract key requirements, understand the dependencies between them, and generate test cases that fully cover the identified security requirements.

[0018] By automating SFR analysis and test case generation, NLP reduces the burden on developers and assessors. It speeds up the compliance process, improves the accuracy of testing, and enables a more systematic approach to security assessments.

[0019] Integrating AI in SFR testing not only improves the efficiency of compliance efforts, but also brings additional benefits. It enables developers to identify subtle vulnerabilities or errors in the code, improving the security and quality of overall IT products. In addition, assessors can rely on automated analysis to verify compliance, saving time and effort during the assessment process.

[0020] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0021] (1) Traditionally, SFR analysis is a manual and time-consuming process that requires human experts to read and interpret SFR documents. The natural language processing (NLP)-based method in the present invention automates this process by extracting key requirements from SFR documents using machine learning algorithms. This automation can significantly reduce the time and effort required for SFR analysis.

[0022] (2) In the present invention, the NLP method described is used to identify key requirements by using entity recognition, relationship extraction and other NLP techniques. These key requirements are crucial to developing comprehensive test cases to ensure that the system correctly implements the security specifications. Based on the allowed operations covered in the SFR document, it is estimated that there are an average of 326 operations. Based on these allowed operations, the NLP thresholds that serve as the basis for extracting key requirements are defined;

[0023] (3) In the present invention, instead of relying on general test case templates, AI is used to generate test cases for the target system and its SFRs. The extracted key requirements are used to automatically generate test cases. The generated test cases are designed to verify the implementation of security requirements and include inputs, preconditions, outputs, and expected results. This automation simplifies the testing process by eliminating manual test case creation and reducing the possibility of errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 A flowchart of a method for automatically generating SFR test cases in CC security certification based on AI technology is provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The technical solution of the present invention is described below in conjunction with the accompanying drawings.

[0027] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.

[0028] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0029] Reference Manual Attached Figure 1 , shows a flow chart of a method for automatically generating SFR test cases in CC security certification based on AI technology provided by an embodiment of the present invention.

[0030] The embodiment of the present invention provides a method for automatically generating SFR test cases in CC security certification based on AI technology, including the following steps:

[0031] S1. SFR parsing and preprocessing: Parsing SFR in text format based on NLP technology, extracting key factors, and preprocessing the data for further analysis;

[0032] S2, SFR structure data, converting SFR data into a structured format suitable for subsequent analysis;

[0033] S3, knowledge base, stores existing test cases and security best practices related to SFR testing;

[0034] S4, a test case generation algorithm, receives the parsed SFR data and the knowledge base as input and generates test cases;

[0035] S5, integrate context, merge the context information in the original SFR into the test cases to ensure that they reflect the expected scenarios;

[0036] S6, Test Case Collection, is the final output, i.e., a comprehensive set of test cases designed to address the pending SFR requirements.

[0037] The key factors in S1 include:

[0038] The key factors include subject, operation, assignment, selection, object and context.

[0039] The knowledge base in S3 specifically includes:

[0040] The knowledge base also stores key assumptions and constraints related to the product's security functions (TSFs) and the corresponding environment.

[0041] The test case algorithm in S4 specifically includes:

[0042] S41, identify key components and decompose the parsed SFR data into core components;

[0043] S42, generating a test case template (tree), based on the identified SFR components, creating multiple hierarchical structures representing test cases with placeholders for specific values, and the root node represents the main security requirement being tested;

[0044] S43, test case draft, represents a specific test case scenario, including placeholders for access control mechanisms or threat options, and fills the placeholders in the test case template with relevant values ​​according to the SFR options;

[0045] S44, test case filling, obtains the test case after filling the template with special values ​​in the knowledge base.

[0046] The test case scenarios in S43 specifically include:

[0047] There are different nodes and templates for test case scenarios.

[0048] An example of an SFR test case for automatically generating CC security certification based on AI technology provided by an embodiment of the present invention is as follows.

[0049] SFR Case 1:

[0050] FDP_ITT.1.1 - When transferring user data between physically separate parts of the TOE, the TSF shall implement [assignment: access control SFP and / or information flow control SFP] to prevent [selection: disclosure, tampering, loss of availability] of user data.

[0051] Architecture design based on case analysis:

[0052] SFR parsing and preprocessing: This module parses the text format SFR and extracts key elements. These elements include:

[0053] Test object (T): To whom or what the SFR applies (e.g., TSF)

[0054] Action (O): The action required by the SFR (e.g., "shall be enforced")

[0055] Assignment (A): The specific security functions to be implemented (e.g., "Access Control SFPs")

[0056] Choice (Se): Possible options or threats (e.g., “disclosure”) – can include multiple options

[0057] Object (Ob): What the SFR protects (e.g., “user data”)

[0058] Context (C): Additional details of the scenario (e.g., “physically separated parts of the TOE”)

[0059] Test case generation algorithm:

[0060] Parsed SFR data (T, O, A, Se(options), Ob, C) and knowledge base of existing test cases and security best practices.

[0061] Identify key components: Decompose the parsed SFR data into its core components.

[0062] Generate basic test case template: Create a basic template with placeholders for SFR components using standardized identifiers ({S}, {O}, {A}, {Se}, {Ob}, {C}). Example template: {T}{O}{A} when passing {Ob} across {C} to prevent {Se} of {Ob}.

[0063] Fill in template values: Use the knowledge base to fill in specific values ​​for placeholders based on SFR options.

[0064] For SFRs with selection options (Se): Generate a separate test case for each possible selection value.

[0065] Context Integration: The context information (C) in SFR is integrated into each generated test case.

[0066] The final generated use case:

[0067] Test case 1.1 (access control / information flow control):

[0068] {T}(TSF) should {O}(enforce) {A}(role-based access control) to prevent {Se}(leakage) of {Ob}(user data) {C}(when transmitted between physically separated parts of the TOE).

[0069] Test case 1.2 (access control / information flow control):

[0070] {T}(TSF) should {O}(enforce) {A}(data marking) to prevent {Se}(tampering) of {Ob}(user data) {C}(when transmitted between physically separate parts of the TOE).

[0071] Test case 1.3 (Access control / information flow control): (Lost using similar structure)

[0072] {T}(TSF) should {O}(enforce) {A}(data marking) to prevent {Se}(loss) of {Ob}(user data) {C}(when transmitted between physically separate parts of the TOE).

[0073] SFR Case 2: FIA_AFL.1.2-When the defined number of unsuccessful authentication attempts is reached or exceeded, the TSF shall take [assignment: list of actions].

[0074] SFR analysis and preprocessing:

[0075] T=TSF

[0076] O = Take

[0077] A = Action List (not specified in SFR)

[0078] Se=reach, exceed

[0079] Ob = (implicit - successful authentication)

[0080] C=(Not applicable)

[0081] Required Knowledge Base Entry: Define a list of possible actions (e.g., lock account, send notification).

[0082] Generated test cases:

[0083] Test case 2.1 (number of attempts reached):

[0084] When Se (reaches) the defined number of unsuccessful authentication attempts, {T}(TSF) should {O} (take) {A} (send notification) (replace with the action in the knowledge base).

[0085] Test case 2.2 (number of attempts exceeded):

[0086] When Se (exceeds) the defined number of unsuccessful authentication attempts, {T}(TSF) should {O} (take) {A} (send notification) (replace with the action in the knowledge base).

[0087] Overall, the manual nature of SFR testing creates a complex and time-consuming process for developers and evaluators. The proposed solution leveraging AI techniques in SFR testing has the potential to alleviate these challenges by automating test case generation, improving test coverage, and reducing reliance on manual code analysis.

[0088] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0089] (1) Traditionally, SFR analysis is a manual and time-consuming process that requires human experts to read and interpret SFR documents. The natural language processing (NLP)-based method in the present invention automates this process by extracting key requirements from SFR documents using machine learning algorithms. This automation can significantly reduce the time and effort required for SFR analysis.

[0090] (2) In the present invention, the NLP method described is used to identify key requirements by using entity recognition, relationship extraction and other NLP techniques. These key requirements are crucial to developing comprehensive test cases to ensure that the system correctly implements the security specifications. Based on the allowed operations covered in the SFR document, it is estimated that there are an average of 326 operations. Based on these allowed operations, the NLP thresholds that serve as the basis for extracting key requirements are defined;

[0091] (3) In the present invention, instead of relying on general test case templates, AI is used to generate test cases for the target system and its SFRs. The extracted key requirements are used to automatically generate test cases. The generated test cases are designed to verify the implementation of security requirements and include inputs, preconditions, outputs, and expected results. This automation simplifies the testing process by eliminating manual test case creation and reducing the possibility of errors.

[0092] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0093] There are a few points to note:

[0094] (1) The drawings of the embodiments of the present invention only relate to the structures related to the embodiments of the present invention, and other structures may refer to the general design.

[0095] (2) For the sake of clarity, in the drawings used to describe the embodiments of the present invention, the thickness of the layers or regions is exaggerated or reduced, that is, these drawings are not drawn according to the actual scale. It is understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element or there may be intermediate elements.

[0096] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.

[0097] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for automatically generating SFR test cases in CC security certification based on AI technology, It is characterized in that include: S1. SFR parsing and preprocessing: Parsing SFR in text format based on NLP technology, extracting key factors, and preprocessing the data for further analysis; S2, SFR structure data, converting SFR data into a structured format suitable for subsequent analysis; S3, knowledge base, stores existing test cases and security best practices related to SFR testing; S4, a test case generation algorithm, receives the parsed SFR data and the knowledge base as input and generates test cases; S5, integrate context, merge the context information in the original SFR into the test cases to ensure that they reflect the expected scenarios; S6, Test Case Collection, is the final output, i.e., a comprehensive set of test cases designed to address the pending SFR requirements.

2. According to claim 1, a method for automatically generating SFR test cases in CC security certification based on AI technology, It is characterized in that The key factors in S1 specifically include: The key factors include subject, operation, assignment, selection, object and context.

3. According to claim 1, a method for automatically generating SFR test cases in CC security certification based on AI technology, It is characterized in that The knowledge base in S3 specifically includes: The knowledge base also stores key assumptions and constraints related to the product's security functions (TSFs) and the corresponding environment.

4. According to claim 1, a method for automatically generating SFR test cases in CC security certification based on AI technology, It is characterized in that The test case algorithm in S4 specifically includes: S41, identify key components and decompose the parsed SFR data into core components; S42, generating a test case template (tree), based on the identified SFR components, creating multiple hierarchical structures representing test cases with placeholders for specific values, and the root node represents the main security requirement being tested; S43, test case draft, represents a specific test case scenario, including placeholders for access control mechanisms or threat options, and fills the placeholders in the test case template with relevant values ​​according to the SFR options; S44, test case filling, obtains the test case after filling the template with special values ​​in the knowledge base.

5. According to claim 4, a method for automatically generating SFR test cases in CC security certification based on AI technology, It is characterized in that The test case scenarios in S43 specifically include: The test case scenario has different nodes and templates.