Mobile terminal software testing method and system
By generating dynamic tags for mobile terminal software and performing irreversible binding, combined with correlation comparison, identification and secondary detection of active mutation content, the problem that traditional testing methods are difficult to identify active mutations is solved, and the accuracy and efficiency of security assessment are improved. The security of the software is ensured.
Patent Information
- Application Number
- CN202410903443.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-07-08
AI Technical Summary
Traditional mobile terminal software testing methods are difficult to identify and analyze active mutation content, leading to problems of missed detection and wrong detection.
By generating dynamic tags for unsafe content and performing irreversible binding, combined with correlation comparison, we can identify and secondary detect actively mutated content, generate warnings and alarm notifications, and improve the accuracy and efficiency of security assessments.
Accurately identify active mutation content, reduce false positives and false negatives, improve detection capabilities of potential security risks, and improve software security and reliability.
Smart Images

Figure CN118445801B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of software testing, and in particular relates to a mobile terminal software testing method and system. Background Art
[0002] The field of mobile terminal software testing technology is a research and application field that focuses on software testing for mobile terminals (such as smartphones, tablets, wearable devices, etc.). With the popularity of mobile terminals and the diversification of application scenarios, software testing technology has become particularly important in ensuring the quality and security of mobile terminal software. The field of mobile terminal software testing technology continues to develop and innovate, and new testing methods, tools and strategies are constantly proposed to meet the diverse needs and challenges of mobile terminal applications. It plays an important role in ensuring the quality, security and user experience of mobile applications.
[0003] Traditional mobile terminal software testing methods mainly rely on static analysis technology to analyze the source code or binary code of the application. However, static analysis technology is often difficult to adapt to the situation of active mutation. Active mutation usually uses technologies such as code obfuscation, reflection call, dynamic loading, etc. to change the code structure and behavior, thereby bypassing traditional static analysis detection methods. This limitation leads to the problem of missed detection of active mutation content. Active mutation is often dynamic, that is, the mutation operation may be triggered or changed according to different conditions at runtime. This makes it difficult for traditional static analysis technology to accurately identify and analyze the mutation content. Traditional testing methods can often only analyze based on the static characteristics of the application, and cannot track the dynamic behavior of the mutation operation, so it is easy to cause missed detection and false detection of active mutation content. Summary of the invention
[0004] The purpose of the present invention is to provide a mobile terminal software testing method, aiming to solve the technical problems existing in the prior art identified in the background technology.
[0005] The present invention is implemented as follows: a mobile terminal software testing method, the method comprising:
[0006] Analyze the software and detect unsafe content in the software;
[0007] When a certain content in the software is identified as unsafe, a dynamic tag is generated for the unsafe content, and the dynamic tag is irreversibly bound to the unsafe content;
[0008] Perform security cleaning on the software, and after cleaning, identify whether there is content containing dynamic tags in the software, and compare the difference between the current content and the content when the dynamic tags were added to determine whether the content has actively mutated. When it is detected that the software content has actively mutated, obtain the original unsafe content bound to the dynamic tag;
[0009] According to the correlation between the actively mutated content with dynamic tags and the original unsafe content bound to the corresponding dynamic tags, the actively mutated content with dynamic tags is subjected to secondary detection, and a warning is issued for the actively mutated content after the detection.
[0010] As a further solution of the present invention, generating a dynamic tag for the unsafe content and irreversibly binding the dynamic tag to the unsafe content specifically includes:
[0011] After identifying the unsafe content, randomly generating a dynamic tag, wherein the dynamic tag is a unique identifier;
[0012] The generated dynamic tag is irreversibly bound to the corresponding unsafe content.
[0013] As a further solution of the present invention, the step of identifying whether there is content containing dynamic tags in the software after cleaning, and comparing the difference between the current content and the content when the dynamic tags are added, to determine whether the content has actively mutated, specifically includes:
[0014] Clean up the identified unsafe content and retest the software for security after cleaning;
[0015] After security cleaning, identify whether there is content containing dynamic tags in the software, and determine whether the dynamic tags are previously generated dynamic tags for identifying unsafe content;
[0016] The content currently identified by the dynamic tag is compared with the unsafe content identified when the dynamic tag was added to determine whether the currently identified content is a product of active mutation.
[0017] As a further solution of the present invention, the second detection of the actively mutated content with dynamic tags and the warning of the actively mutated content after the detection specifically include:
[0018] When it is determined that the currently identified content is a product of active mutation, the correlation between the currently identified content and the unsafe content identified when the dynamic tag was added is determined, and the mutation rule is determined;
[0019] Provide warning marks for the currently marked content;
[0020] Perform secondary security check on the content currently identified by the dynamic tag;
[0021] When the secondary security detection finds that the currently identified content is abnormal, an alarm notification is generated and the currently identified content is locked.
[0022] As a further embodiment of the present invention, the method further comprises:
[0023] Combine warning labels and alarm notifications to generate software test results;
[0024] Generate visual charts based on software testing results.
[0025] Another object of the present invention is to provide a mobile terminal software testing system, the system comprising:
[0026] Content analysis module, used to analyze the software and detect unsafe content in the software;
[0027] A label generation module is used to generate a dynamic label for the unsafe content when a certain content in the software is identified as unsafe, and to irreversibly bind the dynamic label to the unsafe content;
[0028] The mutation detection module is used to perform security cleaning on the software and identify whether there is content containing dynamic tags in the software after cleaning, and compare the difference between the current content and the content when the dynamic tags are added to determine whether the content has actively mutated. When it is detected that the software content has actively mutated, the original unsafe content bound to the dynamic tag is obtained;
[0029] The abnormal warning module is used to perform secondary detection on the actively mutated content with dynamic tags based on the correlation between the actively mutated content with dynamic tags and the original unsafe content bound to the corresponding dynamic tags, and to warn the actively mutated content after detection.
[0030] As a further solution of the present invention, the label generation module includes:
[0031] A dynamic tag generation unit, configured to randomly generate a dynamic tag after identifying unsafe content, wherein the dynamic tag is a unique identifier;
[0032] The tag binding unit is used to irreversibly bind the generated dynamic tag to the corresponding unsafe content.
[0033] As a further solution of the present invention, the variation detection module includes:
[0034] A security cleaning unit is used to clean up the identified unsafe content and perform security testing on the software again after cleaning;
[0035] The tag identification unit is used to identify whether there is content containing dynamic tags in the software after security cleaning, and determine whether the dynamic tag is a dynamic tag previously generated for identifying unsafe content;
[0036] The content comparison unit is used to compare the content currently identified by the dynamic tag with the unsafe content identified when the dynamic tag was added, and determine whether the currently identified content is a product of active variation.
[0037] As a further solution of the present invention, the abnormal warning module includes:
[0038] A correlation comparison unit, for determining the correlation between the currently identified content and the unsafe content identified when the dynamic tag is added, and determining the mutation rule when determining that the currently identified content is a product of active mutation;
[0039] The primary marking unit is used to mark the currently marked content with a warning;
[0040] A secondary detection unit, used for performing a secondary security detection on the content currently identified by the dynamic tag;
[0041] The warning notification unit is used to generate a warning notification and lock the currently identified content when the secondary security detection finds that the currently identified content is abnormal.
[0042] As a further solution of the present invention, the system further includes a result generation module, specifically including:
[0043] A report generation unit, used to generate software test results by combining warning labels and alarm notifications;
[0044] The visualization display unit is used to generate visualization charts based on software test results.
[0045] The beneficial effects of the present invention are:
[0046] The system generates dynamic tags for unsafe content and irreversibly binds them to the content. At the same time, through the correlation comparison unit, the system can determine the correlation between the current identified content and the original unsafe content. In this way, the system can more accurately identify the content after active mutation and improve the detection ability of potential security risks.
[0047] Dynamic tag binding can accurately identify the content after active mutation. Applications, web pages or other content on mobile terminals may be modified, tampered or maliciously injected, which may cause security risks. Through tag binding, the system can distinguish these mutated contents from the original unsafe content, providing accurate identification for subsequent security assessments. This method can improve the accuracy and efficiency of the system's security assessment of actively mutated content. By accurately identifying the content after active mutation and analyzing the mutation rules, the system can more accurately determine whether the content is abnormal. This can reduce false positives and false negatives and improve the accuracy and efficiency of security assessments. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A flowchart of a mobile terminal software testing method provided by an embodiment of the present invention;
[0049] Figure 2 A flowchart of generating a dynamic tag for the unsafe content and irreversibly binding the dynamic tag to the unsafe content provided by an embodiment of the present invention;
[0050] Figure 3 A flowchart for identifying whether there is content containing dynamic tags in the software after cleaning provided by an embodiment of the present invention, and comparing the difference between the current content and the content when the dynamic tags are added, to determine whether the content has actively changed;
[0051] Figure 4 A flowchart of performing secondary detection on the actively mutated content with dynamic tags and issuing a warning on the actively mutated content after detection provided by an embodiment of the present invention;
[0052] Figure 5 A structural block diagram of a mobile terminal software testing system provided by an embodiment of the present invention;
[0053] Figure 6 A structural block diagram of a label generation module provided in an embodiment of the present invention;
[0054] Figure 7 A structural block diagram of a variation detection module provided in an embodiment of the present invention;
[0055] Figure 8 A structural block diagram of an abnormal warning module provided in an embodiment of the present invention;
[0056] Fig. 9 This is a structural block diagram of a result generation module provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0058] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.
[0059] Figure 1 A flowchart of a mobile terminal software testing method provided by an embodiment of the present invention, such as Figure 1 As shown, a mobile terminal software testing method, the method comprising:
[0060] S100, analyzing the software to detect unsafe content in the software;
[0061] In this step, malicious code can be detected, the code in the software can be analyzed, and whether there is malicious code, such as viruses, Trojans, etc. It performs static analysis and feature matching on the binary files, script codes, etc. of the software to identify potential malicious code and provide corresponding warnings or reports.
[0062] Secondly, scan the security vulnerabilities in the software. It analyzes the source code, configuration files, network communications, etc. of the software to detect potential vulnerabilities, such as insufficient input validation, buffer overflow, etc. This function can help developers find and fix vulnerabilities and improve the security of the software.
[0063] Thirdly, it analyzes the data storage area and network transmission data in the software to identify whether there is unsafe content, such as sensitive information leakage, privacy issues, etc. It can detect potential unsafe content through keyword matching, machine learning and other technologies, and issue warnings or reports in a timely manner.
[0064] Finally, the software behavior is analyzed to detect whether there are abnormal or malicious behaviors. It can monitor the software's system calls, network requests, file operations, etc., and identify potential dangerous behaviors, such as unauthorized access, malicious data collection, etc. This function can provide warnings and reports to help users take timely measures to deal with security issues.
[0065] S200, when a certain content in the software is identified as unsafe, generating a dynamic tag for the unsafe content, and irreversibly binding the dynamic tag to the unsafe content;
[0066] In this step, its main function is to generate dynamic tags for the identified unsafe content and irreversibly bind it to the unsafe content. After identifying the unsafe content, a unique dynamic tag is randomly generated as the content identifier. This dynamic tag is randomly generated to ensure its uniqueness and unpredictability. Each unsafe content will be assigned a dynamic tag for subsequent tag binding and tracking.
[0067] The generated dynamic tags are then irreversibly bound to the corresponding unsafe content. This means that once the tags and content are bound, the relationship between them is permanent and cannot be modified or unbound. The establishment of this binding relationship ensures that in the subsequent mutation detection and anomaly warning process, the actively mutated content can be accurately tracked and identified and compared with the original unsafe content.
[0068] This step can generate a unique dynamic tag for the identified unsafe content and irreversibly bind it to the content, thereby identifying and tracking the unsafe content in the software. This provides a basis for subsequent mutation detection and abnormal warnings, helping to improve the security and reliability of the software.
[0069] S300, performing security cleaning on the software, and identifying whether there is content containing dynamic tags in the software after cleaning, and comparing the difference between the current content and the content when the dynamic tags are added, to determine whether the content has actively mutated, and when it is detected that the software content has actively mutated, obtaining the original unsafe content bound to the dynamic tags;
[0070] In this step, when performing security cleaning, the identified unsafe content will be cleaned up to ensure the security of the software. After cleaning, the module will perform security testing on the software to ensure the effectiveness and integrity of the cleaning operation.
[0071] Next, the module identifies whether there is content with dynamic tags in the software. These dynamic tags are generated for previously identified unsafe content and are used to identify and track this content. By identifying the tags, content identified with dynamic tags can be accurately tracked.
[0072] Finally, the currently identified content will be compared with the unsafe content identified when the tag was generated previously. By comparing the difference between the two, it can be determined whether the currently identified content is the product of active mutation. Once active mutation is found in the content, the original unsafe content bound to the dynamic tag will be obtained.
[0073] The system can perform security cleaning operations, identify content with dynamic tags, and determine whether the content has actively mutated. This helps to detect potential security issues in a timely manner and improve the security and reliability of the software.
[0074] S400, performing secondary detection on the actively mutated content with the dynamic tag according to the correlation between the actively mutated content with the dynamic tag and the original unsafe content bound to the corresponding dynamic tag, and issuing a warning on the actively mutated content after the detection.
[0075] In this step, when comparing the relevance, it is determined whether the currently identified content is the product of active mutation, and the relevance between the currently identified content and the unsafe content identified when the dynamic tag was added is compared. Through this comparison, the mutation rule can be determined, that is, the mutation method and law between the currently identified content and the original unsafe content.
[0076] At the same time, the current marked content will be marked with a warning to highlight the actively mutated content and remind users of possible safety issues. This mark can be in the form of color, icon or text to help users more intuitively identify and understand the safety of the marked content.
[0077] Then, the content currently marked by the dynamic tag will be subjected to a secondary security check. Through detailed analysis and testing, security issues such as abnormal behavior, vulnerabilities or malicious code can be identified, and further confirmation can be made whether the content after active mutation has potential security risks.
[0078] Finally, an alarm notification will be generated and the currently identified content will be locked. Once the secondary security detection finds that the currently identified content is abnormal, a corresponding notification will be generated to inform the user of the security risk and lock the content to prevent further potential harm.
[0079] Figure 2 A flowchart of generating a dynamic tag for the unsafe content and irreversibly binding the dynamic tag to the unsafe content is provided in an embodiment of the present invention, such as Figure 2 As shown, the step of generating a dynamic tag for the unsafe content and irreversibly binding the dynamic tag to the unsafe content specifically includes:
[0080] S210, after identifying the unsafe content, randomly generate a dynamic tag, wherein the dynamic tag is a unique identifier;
[0081] S220: irreversibly bind the generated dynamic tag to the corresponding unsafe content.
[0082] One of the purposes of dynamic tag binding and correlation comparison is to accurately identify the content after active mutation. Applications, web pages or other content on mobile terminals may be modified, tampered or maliciously injected, which may cause security risks. Through tag binding, the system can distinguish these mutated contents from the original unsafe content, providing accurate identification for subsequent security assessments.
[0083] Figure 3 A flowchart of an embodiment of the present invention for identifying whether there is content containing dynamic tags in the software after cleaning, and comparing the difference between the current content and the content when the dynamic tags are added to determine whether the content has actively changed, such as Figure 3 As shown, the process of identifying whether there is content containing dynamic tags in the software after cleaning, and comparing the difference between the current content and the content when the dynamic tags are added, to determine whether the content has actively mutated, specifically includes:
[0084] S310, cleaning up the identified unsafe content, and performing security testing on the software again after cleaning up;
[0085] S320, after security cleaning, identifying whether there is content containing a dynamic tag in the software, and determining whether the dynamic tag is a previously generated dynamic tag for identifying unsafe content;
[0086] In step S320, after security cleaning, the step of identifying whether there is content containing dynamic tags in the software and determining whether the dynamic tags are previously generated dynamic tags for identifying unsafe content includes the following sub-steps:
[0087] Step S3201, performing a comprehensive scan on the software content after security cleaning to find potential dynamic tags, extracting all strings suspected of being dynamic tags, and storing them in a temporary list;
[0088] Among them, comprehensive scanning can use regular expressions, pattern matching or other text search techniques.
[0089] Step S3202: for each suspected dynamic tag in the temporary list, verify the validity of the suspected dynamic tag by using a hash function, and mark the suspected tag as a valid dynamic tag when it passes the verification;
[0090] As a supplementary note, the condition for verification to pass is that the hash value matches.
[0091] Step S3203, establishing a historical dynamic tag database, comparing the valid dynamic tag with the records in the historical dynamic tag database, and confirming whether it is a previously generated dynamic tag for identifying unsafe content.
[0092] In the present invention, in order to update the security status of the dynamic tag, after confirming whether it is a previously generated dynamic tag for identifying unsafe content, the method further includes the following steps:
[0093] Step S321, performing context analysis on the code or data linked to the valid dynamic tag to confirm whether the valid dynamic tag is still associated with the unsafe content;
[0094] Among them, the step of confirming whether the valid dynamic tag is still associated with the unsafe content is mainly completed by checking whether the code or data linked to the valid dynamic tag has known malicious patterns, function calls or data structures.
[0095] Step S322, for the valid dynamic tags confirmed to still be associated with the unsafe content, updating their status to indicate that there are still potential risks in the software;
[0096] Step S323: For valid dynamic tags that are no longer associated with unsafe content, remove them from the history database or mark them as processed.
[0097] S330, comparing the content currently identified by the dynamic tag with the unsafe content identified when the dynamic tag was added, to determine whether the currently identified content is a product of active mutation.
[0098] In step S330, in the step of determining whether the currently identified content is a product of active variation, the corresponding function expression is as follows:
[0099] ;
[0100] in, Indicates the difference between the current content and the original content. Indicates the content currently identified by the dynamic tag. Indicates the unsafe content identified when the dynamic tag is added. Indicates the content currently identified by the dynamic tag. elements, Indicates the content currently identified by the dynamic tag. elements; Represents a hash function that converts input content into a fixed-length numeric value for numerical comparison; Display content Length, Represents the operation of taking the maximum value.
[0101] For this function formula, first calculate the hash value difference between the current content and each component of the original content, and perform a weighted sum according to its importance (weight). Then, divide the result of this weighted sum by a normalization factor, which is the weighted sum of the sum of the hash values of the current content and the original content. Finally, multiply it by a factor that takes into account the change in content length. This factor is the ratio of the absolute value of the difference between the current content and the original content length to the larger length of them plus 1.
[0102] It can be understood that in this way, the difference between the current content and the original content can be calculated. In this embodiment, the difference value is a value between 0 and a positive number. The larger the difference value is, the greater the difference between the current content and the original content is, which may indicate an active variation of the content.
[0103] Figure 4 A flowchart of performing secondary detection on the content after active mutation of the dynamic tag provided by the embodiment of the present invention, and issuing a warning on the content after active mutation after detection, such as Figure 4 As shown, the secondary detection of the content after active mutation with dynamic tags and the warning of the content after active mutation after detection specifically include:
[0104] S410, when it is determined that the currently identified content is a product of active mutation, the correlation between the currently identified content and the unsafe content identified when the dynamic tag was added is determined, and the mutation rule is determined;
[0105] In step S410, in the step of determining the association between the currently identified content and the unsafe content identified when the dynamic tag is added, the following function expression corresponds to:
[0106] ;
[0107] in, represents a relevance score that quantifies the relevance of the current content to the original unsafe content. Indicates the current content. Represents the original unsafe content, Indicates the content The weight of each element; Indicates The similarity function between the current content and the original unsafe content, the return value is a number between 0 and 1; Indicates the total number of elements in the content. Represents the mutation factor used to adjust the association score to reflect the impact of the mutation rule.
[0108] Through this function expression, the correlation between the current identified content and the original unsafe content can be quantified, and the mutation rules can be inferred accordingly. This helps the system to more accurately evaluate the security of actively mutated content and make corresponding warnings and processing.
[0109] The purpose of correlation comparison is to analyze the mutation rules and mutation methods, that is, the differences and change patterns between the content after active mutation and the original unsafe content. By analyzing the mutation rules, the system can better understand the causes and methods of mutation, thus providing a basis for subsequent secondary detection and warnings. This helps the system more accurately evaluate the safety of actively mutated content.
[0110] This method can improve the accuracy and efficiency of the system's security assessment of actively mutated content. By accurately identifying the content after active mutation and analyzing the mutation rules, the system can more accurately determine whether the content is abnormal. This can reduce false positives and false negatives and improve the accuracy and efficiency of security assessments.
[0111] S420, marking the currently marked content with a warning;
[0112] S430, performing a secondary security check on the content currently identified by the dynamic tag;
[0113] S440: When the secondary security detection finds that the currently identified content is abnormal, an alarm notification is generated and the currently identified content is locked.
[0114] In an embodiment of the present invention, the method further includes:
[0115] S500, generating software test results in combination with warning labels and warning notifications;
[0116] S600, generates visual charts based on software test results.
[0117] Figure 5 The structural block diagram of the mobile terminal software testing system provided by the embodiment of the present invention is as follows: Figure 5 As shown, a mobile terminal software testing system, characterized in that the system includes:
[0118] The content analysis module 100 is used to analyze the software and detect the unsafe content in the software;
[0119] In this module, you can detect malicious code, analyze the code in the software, and detect whether there is malicious code, such as viruses, Trojans, etc. It performs static analysis and feature matching on the binary files and script codes of the software to identify potential malicious code and provide corresponding warnings or reports.
[0120] Secondly, it scans for security vulnerabilities in the software. It analyzes the source code, configuration files, network communications, etc. of the software to detect potential vulnerabilities, such as insufficient input validation, buffer overflow, etc. This function can help developers discover and fix vulnerabilities and improve the security of the software.
[0121] Third, it analyzes the data storage area and network transmission data in the software to identify whether there is unsafe content, such as sensitive information leakage, privacy issues, etc. It can detect potential unsafe content through keyword matching, machine learning and other technologies, and issue warnings or reports in a timely manner.
[0122] Finally, the software behavior is analyzed to detect whether there are abnormal or malicious behaviors. It can monitor the software's system calls, network requests, file operations, etc., and identify potential dangerous behaviors, such as unauthorized access and malicious data collection. This function can provide warnings and reports to help users take timely measures to deal with security issues.
[0123] The label generation module 200 is used to generate a dynamic label for the unsafe content when a certain content in the software is identified as unsafe, and to irreversibly bind the dynamic label to the unsafe content;
[0124] In this module, its main function is to generate dynamic tags for the identified unsafe content and irreversibly bind it to the unsafe content. After identifying the unsafe content, a unique dynamic tag is randomly generated as the content identifier. This dynamic tag is randomly generated to ensure its uniqueness and unpredictability. Each unsafe content will be assigned a dynamic tag for subsequent tag binding and tracking.
[0125] The generated dynamic tags are then irreversibly bound to the corresponding unsafe content. This means that once the tags and content are bound, the relationship between them is permanent and cannot be modified or unbound. The establishment of this binding relationship ensures that in the subsequent mutation detection and anomaly warning process, the actively mutated content can be accurately tracked and identified and compared with the original unsafe content.
[0126] By expanding the label generation module, it is possible to generate unique dynamic labels for identified unsafe content and irreversibly bind them to the content, thereby identifying and tracking unsafe content in the software. This provides a basis for subsequent mutation detection and abnormal warnings, helping to improve the security and reliability of the software.
[0127] The mutation detection module 300 is used to perform security cleaning on the software, and after cleaning, identify whether there is content containing dynamic tags in the software, and compare the difference between the current content and the content when the dynamic tags are added to determine whether the content has actively mutated. When it is detected that the software content has actively mutated, the original unsafe content bound to the dynamic tags is obtained;
[0128] In this module, when performing security cleaning, the identified unsafe content will be cleaned up to ensure the security of the software. After cleaning, the module will perform security testing on the software to ensure the effectiveness and integrity of the cleaning operation.
[0129] Next, the module identifies whether there is content with dynamic tags in the software. These dynamic tags are generated for previously identified unsafe content and are used to identify and track this content. By identifying the tags, content identified with dynamic tags can be accurately tracked.
[0130] Finally, the currently identified content will be compared with the unsafe content identified when the tag was generated previously. By comparing the difference between the two, it can be determined whether the currently identified content is the product of active mutation. Once active mutation is found in the content, the original unsafe content bound to the dynamic tag will be obtained.
[0131] The system can perform security cleaning operations, identify content with dynamic tags, and determine whether the content has actively mutated. This helps to detect potential security issues in a timely manner and improve the security and reliability of the software.
[0132] The abnormal warning module 400 is used to perform secondary detection on the actively mutated content with dynamic tags according to the correlation between the actively mutated content with dynamic tags and the original unsafe content bound to the corresponding dynamic tags, and to warn the actively mutated content after detection.
[0133] In this module, when comparing the relevance, it is determined whether the currently identified content is the product of active mutation, and the relevance between the currently identified content and the unsafe content identified when the dynamic tag was added is compared. Through this comparison, the mutation rule can be determined, that is, the mutation method and law between the currently identified content and the original unsafe content.
[0134] At the same time, the current marked content will be marked with a warning to highlight the actively mutated content and remind users of possible safety issues. This mark can be in the form of color, icon or text to help users more intuitively identify and understand the safety of the marked content.
[0135] Then, the content currently marked by the dynamic tag will be subjected to a secondary security check. Through detailed analysis and testing, security issues such as abnormal behavior, vulnerabilities or malicious code can be identified, and further confirmation can be made whether the content after active mutation has potential security risks.
[0136] Finally, an alarm notification will be generated and the currently identified content will be locked. Once the secondary security detection finds that the currently identified content is abnormal, a corresponding notification will be generated to inform the user of the security risk and lock the content to prevent further potential harm.
[0137] Figure 6 The structure block diagram of the label generation module provided by the embodiment of the present invention is as follows: Figure 6As shown, the label generation module includes:
[0138] A dynamic tag generation unit 210, configured to randomly generate a dynamic tag after identifying unsafe content, wherein the dynamic tag is a unique identifier;
[0139] The tag binding unit 220 is used to irreversibly bind the generated dynamic tag to the corresponding unsafe content.
[0140] Figure 7 A structural block diagram of a variation detection module provided in an embodiment of the present invention, such as Figure 7 As shown, the variation detection module includes:
[0141] A security cleaning unit 310 is used to clean up the identified unsafe content and perform security testing on the software again after cleaning;
[0142] The tag identification unit 320 is used to identify whether there is content containing dynamic tags in the software after security cleaning, and determine whether the dynamic tag is a previously generated dynamic tag used to identify unsafe content;
[0143] The content comparison unit 330 is used to compare the content currently identified by the dynamic tag with the unsafe content identified when the dynamic tag was added, and determine whether the currently identified content is a product of active mutation.
[0144] Figure 8 The structural block diagram of the abnormal warning module provided by the embodiment of the present invention is as follows: Figure 8 As shown, the abnormal warning module includes:
[0145] The correlation comparison unit 410 is used to determine the correlation between the currently identified content and the unsafe content identified when the dynamic tag is added, and determine the mutation rule when it is determined that the currently identified content is a product of active mutation;
[0146] A primary marking unit 420, used to mark the currently marked content with a warning;
[0147] A secondary detection unit 430, configured to perform a secondary security detection on the content currently identified by the dynamic tag;
[0148] The warning notification unit 440 is used to generate a warning notification and lock the currently identified content when the secondary security detection determines that the currently identified content is abnormal.
[0149] Fig. 9 The structural block diagram of the result generation module provided by the embodiment of the present invention is as follows: Fig. 9 As shown, the system further includes a result generation module 500, which specifically includes:
[0150] A report generation unit 510, for generating software test results in combination with warning labels and warning notifications;
[0151] The visualization display unit 520 is used to generate a visualization chart according to the software test results.
[0152] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have strict order restrictions, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0153] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0154] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described 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.
[0155] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
[0156] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A mobile terminal software testing method, characterized in that: The method comprises the following steps: Analyze the software and detect unsafe content in the software; When a certain content in the software is identified as unsafe, a dynamic tag is generated for the unsafe content, and the dynamic tag is irreversibly bound to the unsafe content; Perform security cleaning on the software, and after cleaning, identify whether there is content containing dynamic tags in the software, and compare the difference between the current content and the content when the dynamic tags were added to determine whether the content has actively mutated. When it is detected that the software content has actively mutated, obtain the original unsafe content bound to the dynamic tag; According to the correlation between the actively mutated content with dynamic tags and the original unsafe content bound to the corresponding dynamic tags, the actively mutated content with dynamic tags is subjected to secondary detection, and a warning is issued for the actively mutated content after the detection; The step of generating a dynamic tag for the unsafe content and irreversibly binding the dynamic tag to the unsafe content specifically includes: After identifying the unsafe content, randomly generating a dynamic tag, wherein the dynamic tag is a unique identifier; The generated dynamic tag is irreversibly bound to the corresponding unsafe content.
2. A mobile terminal software testing method according to claim 1, characterized in that: The step of identifying whether there is content containing dynamic tags in the software after cleaning, and comparing the difference between the current content and the content when the dynamic tags are added, to determine whether the content has actively mutated, specifically includes: Clean up the identified unsafe content and retest the software for security after cleaning; After security cleaning, identify whether there is content containing dynamic tags in the software, and determine whether the dynamic tags are previously generated dynamic tags for identifying unsafe content; The content currently identified by the dynamic tag is compared with the unsafe content identified when the dynamic tag was added to determine whether the currently identified content is a product of active mutation.
3. A mobile terminal software testing method according to claim 2, characterized in that: After security cleaning, the step of identifying whether there is content containing dynamic tags in the software and determining whether the dynamic tags are previously generated dynamic tags for identifying unsafe content includes the following sub-steps: Perform a comprehensive scan of the software content after security cleaning to find potential dynamic tags, extract all strings suspected of dynamic tags, and store them in a temporary list; For each suspected dynamic tag in the temporary list, verify the validity of the suspected dynamic tag through a hash function, and mark the suspected tag as a valid dynamic tag when it passes the verification; A historical dynamic tag database is established, and the valid dynamic tag is compared with the records in the historical dynamic tag database to confirm whether it is a previously generated dynamic tag for identifying unsafe content.
4. A mobile terminal software testing method according to claim 3, characterized in that: After the step of confirming whether it is a previously generated dynamic tag for identifying unsafe content, the method further includes the following steps: Performing contextual analysis on the code or data to which the valid dynamic tag is linked to confirm whether the valid dynamic tag is still associated with unsafe content; For valid dynamic labels that are confirmed to still be associated with unsafe content, updating their status to indicate that a potential risk still exists in the software; Valid dynamic tags that are no longer associated with unsafe content are removed from the history database or marked as processed.
5. A mobile terminal software testing method according to claim 4, characterized in that: The step of comparing the content currently identified by the dynamic tag with the unsafe content identified when the dynamic tag was added to determine whether the currently identified content is a product of active mutation corresponds to the following function expression: ; in, Indicates the difference between the current content and the original content. Indicates the content currently identified by the dynamic tag. Indicates the unsafe content identified when the dynamic tag is added. Indicates the content currently identified by the dynamic tag. elements, Indicates the content currently identified by the dynamic tag. elements; Represents a hash function that converts input content into a fixed-length numeric value for numerical comparison; Display content Length, Represents the operation of taking the maximum value.
6. A mobile terminal software testing method according to claim 5, characterized in that: The second detection of the actively mutated content with dynamic tags and the warning of the actively mutated content after the detection specifically include: When it is determined that the currently identified content is a product of active mutation, the correlation between the currently identified content and the unsafe content identified when the dynamic tag was added is determined, and the mutation rule is determined; Provide warning marks for the currently marked content; Perform secondary security check on the content currently identified by the dynamic tag; When the secondary security detection finds that the currently identified content is abnormal, an alarm notification is generated and the currently identified content is locked.
7. A mobile terminal software testing method according to claim 6, characterized in that: In the step of determining the correlation between the currently identified content and the unsafe content identified when the dynamic tag was added, the following function expression corresponds to: ; in, represents a relevance score that quantifies the relevance of the current content to the original unsafe content. Indicates the current content. Represents the original unsafe content, Indicates the content The weight of each element; Indicates The similarity function between the current content and the original unsafe content, the return value is a number between 0 and 1; Indicates the total number of elements in the content. Represents the mutation factor used to adjust the association score to reflect the impact of the mutation rule.
8. A mobile terminal software testing method according to claim 7, characterized in that: The method further comprises: Combine warning labels and alarm notifications to generate software test results; Generate visual charts based on software testing results.
9. A mobile terminal software testing system, characterized in that: The mobile terminal software testing method according to any one of claims 1 to 8 is applied, wherein the system comprises: Content analysis module, used to analyze the software and detect unsafe content in the software; A label generation module is used to generate a dynamic label for the unsafe content when a certain content in the software is identified as unsafe, and to irreversibly bind the dynamic label to the unsafe content; The mutation detection module is used to perform security cleaning on the software and identify whether there is content containing dynamic tags in the software after cleaning, and compare the difference between the current content and the content when the dynamic tags are added to determine whether the content has actively mutated. When it is detected that the software content has actively mutated, the original unsafe content bound to the dynamic tag is obtained; The abnormal warning module is used to perform secondary detection on the actively mutated content with dynamic tags according to the correlation between the actively mutated content with dynamic tags and the original unsafe content bound to the corresponding dynamic tags, and to warn the actively mutated content after detection; The label generation module includes: A dynamic tag generation unit, configured to randomly generate a dynamic tag after identifying unsafe content, wherein the dynamic tag is a unique identifier; The tag binding unit is used to irreversibly bind the generated dynamic tag to the corresponding unsafe content.
10. The mobile terminal software testing system according to claim 9, characterized in that: The variation detection module comprises: A security cleaning unit is used to clean up the identified unsafe content and perform security testing on the software again after cleaning; The tag identification unit is used to identify whether there is content containing dynamic tags in the software after security cleaning, and determine whether the dynamic tag is a dynamic tag previously generated for identifying unsafe content; A content comparison unit, used to compare the content currently identified by the dynamic tag with the unsafe content identified when the dynamic tag was added, to determine whether the currently identified content is a product of active variation; The abnormal warning module includes: A correlation comparison unit, for determining the correlation between the currently identified content and the unsafe content identified when the dynamic tag is added, and determining the mutation rule when determining that the currently identified content is a product of active mutation; The primary marking unit is used to mark the currently marked content with a warning; A secondary detection unit, used for performing a secondary security detection on the content currently identified by the dynamic tag; A warning notification unit, used to generate a warning notification and lock the currently identified content when the secondary security detection finds that the currently identified content is abnormal; The system also includes a result generation module, specifically including: A report generation unit, used to generate software test results by combining warning labels and alarm notifications; The visualization display unit is used to generate visualization charts based on software test results.
Citation Information
Patent Citations
Business object persistence processing method based on dynamic labels
CN101751260A
Control method and system for dynamic configuration of HTML template
CN105824787A
