CN117857118A - Asymmetric encryption-based cloud mobile phone system mirror image tamper-proof method - Google Patents

Asymmetric encryption-based cloud mobile phone system mirror image tamper-proof method Download PDF

Info

Publication number
CN117857118A
CN117857118A CN202311703085.5A CN202311703085A CN117857118A CN 117857118 A CN117857118 A CN 117857118A CN 202311703085 A CN202311703085 A CN 202311703085A CN 117857118 A CN117857118 A CN 117857118A
Authority
CN
China
Prior art keywords
key
image
boot
img
value
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.)
Pending
Application number
CN202311703085.5A
Other languages
Chinese (zh)
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.)
Tianyi Cloud Technology Co Ltd
Original Assignee
Tianyi Cloud Technology Co Ltd
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 Tianyi Cloud Technology Co Ltd filed Critical Tianyi Cloud Technology Co Ltd
Priority to CN202311703085.5A priority Critical patent/CN117857118A/en
Publication of CN117857118A publication Critical patent/CN117857118A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Telephone Function (AREA)

Abstract

The application discloses a cloud mobile phone system mirror image tamper-proof method based on asymmetric encryption, which comprises the following steps: the packaging server integrates the private key and the CPU serial number into an emulgator, and uses asymmetric encryption, and the encrypted value is used as an image feature imgFeature and is integrated into a boot. Img image; starting an emulgator, reading an imgFeature value of boot. Img, and checking; the packaging server acquires the md5 value of the key directory and the file thereof, encrypts the key directory and the file thereof by using a public key, puts the key directory and the file thereof into an init process, and integrates the key directory and the file thereof into a boot. Img mirror image; and analyzing and decrypting the init process to obtain an md5 comparison table, loading the md5 comparison table into a memory, acquiring the md5 value of the key directory and the key directory file by the app_process, checking and comparing, and if the key directory and the key directory file are checked and compared, starting normally. The method and the device achieve the purpose of improving operation safety and reducing operation risk.

Description

