CN114637664A - Detection method and device for android application program properties - Google Patents
Detection method and device for android application program properties Download PDFInfo
- Publication number
- CN114637664A CN114637664A CN202111171245.7A CN202111171245A CN114637664A CN 114637664 A CN114637664 A CN 114637664A CN 202111171245 A CN202111171245 A CN 202111171245A CN 114637664 A CN114637664 A CN 114637664A
- Authority
- CN
- China
- Prior art keywords
- state
- probability
- formula
- operator
- application program
- 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
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 20
- 230000000694 effects Effects 0.000 claims abstract description 23
- 238000000034 method Methods 0.000 claims abstract description 22
- 238000010586 diagram Methods 0.000 claims abstract description 17
- 230000001149 cognitive effect Effects 0.000 claims abstract description 11
- 230000019771 cognition Effects 0.000 claims abstract description 3
- 230000005012 migration Effects 0.000 claims description 10
- 238000013508 migration Methods 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 7
- 230000009471 action Effects 0.000 claims description 6
- 230000003068 static effect Effects 0.000 claims description 6
- 230000006870 function Effects 0.000 claims description 5
- 238000009434 installation Methods 0.000 claims description 3
- 241000270730 Alligator mississippiensis Species 0.000 claims description 2
- 230000009191 jumping Effects 0.000 claims description 2
- 230000003993 interaction Effects 0.000 abstract description 2
- 206010000117 Abnormal behaviour Diseases 0.000 description 7
- 238000004458 analytical method Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3604—Software analysis for verifying properties of programs
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a method and a device for detecting properties of android application programs, which comprises the steps of constructing a state diagram based on Activity information and jump information among activities for each application program in different android equipment, and combining the state diagrams as intelligent agents to obtain a probabilistic multi-intelligent-agent system; depicting the target property as a probability cognition logic formula; and inputting the probability multi-agent system and the probability cognitive logic formula into a model detection tool to obtain a detection result of the target property. The method can prove that the property is satisfied or give an unsatisfied counterexample, can model a system under the condition that the same android application runs on different devices, and verifies the property related to interaction between the android applications running on different devices; the property of a system formed by android application programs running on a plurality of devices can be analyzed, and the method has positive significance for debugging the programs by developers, improving the usability of the programs and reducing program bugs.
Description
Technical Field
The invention belongs to the field of program analysis and safety, and particularly relates to a method and a device for detecting the property of an android application program.
Background
With the rapid development of smart phones, the android system is more and more widely used in daily life. However, as an open system, many developers develop applications that bring convenience and are accompanied by many abnormal behaviors such as bugs and hidden dangers. These abnormal behaviors may affect the use experience of the application program and may even cause privacy disclosure or property loss of the user. Therefore, how to ensure the correctness of the android application, i.e. eliminate the abnormal behavior, becomes an important research problem.
Most of the prior art is based on software test, and checks whether the behavior of the application program meets the requirements by executing a formulated test case. However, the software test is limited by the path coverage rate, and only can try to find the existing abnormal behavior, and the absence of the abnormal behavior cannot be proved. Model detection can solve this problem by traversing the reachable state space to prove that abnormal behavior is not present (or to find out what abnormal behavior is present).
At the present stage, the research on applying the model detection technology to the android application program is less, and how to establish the model of the android application program, how to depict the property to be verified and how to apply the model detection algorithm are not given.
Disclosure of Invention
The invention provides a method and a device for detecting properties of an android application program, which are characterized in that text information in Activities and jump information among Activities are extracted from an android application program installation package by using a static analysis method, then a model of a single application program is constructed, a plurality of models are combined together to construct a probabilistic multi-agent system, and finally a probabilistic cognitive logic model detection method is used to verify whether the android application program meets the required properties.
The technical content of the invention comprises:
a detection method for android application program properties comprises the following steps:
1) aiming at each application program in different android devices, constructing a state diagram based on Activity information and jump information between activities, and combining the state diagrams as intelligent agents to obtain a probabilistic multi-intelligent-agent system;
2) the target property is characterized as a probability cognition logic formula;
3) and inputting the probability multi-agent system and the probability cognitive logic formula into a model detection tool to obtain a detection result of the target property.
Further, the method for extracting Activity information and jump information between activities includes: and extracting from the application program installation package by using a static analysis tool.
Further, the static resolution tool comprises: gator or BACKSTAGE.
Further, the state diagram is constructed by:
1) taking the Activity information as a state and a vertex of a state diagram, wherein the first Activity information entered after the application program is opened is taken as an initial state;
2) constructing the edge of the state diagram by using the jumping information between Activities;
3) on the corresponding edge, marking an event triggering page migration as an action;
4) and setting corresponding atom propositions and state label functions.
Further, the elements of the state diagram further include: the probability of migration.
Further, the probabilistic cognitive logic formula comprises: a state formula and a path formula.
Further, the state formulaWhereinIs a state formula, p is an atom proposition,taking a non-operational character, taking a conjunction operational character,in the form of a probability operator, the probability operator,representing four relations of greater than, greater than or equal to, less than or equal to, and less than or equal to, d represents in [0,1 ]]A real number in between (c) and (d),is a knowledge-aware operator, i is an agent,for each person knowledge cognitive operator, G is a multi-agent set,for the distributed knowledge-aware operator, ψ is the path formula.
Further, the path is formulated asWhere X is the next operator, U is the up to operator,is a state formula.
A storage medium having stored therein a computer program, wherein the computer program is arranged to perform the above-mentioned method when executed.
An electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer to perform the method as described above.
Compared with the prior art, the invention has the following advantages:
1) using model detection techniques, it can be demonstrated that properties are satisfied or give an unsatisfied counter-example.
2) The method can model a system under the condition that the same android application runs on different devices, and verify the properties related to interaction between the android applications running on different devices;
3) the property of a system formed by android application programs running on a plurality of devices can be analyzed, and the method has positive significance for debugging the programs by developers, improving the usability of the programs and reducing program bugs.
Drawings
FIG. 1 is a system architecture diagram of the present invention.
Fig. 2 is a flow chart of the present invention.
FIG. 3 is a single application model of an embodiment of the present invention.
Detailed Description
The invention will be further described by way of example with reference to the accompanying drawings.
According to the detection method, a model is built from the android application installation package file, the property to be verified and an application model detection algorithm are described by using a logic formula, and a path which does not meet the property in the android application can be found out or a conclusion that the property is met can be given by applying the set of method.
1. System components
The system architecture of the invention is shown in figure 1 and mainly comprises 4 modules, namely an android application program analysis tool module, a model construction module, a property input module and a model detection module.
2. Workflow process
The working flow of the invention is shown in figure 2:
(1) first, data including jump information between Activity information and Activity is extracted from the android application installation package through a static parsing tool, such as gate (http:// web. cs. o. hio-state. edu/presto/software/gate /), BACKSTAGE (https:// www.st.cs.uni-sarland. de/uploading/BACKSTAGE /), and the like.
(2) These data are then used to build a state diagram for the individual application. The state diagram for a single application includes the following elements: a limited set of states, an initial state, a limited set of actions, a state migration function, a limited set of atomic propositions, and a state tagging function. The specific construction method comprises the following steps: taking Activity as a state; taking the first Activity entered after the application program is opened as an initial state; taking an event (such as clicking a button and the like) which can trigger page migration on a page as an action; taking the jump between activities as migration, wherein the migration related to network connection needs to introduce probability factors because network transmission has certain failure probability (for example, when a user clicks a login button on a login page, an application enters the next page with the probability of 0.99, and stays on the login page with the probability of 0.01); the atomic proposition and state label function can give different definitions according to different application scenarios.
Figure 3 gives an example of a simple single application model.
(3) Then, each single application program is regarded as an agent, and a plurality of application program clients running on different devices are combined into a probabilistic multi-agent system, namely, the global state is the combination of each local state, the global action is the combination of the local actions, and the global migration is the combination of the local migration. Each agent can only get local information, i.e. only knows in which state it is, and not in which state the other agents are.
(4) The properties in the present invention are characterized using probabilistic cognitive logic. The logic integrates probabilistic computational tree logic and cognitive logic. The logic includes a state formula and a path formula, wherein the state formula
Wherein, the meaning of each element of the state formula is as follows:
(ii) atomic propositions p, e.g. "variable s has a value of 3";
② taking non-operational charactersOrder toRepresents a formula of states, thenTo representThe method is not established;
③ to get an operator ^ to makeAndrespectively represent two state formulas, thenTo representAndsimultaneously, the two steps are carried out;
probability operatorWhereinRepresenting four relations of greater than, greater than or equal to, less than or equal to, and less than or equal to, d represents in [0,1 ]]Real number in between. Let psi denote a path formula, thenIndicates that the probability of psi being satisfiedThe relationship (c) in (c).
Fifth cognitive operator, including Knowledge (Knowledge)Knowledge of each person (Everyone's Knowledge)Distributed Knowledge (Distributed Knowledge)Where i represents an agent (which in the present invention may be a user, or a client), and G is a multi-agent set. Order toRepresents a formula of states, thenIndicating a state equivalent to the current state from the user i's perspective,are all true, i.e. user i knowsThis is true. Accordingly, the number of the first and second electrodes,all users in the representation G knowIt is true that the first and second sensors,the user in the representation G can know if the user can share the informationThis is true.
The path is formulated as
Wherein, the meaning of each element of the state formula is as follows:
next (Next) operator X, orderRepresents a formula of states, thenIt is shown that after the next step,if true;
② Up to (Until) operator U, orderAndrespectively represent two state formulas, thenTo representWill be established after a future step, beforeThis is always true.
By combining the above operators, we can express many properties, such as "user _ count>=2∧KBobsAlice"the number of users is greater than 2 and the user Bob knows that Alice has logged in" in the entire system.
(5) And finally, inputting the probabilistic multi-agent system obtained in the step (3) and the property formula obtained in the step (4) into a probabilistic cognitive logic model detection tool (https:// github. com/fuchen1991/epmc-petl) for model detection so as to verify whether the property is met.
The above embodiments are only intended to illustrate the technical solution of the present invention and not to limit the same, and a person skilled in the art can modify the technical solution of the present invention or substitute the same without departing from the spirit and scope of the present invention, and the scope of the present invention should be determined by the claims.
Claims (10)
1. A detection method for android application program properties comprises the following steps:
1) aiming at each application program in different android devices, constructing a state diagram based on Activity information and jump information between activities, and combining the state diagrams as intelligent agents to obtain a probabilistic multi-intelligent-agent system;
2) depicting the target property as a probability cognition logic formula;
3) and inputting the probability multi-agent system and the probability cognitive logic formula into a model detection tool to obtain a detection result of the target property.
2. The method of claim 1, wherein extracting Activity information and jump between activities information comprises: extracted from the application installation package using a static parsing tool.
3. The method of claim 2, wherein the static resolution tool comprises: gator or BACKSTAGE.
4. The method of claim 1, wherein the state diagram is constructed by:
1) taking the Activity information as a state and a vertex of a state diagram, wherein the first Activity information entered after the application program is opened is taken as an initial state;
2) constructing the edge of the state diagram by using the jumping information between Activities;
3) on the corresponding edge, marking an event triggering page migration as an action;
4) and setting corresponding atom propositions and state label functions.
5. The method of claim 4, wherein the elements of the state diagram further comprise: the probability of migration.
6. The method of claim 1, wherein the probabilistic cognitive logic formula comprises: a state formula and a path formula.
7. The method of claim 6, wherein the state formula Wherein p is an atomic proposition,taking a non-operational character, taking a combined operational character,in the form of a probability operator, the probability operator,representing four relations of greater than, greater than or equal to, less than or equal to, and less than or equal to, d represents in [0,1 ]]The real number in between (a) and (b),is a knowledge-aware operator, i is an agent,for each person knowledge-aware operational characters, g is a multi-agent set,for the distributed knowledge-aware operator, ψ is the path formula.
9. A storage medium having a computer program stored thereon, wherein the computer program is arranged to, when run, perform the method of any of claims 1-8.
10. An electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the method according to any of claims 1-8.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011486579 | 2020-12-16 | ||
CN2020114865799 | 2020-12-16 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114637664A true CN114637664A (en) | 2022-06-17 |
Family
ID=81946763
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111171245.7A Pending CN114637664A (en) | 2020-12-16 | 2021-10-08 | Detection method and device for android application program properties |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114637664A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115496017A (en) * | 2022-09-06 | 2022-12-20 | 中国科学院软件研究所 | Similar SVA (singular value analysis) extension and formal verification method for Chisel assertion language |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
AU2013251256A1 (en) * | 2007-01-26 | 2013-11-21 | Accenture Global Services Limited | Virtual information technology assistant |
CN108846282A (en) * | 2018-06-04 | 2018-11-20 | 西安电子科技大学 | Android application program permission based on the analysis of static stain reveals leak detection method |
-
2021
- 2021-10-08 CN CN202111171245.7A patent/CN114637664A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
AU2013251256A1 (en) * | 2007-01-26 | 2013-11-21 | Accenture Global Services Limited | Virtual information technology assistant |
CN108846282A (en) * | 2018-06-04 | 2018-11-20 | 西安电子科技大学 | Android application program permission based on the analysis of static stain reveals leak detection method |
Non-Patent Citations (3)
Title |
---|
于鹏洋;黄俊飞;宫云战;: "Android应用隐私泄露静态代码分析", 软件, no. 10, 15 October 2012 (2012-10-15) * |
柳毅;麻志毅;何啸;邵维忠;: "一种从UML模型到可靠性分析模型的转换方法", 软件学报, no. 02, 15 February 2010 (2010-02-15) * |
谷林涛;徐立华;: "基于GUI的Android移动软件性能测试", 计算机系统应用, no. 08, 15 August 2018 (2018-08-15) * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115496017A (en) * | 2022-09-06 | 2022-12-20 | 中国科学院软件研究所 | Similar SVA (singular value analysis) extension and formal verification method for Chisel assertion language |
CN115496017B (en) * | 2022-09-06 | 2023-04-11 | 中国科学院软件研究所 | SVA-like extension and formal verification method for Chisel assertion language |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20100229230A1 (en) | System and method for securing computer system against unauthorized access | |
Alalfi et al. | Modelling methods for web application verification and testing: state of the art | |
Zhang et al. | Monitoring of probabilistic timed property sequence charts | |
CN113158189B (en) | Method, device, equipment and medium for generating malicious software analysis report | |
CN115270131A (en) | Java anti-serialization vulnerability detection method and system | |
Cimatti et al. | Combining MILS with contract-based design for safety and security requirements | |
CN113590454A (en) | Test method, test device, computer equipment and storage medium | |
Kriaa et al. | A new safety and security risk analysis framework for industrial control systems | |
Reger | Automata based monitoring and mining of execution traces | |
CN114637664A (en) | Detection method and device for android application program properties | |
Waly et al. | A complete framework for kernel trace analysis | |
Riley et al. | Evaluating verification awareness as a method for assessing adaptation risk | |
CN111190813B (en) | Android application network behavior information extraction system and method based on automatic testing | |
CN109165509A (en) | The software method of credible measurement, equipment, system and storage medium in real time | |
Schulz et al. | Continuous Secure Software Development and Analysis. | |
Zhao et al. | A systematic review of fuzzing | |
Kayes et al. | The network of faults: a complex network approach to prioritize test cases for regression testing | |
Liu | Software vulnerability mining techniques based on data fusion and reverse engineering | |
Abuserrieh et al. | A Survey of Analysis Methods for Security and Safety verification in IoT Systems | |
Jiang et al. | An exploitability analysis technique for binary vulnerability based on automatic exception suppression | |
Grahl | Deductive verification of concurrent programs and its application to secure information flow for Java | |
CN111859387A (en) | Automatic construction method for Android platform software vulnerability model | |
Tao et al. | A reinforcement learning-based approach to testing GUI of moblie applications | |
Alalfi et al. | Modeling methods for web application verification and testing: State of the art | |
CN117687890B (en) | Abnormal operation identification method, system, medium and equipment based on operation log |
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 |