CN106693366B - Method and device for verifying operation validity and method and device for reinforcing installation package - Google Patents

Method and device for verifying operation validity and method and device for reinforcing installation package Download PDF

Info

Publication number
CN106693366B
CN106693366B CN201611111682.9A CN201611111682A CN106693366B CN 106693366 B CN106693366 B CN 106693366B CN 201611111682 A CN201611111682 A CN 201611111682A CN 106693366 B CN106693366 B CN 106693366B
Authority
CN
China
Prior art keywords
application program
event
input
input event
user
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.)
Active
Application number
CN201611111682.9A
Other languages
Chinese (zh)
Other versions
CN106693366A (en
Inventor
邓华新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201611111682.9A priority Critical patent/CN106693366B/en
Publication of CN106693366A publication Critical patent/CN106693366A/en
Application granted granted Critical
Publication of CN106693366B publication Critical patent/CN106693366B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/73Authorising game programs or game devices, e.g. checking authenticity
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/75Enforcing rules, e.g. detecting foul play or generating lists of cheating players

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method and a device for verifying operation validity and a method and a device for reinforcing an installation package. The method for verifying the operation validity comprises the following steps: after the application program runs, acquiring and storing an input event on a screen of the intelligent terminal; acquiring a response event of the application program; when a response event of the application program is acquired, judging whether an input event matched with the response event exists in the stored input events; if not, judging that the user performs illegal operation. The technical scheme can effectively judge whether the operation of the user on the application program is manual operation or script operation, by taking the game application program as an example, the non-compliant behaviors of the user for hanging up, swiping coins and the like by using the script can be detected, and the operator can perform corresponding penalty according to the detected illegal operation of the user.

Description

Method and device for verifying operation validity and method and device for reinforcing installation package
Technical Field
The invention relates to the field of information security, in particular to a method and a device for verifying operation validity and a method and a device for reinforcing an installation package.
Background
The application programs developed by developers usually hope to be experienced by users through self operation, particularly many game application programs, if the plug-in program is adopted, the balance of the game is influenced, and much game fun is reduced.
Taking a mobile phone game as an example, under normal conditions, a user inputs corresponding instructions by clicking a screen on a mobile phone, so that an application program identifies the instructions according to a built-in script to control the game to send out corresponding responses. If a cracker cracks the built-in script, the occurrence of response events can be controlled by the script without manual operation, which is undoubtedly not in accordance with the requirements of game operators and solves the problem of how to detect illegal operations.
Disclosure of Invention
In view of the above, the present invention has been made to provide a method and apparatus for verifying the validity of an operation and a method and apparatus for reinforcing an installation package that overcome or at least partially solve the above problems.
According to an aspect of the present invention, there is provided a method of verifying the validity of an operation, comprising:
after the application program runs, acquiring and storing an input event on a screen of the intelligent terminal;
acquiring a response event of the application program;
when a response event of the application program is acquired, judging whether an input event matched with the response event exists in the stored input events;
if not, judging that the user performs illegal operation.
Optionally, the acquiring and saving an input event on a screen of the smart terminal includes:
and when the input event on the screen of the intelligent terminal is acquired, correspondingly storing the input event and the current time.
Optionally, the input event is an input event related to the application program.
Optionally, the acquiring and saving an input event on a screen of the smart terminal includes:
and acquiring and storing the input event of the application program in the picture range displayed on the screen of the intelligent terminal.
Optionally, the obtaining the response event of the application includes:
acquiring an execution event of a designated function in the application program; the specified function is a function for refreshing the content displayed on the screen by the application program.
Optionally, the method further comprises:
presetting a matching relation table of input events and response events of an application program;
the judging whether there is an input event matched with the response event in the stored input events comprises:
determining an input event matched with the response event according to the matching relation table;
and searching the input events matched with the stored input events.
Optionally, the illegal operation performed by the user is: illegal script operations of the matched input events are not performed.
Optionally, the method further comprises:
and reporting the information of the illegal operation of the user to a server of the application program.
Optionally, the information that the user performs the illegal operation includes at least one of:
the version number of the application program;
signature information of the application;
account information of a user who has logged in the application;
response events for applications that did not find a matching input event.
Optionally, the method further comprises:
receiving an instruction issued by a server of the application program, and executing corresponding operation on the application program; the instructions include at least one of:
displaying prompt information for stopping illegal operation;
acquiring the latest version of the application program from the server of the application program, and updating the application program;
and forcibly logging off the user account.
According to another aspect of the present invention, there is provided a method of reinforcing an installation package, comprising:
packaging verification code into an installation package of an application, the verification code adapted to perform a method as claimed in any one of the above.
Optionally, the method further comprises:
performing decompiling on an installation package of an application program to obtain an intermediate assembly code of the application program;
traversing the intermediate assembly code to obtain at least one system callback interface function;
the packaging of the verification code into the installation package of the application program comprises: and packaging the verification code corresponding to the system callback interface function into an installation package of the application program.
Optionally, the system callback interface function is: an onTouch () function in an Activity component, and/or a handle _ input function.
According to still another aspect of the present invention, there is provided an apparatus for verifying validity of an operation, including:
the input event acquisition unit is suitable for acquiring and storing the input event on the screen of the intelligent terminal after the application program runs;
the response event acquisition unit is suitable for acquiring a response event of the application program;
the verification unit is suitable for judging whether an input event matched with the response event exists in the stored input events or not when the response event acquisition unit acquires the response event of the application program; if not, judging that the user performs illegal operation.
Optionally, the input event acquiring unit is adapted to, when an input event on the screen of the intelligent terminal is acquired, store the input event corresponding to the current time.
Optionally, the input event is an input event related to the application program.
Optionally, the input event acquiring unit is adapted to acquire and store the input event within a picture range displayed on the screen of the intelligent terminal by the application program.
Optionally, the response event acquiring unit is adapted to acquire an execution event of a specified function in the application program; the specified function is a function for refreshing the content displayed on the screen by the application program.
Optionally, the verification unit includes a matching relationship table between a preset input event and a response event of the application program; the verification unit is specifically adapted to determine an input event matching the response event according to the matching relationship table, and search for the matched input event from the stored input events.
Optionally, the illegal operation performed by the user is: illegal script operations of the matched input events are not performed.
Optionally, the countermeasure unit is adapted to report information that the user performed an illegal operation to the server of the application program.
Optionally, the information that the user performs the illegal operation includes at least one of:
the version number of the application program;
signature information of the application;
account information of a user who has logged in the application;
response events for applications that did not find a matching input event.
Optionally, the countermeasure unit is further adapted to receive an instruction issued by the server of the application program, and perform a corresponding operation on the application program; the instructions include at least one of: displaying prompt information for stopping illegal operation; acquiring the latest version of the application program from the server of the application program, and updating the application program; and forcibly logging off the user account.
According to still another aspect of the present invention, there is provided an apparatus for reinforcing an installation package, wherein the apparatus includes:
a packaging unit adapted to package the device for verifying the validity of the operation as described in any one of the above into an installation package of an application.
Optionally, the apparatus further comprises:
the decompiling unit is suitable for performing decompiling on the installation package of the application program to obtain an intermediate assembly code of the application program;
the function searching unit is suitable for traversing the intermediate assembly code to obtain at least one system callback interface function;
and the packaging unit is suitable for packaging the device for verifying the operation legality corresponding to the system callback interface function into an installation package of an application program.
Optionally, the system callback interface function is: an onTouch () function in an Activity component, and/or a handle _ input function.
According to the technical scheme, the response event of the acquired application program is matched with the acquired and recorded input event on the screen of the intelligent terminal, whether the response event is generated according to the input event on the screen is judged, and therefore whether the user performs illegal operation is judged. The technical scheme can effectively judge whether the operation of the user on the application program is manual operation or script operation, by taking the game application program as an example, the non-compliant behaviors of the user for hanging up, swiping coins and the like by using the script can be detected, and the operator can perform corresponding penalty according to the detected illegal operation of the user.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 illustrates a flow diagram of a method of verifying the legitimacy of an operation in accordance with an embodiment of the present invention;
FIG. 2 is a schematic diagram of an apparatus for verifying the validity of an operation according to an embodiment of the present invention;
fig. 3 shows a schematic structural diagram of an apparatus for reinforcing an installation package according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 is a flow chart illustrating a method for verifying the validity of an operation according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
and step S110, after the application program runs, acquiring and storing the input event on the screen of the intelligent terminal.
Step S120, a response event of the application program is acquired.
Step S130, when the response event of the application is acquired, determining whether there is an input event matching the response event in the stored input events.
Generally, the response event of the application program needs to have a corresponding input event to trigger, and for the android system and the iOS system, the input event is usually a touch, a sliding and other events on the screen. For example, when a user clicks a screen with a finger to control the movement of a character while playing a mobile phone game, an input event is naturally generated when the user clicks the screen, and the game should move the character to a designated position according to the user's click, which is a response event corresponding thereto. For a game cracker, all that needs to be done is to change the rule, and simulate the generation of an input event through a script, so that the input event on the screen cannot be acquired naturally, but the application program triggers a corresponding response event according to the simulated input event, so that the input event matched with the response event cannot be found.
In step S140, if not, it is determined that the user performed an illegal operation.
As can be seen, in the method shown in fig. 1, the response event of the acquired application program is matched with the acquired and recorded input event on the screen of the intelligent terminal, and whether the response event is generated according to the input event on the screen is determined, so as to determine whether the user performs an illegal operation. The technical scheme can effectively judge whether the operation of the user on the application program is manual operation or script operation, by taking the game application program as an example, the non-compliant behaviors of the user for hanging up, swiping coins and the like by using the script can be detected, and the operator can perform corresponding penalty according to the detected illegal operation of the user.
In an embodiment of the present invention, the acquiring and saving the input event on the screen of the intelligent terminal in the method includes: and when the input event on the screen of the intelligent terminal is acquired, correspondingly storing the input event and the current time.
Therefore, when the response event is acquired, the matched input event can be searched within a certain time limit according to the time for acquiring the response event, so that the situation that a user clicks several screens at will after starting the game, and then the user completely depends on the script operation but is not identified as illegal operation does not occur.
In an embodiment of the present invention, in the method, the input event is an input event related to an application program.
Many application programs do not occupy the whole screen, and the operation performed by the user on the screen is not necessarily the operation performed on the application program, so that it is not meaningful to record the input events to verify the validity of the user operation, and therefore in an embodiment of the present invention, the method for acquiring and saving the input events on the screen of the smart terminal includes: and acquiring and storing the input event of the application program in the picture range displayed on the screen of the intelligent terminal.
Therefore, when the user calls the system menu and switches the application program to the background, redundant input events cannot be acquired and stored, and meanwhile, the operation legality of the user cannot be verified by mistake.
In an embodiment of the present invention, in the method, acquiring a response event of the application includes: acquiring an execution event of a designated function in an application program; the designated function is a function for refreshing the content displayed on the screen by the application program.
For example, in a mobile game using the cos2d engine, the interface engine is OpenGL, and specifically, the refresh of the screen display content is realized by a reflash function, so for the game, the execution event of the reflash function can be acquired.
In an embodiment of the present invention, the method further includes: presetting a matching relation table of input events and response events of an application program; judging whether an input event matched with the response event exists in the stored input events comprises the following steps: determining an input event matched with the response event according to the matching relation table; and searching the stored input events for the input event matched with the stored input events.
For example, the user may click different areas of the screen to perform different operations, such as controlling a person to move, purchasing an article, and the like, that is, different input events may correspond to different response events, and therefore, in this embodiment, in order to verify the validity of the operation more accurately, it is further necessary to determine the input event matching the acquired response event by using the matching relationship table.
In an embodiment of the present invention, in the above method, the illegal operation performed by the user is: illegal script operations of the matched input events are not performed.
For example, the user should click a designated area on the screen to move the character to the area, but the actual operation is realized by cracking the game and using the script, and the script is the character moving script, that is, the user uses the illegal operation of the character moving script.
In an embodiment of the present invention, the method further includes: and reporting the information of the illegal operation of the user to a server of the application program. Specifically, the information that the user performs the illegal operation includes at least one of: the version number of the application program; signature information of the application; account information of a user who has logged in the application; response events for applications that did not find a matching input event.
Therefore, the application program developer can update the application program according to the information and block the code injection vulnerability which may exist. For game application programs, many users download cracked versions specially to achieve the purpose of playing games free of charge, and the like, and can also punish the users through the acquired account information of the users.
In an embodiment of the present invention, the method further includes: receiving an instruction issued by a server of the application program, and executing corresponding operation on the application program; the instructions include at least one of: displaying prompt information that the application program is attacked by code injection; acquiring the latest version of the application program from the server of the application program, and updating the application program; and forcibly logging off the user account.
Some countermeasures for detecting the code injection attack are provided in the embodiment, for example, the application program is updated by an application program installation package of an official version, so that the application program which is subjected to the code injection attack is replaced; alternatively, taking the game application as an example, the user may be subjected to penalties such as forced logoff or number sealing, which may reduce the loss of the game operator.
In one embodiment of the present invention, a method of reinforcing an installation package is provided, wherein the method comprises: the authentication code is packaged into an installation package of the application, the authentication code being adapted to perform the method of any of the embodiments described above.
The above embodiments describe a method of verifying the validity of an operation after an application program is run. The embodiment provides a convenient method for the application program developer, namely, the verification logic does not need to be written when the code of the application program is developed, and only the installation package of the developed application program needs to be submitted. Thus, in this embodiment, the installation packages of the application programs provided by the parties can be uniformly added with the verification code.
In an embodiment of the present invention, the method further includes: performing decompiling on the installation package of the application program to obtain an intermediate assembly code of the application program; traversing the intermediate assembly code to obtain at least one system callback interface function; packaging the authentication code into an installation package of the application includes: and packaging the verification code corresponding to the system callback interface function into an installation package of the application program. The system callback interface function is as follows: an onTouch () function in an Activity component, and/or a handle _ input function.
For example, the application program may be developed using Java language, C + + language, or the like, and in different language environments, the system callback interface is also different, the system callback interface function in the Java environment is an onTouch () function in the Activity component, and the system callback interface function in the C + + environment is a handle _ input function. Therefore, when the input event is generated on the screen, the system can automatically call the corresponding system callback interface function, and the verification code is added to the application program corresponding to the system callback interface function, so that the verification code can be executed, and the acquisition and the storage of the input event on the intelligent terminal screen are realized.
Fig. 2 is a schematic structural diagram of an apparatus for verifying operation validity according to an embodiment of the present invention, and as shown in fig. 2, an apparatus 200 for verifying operation validity includes:
the input event acquiring unit 210 is adapted to acquire and store an input event on the screen of the intelligent terminal after the application program runs.
The response event acquiring unit 220 is adapted to acquire a response event of the application program.
The verification unit 230 is adapted to determine whether an input event matching the response event exists in the stored input events when the response event acquisition unit acquires the response event of the application program; if not, judging that the user performs illegal operation.
As can be seen, the apparatus shown in fig. 2 determines whether the response event is generated according to the input event on the screen by matching the acquired response event of the application with the acquired and recorded input event on the screen of the smart terminal, so as to determine whether the user performs an illegal operation. The technical scheme can effectively judge whether the operation of the user on the application program is manual operation or script operation, by taking the game application program as an example, the non-compliant behaviors of the user for hanging up, swiping coins and the like by using the script can be detected, and the operator can perform corresponding penalty according to the detected illegal operation of the user.
In an embodiment of the present invention, in the apparatus shown in fig. 2, the input event acquiring unit 210 is adapted to, when acquiring an input event on the screen of the smart terminal, store the input event corresponding to the current time.
In one embodiment of the present invention, the input event is an input event associated with an application in the apparatus shown in FIG. 2.
In an embodiment of the present invention, in the above apparatus, the input event acquiring unit 210 is adapted to acquire and store the input event within a range of a picture displayed on a screen of the smart terminal by an application.
In an embodiment of the present invention, in the apparatus shown in fig. 2, the response event acquiring unit 220 is adapted to acquire an execution event of a specified function in an application; the designated function is a function for refreshing the content displayed on the screen by the application program.
In an embodiment of the present invention, in the apparatus shown in fig. 2, the verification unit 230 includes a matching relationship table of preset input events and response events of the application; the verification unit is specifically adapted to determine an input event matching the response event according to the matching relationship table, and search for the matched input event from the stored input events.
In an embodiment of the present invention, in the above apparatus, the illegal operation performed by the user is: illegal script operations of the matched input events are not performed.
In one embodiment of the present invention, the apparatus shown in fig. 2 further comprises: a countermeasure unit (not shown) adapted to report information that the user has performed an illegal operation to the server of the application program.
In an embodiment of the present invention, in the apparatus, the information that the user performed the illegal operation includes at least one of: the version number of the application program; signature information of the application; account information of a user who has logged in the application; response events for applications that did not find a matching input event.
In an embodiment of the present invention, in the apparatus, the countermeasure unit is further adapted to receive an instruction issued by a server of the application program, and perform a corresponding operation on the application program; the instructions include at least one of: displaying prompt information for stopping illegal operation; acquiring the latest version of the application program from the server of the application program, and updating the application program; and forcibly logging off the user account.
Fig. 3 is a schematic structural diagram illustrating an apparatus for reinforcing an installation package according to an embodiment of the present invention, and as shown in fig. 3, the apparatus 300 for reinforcing an installation package includes:
a packaging unit 310 adapted to package the apparatus for verifying operation validity 200 according to any of the above embodiments into an installation package of an application.
In one embodiment of the present invention, the apparatus shown in fig. 3 further comprises:
and the decompilation unit 320 is suitable for performing decompilation on the installation package of the application program to obtain the intermediate assembly code of the application program.
And the function searching unit 330 is adapted to traverse the intermediate assembly code to obtain at least one system callback interface function.
And the packaging unit 310 is adapted to package the device for verifying the validity of the operation corresponding to the system callback interface function into the installation package of the application program.
In an embodiment of the present invention, in the apparatus, the system callback interface function is: an onTouch () function in an Activity component, and/or a handle _ input function.
It should be noted that the specific implementation of each of the above device embodiments is the same as the specific implementation of the corresponding method embodiment, and is not described herein again.
In summary, according to the technical scheme of the present invention, the obtained response event of the application program is matched with the obtained and recorded input event on the screen of the intelligent terminal, and whether the response event is generated according to the input event on the screen is determined, so as to determine whether the user performs an illegal operation. The technical scheme can effectively judge whether the operation of the user on the application program is manual operation or script operation, by taking the game application program as an example, the non-compliant behaviors of the user for hanging up, swiping coins and the like by using the script can be detected, and the operator can perform corresponding penalty according to the detected illegal operation of the user.
It should be noted that:
the algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose devices may be used with the teachings herein. The required structure for constructing such a device will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the apparatus for verifying operational legitimacy and the apparatus for reinforcing an installation package according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The embodiment of the invention discloses A1 and a method for verifying operation validity, wherein the method comprises the following steps:
after the application program runs, acquiring and storing an input event on a screen of the intelligent terminal;
acquiring a response event of the application program;
when a response event of the application program is acquired, judging whether an input event matched with the response event exists in the stored input events;
if not, judging that the user performs illegal operation.
A2, the method as in A1, wherein the acquiring and saving input events on the screen of the intelligent terminal comprises:
and when the input event on the screen of the intelligent terminal is acquired, correspondingly storing the input event and the current time.
A3 the method of A1, wherein,
the input event is an input event associated with the application.
A4, the method as in A3, wherein the acquiring and saving input events on the screen of the intelligent terminal comprises:
and acquiring and storing the input event of the application program in the picture range displayed on the screen of the intelligent terminal.
A5, the method as in A1, wherein the obtaining response events of the application program comprises:
acquiring an execution event of a designated function in the application program; the specified function is a function for refreshing the content displayed on the screen by the application program.
A6, the method of a1, wherein the method further comprises:
presetting a matching relation table of input events and response events of an application program;
the judging whether there is an input event matched with the response event in the stored input events comprises:
determining an input event matched with the response event according to the matching relation table;
and searching the input events matched with the stored input events.
A7 the method of A6, wherein,
the illegal operation performed by the user is as follows: illegal script operations of the matched input events are not performed.
A8, the method of a1, wherein the method further comprises:
and reporting the information of the illegal operation of the user to a server of the application program.
A9, the method as in A8, wherein the information that the user has performed illegal actions includes at least one of:
the version number of the application program;
signature information of the application;
account information of a user who has logged in the application;
response events for applications that did not find a matching input event.
A10, the method of A8, wherein the method further comprises:
receiving an instruction issued by a server of the application program, and executing corresponding operation on the application program; the instructions include at least one of:
displaying prompt information for stopping illegal operation;
acquiring the latest version of the application program from the server of the application program, and updating the application program;
and forcibly logging off the user account.
The embodiment of the invention also discloses B11 and a method for reinforcing the installation package, wherein the method comprises the following steps:
packaging verification code into an installation package of an application, the verification code adapted to perform the method of any of A1-A10.
B12, the method according to B11, wherein the method further comprises:
performing decompiling on an installation package of an application program to obtain an intermediate assembly code of the application program;
traversing the intermediate assembly code to obtain at least one system callback interface function;
the packaging of the verification code into the installation package of the application program comprises: and packaging the verification code corresponding to the system callback interface function into an installation package of the application program.
B13, the method according to B12, wherein,
the system callback interface function is: an onTouch () function in an Activity component, and/or a handle _ input function.
The embodiment of the invention also discloses C14, a device for verifying operation validity, wherein the device comprises:
the input event acquisition unit is suitable for acquiring and storing the input event on the screen of the intelligent terminal after the application program runs;
the response event acquisition unit is suitable for acquiring a response event of the application program;
the verification unit is suitable for judging whether an input event matched with the response event exists in the stored input events or not when the response event acquisition unit acquires the response event of the application program; if not, judging that the user performs illegal operation.
C15, the device of C14, wherein,
the input event acquisition unit is suitable for correspondingly storing the input event and the current time when the input event on the screen of the intelligent terminal is acquired.
C16, the device of C14, wherein,
the input event is an input event associated with the application.
C17, the device of C16, wherein,
the input event acquisition unit is suitable for acquiring and storing the input events of the application program in the picture range displayed on the screen of the intelligent terminal.
C18, the device of C14, wherein,
the response event acquisition unit is suitable for acquiring an execution event of a specified function in the application program; the specified function is a function for refreshing the content displayed on the screen by the application program.
C19, the device of C14, wherein,
the verification unit comprises a matching relation table of a preset input event and a response event of the application program; the verification unit is specifically adapted to determine an input event matching the response event according to the matching relationship table, and search for the matched input event from the stored input events.
C20, the device of C19, wherein,
the illegal operation performed by the user is as follows: illegal script operations of the matched input events are not performed.
C21, the apparatus of C14, wherein the apparatus further comprises:
and the countermeasure unit is suitable for reporting the information of the illegal operation of the user to the server of the application program.
C22, the apparatus according to C21, wherein the information that the user performed illegal actions includes at least one of:
the version number of the application program;
signature information of the application;
account information of a user who has logged in the application;
response events for applications that did not find a matching input event.
C23, the device of C21, wherein,
the countermeasure unit is also suitable for receiving an instruction sent by the server of the application program and executing corresponding operation on the application program; the instructions include at least one of: displaying prompt information for stopping illegal operation; acquiring the latest version of the application program from the server of the application program, and updating the application program; and forcibly logging off the user account.
The embodiment of the invention also discloses D24 and a device for reinforcing the installation package, wherein the device comprises:
and the packaging unit is suitable for packaging the device for verifying the operation validity as described in any one of C14-C23 into the installation package of the application program.
D25, the apparatus of D24, wherein the apparatus further comprises:
the decompiling unit is suitable for performing decompiling on the installation package of the application program to obtain an intermediate assembly code of the application program;
the function searching unit is suitable for traversing the intermediate assembly code to obtain at least one system callback interface function;
and the packaging unit is suitable for packaging the device for verifying the operation legality corresponding to the system callback interface function into an installation package of an application program.
D26, the device of D25, wherein,
the system callback interface function is: an onTouch () function in an Activity component, and/or a handle _ input function.

Claims (26)

1. A method of verifying the legitimacy of an operation, wherein the method comprises:
after the application program runs, acquiring and storing an input event on a screen of the intelligent terminal;
acquiring a response event of the application program;
when a response event of the application program is acquired, judging whether an input event matched with the response event exists in the stored input events;
if not, judging that the user performs illegal operation.
2. The method of claim 1, wherein the acquiring and saving the input event on the screen of the smart terminal comprises:
and when the input event on the screen of the intelligent terminal is acquired, correspondingly storing the input event and the current time.
3. The method of claim 1, wherein,
the input event is an input event associated with the application.
4. The method of claim 3, wherein the acquiring and saving the input event on the screen of the smart terminal comprises:
and acquiring and storing the input event of the application program in the picture range displayed on the screen of the intelligent terminal.
5. The method of claim 1, wherein the obtaining a response event for an application comprises:
acquiring an execution event of a designated function in the application program; the specified function is a function for refreshing the content displayed on the screen by the application program.
6. The method of claim 1, wherein the method further comprises:
presetting a matching relation table of input events and response events of an application program;
the judging whether there is an input event matched with the response event in the stored input events comprises:
determining an input event matched with the response event according to the matching relation table;
and searching the matched input event in the stored input events.
7. The method of claim 6, wherein,
the illegal operation performed by the user is as follows: illegal script operations of the matched input events are not performed.
8. The method of claim 1, wherein the method further comprises:
and reporting the information of the illegal operation of the user to a server of the application program.
9. The method of claim 8, wherein the information that the user performed the illegal action comprises at least one of:
the version number of the application program;
signature information of the application;
account information of a user who has logged in the application;
response events for applications that did not find a matching input event.
10. The method of claim 8, wherein the method further comprises:
receiving an instruction issued by a server of the application program, and executing corresponding operation on the application program; the instructions include at least one of:
displaying prompt information for stopping illegal operation;
acquiring the latest version of the application program from the server of the application program, and updating the application program;
and forcibly logging off the user account.
11. A method of reinforcing an installation package, wherein the method comprises:
packaging authentication code into an installation package of an application, the authentication code adapted to perform the method of any of claims 1-10.
12. The method of claim 11, wherein the method further comprises:
performing decompiling on an installation package of an application program to obtain an intermediate assembly code of the application program;
traversing the intermediate assembly code to obtain at least one system callback interface function;
the packaging of the verification code into the installation package of the application program comprises: and packaging the verification code corresponding to the system callback interface function into an installation package of the application program.
13. The method of claim 12, wherein,
the system callback interface function is: an onTouch () function in an Activity component, and/or a handle _ input function.
14. An apparatus for verifying operation legitimacy, wherein the apparatus comprises:
the input event acquisition unit is suitable for acquiring and storing the input event on the screen of the intelligent terminal after the application program runs;
the response event acquisition unit is suitable for acquiring a response event of the application program;
the verification unit is suitable for judging whether an input event matched with the response event exists in the stored input events or not when the response event acquisition unit acquires the response event of the application program; if not, judging that the user performs illegal operation.
15. The apparatus of claim 14, wherein,
the input event acquisition unit is suitable for correspondingly storing the input event and the current time when the input event on the screen of the intelligent terminal is acquired.
16. The apparatus of claim 14, wherein,
the input event is an input event associated with the application.
17. The apparatus of claim 16, wherein,
the input event acquisition unit is suitable for acquiring and storing the input events of the application program in the picture range displayed on the screen of the intelligent terminal.
18. The apparatus of claim 14, wherein,
the response event acquisition unit is suitable for acquiring an execution event of a specified function in the application program; the specified function is a function for refreshing the content displayed on the screen by the application program.
19. The apparatus of claim 14, wherein,
the verification unit comprises a matching relation table of a preset input event and a response event of the application program; the verification unit is specifically adapted to determine an input event matching the response event according to the matching relationship table, and search the matched input event in the stored input events.
20. The apparatus of claim 19, wherein,
the illegal operation performed by the user is as follows: illegal script operations of the matched input events are not performed.
21. The apparatus of claim 14, wherein the apparatus further comprises:
and the countermeasure unit is suitable for reporting the information of the illegal operation of the user to the server of the application program.
22. The apparatus of claim 21, wherein the information that the user performed the illegal operation comprises at least one of:
the version number of the application program;
signature information of the application;
account information of a user who has logged in the application;
response events for applications that did not find a matching input event.
23. The apparatus of claim 21, wherein,
the countermeasure unit is also suitable for receiving an instruction sent by the server of the application program and executing corresponding operation on the application program; the instructions include at least one of: displaying prompt information for stopping illegal operation; acquiring the latest version of the application program from the server of the application program, and updating the application program; and forcibly logging off the user account.
24. An apparatus for reinforcing an installation package, wherein the apparatus comprises:
a packaging unit adapted to package the apparatus for verifying validity of an operation according to any one of claims 14 to 23 into an installation package of an application.
25. The apparatus of claim 24, wherein the apparatus further comprises:
the decompiling unit is suitable for performing decompiling on the installation package of the application program to obtain an intermediate assembly code of the application program;
the function searching unit is suitable for traversing the intermediate assembly code to obtain at least one system callback interface function;
and the packaging unit is suitable for packaging the device for verifying the operation legality corresponding to the system callback interface function into an installation package of an application program.
26. The apparatus of claim 25, wherein,
the system callback interface function is: an onTouch () function in an Activity component, and/or a handle _ input function.
CN201611111682.9A 2016-12-06 2016-12-06 Method and device for verifying operation validity and method and device for reinforcing installation package Active CN106693366B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611111682.9A CN106693366B (en) 2016-12-06 2016-12-06 Method and device for verifying operation validity and method and device for reinforcing installation package

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611111682.9A CN106693366B (en) 2016-12-06 2016-12-06 Method and device for verifying operation validity and method and device for reinforcing installation package

Publications (2)

Publication Number Publication Date
CN106693366A CN106693366A (en) 2017-05-24
CN106693366B true CN106693366B (en) 2020-04-21

Family

ID=58937580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611111682.9A Active CN106693366B (en) 2016-12-06 2016-12-06 Method and device for verifying operation validity and method and device for reinforcing installation package

Country Status (1)

Country Link
CN (1) CN106693366B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108733193B (en) * 2018-03-27 2020-06-30 Oppo广东移动通信有限公司 Method and device for intelligently adjusting frame rate, storage medium and intelligent terminal
CN113996058B (en) * 2021-11-01 2023-07-25 腾讯科技(深圳)有限公司 Information processing method, apparatus, electronic device, and computer-readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105426761A (en) * 2015-11-18 2016-03-23 广东欧珀移动通信有限公司 Identification method for illegal application and mobile terminal
CN105530101A (en) * 2016-02-29 2016-04-27 宇龙计算机通信科技(深圳)有限公司 Fingerprint authentication method and device
CN105871867A (en) * 2016-04-27 2016-08-17 腾讯科技(深圳)有限公司 Identity authentication method, system and equipment
CN105999702A (en) * 2016-05-23 2016-10-12 浙江工业大学 Webgame archiving and restoring method based on data repeating mechanism

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140100989A1 (en) * 2012-10-04 2014-04-10 Valuerz, Inc. Systems and methods for deetermining a fair price range for commodities

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105426761A (en) * 2015-11-18 2016-03-23 广东欧珀移动通信有限公司 Identification method for illegal application and mobile terminal
CN105530101A (en) * 2016-02-29 2016-04-27 宇龙计算机通信科技(深圳)有限公司 Fingerprint authentication method and device
CN105871867A (en) * 2016-04-27 2016-08-17 腾讯科技(深圳)有限公司 Identity authentication method, system and equipment
CN105999702A (en) * 2016-05-23 2016-10-12 浙江工业大学 Webgame archiving and restoring method based on data repeating mechanism

Also Published As

Publication number Publication date
CN106693366A (en) 2017-05-24

Similar Documents

Publication Publication Date Title
US10397262B2 (en) Device, system, and method of detecting overlay malware
US20200143051A1 (en) Security scanning method and apparatus for mini program, and electronic device
CN106406961B (en) Method and device for loading and providing application program based on browser
Sahami Shirazi et al. Insights into layout patterns of mobile user interfaces by an automatic analysis of android apps
Kiss et al. Kharon dataset: Android malware under a microscope
CN106453509B (en) Processing method that browser is closed extremely, system, browser and server
CN104050417A (en) Method and device for detecting software states at mobile terminal
JP2013545172A (en) Device and method for providing a software program adapted to a computer system downloaded by a user
CN104036019A (en) Method and device for opening webpage links
CN106693366B (en) Method and device for verifying operation validity and method and device for reinforcing installation package
CN106487793A (en) application installation method and device
KR20190113050A (en) Method and system for automatic configuration test case generation of mobile application
US20100077385A1 (en) Debugger exception filtering with target-based rules
CN112231198B (en) Malicious process debugging method and device, electronic equipment and medium
CN106250761A (en) A kind of unit identifying web automation tools and method
CN108121650B (en) Method and device for testing page user interface
CN102446253B (en) Webpage trojan detection method and system
CN108509228B (en) Page loading method, terminal equipment and computer readable storage medium
CN105512552B (en) Parameter detection method and device
US10839066B1 (en) Distinguishing human from machine input using an animation
CN111385661B (en) Method, device, terminal and storage medium for voice control of full screen playing
CN104391880A (en) Method for intercepting business object and client
CN109543407B (en) Activity hijacking interception method and device
CN107621939B (en) Application optimization method and device
US11119748B2 (en) Method and apparatus for operating a mobile application store

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240112

Address after: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.