Method and related device for testing dynamic credible verification function of credible DCS (Distributed Control System) controller
By establishing a network connection between the test terminal and the trusted DCS controller and automatically testing its dynamic trusted verification function, the problems of slow testing speed and low efficiency in the existing technology are solved, and the stability testing and efficiency improvement of the dynamic trusted verification function are achieved.
Patent Information
- Application Number
- CN202510145500.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-02-10
AI Technical Summary
The dynamic trusted verification function test process of existing trusted DCS controllers is slow, has low testing efficiency and cannot test the stability of the function.
It provides a dynamic trusted verification function test method for trusted DCS controllers. By establishing a network connection between the test terminal and the controller to be tested, dynamic trusted verification policy marking is performed on predefined process files, processes and applications, and simulating the tampering situation and querying the trusted state, realizing automated testing.
It improves testing efficiency, reduces errors and delays caused by manual intervention, and can effectively test the stability of dynamic trusted verification functions, significantly reducing testing costs.
Smart Images

Figure CN119718960A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of function testing, and in particular relates to a dynamic trustworthy verification function testing method for a trusted DCS controller and a related device. Background Art
[0002] Distributed Control System (DCS) is a new type of control device that uses computer technology to centrally monitor, operate, manage and decentralized control industrial production processes; trusted DCS is based on traditional DCS and improves system security by introducing a trusted computing system.
[0003] At present, the controllers of domestic trusted DCS systems are all integrated with dynamic trusted verification functions, that is, all system programs need to undergo dynamic trusted verification regularly to prevent tampering by malicious software; specifically, by turning on the dynamic trusted verification function module, dynamic periodic measurement is performed on the process marked with the dynamic trusted verification periodic measurement strategy to monitor whether the periodic measurement process is trustworthy; when the periodic measurement process is tampered with, the process status will become untrustworthy, thereby triggering a system alarm; secondly, by turning on the dynamic trusted verification function module, dynamic periodic measurement is performed on the application program and object file marked with the dynamic trusted verification subject and object strategy to monitor whether the dynamic monitoring subject and object are trustworthy; when the subject and object process is tampered with, the process status will become untrustworthy, thereby triggering a system alarm.
[0004] In actual projects, the dynamic trusted verification function of the trusted DCS controller needs to be tested after deployment. Since the controllers in domestic trusted DCS systems generally use the SylixOS operating system, and the configuration procedures of each controller are different in different application scenarios, it is impossible to perform automatic testing locally through mainstream scripts such as shell. Manual testing is slow, inefficient, and cannot test the stability of the function. Summary of the invention
[0005] In view of the technical problems existing in the prior art, the present invention provides a dynamic trusted verification function testing method and related devices for a trusted DCS controller to solve the technical problems of the existing dynamic trusted verification function testing process of a trusted DCS controller, which is slow, has low testing efficiency and cannot test the stability of the function.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is: The present invention provides a method for testing a dynamic trusted verification function of a trusted DCS controller, which is applied to a test terminal, wherein a network connection is established between the test terminal and the controller to be tested; The trusted DCS controller dynamic trusted verification function testing method comprises: Perform file dynamic trust verification periodic measurement strategy marking on a predetermined process file in the controller to be tested, and obtain a process file of the marking verification strategy; wherein the controller to be tested responds to the process file of the marking verification strategy and generates an execution process; Tampering with the execution process and querying the trust status of the execution process; Performing process dynamic trust verification periodic measurement strategy marking on a predetermined process in the controller to be tested, and obtaining a process of the marking verification strategy; Tampering with the process of the tag verification policy and querying the trust status of the process of the tag verification policy; Performing dynamic trusted verification of subject-object policy marking on predetermined application programs and object files in the controller to be tested, and obtaining a dynamic subject-object policy file; wherein the controller to be tested responds to the dynamic subject-object policy file and generates a preset policy point execution process; Tampering with the execution process of the preset strategy point, and querying the trustworthy status of the execution process of the preset strategy point; The query results of the trusted state of the execution process, the trusted state of the process of the mark verification strategy and the trusted state of the execution process of the preset strategy point are output to obtain the dynamic trusted verification function test result of the controller to be tested.
[0007] Furthermore, the test terminal pre-stores a preset Python test program and a test program configuration file; wherein the preset Python test program is used to implement the steps of the dynamic trusted verification function test method of the trusted DCS controller, and the preset Python test program is connected to the controller to be tested via Telnet.
[0008] Furthermore, the test program configuration file includes identity information of the controller to be tested, a test file directory on the controller to be tested, and a threshold value for the number of network connections to the controller to be tested; wherein the test file directory on the controller to be tested is a directory of predetermined process files, predetermined processes, and predetermined applications and object files in the controller to be tested.
[0009] Furthermore, the process of marking the predetermined process file in the controller to be tested with the file dynamic trust verification periodic measurement strategy and obtaining the process file of the marking verification strategy is specifically as follows: The policy configuration instruction provided by the dynamic trusted verification function in the controller to be tested is called, and a predetermined file dynamic trusted verification periodic measurement policy is configured in a predetermined process file to obtain a process file of the marking verification policy.
[0010] Furthermore, the process of marking the process dynamic trust verification periodic measurement strategy for the predetermined process in the controller to be tested, and obtaining the process of the marking verification strategy, is specifically as follows: The policy configuration instruction provided by the dynamic trusted verification function in the controller to be tested is called, and the predetermined process dynamic trusted verification periodic measurement policy is configured in the predetermined process to obtain the process of the marking verification policy.
[0011] Furthermore, the process of performing dynamic trusted verification of the subject-object policy mark on the predetermined application and object file in the controller to be tested and obtaining the dynamic subject-object policy file is specifically as follows: The policy configuration instruction provided by the dynamic trusted verification function in the controller to be tested is called, and the predetermined dynamic trusted verification periodic measurement policy is configured in the predetermined application program and object file to obtain a dynamic subject-object policy file.
[0012] Furthermore, when tampering with the execution process or the process of the tag verification policy, tampering is performed on a preset data segment of the execution process or the process of the tag verification policy; wherein the preset data segment is a code segment or a read-only data segment of the execution process or the process of the tag verification policy.
[0013] The present invention also provides a trusted DCS controller dynamic trusted verification function test system, which is applied to a test terminal, wherein a network connection is established between the test terminal and the controller to be tested; The trusted DCS controller dynamic trusted verification function test system comprises: A file strategy marking module is used to mark the predetermined process file in the controller under test with a file dynamic trust verification periodic measurement strategy, and obtain a process file of the marking verification strategy; wherein the controller under test responds to the process file of the marking verification strategy and generates an execution process; A first tampering query module, used to tamper with the execution process and query the trustworthy state of the execution process; A process strategy marking module is used to mark a predetermined process in the controller to be tested with a process dynamic trust verification periodic measurement strategy to obtain a process of the marking verification strategy; A second tampering query module, used to tamper with the process of the tag verification strategy and query the trustworthy state of the process of the tag verification strategy; A subject-object strategy marking module is used to dynamically verify the subject-object strategy marking of the predetermined application and object files in the controller to be tested, and obtain a dynamic subject-object strategy file; wherein the controller to be tested responds to the dynamic subject-object strategy file and generates a preset strategy point execution process; A third tampering query module, used to tamper with the execution process of the preset policy point and query the trustworthy state of the execution process of the preset policy point; The result output module is used to output the query results of the trusted state of the execution process, the trusted state of the process of the mark verification strategy and the trusted state of the execution process of the preset strategy point, and obtain the dynamic trusted verification function test result of the controller to be tested.
[0014] The present invention also provides a trusted DCS controller dynamic trusted verification function test device, comprising: a processor suitable for executing a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the trusted DCS controller dynamic trusted verification function testing method is executed.
[0015] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for testing the dynamic trusted verification function of a trusted DCS controller is implemented.
[0016] Compared with the prior art, the present invention has the following beneficial effects: The method for testing the dynamic trusted verification function of a trusted DCS controller provided by the present invention performs file dynamic trusted verification periodic measurement strategy marking on the execution process corresponding to a predetermined process file, performs process dynamic trusted verification periodic measurement strategy marking on the predetermined process, and performs dynamic trusted verification subject-object strategy marking on the predetermined application program, and verifies whether the dynamic trusted verification function of the trusted DCS controller is stable and effective when facing malicious tampering by querying the trusted state of the process after tampering the process; secondly, through the network connection between the test terminal and the controller to be tested, the automatic sending of test instructions and the automatic collection of test results are realized, which greatly improves the test efficiency and reduces the errors and delays that may be caused by manual intervention; in addition, the test process can cover different types of execution units in the controller, ensuring the comprehensiveness of the test; the present invention can simulate potential security threats in actual operation, discover problems with the dynamic trusted verification function earlier, effectively improve the test speed and test quality, and at the same time meet the requirements of testing the stability of the dynamic trusted verification function, significantly reducing the test cost.
[0017] The trusted DCS controller dynamic trusted verification function test system, trusted DCS controller dynamic trusted verification function test device, computer-readable storage medium and computer program product provided by the present invention have all the advantages of the trusted DCS controller dynamic trusted verification function test method mentioned above. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 A flow chart of a method for testing a dynamic trusted verification function of a trusted DCS controller provided by the present invention; Figure 2 A structural block diagram of a dynamic trusted verification function test system for a trusted DCS controller provided by the present invention; Figure 3 This is a structural block diagram of the dynamic trusted verification function testing device for a trusted DCS controller provided by the present invention. DETAILED DESCRIPTION
[0020] In order to make the technical problems, technical solutions and beneficial effects solved by this application clearer, the technical solutions in the embodiments of this application will be described clearly and completely in combination with the drawings in the embodiments of this application; obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0021] This embodiment 1 provides a method for testing the dynamic trusted verification function of a trusted DCS controller, which is applied to a test terminal; a preset Python test program and a test program configuration file are pre-stored on the test terminal; wherein the preset Python test program is used to implement the steps of the method for testing the dynamic trusted verification function of a trusted DCS controller, and the test program configuration file includes the identity information of the controller to be tested, the test file directory on the controller to be tested, and the threshold number of network connections with the controller to be tested; specifically, the identity information of the controller to be tested includes the IP address, user name and password of the controller to be tested, and the test file directory on the controller to be tested is a directory of predetermined process files, predetermined processes, and predetermined applications and object files in the controller to be tested.
[0022] As attached Figure 1 As shown, the trusted DCS controller dynamic trusted verification function testing method comprises the following steps: Step 1: Try to establish a network connection between the preset Python test program pre-stored on the test terminal and the controller to be tested through Telnet. The test terminal and the controller to be tested are in the same network environment. It should be noted that the preset Python test program is a program started in the running environment based on the Python script, and the running environment is an environment started based on the test program configuration file.
[0023] Step 2: Determine whether the network connection between the preset Python test program and the controller to be tested is successful. If the network connection is successful, jump to step 3; if the network connection fails, output a network connection failure prompt and the reason for the network connection failure, and try to reconnect; when the number of times the network connection is reestablished exceeds the threshold number of times the network connection is established with the controller to be tested, and the network connection result is still not recognized, the preset Python test program exits and the method ends.
[0024] Step 3: according to the test state requirement of the dynamic trust verification function of the controller under test, turn on or off the dynamic trust verification function of the controller under test, so that the dynamic trust verification function of the controller under test is in the on state or the off state.
[0025] Step 4: Mark the predetermined process file in the controller under test with the periodic measurement strategy of file dynamic trust verification, and obtain the file marked with the verification strategy. The process of marking the predetermined process file in the controller under test with the periodic measurement strategy of file dynamic trust verification, and obtaining the file marked with the verification strategy, specifically includes: calling the policy configuration instruction provided by the dynamic trust verification function in the controller under test, configuring the predetermined file dynamic trust verification periodic measurement strategy in the predetermined process file, and obtaining the process file marked with the verification strategy; wherein, the file dynamic trust verification periodic measurement strategy is used to trigger the dynamic trust verification function of the controller under test to perform periodic measurement verification on the predetermined process during the execution of the file.
[0026] Step 5: trigger the controller under test to run the file of the tag verification strategy and generate an execution process.
[0027] Step 6, call the trusted status query command provided by the dynamic trusted verification function in the controller to be tested, query the trusted status of the execution process, and obtain the correctness judgment result of the file dynamic trusted verification periodic measurement strategy. It should be noted that when the predetermined process file is marked with the file dynamic trusted verification periodic measurement strategy, when the file marked with the verification strategy is run, the trusted status of the corresponding execution process is trusted by default; by querying the trusted status of the execution process and based on the query result of the trusted status of the execution process, it can be judged whether the file dynamic trusted verification periodic measurement strategy is correct.
[0028] Step 7: Tamper with the execution process to make the trusted state of the execution process untrustworthy. Specifically, the trusted state of the execution process is made untrustworthy by tampering with the preset data segment of the execution process; wherein the preset data segment of the execution process includes the code segment or read-only data segment of the execution process; the code segment of the execution process is used to store the operation instructions of the predetermined process file; the read-only data segment of the execution process is used to store the initialized global variables in the predetermined process file.
[0029] Step 8, query the trusted state of the execution process. Specifically, call the trusted state query command provided by the dynamic trusted verification function in the controller to be tested, query the trusted state of the tampered execution process to check whether the process is terminated or whether there is an alarm prompt returned, and obtain the query result of the trusted state of the execution process; wherein, when the trusted state of the tampered execution process is untrustworthy, the dynamic trusted verification function of the controller to be tested will terminate the execution process or issue an alarm prompt.
[0030] Step 9: Mark the predetermined process in the controller to be tested with the process dynamic trusted verification periodic measurement strategy to obtain the process of the marked verification strategy. Specifically, call the policy configuration instruction provided by the dynamic trusted verification function in the controller to be tested, configure the predetermined process dynamic trusted verification periodic strategy in the predetermined process, and obtain the process of the marked verification strategy.
[0031] Step 10, call the trusted status query command provided by the dynamic trusted verification function in the controller to be tested, query the trusted status of the process marked with the verification strategy, and obtain the correctness judgment result of the dynamic trusted verification periodic measurement strategy of the process. It should be noted that when a predetermined process is marked with a dynamic trusted verification periodic measurement strategy, the trusted status of the corresponding process is trusted by default; by querying the trusted status of the process and judging whether the dynamic trusted verification periodic measurement strategy of the process is correct according to the query result of the trusted status of the process,
[0032] Step 11, tampering the process of the tag verification policy so that the trusted state of the process of the tag verification policy is untrustworthy. Specifically, the preset data segment of the process of the tag verification policy is tampered so that the trusted state of the process of the tag verification policy is untrustworthy; wherein the preset data segment of the process of the tag verification policy includes the code segment or read-only data segment of the process of the tag verification policy; it should be noted that the operation of tampering with the preset data segment of the process of the tag verification policy is basically the same as the tampering operation in the above step 7, and will not be repeated here.
[0033] Step 12, query the trusted state of the process of the tag verification strategy. Specifically, call the trusted state query command provided by the dynamic trusted verification function in the controller to be tested, query the trusted state of the process of the tampered tag verification strategy to check whether the process is terminated or whether there is an alarm prompt returned, and obtain the trusted state query result of the process of the tag verification strategy; it should be noted that when the trusted state of the process of the tampered tag verification strategy is not trusted, the dynamic trusted verification function of the controller to be tested will terminate the process or issue an alarm prompt.
[0034] Step 13: dynamically authenticate the application and object files in the controller to be tested and mark them with the subject-object policy of dynamic trust verification to obtain the dynamic subject-object policy file. Specifically, the policy configuration instruction provided by the dynamic trust verification function in the controller to be tested is called, and the predetermined dynamic trust verification periodic measurement policy is configured in the predetermined application and object files to obtain the dynamic subject-object policy file.
[0035] Step 14: triggering a predetermined execution strategy point in the controller to be tested to run the dynamic subject-object strategy file and generate a preset strategy point execution process.
[0036] Step 15, call the trusted status query command provided by the dynamic trusted verification function in the controller to be tested, query the trusted status of the process executed by the preset policy point, and obtain the correctness judgment result of the dynamic trusted verification subject and object policy. It should be noted that when the predetermined application and object files are marked with the dynamic trusted verification subject and object policy, when the dynamic subject and object policy file is run, the trusted status of the corresponding process is trusted by default; by querying the trusted status of the process executed by the preset policy point, and according to the trusted status query result of the process executed by the preset policy point, it can be judged whether the dynamic trusted verification subject and object policy is correct.
[0037] Step 16: tampering the preset policy point execution process to make the trusted state of the preset policy point execution process untrustworthy. Specifically, tampering the preset data segment of the preset policy point execution process to make the trusted state of the preset policy point execution process untrustworthy; wherein the preset data segment of the preset policy point execution process includes the code segment or read-only data segment of the preset policy point execution process.
[0038] Step 17, query the trusted state of the preset policy point execution process. Specifically, call the trusted state query command provided by the dynamic trusted verification function in the controller to be tested, query the trusted state of the preset policy point execution process after tampering, to check whether the process is terminated or whether there is an alarm prompt returned, and obtain the query result of the trusted state of the preset policy point execution process; wherein, when the trusted state of the preset policy point execution process after tampering is untrustworthy, the dynamic trusted verification function of the controller to be tested will terminate the preset policy point execution process or issue an alarm prompt.
[0039] Step 18, output the correctness judgment result of the dynamic trusted verification periodic measurement strategy of the file, the query result of the trusted status of the execution process, the correctness judgment result of the process dynamic trusted verification periodic measurement strategy, the query result of the trusted status of the process of the mark verification strategy, the correctness judgment result of the dynamic trusted verification subject and object strategy and the query result of the trusted status of the execution process at the preset strategy point to obtain the dynamic trusted verification function test result of the controller to be tested.
[0040] Specifically, the output process of the test results is as follows: The correctness judgment result of the file dynamic trusted verification periodic measurement strategy, the query result of the trusted status of the execution process, the correctness judgment result of the process dynamic trusted verification periodic measurement strategy, the query result of the trusted status of the process of the marking verification strategy, the correctness judgment result of the dynamic trusted verification subject and object strategy and the query result of the trusted status of the execution process at the preset strategy point are returned, and saved to the test log file, and the test log file is output in html format to obtain the dynamic trusted verification function test result of the controller to be tested.
[0041] It should be noted that the test results of the dynamic trusted verification function of the controller to be tested include test pass or test fail; among them, when the test fails, the information returned when the failure occurs will be recorded with the log record to facilitate the investigation of the cause of the failure and locate the problem; in the case of failure of the previous test, the functional modules that have not passed the verification during the test and the functional modules that have passed the verification are distinguished; and in the next test process, only the functional modules that have not passed the verification are tested, and the functional modules that have passed the verification in the previous test are not tested, thereby shortening the overall test time.
[0042] Example description: The process of marking the periodic measurement strategy of file dynamic trust verification for the predetermined process file in the controller to be tested is as follows: To mark the process file dynamic trusted verification periodic measurement strategy, use the dtmv_mark -f file -b -kabcd command: the parameter -f specifies the process file for configuring the periodic dynamic trusted verification strategy; the parameter -b means that if the process file has a corresponding process running, the dynamic trusted verification of the process is started immediately without restarting the process; the parameter -k specifies the password for performing the operation.
[0043] Mark the process PID dynamic trust verification periodic measurement strategy, using the dtmv_mark -p 1234 -P 10 -c1 -l 1 -k abcd command: Among them, the parameter -p specifies the process PID, which means that the periodic trust verification strategy based on the process PID is configured for the process; the parameter -P is used to specify the time period for periodic dynamic trust verification of the process, in seconds; the parameter -c is used to set the control strategy adopted by the process when the verification is untrustworthy; the parameter -l is used to specify the audit strategy, and when an object verification is untrustworthy, the content of the log record is determined.
[0044] To delete the dynamic trusted verification periodic measurement policy for process files, use the dtmv_unmark -f file -d 1 -k abcd command: The parameter -d is whether to clear the dynamic trusted verification policy for the corresponding process and file when setting the policy for deleting process files or process PIDs. To delete the dynamic trusted verification periodic measurement policy for process PIDs, use the dtmv_unmark -p 1234 -k abcd command.
[0045] The process of dynamic trusted verification subject and object strategy marking for predetermined application programs and object files in the controller under test is as follows: Mark the dynamic trusted verification subject and object policy. For example, to configure the subject process subjA to perform dynamic trusted verification when opening the object file objB, use the command dtmv_mark -s subjA -o objB -a file_open -k abcd: the parameter -s is used to specify the subject process file name; the parameter -o is used to specify the name of the object accessed by the subject process; the parameter -a is used to specify the execution control point name; to delete all execution control point policies of the subject subjA for the object objB, use the dtmv_unmark -s subjA -o objB -k abcd command; to delete the access policy of the subject subjA to all objects, use the dtmv_unmark -s subjA -c -k abcd command.
[0046] Configure an execution control point for a dynamically trusted process, which means that trusted verification of the process will be triggered when the execution reaches this control point. Use the dtmv_config -a file_open -s 5 -k abcd command: The parameter -a is used to specify the name of the execution control point. Currently, four execution control points are supported. The four execution control points include opening a file file_open, renaming a file inode_rename, deleting a file inode_unlink, and deleting a directory inode_rmdir. The parameter -s is used to specify the control measures taken on the process when the verification is untrustworthy.
[0047] The method for testing the dynamic trusted verification function of a trusted DCS controller described in Example 1 performs policy marking on process files, processes, and applications, tampers with execution processes, and queries their trusted status to verify whether the dynamic trusted verification function of the controller is stable and effective when facing malicious tampering. This method can simulate potential security threats in actual operation, improve the authenticity and reliability of the test, and realize automatic sending of test instructions and automatic collection of test results through the network connection between the test terminal and the controller to be tested, thereby greatly improving test efficiency and reducing errors and delays that may be caused by manual intervention.
[0048] Example 2 As attached Figure 2 As shown, this embodiment 2 provides a trusted DCS controller dynamic trusted verification function test system, including: a network connection module, a function status setting module, a file policy marking module, a first policy judgment module, a first tampering query module, a process policy marking module, a second policy judgment module, a second tampering query module, a subject-object policy marking module, a third policy judgment module, a third tampering query module and a result output module.
[0049] A network connection module, used to attempt to establish a network connection between the preset Python test program pre-stored on the test terminal and the controller to be tested through Telnet; determine whether the network connection between the preset Python test program and the controller to be tested is successful; a function status setting module, used to turn on or off the dynamic trusted verification function of the controller to be tested according to the dynamic trusted verification function test status requirements of the controller to be tested, so that the dynamic trusted verification function of the controller to be tested is in an on state or a off state; a file strategy marking module, used to mark the process file predetermined in the controller to be tested with a file dynamic trusted verification periodic measurement strategy, and obtain a file with a marked verification strategy; trigger the controller to be tested to run the file with the marked verification strategy and generate an execution process; a first strategy judgment module, used to call the trusted status query command provided by the dynamic trusted verification function in the controller to be tested, query the trusted status of the execution process, and obtain the correctness judgment result of the file dynamic trusted verification periodic measurement strategy; a first tampering query module, used to tamper with the execution process to make the trusted status of the execution process untrustworthy; query the trusted status of the execution process; a process strategy marking module, used to mark the process dynamic trusted periodic measurement strategy of the process predetermined in the controller to be tested Verify the periodic measurement strategy tag and obtain the process of the tag verification strategy; the second strategy judgment module is used to call the trusted status query command provided by the dynamic trusted verification function in the controller to be tested, query the trusted status of the process of the tag verification strategy, and obtain the correctness judgment result of the process dynamic trusted verification periodic measurement strategy; the second tampering query module is used to tamper with the process of the tag verification strategy to make the trusted status of the process of the tag verification strategy untrustworthy; query the trusted status of the process of the tag verification strategy; the subject-object strategy tag module is used to dynamically tamper with the predetermined application and object files in the controller to be tested Trusted verification of subject-object policy tags, obtaining dynamic subject-object policy files; triggering a predetermined execution policy point in the controller to be tested to run the dynamic subject-object policy file, generating a preset policy point execution process; a third policy judgment module, used to call the trusted status query command provided by the dynamic trusted verification function in the controller to be tested, query the trusted status of the preset policy point execution process, and obtain the correctness judgment result of the dynamic trusted verification subject-object policy; a third tampering query module, used to tamper with the preset policy point execution process, so that the trusted status of the preset policy point execution process is untrustworthy; query the trusted status of the preset policy point execution process;The result output module is used to output the correctness judgment result of the file dynamic trusted verification periodic measurement strategy, the query result of the trusted state of the execution process, the correctness judgment result of the process dynamic trusted verification periodic measurement strategy, the query result of the trusted state of the process of the mark verification strategy, the correctness judgment result of the dynamic trusted verification subject and object strategy, and the query result of the trusted state of the execution process at the preset strategy point, and obtain the dynamic trusted verification function test result of the controller to be tested. ;
[0050] Example 3 As attached Figure 3 As shown, this embodiment 3 provides a trusted DCS controller dynamic trusted verification function test device, including: a memory for storing a computer program; a processor for implementing the steps of a trusted DCS controller dynamic trusted verification function test method when executing the computer program; or, when the processor executes the computer program, it implements the functions of each module in the above-mentioned trusted DCS controller dynamic trusted verification function test system.
[0051] The steps of the trusted DCS controller dynamic trusted verification function testing method are, for example: Through Telnet, try to establish a network connection between the preset Python test program pre-stored on the test terminal and the controller to be tested; determine whether the network connection between the preset Python test program and the controller to be tested is successful; according to the dynamic trusted verification function test status requirement of the controller to be tested, turn on or off the dynamic trusted verification function of the controller to be tested, so that the dynamic trusted verification function of the controller to be tested is in an on state or a off state; mark the process file predetermined in the controller to be tested with the file dynamic trusted verification periodic measurement strategy, and obtain the file of the marked verification strategy; trigger the controller to be tested to run the marked verification function; The method comprises the following steps: generating an execution process by calling a trusted state query command provided by the dynamic trusted verification function in the controller to be tested, querying the trusted state of the execution process, and obtaining a correctness judgment result of the file dynamic trusted verification periodic measurement strategy; tampering with the execution process to make the trusted state of the execution process untrustworthy; querying the trusted state of the execution process; marking the process predetermined in the controller to be tested with the process dynamic trusted verification periodic measurement strategy, and obtaining a process with the marked verification strategy; calling a trusted state query command provided by the dynamic trusted verification function in the controller to be tested, and querying the trusted state of the process with the marked verification strategy, Obtain the correctness judgment result of the process dynamic trustworthy verification periodic measurement strategy; tamper with the process of the tag verification strategy to make the trustworthy state of the process of the tag verification strategy untrustworthy; query the trustworthy state of the process of the tag verification strategy; perform dynamic trustworthy verification subject-object strategy marking on the predetermined application and object files in the controller to be tested, and obtain the dynamic subject-object strategy file; trigger the predetermined execution strategy point in the controller to be tested to run the dynamic subject-object strategy file, and generate the preset strategy point execution process; call the trustworthy state query command provided by the dynamic trustworthy verification function in the controller to be tested, and perform the trustworthy state of the preset strategy point execution process. Perform a query to obtain the correctness judgment result of the dynamic trusted verification subject and object strategy; tamper with the preset strategy point execution process to make the trusted state of the preset strategy point execution process untrusted; query the trusted state of the preset strategy point execution process; output the correctness judgment result of the file dynamic trusted verification periodic measurement strategy, the query result of the execution process, the correctness judgment result of the process dynamic trusted verification periodic measurement strategy, the query result of the trusted state of the process of the mark verification strategy, the correctness judgment result of the dynamic trusted verification subject and object strategy and the query result of the trusted state of the preset strategy point execution process, and obtain the dynamic trusted verification function test result of the controller to be tested.
[0052] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of completing preset functions, and the instruction segments are used to describe the execution process of the computer program in the trusted DCS controller dynamic trusted verification function test device.
[0053] The trusted DCS controller dynamic trusted verification function test device can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The trusted DCS controller dynamic trusted verification function test device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the above is an example of a trusted DCS controller dynamic trusted verification function test device, and does not constitute a limitation on the trusted DCS controller dynamic trusted verification function test device, and may include more components than the above, or a combination of certain components, or different components. For example, the trusted DCS controller dynamic trusted verification function test device may also include input and output devices, network access devices, buses, etc.
[0054] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The processor is the control center of the trusted DCS controller dynamic trusted verification function test device, and uses various interfaces and lines to connect various parts of the entire trusted DCS controller dynamic trusted verification function test device.
[0055] The memory can be used to store the computer program and / or module, and the processor implements various functions of the trusted DCS controller dynamic trusted verification function test device by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory.
[0056] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0057] Example 4 This embodiment 4 also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the method for testing the dynamic trusted verification function of a trusted DCS controller are implemented.
[0058] If the module / unit integrated in the trusted DCS controller dynamic trusted verification function test system is implemented in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0059] Based on such understanding, the present invention implements all or part of the processes in the above-mentioned trusted DCS controller dynamic trusted verification function test method, and can also be completed by instructing related hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned trusted DCS controller dynamic trusted verification function test method can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or preset intermediate form, etc.
[0060] The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0061] It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electrical carrier signals and telecommunication signals.
[0062] The method for testing the dynamic trusted verification function of a trusted DCS controller of the present invention performs file dynamic trusted verification periodic measurement policy marking on predetermined process files, performs process dynamic trusted verification periodic measurement policy marking on predetermined processes, and performs dynamic trusted verification subject-object policy marking on predetermined application programs and object files. After marking the process files, processes, and applications, the method tamperes with these execution units and queries their trusted states to achieve a comprehensive test of the dynamic trusted verification function of the trusted DCS controller. The method has the advantages of high test efficiency and automation, and intuitive and analyzable test results.
[0063] The above embodiment is only one of the implementation methods that can realize the technical solution of the present invention. The scope of protection claimed by the present invention is not limited only to this embodiment, but also includes changes, replacements and other implementation methods that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed by the present invention.
Claims
1. A method for testing dynamic trust verification function of a trusted DCS controller, characterized in that: Applied to a test terminal, a network connection is established between the test terminal and the controller to be tested; The trusted DCS controller dynamic trusted verification function testing method comprises: Perform file dynamic trust verification periodic measurement strategy marking on a predetermined process file in the controller to be tested, and obtain a process file of the marking verification strategy; wherein the controller to be tested responds to the process file of the marking verification strategy and generates an execution process; Tampering with the execution process and querying the trust status of the execution process; Performing process dynamic trust verification periodic measurement strategy marking on a predetermined process in the controller to be tested, and obtaining a process of the marking verification strategy; Tampering with the process of the tag verification policy and querying the trust status of the process of the tag verification policy; Performing dynamic trusted verification of subject-object policy marking on predetermined application programs and object files in the controller to be tested, and obtaining a dynamic subject-object policy file; wherein the controller to be tested responds to the dynamic subject-object policy file and generates a preset policy point execution process; Tampering with the execution process of the preset strategy point, and querying the trustworthy status of the execution process of the preset strategy point; The query results of the trusted state of the execution process, the trusted state of the process of the mark verification strategy and the trusted state of the execution process of the preset strategy point are output to obtain the dynamic trusted verification function test result of the controller to be tested.
2. A method for testing dynamic trustworthy verification function of a trusted DCS controller according to claim 1, characterized in that: The test terminal pre-stores a preset Python test program and a test program configuration file; wherein the preset Python test program is used to implement the steps of the trusted DCS controller dynamic trusted verification function test method, and the preset Python test program is connected to the controller to be tested via Telnet.
3. A method for testing dynamic trustworthy verification function of a trusted DCS controller according to claim 2, characterized in that: The test program configuration file includes the identity information of the controller to be tested, the test file directory on the controller to be tested, and the threshold number of network connections with the controller to be tested; wherein the test file directory on the controller to be tested is a directory of predetermined process files, predetermined processes, and predetermined application programs and object files in the controller to be tested.
4. A method for testing a dynamic trusted verification function of a trusted DCS controller according to claim 1, characterized in that: The process of marking the predetermined process file in the controller to be tested with the file dynamic trust verification periodic measurement strategy and obtaining the process file of the marking verification strategy is specifically as follows: The policy configuration instruction provided by the dynamic trusted verification function in the controller to be tested is called, and a predetermined file dynamic trusted verification periodic measurement policy is configured in a predetermined process file to obtain a process file of the marking verification policy.
5. A method for testing dynamic trustworthy verification function of a trusted DCS controller according to claim 1, characterized in that: The process of marking a predetermined process in the controller to be tested with a process dynamic trustworthy verification periodic measurement strategy to obtain a process of the marking verification strategy is specifically as follows: The policy configuration instruction provided by the dynamic trusted verification function in the controller to be tested is called, and the predetermined process dynamic trusted verification periodic measurement policy is configured in the predetermined process to obtain the process of the marking verification policy.
6. A method for testing dynamic trustworthy verification function of a trusted DCS controller according to claim 1, characterized in that: The process of dynamically verifying the subject-object policy mark of the predetermined application and object file in the controller to be tested and obtaining the dynamic subject-object policy file is as follows: The policy configuration instruction provided by the dynamic trusted verification function in the controller to be tested is called, and the predetermined dynamic trusted verification periodic measurement policy is configured in the predetermined application program and object file to obtain a dynamic subject-object policy file.
7. A method for testing a dynamic trusted verification function of a trusted DCS controller according to claim 1, characterized in that: When tampering with the execution process or the process of the tag verification policy, the preset data segment of the execution process or the process of the tag verification policy is tampered with; wherein the preset data segment is a code segment or a read-only data segment of the execution process or the process of the tag verification policy.
8. A dynamic trusted verification function test system for a trusted DCS controller, characterized in that: Applied to a test terminal, a network connection is established between the test terminal and the controller to be tested; The trusted DCS controller dynamic trusted verification function test system comprises: A file strategy marking module is used to mark the predetermined process file in the controller under test with a file dynamic trust verification periodic measurement strategy, and obtain a process file of the marking verification strategy; wherein the controller under test responds to the process file of the marking verification strategy and generates an execution process; A first tampering query module, used to tamper with the execution process and query the trustworthy state of the execution process; A process strategy marking module is used to mark a predetermined process in the controller to be tested with a process dynamic trust verification periodic measurement strategy to obtain a process of the marking verification strategy; A second tampering query module, used to tamper with the process of the tag verification strategy and query the trustworthy state of the process of the tag verification strategy; A subject-object strategy marking module is used to dynamically verify the subject-object strategy marking of the predetermined application and object files in the controller to be tested, and obtain a dynamic subject-object strategy file; wherein the controller to be tested responds to the dynamic subject-object strategy file and generates a preset strategy point execution process; A third tampering query module, used to tamper with the execution process of the preset policy point and query the trustworthy state of the execution process of the preset policy point; The result output module is used to output the query results of the trusted state of the execution process, the trusted state of the process of the mark verification strategy and the trusted state of the execution process of the preset strategy point, and obtain the dynamic trusted verification function test result of the controller to be tested.
9. A trusted DCS controller dynamic trusted verification function test device, characterized in that: include: a processor suitable for executing a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the method for testing the dynamic trusted verification function of a trusted DCS controller according to any one of claims 1 to 7 is executed.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for testing the dynamic trusted verification function of a trusted DCS controller as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Security protection method and system for real-time operating system of trusted DCS (Distributed Control System) controller and medium
CN117195231A
Trusted DCS controller trusted function test method, electronic equipment and storage medium
CN117970907A
Web-based process dynamic untrusted test method and system
CN118897796A
Measurement mechanism-based credible PLC starting method
WO2018107595A1
Trusted verification method and apparatus
WO2023179745A1
Cited By
Static trusted verification function test method for trusted controller and related device
CN120196092A
Static Trusted Verification Function Testing Method and Related Devices for a Trusted Controller
CN120196092B