Android privacy of user based on label is revealed black box detection method and system
Technical field
The present invention relates to the Android user privacy information and detect, relate in particular to a kind of label based on prior setting and whether detect the Android application program with outside method and the implementation system thereof that sends of certain class privacy of user data, belong to the mobile terminal safety field.
Background technology
At present, infotech has entered the mobile Internet epoch, and intelligent mobile terminal is owing to its portability, low cost and other advantages become the main terminal form that the user carries out the disparate networks activity day by day.Compare traditional mobile terminal, intelligent mobile terminal has more high performance processor, larger storage space, higher mobile network data transmittability and open third party's mobile terminal operating system, therefore can carry out a large number of services by intelligent mobile terminal and use, process more individual privacy data.These data, such as conversation and short message, the geographic position, the social networks account, account No., personal identification number, photograph video etc. is all linked up with direct or indirect mode and pecuniary benefit, thereby has attracted numerous assailants' notice, cause privacy to steal class Malware growth rate surprising, show according to the data in net Qin Fabu " whole world mobile phone safety message first half of the year in 2012 ", 17676 sections of mobile phone Malwares are arrived in killing in the first half of the year in 2012, compare to increase by 42% the second half year in 2011, infect 1,283 ten thousand ones of mobile phones, wherein privacy is stolen class and has been occupied 23.2% infection proportion.Be general protection user's privacy and property safety, promote the development of Intelligent mobile equipment, the research of intelligent mobile terminal privacy guard technology has become the common direction of paying close attention to of industrial community and academia.
The data stream Tracing Control is one of important directions of intelligent mobile terminal privacy protection, present data stream Tracing Control scheme is that responsive private data arranges the stain label, process the instruction operation of private data in the monitoring Android application program, set rule and guarantee that the stain label has effect spread in data handling procedure, thereby follow the tracks of the flow direction of private data, until data stream is left the various channels of mobile phone, prevent the unauthorized leakage of private data.Intel laboratory in 2010, the laboratory, Pennsylvania, and the Duke University developed jointly the TaintDroid system that is applied on the Android, and this system has utilized the DVM virtual machine architecture of Android, it carried out lightweight expand to carry out other stain of four levels and follow the trail of; The same year, the researchers such as Georgios have developed Paranoid Android system, utilize virtual machine to record and reproducing process, the Android running status is copied and passes to remote server, detect at server operation checking and killing virus and tainting, privacy compromise and other malicious intrusions behavior are detected.
What yet existing Android data stream was followed the trail of the employing of privacy detection scheme is that the white box of data stream is followed the trail of, need in virtual machine, intercept and capture in real time and analyze the operation of each bar instruction (such as the data plus and minus calculation, the distortion of data character string, data copy etc.), and in system, open up in addition a large amount of internal memories, the stain label of storage and propagation data source and intermediate data could be followed the tracks of private data stream, detects private data.This brings a large amount of performance consumption with regard to limited portable terminal to this kind mode to computational resource, affects the user and experiences.In the intelligent mobile terminal field, also there is not a kind of efficient private data stream method for tracing that need not the Real Time Monitoring instruction at present.Usually in the process of each application program operation, relate to command operating and often have hundred, thousand, ten thousand even the higher order of magnitude, adopt one by one the white box mode of instruction analysis trace data stream, will bring a large amount of time and memory cost.In addition, when many application programs outwards send user's private data, usually just simply read copy and transmission, seldom waste too much working time and computational resource and it is out of shape and encrypts.
Summary of the invention
The object of the invention is to make up a kind of Android privacy of user data black box tracking detection method and system based on label, the mode that adopts black box to follow the trail of fast, be that dissimilar user data arranges the type feature label in the source, application program to be detected is installed subsequently, and automatically trigger the application behavior, data all processing procedures in application program inside are considered as black box, will not interfere.Only in network information exit, the interception based data output detects the packet with label, judges which kind of private data is application program outwards send.
To achieve these goals, the present invention adopts following technical scheme---and the Android privacy of user based on label is revealed the black box detection method, comprises the steps:
1) adds in the described privacy of user data to Android user terminal establishment privacy of user data and with class label;
2) be no less than an application program to be detected and trigger described application program to be detected in the installation of Android user terminal;
3) detect the class label that carries in the outside packet that sends of described application program in the data outlet;
4) judge the private data classification according to the class label that carries in the described packet.
Further, described network egress is one or more in Internet or bluetooth or the short message.
Alternatively, described privacy of user data include but not limited to: contacts list, the application list, content of short message, SD Cavan notebook data, log information, GPS geographical location information, IMEI device number, bluetooth MAC Address, WiFi MAC Address, recently conversation.Perhaps can be defined by the user, can be a large class, such as contacts list, the part associated person information that also can select wherein forms a group.
Alternatively, described class label is set one or more coded strings according to the privacy of user data type.
Further, described application program to be detected is installed by manual or automated manner:
Described manual installation by the testing staff in one of Android terminal manual installation or a collection of application program to be measured and the good application program to be measured of opening installation one by one;
Described Auto-mounting installs by the existing robotization of Android system and/or the instrument of test is connected to the Android user terminal, one of Auto-mounting or a collection of application program to be measured, and the stochastic model user behavior triggers application function automatically.
Alternatively, described Android user terminal is the adjustable intelligent terminal: one or more of mobile phone, panel computer, TV.
Further, at described Internet, bluetooth, the short message network egress detects the outside packet that sends of described application program: the application program to be measured of installing on the Android system is by calling web socket interface function in the Android system core library, the packet that sends to outside Internet address.
Further, described at Internet, bluetooth, the method whether short message network egress detection packet carries label is:
1) is responsible for to Internet at the Android bottom, blueteeth network sends in the interface function of packet, and in the interface function of being responsible for sending SMS message to outside telephone number, by adding modularity function comparison bag sender's identification information, the packet that the application program in intercepting and capturing to be measured batch will send by interface function;
2) class label that takes out all types of user data is gathered, adopt character string comparison mode, detect packet and whether comprise some class label, if this packet character string comprises a class label in certain class user data class label set at least, then this packet has carried such user data.
Further, if packet carries such user data, then record testing result and comprise: according in packet content, entrained class label, class label under classification and Packet Generation time, send the application name of packet.
Further, use Android internal database instrument to create a testing result database and be used for storing described testing result.
The present invention also proposes a kind of Android privacy of user based on label and reveals the black box detection system, comprising:
Be used for the Android user terminal is created the privacy of user data and class label added to the device of described privacy of user data;
Be used at the Android user terminal device that is no less than an application program to be detected and triggers described application program to be detected being installed;
Be used at Internet, bluetooth, the short message network egress detects the device of the class label that carries in the outside packet that sends of described application program;
The class label that is used for carrying according to described packet is judged the private data classification, record result's device;
And type label database and testing result database.
Beneficial effect of the present invention
Method of the present invention is carried out the detection of based on data class label simply to data in the data stream exit, saved the time of a large amount of instruction analysis and tainting, intermediate variable when also having avoided as the variable in all instructions of application program and calculating, and register opens up special memory headroom for stain storage and propagates, and saved a large amount of memory costs.
Description of drawings
Fig. 1 is the inventive method is revealed the black box detection system based on the Android privacy of user of label configuration diagram.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, be understandable that, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those skilled in the art belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.In an embodiment of the present invention, detection method is as follows:
1) creates all types of user private data that carries class label at Android terminal test machine, and deposit class label in the class label database.
2) automatic or manual is installed application program to be measured, and automatic or manual triggers application behavior.
3) at Internet, bluetooth, the short message network egress detects in the outside packet that sends of application program to be measured whether carry label, carries which kind of label.
4) if detect and carry label, testing result is recorded in the testing result database of Android terminal test machine inside.
5) tester can be by checking the testing result database file, or read the testing result that software is checked single or multiple software under testing by the testing result database that is installed on the Android terminal test machine that uses in advance exploitation.
In an embodiment of the present invention, described Android terminal test machine is that operating system is the smart mobile phone of Android, flat board, the adjustable intelligent terminals such as TV.Described application program to be measured comprise on the domestic and international Android application market can for free or pay download towards the Android smart mobile phone, flat board, the application program of TV, and the Android application program that obtains from other channel.
In an embodiment of the present invention, described user data comprises contacts list, the application list, content of short message, SD Cavan notebook data, log information, GPS geographical location information.The granularity of described user data classification can by testing staff's self-defining, as content of short message being considered as a class of subscriber, also can be divided into it three class of subscribers: inbox short message, outbox short message, draft short message.
In an embodiment of the present invention, the described method that creates the privacy of user data carry class label at Android terminal test machine is, rely on Android system to carry application, use in Android market or independently developed Android is used, the user data content that editor carries class label deposits Android terminal test machine in.
Described class label refers to the distinctive one or more feature strings of user data of every kind, and its form can be special phrase, also can be insignificant character combination.
In another embodiment of the present invention, class label is the Contact contact application of utilizing Android system to carry, edit several associated person informations, unified add " #SecretContact# " behind its name of contact person, the contact phone unification is set to " 13333333333 ", { " #SecretContact# ", " 13333333333 " } are as the class label collection of contact data.
In an embodiment of the present invention, described manual installation application program to be measured and triggering application behavior, refer to by the staff one of manual installation or a collection of application program to be measured on Android terminal test machine that participate in detection, the good application program to be measured of opening installation one by one triggers its various application functions as far as possible all sidedly subsequently.
In an embodiment of the present invention, described Auto-mounting application program to be measured and triggering application behavior, refer to the instrument by the more existing robotization Installation And Tests of Android self, write the computer program script, connect Android terminal test machine, one of Auto-mounting or a collection of application program to be measured, and randomness simulation user behavior triggers its various application functions automatically.
In another embodiment of the present invention, the Internet that passes through that needs detection, bluetooth, the packet that the short message network egress outwards sends is the application program to be measured of installing on the Android system, call web socket interface function in the Android system core library, to outside Internet address, Bluetooth address, the data-message bag that telephone number sends.
In an embodiment of the present invention at Internet, bluetooth, the short message network egress detects the method whether packet carry label and is:
1) in Android bottom code file, is responsible for to Internet, blueteeth network sends in the interface function of packet, and in the interface function of being responsible for sending SMS message to outside telephone number, by adding modularity function comparison bag sender's identification information, the packet that the application program in intercepting and capturing to be measured batch will send by interface function;
2) class label that takes out all types of user data is gathered, adopt character string comparison mode, detect packet and whether comprise some class label, if this packet character string comprises a class label in certain class user data class label set at least, then this packet has carried such user data.
Described testing result database way of realization can for but the sqlite data base tool that is not limited only to use Android inside to carry be pre-created.
Be the configuration diagram that the present invention is based on the Android privacy of user leakage black box detection system of label as shown in Figure 1, wherein, this system comprises test front end and test rear end.The test front end is erected on the Android terminal test machine, comprises data outlet monitoring assembly, writes assembly with the testing result database, and type label database and two databases of testing result database.Data outlet monitoring assembly is responsible for tackling network and is sent packet outside, detects it and whether carries the type label that records in the type label database.The testing result database writes assembly, is responsible for writing in the testing result database detecting packet and the relevant information thereof of having carried label.
The test rear end is erected on the computing machine, connects Android terminal test machine by the USB debugging interface, comprises that mainly type label writes assembly, robotization installment and debugging script component, and testing result data reading assembly.Wherein the type label collection writes assembly, provide in the machine type label database of test terminal the in advance function of editor's type label collection of storage to the tester, the testing result database reads assembly, possess from the testing result database of terminal test machine and read, the ability of inquiry and displaying testing result.
The below will provide example of the present invention, and the technical scheme among the present invention is clearly and completely described, and be understandable that, described example only is the present invention's part example, rather than whole embodiment.Based on the embodiment among the present invention, those skilled in the art belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
It is contacts list at the test terminal machine that this example is described the tester, note, IMEI device number, the GPS position, SD Cavan part creates and carries the privacy of user data of class label, and detects a certain application program to the process of the leakage situation of the privacy of user data of these classifications, and is as shown in table 1:
1 tester starts the test terminal machine, and is connected to and can sends on the test computer of instruction it
2 testers are contacts list, note, and the IMEI device number, the GPS position, SD Cavan part creates the privacy of user data of carrying class label:
3 tester's call type labels write assembly the above-mentioned type label are write test terminal machine type label database.
4 tester's invoke script programs are installed a collection of appointment software under testing at the test terminal machine, and automatically trigger their various software actions.
5 in the software action trigger process, the oriented exterior I nternet address transmission data of this batch software bag, and then this packet will be blocked at bottom, detect the type label whether it carries prior setting.If carry, then record advances database.
After 6 automatic triggering shell scripts end were out of service, the tester can check the privacy leak case report of software under testing by start detection result database reading assembly on the test back-end computer.
Table 1