CN113672919A - Risk detection method, device and equipment based on small program dynamic and static analysis - Google Patents
Risk detection method, device and equipment based on small program dynamic and static analysis Download PDFInfo
- Publication number
- CN113672919A CN113672919A CN202110895716.2A CN202110895716A CN113672919A CN 113672919 A CN113672919 A CN 113672919A CN 202110895716 A CN202110895716 A CN 202110895716A CN 113672919 A CN113672919 A CN 113672919A
- Authority
- CN
- China
- Prior art keywords
- risk
- applet
- strategy
- determining
- privacy
- 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 179
- 238000004458 analytical method Methods 0.000 title claims abstract description 78
- 230000003068 static effect Effects 0.000 title claims abstract description 78
- 238000013475 authorization Methods 0.000 claims description 85
- 238000000034 method Methods 0.000 claims description 54
- 230000006870 function Effects 0.000 claims description 44
- 238000012545 processing Methods 0.000 claims description 10
- 230000003044 adaptive effect Effects 0.000 claims description 8
- 238000012015 optical character recognition Methods 0.000 claims description 5
- 125000004122 cyclic group Chemical group 0.000 claims 1
- 230000008569 process Effects 0.000 description 24
- 238000010586 diagram Methods 0.000 description 15
- 230000006872 improvement Effects 0.000 description 9
- 238000004590 computer program Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 5
- 230000014509 gene expression Effects 0.000 description 5
- 238000004088 simulation Methods 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000000750 progressive effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 229920001296 polysiloxane Polymers 0.000 description 1
- 238000012216 screening Methods 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
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/55—Detecting local intrusion or implementing counter-measures
- G06F21/56—Computer malware detection or handling, e.g. anti-virus arrangements
- G06F21/562—Static detection
- G06F21/563—Static detection by source code analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/55—Detecting local intrusion or implementing counter-measures
- G06F21/56—Computer malware detection or handling, e.g. anti-virus arrangements
- G06F21/566—Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/57—Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
- G06F21/577—Assessing vulnerabilities and evaluating computer system security
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
- G06F21/6245—Protecting personal data, e.g. for financial or medical purposes
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Virology (AREA)
- Bioethics (AREA)
- Computing Systems (AREA)
- Medical Informatics (AREA)
- Databases & Information Systems (AREA)
- Storage Device Security (AREA)
Abstract
The embodiment of the specification discloses a risk detection method, a risk detection device and risk detection equipment based on small program dynamic and static analysis. The scheme comprises the following steps: constructing a corresponding code structure analysis database based on static codes of the small programs; determining an implementation detail query strategy suitable for the privacy risk scene for the applet according to the preset privacy risk scene; according to the implementation detail query strategy, querying is carried out on a code structure analysis database, and dynamic detection auxiliary data reflecting risk suspicion are obtained according to the query result; determining a dynamic detection policy corresponding to the dynamic detection assistance data; and simulating the user interface operation of the executive small program according to the dynamic detection strategy, and judging whether the small program has privacy risks or not according to the operation result.
Description
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a risk detection method, device and apparatus based on small program dynamic and static analysis.
Background
With the development of the mobile internet, the super application and the small program become a new development and exploration mode in the mobile internet era.
Currently, a third-party applet is loaded in a super application to provide a service entrance for the third-party applet for a user, so that the user can obtain user authorization for the third-party applet through the super application to realize convenient access to the third-party applet. But in the authorization process, a large amount of user privacy information is involved.
Based on this, there is a need for a more secure and reliable risk detection scheme for third party applets.
Disclosure of Invention
One or more embodiments of the present disclosure provide a risk detection method, apparatus, device and storage medium based on applet dynamic and static analysis, so as to solve the following technical problems: there is a need for a more secure and reliable risk detection scheme for third party applets.
To solve the above technical problem, one or more embodiments of the present specification are implemented as follows:
one or more embodiments of the present specification provide a risk detection method based on applet dynamic and static analysis, including:
constructing a corresponding code structure analysis database based on static codes of the small programs;
determining an implementation detail query strategy adaptive to a preset privacy risk scene for the small program according to the preset privacy risk scene;
inquiring in the code structure analysis database according to the implementation detail inquiry strategy, and obtaining dynamic detection auxiliary data reflecting risk suspicion according to the inquiry result;
determining a dynamic detection policy corresponding to the dynamic detection assistance data;
and simulating and executing the user interface operation of the applet according to the dynamic detection strategy, and judging whether the applet has privacy risks according to the operation result.
One or more embodiments of this description provide a risk detection device based on little program dynamic and static analysis, include:
the building module is used for building a corresponding code structure analysis database based on the static code of the small program;
the inquiry strategy determining module is used for determining an implementation detail inquiry strategy suitable for the privacy risk scene for the small program according to a preset privacy risk scene;
the query module is used for querying the code structure analysis database according to the implementation detail query strategy and obtaining dynamic detection auxiliary data reflecting the suspected risk according to the query result;
a detection policy determination module that determines a dynamic detection policy corresponding to the dynamic detection assistance data;
and the judging module simulates and executes the user interface operation of the applet according to the dynamic detection strategy and judges whether the applet has privacy risks according to the operation result.
One or more embodiments of the present specification provide a risk detection device based on applet dynamic and static analysis, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
constructing a corresponding code structure analysis database based on static codes of the small programs;
determining an implementation detail query strategy adaptive to a preset privacy risk scene for the small program according to the preset privacy risk scene;
inquiring in the code structure analysis database according to the implementation detail inquiry strategy, and obtaining dynamic detection auxiliary data reflecting risk suspicion according to the inquiry result;
determining a dynamic detection policy corresponding to the dynamic detection assistance data;
and simulating and executing the user interface operation of the applet according to the dynamic detection strategy, and judging whether the applet has privacy risks according to the operation result.
One or more embodiments of the present specification provide a non-transitory computer storage medium storing computer-executable instructions configured to:
constructing a corresponding code structure analysis database based on static codes of the small programs;
determining an implementation detail query strategy adaptive to a preset privacy risk scene for the small program according to the preset privacy risk scene;
inquiring in the code structure analysis database according to the implementation detail inquiry strategy, and obtaining dynamic detection auxiliary data reflecting risk suspicion according to the inquiry result;
determining a dynamic detection policy corresponding to the dynamic detection assistance data;
and simulating and executing the user interface operation of the applet according to the dynamic detection strategy, and judging whether the applet has privacy risks according to the operation result.
At least one technical scheme adopted by one or more embodiments of the specification can achieve the following beneficial effects:
and then according to a specific dynamic detection strategy and the obtained dynamic auxiliary detection data, performing dynamic risk detection of simulating and executing user interface operation on the applet from an actual operation layer so as to determine whether the applet has privacy risk. The method tightly combines two dimensions of static detection and dynamic detection together, the result of the static detection is used as the input and the assistance of the dynamic detection, the function call data used in the static detection process is convenient to be used in the subsequent dynamic detection process, the problems that a code link is incomplete in depiction and is difficult to accurately confirm part of privacy risk scenes, a deep page cannot be touched and function call cannot be combed by adopting the static detection, and omission easily occurs due to manual detection can be solved, so that the risk of static codes of small programs can be accurately screened, the risk position can be positioned, the efficiency and the accuracy of the risk detection can be improved, and the data security can be enhanced. In addition, by constructing a code structure analysis database for the static codes of the small program, the use condition and the influence surface of a specific interface in the small program can be rapidly checked when the follow-up needs appear, so that the checking time is shortened, the checking efficiency is improved,
drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
Fig. 1 is a schematic flowchart of a risk detection method based on applet dynamic and static analysis according to one or more embodiments of the present disclosure;
fig. 2 is a schematic diagram of risk detection based on dynamic and static analysis of an applet in an application scenario according to one or more embodiments of the present disclosure;
FIG. 3 is a schematic diagram of a static analysis in an application scenario provided by one or more embodiments of the present disclosure;
fig. 4 is a schematic structural diagram of a risk detection device based on applet dynamic and static analysis according to one or more embodiments of the present disclosure;
fig. 5 is a schematic structural diagram of a risk detection device based on applet dynamic and static analysis according to one or more embodiments of the present disclosure.
Detailed Description
The embodiment of the specification provides a risk detection method, a risk detection device, risk detection equipment and a storage medium based on small program dynamic and static analysis.
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any inventive step based on the embodiments of the present disclosure, shall fall within the scope of protection of the present application.
In one or more embodiments of the present description, the presence or absence of a risk in an applet is determined by a combination of static and dynamic detection. Specifically, a corresponding code structure analysis database is constructed according to the static code of the applet. And determining an implementation detail query strategy suitable for the privacy risk scene aiming at the preset privacy risk scene to be detected, so as to query in a code structure analysis database according to the implementation detail query strategy, determine dynamic detection auxiliary data with risk suspicion in the applet and complete a static detection process. And then, determining a dynamic detection strategy corresponding to the dynamic detection auxiliary data, and simulating and executing corresponding user interface operation in the applet according to the dynamic detection strategy so as to judge whether the applet has privacy risks according to the operation result. The following is a detailed description based on such a concept.
Fig. 1 is a schematic flowchart of a risk detection method based on applet dynamic and static analysis according to one or more embodiments of the present disclosure. The method can be applied to different business fields, such as the field of internet financial business, the field of electric business, the field of instant messaging business, the field of game business, the field of official business and the like. The process may be performed by computing devices in the respective domains, with certain input parameters or intermediate results in the process allowing for manual intervention adjustments to help improve accuracy.
The process in fig. 1 may include the following steps:
s102: and constructing a corresponding code structure analysis database based on the static code of the small program.
Static code (i.e., source code) of the applet contains information such as various variables, expressions, functions, methods, parameters, and the like, and also contains information such as call relations between functions, data flows, and the like. The code structure analysis database constructed according to the static code of the applet can be used for the subsequent analysis of the static code control and data flow of the applet.
Further, in the process of building the Code structure analysis database, a Code analysis engine (Code QL) may be used to build the Code structure analysis database. QL is a query language that can be used to analyze code, find control flow and other information in the code.
S104: and determining an implementation detail query strategy adaptive to the privacy risk scene for the small program according to the preset privacy risk scene.
For the problem that the applet has privacy risks, the corresponding privacy risk scene can be determined in advance according to various privacy risks. Such as leakage of user sensitive information, enforcement of user authorization, requirement of user over-authorization, repeated authorization, pop-up window disturbance, etc.
In the code level, code links which need to be executed and correspond to different privacy risk scenes are different, wherein the functions, calling relations and the like of the application are different. According to different privacy risk scenes, implementation detail query strategies corresponding to the privacy risk scenes can be determined. The implementation detail query strategy reflects a code link corresponding to a code level privacy risk scene and is used for querying risks possibly existing in static codes of the small programs.
When risk detection is carried out on a designated applet, according to a preset privacy risk scene, an implementation detail query strategy suitable for the preset privacy risk scene can be determined from a plurality of implementation detail query strategies, and subsequent static detection of a code layer is facilitated.
S106: and inquiring the code structure analysis database according to the implementation detail inquiry strategy, and obtaining dynamic detection auxiliary data reflecting the risk suspicion according to the inquiry result.
If the code structure analysis database constructed in step S102 corresponds to the static code of the applet, the applet can be queried in the code structure analysis database when performing static detection, and it is determined whether data matching the implementation details query policy exists in the code structure analysis database.
Because the characteristics of the privacy risk scene can be reflected by implementing the detail query strategy, the data matched with the detail query strategy obtained by implementing the detail query strategy should also have the characteristics same as the preset privacy risk scene, which means that the data obtained by querying has a risk suspicion, and can be used as dynamic detection auxiliary data to facilitate subsequent risk confirmation through dynamic detection.
In steps S102 to S106, static risk detection is performed on the applet from the code layer side, and dynamic detection auxiliary data with suspected risk is obtained as a static detection result.
S108: determining a dynamic detection policy corresponding to the dynamic detection assistance data.
The dynamic detection assistance data may include a part of functions, call relations, and the like in the static code of the applet, and based on this, the user interface operations corresponding to different dynamic detection assistance data are also different. Therefore, when dynamic risk detection is performed on the applet, a dynamic detection strategy corresponding to dynamic detection auxiliary data needs to be determined, so that targeted dynamic risk detection is performed on the applet according to the dynamic detection auxiliary data obtained by static detection.
The dynamic detection strategy corresponds to the dynamic detection auxiliary data and is used for determining user interface operation to be executed when the dynamic detection is carried out on the small program so as to realize the test of the small program.
S110: and simulating and executing the user interface operation of the applet according to the dynamic detection strategy, and judging whether the applet has privacy risks according to the operation result.
And simulating and executing the user interface operation of the small program according to the dynamic detection strategy and the dynamic detection auxiliary data so as to realize dynamic risk detection of the small program. The dynamic detection strategy specifically includes various user interface operation actions, such as clicking, character recognition, image recognition, and the like.
In addition, the dynamic detection strategy also comprises a judgment condition corresponding to the specific user interface operation, and the judgment condition is used for judging whether the small program has privacy risks. The judgment condition is consistent with the privacy risk scene, and the privacy risk problem reflected by the privacy risk scene is met. For example, the privacy risk scenario is over-authorization, and the determination condition is that the content to be authorized is identified and determined to exceed the necessary authorization range of the applet; the privacy risk scene is repeated authorization, and the judgment condition is that an authorization request occurs after the small program is identified and determined to be authorized; and so on.
And the dynamic detection strategy compares the judgment condition with the operation result obtained by the simulation execution, determines that the operation result obtained by the small program after the simulation execution meets the judgment condition, judges that the small program has privacy risk, and determines that the operation result does not meet the judgment condition, so that the small program does not have privacy risk.
In one or more embodiments of the present specification, static risk detection is performed on the applet at a code layer to obtain dynamic auxiliary detection data with suspected risk, and then dynamic risk detection for performing a simulation execution user interface operation on the applet from an actual operation layer according to a specific dynamic detection policy and the obtained dynamic auxiliary detection data to determine whether the applet has a privacy risk. The method tightly combines two dimensions of static detection and dynamic detection together, the result of the static detection is used as the input and the assistance of the dynamic detection, the function call data used in the static detection process is convenient to be used in the subsequent dynamic detection process, the problems that a code link is incomplete in depiction and is difficult to accurately confirm part of privacy risk scenes, a deep page cannot be touched and function call cannot be combed by adopting the static detection, and omission easily occurs due to manual detection can be solved, so that the risk of static codes of small programs can be accurately screened, the risk position can be positioned, the efficiency and the accuracy of the risk detection can be improved, and the data security can be enhanced. In addition, by constructing a code structure analysis database for the static codes of the small program, the use condition and the influence surface of a specific interface in the small program can be rapidly checked when the follow-up needs appear, so that the checking time is shortened, the checking efficiency is improved,
based on the process of fig. 1, some specific embodiments and embodiments of the process are also provided in the present specification, and the description is continued below.
In one or more embodiments of the present specification, before an applet is loaded into a super application (hereinafter, referred to as an application), a risk detection is performed on the applet (that is, before the applet is online), and when it is determined that there is no privacy risk in the applet, the applet is introduced into the application, so as to provide a safer and comprehensive service for a user. It should be noted that, unlike manual detection, both static detection and dynamic detection in this scheme are automated detection, and by combining the two, the risk that may exist in the applet can be rapidly identified.
Further, when a code structure analysis database corresponding to the applet is constructed, an Abstract Syntax Tree (AST), a Control Flow Graph (CFG) representing a Flow relationship between nodes, and a Data Flow Graph (DFG) representing a Data Flow inside a function are generated based on a static code of the applet to construct a code Control link database and a Data Flow link database. And then, determining a corresponding code structure analysis database according to the code control link database and the data flow link database. A code control link and a data flow link are constructed through an abstract syntax tree, a control flow graph and a data flow graph, so that the analysis of the code structure of the small program is facilitated, the calling relation among functions is smoothed, the subsequent analysis of a database through the constructed data structure is facilitated, and the static risk detection and query of the small program are performed.
The abstract syntax tree abstracts the JavaScript source code into basic information including variables, expressions, methods, parameters, attributes, etc., to be represented in a progressive tree structure. The Control Flow graph comprises statements, expressions and Control Flow nodes, and the Flow relation among the nodes can be inquired through the Control Flow graph. The Data Flow graph can depict variable transmission and Data Flow inside the function aiming at a Data Flow Node of the Data Flow Node.
In one or more embodiments of the present disclosure, the privacy risk scenario for risk detection and the implementation of the detail query policy need to be designed in advance. In a pre-designed process, a plurality of privacy risk scenarios that can be risk detected are determined. And determining corresponding general risk characteristics according to a preset privacy risk scene. And then abstracting the general risk characteristics into corresponding risk links, and determining a corresponding implementation detail query strategy according to the risk links. Wherein the risk link represents a code link corresponding to the privacy risk scenario that can be characterized by code structure analysis.
Specifically, when the corresponding implementation detail query strategy is determined according to the risk link, the Data Flow of the Node can be called according to the Data Flow, and the Invoke Node establishes the call relation among all functions. Based on the code link depicted in the risk link, the functions and the call relations contained in the risk link can be determined according to the established call relations, and a corresponding implementation detail query strategy is formed.
When risk detection is carried out on a specified small program in the following, an implementation detail query strategy suitable for the privacy risk scene can be determined from predetermined implementation detail query strategies according to the preset privacy risk scene to be detected, and static risk detection and query are carried out.
Further, after the implementation detail query strategy is determined, according to the function and the call relation contained in the risk link corresponding to the implementation detail query strategy, query is performed in a code structure analysis database corresponding to the applet, and whether a matched call relation exists is determined. If the matching call relation exists, the fact that the data with the risk suspicion exists in the applet static code is indicated, further detection and confirmation are needed, and if the matching call relation does not exist, the fact that the data with the risk suspicion does not exist in the applet static code is indicated. The matched call relation should indicate that the function and the call relation contained in the whole risk link are matched, and the matching is basically complete matching.
Furthermore, the result obtained by implementing the detail query strategy query includes risk points with risk suspicion in the applet and the corresponding applet page. And carrying out structural processing on the determined risk points and the small program pages to obtain dynamic detection auxiliary data. The risk points comprise information such as risk functions and code positions in static codes of the small programs and can reflect privacy risk problems of the code layers of the small programs, and the small program pages comprise display pages, popup windows and the like and can reflect privacy risk problems of the small programs in user operation layers.
By setting the risk points and the applet pages as dynamic detection auxiliary data, the machine can not only make clear the possible risks in the applet static codes from the code level, but also reflect the possible risks of the applet from the user operation level, thereby facilitating the subsequent dynamic detection of the applet static codes.
In one or more embodiments of the present description, when dynamically detecting an applet, an applet page is invoked by a true machine to open, an authorization request from an application in the applet page is responded, a button control related to the authorization request is identified according to a determined dynamic detection policy, and an accepted or rejected user interface operation is simulated for the button control. And identifying the operation result according to the dynamic detection strategy, and judging whether the applet has privacy risks.
In one possible scenario, the privacy risks of applets can be divided into two categories: bottom line risk and experience risk.
The bottom line risk represents the risk that the privacy information of the user is possibly leaked, and comprises the risk of leakage of sensitive information, the risk of excessive authorization, the risk of default checking of privacy policies and the like. The sensitive information leakage risk indicates that personal basic information such as user names, mobile phone numbers, identity card numbers and the like is not desensitized and displayed on the small program page; the excessive authorization risk represents that the user is required to authorize related information in unnecessary scenes, such as unnecessary information that the shopping applet requires the user to grant certificate numbers, credit evaluation results and the like; the privacy policy default checking risk represents checking without user consent by default for policies that require provision of user privacy information.
The experience risks comprise popup disturbing risks, popup overlapping risks, repeated authorization risks, forced authorization risks, authorization link endless loop risks and the like. The popup disturbing risk indicates that the applet pops up the popup for many times in the running process to influence the normal operation of a user; the popup overlapping risk means that a plurality of popup windows are overlapped repeatedly under the condition that one popup window is not finished, and user operation is disturbed; the risk of repeated authorization means that the applet repeatedly requests authorization from the user in case it has obtained the authorization of the user; the mandatory authorization risk means that the applet requires user authorization compulsorily, otherwise no service is provided or exit is directly performed; the authorization link endless loop risk represents that the small program repeatedly executes the authorization link and cannot jump or exit normally.
In one or more embodiments of the present description, when detecting a sensitive information leakage risk for an applet, according to a privacy risk scenario of the sensitive information leakage risk, when obtaining a basic information interface of a user, an author application is generally required first, then an open API request is initiated by a server through an http request, and a result is displayed in an applet page. Determining that the implementation detail query strategy of the applet suitable for the privacy risk scene should include a control link of applying authorization code auth code authorization, calling protocol request http request, sending authorization code auth code, successful success callback and set data display.
Then, when dynamic detection is carried out, an applet page is automatically opened, an authorization request from an application in the applet page is responded, a button control related to the authorization request is identified (namely, the button control is accepted or rejected) according to a dynamic detection strategy, and accepted user interface operation is simulated and executed aiming at the accepted button control. And performing Optical Character Recognition (OCR) on the page display result after the execution of the acceptance, and judging whether the page display result has non-desensitized display of the sensitive information according to the Recognition result so as to judge whether the applet has sensitive information leakage risk. If so, the sensitive information leakage risk exists in the small program, and if not, the sensitive information leakage risk does not exist in the small program.
Further, when querying is carried out according to the implementation detail query strategy of applying authorization code auth code authorization, calling protocol request http request, sending authorization code auth code, successfully invoking callback and set data display, screening all method invocation expressions MethodCalleExpr in a code structure analysis database, and respectively matching my. Finding a function where the my.request is located, wherein the function needs to be called in a branch where the my.getauthcode callback is successful; recursively searching whether a function where the my.request is called by my.getAuthCode or not according to the data stream; if the link is successfully established, the link is matched with the implementation detail query strategy, and information such as a function where the request is located, the number of rows, a called point, an applet page and the like can be output as a static detection result (namely, dynamic detection auxiliary data).
In one or more embodiments of the present description, when an authorization link endless loop risk is performed on an applet, according to a privacy risk scenario of the authorization link endless loop risk, a user is required to authorize after the applet is opened, and a page jump or a pop-up window is repeated after clicking rejection occurs, so that the user cannot exit from a current page, which causes an experience risk. The implementation details query policy that determines that the applet adapts to the privacy risk scenario should contain a control link that "applies for authorization, denies branches, page jumps or recalls authorization, constitutes a loop".
And then, during dynamic detection, automatically opening the small program page, accepting the authorized popup, responding to an authorization request from an application in the small program page, identifying a button control related to the authorization request according to a dynamic detection strategy, and simulating and executing rejected user interface operation aiming at the rejected button control. And judging whether the applet has user experience risks or not according to the jump page or the repeated request authorization page after execution refusal.
Specifically, the determination process is as follows:
(1) searching whether a clickable button control exists in a page;
(2) if yes, executing click operation and recording the click; since the rejection operation corresponds to the popup (i.e. the identification object of the privacy risk scene), the click operation of "rejection" needs to be recorded specially;
(3) if not, ending the detection, and jumping to the step 4;
(4) repeating the operation of the step 2 for 5 times;
(5) judging the clicking operation, if the number of times of refusing clicking is more than 0 and the current page is the main page, indicating that the home page popup is performed; if the number of times of 'refusing' clicks is more than 1 and the permission of refusing for multiple times is different, more than one popup window of the current page is shown, namely, overlapping popup windows appear; if the number of clicks is 5, the click is always performed, namely, a loop popup occurs, namely, the risk of endless loop of an authorization link exists.
In one or more embodiments of the present description, the actions performed in simulation in the dynamic detection process may be replaced with a HOOK scheme.
In conjunction with the foregoing description, one or more embodiments of the present disclosure provide a risk detection schematic diagram based on applet dynamic and static analysis in an application scenario, as shown in fig. 2.
In fig. 2, the static analysis module is configured to perform static detection, construct a code structure analysis database including AST, CFG, and DFG according to the applet source code, and determine a corresponding implementation detail query policy according to a general privacy risk feature abstracted from a privacy risk scene. After the query is carried out, the query result including information such as risk points, code files, code positions, page paths and the like is analyzed and then transmitted to the dynamic analysis module.
And the dynamic analysis module is used for carrying out dynamic detection, opening the small program page according to the page path, carrying out real machine preview according to the determined dynamic detection strategy, simulating and executing user interface operations such as clicking and judging whether the small program has privacy risks or not according to the operation result.
The privacy risks comprise risks of sensitive information leakage, excessive authorization, privacy policy default checking, popup disturbance, forced authorization, authorization link endless loop and the like.
In conjunction with the foregoing description, one or more embodiments of the present disclosure provide a static analysis schematic in an application scenario, as shown in fig. 3.
In fig. 3, when the applet source code is analyzed, a trap (trap) file (which is a relational data file and a relational database is formed by different relational data files) is extracted from the JavaScript source code through an extractor, and a copy of the source code is copied to jointly form a code structure analysis database containing syntax tree information, CFG, and DFG. After the implementation detail query strategy is determined, the query speed is improved conveniently during query through the inspection and the compilation of the compiler. And inquiring data meeting the conditions in the constructed database according to the compiling result, and analyzing the data into a final result, namely an inquiring result, through a result calculator.
Based on the same idea, one or more embodiments of the present specification further provide apparatuses and devices corresponding to the above-described method, as shown in fig. 4 and 5.
Fig. 4 is a schematic structural diagram of a risk detection device based on applet dynamic and static analysis according to one or more embodiments of the present disclosure, where the device includes:
a building module 402, which builds a corresponding code structure analysis database based on the static code of the applet;
a query policy determination module 404, configured to determine, according to a predetermined privacy risk scenario, an implementation detail query policy adapted to the privacy risk scenario for the applet;
the query module 406 is used for querying the code structure analysis database according to the implementation detail query strategy, and obtaining dynamic detection auxiliary data reflecting the suspected risk according to the query result;
a detection policy determination module 408 that determines a dynamic detection policy corresponding to the dynamic detection assistance data;
the determining module 410 simulates and executes the user interface operation of the applet according to the dynamic detection policy, and determines whether the applet has privacy risks according to the operation result.
Optionally, the building module 402 generates an abstract syntax tree, a control flow graph representing a flow relationship between nodes, and a data flow graph representing data flow inside a function based on a static code of an applet, so as to build a code control link database and a data flow link database; and determining a corresponding code structure analysis database according to the code control link database and the data flow link database.
Optionally, the apparatus further comprises a query policy reservation module 412; the query policy reservation module 412 performs, before the query policy determination module 404 performs: determining corresponding general risk characteristics according to a preset privacy risk scene; abstracting the general risk features into corresponding risk links; determining a corresponding implementation detail query strategy according to the risk link;
the query policy determination module 404 determines an implementation detail query policy adapted to the privacy risk scenario for the applet from predetermined implementation detail query policies.
Optionally, the query policy determining module 404 is configured to establish a call relationship between functions according to a data flow call node; and determining functions contained in the risk link and the call relation thereof according to the call relation, and forming a corresponding implementation detail query strategy.
Optionally, the query module 406 determines a function and a call relationship thereof included in a risk link corresponding to the implementation detail query policy; and inquiring the code structure analysis database according to the function and the calling relationship thereof to determine whether a matched calling relationship exists.
Optionally, the query module 406 determines risk points with suspected risk and corresponding applet pages according to the query result; and carrying out structural processing on the determined risk points and the small program pages to obtain dynamic detection auxiliary data.
Optionally, the determining module 410 is configured to invoke opening of the applet page through a true machine; responding to an authorization request from an application in the applet page, identifying a button control related to the authorization request according to the dynamic detection strategy, and simulating and executing accepted or rejected user interface operation aiming at the button control; and identifying the operation result according to the dynamic detection strategy, and judging whether the applet has privacy risks.
Optionally, the privacy risk scenario indicates a risk of sensitive information disclosure; the query policy determination module 404, according to the sensitive information leakage risk, determines that the implementation detail query policy of the applet, which is suitable for the privacy risk scenario, includes a control link that applies for authorization code authorization, calls a protocol request, sends an authorization code, successfully calls back, and displays data;
the determining module 410, in response to an authorization request from an application in the applet page, according to the dynamic detection policy, identifying a button control related to the authorization request, and simulating to execute an accepted user interface operation for the button control; and carrying out optical character recognition on the page display result after the execution of the acceptance, and judging whether the page display result has non-desensitized display of sensitive information according to the recognition result so as to judge whether the applet has sensitive information leakage risk.
Optionally, the privacy risk scenario indicates an authorization link endless loop risk; the query policy determination module 404 determines, according to the authorization link endless loop risk, that the implementation detail query policy of the applet, which is adapted to the privacy risk scenario, includes applying for authorization, rejecting a branch, page jump or re-invoking authorization, and forming a control link of a loop;
the determining module 410, in response to an authorization request from an application in the applet page, according to the dynamic detection policy, identifying a button control related to the authorization request, and simulating execution of a rejected user interface operation for the button control; and judging whether the small program has the risk of endless loop of an authorization link according to the jump page or the repeated request authorization page after execution refuses.
Fig. 5 is a schematic structural diagram of a risk detection device based on applet dynamic and static analysis according to one or more embodiments of the present specification, where the device includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
constructing a corresponding code structure analysis database based on static codes of the small programs;
determining an implementation detail query strategy adaptive to a preset privacy risk scene for the small program according to the preset privacy risk scene;
inquiring in the code structure analysis database according to the implementation detail inquiry strategy, and obtaining dynamic detection auxiliary data reflecting risk suspicion according to the inquiry result;
determining a dynamic detection policy corresponding to the dynamic detection assistance data;
and simulating and executing the user interface operation of the applet according to the dynamic detection strategy, and judging whether the applet has privacy risks according to the operation result.
Based on the same idea, one or more embodiments of the present specification further provide a non-volatile computer storage medium corresponding to the above method, and storing computer-executable instructions configured to:
constructing a corresponding code structure analysis database based on static codes of the small programs;
determining an implementation detail query strategy adaptive to a preset privacy risk scene for the small program according to the preset privacy risk scene;
inquiring in the code structure analysis database according to the implementation detail inquiry strategy, and obtaining dynamic detection auxiliary data reflecting risk suspicion according to the inquiry result;
determining a dynamic detection policy corresponding to the dynamic detection assistance data;
and simulating and executing the user interface operation of the applet according to the dynamic detection strategy, and judging whether the applet has privacy risks according to the operation result.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: the ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, the present specification embodiments may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the device, and the nonvolatile computer storage medium, since they are substantially similar to the embodiments of the method, the description is simple, and for the relevant points, reference may be made to the partial description of the embodiments of the method.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The above description is merely one or more embodiments of the present disclosure and is not intended to limit the present disclosure. Various modifications and alterations to one or more embodiments of the present description will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of one or more embodiments of the present specification should be included in the scope of the claims of the present specification.
Claims (19)
1. A risk detection method based on applet dynamic and static analysis comprises the following steps:
constructing a corresponding code structure analysis database based on static codes of the small programs;
determining an implementation detail query strategy adaptive to a preset privacy risk scene for the small program according to the preset privacy risk scene;
inquiring in the code structure analysis database according to the implementation detail inquiry strategy, and obtaining dynamic detection auxiliary data reflecting risk suspicion according to the inquiry result;
determining a dynamic detection policy corresponding to the dynamic detection assistance data;
and simulating and executing the user interface operation of the applet according to the dynamic detection strategy, and judging whether the applet has privacy risks according to the operation result.
2. The method according to claim 1, wherein the building of the corresponding code structure analysis database based on the static code of the applet specifically comprises:
generating an abstract syntax tree, a control flow graph representing the flow relation between nodes and a data flow graph representing the data flow in a function based on the static code of the applet, and constructing a code control link database and a data flow link database;
and determining a corresponding code structure analysis database according to the code control link database and the data flow link database.
3. The method of claim 1, the method further comprising, prior to determining, for the applet, an enforcement detail query policy that is adapted to the privacy risk scenario according to a predetermined privacy risk scenario:
determining corresponding general risk characteristics according to a preset privacy risk scene;
abstracting the general risk features into corresponding risk links;
determining a corresponding implementation detail query strategy according to the risk link;
the determining, according to a predetermined privacy risk scenario, an implementation detail query policy adapted to the privacy risk scenario for the applet specifically includes:
determining an implementation detail query policy for the applet that is adapted to the privacy risk scenario from predetermined implementation detail query policies.
4. The method according to claim 3, wherein determining, according to the risk link, a corresponding implementation-specific query policy specifically includes:
establishing a calling relation between functions according to the data flow calling node;
and determining functions contained in the risk link and the call relation thereof according to the call relation, and forming a corresponding implementation detail query strategy.
5. The method of claim 4, wherein querying the code structure analysis database according to the implementation details query policy specifically comprises:
determining functions and calling relations thereof contained in risk links corresponding to the implementation detail query strategy;
and inquiring the code structure analysis database according to the function and the calling relationship thereof to determine whether a matched calling relationship exists.
6. The method according to claim 1, wherein the obtaining of the dynamic detection assistance data reflecting the suspected risk according to the result of the query specifically includes:
determining risk points with suspected risks and corresponding small program pages according to the query result;
and carrying out structural processing on the determined risk points and the small program pages to obtain dynamic detection auxiliary data.
7. The method according to claim 6, wherein the simulating, according to the dynamic detection policy, a user interface operation of the applet, and determining whether the applet has a privacy risk according to a result of the operation specifically include:
calling and opening the small program page through a real machine;
responding to an authorization request from an application in the applet page, identifying a button control related to the authorization request according to the dynamic detection strategy, and simulating and executing accepted or rejected user interface operation aiming at the button control;
and identifying the operation result according to the dynamic detection strategy, and judging whether the applet has privacy risks.
8. The method of claim 7, the privacy risk scenario indicating a risk of sensitive information disclosure;
the determining, according to a predetermined privacy risk scenario, an implementation detail query policy adapted to the privacy risk scenario for the applet specifically includes:
according to the sensitive information leakage risk, determining that an implementation detail query strategy of the applet, which is suitable for the privacy risk scene, comprises a control link for applying authorization code authorization, calling a protocol request, sending an authorization code, successfully calling back and displaying data;
the simulating, according to the dynamic detection policy, a user interface operation of the applet, and determining whether the applet has a privacy risk according to a result of the operation specifically include:
responding to an authorization request from an application in the applet page, identifying a button control related to the authorization request according to the dynamic detection strategy, and simulating and executing an accepted user interface operation aiming at the button control;
and carrying out optical character recognition on the page display result after the execution of the acceptance, and judging whether the page display result has non-desensitized display of sensitive information according to the recognition result so as to judge whether the applet has sensitive information leakage risk.
9. The method of claim 7, the privacy risk scenario indicating an authorized link endless loop risk;
the determining, according to a predetermined privacy risk scenario, an implementation detail query policy adapted to the privacy risk scenario for the applet specifically includes:
determining that the implementation detail query strategy of the applet, which is suitable for the privacy risk scene, comprises applying for authorization, rejecting branches, page skipping or re-calling authorization to form a cyclic control link according to the authorization link endless loop risk;
the simulating, according to the dynamic detection policy, a user interface operation of the applet, and determining whether the applet has a privacy risk according to a result of the operation specifically include:
responding to an authorization request from an application in the applet page, identifying a button control related to the authorization request according to the dynamic detection strategy, and simulating and executing rejected user interface operation aiming at the button control;
and judging whether the small program has the risk of endless loop of an authorization link according to the jump page or the repeated request authorization page after execution refuses.
10. A risk detection device based on applet dynamic and static analysis comprises:
the building module is used for building a corresponding code structure analysis database based on the static code of the small program;
the inquiry strategy determining module is used for determining an implementation detail inquiry strategy suitable for the privacy risk scene for the small program according to a preset privacy risk scene;
the query module is used for querying the code structure analysis database according to the implementation detail query strategy and obtaining dynamic detection auxiliary data reflecting the suspected risk according to the query result;
a detection policy determination module that determines a dynamic detection policy corresponding to the dynamic detection assistance data;
and the judging module simulates and executes the user interface operation of the applet according to the dynamic detection strategy and judges whether the applet has privacy risks according to the operation result.
11. The apparatus of claim 10, wherein the building module generates an abstract syntax tree, a control flow graph representing inter-node flow relationships, and a data flow graph representing intra-function data flow based on static code of the applet, for building a code control link database and a data flow link database;
and determining a corresponding code structure analysis database according to the code control link database and the data flow link database.
12. The apparatus of claim 10, further comprising a query policy reservation module;
the query policy reservation module executes, before the query policy determination module executes: determining corresponding general risk characteristics according to a preset privacy risk scene;
abstracting the general risk features into corresponding risk links;
determining a corresponding implementation detail query strategy according to the risk link;
the query policy determination module determines an implementation detail query policy adapted to the privacy risk scenario for the applet from predetermined implementation detail query policies.
13. The apparatus of claim 12, wherein the query policy determination module is configured to establish a call relationship between functions according to a data flow call node;
and determining functions contained in the risk link and the call relation thereof according to the call relation, and forming a corresponding implementation detail query strategy.
14. The apparatus according to claim 13, wherein the query module determines a function and a call relation thereof included in a risk link corresponding to the implementation detail query policy;
and inquiring the code structure analysis database according to the function and the calling relationship thereof to determine whether a matched calling relationship exists.
15. The apparatus of claim 10, the query module to determine risk points with suspected risk and corresponding applet pages based on results of the query;
and carrying out structural processing on the determined risk points and the small program pages to obtain dynamic detection auxiliary data.
16. The apparatus of claim 15, the determination module to invoke opening the applet page by a true machine;
responding to an authorization request from an application in the applet page, identifying a button control related to the authorization request according to the dynamic detection strategy, and simulating and executing accepted or rejected user interface operation aiming at the button control;
and identifying the operation result according to the dynamic detection strategy, and judging whether the applet has privacy risks.
17. The apparatus of claim 16, the privacy risk scenario indicating a risk of sensitive information disclosure;
the query strategy determination module determines that the implementation detail query strategy of the applet, which is suitable for the privacy risk scene, comprises a control link for applying authorization code authorization, calling a protocol request, sending an authorization code, successfully calling back and displaying data according to the sensitive information leakage risk;
the judging module responds to an authorization request from an application in the applet page, identifies a button control related to the authorization request according to the dynamic detection strategy, and simulates and executes accepted user interface operation aiming at the button control;
and carrying out optical character recognition on the page display result after the execution of the acceptance, and judging whether the page display result has non-desensitized display of sensitive information according to the recognition result so as to judge whether the applet has sensitive information leakage risk.
18. The apparatus of claim 16, the privacy risk scenario indicating an authorized link endless loop risk;
the inquiry strategy determining module is used for determining that the implementation detail inquiry strategy of the small program, which is suitable for the privacy risk scene, comprises a control link for applying authorization, rejecting branches, skipping pages or calling authorization again and forming a loop according to the endless loop risk of the authorization link;
the judging module responds to an authorization request from an application in the applet page, identifies a button control related to the authorization request according to the dynamic detection strategy, and simulates and executes rejected user interface operation aiming at the button control;
and judging whether the small program has the risk of endless loop of an authorization link according to the jump page or the repeated request authorization page after execution refuses.
19. A risk detection device based on applet dynamic and static analysis, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
constructing a corresponding code structure analysis database based on static codes of the small programs;
determining an implementation detail query strategy adaptive to a preset privacy risk scene for the small program according to the preset privacy risk scene;
inquiring in the code structure analysis database according to the implementation detail inquiry strategy, and obtaining dynamic detection auxiliary data reflecting risk suspicion according to the inquiry result;
determining a dynamic detection policy corresponding to the dynamic detection assistance data;
and simulating and executing the user interface operation of the applet according to the dynamic detection strategy, and judging whether the applet has privacy risks according to the operation result.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110895716.2A CN113672919A (en) | 2021-08-05 | 2021-08-05 | Risk detection method, device and equipment based on small program dynamic and static analysis |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110895716.2A CN113672919A (en) | 2021-08-05 | 2021-08-05 | Risk detection method, device and equipment based on small program dynamic and static analysis |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113672919A true CN113672919A (en) | 2021-11-19 |
Family
ID=78541544
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110895716.2A Pending CN113672919A (en) | 2021-08-05 | 2021-08-05 | Risk detection method, device and equipment based on small program dynamic and static analysis |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113672919A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114328203A (en) * | 2021-12-22 | 2022-04-12 | 支付宝(杭州)信息技术有限公司 | Applet detection method and device |
CN114595482A (en) * | 2022-03-10 | 2022-06-07 | 北京邮电大学 | Software source code privacy detection method and system based on static detection |
CN114880673A (en) * | 2022-04-28 | 2022-08-09 | 上海交通大学 | Method and system for detecting private data leakage aiming at applet source code |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080263659A1 (en) * | 2007-04-23 | 2008-10-23 | Christoph Alme | System and method for detecting malicious mobile program code |
US20120311711A1 (en) * | 2011-05-31 | 2012-12-06 | International Business Machines Corporation | Detecting persistent vulnerabilities in web applications |
CN103793650A (en) * | 2013-12-02 | 2014-05-14 | 北京邮电大学 | Static analysis method and static analysis device for Android application program |
CN104200155A (en) * | 2014-08-12 | 2014-12-10 | 中国科学院信息工程研究所 | Monitoring device and method for protecting user privacy based on iPhone operating system (iOS) |
CN106503552A (en) * | 2016-09-19 | 2017-03-15 | 南京邮电大学 | The Android malware detecting system that is excavated with pattern of traffic based on signature and method |
US20170169224A1 (en) * | 2015-12-10 | 2017-06-15 | Electronics And Telecommunications Research Institute | Apparatus and method for detecting malicious mobile app |
US9811665B1 (en) * | 2013-07-30 | 2017-11-07 | Palo Alto Networks, Inc. | Static and dynamic security analysis of apps for mobile devices |
US10565377B1 (en) * | 2016-12-21 | 2020-02-18 | Palo Alto Networks, Inc. | Context-based analysis of applications |
CN112560045A (en) * | 2020-12-11 | 2021-03-26 | 腾讯科技(深圳)有限公司 | Application program vulnerability detection method and device, computer equipment and storage medium |
-
2021
- 2021-08-05 CN CN202110895716.2A patent/CN113672919A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080263659A1 (en) * | 2007-04-23 | 2008-10-23 | Christoph Alme | System and method for detecting malicious mobile program code |
US20120311711A1 (en) * | 2011-05-31 | 2012-12-06 | International Business Machines Corporation | Detecting persistent vulnerabilities in web applications |
US9811665B1 (en) * | 2013-07-30 | 2017-11-07 | Palo Alto Networks, Inc. | Static and dynamic security analysis of apps for mobile devices |
CN103793650A (en) * | 2013-12-02 | 2014-05-14 | 北京邮电大学 | Static analysis method and static analysis device for Android application program |
CN104200155A (en) * | 2014-08-12 | 2014-12-10 | 中国科学院信息工程研究所 | Monitoring device and method for protecting user privacy based on iPhone operating system (iOS) |
US20170169224A1 (en) * | 2015-12-10 | 2017-06-15 | Electronics And Telecommunications Research Institute | Apparatus and method for detecting malicious mobile app |
CN106503552A (en) * | 2016-09-19 | 2017-03-15 | 南京邮电大学 | The Android malware detecting system that is excavated with pattern of traffic based on signature and method |
US10565377B1 (en) * | 2016-12-21 | 2020-02-18 | Palo Alto Networks, Inc. | Context-based analysis of applications |
CN112560045A (en) * | 2020-12-11 | 2021-03-26 | 腾讯科技(深圳)有限公司 | Application program vulnerability detection method and device, computer equipment and storage medium |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114328203A (en) * | 2021-12-22 | 2022-04-12 | 支付宝(杭州)信息技术有限公司 | Applet detection method and device |
CN114595482A (en) * | 2022-03-10 | 2022-06-07 | 北京邮电大学 | Software source code privacy detection method and system based on static detection |
CN114595482B (en) * | 2022-03-10 | 2024-06-11 | 北京邮电大学 | Software source code privacy detection method and system based on static detection |
CN114880673A (en) * | 2022-04-28 | 2022-08-09 | 上海交通大学 | Method and system for detecting private data leakage aiming at applet source code |
CN114880673B (en) * | 2022-04-28 | 2024-06-07 | 上海交通大学 | Method and system for detecting privacy data leakage aiming at applet source code |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10318402B2 (en) | Automated software compliance analysis | |
CN113672919A (en) | Risk detection method, device and equipment based on small program dynamic and static analysis | |
US10936555B2 (en) | Automated query compliance analysis | |
US10127147B2 (en) | Automated software compliance analysis | |
EP3910479A1 (en) | A method and a system for testing machine learning and deep learning models for robustness, and durability against adversarial bias and privacy attacks | |
US9762598B1 (en) | Automatic dynamic vetting of browser extensions and web applications | |
CN111782668B (en) | Data structure reading and updating method and device and electronic equipment | |
TWI650650B (en) | Third party application execution method and system | |
US20150220332A1 (en) | Resolving merge conflicts that prevent blocks of program code from properly being merged | |
US10735463B2 (en) | Validating commands for hacking and spoofing prevention in an Internet of Things (IoT) computing environment | |
Walter et al. | Architectural optimization for confidentiality under structural uncertainty | |
CN116909889A (en) | Model risk evaluation method, device and equipment | |
Walter et al. | Architecture-based attack path analysis for identifying potential security incidents | |
Brabra et al. | Detecting cloud (anti) patterns: OCCI perspective | |
Amini | Analyzing mobile app privacy using computation and crowdsourcing | |
Du et al. | Withdrawing is believing? detecting inconsistencies between withdrawal choices and third-party data collections in mobile apps | |
CN113408254A (en) | Page form information filling method, device, equipment and readable medium | |
CN116029556B (en) | Service risk assessment method, device, equipment and readable storage medium | |
Kothari et al. | A “Human-in-the-loop” approach for resolving complex software anomalies | |
KR102205810B1 (en) | Method for automatically returning rework result of crowdsourcing based project for artificial intelligence training data generation | |
Oglaza et al. | A recommender-based system for assisting non-technical users in managing android permissions | |
CN112230935B (en) | Privacy risk detection method, device and equipment in application | |
CN113886216A (en) | Interface test and tool configuration method, device, electronic equipment and storage medium | |
US20200104696A1 (en) | Service account prediction using user name | |
Salvia et al. | Intents analysis of Android apps for confidentiality leakage detection |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20230116 Address after: Room 1701-1708, 17/F, No. 501, Yincheng Middle Road, Pilot Free Trade Zone, Pudong New Area, Shanghai, 201207 Applicant after: Alipay.com Co.,Ltd. Address before: 310000 801-11 section B, 8th floor, 556 Xixi Road, Xihu District, Hangzhou City, Zhejiang Province Applicant before: Alipay (Hangzhou) Information Technology Co.,Ltd. |