The present invention relates to the technical field of computer software technology, and in particular, is applicable to software maintenance. The invention method accomplishes file locking in the plurality of devices in the existing application by using program analysis and refactoring technology, so as to realizing locking sensitive data in the cloud.
With the development of smart phones, users are increasingly using mobile devices to conduct office work and business to improve life and work efficiency. At the same time, more and more user sensitive data is saved on mobile phones. However, these sensitive data still face a variety of threats, such as loss of mobile phones, data loss caused by damage, malicious applications, leakage of sensitive data caused by mobile phone viruses, and other issues. To address data loss and data leakage, data isolation protection technology based on cloud storage exemplified by network disk has been developed. However, for the current network disk, when users need to read and write these data, the data must first be downloaded from the cloud-side to the client-side. In other words, the user's data is stored in the client-side (i.e. mobile phone), and also stored in the cloud. The data synchronization between the cloud and the client is performed by the user. This technology can only solve the problem of mobile phone loss and data loss caused by phone damage, but has not solved the problem of data leakage from the client on which the data is stored. Because the data is still stored on the phone, even if the existing data isolation is protected, no matter how good data encryption and isolation mechanism is, malicious applications can launch various attacks which cannot be completely avoided.
In view of the above, there is a need for a method to support data cloud-client convergence. It should be implemented without a second development by the application developers, allowing existing applications to read and write cloud data transparently. Users protect sensitive data by storing them in the cloud, thereby solving problems of mobile phone loss and loss of sensitive data caused by phone damage; users directly read and write cloud data, so that data is not stored in the client, which solves the problem of leakage of user sensitive data.
The object of the present invention is to protect user sensitive data. The core idea is to designate, by the user, part of the application on the client side as trusted application, and to store sensitive data in the cloud. By conducting program analysis of and refactoring the trusted applications, these applications are enabled with the capability to access cloud-sensitive files. The invention method saves user sensitive data in the cloud to ensure that the sensitive data is not leaked. The method only refactors user's trusted applications, which guarantees sensitive data not to be leaked.
The technical implementation of adopted by the present invention is as follows:
A method for cloud locking sensitive data based on refactoring technology, including the steps of:
1) designating, by the user, part of an original application on the client side as a trusted application, and storing sensitive data in a cloud;
2) refactoring the designated trusted application; replacing the File Access API, which can call files, in the original application by a Cloud-Client Convergence File Access (CCCFA) API, which can access remote files in the cloud as well as local file in the client; and
3) allowing the application to access the sensitive data in the cloud by calling the CCCFA API.
Further, step 2) in the above describe method can includes
a) using keyword matching to find all file-related classes;
b) refactoring a first part of File Access API that can instantiate original file-related objects to the corresponding portion in the CCCFA API, which will instantiate wrapped file-related objects capable of manipulating cloud data; the refactoring process ensuring the consistency between the original file-related objects and the wrapped file-related objects in the inheritance chain, as well as consistency in operations and attributes; and
c) refactoring a second part of File Access API that uses the original file-related objects (callee); dividing a caller of the File Access API into two categories: the application layer objects and framework layer objects.
Further, the above step a) further includes first constructing a keyword database for the File Access API using framework layer library, and then finding all the classes in the application that use the File Access API based on the keyword database.
Further, in step c) above, when the caller is framework layer object, refactoring the callee to the original file-related object by invoking wrapped file-related object, and the framework layer object can directly manipulate the original file-related object.
Further, the refactoring process of step 2) causes the original file-related objects at runtime to be replaced with wrapped file-related objects that have cloud data manipulation capabilities; the wrapped file-related objects capable of cooperating with the cloud-based data agent running in the cloud, using the file system fusion mechanism to achieve integration of cloud-client data.
Further, the file system fusion mechanism can include file system fusion based on file mapping: first specifying a sub-file system in the cloud, which includes a set of files and directories; and then specifying rules for mapping cloud files to client files, and finally completing mapping cloud files to client files by the cloud data agents running on the client and in the cloud, thereby achieving integration of file systems on the client and in the cloud.
Further, the file system fusion mechanism can further include file metadata caching and synchronization based on timestamps, i.e., incremental synchronizing metadata of cloud file based on timestamps, which can improve overall system performance and availability.
The present invention proposes a method of supporting locking sensitive data in the cloud, which enables trusted mobile applications to directly access sensitive data stored in the cloud, without storing sensitive data on the client. The method does not require a second development by the application developers, the existing mobile applications can be automatically refactored with programs, allowing existing applications to read and write cloud data transparently. On one hand, the invention method incorporates advantages of the conventional technologies, and solves the problem of data loss caused by phone loss and phone damages by storing the sensitive data needed to be protected in the cloud. On the other hand, the method innovatively directly reads and writes sensitive data as cloud data; the sensitive data is not stored on the client side, which overcomes the problem of leakage of user sensitive data.
The foregoing objects, features and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with detailed implementation examples and the accompanying drawings.
The present invention provides a method for cloud locking sensitive data using program analysis and refactoring techniques. The method includes two parts: 1. a method to achieve sensitive data cloud locking using application refactoring; 2. file system fusion mechanism. The core idea is to modify and refactor binary byte code of the mobile application, replacing the application programming interface (API) associated with the file operation it uses, so that integrating a subfile system designated in the cloud and the file system of the client side. The refactored application can transparently read and write cloud data, thereby achieving the cloud locking of sensitive data. This method firstly programmatically analyzes the existing mobile application, identifies calculation logic related to the file operations, conducts corresponding refactors, and finally re-generates an application capable of directly reading and writing cloud data. The present invention is very beneficial to improving the security of mobile sensitive data, especially significant for users who want to protect sensitive data without storing the sensitive data on their mobile devices.
The specific technical solutions of the invention are as follows:
(1) a method to achieve sensitive data cloud locking using application refactoring
Existing mobile applications usually conduct file related operations using the File Access API provided by the framework layer. The present method uses program analysis and refactoring to replace the original File Access API for calling files in the original application by a Cloud-Client Convergence File Access (CCCFA) API associated with files after fusion of the cloud and the client side. The application can access sensitive data in the cloud by calling the CCCFA API, and read and write the sensitive data in the cloud.
Changes in the application runtime architecture before and after the refactoring are shown in
(a) using keyword matching to find all file-related classes
The application uses the File Access API provided by the existing framework layer to manipulate the user data. In order for the application to have the ability to manipulate cloud data, the present method first builds a keyword database for file-related operations in the existing framework layer, and then uses the keyword database to find all the classes in the application that use the File Access API. Finally, these classes undergo the following two types of refactoring.
(b) refactoring the API associated with instantiating file-related objects
As shown in
(c) refactoring the part of File Access API that calls the file-related objects
There are two kinds of objects that call file-related objects: one being application layer objects, and the other being the framework layer objects. For all application layer objects, the correctness of the program can be ensured by consistencies among the object inheritance chain, object operations and object attributes. The framework layer objects, on the other hand, also involve some attributes and operations in the system layer in addition to operations of calling the file-related objects. To ensure the correctness of the program, for some special framework layer objects, when calling file-related objects, the present method uses a special method of wrapped file-related objects to acquire the original file-related objects, to allow framework layer objects to directly manipulate the original file-related objects.
(2) file system fusion mechanism
The above-mentioned refactoring process causes file-related objects at runtime to be replaced with wrapped objects with cloud data manipulation capability. These objects work with the cloud data agent running in the cloud, and use file system fusion mechanism to achieve integration of cloud-client data. The file system fusion mechanism mainly includes the following two aspects:
(a) File system fusion based on file mapping
In order for the application to transparently operate cloud sensitive data, the present disclosure proposes an application level fusion mechanism for the file systems. First, the user specifies a sub-file system in the cloud, which is a collection of files and directories. Then the user specifies the rules for mapping cloud files to the terminal files. Finally, running the cloud data agents on the client and in the cloud to map cloud files to client files, to achieve the fusion of the two file systems.
(b) Timestamp-based file metadata caching and synchronization
The operations of an application to the file system can be divided into metadata operations and data operations. Metadata operations include reading file size, file name, copying files, moving files, deleting files, and so on. These operations are not related to the data of the file and do not need to transfer the data from the cloud to the client. Data operations include reading and writing file content. The present method enhances the overall system performance and availability by incrementally synchronizing the cloud metadata based on timestamps.
Implementation example:
This section gives the implementation of cloud-client data fusion in Android applications. Here is a section of code, for example, describes the refactoring process examples and refactored run-time architecture examples.
The code after refactoring is shown in
1. The object created by new File will be replaced by the new FlowFile object. At this point, the FlowFile is equipped with capability of operating cloud data objects.
2. Since the factory function Open will produce a file-related object ParcelFileDescriptor, the factory function open is refactored to PFDopen, the resulting object is FlowParcelFileDescriptor.
3. FlowFileDescriptor is generated by the getFileDescriptor of FlowParcelFileDescriptor. Moreover, two call-related objects are refactored: 1) since the FlowFile object is passed to the open function of the framework layer as an argument, the function getLocal( )is needed to acquire the original object File object of the FlowFile. 2) since the FlowFileDescriptor object is passed as a parameter to the function decodeFileDescriptor in the framework layer, fd is thus refactored into fd.getLocal to obtain the original FileDescriptor.
After the above refactoring, the runtime architecture of the refactored application becomes what is shown on the right side of
The above example is implemented using Davlik bytecode. The method can also be similarly refactored using different byte codes, intermediate codes, such as Java bytecode, and other intermediate representations under the Soot framework.
The foregoing embodiments are merely intended to illustrate the technical solutions of the present invention, and are not intended to be limiting thereof. One of ordinary skill in the art may modify or equivalently replace the technical solution of the present invention without departing from the spirit and scope of the invention. The scope of protection shall be governed by the claims.
Number | Date | Country | Kind |
---|---|---|---|
201510670320.2 | Oct 2015 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2016/073912 | 2/17/2016 | WO | 00 |