Asymmetric encryption-based cloud mobile phone system mirror image tamper-proof method
Technical Field
The application relates to the technical field of systems, in particular to a cloud mobile phone system mirror image tamper-proof method based on asymmetric encryption.
Background
Cloud mobile phone Cloudphone is a mobile phone which applies cloud computing technology to network terminal service and realizes cloud service through a cloud server. The smart phone is a smart phone which is deeply combined with network services, and the smart phone can realize a plurality of functions through a network by virtue of a self-contained system and a network terminal erected by a manufacturer.
In 1991, rivest developed the md5 algorithm that is more technically mature. It adds the concept of security-belting on the basis of MD 4. While MD5 is somewhat more complex than MD4, it is more secure. This algorithm clearly consists of four steps that differ slightly from the MD4 design. In the MD5 algorithm, the information-digest size and padding requirements are exactly the same as MD 4. Denboer and Bosselas have found false punches (pseudo-collisions) in the md5 algorithm, but other than these have no other found post-encryption results. md5 can be any file, regardless of size, format, or number, that produces a "digital fingerprint" that is also unique, and if any changes are made to the file by anyone, the md5 value, i.e., the corresponding "digital fingerprint," will change.
Android is an open platform that allows any mobile terminal vendor to join the Android federation. The remarkable openness can lead more developers to be in possession of the platform, and with the increasing abundance of users and applications, a new platform can also quickly reach maturity. The openness is favorable for accumulating popularity for the development of Android, but an open platform brings greater risk, so that consumers can reform the mobile phone by means of brushing machines and the like.
In Android, bytecodes can be modified and the reverse Android application can be packaged again in the form of APK files to easily provide test login credentials, insight into bad designs, detailed information about libraries and classes used. It may also provide detailed information about the type of encryption used in the application. This can help an attacker not only invade one device, but also invade multiple devices using the same decryption method. On a Cloudphone cloud phone, there is also a risk that the bytecode of the Android image is tampered with.
Disclosure of Invention
The present application aims to solve, at least to some extent, one of the technical problems in the related art. Therefore, an object of the present application is to provide a method, a system, an electronic device and a readable storage medium for preventing image tampering of a cloud mobile phone system based on asymmetric encryption, so as to improve operation security, guarantee benefits of users and cloud mobile phone operators, and reduce operation risks.
In a first aspect of the present disclosure, a method for tamper-proofing a cloud mobile phone system image based on asymmetric encryption is provided, where the method includes:
the packaging server integrates the private key and the CPU serial number of the packaging server into an emulgator;
the packaging server uses asymmetric encryption, the encrypted value is used as an image feature imgFeature, the imgFeature is integrated into a boot. Img image, and the boot. Img image is manufactured by the packaging server;
starting an emulgator, reading an imgFeature value of a boot. Img, and checking a boot. Img mirror image;
the packaging server acquires an md5 value of a key directory and a file thereof, encrypts the md5 value by using a public key and puts the encrypted md5 value into a feature. Rc in an init process, and the feature. Rc is integrated into a boot. Img mirror image;
and analyzing and decrypting the feature.rc in the starting stage of the init process to obtain an md5 comparison table, loading the md5 comparison table into a memory, and obtaining the md5 value of the key directory and the file thereof by the app_process for verification comparison, wherein if the key directory and the file thereof pass the verification comparison, the zygote process is generated to be normally started, and if the key directory and the file thereof do not pass the verification comparison, the zygote process is not normally started.
The step of integrating the imgFeature into a boot. Img image by using the asymmetric encryption by the packaging server and taking the encrypted value as an image feature imgFeature comprises the following steps:
defining a mirror imgID of a packaging server;
adding the CPU serial number of the packaging server when adding the mirror image imgID of the definition packaging server;
encrypting the CPU serial number of the mirror image imgID+packaging server by using the public key of the packaging machine;
taking the encrypted value as a mirror image feature imgFeature;
when the packaging server makes a boot. Img image, the imgFeature is integrated into the boot. Img image.
The asymmetric encryption includes:
asymmetric encryption is by a pair of keys, instead of one, comprising a public key and a private key, encryption being the public key and decryption being the private key.
The step of starting an emitter, reading an imgFeature value of a boot. Img, and checking a boot. Img mirror image, wherein the step comprises the steps of;
starting an emulgator;
reading a mirror image feature imgFeature value of boot. Img;
decrypting the imgFeature through the private key of the packaging server to obtain a mirror image imgID and a CPU serial number of the packaging server;
checking the boot. Img mirror image by the mirror image imgID and the CPU serial number of the packaging server;
and if the verification is passed, loading boot. Img, and if the verification is not passed, not loading boot. Img.
The packing server obtains the md5 value of the key directory and the file thereof, including:
the system. Img image key files comprise/system/framework, system/priv-app and/system/bin key directories and files thereof, the image key files and emulgators are generated by a packaging server, and the running environment is in a host server.
The step of analyzing feature rc and decrypting to obtain an md5 comparison table in the startup stage by the init process, wherein the step of loading the comparison table into a memory comprises the following steps:
the init process enters a starting stage;
analyzing a preset feature. Rc;
the init decrypts the feature rc by using the private key of the packaging server to obtain an md5 value, and the md5 value forms a comparison table;
and loading the md5 comparison table into a memory.
The app_process obtains the md5 value of the key directory and the file thereof, and performs verification comparison, including:
the init process creates a system key process app_process;
the app_process obtains the md5 value of the key directory and directory file from the mirror image key file;
obtaining the md5 values of the key catalogue and the catalogue file, and checking and comparing the md5 values with the values of the md5 comparison table in the memory;
if the comparison is passed, generating a zygate process to start normally; if the comparison is not passed, the catalog or the key file of the corresponding system is tampered, normal starting is not carried out, reboot operation is carried out every 10s, the corresponding key log can be obtained in an emulgator, and then faults are judged.
In a second aspect of the present disclosure, a system for tamper-proofing a cloud mobile phone system image based on asymmetric encryption is provided, the system comprising:
the integration module is used for integrating the private key and the CPU serial number of the packaging server into an emulgator by the packaging server;
the asymmetric encryption module is used for the packaging server to use asymmetric encryption, the encrypted value is used as an image feature imgFeature, the imgFeature is integrated into a boot. Img image, and the boot. Img image is manufactured by the packaging server;
the boot. Img image verification module is used for starting an emulgator, reading an imgFeature value of the boot. Img and verifying the boot. Img image;
the feature.rc is integrated to a boot.img mirror module and is used for the packaging server to acquire an md5 value of a key directory and a file thereof, and the md5 value is encrypted by a public key and put into the feature.rc in an init process, and the feature.rc is integrated to the boot.img mirror;
and the verification module is used for analyzing the feature.rc and decrypting the feature.rc to obtain an md5 comparison table in the startup stage of the init process, loading the md5 comparison table into the memory, and obtaining the md5 value of the key directory and the file thereof by the app_process for verification comparison, wherein if the key directory and the file thereof pass the verification comparison, the zygote process is generated to be normally started, and if the key directory and the file thereof do not pass the verification comparison, the zygote process is not normally started.
In a third aspect of the disclosure, an electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the program to implement steps in a method for tamper-proofing a cloud mobile phone system image based on asymmetric encryption.
In a fourth aspect of the disclosure, a readable storage medium stores a computer program adapted to be loaded by a processor to perform the steps in the method for tamper-proofing a cloud mobile phone system image based on asymmetric encryption.
Compared with the prior art, the cloud mobile phone system mirror image tamper-proof method based on asymmetric encryption has the advantages that:
the cloud mobile phone system mirror image tamper-proof technology is based on protection of key system partition files, from a packaging server, a host server, a emulator, init process, an app_process and each key system file are buckled layer by layer, and key service of the system partition can be effectively protected from being tampered.
Asymmetric encryption is introduced between emulgator and boot. Img, and asymmetric encryption is also introduced when file information of key system files is generated, so that a falsifier is confused, and the control safety is greatly improved
If the cloud mobile phone is carelessly provided with rogue software and if viruses and Trojan horses are implanted, the system can not be started normally, so that larger loss of a user is avoided, and the user can continue to use normally only by replacing the original mirror image after executing the operation. Therefore, the purposes of improving operation safety, guaranteeing benefits of users and cloud mobile phone operators, reducing operation risks and the like can be achieved.
Compared with the system mirror image protection scheme of the existing cloud mobile phone, the method and the system mirror image protection scheme can effectively link the packaging server and the host server, and are safer to operate. And asymmetric encryption is introduced between the emulgator and boot. Img, so that the control safety is greatly improved, the emulgator and the starting partition are protected by matching the asymmetric encryption, the document is protected by using the md5 value and the CPU information of the packer, and the document information of the key document list is built in the starting partition, so that the system document is buckled with the emulgator information layer by layer. If the key file is modified or the key directory is newly added or deleted, the system cannot be started normally.
Drawings
Fig. 1 is a schematic flow chart of a method for preventing image tampering of a cloud mobile phone system based on asymmetric encryption according to an embodiment of the present application;
fig. 2 is a schematic diagram of a cloud mobile phone Android system startup flow provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of encryption and decryption of emulgator and boot. Img provided in one embodiment of the present application;
FIG. 4 is a schematic diagram of a system key file protection flow provided in one embodiment of the present application;
fig. 5 is a schematic overall flow diagram of a novel tamper-proof method of a cloud mobile phone system according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a cloud mobile phone system image tamper-proof system based on asymmetric encryption according to an embodiment of the present application;
FIG. 7 is a schematic diagram of an electronic device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a computer readable storage medium according to an embodiment of the present application.
Detailed Description
For a better understanding of the present application, various aspects of the present application will be described in more detail with reference to the accompanying drawings. It should be understood that these detailed description are merely illustrative of exemplary embodiments of the application and are not intended to limit the scope of the application in any way. Like reference numerals refer to like elements throughout the specification. The expression "and/or" includes any and all combinations of one or more of the associated listed items.
In the drawings, the size, dimensions and shape of elements have been slightly adjusted for convenience of description. The figures are merely examples and are not drawn to scale. As used herein, the terms "about," "approximately," and similar terms are used as terms of a table approximation, not as terms of a table degree, and are intended to account for inherent deviations in measured or calculated values that will be recognized by one of ordinary skill in the art. In addition, in this application, the order in which the processes of the steps are described does not necessarily indicate the order in which the processes occur in actual practice, unless explicitly defined otherwise or the context may be inferred.
It will be further understood that terms such as "comprises," "comprising," "includes," "including," "having," "contains," and/or "containing" are open-ended, rather than closed-ended, terms that specify the presence of the stated features, elements, and/or components, but do not preclude the presence or addition of one or more other features, elements, components, and/or groups thereof. Furthermore, when a statement such as "at least one of the following" appears after a list of features listed, it modifies the entire list of features rather than just modifying the individual elements in the list. Furthermore, when describing embodiments of the present application, use of "may" means "one or more embodiments of the present application. Also, the term "exemplary" is intended to refer to an example or illustration.
Unless otherwise defined, all terms (including engineering and technical terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
In addition, embodiments and features of embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Example 1
Fig. 1 is a schematic flow chart of a method for preventing image tampering of a cloud mobile phone system based on asymmetric encryption according to an embodiment of the present application, as shown in fig. 1, and the flow chart of the method for preventing image tampering of the cloud mobile phone system based on asymmetric encryption includes:
the packaging server integrates the private key and the CPU serial number of the packaging server into an emulgator;
an emulgator, an Android simulator, is a software program used to simulate another hardware or software environment on a computer or other device. May be used to run software written on other platforms, such as games, operating systems, etc. The purpose of the simulator is to enable the software to run on incompatible hardware.
The packaging server uses asymmetric encryption, the encrypted value is used as an image feature imgFeature, the imgFeature is integrated into a boot. Img image, and the boot. Img image is manufactured by the packaging server. imgFeature represents the image feature, boot. Img is a file name that is typically used to represent a boot image of a device. This image contains the boot loader and kernel, which is the code that is executed first when the device is started. In the Android system of a cloud mobile phone, boot. Img files are usually located in a/system partition of the device and are responsible for booting the system.
The step of integrating the imgFeature into a boot. Img image by using the asymmetric encryption by the packaging server and taking the encrypted value as an image feature imgFeature comprises the following steps:
defining a mirror imgID of a packaging server;
adding the CPU serial number of the packaging server when adding the mirror image imgID of the definition packaging server;
encrypting the CPU serial number of the mirror image imgID+packaging server by using the public key of the packaging machine;
taking the encrypted value as a mirror image feature imgFeature;
when the packaging server makes a boot. Img image, the imgFeature is integrated into the boot. Img image.
Asymmetric encryption: the asymmetric key is a pair of keys instead of one, the public key is used for encryption and the private key is used for decryption. Encryption and decryption use the public and private keys of the recipient. The public key is public, and the private key needs to be kept secret but stored locally and is not transmitted to the other party.
Starting an emulgator, reading an imgFeature value of a boot. Img, and checking a boot. Img mirror image, wherein the method comprises the steps of;
starting an emulgator;
reading a mirror image feature imgFeature value of boot. Img;
decrypting the imgFeature through the private key of the packaging server to obtain a mirror image imgID and a CPU serial number of the packaging server;
checking the boot. Img mirror image by the mirror image imgID and the CPU serial number of the packaging server;
and if the verification is passed, loading boot. Img, and if the verification is not passed, not loading boot. Img.
Wherein, emulgator is a simulator of electronic equipment, it can simulate the behavior of other hardware equipment, so that software can test and debug without real hardware.
And the packaging server acquires the md5 value of the key directory and the file thereof, encrypts the md5 value by using a public key and puts the encrypted md5 value into a feature. Rc in an init process, and the feature. Rc is integrated into a boot. Img mirror image. The packing server obtains the md5 value of the key directory and the file thereof, including:
the system. Img image key files comprise/system/framework, system/priv-app and/system/bin key directories and files thereof, the image key files and emulgators are generated by a packaging server, and the running environment is in a host server.
Wherein, the md5 value is a data verification method, which is calculated by the md5 algorithm. The md5 algorithm is a message digest algorithm that generates a special string, called a digest, from a string or a file according to certain rules. When the content of a file changes, the md5 value will also be different, so the md5 value is often used in applications to verify that a piece of data has been tampered with. feature. Rc is a table in the init process.
And analyzing and decrypting the feature.rc in the starting stage of the init process to obtain an md5 comparison table, loading the md5 comparison table into a memory, and obtaining the md5 value of the key directory and the file thereof by the app_process for verification comparison, wherein if the key directory and the file thereof pass the verification comparison, the zygote process is generated to be normally started, and if the key directory and the file thereof do not pass the verification comparison, the zygote process is not normally started.
The step of analyzing feature rc and decrypting to obtain an md5 comparison table in the startup stage by the init process, wherein the step of loading the comparison table into a memory comprises the following steps:
the init process enters a starting stage;
analyzing a preset feature. Rc;
the init decrypts the feature rc by using the private key of the packaging server to obtain an md5 value, and the md5 value forms a comparison table;
and loading the md5 comparison table into a memory.
The app_process obtains the md5 value of the key directory and the file thereof, and performs verification comparison, including:
the init process creates a system key process app_process;
the app_process obtains the md5 value of the key directory and directory file from the mirror image key file;
obtaining the md5 values of the key catalogue and the catalogue file, and checking and comparing the md5 values with the values of the md5 comparison table in the memory;
if the comparison is passed, generating a zygate process to start normally; if the comparison is not passed, the catalog or the key file of the corresponding system is tampered, normal starting is not carried out, reboot operation is carried out every 10s, the corresponding key log can be obtained in an emulgator, and then faults are judged.
Example 2
Fig. 6 is a schematic diagram of a system for preventing tampering of a cloud mobile phone system image based on asymmetric encryption according to an embodiment of the present application, as shown in fig. 6, a system for preventing tampering of a cloud mobile phone system image based on asymmetric encryption, where the system includes:
the integration module is used for integrating the private key and the CPU serial number of the packaging server into an emulgator by the packaging server;
the asymmetric encryption module is used for the packaging server to use asymmetric encryption, the encrypted value is used as an image feature imgFeature, the imgFeature is integrated into a boot. Img image, and the boot. Img image is manufactured by the packaging server;
the boot. Img image verification module is used for starting an emulgator, reading an imgFeature value of the boot. Img and verifying the boot. Img image;
the feature.rc is integrated to a boot.img mirror module and is used for the packaging server to acquire an md5 value of a key directory and a file thereof, and the md5 value is encrypted by a public key and put into the feature.rc in an init process, and the feature.rc is integrated to the boot.img mirror;
and the verification module is used for analyzing the feature.rc and decrypting the feature.rc to obtain an md5 comparison table in the startup stage of the init process, loading the md5 comparison table into the memory, and obtaining the md5 value of the key directory and the file thereof by the app_process for verification comparison, wherein if the key directory and the file thereof pass the verification comparison, the zygote process is generated to be normally started, and if the key directory and the file thereof do not pass the verification comparison, the zygote process is not normally started.
Example 3
Fig. 2 is a schematic diagram of a cloud mobile phone Android system startup procedure provided in an embodiment of the present application, and as shown in fig. 2, the cloud mobile phone system startup procedure includes:
the boot program executes preset codes from the mirror image;
loading Bootloader into a memory;
the Bootloader sets system hardware parameters, copies the image file of the operating system into the RAM, and jumps to the entrance of the RAM for execution;
starting a kernel, creating a first kernel process idle process and creating a first user space process init;
the init process is responsible for creating an app_process and generating a zygate process;
and starting an android system of the cloud mobile phone.
The Bootloader is a boot loader, and is located on a computer or other computer applications to guide a program started by an operating system. app_process is an important process in the Android system, which is responsible for launching and managing applications. The Zygote is a process in the Android system, which is responsible for hatching a new process, is responsible for loading and running a Java virtual machine, and provides a running environment for an application program.
Example 4
Fig. 3 is an encryption and decryption schematic diagram of an emulgator and a boot. Img provided in an embodiment of the present application, as shown in fig. 3, including:
the packaging server integrates the private key and the CPU serial number of the packaging server into an emulgator;
defining a mirror imgID of a packaging server;
adding the CPU serial number of the packaging server when adding the mirror image imgID of the definition packaging server;
encrypting the CPU serial number of the mirror image imgID+packaging server by using the public key of the packaging machine;
taking the encrypted value as a mirror image feature imgFeature;
integrating imgFeature into a boot. Img image when the packaging server makes the boot. Img image;
the host server starts an emulgator;
reading a mirror image feature imgFeature value of boot. Img;
decrypting the imgFeature through the private key of the packaging server to obtain a mirror image imgID and a CPU serial number of the packaging server;
checking the boot. Img mirror image by the mirror image imgID and the CPU serial number of the packaging server;
and if the verification is passed, loading boot. Img, and if the verification is not passed, not loading boot. Img.
Example 5
FIG. 4 is a schematic diagram of a system key file protection flow provided in one embodiment of the present application, as shown in FIG. 4, including:
the packaging server lists the system. Img image file and obtains the md5 values of the system/framework, system/priv-app and/system/bin critical directories and their files;
encrypting the md5 value by using a public key, and putting the encrypted md5 value into a feature. Rc in an init process, wherein the feature. Rc is integrated into a boot. Img mirror image;
the host server starts an emulgator;
the init process creates a system key process app_process;
the app_process obtains the md5 value of the key directory and directory file from the mirror image key file;
obtaining the md5 values of the key catalogue and the catalogue file, and checking and comparing the md5 values with the values of the md5 comparison table in the memory;
if the comparison is passed, generating a zygate process to start normally; if the comparison is not passed, the catalog or the key file of the corresponding system is tampered, normal starting is not carried out, reboot operation is carried out every 10s, the corresponding key log can be obtained in an emulgator, and then faults are judged.
Example 6
Fig. 5 is a schematic overall flow diagram of a novel anti-tampering method of a cloud mobile phone system according to an embodiment of the present application, as shown in fig. 5, and the novel anti-tampering method of a cloud mobile phone system includes:
starting an emulgator which stores key information of a boot. Img image so as to ensure that the boot. Img image cannot be tampered with;
the emulgator creates an kernel process idle process;
creating a first user space process init process;
the init process analyzes a boot. Img preset comparison target value and stores the comparison target value into a memory to serve as a reference value for comparison;
the init process creates an app_process, and the app_process acquires the md5 value of the key directory file and compares the md5 value with a reference value;
if the comparison is passed, generating a zygate process to be started normally; if the comparison is not passed, the catalog or the key file of the corresponding system is tampered, normal starting is not carried out, reboot operation is carried out every 10s, the corresponding key log can be obtained in an emulgator, and then faults are judged.
Example 7
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 7, an electronic device 500 is also provided in accordance with yet another aspect of the present application. The electronic device 500 may include one or more processors and one or more memories. Wherein the memory stores computer readable code that, when executed by the one or more processors, performs a method for tamper resistance of a cloud handset system image based on asymmetric encryption.
The method or system according to embodiments of the present application may also be implemented by means of the architecture of the electronic device shown in fig. 7. As shown in fig. 6, the electronic device 500 may include a bus 501, one or more CPUs 502, a Read Only Memory (ROM) 503, a Random Access Memory (RAM) 504, a communication port 505 connected to a network, an input/output component 506, a hard disk 507, and the like. A storage device in the electronic device 500, such as the ROM503 or the hard disk 507, may store a method for tamper resistance of a cloud mobile phone system image based on asymmetric encryption provided in the present application. A cloud mobile phone system mirror image tamper-proof method based on asymmetric encryption can comprise the following steps: the packaging server integrates the private key and the CPU serial number of the packaging server into an emulgator; the packaging server uses asymmetric encryption, the encrypted value is used as an image feature imgFeature, the imgFeature is integrated into a boot. Img image, and the boot. Img image is manufactured by the packaging server; starting an emulgator, reading an imgFeature value of a boot. Img, and checking a boot. Img mirror image; the packaging server acquires an md5 value of a key directory and a file thereof, encrypts the md5 value by using a public key and puts the encrypted md5 value into a feature. Rc in an init process, and the feature. Rc is integrated into a boot. Img mirror image; and analyzing and decrypting the feature.rc in the starting stage of the init process to obtain an md5 comparison table, loading the md5 comparison table into a memory, and obtaining the md5 value of the key directory and the file thereof by the app_process for verification comparison, wherein if the key directory and the file thereof pass the verification comparison, the zygote process is generated to be normally started, and if the key directory and the file thereof do not pass the verification comparison, the zygote process is not normally started. Further, the electronic device 500 may also include a user interface 508. Of course, the architecture shown in fig. 7 is merely exemplary, and one or more components of the electronic device shown in fig. 7 may be omitted as may be practical in implementing different devices.
Example 8
Fig. 8 is a schematic structural diagram of a computer readable storage medium according to an embodiment of the present application. As shown in fig. 8, is a computer-readable storage medium 600 according to one embodiment of the present application. Computer readable storage medium 600 has stored thereon computer readable instructions. When the computer readable instructions are executed by the processor, a method for tamper resistance of cloud mobile phone system mirror image based on asymmetric encryption according to the embodiment of the application described with reference to the above drawings can be performed. Storage medium 600 includes, but is not limited to, for example, volatile memory and/or nonvolatile memory. Volatile memory can include, for example, random Access Memory (RAM), cache memory (cache), and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like.
It should be appreciated that the methods and apparatus, devices, and apparatus of the present application may be implemented in a number of ways. For example, the methods and apparatus, devices of the present application may be implemented by software, hardware, firmware, or any combination of software, hardware, firmware. The above-described sequence of steps for the method is for illustration only, and the steps of the method of the present application are not limited to the sequence specifically described above unless specifically stated otherwise. Furthermore, in some embodiments, the present application may also be implemented as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present application. Thus, the present application also covers a recording medium storing a program for executing the method according to the present application.
In addition, in the foregoing technical solutions provided in the embodiments of the present application, parts consistent with implementation principles of corresponding technical solutions in the prior art are not described in detail, so that redundant descriptions are avoided.
The purpose, technical scheme and beneficial effects of the invention are further described in detail in the detailed description. It is to be understood that the above description is only of specific embodiments of the present invention and is not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. The method for preventing the mirror image of the cloud mobile phone system from being tampered based on asymmetric encryption is characterized by comprising the following steps of:
the packaging server integrates the private key and the CPU serial number of the packaging server into an emulgator;
the packaging server uses asymmetric encryption, the encrypted value is used as an image feature imgFeature, the imgFeature is integrated into a boot. Img image, and the boot. Img image is manufactured by the packaging server;
starting an emulgator, reading an imgFeature value of a boot. Img, and checking a boot. Img mirror image;
the packaging server acquires an md5 value of a key directory and a file thereof, encrypts the md5 value by using a public key and puts the encrypted md5 value into a feature. Rc in an init process, and the feature. Rc is integrated into a boot. Img mirror image;
and analyzing and decrypting the feature.rc in the starting stage of the init process to obtain an md5 comparison table, loading the md5 comparison table into a memory, and obtaining the md5 value of the key directory and the file thereof by the app_process for verification comparison, wherein if the key directory and the file thereof pass the verification comparison, the zygote process is generated to be normally started, and if the key directory and the file thereof do not pass the verification comparison, the zygote process is not normally started.
2. The method for preventing the image tampering of the cloud mobile phone system based on the asymmetric encryption according to claim 1, wherein the step of integrating the imgFeature into a boot. Img image by using the asymmetric encryption by the packaging server and using the encrypted value as an image feature imgFeature comprises the following steps:
defining a mirror imgID of a packaging server;
adding the CPU serial number of the packaging server when adding the mirror image imgID of the definition packaging server;
encrypting the CPU serial number of the mirror image imgID+packaging server by using the public key of the packaging machine;
taking the encrypted value as a mirror image feature imgFeature;
when the packaging server makes a boot. Img image, the imgFeature is integrated into the boot. Img image.
3. The method for tamper resistance of the cloud mobile phone system mirror image based on the asymmetric encryption according to claim 2, wherein the asymmetric encryption comprises:
asymmetric encryption is by a pair of keys, instead of one, comprising a public key and a private key, encryption being the public key and decryption being the private key.
4. The method for preventing the image of the cloud mobile phone system from being tampered based on the asymmetric encryption as claimed in claim 1, wherein the step of starting an emulgator, reading an imgFeature value of a boot. Img and checking the boot. Img image comprises the following steps of;
starting an emulgator;
reading a mirror image feature imgFeature value of boot. Img;
decrypting the imgFeature through the private key of the packaging server to obtain a mirror image imgID and a CPU serial number of the packaging server;
checking the boot. Img mirror image by the mirror image imgID and the CPU serial number of the packaging server;
and if the verification is passed, loading boot. Img, and if the verification is not passed, not loading boot. Img.
5. The method for preventing the mirror image of the cloud mobile phone system from being tampered based on the asymmetric encryption as claimed in claim 1, wherein the obtaining of the md5 value of the key directory and the file thereof by the packaging server comprises the following steps:
the system. Img image key files comprise/system/framework, system/priv-app and/system/bin key directories and files thereof, the image key files and emulgators are generated by a packaging server, and the running environment is in a host server.
6. The method for preventing image tampering of a cloud mobile phone system based on asymmetric encryption as claimed in claim 1, wherein the step of analyzing feature rc and decrypting to obtain md5 comparison table in the startup phase of the init process comprises the steps of:
the init process enters a starting stage;
analyzing a preset feature. Rc;
the init decrypts the feature rc by using the private key of the packaging server to obtain an md5 value, and the md5 value forms a comparison table;
and loading the md5 comparison table into a memory.
7. The method for preventing image tampering of a cloud mobile phone system based on asymmetric encryption as claimed in claim 1, wherein the app_process obtains an md5 value of a key directory and a file thereof, and performs a verification comparison, comprising:
the init process creates a system key process app_process;
the app_process obtains the md5 value of the key directory and directory file from the mirror image key file;
obtaining the md5 values of the key catalogue and the catalogue file, and checking and comparing the md5 values with the values of the md5 comparison table in the memory;
if the comparison is passed, generating a zygate process to start normally; if the comparison is not passed, the catalog or the key file of the corresponding system is tampered, normal starting is not carried out, reboot operation is carried out every 10s, the corresponding key log can be obtained in an emulgator, and then faults are judged.
8. A cloud handset system image tamper-resistant system based on asymmetric encryption, the system comprising:
the integration module is used for integrating the private key and the CPU serial number of the packaging server into an emulgator by the packaging server;
the asymmetric encryption module is used for the packaging server to use asymmetric encryption, the encrypted value is used as an image feature imgFeature, the imgFeature is integrated into a boot. Img image, and the boot. Img image is manufactured by the packaging server;
the boot. Img image verification module is used for starting an emulgator, reading an imgFeature value of the boot. Img and verifying the boot. Img image;
the feature.rc is integrated to a boot.img mirror module and is used for the packaging server to acquire an md5 value of a key directory and a file thereof, and the md5 value is encrypted by a public key and put into the feature.rc in an init process, and the feature.rc is integrated to the boot.img mirror;
and the verification module is used for analyzing the feature.rc and decrypting the feature.rc to obtain an md5 comparison table in the startup stage of the init process, loading the md5 comparison table into the memory, and obtaining the md5 value of the key directory and the file thereof by the app_process for verification comparison, wherein if the key directory and the file thereof pass the verification comparison, the zygote process is generated to be normally started, and if the key directory and the file thereof do not pass the verification comparison, the zygote process is not normally started.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the program to perform the steps in a method of tamper-proofing a cloud handset system image based on asymmetric encryption as claimed in any one of claims 1 to 7.
10. A readable storage medium, characterized in that it stores a computer program adapted to be loaded by a processor for performing a method of tamper-proofing of a cloud handset system image based on asymmetric encryption according to any of claims 1-7.
CN202311703085.5A 2023-12-12 2023-12-12 Asymmetric encryption-based cloud mobile phone system mirror image tamper-proof method Pending CN117857118A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311703085.5A CN117857118A (en) 2023-12-12 2023-12-12 Asymmetric encryption-based cloud mobile phone system mirror image tamper-proof method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311703085.5A CN117857118A (en) 2023-12-12 2023-12-12 Asymmetric encryption-based cloud mobile phone system mirror image tamper-proof method

Publications (1)

Publication Number Publication Date
CN117857118A true CN117857118A (en) 2024-04-09

Family

ID=90546630

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311703085.5A Pending CN117857118A (en) 2023-12-12 2023-12-12 Asymmetric encryption-based cloud mobile phone system mirror image tamper-proof method

Country Status (1)

Country Link
CN (1) CN117857118A (en)

Similar Documents

Publication Publication Date Title
US9081596B2 (en) Information processing device, virtual machine creation method, and application distribution system
KR101471589B1 (en) Method for Providing Security for Common Intermediate Language Program
CN107679393B (en) Android integrity verification method and device based on trusted execution environment
CN111143869B (en) Application package processing method and device, electronic equipment and storage medium
CN104298913B (en) A kind of general intelligent terminal safe starting method
US20050198507A1 (en) Import address table verification
US20070136728A1 (en) Computer readable medium in which program is stored, computer data signal embodied in carrier wave, information processing apparatus that executes program, and program control method for executing program
US10296728B2 (en) Method and system for providing cloud-based application security service
WO2022078366A1 (en) Application protection method and apparatus, device and medium
Alendal et al. Forensics acquisition—Analysis and circumvention of samsung secure boot enforced common criteria mode
CN113467784A (en) Application program processing method and device and computer readable storage medium
CN115248919A (en) Method and device for calling function interface, electronic equipment and storage medium
CN112613011B (en) USB flash disk system authentication method and device, electronic equipment and storage medium
CN110597496B (en) Method and device for acquiring bytecode file of application program
Choi et al. Large‐Scale Analysis of Remote Code Injection Attacks in Android Apps
CN111400771A (en) Target partition checking method and device, storage medium and computer equipment
CN114818012B (en) Linux file integrity measuring method based on white list
CN115688120A (en) Secure chip firmware importing method, secure chip and computer readable storage medium
CN117857118A (en) Asymmetric encryption-based cloud mobile phone system mirror image tamper-proof method
AT&T
US11061998B2 (en) Apparatus and method for providing security and apparatus and method for executing security to protect code of shared object
Kursawe et al. Flexible μTPMs through disembedding
Toll et al. The Caernarvon secure embedded operating system
KR101862382B1 (en) Method and device for managing application data in Android
CN107862202A (en) Software disables treating method and apparatus

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