CN108985013B - Method, device, client and server for detecting use of SWF file by third-party application program - Google Patents

Method, device, client and server for detecting use of SWF file by third-party application program Download PDF

Info

Publication number
CN108985013B
CN108985013B CN201710401175.7A CN201710401175A CN108985013B CN 108985013 B CN108985013 B CN 108985013B CN 201710401175 A CN201710401175 A CN 201710401175A CN 108985013 B CN108985013 B CN 108985013B
Authority
CN
China
Prior art keywords
swf file
url address
application program
address
information
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
CN201710401175.7A
Other languages
Chinese (zh)
Other versions
CN108985013A (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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710401175.7A priority Critical patent/CN108985013B/en
Publication of CN108985013A publication Critical patent/CN108985013A/en
Application granted granted Critical
Publication of CN108985013B publication Critical patent/CN108985013B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/121Restricting unauthorised execution of programs
    • G06F21/125Restricting unauthorised execution of programs by manipulating the program code, e.g. source code, compiled code, interpreted code, machine code

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to the technical field of information processing, and provides a method, a device, a client and a server for detecting the use of an SWF file by a third-party application program, wherein the client is provided with a Flash, and the method applied to the client comprises the following steps: when the SWF file is operated by an application program of a client, acquiring operation address information of the SWF file through Flash; the running address information is sent to the server side, so that the server side judges whether the SWF file is used by a third-party application program or not according to the running address information; the method applied to the server side comprises the following steps: acquiring running address information of an SWF file sent by a client; and judging whether the running address information meets the preset standard or not, and if not, judging that the SWF file is used by a third-party application program. When the SWF file is used by a third-party application program, the server can know the SWF file at the first time, so that corresponding measures are acquired, and the problem that the SWF file is decompiled in the prior art is effectively solved.

Description

Method, device, client and server for detecting use of SWF file by third-party application program
Technical Field
The invention relates to the technical field of information processing, in particular to a method, a device, a client and a server for detecting the use of an SWF file by a third-party application program.
Background
At present, Flash is widely used for webpage design, webpage animation production, webpage video playing and the like. Most video websites, including live websites, employ Flash as their video player, and most web games are also developed using Flash, which is developed using the ActionScript scripting language. Due to the characteristics of the script language, the source code is very easy to decompile, so that the source code can be decompiled and checked from the finally issued SWF file (the execution file of Flash), and each functional interface and the use method of the interface can be searched. Meanwhile, Flash has the principle of a transmitting mechanism, so that all interfaces of the SWF file can be obtained from the finally issued SWF file, the interface function can be called through the transmitting mechanism, and a third-party application program can directly use the SWF function, so that Flash is extremely unsafe.
Disclosure of Invention
The object of the present invention is to provide a solution to the above mentioned problems.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, the invention provides a method for detecting that an SWF file is used by a third-party application program, which is applied to a client side in communication connection with a server side, wherein the client side is provided with Flash. The method comprises the following steps: when the SWF file is operated by an application program of a client, acquiring operation address information of the SWF file through Flash; and sending the running address information to the server so that the server judges whether the SWF file is used by a third-party application program or not according to the running address information.
In a second aspect, the present invention provides a method for detecting that an SWF file is used by a third-party application, which is applied to a server communicatively connected to a client. The method comprises the following steps: acquiring running address information of an SWF file sent by a client; and judging whether the running address information meets the preset standard or not, and if not, judging that the SWF file is used by a third-party application program.
In a third aspect, the invention provides a device for detecting that an SWF file is used by a third-party application program, which is applied to a client side in communication connection with a server side, wherein the client side is provided with Flash. The device comprises a first execution module and a second execution module, wherein the first execution module is used for acquiring the operation address information of the SWF file through Flash when the SWF file is operated by an application program of a client; the second execution module is used for sending the operation address information to the server side, so that the server side judges whether the SWF file is used by the third-party application program or not according to the operation address information.
In a fourth aspect, the present invention provides an apparatus for detecting that an SWF file is used by a third-party application, where the apparatus is applied to a server communicatively connected to a client. The device comprises a third execution module and a fourth execution module, wherein the third execution module is used for acquiring the running address information of the SWF file sent by the client; and the fourth execution module is used for judging whether the running address information meets the preset standard or not, and if not, judging that the SWF file is used by a third-party application program.
In a fifth aspect, the invention provides a client, which is installed with Flash and is in communication connection with a server. The client comprises a first memory, a first processor and a device for detecting that the SWF file is used by the third-party application program, wherein the device for detecting that the SWF file is used by the third-party application program is installed in the first memory and comprises one or more software function modules executed by the first processor. The device for detecting the use of the SWF file by the third-party application program comprises a first execution module and a second execution module, wherein the first execution module is used for acquiring the operation address information of the SWF file through Flash when the SWF file is operated by the application program of the client; the second execution module is used for sending the operation address information to the server side, so that the server side judges whether the SWF file is used by the third-party application program or not according to the operation address information.
In a sixth aspect, the present invention provides a server, communicatively connected to a client, including a second memory, a second processor, and a device for detecting that a SWF file is used by a third-party application program, where the device for detecting that a SWF file is used by a third-party application program is installed in the second memory and includes one or more software function modules executed by the second processor. The device for detecting the use of the SWF file by the third-party application program comprises a third execution module and a fourth execution module, wherein the third execution module is used for acquiring the operation address information of the SWF file sent by the client; and the fourth execution module is used for judging whether the running address information meets the preset standard or not, and if not, judging that the SWF file is used by a third-party application program.
Compared with the prior art, the invention has the following beneficial effects: according to the method, the device, the client and the server for detecting the use of the SWF file by the third-party application program, when the SWF file is operated by the application program of the client, the client acquires the operation address information of the SWF file through Flash and sends the operation address information to the server, and the server can judge whether the SWF file is used by the third-party application program or not according to the operation address information.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic diagram illustrating interaction between a server and a client according to an embodiment of the present invention.
Fig. 2 is a block diagram of a client according to an embodiment of the present invention.
Fig. 3 is a block diagram illustrating a server according to an embodiment of the present invention.
Fig. 4 is a flowchart illustrating a method applied to a client for detecting that a SWF file is used by a third-party application according to an embodiment of the present invention.
Fig. 5 is a flowchart illustrating sub-steps of step S101 shown in fig. 4.
Fig. 6 is a flowchart of sub-steps of sub-step S1011 shown in fig. 5.
Fig. 7 is a flowchart illustrating sub-steps of sub-step S1012 shown in fig. 5.
Fig. 8 is a flowchart illustrating a method for detecting that an SWF file is used by a third-party application, which is applied to a server according to an embodiment of the present invention.
Fig. 9 is a block diagram illustrating a first detecting device according to an embodiment of the present invention.
Fig. 10 is a block diagram illustrating a first execution module in the first detection apparatus shown in fig. 9.
Fig. 11 is a block diagram illustrating a domain name information obtaining unit in the first execution module shown in fig. 10.
Fig. 12 is a block diagram illustrating a first URL address obtaining unit in the first execution module shown in fig. 10.
Fig. 13 is a block diagram illustrating a second detecting device provided in an embodiment of the present invention.
Icon: 100-a client; 110-a first detection device; 111-a first execution module; 112-a second execution module; 1111-domain name information obtaining unit; 11111-first judgment unit; 11112-first sub-execution unit; 11113-second sub-execution unit; 1112-a first URL address obtaining unit; 11121-second judgment unit; 11122-third sub-execution unit; 11123-a fourth sub-execution unit; 1113-second URL address acquisition unit; 120-a first memory; 130-a memory controller; 140-a first processor; 150-peripheral interface; 160-a first communication unit; 170-a radio frequency unit; 200-a server; 210-a second detection device; 211-a third execution module; 212-a fourth execution module; 220-a second memory; 230-a second processor; 240-second communication unit; 300-a network; 400-third party application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating a server 200 interacting with at least one client 100 according to an embodiment of the present invention. The server 200 can communicate with the client 100 through the network 300 to realize data communication or interaction between the server 200 and the client 100. The server 200 may provide at least one installation package of third party applications 400 for various operating systems for downloading by the client 100. After the client 100 accesses the server 200 through the network 300, the installation package of the third-party application 400 suitable for the operating system of the client 100 is downloaded from the server 200 through the network 300, so that the third-party application 400 is installed in the client 100.
In the embodiment of the present invention, the server 200 is a web server. The client 100 may be, but is not limited to, a smart phone, a Personal Computer (PC), a tablet PC, a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), and the like. The operating system of the client 100 may be, but is not limited to, an Android system, an IOS (iPhone operating system) system, a Windows phone system, a Windows system, and the like. The third-party application 400 may be any application provided by the server 200 and capable of being custom downloaded and installed by the client 100, and preferably, in this embodiment, the third-party application 400 may be various local programs of the client 100 running the SWF file.
Referring to fig. 2, fig. 2 is a block diagram of the client 100 shown in fig. 1. The client 100 includes a first detection device 110, a first memory 120, a storage controller 130, a first processor 140, a peripheral interface 150, a first communication unit 160, and a radio frequency unit 170.
The first memory 120, the memory controller 130, the first processor 140, the peripheral interface 150, the rf unit 170 and the first communication unit 160 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The first detection device 110 includes at least one software function module which can be stored in the first memory 120 in the form of software or firmware (firmware) or is fixed in an Operating System (OS) of the client 100. The first memory 120 stores the third-party application 400 downloaded and installed from the server 200 by the client 100. The first processor 140 is used for executing executable modules stored in the first memory 120, such as software functional modules and computer programs included in the first detection apparatus 110.
The first Memory 120 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The first memory 120 is used for storing a program, and the first processor 140 executes the program after receiving the execution instruction. Access to the first memory 120 by the first processor 140 and possibly other components may be under the control of the memory controller 130.
The first processor 140 may be an integrated circuit chip having signal processing capabilities. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP)), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The peripheral interface 150 couples various input/output devices (e.g., a radio frequency unit 170) to the first processor 140 and the first memory 120. In some embodiments, the peripheral interface 150, the first processor 140, and the memory controller 130 may be implemented in a single chip. In other examples, they may be implemented separately from the individual chips.
The rf unit 170 is configured to receive and transmit radio wave signals (e.g., electromagnetic waves), so as to realize interconversion between radio waves and electrical signals, thereby realizing wireless communication between the client 100 and the network 300 or other communication devices.
The first communication unit 160 is configured to establish a connection with the server 200 through the network 300, so as to implement a communication connection between the server 200 and the client 100. For example, the first communication unit 160 may be connected to the network 300 by using a radio frequency signal transmitted by the radio frequency unit 170, and further establish a communication connection with the server 200 through the network 300.
Referring to fig. 3, fig. 3 is a block diagram of the server 200 shown in fig. 1. The server 200 comprises a second detection device 210, a second memory 220, a second processor 230 and a second communication unit 240.
The elements of the second memory 220, the second processor 230 and the second communication unit 240 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The second detection device 210 includes at least one software function module which can be stored in the second memory 220 in the form of software or firmware (firmware) or is fixed in an Operating System (OS) of the server 200. The second processor 230 is used for executing executable modules stored in the second memory 220, such as software functional modules and computer programs included in the second detection device 210.
The second Memory 220 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The second memory 220 is used for storing programs, and the second processor 230 executes the programs after receiving the execution instructions. The second communication unit 240 is configured to establish a communication connection between the server 200 and the client 100 through the network 300, and is configured to send and receive data through the network 300.
First embodiment
Referring to fig. 4, fig. 4 is a flowchart illustrating a method applied to the client 100 for detecting that an SWF file is used by a third-party application according to an embodiment of the present invention. The client 100 is provided with Flash, and the method for detecting the use of the SWF file by the third-party application program applied to the client 100 comprises the following steps:
step S101, when the SWF file is operated by the application program of the client, the operation address information of the SWF file is obtained through Flash.
In the embodiment of the present invention, the Application programs of the client 100 include a web Application program and a third party Application program 400, the web Application program may be an Application program that operates on the internet or an intranet by using a web browser, for example, an Application program that operates on the internet by using a web browser such as a 360-degree browser, a google browser, an IE browser, and the like, and the third party Application program 400 may be various local programs installed on the client 100, for example, various APPs (applications) installed on the client 100 such as a hundreds-degree netdisk, a storm video, and the like. In the embodiment of the present invention, the SWF file is a file of a network application program, and if a hacker directly obtains the SWF file, the application program of the client 100 runs through the third party application program 400, and when the application program runs the SWF file, the application program needs to call a function in Flash. Therefore, an operation address information obtaining function may be written in Flash, the operation address information of the SWF file may be obtained by the operation address information obtaining function, and the operation environment of the SWF file may be determined by the operation address information, so as to detect whether the SWF is used by the third party application 400. The operation address information may be, but is not limited to, domain name information of an application program that operates the SWF file, a URL (Uniform resource Locator) address of the SWF file, and the like.
Referring to fig. 5, step S101 may include the following sub-steps:
in sub-step S1011, domain name information of the application program running the SWF file is determined according to whether the application program running the SWF file has a domain name.
In the embodiment of the invention, when the SWF file is run by a network application program, that is, when the SWF file is run normally, the domain name of the application program which runs the SWF file and is acquired by Flash is necessarily the domain name of the corresponding website, for example, when the SWF file is run by a browser in hundreds degrees, a webpage in hundreds degrees calls the Flash to run the SWF file, and the domain name of the application program which is acquired by Flash is www.baidu.com; however, when a hacker directly obtains the SWF file of the web application and runs the application through the third party application 400, the domain name of the website cannot be obtained through Flash, and therefore, the domain name information of the application running the SWF file can be determined according to whether the application running the SWF file has the domain name, and when the domain name of the website cannot be obtained through Flash, the domain name information of the application running the SWF file can be set to be fixed local information, such as localhost.
As an embodiment, the method for determining domain name information of an application program running an SWF file by running an address information obtaining function may be: firstly, a domain object localcomain is created by using a component provided by Flash, and the domain object localcomain can be created by var LocalConnection ═ new LocalConnection (); statement implementation, wherein the LocalConnection is a component for creating a domain object localcomain, then the domain object localcomain is acquired by calling a method of the component, and a domain name mydomainNameData of an application program running the SWF file is acquired through the domain object localcomain, and the domain name myDomainNameData can be obtained through var myDomainNameData; a statement implementation, wherein. The domain name information acquired for the normally running SWF file is the domain name of the corresponding website, and for the SWF file used by the third party, the acquired domain name information is fixed 'localhost' information.
Referring to fig. 6, step S1011 may include the following sub-steps:
and a substep S10111 of determining whether the application program running the SWF file has a domain name.
In the embodiment of the present invention, if the application program running the SWF file has a domain name, sub-step S10112 is performed, and if the application program running the SWF file does not have a domain name, sub-step S10113 is performed.
And a substep S10112 of obtaining domain name information of the application program.
In the embodiment of the present invention, if an application program running the SWF file has a domain name, the domain name information of the application program is obtained by Flash, for example, the domain name information is www.baidu.com.
And a substep S10113, using the first preset value as domain name information of the application program.
In the embodiment of the present invention, if the application program running the SWF file does not have a domain name, the first preset value is used as domain name information of the application program, and when all the third-party application programs 400 run the SWF file, the domain name information is the first preset value, and the first preset value may be fixed local information, such as localhost.
In the sub-step S1012, the first URL address of the SWF file is determined according to whether the application program running the SWF file has a URL address.
In the embodiment of the present invention, the first URL address may be, but is not limited to, a URL address of the SWF file determined according to an application program running the SWF file. When the SWF file is operated by a network application program, namely normally operated, the first URL address of the SWF file is necessarily the domain name of the website and the server path information of the SWF file operated by the website, namely the URL address of the website page, such as http:// zhidao.baidu.com/query/124891257. html; however, when a hacker directly obtains the SWF file of the web application and runs the SWF file through the third party application 400, the URL address of the website cannot be obtained through Flash, and therefore, the first URL address of the SWF file can be determined according to whether the current page of the application running the SWF file has the URL address, and when the URL address of the current page cannot be obtained through Flash, the local disk path information of the SWF file can be set as the first URL address of the SWF file, wherein the third party application 400 is stored in the client 100 through the local disk path.
As an implementation manner, in the running address information obtaining function, the URL address of the application program running the SWF file may be obtained by calling a JavaScript script code, in other words, the function code of the JavaScript may be called through an external interface. Statement implementation, where function getUrl () { return window. The statement is a written JavaScript code for acquiring the URL address of the application program, and the window.
Referring to fig. 7, step S1012 may include the following sub-steps:
in the sub-step S10111, it is determined whether the application program running the SWF file has a URL address.
In the embodiment of the present invention, if the application program running the SWF file has a URL address, the sub-step S10122 is performed, and if the application program running the SWF file does not have a URL address, the sub-step S10123 is performed.
In sub-step S10122, the URL address is used as the first URL address of the SWF file.
In the embodiment of the invention, if the application program running the SWF file has a URL address, the URL address of the application program is used as the first URL address of the SWF file, such as http:// zhidao.
And a substep S10123, taking the local disk path information of the SWF file as the first URL address of the SWF file, wherein the third party application program is stored in the client through the local disk path.
In the embodiment of the invention, if the application program running the SWF file has no URL address, the local disk path information of the SWF file is used as the first URL address of the SWF file, such as C: \ Users \ Administrator \ Desktop \ SWF.
And a substep S1013 of obtaining a second URL address of the SWF file from the stage object loaded by the SWF file, wherein the operation address information of the SWF file includes domain name information, the first URL address, and the second URL address.
In the embodiment of the present invention, the second URL address may be, but is not limited to, a URL address of the SWF file determined according to the stage object loaded by the SWF file. Since the stage objects used for rendering in the SWF file all have a rootSprite root object, the URL address of the rootSprite root object is the second URL address of the SWF file.
In the embodiment of the present invention, when the SWF file is run by the web application, that is, when the SWF file is normally run, the URL address of the rootspot root object is necessarily the domain name of the website and the server path information of the SWF file run by the website, that is, the URL address of the website page; however, when a hacker directly obtains the SWF file of the web application and runs through the third-party application 400, the URL address of the rootspot root object cannot be obtained through Flash, so that the second URL address of the SWF file can be determined according to the rootspot root object, and when the URL address of the current page cannot be obtained through Flash, the local disk path information of the rootspot root object can be set as the second URL address of the SWF file.
As an embodiment, the method for acquiring the second URL address of the SWF file according to the rootspot root object in the running address information acquisition function may be, but is not limited to, through Var webburl: string.stage.loaderinfo.url.tostring (); and statement implementation, wherein the webburl is the acquired URL address of the rootSprite root object.
In the embodiment of the present invention, the operation address information of the SWF file includes domain name information of an application program that operates the SWF file, a first URL address of the SWF file, and a second URL address of the SWF file. The advantage of acquiring the first URL address of the SWF file by calling the Javascript script code and the second URL address of the SWF file by using the stage object is that different technical means are used to acquire the URL address of the SWF file, which can prevent data from being tampered, and improve the security of the operation address information of the acquired SWF file.
Step S102, the operation address information is sent to the server side, so that the server side judges whether the SWF file is used by a third-party application program or not according to the operation address information.
In the embodiment of the invention, the operation address information acquisition function can be called in the key function of Flash to acquire the operation address information of the SWF file, and the information is encrypted and reported to the server. The key function may be a function that is executed or initialized at the beginning of Flash, the function must be called, after the key function obtains the operation address information of the SWF file acquired by the operation address information obtaining function, the obtained operation address information is encrypted and reported to the server, and the server judges the operation address information, thereby determining whether the SWF file is used by the third-party application program 400.
As an embodiment, encryption may be performed by Info ═ aes (myDomainNameData + webburl 2, KEY); the method comprises the steps that the operation address information of an SWF file is added into a key function of Flash through a statement, the information is encrypted and reported to a server, wherein the encryption interface of an AES (advanced encryption standard) encryption algorithm is AES. The parameters myDomainNameData + webburl 2 are domain name information of an application program running the SWF file, a first URL address of the SWF file, and a second URL address of the SWF file, respectively; KEY is KEY information used for encryption; the info data is encrypted and reported to the server.
Referring to fig. 8, fig. 8 is a flowchart illustrating a method for detecting that an SWF file is used by a third-party application, applied to a server 200 according to an embodiment of the present invention. The method for detecting the use of the SWF file by the third-party application program applied to the server 200 comprises the following steps:
step S201, obtaining the operation address information of the SWF file sent by the client.
In the embodiment of the present invention, after the client 100 reports the running address information of the SWF, and after the server 200 acquires the reported information, the server first decrypts the reported information, so as to acquire the domain name information of the application program running the SWF file, the first URL address of the SWF file, and the second URL address of the SWF file.
As an embodiment, the server 200 may decrypt the reported information through myDomainNameData + webburl 2 ═ aes. Statement implementation, wherein aes.decrypt is the decryption interface of AES decryption algorithm; the parameter KEY is the same KEY used in encryption with the client 100; the result data myDomainNameData + webburl 2 are domain name information of the application program running the SWF file, the first URL address of the SWF file, and the second URL address of the SWF file, respectively.
Step S202, judging whether the operation address information meets the preset standard or not, and if not, judging that the SWF file is used by a third-party application program.
In the embodiment of the present invention, the server 200 may determine whether the SWF file is running in a normal network application or is used by the third party application 400 according to the SWF file running address information, where the preset criterion may be, but is not limited to, that the domain name information of the application running the SWF file, the first URL address of the SWF file, and the second URL address of the SWF file are all network addresses, when the SWF file running address information meets the preset criterion, that is, when the domain name information of the application running the SWF file, the first URL address of the SWF file, and the second URL address of the SWF file are all network addresses, it is determined that the SWF file is running in a normal environment, otherwise, when the SWF file running address information does not meet the preset criterion, that any one of the domain name information of the application running the SWF file, the first URL address of the SWF file, and the second URL address of the SWF file is not a network address, for example, if the parameter myDomainNameData is "localhost", or if any one of the first URL address of the SWF file and the second URL address of the SWF file is similar to "C: \ Users \ administeror \ Desktop \ star \.
In the embodiment of the invention, firstly, when the SWF file is run by the application program of the client 100, the client 100 acquires the running address information of the SWF file through Flash and sends the running address information to the server 200, the server 200 can judge whether the SWF file is used by the third-party application program 400 according to the running address information, and when the SWF file is used by the third-party application program 400, the server 200 can know the SWF file at the first time, so that corresponding measures are acquired, and the problem that the SWF file is decompiled in the prior art is effectively avoided; secondly, the URL address of the SWF file is obtained by using different technical means, so that data can be prevented from being tampered, and the safety of the obtained running address information of the SWF file is improved; finally, the server 200 comprehensively determines the operation environment of the SWF file by the operation address information of the SWF file including three different information, namely, domain name information of an application program for operating the SWF file, a first URL address of the SWF file and a second URL address of the SWF file, thereby improving the accuracy of determination of the server 200.
Second embodiment
Referring to fig. 9, fig. 9 is a block diagram illustrating a first detecting device 110 according to a preferred embodiment of the invention. The first detection device 110 is applied to the client 100 and includes a first execution module 111 and a second execution module 112.
The first execution module 111 is configured to obtain the operation address information of the SWF file through Flash when the SWF file is executed by an application program of the client.
In the embodiment of the present invention, the first executing module 111 may be configured to execute step S101.
Referring to fig. 10, fig. 10 is a block diagram illustrating a first execution module 111 in the first detection apparatus 110 shown in fig. 9. The first execution module 111 includes a domain name information obtaining unit 1111, a first URL address obtaining unit 1112, and a second URL address obtaining unit 1113.
The domain name information obtaining unit 1111 is configured to determine domain name information of an application program running the SWF file according to whether the application program running the SWF file has a domain name.
In this embodiment of the present invention, the domain name information obtaining unit 1111 may be configured to perform the sub-step S1011.
Referring to fig. 11, fig. 11 is a block diagram illustrating the domain name information obtaining unit 1111 in the first execution module 111 shown in fig. 10. The domain name information obtaining unit 1111 includes a first determining unit 11111, a first sub-execution unit 11112, and a second sub-execution unit 11113.
A first judging unit 11111, configured to judge whether an application running the SWF file has a domain name.
In an embodiment of the present invention, the first judging unit 11111 may be configured to execute the sub-step S10111.
In the embodiment of the present invention, if the execution result of the first judgment unit 11111 is yes, the sub-step S10112 is performed by the first sub-execution unit 11112, and if the execution result of the first judgment unit 11111 is no, the sub-step S10113 is performed by the second sub-execution unit 11113.
The first sub-execution unit 11112 is configured to obtain domain name information of an application.
In an embodiment of the present invention, the first sub-execution unit 11112 may be configured to execute the sub-step S10112.
The second sub-execution unit 11113 is configured to use the first preset value as domain name information of the application program.
In an embodiment of the present invention, the second sub-execution unit 11113 may be configured to execute the sub-step S10113.
The first URL address obtaining unit 1112 is configured to determine a first URL address of the SWF file according to whether the application program running the SWF file has a URL address.
In this embodiment of the present invention, the first URL address obtaining unit 1112 may be configured to perform the sub-step S1012.
Referring to fig. 12, fig. 12 is a block diagram illustrating the first URL address obtaining unit 1112 in the first execution module 111 shown in fig. 10. The first URL address obtaining unit 1112 includes a second determining unit 11121, a third sub-execution unit 11122, and a fourth sub-execution unit 11123.
A second judging unit 11121, configured to judge whether the application running the SWF file has a URL address.
In an embodiment of the present invention, the second judging unit 11121 may be configured to perform the sub-step S10121.
In the embodiment of the present invention, if the execution result of the second determination unit 11121 is yes, the sub-step S10122 is performed by turning to the third sub-execution unit 11122, and if the execution result of the second determination unit 11121 is no, the sub-step S10123 is performed by turning to the fourth sub-execution unit 11123.
A third sub-execution unit 11122, configured to use the URL address as the first URL address of the SWF file.
In an embodiment of the present invention, the third sub-execution unit 11122 may be configured to execute the sub-step S10122.
And a fourth sub-execution unit 11123, configured to use the local disk path information of the SWF file as the first URL address of the SWF file, where the third-party application is stored in the client through the local disk path.
In an embodiment of the present invention, the fourth sub-execution unit 11123 may be configured to execute the sub-step S10123.
A second URL address obtaining unit 1113, configured to obtain a second URL address of the SWF file from the stage object loaded with the SWF file, where the operation address information of the SWF file includes domain name information, the first URL address, and the second URL address.
In the embodiment of the present invention, the second URL address obtaining unit 1113 may be configured to perform sub-step S1013.
The second execution module 112 is configured to send the operation address information to the server, so that the server determines whether the SWF file is used by the third-party application according to the operation address information.
In the embodiment of the present invention, the second executing module 112 may be configured to execute step S102.
Referring to fig. 13, fig. 9 is a block diagram illustrating a second detecting device 210 according to a preferred embodiment of the invention. The second detecting device 210 is applied to the server 200, and includes a third executing module 211 and a fourth executing module 212.
The third executing module 211 is configured to obtain the operation address information of the SWF file sent by the client.
In this embodiment of the present invention, the third executing module 211 may be configured to execute step S201.
The fourth executing module 212 is configured to determine whether the operation address information meets a preset standard, and if not, determine that the SWF file is used by the third-party application program.
In this embodiment of the present invention, the fourth executing module 212 may be configured to execute step S202.
In summary, the method, the apparatus, the client and the server for detecting that the SWF file is used by the third-party application program provided by the present invention, the client is installed with Flash, and the method applied to the client includes: when the SWF file is operated by an application program of a client, acquiring operation address information of the SWF file through Flash; and sending the running address information to the server so that the server judges whether the SWF file is used by a third-party application program or not according to the running address information. The method applied to the server side comprises the following steps: acquiring running address information of an SWF file sent by a client; and judging whether the running address information meets the preset standard or not, and if not, judging that the SWF file is used by a third-party application program. When the SWF file is used by a third-party application program, the server can know the SWF file at the first time, so that corresponding measures are acquired, and the problem that the SWF file is decompiled in the prior art is effectively solved; in addition, different technical means are used for acquiring the URL address of the SWF file, so that data can be prevented from being tampered, and the safety of the acquired running address information of the SWF file is improved; meanwhile, the server comprehensively judges the running environment of the SWF file through different information, and the judgment accuracy of the server is improved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.

Claims (6)

1. A method for detecting that an SWF file is used by a third-party application program is applied to a client side in communication connection with a server side, wherein the client side is provided with Flash, and the method comprises the following steps:
when the SWF file is operated by an application program of the client, acquiring operation address information of the SWF file through Flash, wherein the operation address information comprises domain name information of the application program for operating the SWF file, a first URL (uniform resource locator) address of the SWF file and a second URL address of the SWF file, the first URL address is the URL address of the SWF file determined according to the application program for operating the SWF file, and the second URL address is the URL address of the SWF file determined according to a stage object loaded by the SWF file;
sending the running address information to a server so that the server can judge whether the SWF file is used by a third party application program according to the running address information, and judging that the SWF file is used by the third party application program when any one of the domain name information, the first URL address and the second URL address is not a network address;
the step of obtaining the operation address information of the SWF file through Flash comprises the following steps:
when the domain name exists in the application program for operating the SWF file, acquiring domain name information of the application program; when the application program running the SWF file has no domain name, taking a first preset value as domain name information of the application program;
when an application program running the SWF file has a URL address, taking the URL address as a first URL address of the SWF file; when the application program running the SWF file does not have a URL (Uniform resource locator) address, taking local disk path information of the SWF file as a first URL address of the SWF file, wherein the third-party application program is stored in the client through a local disk path;
when the stage object loaded by the SWF file has a URL address, taking the URL address of the stage object as a second URL address of the SWF file; and when the stage object loaded by the SWF file has no URL address, taking the local disk path information of the stage object as a second URL address of the SWF file.
2. A method for detecting SWF files used by a third party application, the method being applied to a server communicatively coupled to a client, the method comprising:
acquiring operation address information of the SWF file sent by the client, wherein the operation address information comprises domain name information of an application program for operating the SWF file, a first URL address of the SWF file and a second URL address of the SWF file, the first URL address is the URL address of the SWF file determined according to the application program for operating the SWF file, and the second URL address is the URL address of the SWF file determined according to a stage object loaded by the SWF file;
when any one of the domain name information, the first URL address and the second URL address is not a network address, judging that the SWF file is used by a third-party application program;
the client side obtains the operation address information of the SWF file through the following modes:
when the domain name exists in the application program for operating the SWF file, acquiring domain name information of the application program; when the application program running the SWF file has no domain name, taking a first preset value as domain name information of the application program;
when an application program running the SWF file has a URL address, taking the URL address as a first URL address of the SWF file; when the application program running the SWF file does not have a URL (Uniform resource locator) address, taking local disk path information of the SWF file as a first URL address of the SWF file, wherein the third-party application program is stored in the client through a local disk path;
when the stage object loaded by the SWF file has a URL address, taking the URL address of the stage object as a second URL address of the SWF file; and when the stage object loaded by the SWF file has no URL address, taking the local disk path information of the stage object as a second URL address of the SWF file.
3. A device for detecting that an SWF file is used by a third-party application program is applied to a client side in communication connection with a server side, wherein the client side is provided with Flash, and the device comprises:
the first execution module is used for acquiring the operation address information of the SWF file through Flash when the SWF file is operated by an application program of the client, wherein the operation address information comprises domain name information of the application program for operating the SWF file, a first URL address of the SWF file and a second URL address of the SWF file, the first URL address is a URL address of the SWF file determined according to the application program for operating the SWF file, and the second URL address is a URL address of the SWF file determined according to a stage object loaded by the SWF file;
the second execution module is used for sending the running address information to a server so that the server can judge whether the SWF file is used by a third party application program according to the running address information, and when any one of the domain name information, the first URL address and the second URL address is not a network address, the SWF file is judged to be used by the third party application program;
the first execution module is specifically configured to:
when the domain name exists in the application program for operating the SWF file, acquiring domain name information of the application program; when the application program running the SWF file has no domain name, taking a first preset value as domain name information of the application program;
when an application program running the SWF file has a URL address, taking the URL address as a first URL address of the SWF file; when the application program running the SWF file does not have a URL (Uniform resource locator) address, taking local disk path information of the SWF file as a first URL address of the SWF file, wherein the third-party application program is stored in the client through a local disk path;
when the stage object loaded by the SWF file has a URL address, taking the URL address of the stage object as a second URL address of the SWF file; and when the stage object loaded by the SWF file has no URL address, taking the local disk path information of the stage object as a second URL address of the SWF file.
4. An apparatus for detecting the use of an SWF file by a third-party application, the apparatus being applied to a server communicatively coupled to a client, the apparatus comprising:
a third execution module, configured to obtain operation address information of the SWF file sent by the client, where the operation address information includes domain name information of an application program that operates the SWF file, a first URL address of the SWF file, and a second URL address of the SWF file, the first URL address is a URL address of the SWF file determined according to the application program that operates the SWF file, and the second URL address is a URL address of the SWF file determined according to a stage object loaded by the SWF file;
a fourth execution module, configured to determine that the SWF file is used by a third party application when any one of the domain name information, the first URL address, and the second URL address is not a network address;
the client side obtains the operation address information of the SWF file through the following modes:
when the domain name exists in the application program for operating the SWF file, acquiring domain name information of the application program; when the application program running the SWF file has no domain name, taking a first preset value as domain name information of the application program;
when an application program running the SWF file has a URL address, taking the URL address as a first URL address of the SWF file; when the application program running the SWF file does not have a URL (Uniform resource locator) address, taking local disk path information of the SWF file as a first URL address of the SWF file, wherein the third-party application program is stored in the client through a local disk path;
when the stage object loaded by the SWF file has a URL address, taking the URL address of the stage object as a second URL address of the SWF file; and when the stage object loaded by the SWF file has no URL address, taking the local disk path information of the stage object as a second URL address of the SWF file.
5. The client is characterized in that the client is provided with Flash and is in communication connection with a server, and the client comprises:
a first memory;
a first processor; means for detecting that a SWF file is used by a third party application is installed in the first memory and includes one or more software function modules executed by the first processor, comprising:
the system comprises a first execution module, a second execution module and a third execution module, wherein the first execution module is used for acquiring the operation address information of the SWF file through Flash when the SWF file is operated by an application program, the operation address information comprises domain name information of the application program for operating the SWF file, a first URL address of the SWF file and a second URL address of the SWF file, the first URL address is a URL address of the SWF file determined according to the application program for operating the SWF file, and the second URL address is a URL address of the SWF file determined according to a stage object loaded by the SWF file;
the second execution module is used for sending the running address information to a server so that the server can judge whether the SWF file is used by a third party application program according to the running address information, and when any one of the domain name information, the first URL address and the second URL address is not a network address, the SWF file is judged to be used by the third party application program;
the first execution module is specifically configured to:
when the domain name exists in the application program for operating the SWF file, acquiring domain name information of the application program; when the application program running the SWF file has no domain name, taking a first preset value as domain name information of the application program;
when an application program running the SWF file has a URL address, taking the URL address as a first URL address of the SWF file; when the application program running the SWF file does not have a URL (Uniform resource locator) address, taking local disk path information of the SWF file as a first URL address of the SWF file, wherein the third-party application program is stored in the client through a local disk path;
when the stage object loaded by the SWF file has a URL address, taking the URL address of the stage object as a second URL address of the SWF file; and when the stage object loaded by the SWF file has no URL address, taking the local disk path information of the stage object as a second URL address of the SWF file.
6. A server, wherein the server is communicatively connected to a client, and the server comprises:
a second memory;
a second processor; means for detecting that a SWF file is used by a third party application is installed in said second memory and includes one or more software function modules executed by said second processor, comprising:
a third execution module, configured to obtain operation address information of the SWF file sent by the client, where the operation address information includes domain name information of an application program that operates the SWF file, a first URL address of the SWF file, and a second URL address of the SWF file, the first URL address is a URL address of the SWF file determined according to the application program that operates the SWF file, and the second URL address is a URL address of the SWF file determined according to a stage object loaded by the SWF file;
a fourth execution module, configured to determine that the SWF file is used by a third party application when any one of the domain name information, the first URL address, and the second URL address is not a network address;
the client side obtains the operation address information of the SWF file through the following modes:
when the domain name exists in the application program for operating the SWF file, acquiring domain name information of the application program; when the application program running the SWF file has no domain name, taking a first preset value as domain name information of the application program;
when an application program running the SWF file has a URL address, taking the URL address as a first URL address of the SWF file; when the application program running the SWF file does not have a URL (Uniform resource locator) address, taking local disk path information of the SWF file as a first URL address of the SWF file, wherein the third-party application program is stored in the client through a local disk path;
when the stage object loaded by the SWF file has a URL address, taking the URL address of the stage object as a second URL address of the SWF file; and when the stage object loaded by the SWF file has no URL address, taking the local disk path information of the stage object as a second URL address of the SWF file.
CN201710401175.7A 2017-05-31 2017-05-31 Method, device, client and server for detecting use of SWF file by third-party application program Active CN108985013B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710401175.7A CN108985013B (en) 2017-05-31 2017-05-31 Method, device, client and server for detecting use of SWF file by third-party application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710401175.7A CN108985013B (en) 2017-05-31 2017-05-31 Method, device, client and server for detecting use of SWF file by third-party application program

Publications (2)

Publication Number Publication Date
CN108985013A CN108985013A (en) 2018-12-11
CN108985013B true CN108985013B (en) 2021-01-01

Family

ID=64502212

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710401175.7A Active CN108985013B (en) 2017-05-31 2017-05-31 Method, device, client and server for detecting use of SWF file by third-party application program

Country Status (1)

Country Link
CN (1) CN108985013B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111162961B (en) * 2019-12-05 2021-12-31 任子行网络技术股份有限公司 Method, system and readable storage medium for discovering mobile application master control server
CN111447298A (en) * 2020-03-24 2020-07-24 北京字节跳动网络技术有限公司 Method, device, equipment and medium for acquiring network address in application program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750492A (en) * 2012-06-07 2012-10-24 中国电子科技集团公司第三十研究所 Method and device for defending rogue programs based on working directories
CN103336917A (en) * 2013-05-09 2013-10-02 四三九九网络股份有限公司 Method and device for adding domain locking to SWF files in batches

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8813232B2 (en) * 2010-03-04 2014-08-19 Mcafee Inc. Systems and methods for risk rating and pro-actively detecting malicious online ads
CN105827609A (en) * 2016-03-31 2016-08-03 乐视控股(北京)有限公司 Link theft prevention method and system based on feature code query optimization

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750492A (en) * 2012-06-07 2012-10-24 中国电子科技集团公司第三十研究所 Method and device for defending rogue programs based on working directories
CN103336917A (en) * 2013-05-09 2013-10-02 四三九九网络股份有限公司 Method and device for adding domain locking to SWF files in batches

Also Published As

Publication number Publication date
CN108985013A (en) 2018-12-11

Similar Documents

Publication Publication Date Title
US9135445B2 (en) Providing information about a web application or extension offered by website based on information about the application or extension gathered from a trusted site
US11586881B2 (en) Machine learning-based generation of similar domain names
US11240257B2 (en) Domain name and URL visual verification for increased security
WO2015062362A1 (en) Method, device, and system for user login
CN111163095B (en) Network attack analysis method, network attack analysis device, computing device, and medium
EP2776970B1 (en) Encoding labels in values to capture information flows
US9208235B1 (en) Systems and methods for profiling web applications
CN105472694B (en) Method, device, terminal and storage medium for accessing WiFi through scanning two-dimensional code
WO2015070816A1 (en) Application program push method, apparatus, device and system
CN109672658B (en) JSON hijacking vulnerability detection method, device, equipment and storage medium
CN104767747A (en) Click jacking safety detection method and device
CN103117893A (en) Monitor method and device of network accessing behaviour and client device
WO2015033333A1 (en) Communication channel between plugin application and browser script
US10664648B2 (en) Webpage rendering using a remotely generated layout node tree
CN108985013B (en) Method, device, client and server for detecting use of SWF file by third-party application program
US10474810B2 (en) Controlling access to web resources
US9449194B2 (en) Secure access to running client application features from a browser application
WO2017016458A1 (en) Application internal page processing method and device
US11909865B2 (en) Method and device for securing a communication path
US20190347407A1 (en) Detecting client-side exploits in web applications
Lonkar et al. The dark side of WebAssembly
US11157571B2 (en) External network system for extracting external website data using generated polymorphic data
CN110557507B (en) File transmission method and device, electronic equipment and computer readable storage medium
CN103823679B (en) A kind of information processing method and device
US10652277B1 (en) Identifying and blocking overlay phishing

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
GR01 Patent grant
GR01 Patent grant