CN107358071A - Prevent the method and device that function illegally calls in Flash application programs - Google Patents
Prevent the method and device that function illegally calls in Flash application programs Download PDFInfo
- Publication number
- CN107358071A CN107358071A CN201710423105.1A CN201710423105A CN107358071A CN 107358071 A CN107358071 A CN 107358071A CN 201710423105 A CN201710423105 A CN 201710423105A CN 107358071 A CN107358071 A CN 107358071A
- Authority
- CN
- China
- Prior art keywords
- function
- stack information
- allocating stack
- object function
- legal
- 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
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000006870 function Effects 0.000 claims description 299
- 238000004590 computer program Methods 0.000 claims description 17
- 238000003860 storage Methods 0.000 claims description 9
- 238000013507 mapping Methods 0.000 claims description 8
- 238000004364 calculation method Methods 0.000 claims 1
- 230000007246 mechanism Effects 0.000 description 4
- 230000011514 reflex Effects 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000013515 script Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 230000004217 heart function Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000001681 protective effect Effects 0.000 description 1
- 238000004549 pulsed laser deposition Methods 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000009897 systematic effect Effects 0.000 description 1
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/10—Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
- G06F21/12—Protecting executable software
- G06F21/14—Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation
-
- 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/10—Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
- G06F21/12—Protecting executable software
- G06F21/121—Restricting unauthorised execution of programs
- G06F21/125—Restricting unauthorised execution of programs by manipulating the program code, e.g. source code, compiled code, interpreted code, machine code
Abstract
The embodiments of the invention provide a kind of method and device for preventing that function illegally calls in Flash application programs, wherein, this method includes:Obtain the current allocating stack information for the object function being called in Flash application programs;Judge whether the current allocating stack information is legal allocating stack information corresponding to the object function, and the legal allocating stack information is the allocating stack information when object function is called by the Flash application programs itself;If the current allocating stack information is legal allocating stack information corresponding to the object function, it is determined that the object function normally performs the object function by legal calling.The method and device provided in an embodiment of the present invention for preventing that function illegally calls in Flash application programs, the core function of Flash application programs can be effectively protected, prevents it from illegally being called by third party's program.
Description
Technical field
The present invention relates to technical field of the computer network, more particularly to one kind to prevent that function is illegal in Flash application programs
The method and device of calling.
Background technology
At present, the technical fields such as Flash is widely used in webpage design, web animation makes and video web page plays.
Most video website includes webcast website all using Flash as its video player, and most web game
Also can be developed using Flash.
Flash is developed using ActionScript scripts, due to the characteristic of its script, causes its non-
Chang Rongyi by decompiling, so as to from the SWF files finally issued decompiling check its source code, and find its each function
The application method of interface and interface.Wherein SWF files are Flash execution files.Simultaneously as Flash has reflex mechanism
Principle, so as to get all function interfaces of SWF files from the SWF files finally issued, pass through reflex mechanism
Its function interface function can be then called, third party's program then can directly use the function of the SWF.For example, it can make in Flash
With resource file, and generally resource file is using being transmitted in a network after encryption, and when Flash uses resource file, then
First resource file can be decrypted, could normal use after decryption.So it can then be write in Flash SWF files corresponding
Resource file decryption interface.And HACK then first can directly obtain SWF files, SWF files are then checked by decompiling
Decryption interface, the interface is then directly invoked by reflex mechanism to realize the decryption to resource file, so as to obtain
To original resource file.
Therefore, how a kind of interface function that can protect Flash application programs is provided, prevents it by other third party's journeys
The method that sequence is illegally called is significant.
The content of the invention
In view of the above problems, it is proposed that the present invention so as to provide one kind overcome above mentioned problem or at least in part solve on
State function illegally calls in Flash application programs the method and device of preventing of problem.
One aspect of the present invention, there is provided a kind of method for preventing that function illegally calls in Flash application programs, bag
Include:
Obtain the current allocating stack information for the object function being called in Flash application programs;
Judge whether the current allocating stack information is legal allocating stack information corresponding to the object function, it is described
Legal allocating stack information is the allocating stack information when object function is called by the Flash application programs itself;
If the current allocating stack information is legal allocating stack information corresponding to the object function, it is determined that described
Object function normally performs the object function by legal calling.
Wherein, if the current allocating stack information is not legal allocating stack information corresponding to the object function, also
Including:
Determine that the object function is illegally called, and terminate the execution of the object function.
Wherein, it is described to judge whether the current allocating stack information is legal allocating stack corresponding to the object function
Information, including:
Legal allocating stack information list, the mapping according to corresponding to object function described in default mapping relationship searching
Relation includes the corresponding relation between object function and corresponding legal allocating stack information list;
Judge whether include the current allocating stack information in the legal allocating stack information list;
If the legal allocating stack information list includes the current allocating stack information, it is determined that the current tune
It is legal allocating stack information corresponding to the object function with stack information.
Wherein, before the current allocating stack information for the object function being called in the acquisition Flash application programs,
Also include:
Judge whether the object function belongs to preassigned core function;
If the object function belongs to preassigned core function, quilt in the acquisition Flash application programs is performed
The step of current allocating stack information of the object function of calling.
Wherein, the preassigned core function is specified including resource decryption function, data encrypting and deciphering function and user
Function.
Wherein, the current allocating stack information for the object function being called in the acquisition Flash application programs, including:
Addition in advance is called to obtain the current allocating stack in the Flash power functions of the object function specified location
Information, the Flash power functions are the function for obtaining function call stack information write in advance.
Wherein, after the execution for terminating the object function, in addition to:
Generation is illegal to call prompt message, and the illegal calling prompt message is reported into server.
Another aspect of the present invention, there is provided a kind of device for preventing that function illegally calls in Flash application programs, bag
Include:
Acquisition module, for obtaining the current allocating stack information for the object function being called in Flash application programs;
Determination module, for judging whether the current allocating stack information is legal calling corresponding to the object function
Stack information, the legal allocating stack information are the tune when object function is called by the Flash application programs itself
Use stack information;
Execution module, for being that current allocating stack information is the object function when the result of determination of the determination module
During corresponding legal allocating stack information, the object function is determined by legal calling, and normally perform the object function.
In addition, present invention also offers a kind of computer-readable recording medium, computer program is stored thereon with, the program
The step of method as described above is realized when being executed by processor.
In addition, present invention also offers a kind of computer equipment, including memory, processor and storage are on a memory simultaneously
The computer program that can be run on a processor, the step of realizing method as described above during the computing device described program.
The method and device provided in an embodiment of the present invention for preventing that function illegally calls in Flash application programs, by sentencing
Whether settled preceding allocating stack information is legal allocating stack information corresponding to object function, if current allocating stack information is mesh
Corresponding to scalar functions during legal allocating stack information, object function is determined by legal calling, and normally perform the work(of the function
Energy.The embodiment of the present invention can effectively protect the core function of Flash application programs, prevent it from illegally being adjusted by third party's program
With lifting Consumer's Experience.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention,
And can be practiced according to the content of specification, and in order to allow above and other objects of the present invention, feature and advantage can
Become apparent, below especially exemplified by the embodiment of the present invention.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, it is various other the advantages of and benefit it is common for this area
Technical staff will be clear understanding.Accompanying drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the present invention
Limitation.And in whole accompanying drawing, identical part is denoted by the same reference numerals.In the accompanying drawings:
Fig. 1 is a kind of flow chart for preventing the method that function illegally calls in Flash application programs of the embodiment of the present invention;
Fig. 2 is that a kind of of the embodiment of the present invention prevents step S12 in the method that function illegally calls in Flash application programs
Subdivision flow chart;
Fig. 3 is that a kind of structure for preventing the device that function illegally calls in Flash application programs of the embodiment of the present invention is shown
It is intended to;
Fig. 4 is the schematic diagram of the computer equipment of the embodiment of the present invention.
Embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in accompanying drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
Limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
Completely it is communicated to those skilled in the art.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technology art
Language and scientific terminology), there is the general understanding identical meaning with the those of ordinary skill in art of the present invention.Should also
Understand, those terms defined in such as general dictionary, it should be understood that have with the context of prior art
The consistent meaning of meaning, and unless by specific definitions, otherwise will not be explained with the implication of idealization or overly formal.
Fig. 1 diagrammatically illustrates function illegally calls in Flash application programs the side of preventing of one embodiment of the invention
The flow chart of method.Reference picture 1, the embodiment of the present invention prevent the method that function illegally calls in Flash application programs from specifically wrapping
Include following steps:
Step S11, the current allocating stack information for the object function being called in Flash application programs is obtained.
Wherein, allocating stack information is exactly the call chain of function, i.e., from first function to currently called target letter
The function name of several all functions, is sorted according to sequencing, in the problem of positioning program error, can find program
Which called at first from function, so as to find the starting function of function call.The embodiment of the present invention passes through in Flash
A kind of power function is provided in application program to obtain the allocating stack information of current function.
Step S12, judge whether the current allocating stack information is legal allocating stack corresponding to the object function
Information, the legal allocating stack information are the calling heap when object function is called by the Flash application programs itself
Stack information.
For the power function in Flash application programs, its allocating stack information is fixed, and all functions occur
In call chain is all the power function for belonging to Flash program itself.And if third party HACK is by obtaining Flash file
And the power function in Flash application programs is called by reflex mechanism, then the superiors' function of its allocating stack information
(most starting function) must be the code for belonging to HACK, be not belonging to of Flash itself code, the i.e. allocating stack of the function
Beginning function name is to belong to HACK function, is not belonging to Flash itself function.Therefore, crucial letter is passed through in the embodiment of the present invention
Several call chains can be good at distinguishing called object function be itself program code of Flash application programs calling or
HACK programs are being called.Further, the embodiment of the present invention can be applied object function by the Flash to each function
Allocating stack information when program itself is called stores, as legal allocating stack information, then in each function call
When obtain its current stack recalls information, then whether current allocating stack information is legal calling corresponding to the object function
Stack information.If the current allocating stack information is legal allocating stack information corresponding to the object function, step is performed
Rapid S13, if the current allocating stack information is not legal allocating stack information corresponding to the object function, perform step
S14;
Step S13, the object function is determined by legal calling, and normally performs the object function.
Step S14, determine that the object function is illegally called, and terminate the execution of the object function, so that can not
Use the Core Feature function.
The embodiment of the present invention, believed by the current allocating stack for obtaining the object function being called in Flash application programs
Breath, and the current allocating stack information of object function is judged, judge its legitimacy, the normal execution core if legal
The function of heart function, the function of performing the core function is otherwise terminated, and then effectively protect the core letter of Flash application programs
Number, prevents it from illegally being called by third party's program, lifts Consumer's Experience.
Further, the method provided in an embodiment of the present invention for preventing that function illegally calls in Flash application programs, in institute
It is further comprising the steps of after stating the execution for terminating the object function:
Generation is illegal to call prompt message, and the illegal calling prompt message is reported into server.
The embodiment of the present invention, for being illegal function call, illegal calling prompt message can also be generated, by this information
Notification server, illustrate that active client has illegal calling core function, so as to which server can carry out phase to the user
The punitive measures answered.
In the present embodiment, whether the judgement current allocating stack information in step S12 is that the object function is corresponding
Legal allocating stack information, specifically include implemented below step:
Step S121, legal allocating stack information row corresponding to the object function according to default mapping relationship searching
Table, the mapping relations include the corresponding relation between object function and corresponding legal allocating stack information list;
Step S122, judge whether include the current allocating stack information in the legal allocating stack information list;
If step S123, described legal allocating stack information list includes the current allocating stack information, it is determined that
The current allocating stack information is legal allocating stack information corresponding to the object function.
In the embodiment of the present invention, for object function function, the acquisition to the allocating stack information of the function is added, so as to
The all possible legal allocating stack information of each core function is obtained, and these information are stored, and works as Flash
When program is issued, its current function call stack information can be obtained for each calling of each core function, and ought
Before the information that gets contrast previously stored legal stack information, if the stack information currently obtained is believed in legal storehouse
Ceasing in list, then explanation is legal calling, is otherwise illegally to call, for being that then the core function directly returns illegal calling,
So as to can not the proper use of core function function, be otherwise that legal call then normally performs the function logic of the function.Together
When it is further, for being the discovery that illegal recalls information can also be sent to server by illegal calls, so as to server
Some punitive measures etc. can be carried out to the user.
In the present embodiment, the current allocating stack letter for the object function being called in the acquisition Flash application programs
It is further comprising the steps of before breath:
Judge whether the object function belongs to preassigned core function.Wherein, the preassigned core letter
Number includes the function that resource decryption function, data encrypting and deciphering function and user specify.
If the object function belongs to preassigned core function, quilt in the acquisition Flash application programs is performed
The step of current allocating stack information of the object function of calling.
Because the protection to function needs to consume performance and needs to write corresponding code to the function, therefore, in order to subtract
Few systematic function consumes and excessive Code Edit, in the embodiment of the present invention, can select some cores from Flash codes first
Function, these core functions are protected.Specifically, by only being protected to preassigned core function, realize
The protection of counterweight point function.Other unessential functions can not then be protected to it.Wherein, in Flash existing function
In select the core function of key, it is main to include selecting resource decryption function, data encrypting and deciphering letter from Flash existing function
Number, or the important function in Flash program specified by user, realize and some crucial cores are picked out from Flash
The function of the heart carries out follow-up relay protective scheme.
Accordingly, before the current allocating stack information for the object function being called in obtaining Flash application programs, need
Judge whether the object function belongs to preassigned core function, it is right if called object function is core function
It is called the acquisition of stack information.
In the present embodiment, the current calling heap for the object function being called in the acquisition Flash application programs in step S11
Stack information, specifically include implemented below step:Addition in advance is called in the Flash power functions of the object function specified location
The current allocating stack information is obtained, the Flash power functions are that the function call storehouse that is used to obtain write in advance is believed
The function of breath.
In one embodiment, first, the power function for obtaining function call stack information is write.It is implemented as follows:
The allocating stack information of current function is obtained by using the component functions of Flash offers, so as to be follow-up acquisition target
The allocating stack information of function provides support.Interface function is named as GetFunctionStack, is implemented as follows:
String GetFunctionStack()
{
varcurError:Error=new Error ();
An Error components curError is defined first.
varstackTrace:String=curError.getStackTrace ();
Return stackTrace;
}
Then, believed by the interface function getStackTrace of Error components to obtain the allocating stack of current function
Breath.Believe it can be seen that calling this interface function then to get the whole allocating stack of respective function in other any functions
Breath.
Wherein, then store stack information in stackTrace.
Afterwards, above-mentioned interface function GetFunctionStack is called to obtain heap in Flash each core function
Stack information.
In above-mentioned steps, picked some core functions, in this step then can in each core function letter
The interface function write before is removed to call to obtain the allocating stack information of current function in the places that number starts, and by stack information
Print, so as to get at least one allocating stack information corresponding to the function.
Technical solution of the present invention is clearly demonstrated below by a specific embodiment.In the present embodiment, with
Exemplified by Flash video players, it is assumed that existing function A, function B, function C in Flash video players, wherein function C is one
Individual core function.
Wherein, present function calling relationship is function A call function B, and function B can call function C.So in crucial letter
The function of obtaining stack information is added in number C, and stack information is printed.So its stack information obtained is:Function C
Title-function B title-function A title, so as to be known that function C allocating stack is that C to B arrives A certainly.First assume
HACK can also want to call core function C, then it can write code and carry out call function C, it is assumed that its code function write is
D, then the function call stack information got in Key Functions C is then:Function C title function D title.Therefore,
The stack information that its allocating stack information and the function A of itself are called is different, so as to discriminant function D call functions
It is an illegal calling during C.
In the present embodiment, core function C all letters can then be got by the allocating stack information of printf
Number allocating stack information, so as to obtain the allocating stack information of normal procedure, realize and acquisition heap is called in Key Functions
The interface of stack information obtains the allocating stack information of core function, should so as to get that normal Flash program calls
The stack information of core function.
In the present embodiment, print its allocating stack information to each core function, and by a program using variable come
Preserve all storehouse recalls informations of each core function in application.It is specific as follows:
The present embodiment, use STL container list<string>To store all allocating stack information.It can wherein use
list<string>To store the allocating stack information of acquisition, and then identical stack information is then filtered out.For each
Core function all defines a list<string>Variable stores allocating stack information, realizes all of each core function
The access of storehouse recalls information.
When Flash application programs perform, if the function currently called is a core function, then in core function
It is middle to obtain current allocating stack information, it can remove list after getting allocating stack information<string>It is middle to search current heap
Stack information whether there is, and is a legal allocating stack if there is then explanation, then normally performs the logic of the function, no
It is then the allocating stack of an exception, so as to terminate continuing executing with for the function.It is implemented as follows:
String stackinfo=GetFunctionStack ();
Obtain the allocating stack information of current function.
Then go to travel through list<string>The stack information of middle storage, if wherein have with as current storehouse if be
It is legal, otherwise it is illegal.
For embodiment of the method, in order to be briefly described, therefore it is all expressed as to a series of combination of actions, but this area
Technical staff should know that the embodiment of the present invention is not limited by described sequence of movement, because implementing according to the present invention
Example, some steps can use other orders or carry out simultaneously.Secondly, those skilled in the art should also know, specification
Described in embodiment belong to preferred embodiment, necessary to the involved action not necessarily embodiment of the present invention.
Fig. 3 diagrammatically illustrates function illegally calls in Flash application programs the dress of preventing of one embodiment of the invention
The structural representation put.Reference picture 3, the embodiment of the present invention prevent the device that function illegally calls in Flash application programs from having
Body includes acquisition module 301, determination module 302 and execution module 303, wherein, acquisition module 301 should for obtaining Flash
With the current allocating stack information for the object function being called in program;Determination module 302, for judging the current calling heap
Whether stack information is legal allocating stack information corresponding to the object function, and the legal allocating stack information is the target
Allocating stack information when function is called by the Flash application programs itself;Execution module 303, for when the judgement mould
The result of determination of block 302 is current allocating stack information when being legal allocating stack information corresponding to the object function, it is determined that
The object function normally performs the object function by legal calling.
In an alternate embodiment of the present invention where, execution module 303, it is additionally operable to the judgement when the determination module 302
When not being as a result legal allocating stack information corresponding to the object function for current allocating stack information, the target letter is determined
Number is illegally called, and terminates the execution of the object function.
Further, what is proposed in the present embodiment prevents from also wrapping in the device that function illegally calls in Flash application programs
The reminding module not shown in accompanying drawing is included, the reminding module is used to terminate holding for the object function in the execution module 303
After row, illegal calling prompt message is generated, the illegal calling prompt message is reported into server.
In an alternate embodiment of the present invention where, determination module 302, including searching unit, identifying unit and determination
Unit, wherein:Searching unit, for legal allocating stack letter corresponding to the object function according to default mapping relationship searching
List is ceased, the mapping relations include the corresponding relation between object function and corresponding legal allocating stack information list;
Identifying unit, for judging whether include the current allocating stack information in the legal allocating stack information list;It is determined that
Unit, for when the legal allocating stack information list includes the current allocating stack information, determining described current
Allocating stack information is legal allocating stack information corresponding to the object function.
What is proposed in the present embodiment prevents from also including in accompanying drawing not in the device that function illegally calls in Flash application programs
The pre- judge module shown, the pre- judge module, for being called in obtaining Flash application programs in the acquisition module 301
Object function current allocating stack information before, judge whether the object function belongs to preassigned core function,
If the object function belongs to preassigned core function, acquisition module 301 is performed in the acquisition Flash application programs
The operation of the current allocating stack information of called object function.
In the present embodiment, the preassigned core function includes but is not limited to resource decryption function, data encrypting and deciphering
Function that function and user specify etc..
In the present embodiment, acquisition module 301 is specifically used for calling addition in advance in the object function specified location
Flash power functions obtain the current allocating stack information, and the Flash power functions are to write in advance for obtaining letter
The function of number allocating stack information.
For device embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, it is related
Part illustrates referring to the part of embodiment of the method.
Device embodiment described above is only schematical, wherein the unit illustrated as separating component can
To be or may not be physically separate, it can be as the part that unit is shown or may not be physics list
Member, you can with positioned at a place, or can also be distributed on multiple NEs.It can be selected according to the actual needs
In some or all of module realize the purpose of this embodiment scheme.Those of ordinary skill in the art are not paying creativeness
Work in the case of, you can to understand and implement.
The method and device provided in an embodiment of the present invention for preventing that function illegally calls in Flash application programs, by sentencing
Whether settled preceding allocating stack information is legal allocating stack information corresponding to object function, if current allocating stack information is mesh
Corresponding to scalar functions during legal allocating stack information, object function is determined by legal calling, and normally perform the work(of the function
Energy.The embodiment of the present invention can effectively protect the core function of Flash application programs, prevent it from illegally being adjusted by third party's program
With lifting Consumer's Experience.
In addition, the embodiment of the present invention additionally provides a kind of computer-readable recording medium, computer program is stored thereon with,
The step of program realizes method as described above when being executed by processor.
In the present embodiment, module/unit that the device for preventing that function illegally calls in Flash application programs integrates is such as
Fruit realized in the form of SFU software functional unit and as independent production marketing or in use, a computer can be stored in can
Read in storage medium.Based on such understanding, the present invention realizes all or part of flow in above-described embodiment method, also may be used
To instruct the hardware of correlation to complete by computer program, described computer program can be stored in one and computer-readable deposit
In storage media, the computer program when being executed by processor, can be achieved above-mentioned each embodiment of the method the step of.Wherein, institute
Stating computer program includes computer program code, and the computer program code can be source code form, object identification code shape
Formula, executable file or some intermediate forms etc..The computer-readable medium can include:The computer journey can be carried
Any entity or device of sequence code, recording medium, USB flash disk, mobile hard disk, magnetic disc, CD, computer storage, read-only storage
Device (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal,
Telecommunication signal and software distribution medium etc..It should be noted that the content that the computer-readable medium includes can basis
Legislation and the requirement of patent practice carry out appropriate increase and decrease in jurisdiction, such as in some jurisdictions, according to legislation
And patent practice, computer-readable medium do not include electric carrier signal and telecommunication signal.
Fig. 4 is the schematic diagram of computer equipment provided in an embodiment of the present invention.Computer provided in an embodiment of the present invention is set
It is standby, including memory 401, processor 402 and it is stored in the computer journey that can be run on memory 401 and on the processor 402
Sequence, the processor 402 is realized when performing the computer program above-mentioned each prevents that function is illegally adjusted in Flash application programs
Step in embodiment of the method, such as step S11 shown in Fig. 1, obtain the target letter being called in Flash application programs
Several current allocating stack information;Step S12, judge whether the current allocating stack information is corresponding to the object function
Legal allocating stack information, the legal allocating stack information are that the object function is adjusted by the Flash application programs itself
The allocating stack information of used time;If step S13, described current allocating stack information is legal calling corresponding to the object function
Stack information, it is determined that the object function normally performs the object function by legal calling.Or the processor
The above-mentioned device embodiment for respectively preventing that function illegally calls in Flash application programs is realized during the 402 execution computer program
In each module/unit function, such as acquisition module 301, determination module 302 and execution module 303 shown in Fig. 3.
Exemplary, the computer program can be divided into one or more module/units, one or more
Individual module/unit is stored in the memory, and by the computing device, to complete the present invention.It is one or more
Individual module/unit can be the series of computation machine programmed instruction section that can complete specific function, and the instruction segment is used to describe institute
State computer program it is described prevent the device that function illegally calls in Flash application programs in implementation procedure.It is for example, described
Computer program can be divided into acquisition module, determination module and execution module, and each module concrete function is as follows:Obtain mould
Block, for obtaining the current allocating stack information for the object function being called in Flash application programs;Determination module, for sentencing
Whether the fixed current allocating stack information is legal allocating stack information corresponding to the object function, the legal calling heap
Stack information is the allocating stack information when object function is called by the Flash application programs itself;Execution module, it is used for
When the result of determination of the determination module is that current allocating stack information is legal allocating stack letter corresponding to the object function
During breath, the object function is determined by legal calling, and normally perform the object function.
The computer equipment can be that the calculating such as desktop PC, notebook, palm PC and cloud server are set
It is standby.The computer equipment may include, but be not limited only to, processor, memory.It is it will be understood by those skilled in the art that described
Schematic diagram 4 be only computer equipment example, do not form the restriction to computer equipment, can include than illustrate it is more or
Less part, some parts or different parts are either combined, such as the computer equipment can also be defeated including inputting
Go out equipment, network access equipment, bus etc..
Alleged processor can be CPU (Central Processing Unit, CPU), can also be it
His general processor, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other PLDs, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor
Deng the processor is the control centre of the computer equipment, utilizes various interfaces and the whole computer equipment of connection
Various pieces.
The memory can be used for storing the computer program and/or module, and the processor is by running or performing
The computer program and/or module being stored in the memory, and the data being stored in memory are called, described in realization
The various functions of computer equipment.The memory can mainly include storing program area and storage data field, wherein, storage program
Area can storage program area, the application program (such as sound-playing function, image player function etc.) needed at least one function
Deng;Storage data field can store uses created data (such as voice data, phone directory etc.) etc. according to mobile phone.In addition,
Memory can include high-speed random access memory, can also include nonvolatile memory, such as hard disk, internal memory, grafting
Formula hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card
(Flash Card), at least one disk memory, flush memory device or other volatile solid-state parts.
It will be appreciated by those of skill in the art that although some embodiments in this are included included by other embodiments
Some features rather than further feature, but the combination of the feature of different embodiments means to be within the scope of the present invention simultaneously
And form different embodiments.For example, in the following claims, the one of any of embodiment claimed all may be used
Used in a manner of in any combination.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
The present invention is described in detail with reference to the foregoing embodiments, it will be understood by those within the art that:It still may be used
To be modified to the technical scheme described in foregoing embodiments, or equivalent substitution is carried out to which part technical characteristic;
And these modification or replace, do not make appropriate technical solution essence depart from various embodiments of the present invention technical scheme spirit and
Scope.
Claims (10)
- A kind of 1. method for preventing that function illegally calls in Flash application programs, it is characterised in that including:Obtain the current allocating stack information for the object function being called in Flash application programs;Judge whether the current allocating stack information is legal allocating stack information corresponding to the object function, it is described legal Allocating stack information is the allocating stack information when object function is called by the Flash application programs itself;If the current allocating stack information is legal allocating stack information corresponding to the object function, it is determined that the target Function normally performs the object function by legal calling.
- 2. according to the method for claim 1, it is characterised in that if the current allocating stack information is not the target letter Legal allocating stack information corresponding to number, in addition to:Determine that the object function is illegally called, and terminate the execution of the object function.
- 3. method according to claim 1 or 2, it is characterised in that described whether to judge the current allocating stack information For legal allocating stack information corresponding to the object function, including:Legal allocating stack information list, the mapping relations according to corresponding to object function described in default mapping relationship searching Include the corresponding relation between object function and corresponding legal allocating stack information list;Judge whether include the current allocating stack information in the legal allocating stack information list;If the legal allocating stack information list includes the current allocating stack information, it is determined that the current calling heap Stack information is legal allocating stack information corresponding to the object function.
- 4. method according to claim 1 or 2, it is characterised in that be called in the acquisition Flash application programs Before the current allocating stack information of object function, in addition to:Judge whether the object function belongs to preassigned core function;If the object function belongs to preassigned core function, perform in the acquisition Flash application programs and be called Object function current allocating stack information the step of.
- 5. according to the method for claim 4, it is characterised in that the preassigned core function includes resource decryption letter The function that number, data encrypting and deciphering function and user specify.
- 6. according to the method for claim 1, it is characterised in that the target being called in the acquisition Flash application programs The current allocating stack information of function, including:Addition in advance is called to obtain the current allocating stack letter in the Flash power functions of the object function specified location Breath, the Flash power functions are the function for obtaining function call stack information write in advance.
- 7. according to the method for claim 2, it is characterised in that after the execution for terminating the object function, also Including:Generation is illegal to call prompt message, and the illegal calling prompt message is reported into server.
- A kind of 8. device for preventing that function illegally calls in Flash application programs, it is characterised in that including:Acquisition module, for obtaining the current allocating stack information for the object function being called in Flash application programs;Determination module, for judging whether the current allocating stack information is legal allocating stack corresponding to the object function Information, the legal allocating stack information are the calling heap when object function is called by the Flash application programs itself Stack information;Execution module, for being that current allocating stack information is that the object function is corresponding when the result of determination of the determination module Legal allocating stack information when, determine the object function by legal calling, and normally perform the object function.
- 9. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the program is held by processor Realized during row such as the step of any one of claim 1-7 methods described.
- 10. a kind of computer equipment, including memory, processor and storage are on a memory and the meter that can run on a processor Calculation machine program, it is characterised in that realized during the computing device described program such as any one of claim 1-7 methods described Step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710423105.1A CN107358071A (en) | 2017-06-07 | 2017-06-07 | Prevent the method and device that function illegally calls in Flash application programs |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710423105.1A CN107358071A (en) | 2017-06-07 | 2017-06-07 | Prevent the method and device that function illegally calls in Flash application programs |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107358071A true CN107358071A (en) | 2017-11-17 |
Family
ID=60272289
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710423105.1A Pending CN107358071A (en) | 2017-06-07 | 2017-06-07 | Prevent the method and device that function illegally calls in Flash application programs |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107358071A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109426702A (en) * | 2017-08-31 | 2019-03-05 | 武汉斗鱼网络科技有限公司 | IOS platform file reads guard method, storage medium, electronic equipment and system |
CN109635589A (en) * | 2018-12-25 | 2019-04-16 | 成都卫士通信息产业股份有限公司 | The method and device that SO file calls |
CN109711172A (en) * | 2018-06-26 | 2019-05-03 | 360企业安全技术(珠海)有限公司 | Data prevention method and device |
CN110008657A (en) * | 2018-01-05 | 2019-07-12 | 武汉斗鱼网络科技有限公司 | A kind of method, storage medium, electronic equipment and system for protecting web page code |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102651060A (en) * | 2012-03-31 | 2012-08-29 | 北京奇虎科技有限公司 | Method and system for detecting vulnerability |
CN104766015A (en) * | 2015-04-10 | 2015-07-08 | 北京理工大学 | Function call based dynamic detection method for buffer overflow vulnerability |
CN105472417A (en) * | 2015-11-24 | 2016-04-06 | 腾讯科技(深圳)有限公司 | Method of acquiring video player abnormity and apparatus thereof |
CN106650355A (en) * | 2016-12-08 | 2017-05-10 | 武汉斗鱼网络科技有限公司 | Method and device for protecting function call |
-
2017
- 2017-06-07 CN CN201710423105.1A patent/CN107358071A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102651060A (en) * | 2012-03-31 | 2012-08-29 | 北京奇虎科技有限公司 | Method and system for detecting vulnerability |
CN104766015A (en) * | 2015-04-10 | 2015-07-08 | 北京理工大学 | Function call based dynamic detection method for buffer overflow vulnerability |
CN105472417A (en) * | 2015-11-24 | 2016-04-06 | 腾讯科技(深圳)有限公司 | Method of acquiring video player abnormity and apparatus thereof |
CN106650355A (en) * | 2016-12-08 | 2017-05-10 | 武汉斗鱼网络科技有限公司 | Method and device for protecting function call |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109426702A (en) * | 2017-08-31 | 2019-03-05 | 武汉斗鱼网络科技有限公司 | IOS platform file reads guard method, storage medium, electronic equipment and system |
CN109426702B (en) * | 2017-08-31 | 2021-05-28 | 武汉斗鱼网络科技有限公司 | iOS platform file reading protection method, storage medium, electronic device and system |
CN110008657A (en) * | 2018-01-05 | 2019-07-12 | 武汉斗鱼网络科技有限公司 | A kind of method, storage medium, electronic equipment and system for protecting web page code |
CN110008657B (en) * | 2018-01-05 | 2021-07-23 | 武汉斗鱼网络科技有限公司 | Method, storage medium, electronic device and system for protecting webpage code |
CN109711172A (en) * | 2018-06-26 | 2019-05-03 | 360企业安全技术(珠海)有限公司 | Data prevention method and device |
CN109635589A (en) * | 2018-12-25 | 2019-04-16 | 成都卫士通信息产业股份有限公司 | The method and device that SO file calls |
CN109635589B (en) * | 2018-12-25 | 2022-06-14 | 成都卫士通信息产业股份有限公司 | SO file calling method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107358071A (en) | Prevent the method and device that function illegally calls in Flash application programs | |
EP3452910B1 (en) | Security weakness and infiltration detection and repair in obfuscated website content | |
CN108416212A (en) | Method for identifying application program and device | |
CN109327627A (en) | Telephone number recognition methods, device and storage medium based on block chain | |
CN107742079B (en) | Malicious software identification method and system | |
CN108549600A (en) | A kind of method for analyzing performance and device, server and readable storage medium storing program for executing | |
CN108764951B (en) | User similarity obtaining method and device, equipment and storage medium | |
CN109271445A (en) | Utilize the method, apparatus and electronic equipment of block chain storing data | |
CN106548049A (en) | A kind of code process method and apparatus | |
CN108572866A (en) | A kind of application management method, application program management device and mobile terminal | |
CN111338716A (en) | Data processing method and device based on rule engine and terminal equipment | |
CN108418814A (en) | Interface authentication method, apparatus and computer readable storage medium based on dubbo frames | |
CN109145621A (en) | Document management method and device | |
CN107391970A (en) | Function access control method and device in Flash application programs | |
CN108446538A (en) | Source code reinforcement means and device based on state, semiology analysis and single-point logic | |
CN108509228A (en) | Method, terminal device and the computer readable storage medium of loading page | |
CN112686678A (en) | Method, device, equipment and storage medium for determining false order | |
CN107292614A (en) | Pay class application management method, device and mobile terminal | |
CN107528969A (en) | Management method, managing device and the terminal device of telephone call time | |
CN109067640B (en) | Information pushing method and device | |
CN109858289A (en) | The mobile storage device management method and device used suitable for corporate intranet | |
US11921874B2 (en) | Method and system for protecting file using class distribution and sequential memory loading | |
CN105306686A (en) | Information processing method and electronic equipment | |
CN111881047B (en) | Method and device for processing obfuscated script | |
CN107025392B (en) | Usage-based authentication system |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171117 |