CN112799914A - Method and system for dynamically supervising codes and data in computer operation in full time - Google Patents

Method and system for dynamically supervising codes and data in computer operation in full time Download PDF

Info

Publication number
CN112799914A
CN112799914A CN202110119956.3A CN202110119956A CN112799914A CN 112799914 A CN112799914 A CN 112799914A CN 202110119956 A CN202110119956 A CN 202110119956A CN 112799914 A CN112799914 A CN 112799914A
Authority
CN
China
Prior art keywords
software
supervision
target software
signature
user side
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110119956.3A
Other languages
Chinese (zh)
Other versions
CN112799914B (en
Inventor
张磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Big Data Advanced Technology Research Institute
Nanhu Laboratory
Original Assignee
Beijing Big Data Advanced Technology Research Institute
Nanhu Laboratory
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Big Data Advanced Technology Research Institute, Nanhu Laboratory filed Critical Beijing Big Data Advanced Technology Research Institute
Priority to CN202110119956.3A priority Critical patent/CN112799914B/en
Publication of CN112799914A publication Critical patent/CN112799914A/en
Application granted granted Critical
Publication of CN112799914B publication Critical patent/CN112799914B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method and a system for dynamically supervising codes and data in computer operation in a full time period based on a chip level hardware security environment. A method for dynamically supervising running codes and data of a computer in a full-time mode comprises the following steps: running supervision software in a chip level hardware security environment of a user side before a supervision time node; aiming at any target software started by a user side, the user side carries out n times of target software real-time measurement under the running state of different time nodes t; the measured value and the identification information are subjected to trusted measurement, reading and signature by chip level hardware of the user side to obtain a signature value and are sent to the supervision software within a specified time period; and the supervision terminal verifies the signature of the signature value, reads and stores the measurement information corresponding to the signature value as a record value for post supervision and tracing. The invention realizes dynamic monitoring of the computer source code, the software data and the like of the user end, and can carry out credible retrospection afterwards based on the measurement result.

Description

Method and system for dynamically supervising codes and data in computer operation in full time
Technical Field
The invention relates to a method and a system for dynamically supervising a computer, in particular to a method and a system for dynamically supervising codes and data in the running process of the computer in a full time period.
Background
In recent years, source code auditing in the field of computers is mainly based on static auditing, namely, source codes of certain computer software are audited before running, and omnibearing dynamic auditing is implemented on actually running computer software by an effective means, so that corresponding software source codes and related running data in the running process of the computer software cannot be effectively monitored. The defects of the existing static audit are shown as follows:
when the computer software is operated in the range of the monitored user end, an external supervisor can only perform static auditing, namely auditing the source code of certain computer software before running, verifying that certain computer software (executable file) corresponds to a certain (legal) source code through a cryptographic technique, but cannot monitor which source code the software actually running in the range of the monitored user end corresponds to in real time; if the supervision end needs to be responsible for the purpose, the supervision end needs to be responsible for carrying out measurement immediately before the software is operated in the supervision range (such as carrying out software hash value measurement to be compared with an expected value), and after verification, the operated software is determined to be verified or authorized software. The method has extremely high supervision cost and low supervision efficiency, and is difficult to realize effective supervision particularly under the condition of not being familiar with IT deployment of a supervised person. Some tpm (trusted Platform module) -based technologies generally verify the boot of upper layer services (generally, upper layer Platform, operating system) by using a digital signature of a (hardware) service provider, unlike the present invention that requires the supervision object to be general software/service.
Secondly, there is no effective means to measure and monitor the running computer software or application in real time.
And thirdly, no effective means is available for effectively measuring and effectively supervising the relevant data of the computer software or application in operation, such as input data, output data, data state, operation state and the like.
Based on the above analysis, monitoring and auditing computer software or applications in actual operation are the most reliable monitoring and auditing methods, but the technical scheme is difficult to implement in view of the difficulty or the basic impossibility of a supervisor to audit the software in operation in real time. With the development of hardware, especially chip technology, the technical scheme has an implementable hardware environment. The chip level hardware security environment is a trusted execution environment based on a chip level trusted base, is not controlled by a system layer and a Kernel layer, namely has the highest management authority or the Kernel level control authority of a computer system and cannot check, tamper and control data and operation in the security environment. The secure environments referred to in this patent include chip-level hardware-based secure environments, as well as hardware and software-based hybrid secure environments, and software-based secure environments. The corresponding technologies based on the chip level hardware security environment include sgx (software Guard extensions) technology of Intel corporation and sev (secure Encrypted virtualization) technology of AMD corporation. Technologies corresponding to a chip-level hardware security environment have been widely applied to general chips and integrated on general computers in the market, such as SGX technology of Intel corporation, notebook computers and PCs equipped with i3, i5, i7 and i9 chips in the corporation, and a server Xeon E3, etc., which will be widely integrated in Xeon E5 and E7 in the near future. The corresponding technology of the safe environment based on the software/hardware mixing comprises the AWS cloud Nitro Enclaves technology of Amazon company and the like.
Based on the chip level hardware safety environment, a method for dynamically monitoring codes and data in the running process of a computer in a whole time period is researched and developed, the source codes and data of computer software running at any time node of a monitored user side are monitored in an all-around mode, and the source codes and related data of the computer software running at any time node are traced and checked in a credible mode afterwards, so that the method has great significance for technical development in the field.
Disclosure of Invention
The invention aims to provide a method for dynamically supervising codes and data in computer operation in a full time period based on a chip level hardware security environment, which solves the problems in the background technology.
The invention also aims to provide a system for dynamically supervising the running codes and data of the computer all the time based on a chip level hardware security environment.
The technical scheme adopted by the invention for solving the technical problems is as follows:
a method for dynamically supervising running codes and data of a computer in a full-time mode comprises the following steps:
s1, the supervision software runs in the chip level hardware security environment of the supervised user side before the supervision time node, the supervision software has the local administrator authority of the supervised user side and can monitor the running of any target software of the supervised user side, the supervision software and the supervision side establish security connection based on heartbeat packets, and the supervision side monitors in real time that the supervision software running in the hardware security environment of the supervised user side is not forcibly interrupted, tampered and fake. The secure connection based on the heartbeat package can be based on a Transport Level Security or Datagram Transport Level Security mechanism or other digital signature mechanisms, for example, the supervision software obtains a real-time heartbeat package by signing a real-time timestamp (including year, month and day, with the time being accurate to the second Level) at intervals through a private key and sends the real-time heartbeat package to a supervision end, and the supervision end verifies the timestamp signature of the heartbeat package in real time on the basis of a public key registered by the supervision software to confirm that the supervision software runs safely;
s2, aiming at any target software started by the monitored user side, the monitored user side carries out n times of target software measurement at different time nodes t (n is more than or equal to 1): the supervisory software informs the target software to measure the loaded target software and data by the chip level hardware at a selected time node t, and requires to provide a measured value in a specified time period by taking the time node t as a reference; the measured value is an expression form of the target software, such as a binary execution file, a source code, a target software related file, a hash value of data and the like of the target software loaded into a safe environment;
s3, the measured value and the identification information are measured, read and signed by the chip level hardware of the supervised user side to obtain a signature value, the signature value is sent to the supervision software in a packaging format in a specified time period, when the supervision software does not obtain the signature value in the specified time period, the step S4 is executed, and when the supervision software obtains the signature value in the specified time period, the step S5 is executed; the identification information includes but is not limited to machine identification information, CPU identification information, a one-time shared secret key sent by supervisory software in real time, and the like, and the signature value comprises a measured value and the identification information and a result of digital signature of the measured value and the identification information;
s4, the supervision software continuously sends warning information to the supervision end based on the real-time heartbeat package connection until the supervision end confirms, and the supervision end classifies the supervised user end as being unsuspected and carries out investigation;
s5, the supervisory software sends the signature value and the identification information independently collected by the supervisory software to the supervisory end in a trusted mode;
s6, the supervision terminal verifies whether the signature of the signature value is valid, if the signature is invalid or the identification information contained in the signature does not accord with the identification information independently collected by the supervision software, the step S7 is executed, otherwise, the step S8 is executed;
s7, listing the supervised user side as an unconventional entity, and taking a limiting measure;
and S8, the monitoring end reads and stores the measured value corresponding to the signature value as a recorded value d0 for post-monitoring tracing.
Preferably, in step S2, when n =1, the time node t is the target software start time node; when n >1, the time node t is any selected time node of the supervision terminal after the target software is started, and the target software measurement when n >1 comprises the following steps:
s21, the supervision end takes the time node of the next target software measurement as the selected time node to inform the supervision software through the secure connection;
s22, the supervisory software notifies the target software to measure its software running code and data by the chip level hardware at the selected time node.
Preferably, in the step S22, the difference between the time of the target software notified by the supervisory software and the time of the selected time node is t1, the time required for the chip-level hardware to measure the software running code and data and transmit the measured value is t2, and t1> t 2. On the basis of reserving the chip-level hardware with time to measure and transmit the measurement values to the target software, the supervisory software should notify the target software as late as possible before the selected time node.
Preferably, in step S2, the measured value is a hash value of the binary execution file and data of the target software loaded into the trusted secure environment.
Preferably, in step S8, the post-monitoring traceability includes the following steps:
s81, the monitoring end informs the monitored user end to submit the target software information of any time node in advance selected by the monitoring end;
s82, calculating a measured value d1 to be compared by the target software by the supervision terminal based on the submitted target software information, comparing the consistency of d1 and d0, executing the step S83 when the result is inconsistent, and executing the step S84 when the result is consistent; the calculation method for d1 is such as, but not limited to, the following: the measurement calculation may be, but is not limited to, according to different definitions of the measurement for different application scenarios: compiling and generating a target software execution file based on the source code, and further generating a hash value of the target software execution file; or compiling and generating an executable file of the target software based on the provided target software information, loading the executable file in a chip level hardware security environment, and obtaining a hash value of the loading content of the security environment; or compiling and generating an executable file of the target software based on the provided target software information, loading the executable file and data which is provided by a supervisor and loaded at the time of the selected time node in the chip level hardware security environment, and obtaining a hash value of the loading content of the security environment;
s83, listing the supervised user side as an unconventional entity; when n >1, the measurement verification of different time nodes will repeat the above S2-S8 and S81-S83;
s84, the supervision end examines the detail information of the submitted target software, and when the examination result is qualified, the supervised user end is listed as a compliance entity, otherwise, the step S83 is executed. The part of the supervision end for examining the submitted target software detailed information is mainly to examine whether the source codes and the data in the submitted target software detailed information are in compliance. When n >1, the supervisor reviews the target software detailed information of different time nodes defined by all supervisors submitted.
Preferably, in step S81, the target software information is one or more of software source code, executable file, target software related file, and loading data.
Preferably, in step S7, the limiting means includes: the supervisory software forces the target software to shut down.
Preferably, the chip-level hardware security environment is a trusted execution environment based on Intel SGX, a secure virtualized encryption environment based on AMD SEV, or a software and hardware mixed security environment based on Amazon AWS cloud Nitro environments technology.
A system for dynamically supervising code and data in computer operation in all time periods comprises a supervised user side and a supervising side, wherein the supervised user side is used for performing the following operations:
the method comprises the steps that supervision software runs in a chip level hardware safety environment of a supervised user side before a supervision time node, the supervision software can monitor the running of any target software of the supervised user side, the supervision software and a supervision end establish safety connection based on a heartbeat packet, and the supervision end monitors the supervision software running in the hardware safety environment of the user side in real time and is not forcibly interrupted, tampered and fake;
aiming at any target software started by a monitored user side, the monitored user side carries out n times of target software measurement at different time nodes t (n is more than or equal to 1): the supervisory software informs the target software to measure the loaded target software and data by the chip level hardware at a selected time node t, and requires to provide a measured value in a specified time period by taking the time node t as a reference;
the measured value and the identification information are signed by chip level hardware of the monitored user side to obtain a signature value, the signature value is sent to the monitoring software in a packaging format within a specified time period, when the monitoring software does not obtain the signature value within the specified time period, warning information is continuously sent to the monitoring side based on real-time heartbeat package connection until the monitoring side confirms, and the monitoring side classifies the monitored user side as being in an unqualified suspicion and carries out investigation; when the supervisory software obtains the signature value within a specified time period, the signature value and the identification information independently collected by the supervisory software are sent to a supervisory end in a trusted mode;
the monitoring end is used for carrying out the following operations:
and verifying whether the signature of the signature value is valid, listing the monitored user side as a non-compliant entity when the signature is invalid or the identification information contained in the signature does not conform to the identification information acquired by the monitoring software, taking a limiting measure, and reading and storing the measured value corresponding to the signature value as a recorded value d0 for post-monitoring tracing when the signature is valid.
Preferably, when n =1, the time node t is a target software start time node; when n >1, the time node t is any selected time node of the supervising end after the target software is started, and the supervising end is further used for performing the following operations: taking the time node for next target software measurement as a selected time node and informing the supervisory software through safe connection; the supervised user side is further configured to: the supervisory software informs the target software that its software running code and data are measured by the chip-level hardware at selected time nodes.
Preferably, the monitoring end is further configured to: informing the monitored user end to submit the target software information of any time node in advance selected by the monitoring end; the monitoring end calculates a measured value d1 to be compared with the target software based on the submitted target software information (namely, the target software information is calculated by running a chip level hardware safety environment with the same technology as that of the monitored user end to obtain a value d1 to be detected), compares the consistency of d1 and d0, if the result is inconsistent, the monitored user end is listed as an unconventional entity, if the result is consistent, the target software information is examined, if the examined result is qualified, the monitored user end is listed as a compliant entity, otherwise, the monitored user end is listed as the unconventional entity.
The invention has the beneficial effects that:
the invention discloses a method and a system for dynamically monitoring codes and data in the running process of a computer in a whole time period, which realize the dynamic monitoring and auditing of a software source code, a software binary file, software related data and the like of a monitored user side computer, effectively and comprehensively monitor the software running on the computer based on a chip-level high-reliability computing/privacy computing technology, transmit a measurement result to a monitoring end in a credible manner, and perform credible tracing of the software source code, the software binary file, the software related data and the like of the monitored user side computer running at any time node afterwards based on the measurement result, thereby being the most effective and most credible method and the system for monitoring and auditing the software running at the monitored user side.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flowchart of a method of example 1 of the present invention;
FIG. 2 is a flowchart of a method for retrospective supervision and tracing in embodiment 1 of the present invention;
FIG. 3 is a flowchart of a method of embodiment 2 of the present invention;
fig. 4 is a flowchart of a method for retrospective supervision tracing in embodiment 2 of the present invention.
Detailed Description
The technical solution of the present invention is further specifically described below by way of specific examples in conjunction with the accompanying drawings. It is to be understood that the practice of the invention is not limited to the following examples, and that any variations and/or modifications may be made thereto without departing from the scope of the invention.
In the present invention, all parts and percentages are by weight, unless otherwise specified, and the equipment and materials used are commercially available or commonly used in the art. The methods in the following examples are conventional in the art unless otherwise specified. The components or devices in the following examples are, unless otherwise specified, standard parts or parts known to those skilled in the art, the structure and principle of which are known to those skilled in the art through technical manuals or through routine experimentation.
Based on the hardware related to trusted computing, the invention directly measures the upper computer software and related data of the monitored user end at any time node (the measured value is expressed in the form of hash value but not limited to hash value) under the chip level hardware security environment of the monitored user end, and directly signs the measured value by the chip instruction in the chip level hardware security environment and then sends the signed measured value to the monitoring end. The supervision terminal can confirm the validity of the measured value by verifying the validity of the signature, and remotely authorize the start, the continuous operation or the termination of the operation of the target software of the supervised user terminal.
The invention relates to the deployment of a monitored user end and a monitoring end, wherein the monitored user end is pre-deployed with monitoring software authorized by the monitoring end, the monitoring software runs in a chip level hardware security environment of the monitored user end and has administrator authority, and a highest authority person of a monitored user end system cannot check and tamper any data in the monitoring software or invade the monitoring software to control the running of the monitoring software.
The following describes a method and a system for dynamically supervising code and data in a computer running in a full time period in detail by combining with embodiment 1 and embodiment 2, and the method and the system respectively carry out measurement and dynamic supervision on a source code, a binary file, software related data and the like of loaded target software at a time node of starting of target software at a supervised user end and any selected time node of running after the target software at the supervised user end is started.
Example 1:
a method for dynamically supervising code and data in computer operation in a full period, as shown in fig. 1, the method comprises the following steps:
s1, running the supervision software in the chip level hardware security environment of the supervised user side before the supervision time node, wherein the supervision software has the authority of a local administrator and can monitor the running of any target software of the supervised user side, the supervision software and the supervision side establish a security connection based on a heartbeat package, and the supervision side monitors that the supervision software running in the hardware security environment of the user side is not forcibly interrupted, tampered and fake in real time; the typical chip level hardware security environment is a trusted execution environment based on an Intel SGX, and a supervision end can remotely verify the running credibility and integrity of supervision software through a remote authentication mechanism of the Intel SGX;
s2, aiming at any target software started by the monitored user side, the monitored user side carries out target software measurement at the target software starting time node: the supervisory software informs each target software of measuring the loaded target software and data by chip level hardware at a software starting time node (time node t), and requires to provide a measured value in a specified time period by taking the time node t as a reference; the supervising software monitors the start and operation of any target software on the supervised user end, the target software is loaded to the secure environment by chip-level hardware, such as an Enclave sandbox creation loading process of the Intel SGX, and a typical measurement value is a hash value (for example, but not limited to, mrenclavave value of the Intel SGX) obtained by performing load measurement on target software data through an Enclave EADD and EEXTEND instruction of the Intel SGX;
s3, the measured value and the identification information are measured, read and signed based on the credibility of the chip level hardware of the monitored user side to obtain a signature value (through an Intel SGX EREPORT instruction), and the signature value comprises the measured value, the identification information and the digital signature result of the measured value and the identification information; the signature value is sent to the supervisory software in a packaged format over a trusted channel for a specified period of time, step S4 is performed when the supervisory software does not obtain the signature value for the specified period of time, step S5 is performed when the supervisory software obtains the signature value for the specified period of time; the identification information may include machine identification information, CPU identification information, and one or more of a one-time shared key transmitted by the supervisory software in real time. The encapsulation format may be a certificate or a queue report format encapsulated in an Intel SGX, where the Intel SGX queue report further includes an identification number (e.g., Intel SGX Enclave ID) of the target software running in the secure environment;
it should be noted that the target software includes two parts, the first part is a software common part: i.e., interaction with local supervisory software, invokes a set of hardware instructions to measure and package the target software measurements (steps S1-S3), and triggers the execution of a second part, the first part being provided by the supervisor; the second part is a supervised software part. The first part and the second part are used as target software and run in the same safe environment, and the measured value refers to the measured value of the two loaded parts of the whole target software or the measured value of the two loaded parts of the whole target software and the related data of the target software;
in order to limit the operation of unsupervised software on the supervised user side, the supervising software will monitor all software starts on the supervised user side, and the steps set forth in this patent need to be followed to start new software;
based on the above mechanism, the supervised user end cannot fraudulently terminate the signature of the target software measurement because the signature of its measurement value and identification information needs to be provided to the supervisory software within a specified time; the supervised user side cannot forge the signature value because the supervised user side cannot obtain the hardware CPU chip signature private key; the monitored user side can not be replaced by a signature generated by a chip level hardware security environment of another device, and the identification information, the measured value and a software operation security environment identification number (Intel SGX Enclave ID) are read and signed by a hardware CPU (central processing unit) in a credible manner; the supervised user cannot start another software at the same time to intercept the hardware signature, because the monitoring software monitors the start and running of any target software on the supervised user, verifies the signature generated by the hardware corresponding to each software start, the software running safety environment identification number (Intel SGX Enclave ID), and the related timestamp contained, and monitors whether the same measurement value exists at the same window time;
s4, the supervision software continuously sends warning information to the supervision end based on the real-time heartbeat package connection until the supervision end confirms, and the supervision end classifies the warning information as being unsuitable and carries out investigation; furthermore, if necessary, a limiting measure can also be taken, i.e. the target software is forcibly turned off by the supervisory software; the warning information cannot be intercepted or forged by the supervised user end, because the highest authority person of the supervised user end system cannot obtain the private key of the supervision software running in the hardware security environment, and the supervised user end cannot be temporarily disconnected based on the real-time heartbeat packet security connection mechanism, and the real-time heartbeat packet cannot be transmitted and can be listed as the non-compliance suspicion by the supervision end to be investigated due to the fact that the real-time heartbeat packet cannot be transmitted because of the disconnection of the real-time heartbeat packet;
s5, the supervisory software sends the signature value and the identification information independently collected by the supervisory software to the supervisory end in a trusted mode; the trusted mode can be sent through the secure connection after being signed by the private key of the supervisory software;
s6, the supervision terminal verifies whether the signature of the signature value is valid, if the signature is invalid or the identification information contained in the signature does not accord with the identification information independently collected by the supervision software, the step S7 is executed, otherwise, the step S8 is executed; whether the signature of the signature value is valid or not, namely whether the signature is signed by valid chip level hardware in a legal and safe environment; a typical signature verification process is performed based on Intel SGX through ias (Intel attach service) or dcap (SGX Data attach preferences);
s7, listing the supervised user side as an unconventional entity, and taking a limiting measure; the limiting measures are that the monitoring software forcibly closes the target software;
and S8, the monitoring end reads and stores the measured value corresponding to the signature value as a recorded value d0 for post-monitoring tracing.
The postmortem supervision tracing is shown in fig. 2 and comprises the following steps:
s81, the supervision end informs the supervised user end of submitting target software information of the time node to be detected (target software starting time); target software information includes, but is not limited to, source code, executable files, target software related files, load data;
s82, compiling and generating an executable file of the target software by the supervising base based on the provided target software information, loading the executable file and data which is provided by the supervisor and loaded at the selected time node (software starting time) in the chip level hardware security environment, measuring and obtaining a hash value d1 of the loading content of the security environment, comparing the consistency of d1 and d0, executing the step S83 when the result is inconsistent, and executing the step S84 when the result is consistent;
s83, listing the supervised user side as an unconventional entity;
s84, the supervision end examines the detail information (source code and data information) of the submitted target software, the part is that whether the source code and data in the detail information of the submitted target software are compliant or not is mainly examined, when the examination result is qualified, the supervised user end is listed as a compliance entity, otherwise, the step S83 is executed.
Based on the above mechanism, the supervised user has to submit the target software information of the to-be-detected time node, and if the supervised user does not provide the target software information as the real target software information, the comparison between the detected value d1 and the recorded value d0 is inconsistent, so that the supervised user finds the target software information and classifies the target software information as an out-of-compliance entity.
Example 2:
a method for dynamically supervising code and data in computer operation in a full period, as shown in fig. 3, the method comprises the following steps:
s1, running the supervision software in the chip level hardware security environment of the supervised user side before the supervision time node, wherein the supervision software can monitor the running of any target software of the supervised user side, the supervision software and the supervision side establish a safe connection based on a heartbeat package, and the supervision side monitors that the supervision software running in the hardware security environment of the user side is not forcibly interrupted, tampered and fake in real time; the typical chip level hardware security environment is a trusted execution environment based on an Intel SGX, and a supervision end can remotely verify the running credibility and integrity of supervision software through a remote authentication mechanism of the Intel SGX;
s2, aiming at any target software started by the monitored user side, the monitored user side informs the target software of measuring the software running code and data of the target software by the chip level hardware at the selected time node after the target software is started at any selected time node, and the method comprises the following steps:
s21, the supervision end takes the time node of the next target software measurement as the selected time node to inform the supervision software through the secure connection; the supervisor end may request periodic measurements, e.g. at intervals of 15 minutes, or aperiodic measurements informing the next unpredictable measurement time node;
s22, the supervisory software informs the target software that the chip level hardware measures the software running code and data of the target software at the selected time node: the supervisory software informs each target software of measuring the loaded target software and data by the chip level hardware at different selected time nodes t, and requires to provide a measured value in a specified time period by taking the time nodes t as a reference;
the monitoring software monitors the starting and running of any target software on the monitored user end, dynamic data of the target software is loaded to a safe environment by chip level hardware, such as an Enclave sandbox loading process of an Intel SGX, and a typical measured value is a hash value obtained by measuring data loaded by the target software through an Enclave EEXTEND instruction of the Intel SGX, but is not limited to the hash value;
s3, the measured value and the identification information are subjected to trusted measurement, reading and signature to obtain a signature value (through an Intel SGX EREPORT instruction) based on the chip level hardware of the supervised user side, the signature value is sent to the supervision software through a trusted channel in a packaging format within a specified time period, the step S4 is executed when the supervision software does not obtain the signature value within the specified time period, and the step S5 is executed when the supervision software obtains the signature value within the specified time period; the identification information comprises machine identification information, CPU identification information and a one-time shared secret key sent by the supervision software in real time. The encapsulation format may be a certificate or a queue format encapsulated in an Intel SGX, and the Intel SGX queue report further includes an identification number (e.g., Intel SGX Enclave ID) of the target software running in the secure environment;
it should be noted that the target software includes two parts, the first part is a software common part: i.e., interaction with local supervisory software, invokes a set of hardware instructions to measure and package the target software measurements (steps S1-S3), and triggers the execution of a second part, the first part being provided by the supervisor; the second part is a supervised software part. The first part and the second part are used as target software and run in the same safe environment, and the measured value refers to the measured value of the loaded whole target software and the related data of the target software;
in order to limit the operation of unsupervised software on the supervised user side, the supervising software will monitor all software starts on the supervised user side, and the steps set forth in this patent need to be followed to start new software;
based on the above mechanism, the supervised user end cannot fraudulently terminate the target software measurement signature because the supervision software measurement signature needs to be provided within a specified time; the supervised user side cannot forge the signature value because the supervised user side cannot obtain the hardware CPU chip signature private key; the monitored user side can not be replaced by a signature generated by a chip level hardware security environment of another device, and the identification information, the measured value and a software operation security environment identification number (Intel SGX Enclave ID) are read and signed by a hardware CPU (central processing unit) in a credible manner; the supervised user cannot start another software at the same time to intercept the hardware signature, because the monitoring software monitors the start and running of any target software on the supervised user, verifies the signature generated by the hardware corresponding to each software start, the software running security environment identification number (such as Intel SGX Enclave ID), and the relevant timestamp and monitoring contained whether the same measurement value exists at the same window time;
s4, the supervision software continuously sends warning information to the supervision end based on the real-time heartbeat package connection until the supervision end confirms, and the supervision end classifies the warning information as being unsuitable and carries out investigation; furthermore, if necessary, a limiting measure can also be taken, i.e. the target software is forcibly turned off by the supervisory software; the warning information cannot be intercepted or forged by the supervised user end, because the highest authority person of the supervised user end system cannot obtain the private key of the supervision software running in the hardware security environment, and the supervised user end cannot be temporarily disconnected based on a real-time heartbeat packet mechanism, so that the real-time heartbeat packet cannot be transmitted and can be listed as an unconventional suspicion by the supervision end to carry out investigation due to the fact that the real-time heartbeat packet is disconnected;
s5, the supervisory software sends the signature value and the identification information independently collected by the supervisory software to the supervisory end in a trusted mode; the trusted mode can be sent through the secure connection after being signed by the private key of the supervisory software;
s6, the supervision terminal verifies whether the signature of the signature value is valid, if the signature is invalid or the identification information contained in the signature does not accord with the identification information independently collected by the supervision software, the step S7 is executed, otherwise, the step S8 is executed; whether the signature of the signature value is valid or not, namely whether the signature is signed by valid chip level hardware in a legal and safe environment; a typical signature verification process is performed based on Intel SGX through ias (Intel attach service) or dcap (SGX Data attach preferences);
s7, listing the supervised user side as an unconventional entity, and taking a limiting measure; the limiting measures are that the supervision software forcibly closes the target software;
and S8, the supervision end reads and stores the signature value as a record value d0 corresponding to a certain time node for post supervision and tracing.
The postmortem supervision tracing is shown in fig. 4 and comprises the following steps:
s81, the supervision end informs the supervised user end of submitting the target software information of the time node to be detected; target software information includes, but is not limited to, source code, executable files, target software related files, load data;
s82, loading and running the submitted target software information corresponding to the time node to be checked in a chip level hardware security environment, for example, loading and running the target software and data which is provided by a supervisor and loaded at the time of the selected time node in the chip level hardware security environment by the supervisor, obtaining a measured value d1 corresponding to the time node, comparing the consistency of d1 and d0, executing the step S83 when the result is inconsistent, and executing the step S84 when the result is consistent;
s83, listing the supervised user side as an unconventional entity; for the case where n >1, i.e., the case of example 2, the verification of the measurements of the nodes at different times will repeat the above S2-S83;
and S84, the supervision end examines the detailed information (source code and data information) of the target software of different time nodes defined by all the supervision parties submitted, and the part is mainly to examine whether the source code and the data in the detailed information of the target software submitted are in compliance. And when the examination result is qualified, the supervised user side is listed as a compliance entity, otherwise, the step S83 is executed.
Based on the above mechanism, the supervised user has to submit the target software information of the to-be-detected time node, and if the supervised user does not provide the target software information as the real target software information, the comparison between the detected value d1 and the recorded value d0 is inconsistent, so that the supervised user finds the target software information and classifies the target software information as an out-of-compliance entity.
Based on the same inventive concept, the invention also provides a system for dynamically supervising codes and data in the running process of a computer in a whole time period, which comprises a supervised user side and a supervising side, wherein the supervised user side is used for carrying out the following operations:
the method comprises the steps that supervision software runs in a chip level hardware security environment of a supervised user side before a supervision time node, the supervision software and a supervision end establish security connection based on a heartbeat package, and the supervision end monitors that the supervision software running in the hardware security environment of the user side is not forcibly interrupted, tampered and fake in real time;
aiming at any target software started by a monitored user side, the monitoring software informs the target software to carry out n times (n is more than or equal to 1) of measuring the loaded target software and data by the chip level hardware at different selected time nodes t, and the time nodes t are used as references to require to provide measured values in a specified time period;
the measured value and the identification information are signed by chip level hardware of a monitored user side to obtain a signature value, the signature value is sent to the monitoring software in a packaging format within a specified time period, when the monitoring software does not obtain the signature value within the specified time period, warning information is continuously sent to the monitoring side based on a real-time heartbeat package until the warning information is confirmed by the monitoring side, and when the monitoring software obtains the signature value within the specified time period, the signature value is sent to the monitoring side in a credible mode;
the monitoring end is used for carrying out the following operations:
and verifying whether the signature of the signature value is valid, listing the monitored user side as a non-compliant entity when the signature is invalid, taking a limiting measure, and reading and storing a measured value corresponding to the signature value as a recorded value d0 for post supervision and tracing when the signature is valid.
When n =1, the time node t is a target software starting time node; when n >1, the time node t is any selected time node of the supervising end after the target software is started, and the supervising end is further used for performing the following operations: taking the time node for next target software measurement as a selected time node and informing the supervisory software through safe connection; the supervised user side is further configured to: the supervisory software informs the target software that its software running code and data are measured by the chip-level hardware at selected time nodes.
The supervisory controller is further configured to: informing the monitored user side to submit the target software information of the time node to be detected; and loading and running target software information corresponding to the time node to be checked submitted by the monitored user side in a chip-level hardware safety environment, obtaining a measured value d1 corresponding to the time node to be checked, comparing the consistency of d1 and d0, listing the monitored user side as a non-compliant entity when the result is inconsistent, checking the target software information when the result is consistent, listing the monitored user side as a compliant entity when the checking result is qualified, and otherwise, listing the monitored user side as a non-compliant entity.
The above-described embodiments are only preferred embodiments of the present invention, and are not intended to limit the present invention in any way, and other variations and modifications may be made without departing from the spirit of the invention as set forth in the claims.

Claims (9)

1. A method for dynamically supervising code and data in computer operation in all time periods is characterized in that: the method comprises the following steps:
s1, running the supervision software in the chip level hardware security environment of the supervised user side before the supervision time node, wherein the supervision software can monitor the running of any target software of the supervised user side, the supervision software and the supervision side establish security connection based on heartbeat packets, and the supervision side monitors that the supervision software running in the hardware security environment of the supervised user side is not forcibly interrupted, tampered and fake in real time;
s2, aiming at any target software started by the monitored user side, the monitored user side carries out n times of target software measurement at different time nodes t (n is more than or equal to 1): the supervisory software informs the target software to measure the loaded target software and data by the chip level hardware at a selected time node t, and requires to provide a measured value in a specified time period by taking the time node t as a reference;
s3, the measured value and the identification information are signed by the chip level hardware of the supervised user side to obtain a signature value, the signature value is sent to the supervision software in a packaging format within a specified time period, the step S4 is executed when the supervision software does not obtain the signature value within the specified time period, and the step S5 is executed when the supervision software obtains the signature value within the specified time period;
s4, the supervision software continuously sends warning information to the supervision end based on the real-time heartbeat package connection until the supervision end confirms, and the supervision end classifies the supervised user end as being unsuspected and carries out investigation;
s5, the supervisory software sends the signature value and the identification information independently collected by the supervisory software to the supervisory end in a trusted mode;
s6, the supervision terminal verifies whether the signature of the signature value is valid, if the signature is invalid or the identification information contained in the signature does not accord with the identification information collected by the supervision software, the step S7 is executed, otherwise, the step S8 is executed;
s7, listing the supervised user side as an unconventional entity, and taking a limiting measure;
and S8, the monitoring end reads and stores the measured value corresponding to the signature value as a recorded value d0 for post-monitoring tracing.
2. The method of claim 1 for dynamically supervising code and data in computer operation in a full period of time, wherein: in step S2, when n =1, the time node t is the target software start time node; when n >1, the time node t is any selected time node of the supervision terminal after the target software is started, and the target software measurement when n >1 comprises the following steps:
s21, the supervision end takes the time node of the next target software measurement as the selected time node to inform the supervision software through the secure connection;
s22, the supervisory software notifies the target software to measure its software running code and data by the chip level hardware at the selected time node.
3. The method of claim 1 for dynamically supervising code and data in computer operation in a full period of time, wherein: in step S8, the post-supervision tracing includes the following steps:
s81, the monitoring end informs the monitored user end to submit the target software information of any time node in advance selected by the monitoring end;
s82, calculating a measured value d1 to be compared by the target software by the supervision terminal based on the submitted target software information, comparing the consistency of d1 and d0, executing the step S83 when the result is inconsistent, and executing the step S84 when the result is consistent;
s83, listing the supervised user side as an unconventional entity;
and S84, the monitoring end examines the target software information, and when the examination result is qualified, the monitored user end is listed as a compliance entity, otherwise, the step S83 is executed.
4. The method of claim 3, wherein the method comprises the following steps: in step S81, the target software information is one or more of source code, executable file, target software related file, and loading data.
5. The method of claim 1 for dynamically supervising code and data in computer operation in a full period of time, wherein: in step S7, the limiting means includes: the supervisory software forces the target software to shut down.
6. The method of claim 1 for dynamically supervising code and data in computer operation in a full period of time, wherein: the chip level hardware security environment is a trusted execution environment based on Intel SGX (Software Guard Extensions), a Secure virtualized encryption environment based on AMD SEV (Secure Encrypted Virtualization) or a Software and hardware mixed security environment based on the AWS cloud Nitro Enclaves technology of Amazon company.
7. A system for dynamically supervising running codes and data of a computer in all periods is characterized in that: the system comprises a supervised user side and a supervising side, wherein the supervised user side is used for performing the following operations:
the method comprises the steps that supervision software runs in a chip level hardware safety environment of a supervised user side before a supervision time node, the supervision software can monitor the running of any target software of the supervised user side, the supervision software and a supervision end establish safety connection based on a heartbeat packet, and the supervision end monitors the supervision software running in the hardware safety environment of the user side in real time and is not forcibly interrupted, tampered and fake;
aiming at any target software started by a monitored user side, the monitored user side carries out n times of target software measurement at different time nodes t (n is more than or equal to 1): the supervisory software informs the target software to measure the loaded target software and data by the chip level hardware at a selected time node t, and requires to provide a measured value in a specified time period by taking the time node t as a reference;
the method comprises the steps that a signature value is obtained by chip level hardware signature of a monitored user side, the signature value is sent to supervisory software in a packaging format within a specified time period, when the supervisory software does not obtain the signature value within the specified time period, warning information is continuously sent to a supervisory side based on real-time heartbeat package connection until the supervisory side confirms, the supervisory side classifies the monitored user side as being unqualified and carries out investigation, and when the supervisory software obtains the signature value within the specified time period, the signature value and identification information independently collected by the supervisory software are sent to the supervisory side in a credible mode;
the monitoring end is used for carrying out the following operations:
and verifying whether the signature of the signature value is valid, listing the monitored user side as a non-compliant entity when the signature is invalid or the identification information contained in the signature does not conform to the identification information acquired by the monitoring software, taking a limiting measure, and reading and storing the measured value corresponding to the signature value as a recorded value d0 for post-monitoring tracing when the signature is valid.
8. The system for dynamically supervising code and data in computer operation in the full period according to claim 7, wherein: when n =1, the time node t is a target software starting time node; when n >1, the time node t is any selected time node of the supervising end after the target software is started, and the supervising end is further used for performing the following operations: taking the time node for next target software measurement as a selected time node and informing the supervisory software through safe connection; the supervised user side is further configured to: the supervisory software informs the target software that its software running code and data are measured by the chip-level hardware at selected time nodes.
9. The system for dynamically supervising code and data in computer operation in the full period according to claim 7, wherein: the supervisory controller is further configured to: informing the monitored user end to submit the target software information of any time node in advance selected by the monitoring end; and calculating a measured value d1 to be compared by the target software based on the submitted target software information, comparing the consistency of d1 and d0, listing the monitored user terminal as a non-compliant entity when the result is inconsistent, reviewing the target software information when the result is consistent, listing the monitored user terminal as a compliant entity when the review result is qualified, and otherwise, listing the monitored user terminal as a non-compliant entity.
CN202110119956.3A 2021-01-28 2021-01-28 Method and system for dynamically supervising codes and data in computer operation in full time Active CN112799914B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110119956.3A CN112799914B (en) 2021-01-28 2021-01-28 Method and system for dynamically supervising codes and data in computer operation in full time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110119956.3A CN112799914B (en) 2021-01-28 2021-01-28 Method and system for dynamically supervising codes and data in computer operation in full time

Publications (2)

Publication Number Publication Date
CN112799914A true CN112799914A (en) 2021-05-14
CN112799914B CN112799914B (en) 2022-08-05

Family

ID=75812591

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110119956.3A Active CN112799914B (en) 2021-01-28 2021-01-28 Method and system for dynamically supervising codes and data in computer operation in full time

Country Status (1)

Country Link
CN (1) CN112799914B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113569266A (en) * 2021-09-22 2021-10-29 南湖实验室 Host remote monitoring method based on chip level privacy calculation

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831356A (en) * 2011-06-14 2012-12-19 武汉安珈教育科技有限公司 Software dynamic credibility authentication method based on software fingerprint
CN104809397A (en) * 2015-05-12 2015-07-29 上海斐讯数据通信技术有限公司 Android malicious software detection method and system based on dynamic monitoring
CN106953753A (en) * 2016-12-09 2017-07-14 中国电子科技集团公司第三十研究所 A kind of credible monitoring and managing method of special equipment based on embedded hardware module
US20170315899A1 (en) * 2016-04-28 2017-11-02 International Business Machines Corporation Dynamic tracing using ranking and rating
CN107423119A (en) * 2017-03-31 2017-12-01 合肥民众亿兴软件开发有限公司 A kind of running software system and its operation method
CN111417121A (en) * 2020-02-17 2020-07-14 西安电子科技大学 Multi-malware hybrid detection method, system and device with privacy protection function

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831356A (en) * 2011-06-14 2012-12-19 武汉安珈教育科技有限公司 Software dynamic credibility authentication method based on software fingerprint
CN104809397A (en) * 2015-05-12 2015-07-29 上海斐讯数据通信技术有限公司 Android malicious software detection method and system based on dynamic monitoring
US20170315899A1 (en) * 2016-04-28 2017-11-02 International Business Machines Corporation Dynamic tracing using ranking and rating
CN106953753A (en) * 2016-12-09 2017-07-14 中国电子科技集团公司第三十研究所 A kind of credible monitoring and managing method of special equipment based on embedded hardware module
CN107423119A (en) * 2017-03-31 2017-12-01 合肥民众亿兴软件开发有限公司 A kind of running software system and its operation method
CN111417121A (en) * 2020-02-17 2020-07-14 西安电子科技大学 Multi-malware hybrid detection method, system and device with privacy protection function

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113569266A (en) * 2021-09-22 2021-10-29 南湖实验室 Host remote monitoring method based on chip level privacy calculation
NL2033097A (en) * 2021-09-22 2023-03-27 Nanhu Laboratory Method for remotely monitoring host based on chip-level privacy-preserving computation (ppc)
US11693955B2 (en) 2021-09-22 2023-07-04 Nanhu Laboratory Method for remotely monitoring host based on chip-level privacy-preserving computation (PPC)

Also Published As

Publication number Publication date
CN112799914B (en) 2022-08-05

Similar Documents

Publication Publication Date Title
US9497210B2 (en) Stateless attestation system
Lesjak et al. Hardware-security technologies for industrial IoT: TrustZone and security controller
Kil et al. Remote attestation to dynamic system properties: Towards providing complete system integrity evidence
US8613080B2 (en) Assessment and analysis of software security flaws in virtual machines
CN108347361B (en) Application program testing method and device, computer equipment and storage medium
Ling et al. Secure boot, trusted boot and remote attestation for ARM TrustZone-based IoT Nodes
Böck et al. Towards more trustable log files for digital forensics by means of “trusted computing”
CN113282946B (en) Information security method and system based on data access process in high-reliability environment
CN101650764A (en) Creditable calculation password platform and realization method thereof
Nauman et al. Using trusted computing for privacy preserving keystroke-based authentication in smartphones
US11637842B2 (en) Detection of security intrusion in a computing system
CN100334519C (en) Method for establishing credible input-output channels
CN112799914B (en) Method and system for dynamically supervising codes and data in computer operation in full time
CN115147956A (en) Data processing method and device, electronic equipment and storage medium
JP6054225B2 (en) Configuration information management apparatus and configuration information management method
CN114826725B (en) Data interaction method, device, equipment and storage medium
CN106130996B (en) A kind of website attack protection verifying system and method
WO2013028059A1 (en) Verification system for trusted platform
CN113177200A (en) Application package management method and device, computer equipment and storage medium
CN112668025A (en) Vulnerability mining management method, system, equipment and readable storage medium
JP6063317B2 (en) Terminal device and determination method
Dogra et al. Security service level agreement measurement in cloud: A proof of concept implementation
Alsayed et al. Realizing Macro Based Technique for Behavioral Attestation on Remote Platform
Hosamani et al. How to Trust a Web Service Monitor Deployed in an Untrusted Environment?
JP2014048984A (en) Management device, management method, and management program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant