WO2015070653A1 - 病毒防御方法和装置 - Google Patents
病毒防御方法和装置 Download PDFInfo
- Publication number
- WO2015070653A1 WO2015070653A1 PCT/CN2014/085187 CN2014085187W WO2015070653A1 WO 2015070653 A1 WO2015070653 A1 WO 2015070653A1 CN 2014085187 W CN2014085187 W CN 2014085187W WO 2015070653 A1 WO2015070653 A1 WO 2015070653A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- application
- installation
- interface function
- virus
- function
- 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.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/55—Detecting local intrusion or implementing counter-measures
- G06F21/56—Computer malware detection or handling, e.g. anti-virus arrangements
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/51—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/55—Detecting local intrusion or implementing counter-measures
- G06F21/554—Detecting local intrusion or implementing counter-measures involving event detection and direct action
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/55—Detecting local intrusion or implementing counter-measures
- G06F21/56—Computer malware detection or handling, e.g. anti-virus arrangements
- G06F21/562—Static detection
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/12—Detection or prevention of fraud
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/12—Detection or prevention of fraud
- H04W12/128—Anti-malware arrangements, e.g. protection against SMS fraud or mobile malware
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/03—Indexing scheme relating to G06F21/50, monitoring users, programs or devices to maintain the integrity of platforms
- G06F2221/033—Test or assess software
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W88/00—Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
- H04W88/02—Terminal devices
Definitions
- the invention relates to a virus defense technology, and in particular to a virus defense method and device.
- Background technique , . , ' , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
- the existing security management application usually provides the virus detection function of the application installation; that is, after the terminal device installs an application, the security management application immediately Perform virus scanning and anti-virus processing on the newly installed application; a specific example is: After an application is successfully installed on the Android-based terminal device, the Andro id operating system will issue a corresponding application for the successful installation of the application. After the broadcast, the security management application starts the virus scanning process to detect whether the application that the terminal device just installed has a virus, and the security management application can provide the corresponding prompt information according to the virus scanning result.
- the security management application can perform corresponding operations according to the indication information input by the user; for example, the security management application displays to the user the prompt information of "the installed application carries a virus, whether to uninstall the application", security management Upon receiving the program unload instruction by the user to uninstall the application just installed.
- the present invention has been made in order to provide a virus defense method and a corresponding virus defense device that overcome the above problems or at least partially solve the above problems.
- a virus defense method includes: when an Android operating system needs to install an application, the application identification information to be installed is set by a box.
- the shelf layer is transmitted to the application layer; at the application layer, the virus scanning application is started according to the application identification information, so that the virus scanning application performs virus scanning processing on the application; and the scanning result of the virus scanning processing is obtained, And issuing, according to the scan result, a notification to the framework layer whether to perform an installation operation of the application; at the framework layer, performing an installation operation of the application according to the notification or refusing to perform an installation operation of the application.
- a virus defense apparatus comprising: an application installation module, configured to transmit, when an Android operating system needs to install an application, application identification information to be installed by a framework layer to
- the application layer is configured to: at the application layer, start a virus scanning application according to the application identification information, so that the virus scanning application performs virus scanning processing on the application; and the notification module is adapted to obtain the Deriving a scan result of the virus scan process, and issuing a notification to the framework layer whether to perform an installation operation of the application according to the scan result; the application installation module is further adapted to, at the framework layer, execute the Describe the installation operation of the application or refuse to perform the installation operation of the application.
- the virus defense method and apparatus of the present invention notify the application layer to perform virus scanning processing on the application by using the virus scanning application by performing the installation operation of the application at the framework layer, so that the application carries the virus.
- the application layer can notify the framework layer that the installation operation of the application is no longer performed, so that the virus-carrying application can be no longer installed in the terminal device by the framework layer, so that the embodiment of the present invention avoids carrying the virus application by the framework layer.
- the potential hazard to the terminal device installed in the terminal device improves the security of the terminal device.
- Embodiment 1 is a flowchart of a virus defense method according to Embodiment 1 of the present invention.
- FIG. 2 is a flowchart of a virus defense method according to Embodiment 2 of the present invention.
- FIG. 3 is a schematic diagram of a virus defense apparatus according to Embodiment 3 of the present invention.
- Figure 4 shows a block diagram of a communication device for performing the method of the present invention
- Figure 5 shows a schematic diagram of a memory unit for holding or carrying program code implementing the method according to the invention. detailed description
- Embodiment 1 A virus prevention method. The method of this embodiment will be described below with reference to FIG. In Figure 1, S100, when the Android operating system needs to install an application, the application identification information that needs to be installed is transmitted from the framework layer to the application layer.
- an application installation listening interface function may be set in the application layer, a service (such as a security service) is provided in the framework layer, and a pre-installation packet detection interface function is set for the security service; thus, the application to be installed is required.
- the program identification information can be transmitted to the application installation listening interface function of the application layer through the pre-installation packet detection interface function of the security service of the framework layer.
- the Android operating system starts the package management service, and the application installation interface function in the package management service is called. Therefore, the embodiment can implement the specific implementation process in the interface function of the existing application.
- the transformation is performed to perform a virus scan of the application before the installation operation of the application is performed to prevent the terminal device from installing the application carrying the virus.
- the pre-installation packet detection interface function may be set at the beginning of the application installation interface function, so that when the application installation interface function is invoked, the pre-installation packet detection interface function included in the application installation interface function is included in the application installation interface function.
- the specific implementation flow is first executed, and the normal installation operation of the application in the application installation interface function is interrupted.
- the main function of the pre-installation packet detection interface function is to save the field data of the application installation (such as saving the parameter information of the application installation interface function that the operating system passes to the package management service), and the identification information of the application to be installed. It is passed back to the application layer so that the application layer can perform virus scanning on the applications that need to be installed.
- the application identifier information to be installed may be transmitted from the framework layer to the application layer by using a callback interface.
- the application layer registers an application installation listener in the framework layer, so that the application layer can install and listen through the application.
- the device obtains identification information of the application to be installed from the framework layer.
- the application layer security management application (such as 360 security guards, etc.) can register the application installation listener at the framework layer through the class function for setting the listener, and the application installs the listener corresponding application installation listener interface function. It will be called by the pre-installation packet detection interface function of the framework layer (the application installs the listener interface function as a callback function), so that the application ID that needs to be installed is transmitted from the framework layer to the application layer.
- the name of the application installation interception interface function can be set in the application installation listener collection of the framework layer, so that the pre-installation package detection interface function can obtain the name of one or more callback functions from the application installation listener collection. (At least the name of the application installation listener interface function is included).
- the pre-installation package detection interface function calls each callback function by the obtained name, thereby transmitting the application identification information to be installed to each callback function.
- the above application identification information refers to information that can uniquely locate an application, and the application identification information may be specifically a URI (Uniform Resource Ident if ier) of the application.
- URI Uniform Resource Ident if ier
- the application installation listening interface function can provide the application identification information to the virus scanning application in the terminal device (the virus scanning application can also be referred to as a security management application, such as an existing antivirus application). Etc.), and triggers a virus scanning application to perform a virus scan of the application corresponding to the application identification information.
- S120 Acquire a scan result of the virus scanning process, and send a notification to the framework layer whether to perform an installation operation of the application according to the scan result.
- the embodiment may use the application in the application layer to install the recovery function. Or aborting the application installation class function to issue a corresponding notification to the framework layer, so that the application installation interface function in the framework layer knows whether the installation operation of the application should be performed.
- the security management application invokes an application installation recovery function in the application layer or aborts the application installation class function, and sets an application installation recovery function in the application layer according to the virus scan result or Aborting the input parameters of the application installation class function; the application installation recovery function in the application layer or aborting the application installation class function and then calling the application installation recovery function provided by the framework layer service or aborting the application installation class function to notify the framework layer whether to execute The installation operation of the application.
- the security management application can automatically send a notification to the framework layer whether to perform the installation operation of the application according to the virus scanning result; a specific example, If the security management application does not find that the application to be installed carries a virus, the security management application directly invokes the application installation recovery function in the application layer or aborts the application installation class function, and installs the recovery class through the application in the application layer.
- the security management application finds that the application to be installed carries a virus, the security management application directly invokes the application installation recovery function in the application layer or aborts the application installation function, and installs through the application in the application layer.
- the recovery class function or the application installation recovery class function provided by the service installation class function call framework layer service or the application installation class function is aborted to notify the framework layer that the application installation operation is no longer performed.
- the security management application may also send a notification to the framework layer whether to perform the installation operation of the application according to the virus scanning result and the indication information of the user; In the case where the security management application finds that the application is carrying a virus, the security management application prompts the user to "scan that the application is carrying a virus, whether the application is still to be installed", and the security management application is based on user input.
- the application installation recovery function of the framework layer service or the abort application installation function determines that the installation operation of the application needs to be performed according to an application installation recovery function function in the application layer or an input parameter of the application installation class function is suspended.
- the saved field data should be obtained first, and the field data is provided to the application installation interface function, and the application installation interface function is triggered to execute the installation operation of the application, so that the application is successfully installed in the terminal device;
- the service installation application recovery function or the abort application installation class function determines whether the installation operation of the application does not need to be performed according to the application installation recovery function function in the application layer or the input parameter of the application installation class function is determined.
- the previously saved field data can be directly discarded, and the application installation interface function is no longer triggered to perform the installation operation of the application, so that the application is not installed in the terminal device.
- the input parameter of the application installation interface function includes a flag for restoring the installation operation.
- the application installation interface function is applied.
- the pre-installation packet detection interface function will not be executed.
- the application installation interface function should execute the pre-installation packet detection interface when it is called. function.
- the application installation recovery class function provided by the service of the framework layer or the abort application installation class function calls the application installation interface function to provide the saved field data to the application in the case of deciding that the installation operation of the application needs to be executed.
- the two application installation interface functions can be different in function name (such as application installation interface function A and application installation interface function B).
- One is an application installation interface function modified by the present invention ie, includes a pre-installation packet detection interface function
- the other is an application installation interface function (ie, an existing application installation interface function) that has not been modified by the present invention.
- the application installation interface function modified by the present invention cannot be directly called by the external (for example, cannot be directly called by the package management service), but can only be called by the application installation recovery function provided by the framework layer service or by aborting the application installation class function.
- the application installation recovery class function provided by the service of the framework layer or the abort application installation class function calls the application installation interface function not modified by the invention in the case of deciding that the installation operation of the application needs to be executed, and saves the above
- the field data is provided to an application installation interface function that has not been modified by the present invention, so that the installation operation of the application is executed, the application is installed in the terminal device; the application provided by the service of the framework layer installs a recovery class function or aborts the application installation function.
- the previously saved field data may be directly discarded.
- the application layer (such as a security management application) may directly delete the application; or may be first applied by an application layer (such as a security management application).
- the program prompts the user whether to delete the application. If the user instructs to delete the application, the application layer (such as the security management application) deletes the application, otherwise the application layer (such as the security management application) does not delete. The operation of the app.
- this embodiment can add a Hook (hook) to the application installation interface function in the Framework layer of the Android environment, thus interrupting the original application installation process.
- the installation interface function first calls back the interface function of the security management application to notify the application layer to install the application event. Then, the application layer can decide whether to continue the application process of the framework layer according to the virus scan result; The virus application is installed in the terminal device.
- Embodiment 2 Virus defense method. The method of this embodiment will be described below with reference to FIG. 2 taking the Android operating system 4.2.2 as an example.
- Boolean setPrelnstallListener (Uri uri,
- Boolean resumeOrAbortlnstall (String packageName, boolean abort)
- Boolean is used to inform the framework layer whether to continue to install the App (application); it will call the framework layer
- the name of the service can be SecurityService (network security service).
- the service provides the following interface functions:
- the application installation interface function in the above-mentioned existing package management service is modified as follows:
- Reconstruction 1 Directly rename the application installation interface function in the above existing package management service to instal tal lPackageWi thVer if icat ionAndEncryptionOrig in ( ), that is, in the case where the content in the hold function has not changed, in the original application.
- the name of the installation interface function is followed by the word Origin to indicate that the application installation interface function is the original application installation interface function.
- Modification 2 Add an application installation interface function.
- the function name and parameters of the newly added application installation interface function are exactly the same as the original application installation interface function, but the contents of the function have changed. Please refer to the following description:
- checkPkgPrelnstall is mainly used to check whether an application is registered with the application installation supervisor. Listener, etc.
- the callback application installs the interface function onPrelnstall() of the listener to notify the application layer to scan the application that needs to be installed.
- Boolean holdlnstal 1 QSSecurityProxy. checkPkgPrelnstal 1
- ⁇ ⁇ parameter abort indicates whether to terminate the installation of the application
- IPackageManager m QSServiceUt i 1. getPm ();
- the security management application can call the class function setPrelnstallListener ( ) in QihooAppManager to register the application installation listener in the framework layer; when the application needs to be installed, the operating system calls the ins ta 1 IPackageWi provided by the package management service.
- the interface is set at the beginning of the function with the checkPkgPrelnstall 0 interface function provided by the security service, checkPkgPrelns ta 110 interface function after the field data is saved, according to the above registered application install listener callback onPrelnstall (Uri Uri), in this way, the framework layer does not perform the actual installation operation, but first informs the security management application of the installation event through the aforementioned application installation listener, so that the security management application can be based onPrelnstall (Uri Uri) The call immediately scans the application that needs to be installed.
- the security management application calls the application layer's class function resumeOrAbortlnstall().
- the specific value of the second parameter in the function is the security management application.
- the virus scan results to determine that the class function resumeOrAbortlnstall() notifies the framework layer whether to perform the installation operation of the application by calling resumeOrAbortlnstall() provided by the framework layer's network security service.
- the instal IPackage WiThVer if icationAndEncry t ionOr igin () interface function not modified by the present invention is called, and the above The saved field data is provided to the instal IPackageWi thVer if icat ionAndEncryptionOrOrgin interface function, the instal IPackageWi thVer if icat ionAndEncrypt ionOr igin () interface function performs the installation operation of the application, such as executing the sendMessage shown in FIG.
- the resumeOrAbortlnstall 0 provided by the network security service at the framework layer determines that no execution is required In the case of the installation operation of the application, the resumeOrAbor t lns tal 0 provided by the network security service of the framework layer can directly discard the saved field data to end the installation operation of the application.
- the embodiment of the present invention modifies the application installation interface function in the Framework layer of the Andro id operating system, and inserts a hook in the existing installation process of the application installation interface function.
- the virus scanning application Before the application installation interface function performs the installation operation of the application, the virus scanning application first performs virus scanning on the application to be installed, so that the embodiment of the present invention can no longer perform the installation operation for the application carrying the virus, so that the installation operation can be performed. The application carrying the virus can no longer be installed in the terminal device. Finally, the embodiment of the present invention avoids the potential harm caused by the mobile virus application being installed in the terminal device.
- Embodiment 3 A virus defense device. The device will be described in detail below with reference to FIG.
- the device shown in FIG. 1 can be disposed in an intelligent electronic device such as a computer, a smart mobile phone, or a tablet computer; and the device mainly includes: an application installation module 300, a startup virus scanning module 310, a notification module 320, and a listener registration module. 330 and an application clearing module 340; wherein the application installation module 300 is connected to the listener registration module 330, the startup virus scanning module 310 is connected to the application installation module 300 and the notification module 320, respectively, and the notification module 320 is also cleared with the application. Module 340 is connected.
- the application installation module 300 is mainly adapted to transmit the application identification information to be installed from the framework layer to the application layer when the Android operating system needs to install the application.
- an application installation listening interface function may be set in the application layer, a service (such as a security service) is provided in the framework layer, and a pre-installation packet detection interface function is set for the security service, and the pre-installation packet detection interface is configured.
- the function is set in the application installation module 300; in this way, the application installation module 300 can transmit the application identification information to be installed to the application installation listening interface function of the application layer through the pre-installation packet detection interface function of the security service of the framework layer.
- the application installation interface function (the application installation interface function belongs to the application installation module 300) in the package management service is called, so the embodiment can pass
- the specific implementation process in the existing application installation interface function is modified to perform virus scanning on the application before the installation operation of the application is performed, so as to prevent the terminal device from installing the application carrying the virus.
- the pre-installation packet detection interface function may be set at the beginning of the application installation interface function, so that when the application installation interface function is invoked to execute, the application installs the interface function.
- the specific implementation flow included in the pre-package detection interface function is executed first, and the normal installation operation of the application in the application installation interface function is interrupted.
- the main function of the pre-installation packet detection interface function is to save the field data of the application installation (such as saving the parameter information of the application installation interface function that the operating system passes to the package management service), and the identification information of the application to be installed. It is passed back to the application layer so that the application layer can perform virus scanning on the applications that need to be installed.
- the application identifier information to be installed may be transmitted from the framework layer to the application layer by using a callback interface.
- the listener registration module 330 in the application layer registers the application installation listener in the framework layer, so that the application layer
- the boot virus scanning module 310 can obtain the identification information of the application to be installed from the framework layer through the application installation listener.
- the listener registration module 330 in the application layer security management application can register an application installation listener at the framework layer through a class function for setting a listener, and the application installs a listener.
- the corresponding application installation listener interface function is called by the pre-installation package detection interface function in the application layer installation module 300 of the framework layer, so that the application identifier to be installed is transmitted from the framework layer to the application layer.
- the listener registration module 330 can set the name of the application installation listener interface function to the application installation listener collection of the framework layer, so that the pre-installation package detection interface function in the application installation module 300 can be obtained from the application installation listener collection.
- the pre-installation package detection interface function calls each callback function by the obtained name, so that the application installation module 300 will need to install the application. Identification information is transmitted to each callback function.
- the above application identification information refers to information that can uniquely locate an application, and the application identification information may be specifically a URI of an application or the like.
- the boot virus scanning module 310 is mainly adapted to start a virus scanning application according to the application identification information at the application layer, so that the virus scanning application performs virus scanning processing on the application to be installed.
- the application installation listening interface function in the startup virus scanning module 310 can provide the application identification information to the virus scanning application in the terminal device (the virus scanning application can also be referred to as a security management application, Such as an existing anti-virus application, etc., and triggers a virus scanning application to perform a virus scan on the application corresponding to the application identification information.
- the virus scanning application can also be referred to as a security management application, Such as an existing anti-virus application, etc., and triggers a virus scanning application to perform a virus scan on the application corresponding to the application identification information.
- the notification module 320 is mainly adapted to obtain the scan result of the virus scan process, and issue a notification to the framework layer whether to perform the installation operation of the application according to the scan result.
- the notification module 320 can use the application in the application layer to install the recovery function or terminate the application. Apply the installation class function to the corresponding layer of the framework layer Notify so that the application installation interface function in the framework layer knows if the installation of the application should be performed.
- the notification module 320 invokes the application installation recovery function in the application layer or aborts the application installation function, and sets the application installation recovery in the application layer according to the virus scan result.
- the class function either aborts the input parameters of the application installation class function; the application installs the recovery class function in the application layer or aborts the application installation class function and then calls the application installation recovery class function provided by the framework layer service or aborts the application installation class function to notify the framework Whether the layer performs the installation of the application.
- the notification module 320 automatically sends a notification to the framework layer whether to perform the installation operation of the application according to the virus scanning result; a specific example, in the virus scanning If the application does not find that the application to be installed carries a virus, the notification module 320 directly invokes the application installation recovery function in the application layer or aborts the application installation function, and installs the recovery function or the application through the application in the application layer.
- the application installation function calls the application installation recovery class function provided by the service of the framework layer or aborts the application installation class function to notify the framework layer to execute the application installation operation; another specific example, the virus scanning application finds the application to be installed.
- the virus scanning application When the program carries a virus, the virus scanning application directly calls the application installation recovery function in the application layer or aborts the application installation class function, and installs the recovery class function or terminates the application installation class function call through the application in the application layer.
- the service provided by the framework layer provides an application installation recovery class function or aborts the application installation class function to notify the framework layer that the application installation operation is no longer performed.
- the notification module 320 may also send a notification to the framework layer whether to perform an installation operation of the application according to the virus scan result and the indication information of the user after the virus scanning application successfully performs the virus scanning operation; For example, in the case that the virus scanning application finds that the application carries a virus, the notification module 320 prompts the user to "scan and find that the application carries a virus, whether to still install the application", and the notification module 320 according to the instruction information input by the user. Call the application installation recovery class function in the application layer or abort the application installation class function, and install the recovery class function through the application installation recovery function in the application layer or abort the application installation class function to call the application service of the framework layer to install the recovery class function or abort the application installation. A class function that tells the framework layer whether to perform the application installation operation.
- the application installation module 300 is also primarily adapted to perform an installation operation of the application according to the notification of the notification module 320 or to refuse to perform the installation operation of the application.
- the application installation recovery class function provided by the service of the framework layer or the abort application installation class function (belonging to the application installation module 300) is determined according to an application installation recovery function function in the application layer or an input parameter of the application installation class function is suspended. Need to perform the installation operation of the application
- the saved field data should be obtained first, the field data is provided to the application installation interface function, and the application installation interface function is triggered to execute the installation operation of the application, so that the application is successfully installed in the terminal device;
- the application-provided recovery class function provided by the service or the abort application installation class function determines that the installation operation of the application is not required to be performed according to the application installation recovery function function in the application layer or the input parameter of the application installation class function is suspended.
- the previously saved field data is directly discarded, and the application installation interface function is no longer triggered to perform the installation operation of the application, so that the application is not installed in the terminal device.
- the input parameter of the application installation interface function includes a flag for restoring the installation operation.
- the flag indicates that the installation operation is resumed, the application is applied.
- the installation interface function is called, the pre-installation packet detection interface function will not be executed.
- the flag indicates non-recovery installation operation, the application installation interface function should be executed before the installation. Packet detection interface function.
- the application installation recovery class function or the abort application installation class function in the application installation module 300 when determining that the installation operation of the application needs to be executed, invokes the application installation interface function to provide the saved field data to the Apply the installation interface function, and set the flag of the recovery installation operation to represent the value of the recovery installation operation, so that the application installation interface function does not call the pre-installation package detection interface function, but directly executes the installation operation of the application, and the application is Installed in the terminal device; the application-installation recovery function provided by the service of the framework layer or the abort application installation class function directly discards the saved field data without deciding to perform the installation operation of the application.
- the two application installation interface functions may be different in function names (such as application installation interface function A and application installation interface function B).
- One of them is an application installation interface function modified by the present invention (ie, including a pre-installation packet detection interface function), and the other is an application installation interface function (ie, an existing application installation interface function) that has not been modified by the present invention.
- the application installation interface function not modified by the invention cannot be directly called by the external (for example, cannot be directly called by the package management service), but can only be installed by the service provided by the framework layer service to resume the class function or abort the application installation function. Called (belonging to application installation module 300).
- the application installation recovery class function provided by the service of the framework layer or the abort application installation class function calls the application installation interface function not modified by the invention in the case of deciding that the installation operation of the application needs to be executed, and saves the above
- the field data is provided to an application installation interface function that has not been modified by the present invention, so that the installation operation of the application is executed, the application is installed in the terminal device; the application provided by the framework layer service installs a recovery function or aborts the application installation class
- the function directly discards the previously saved field data when it is decided that the installation operation of the application does not need to be performed.
- the application clearing module 340 disposed in the application layer may directly delete the application; or the application clearing module 340 may first prompt the user whether to delete the virus.
- the application if the user instructs to delete the application, the application clearing module 340 deletes the application, otherwise, the application clearing module 340 does not perform the operation of deleting the application.
- modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
- the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
- any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed may be employed in any combination. Or combine all the processes or units of the device.
- Each feature disclosed in the specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose, unless otherwise stated.
- any one of the claimed embodiments can be used in any combination.
- the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
- a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components of the virus protection device in an electronic device in accordance with embodiments of the present invention. .
- the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
- a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals.
- signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
- Fig. 4 shows a communication device in which the virus defense method of the present invention can be implemented.
- the communication device conventionally includes a processor 410 and a computer program product or computer readable medium in the form of a memory 420.
- Memory 420 can be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk or ROM.
- Memory 420 has a memory space 430 for program code 431 for performing any of the method steps described above. For example, for program code storage
- the program code can be read from the article ⁇ a ⁇ a or more computer programs that are written to one or more computer program product.
- These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks.
- Such computer program products are typically portable or fixed storage units as described with reference to FIG.
- the storage unit may have a storage section or a storage space or the like arranged similarly to the storage 420 in the communication device of FIG.
- the program code can be compressed, for example, in an appropriate form.
- the storage unit comprises a program 431' for performing the steps of the method according to the invention, i.e. code which can be read by a processor, such as 410, which, when executed by the communication device, causes the communication device to perform the above Each step in the described method.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Virology (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Stored Programmes (AREA)
Abstract
一种病毒防御方法和装置;其中的病毒防御方法包括:在Android操作系统需要安装应用程序时,将需要安装的应用程序标识信息由框架层传输至应用层;在应用层,根据所述应用程序标识信息启动病毒扫描应用程序,以使病毒扫描应用程序对所述应用程序进行病毒扫描处理;获取所述病毒扫描处理的扫描结果,并根据所述扫描结果向框架层发出是否执行所述应用程序的安装操作的通知;在框架层,根据所述通知执行所述应用程序的安装操作或者拒绝执行所述应用程序的安装操作。
Description
病毒防御方法和装置
技术领域
本发明涉及病毒防御技术, 具体涉及一种病毒防御方法和装置。 背景技术 , 。 、 ' ,一 ^ 、、 口 、 、 曰 ; 丙 毒防御, 终端设备尤其是智能移动设备, 通常都设置有安全管理应用程序, 该 安全管理应用程序所能够提供的一个主要功能就是病毒查杀。
为了确保终端设备尽可能的不被病毒感染,现有的安全管理应用程序通常 会提供应用程序安装的病毒查杀功能; 也就是说,在终端设备安装完一应用程 序后, 安全管理应用程序立即对刚安装的应用程序进行病毒扫描及杀毒处理; 一个具体的例子为: 在基于 Android操作系统的终端设备成功安装了一个应用 程序之后, Andro id操作系统会针对该应用程序的成功安装发出相应的广播, 安全管理应用程序在监听到该广播后, 启动病毒扫描处理, 以检测终端设备刚 刚安装完成的应用程序是否携带有病毒;安全管理应用程序可以根据病毒扫描 结果向用户提供相应的提示信息,从而安全管理应用程序可以根据用户输入的 指示信息执行相应的操作; 如安全管理应用程序向用户显示 "安装的应用程序 携带有病毒, 是否卸载该应用程序" 的提示信息, 安全管理应用程序在接收到 用户的卸载指示后, 卸载刚安装的应用程序。
发明人在实现本发明过程中发现,上述现有的病毒防御方式并没有尽可能 的确保终端设备的安全, 具体的说, 在 Android操作系统中的框架层将应用程 序成功安装在终端设备中之后,即使终端设备应用层中的安全管理应用程序扫 描出该应用程序携带有病毒, 并针对该应用程序执行了卸载处理, 然而, 由于 框架层已经将该应用程序安装在终端设备中,因此该病毒已随着应用程序的成 功安装而侵入了终端设备,从而在该应用程序被应用层的安全管理应用程序成 功卸载之前, 该应用程序携带的病毒很可能已经对终端设备造成了一定的危 害。 发明内容
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地 解决上述问题的病毒防御方法和相应的病毒防御装置。
依据本发明的一个方面, 提供了一种病毒防御方法, 所述方法包括: 在 Android操作系统需要安装应用程序时, 将需要安装的应用程序标识信息由框
架层传输至应用层; 在应用层,根据所述应用程序标识信息启动病毒扫描应用 程序, 以使病毒扫描应用程序对所述应用程序进行病毒扫描处理; 获取所述病 毒扫描处理的扫描结果,并根据所述扫描结果向框架层发出是否执行所述应用 程序的安装操作的通知; 在框架层,根据所述通知执行所述应用程序的安装操 作或者拒绝执行所述应用程序的安装操作。
根据本发明的另一方面, 提供了一种病毒防御装置, 该装置包括: 应用程 序安装模块, 适于在 Android操作系统需要安装应用程序时, 将需要安装的应 用程序标识信息由框架层传输至应用层; 启动病毒扫描模块, 适于在应用层, 根据所述应用程序标识信息启动病毒扫描应用程序,以使病毒扫描应用程序对 所述应用程序进行病毒扫描处理; 通知模块,适于获取所述病毒扫描处理的扫 描结果,并根据所述扫描结果向框架层发出是否执行所述应用程序的安装操作 的通知; 所述应用程序安装模块还适于, 在框架层, 根据所述通知执行所述应 用程序的安装操作或者拒绝执行所述应用程序的安装操作。
本发明的病毒防御方法和装置通过在框架层执行应用程序的安装操作之 前, 由框架层通知应用层利用病毒扫描应用程序对应用程序进行病毒扫描处 理, 这样, 在应用程序携带有病毒的情况下, 应用层可以通知框架层不再执行 该应用程序的安装操作,使携带有病毒的应用程序可以不再被框架层安装在终 端设备中,从而本发明实施例避免了携带病毒应用程序被框架层安装在终端设 备中而给终端设备带来的潜在危害, 提高了终端设备的安全性。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术 手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、 特征和优点能够更明显易懂, 以下特举本发明的具体实施方式。 附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领 域普通技术人员将变得清楚明了。 说明书附图仅用于示出优选实施方式的目 的, 而并不认为是对本发明的限制。 而且在整个附图中, 用相同的参考符号表 示相同的部件。 在附图中:
图 1示出了根据本发明实施例一的病毒防御方法流程图;
图 2示出了根据本发明实施例二的病毒防御方法流程图;
图 3示出了根据本发明实施例三的病毒防御装置示意图;
图 4示出了用于执行本发明的方法的通信设备的框图; 以及
图 5示出了用于保持或者携带实现根据本发明的方法的程序代码的存储单 元示意图。
具体实施方式
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了 本公开的示例性实施例, 然而应当理解, 可以以各种形式实现本公开而不应被 这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本 公开, 并且能够将本公开的范围完整的传达给本领域的技术人员。
实施例一、 病毒防 卩方法。 下面结合图 1对本实施例的方法进行说明。 图 1中, S100、 在 Android操作系统需要安装应用程序时, 将需要安装的应 用程序标识信息由框架层传输至应用层。
具体的, 本实施例可以在应用层中设置应用安装监听接口函数,在框架层 中提供一服务(如安全服务) , 并为该安全服务设置安装前包检测接口函数; 这样,需要安装的应用程序标识信息可以通过框架层的安全服务的安装前包检 测接口函数传输给应用层的应用安装监听接口函数。
由于应用程序在安装时, Android操作系统会启动包管理服务, 而包管理 服务中的应用安装接口函数会被调用, 因此, 本实施例可以通过对现有的应用 安装接口函数中的具体实现流程进行改造,以实现在执行应用程序的安装操作 之前先对该应用程序进行病毒扫描,以避免终端设备安装携带有病毒的应用程 序的目的。
本实施例可以在应用安装接口函数的开始位置处设置安装前包检测接口 函数, 这样, 在应用安装接口函数被调用执行时, 应用安装接口函数中的该安 装前包检测接口函数中所包含的具体实现流程首先被执行,而应用安装接口函 数中的应用程序的正常安装操作被中断。安装前包检测接口函数的一个主要作 用是保存应用程序安装的现场数据(如保存操作系统传入至包管理服务的应用 安装接口函数的各个参数信息), 并将需要安装的应用程序的标识信息回传给 应用层, 以便于应用层对需要安装的应用程序进行病毒扫描处理。
本实施例可以通过回调接口的方式将需要安装的应用程序标识信息由框 架层传输到应用层; 具体的, 应用层在框架层中注册应用安装监听器, 从而应 用层可以通过该应用安装侦听器从框架层获得需要安装的应用程序的标识信 息。
一个具体的例子, 应用层的安全管理应用程序 (如 360安全卫士等)可以 通过用于设置监听器的类函数在框架层注册应用安装监听器,该应用安装监听 器对应的应用安装监听接口函数会被框架层的安装前包检测接口函数所调用 (该应用安装监听接口函数为回调函数),从而需要安装的应用程序标识由框 架层传输至应用层。
本实施例可以将应用安装监听接口函数的名称设置于框架层的应用安装 监听器集合中, 这样, 安装前包检测接口函数可以从应用安装监听器集合中获 取到一个或者多个回调函数的名称(其中至少包含有应用安装监听接口函数的 名称), 安装前包检测接口函数通过获得的名称调用各回调函数, 从而将需要 安装的应用程序标识信息传输给各回调函数。
上述应用程序标识信息是指可以唯一定位一应用程序的信息,该应用程序 标识信息可以具体为应用程序的 URI ( Uniform Resource Ident if ier , 通用资 源标识)等。
S110、 在应用层, 根据应用程序标识信息启动病毒扫描应用, 以使病毒扫 描应用程序对该需要安装的应用程序进行病毒扫描处理。
具体的,在应用层,应用安装监听接口函数可以将应用程序标识信息提供 给终端设备中的病毒扫描应用程序(该病毒扫描应用程序也可以称为安全管理 应用程序, 如现有的杀毒应用程序等), 并触发病毒扫描应用程序对该应用程 序标识信息对应的应用程序进行病毒扫描。
S120、获取上述病毒扫描处理的扫描结果, 并根据该扫描结果向框架层发 出是否执行应用程序的安装操作的通知。
具体的, 在病毒扫描应用程序(可以包含在安全管理应用程序中)对需要 安装的应用程序病毒扫描完毕,产生并输出病毒扫描结果后, 本实施例可以利 用应用层中的应用安装恢复类函数或者中止应用安装类函数向框架层发出相 应的通知,以使框架层中的应用安装接口函数获知是否应执行该应用程序的安 装操作。
一个具体的例子,安全管理应用程序在病毒扫描操作执行完毕后,调用应 用层中的应用安装恢复类函数或者中止应用安装类函数,并根据病毒扫描结果 设置应用层中的应用安装恢复类函数或者中止应用安装类函数的输入参数;应 用层中的应用安装恢复类函数或者中止应用安装类函数再调用框架层的服务 提供的应用安装恢复类函数或者中止应用安装类函数,以通知框架层是否执行 应用程序的安装操作。
在本实施例中,安全管理应用程序可以在病毒扫描应用程序成功执行了病 毒扫描操作后, 自动根据病毒扫描结果直接向框架层发出是否执行应用程序的 安装操作的通知; 一个具体的例子,在安全管理应用程序未发现需要安装的应 用程序携带有病毒的情况下,安全管理应用程序直接调用应用层中的应用安装 恢复类函数或者中止应用安装类函数,并通过应用层中的应用安装恢复类函数 或中止应用安装类函数调用框架层的服务提供的应用安装恢复类函数或者中 止应用安装类函数, 来通知框架层执行该应用程序安装操作; 另一个具体的例
子,在安全管理应用程序发现需要安装的应用程序携带有病毒的情况下, 安全 管理应用程序直接调用应用层中的应用安装恢复类函数或者中止应用安装类 函数,并通过应用层中的应用安装恢复类函数或者中止应用安装类函数调用框 架层的服务提供的应用安装恢复类函数或者中止应用安装类函数,来通知框架 层不再执行该应用程序安装操作。
在本实施例中,安全管理应用程序也可以在病毒扫描应用程序成功执行了 病毒扫描操作后,根据病毒扫描结果以及用户的指示信息向框架层发出是否执 行应用程序的安装操作的通知; 一个具体的例子,在安全管理应用程序发现应 用程序携带有病毒的情况下, 安全管理应用程序提示用户 "扫描发现该应用程 序携带有病毒, 是否仍要安装该应用程序" , 安全管理应用程序根据用户输入 的指示信息来调用应用层中的应用安装恢复类函数或者中止应用安装类函数, 并通过应用层中的应用安装恢复类函数或中止应用安装类函数调用框架层的 服务提供的应用安装恢复类函数或者中止应用安装类函数,来通知框架层是否 执行该应用程序安装操作。
S130、在框架层,根据接收到的通知执行应用程序的安装操作或者拒绝执 行应用程序的安装操作。
具体的,框架层的服务提供的应用安装恢复类函数或者中止应用安装类函 数在根据应用层中的应用安装恢复类函数或者中止应用安装类函数的输入参 数确定出需要执行该应用程序的安装操作的情况下,应先获取前述保存的现场 数据,将该现场数据提供给应用安装接口函数, 并触发应用安装接口函数执行 应用程序的安装操作,从而使应用程序成功安装于终端设备中; 框架层的服务 提供的应用安装恢复类函数或者中止应用安装类函数在根据应用层中的应用 安装恢复类函数或者中止应用安装类函数的输入参数确定出不需要执行该应 用程序的安装操作的情况下, 可直接丟弃前述保存的现场数据, 并不再触发应 用安装接口函数执行应用程序的安装操作,从而应用程序不会被安装在终端设 备中。
一个具体的例子,框架层中只存在一个应用安装接口函数, 该应用安装接 口函数的输入参数中包含有恢复安装操作的标志位,在该标志位表示恢复安装 操作的情况下,应用安装接口函数在被调用时, 不会再执行其中的安装前包检 测接口函数, 而在该标志位表示非恢复安装操作的情况下,应用安装接口函数 在被调用时, 应执行其中的安装前包检测接口函数。 这样, 框架层的服务提供 的应用安装恢复类函数或者中止应用安装类函数在决定需要执行该应用程序 的安装操作的情况下,调用该应用安装接口函数,将上述保存的现场数据提供 给该应用安装接口函数,并将恢复安装操作的标志位设置为表征恢复安装操作
的取值,从而应用安装接口函数不再调用安装前包检测接口函数, 而直接执行 应用程序的安装操作,应用程序被安装在终端设备中; 框架层的服务提供的应 用安装恢复类函数或者中止应用安装类函数在决定不需要执行该应用程序的 安装操作的情况下, 直接丟弃前述保存的现场数据即可。
另一个具体的例子,框架层中同时存在有两个应用安装接口函数,这两个 应用安装接口函数在函数名称上可以有所区别 (如应用安装接口函数 A和应用 安装接口函数 B ) , 其中一个是经本发明改造的应用安装接口函数(即包含有 安装前包检测接口函数),而另一个是未经本发明改造的应用安装接口函数(即 现有的应用安装接口函数), 该未经本发明改造的应用安装接口函数并不能直 接被外部调用 (如不能被包管理服务直接调用), 而只能被框架层的服务提供 的应用安装恢复类函数或者中止应用安装类函数所调用。这样,框架层的服务 提供的应用安装恢复类函数或中止应用安装类函数在决定需要执行该应用程 序的安装操作的情况下,调用未经本发明改造的应用安装接口函数, 并将上述 保存的现场数据提供给未经本发明改造的应用安装接口函数,从而应用程序的 安装操作被执行,应用程序被安装在终端设备中; 框架层的服务提供的应用安 装恢复类函数或者中止应用安装类函数在决定不需要执行该应用程序的安装 操作的情况下, 直接丟弃前述保存的现场数据即可。
需要特别说明的是,本实施例在病毒扫描结果为应用程序携带有病毒的情 况下, 应用层(如安全管理应用程序)可以直接删除该应用程序; 也可以先由 应用层(如安全管理应用程序)提示用户是否需要删除该应用程序, 如果用户 指示删除该应用程序, 则应用层(如安全管理应用程序)再删除该应用程序, 否则, 应用层(如安全管理应用程序) 不会执行删除该应用程序的操作。
由上述实施例的描述可知, 本实施例可以在 Andr 0 i d操作系统的框架 ( Framework )层中的应用安装接口函数中加入 Hook (钩子) , 这样, 中断了 原有的应用程序安装过程,应用安装接口函数先回调安全管理应用程序的接口 函数, 以通知应用层安装应用程序这一事件, 然后, 应用层可以根据病毒扫描 结果, 决定是否继续框架层的应用程序安装流程; 从而可以禁止携带有病毒的 应用程序被安装在终端设备中。
实施例二、 病毒防御方法。 下面结合图 2以 Android操作系统 4. 2. 2为例, 对本实施例的方法进行说明。
在应用 (App )层, 利用 Sdk (软件开发工具包)为安全管理应用程序(如 360安全卫士)定义如表 1和表 2所示的类函数以及接口函数, 以便于应用层与 Framework (框架)层进行信息交互:
表 1
QihooPrelnstallListener
(也 ;,」
onPrelnstall (Uri Ur i)
Void
是应用安装监听器对应的接口函数, 在应用程序被安装前, Framework 层 调用此回调函数, 以通知应用层需要安装的应用程序的 Uri。
空类型
表 2
QihooAppManager
—,' / f
Boolean setPrelnstallListener (Uri uri,
布尔型 QihooPrelnstallListener listener)
用于向操作系统的框架层中注册应用安装监听器,这样,在应用被安装时. 该应用安装监听器对应的接口函数会被 Framework层回调。
Boolean resumeOrAbortlnstall (String packageName, boolean abort)
布尔型 用于通知框架层是否继续安装 App (应用程序); 它会调用框架层的
SecurityService的 resumeOrAbortlnstall 0接口函数。
在 Framework层, 新增一个服务, 该服务的名称可以为 SecurityService (网络安全服务) , 该服务提供如下接口函数:
〃在应用程序实际安装开始之前, 调用表 1所示的接口函数, 以通知应用 层的安全管理应用程序有个应用程序要被安装到终端设备中:
public boolean checkPkgPrelnstal 1 (Uri packagellRI,
IPackagelns tal Wbserver observer,
int flags,
String ins ta llerPa ckageName,
Verifica t ionParams Verifica t ionParams,
Con ta inerEncryp t ionParams encrypt ionParams) 上 述 ackageURI 、 observer 、 flags 、 ins tal lerPackageName 、 断时, 应保存的现场数据, 且 ackageURI 、 observer 、 flags 、 ins tal lerPackageName.
操作系统传入至包管理服务的信息(
〃通知包管理服务(PackageManagerService)是否要安装指定的应用程 序, 即是否触发实际的安装操作:
//uri: 表示应用程序的位置信息
//abort: true表示放弃安装该应用程序, false表示安装该应用程序。 public void resumeOrAbortlnstall (Uri uri, boolean abort) 需要特别说明的是, 上述 checkPkgPrelnstall ( )是本发明实施例在应用 安装接口函数 ( ^ installPackageWithVerif icationAndEncryption 0接口函 数)的开始位置处新增的内容。 也就是说, 本发明对现有的应用安装接口函数 进行了改造, 下面以一个具体的例子对该改造进行详细说明。
设定现有的包管理服务中的应用安装接口函数为:
public void ins tal lPackageWi thVer if icat ionAndEncrypt ion
(Uri packageURI,
IPackagelns ta 11 Observer observer,
int flags ,
String instal lerPackageName,
Ver if icat ionPa rams verif icationParams, ContainerEncry t ionParams encry t ionPa rams) 在本发明实施例中,对上述现有的包管理服务中的应用安装接口函数进行 了如下来两方面改造:
改造 1、 直接将上述现有的包管理服务中的应用安装接口函数重命名为 ins tal lPackageWi thVer if icat ionAndEncrypt ionOrig in ( ) , 即在保持函数 中的内容没有发生任何变化的情况下,在原应用安装接口函数的名称后面增加 了 Origin字样, 以表示该应用安装接口函数是原来的应用安装接口函数。
改造 2、 新增一个应用安装接口函数, 该新增的应用安装接口函数的函数 名字以及参数都和原应用安装接口函数完全相同,只是函数中的内容发生了变 化, 请参见如下描述:
public void ins tal lPackageWi thVer if icat ionAndEncrypt ion
(Uri packageURI,
IPackagelns ta 11 Observer observer,
int flags, String ins tal lerPackageName,
Ver if icat ionParams verif icationParams,
ContainerEncry t ionParams encry t ionParams)
II checkPkgPrelnstall主要用于检查一下是否有应用注册了应用安装监
听器等;
〃如果没有应用注册应用安装监听器, 则返回 false; 否则, 回调应用安 装监听器对应的接口函数 onPrelnstall (), 以通知应用层对需要安装的应用 程序进行病毒扫描。
boolean holdlnstal 1 = QSSecurityProxy. checkPkgPrelnstal 1
(packageURI, observer,
flags, ins tal lerPackageName,
ver if icat ionParams, encry t ionPa rams); 〃如果 holdlnstall为 true, 表示应挂起当前应用程序的安装, 不执行 应用程序的安装操作。后续是否执行应用程序的安装应等待应用层调用框架层 的 resumeOrAbortlnstal 10来决定。
〃如果 holdlnstall为 false, 表示说明发生了前述的情况, 也就没有必 要中断安装了, 直接调用原安装接口。
if (holdlnstall == true) {
Slog, i (TAG, "Suspend install precedure for " + packageURI. getPath () );
} else {
installPackageWi thVer if icat ionAndEncrypt ionOr igin (packageURI, observer, flags, ins tal lerPackageName, ver if icat ionParams, encrypt ionParams); -
另夕卜, 框架层中的 resumeOrAbortlnstall ()的部分代码如下所示:
public void resumeOrAbortlnstall (Uri ur i, boolean abort)
{ 〃参数 abort表示是否终止应用程序的安装
try {
if (abort == true) {〃需要终止应用程序的安装, 直接回调通知操作系 统应用程序安装结果(失败)
installParams. observer, package Ins ta 1 led (null,
PackageManager. INSTALL—FAILED— INTERNAL—ERROR); return;
} else {〃需要继续安装应用程序, 调用修改了函数名称的应用安装接口
函数
IPackageManager m = QSServiceUt i 1. getPm ();
pm. ins tal IPackageWi thVer if icat ionAndEncrypt ionOr igin (ins tal lParams. packageURI, installParams. observer, installParams. flags, - ins tal lPa rams, ins tal lerPackageName,
installParams. ver if icat ionParams,
installParams. encrypt ionParams);
} catch (RemoteExcept ion re) {
Log. e (TAG, re. getMessage () , re);
图 2中, 首先, 安全管理应用程序可以调用 QihooAppManager中的类函数 setPrelnstallListener ( ) 来在框架层中注册应用安装监听器; 当需要安装 应 用 程 序 时 , 操 作 系 统 调 用 包 管 理 服 务 提 供 的 ins ta 1 IPackageWi thVer if icat ionAndEncrypt ion () ^ -函数, 该接口函数的 开始位置处设置有安全服务提供的 checkPkgPrelnstall 0接口函数, checkPkgPrelns ta 110接口函数在保存现场数据后,根据上述注册的应用安装 监听器回调 onPrelnstall (Uri Uri), 这样, 框架层并没有执行实际的安装操 作, 而是先通过前述的应用安装监听器通知安全管理应用程序这一安装事件, 从而安全管理应用程序可以根据 onPrelnstall (Uri Uri)的调用马上对需要安 装的应用程序进行病毒扫描处理, 然后, 安全管理应用程序调用应用层的类函 数 resumeOrAbortlnstall () , 该类函数中的第二个参数的具体取值是安全管 理应用程序根据病毒扫描结果来确定的, 该类函数 resumeOrAbortlnstall () 通过调用框架层的网络安全服务提供的 resumeOrAbortlnstall ()来通知框架 层是否执行应用程序的安装操作。 在框架层的网络安全服务提供的 resumeOrAbortlnstall ()判断出需要执行应用程序的安装操作的情况下,调用 未经本发明改造的 ins tal IPackageWi thVer if icat ionAndEncry t ionOr igin () 接 口 函 数 , 并 将 上 述 保 存 下 来 的 现 场 数 据 提 供 给 ins tal IPackageWi thVer if icat ionAndEncrypt ionOr igin 0 接 口 函数 , ins tal IPackageWi thVer if icat ionAndEncrypt ionOr igin ()接口函数执行应 用程序的安装操作, 如执行图 2中示出的 sendMessage ( INIT_C0PY)等操作; 在框架层的网络安全服务提供的 resumeOrAbortlnstall 0判断出不需要执行
应用程序的安装操作的情况下, 框架层的网络安全服务提供的 resumeOrAbor t lns ta l l 0可以直接将上述保存下来的现场数据丟弃,以结束应 用程序的安装操作。
图 2中最右侧的虚线表示,现有的应用安装接口函数在被调用后会直接执 行应用程序的安装操作, 如执行图 1 中示出的 sendMes sage ( INIT_C0PY )等 操作, 本实施例完全改变了现有的应用程序的安装操作。
由上述描述可知, 本发明的实施例对 Andro id操作系统的 Framework (框 架)层中的应用安装接口函数进行了修改,在应用安装接口函数的现有安装流 程中插入了 hook (钩子) , 这样, 在应用安装接口函数执行应用程序的安装 操作之前,会先由病毒扫描应用对需要安装的应用程序进行病毒扫描,从而本 发明实施例可以针对携带有病毒的应用程序不再执行安装操作,使携带有病毒 的应用程序可以不再被安装在终端设备中,最终本发明实施例避免了携带病毒 应用程序被安装在终端设备中而给终端设备带来的潜在危害。
实施例三、 病毒防御装置。 下面结合图 3对该装置进行详细说明。
图 1中示出的装置可以设置于计算机、智能移动电话或者平板电脑等智能 电子设备中; 且该装置主要包括: 应用程序安装模块 300、 启动病毒扫描模块 310、 通知模块 320、 监听器注册模块 330和应用程序清除模块 340; 其中, 应 用程序安装模块 300与监听器注册模块 330连接,启动病毒扫描模块 310与应 用程序安装模块 300和通知模块 320分别连接,且通知模块 320还与应用程序 清除模块 340连接。
应用程序安装模块 300主要适于在 Android操作系统需要安装应用程序 时, 将需要安装的应用程序标识信息由框架层传输至应用层。
具体的, 本实施例可以在应用层中设置应用安装监听接口函数,在框架层 中提供一服务(如安全服务) , 并为该安全服务设置安装前包检测接口函数, 该安装前包检测接口函数设置于应用程序安装模块 300中; 这样,应用程序安 装模块 300 可以将需要安装的应用程序标识信息通过框架层的安全服务的安 装前包检测接口函数传输给应用层的应用安装监听接口函数。
由于应用程序在安装时, Android操作系统会启动包管理服务, 而包管理 服务中的应用安装接口函数 (该应用安装接口函数属于应用程序安装模块 300 )会被调用, 因此, 本实施例可以通过对现有的应用安装接口函数中的具 体实现流程进行改造,以实现在执行应用程序的安装操作之前先对该应用程序 进行病毒扫描, 以避免终端设备安装携带有病毒的应用程序的目的。
本实施例可以在应用安装接口函数的开始位置处设置安装前包检测接口 函数, 这样, 在应用安装接口函数被调用执行时, 应用安装接口函数中的该安
装前包检测接口函数中所包含的具体实现流程首先被执行,而应用安装接口函 数中的应用程序的正常安装操作被中断。安装前包检测接口函数的一个主要作 用是保存应用程序安装的现场数据(如保存操作系统传入至包管理服务的应用 安装接口函数的各个参数信息), 并将需要安装的应用程序的标识信息回传给 应用层, 以便于应用层对需要安装的应用程序进行病毒扫描处理。
本实施例可以通过回调接口的方式将需要安装的应用程序标识信息由框 架层传输到应用层; 具体的,应用层中的监听器注册模块 330在框架层中注册 应用安装监听器,从而应用层中的启动病毒扫描模块 310可以通过该应用安装 侦听器从框架层获得需要安装的应用程序的标识信息。
一个具体的例子, 应用层的安全管理应用程序(如 360安全卫士等)中的 监听器注册模块 330 可以通过用于设置监听器的类函数在框架层注册应用安 装监听器,该应用安装监听器对应的应用安装监听接口函数会被框架层的应用 程序安装模块 300中的安装前包检测接口函数所调用,从而需要安装的应用程 序标识由框架层传输至应用层。
监听器注册模块 330 可以将应用安装监听接口函数的名称设置于框架层 的应用安装监听器集合中, 这样,应用程序安装模块 300中的安装前包检测接 口函数可以从应用安装监听器集合中获取到一个或者多个回调函数的名称(其 中至少包含有应用安装监听接口函数的名称), 安装前包检测接口函数通过获 得的名称调用各回调函数,从而应用程序安装模块 300将需要安装的应用程序 标识信息传输给各回调函数。
上述应用程序标识信息是指可以唯一定位一应用程序的信息,该应用程序 标识信息可以具体为应用程序的 URI等。
启动病毒扫描模块 310主要适于在应用层,根据应用程序标识信息启动病 毒扫描应用程序,以使病毒扫描应用程序对需要安装的应用程序进行病毒扫描 处理。
具体的,在应用层, 启动病毒扫描模块 310中的应用安装监听接口函数可 以将应用程序标识信息提供给终端设备中的病毒扫描应用程序(该病毒扫描应 用程序也可以称为安全管理应用程序, 如现有的杀毒应用程序等), 并触发病 毒扫描应用程序对该应用程序标识信息对应的应用程序进行病毒扫描。
通知模块 320主要适于获取病毒扫描处理的扫描结果,并根据扫描结果向 框架层发出是否执行应用程序的安装操作的通知。
具体的, 在病毒扫描应用程序(也即安全管理应用程序)对需要安装的应 用程序病毒扫描完毕,产生并输出病毒扫描结果后,通知模块 320可以利用应 用层中的应用安装恢复类函数或者中止应用安装类函数向框架层发出相应的
通知,以使框架层中的应用安装接口函数获知是否应执行该应用程序的安装操 作。
一个具体的例子,通知模块 320在病毒扫描应用程序执行了病毒扫描操作 后,调用应用层中的应用安装恢复类函数或者中止应用安装类函数, 并根据病 毒扫描结果设置应用层中的应用安装恢复类函数或者中止应用安装类函数的 输入参数;应用层中的应用安装恢复类函数或者中止应用安装类函数再调用框 架层的服务提供的应用安装恢复类函数或者中止应用安装类函数,以通知框架 层是否执行应用程序的安装操作。
在本实施例中,通知模块 320在病毒扫描应用程序成功执行了病毒扫描操 作后, 自动根据病毒扫描结果直接向框架层发出是否执行应用程序的安装操作 的通知; 一个具体的例子,在病毒扫描应用程序未发现需要安装的应用程序携 带有病毒的情况下,通知模块 320直接调用应用层中的应用安装恢复类函数或 者中止应用安装类函数,并通过应用层中的应用安装恢复类函数或者中止应用 安装类函数调用框架层的服务提供的应用安装恢复类函数或者中止应用安装 类函数, 来通知框架层执行该应用程序安装操作; 另一个具体的例子, 在病毒 扫描应用程序发现需要安装的应用程序携带有病毒的情况下,病毒扫描应用程 序直接调用应用层中的应用安装恢复类函数或者中止应用安装类函数,并通过 应用层中的应用安装恢复类函数或者中止应用安装类函数调用框架层的服务 提供的应用安装恢复类函数或者中止应用安装类函数,来通知框架层不再执行 该应用程序安装操作。
在本实施例中,通知模块 320也可以在病毒扫描应用程序成功执行了病毒 扫描操作后,根据病毒扫描结果以及用户的指示信息向框架层发出是否执行应 用程序的安装操作的通知; 一个具体的例子,在病毒扫描应用程序发现应用程 序携带有病毒的情况下,通知模块 320提示用户 "扫描发现该应用程序携带有 病毒, 是否仍要安装该应用程序" , 通知模块 320根据用户输入的指示信息调 用应用层中的应用安装恢复类函数或者中止应用安装类函数,并通过应用层中 的应用安装恢复类函数或者中止应用安装类函数调用框架层的服务提供的应 用安装恢复类函数或者中止应用安装类函数,来通知框架层是否执行该应用程 序安装操作。
应用程序安装模块 300还主要适于根据通知模块 320的通知执行应用程序 的安装操作或者拒绝执行应用程序的安装操作。
具体的,框架层的服务提供的应用安装恢复类函数或者中止应用安装类函 数(属于应用程序安装模块 300 )在根据应用层中的应用安装恢复类函数或者 中止应用安装类函数的输入参数确定出需要执行该应用程序的安装操作的情
况下,应先获取前述保存的现场数据,将该现场数据提供给应用安装接口函数, 并触发应用安装接口函数执行应用程序的安装操作,从而使应用程序成功安装 于终端设备中;框架层的服务提供的应用安装恢复类函数或者中止应用安装类 函数在根据应用层中的应用安装恢复类函数或者中止应用安装类函数的输入 参数确定出不需要执行该应用程序的安装操作的情况下,可直接丟弃前述保存 的现场数据, 并不再触发应用安装接口函数执行应用程序的安装操作,从而应 用程序不会被安装在终端设备中。
一个具体的例子, 应用程序安装模块 300 中只存在一个应用安装接口函 数, 该应用安装接口函数的输入参数中包含有恢复安装操作的标志位,在该标 志位表示恢复安装操作的情况下,应用安装接口函数在被调用时, 不会再执行 其中的安装前包检测接口函数, 而在该标志位表示非恢复安装操作的情况下, 应用安装接口函数在被调用时, 应执行其中的安装前包检测接口函数。 这样, 应用程序安装模块 300 中的应用安装恢复类函数或者中止应用安装类函数在 决定需要执行该应用程序的安装操作的情况下,调用该应用安装接口函数,将 上述保存的现场数据提供给该应用安装接口函数,并将恢复安装操作的标志位 设置为表征恢复安装操作的取值,从而应用安装接口函数不再调用安装前包检 测接口函数,而直接执行应用程序的安装操作,应用程序被安装在终端设备中; 框架层的服务提供的应用安装恢复类函数或者中止应用安装类函数在决定不 需要执行该应用程序的安装操作的情况下, 直接丟弃前述保存的现场数据即 可。
另一个具体的例子,应用程序安装模块 300中同时存在有两个应用安装接 口函数, 这两个应用安装接口函数在函数名称上可以有所区别(如应用安装接 口函数 A和应用安装接口函数 B ), 其中一个是经本发明改造的应用安装接口 函数(即包含有安装前包检测接口函数), 而另一个是未经本发明改造的应用 安装接口函数(即现有的应用安装接口函数), 该未经本发明改造的应用安装 接口函数并不能直接被外部调用 (如不能被包管理服务直接调用), 而只能被 框架层的服务提供的应用安装恢复类函数或者中止应用安装类函数(属于应用 程序安装模块 300 )所调用。 这样, 框架层的服务提供的应用安装恢复类函数 或者中止应用安装类函数在决定需要执行该应用程序的安装操作的情况下,调 用未经本发明改造的应用安装接口函数,并将上述保存的现场数据提供给未经 本发明改造的应用安装接口函数,从而应用程序的安装操作被执行, 该应用程 序被安装在终端设备中;框架层的服务提供的应用安装恢复类函数或者中止应 用安装类函数在决定不需要执行该应用程序的安装操作的情况下,直接丟弃前 述保存的现场数据即可。
本实施例在病毒扫描结果为应用程序携带有病毒的情况下,设置于应用层 中的应用程序清除模块 340可以直接删除该应用程序;也可以先由应用程序清 除模块 340 提示用户是否需要删除该应用程序, 如果用户指示删除该应用程 序, 则应用程序清除模块 340 再删除该应用程序, 否则, 应用程序清除模块 340不会执行删除该应用程序的操作。
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有 相关。 各种通用系统也可以与基于在此的示教一起使用。 根据上面的描述, 构 造这类系统所要求的结构是显而易见的。此外, 本发明也不针对任何特定编程 语言。 应当明白, 可以利用各种编程语言实现在此描述的本发明的内容, 并且 上面对特定语言所做的描述是为了披露本发明的最佳实施方式。
在此处所提供的说明书中, 说明了大量具体细节。 然而, 能够理解, 本发 明的实施例可以在没有这些具体细节的情况下实践。在一些实例中, 并未详细 示出公知的方法、 结构和技术, 以便不模糊对本说明书的理解。
类似地,应当理解, 为了精简本公开并帮助理解各个发明方面中的一个或 多个,在上面对本发明的示例性实施例的描述中, 本发明的各个特征有时被一 起分组到单个实施例、 图、 或者对其的描述中。 然而, 并不应将该公开的方法 解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确 记载的特征更多的特征。 更确切地说, 如下面的权利要求书所反映的那样, 发 明方面在于少于前面公开的单个实施例的所有特征。 因此, 遵循具体实施方式 的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为 本发明的单独实施例。
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适 应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实 施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它 们分成多个子模块或子单元或子组件。 除了这样的特征和 /或过程或者单元中 的至少一些是相互排斥之外, 可以釆用任何组合对本说明书(包括伴随的权利 要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所 有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、 摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征 来代替。
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它 实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意 味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求 书中, 所要求保护的实施例的任意之一都可以以任意的组合方式来使用。
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器 上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解, 可以在实践中使用微处理器或者数字信号处理器 (DSP ) 来实现根据本发明实 施例的电子设备中的病毒防御装置中的一些或者全部部件的一些或者全部功 能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备 或者装置程序(例如, 计算机程序和计算机程序产品)。 这样的实现本发明的 程序可以存储在计算机可读介质上, 或者可以具有一个或者多个信号的形式。 这样的信号可以从因特网网站上下载得到, 或者在载体信号上提供, 或者以任 何其他形式提供。
例如, 图 4示出了可以实现本发明的病毒防御方法的通信设备。 该通信设 备传统上包括处理器 410和以存储器 420形式的计算机程序产品或者计算机可 读介质。存储器 420可以是诸如闪存、 EEPROM(电可擦除可编程只读存储器)、 EPROM、 硬盘或者 ROM之类的电子存储器。 存储器 420具有用于执行上述方 法中的任何方法步骤的程序代码 431的存储空间 430。例如, 用于程序代码的存
431。 这些 序代码可以从一^或者多个计算机程序1^品中读出 者写入到这 一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘, 紧致盘 ( CD ) 、 存储卡或者软盘之类的程序代码载体。 这样的计算机程序产品通常 为如参考图 5所述的便携式或者固定存储单元。该存储单元可以具有与图 4的通 信设备中的存储器 420类似布置的存储段或者存储空间等。 程序代码可以例如 以适当形式进行压缩。通常,存储单元包括用于执行根据本发明的方法步骤的 程序 431', 即可以由例如诸如 410之类的处理器读取的代码, 这些代码当由通 信设备运行时, 导致该通信设备执行上面所描述的方法中的各个步骤。
应该注意的是, 上述实施例对本发明进行说明而不是对本发明进行限制, 并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实 施例。在权利要求中, 不应将位于括号之间的任何参考符号构造成对权利要求 的限制。 单词 "包含" 不排除存在未列在权利要求中的元件或步骤。 位于元件 之前的单词 "一" 或 "一个" 不排除存在多个这样的元件。 本发明可以借助于 包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若 干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具 体体现。 单词第一、 第二以及第三等的使用不表示任何顺序。 可将这些单词解 释为名称。
Claims
1、 一种病毒防御方法, 其包括:
在 Android操作系统需要安装应用程序时, 将需要安装的应用程序标识信 息由框架层传输至应用层;
在应用层,根据所述应用程序标识信息启动病毒扫描应用程序, 以使病毒 扫描应用程序对所述应用程序进行病毒扫描处理;
获取所述病毒扫描处理的扫描结果,并根据所述扫描结果向框架层发出是 否执行所述应用程序的安装操作的通知;
在框架层,根据所述通知执行所述应用程序的安装操作或者拒绝执行所述 应用程序的安装操作。
2、 如权利要求 1所述的方法, 其中, 所述应用层中设置有应用安装监听接 口函数, 所述框架层中设置有安全服务的安装前包检测接口函数;
且所述在 Android操作系统需要安装应用程序时, 将需要安装的应用程序 标识信息由框架层传输至应用层包括:
在 Android操作系统的包管理服务中的应用安装接口函数被调用的情况 下,所述应用安装接口函数通过所述安装前包检测接口函数将需要安装的应用 程序标识信息传输至应用安装监听接口函数,所述安装前包检测接口函数保存 应用程序安装的现场数据, 且所述应用安装接口函数停止安装操作。
3、 如权利要求 2所述的方法, 其中, 所述安装前包检测接口函数设置于所 述应用安装接口函数的开始位置处,且所述应用安装接口函数通过所述安装前 包检测接口函数将需要安装的应用程序标识信息传输至应用安装监听接口函 数包括:
所述应用安装接口函数被调用时,所述应用安装接口函数调用所述安装前 包检测接口函数;
所述安装前包检测接口函数从应用安装监听器集合中获取所有回调函数 的名称, 且所述应用安装监听器集合中包含有应用安装监听接口函数的名称; 所述安装前包检测接口函数根据所述回调函数的名称向所有回调函数传 输需要安装的应用程序标识信息。
4、 如权利要求 3所述的方法, 其中, 所述方法还包括:
在框架层的应用安装监听器集合中设置应用安装监听接口函数的名称。
5、 如权利要求 1所述的方法, 其中, 所述应用程序标识信息包括: 应用程 序的 URI。
6、 如权利要求 1所述的方法, 其中, 所述根据所述扫描结果向框架层发出 是否执行所述应用程序的安装操作的通知包括:
根据所述扫描结果利用应用层中的应用安装恢复类函数或者中止应用安 装类函数调用框架层的服务提供的应用安装恢复接口函数或者中止应用安装 接口函数, 以向框架层发出是否执行所述应用程序的安装操作的通知。
7、 如权利要求 1至 6中任一权利要求所述的方法, 其中, 所述根据所述扫 描结果向框架层发出是否执行所述应用程序的安装操作的通知包括:
根据所述病毒扫描结果直接向框架层发出是否执行所述应用程序的安装 操作的通知; 或者
在病毒扫描结果为应用程序携带有病毒的情况下,将所述病毒扫描结果呈 现给用户,并根据用户输入的指示信息向框架层发出是否执行所述应用程序的 安装操作的通知。
8、 如权利要求 1至 6中任一权利要求所述的方法, 其中, 所述方法还包括: 在所述病毒扫描结果为所述应用程序携带有病毒的情况下,直接删除所述 应用程序; 或者
在所述病毒扫描结果为所述应用程序携带有病毒的情况下,向用户呈现是 否删除应用程序的信息, 并才艮据用户输入的指示信息删除 /不删除所述应用程 序。
9、 一种病毒防御装置, 其包括:
应用程序安装模块, 适于在 Android操作系统需要安装应用程序时, 将需 要安装的应用程序标识信息由框架层传输至应用层;
启动病毒扫描模块,适于在应用层,根据所述应用程序标识信息启动病毒 扫描应用程序, 以使病毒扫描应用程序对所述应用程序进行病毒扫描处理; 通知模块,适于获取所述病毒扫描处理的扫描结果, 并根据所述扫描结果 向框架层发出是否执行所述应用程序的安装操作的通知;
所述应用程序安装模块还适于,在框架层,根据所述通知执行所述应用程 序的安装操作或者拒绝执行所述应用程序的安装操作。
10、 如权利要求 9所述的装置, 其中, 所述应用层中设置有应用安装监听 接口函数,所述应用程序安装模块中设置有包管理服务中的应用安装接口函数 以及安全服务的安装前包检测接口函数;
且所述在 Android操作系统需要安装应用程序时, 将需要安装的应用程序 标识信息由框架层传输至应用层包括:
在 Android操作系统的包管理服务中的应用安装接口函数被调用的情况 下,所述应用安装接口函数通过所述安装前包检测接口函数将需要安装的应用 程序标识信息传输至应用安装监听接口函数,所述安装前包检测接口函数保存 应用程序安装的现场数据, 且所述应用安装接口函数停止安装操作。
11、 如权利要求 10所述的装置, 其中, 所述安装前包检测接口函数设置于 所述应用安装接口函数的开始位置处,且所述应用安装接口函数通过所述安装 前包检测接口函数将需要安装的应用程序标识信息传输至应用安装监听接口 函数包括:
所述应用安装接口函数被调用时,所述应用安装接口函数调用所述安装前 包检测接口函数;
所述安装前包检测接口函数从应用安装监听器集合中获取所有回调函数 的名称, 且所述应用安装监听器集合中包含有应用安装监听接口函数的名称; 所述安装前包检测接口函数根据所述回调函数的名称向所有回调函数传 输需要安装的应用程序标识信息。
12、 如权利要求 11所述的装置, 其中, 所述装置还包括:
监听器注册模块,适于在框架层的应用安装监听器集合中设置应用安装监 听接口函数的名称。
13、 如权利要求 9所述的装置, 其中, 所述应用程序标识信息包括: 应用 程序的 URI。
14、 如权利要求 9所述的装置, 其中, 所述根据所述扫描结果向框架层发 出是否执行所述应用程序的安装操作的通知包括:
通知模块根据所述扫描结果利用应用层中的应用安装恢复类函数或者中 止应用安装类函数调用框架层的服务提供的应用安装恢复接口函数或者中止 应用安装接口函数, 以向框架层发出是否执行所述应用程序的安装操作的通 知。
15、 如权利要求 9至 14中任一权利要求所述的装置, 其中, 所述根据所述 扫描结果向框架层发出是否执行所述应用程序的安装操作的通知包括:
通知模块根据所述病毒扫描结果直接向框架层发出是否执行所述应用程 序的安装操作的通知; 或者
通知模块在病毒扫描结果为应用程序携带有病毒的情况下,将所述病毒扫 描结果呈现给用户,并根据用户输入的指示信息向框架层发出是否执行所述应 用程序的安装操作的通知。
16、 如权利要求 9至 14中任一权利要求所述的装置, 其中, 所述装置还包 括:
应用程序清除模块,适于在所述病毒扫描结果为所述应用程序携带有病毒 的情况下, 直接删除所述应用程序; 或者
适于在所述病毒扫描结果为所述应用程序携带有病毒的情况下,向用户呈 现是否删除应用程序的信息, 并根据用户输入的指示信息删除 /不删除所述应
用程序。
17、 一种计算机程序, 包括计算机可读代码, 当通信设备运行所述计算机 可读代码时, 导致权利要求 1-8中的任一项权利要求所述的方法被执行。
18、 一种计算机可读介质, 其中存储了如权利要求 17所述的计算机程序。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US15/036,921 US10216925B2 (en) | 2013-11-15 | 2014-08-26 | Virus protection method and device |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310575193.9 | 2013-11-15 | ||
| CN201310575193.9A CN103577757B (zh) | 2013-11-15 | 2013-11-15 | 病毒防御方法和装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2015070653A1 true WO2015070653A1 (zh) | 2015-05-21 |
Family
ID=50049519
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2014/085187 Ceased WO2015070653A1 (zh) | 2013-11-15 | 2014-08-26 | 病毒防御方法和装置 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US10216925B2 (zh) |
| CN (1) | CN103577757B (zh) |
| WO (1) | WO2015070653A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2022143126A1 (zh) * | 2020-12-29 | 2022-07-07 | 花瓣云科技有限公司 | 应用的安全性分析方法、装置、设备及存储介质 |
Families Citing this family (20)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103577750B (zh) * | 2013-11-15 | 2016-08-17 | 北京奇虎科技有限公司 | 隐私权限管理方法和装置 |
| CN103577757B (zh) * | 2013-11-15 | 2017-05-24 | 北京奇虎科技有限公司 | 病毒防御方法和装置 |
| CN104050417B (zh) * | 2014-07-04 | 2018-03-27 | 北京奇虎科技有限公司 | 一种在移动终端对软件状态进行检测的方法及装置 |
| CN104200159B (zh) * | 2014-09-05 | 2017-07-28 | 北京奇虎科技有限公司 | 配置应用程序的权限的方法及装置 |
| US9690934B1 (en) * | 2015-08-27 | 2017-06-27 | Symantec Corporation | Systems and methods for protecting computing devices from imposter accessibility services |
| CN106934277A (zh) * | 2015-12-30 | 2017-07-07 | 北京金山安全软件有限公司 | 一种应用程序检测方法、装置和终端 |
| CN105975320B (zh) * | 2016-05-26 | 2020-03-17 | 宇龙计算机通信科技(深圳)有限公司 | 一种第三方应用禁止安装的方法、装置以及终端 |
| CN106355079B (zh) * | 2016-08-18 | 2019-12-06 | 北京奇虎科技有限公司 | 对应用程序的安装进行优化的方法、装置及终端 |
| CN106648739A (zh) * | 2016-10-13 | 2017-05-10 | 青岛海信移动通信技术股份有限公司 | 应用安装的控制方法和装置 |
| CN106529295B (zh) * | 2016-11-14 | 2019-07-16 | Oppo广东移动通信有限公司 | 提高移动终端安全性能的方法和系统及移动终端、存储介质 |
| US11750623B2 (en) * | 2017-09-04 | 2023-09-05 | ITsMine Ltd. | System and method for conducting a detailed computerized surveillance in a computerized environment |
| CN107992743A (zh) * | 2017-12-04 | 2018-05-04 | 山东渔翁信息技术股份有限公司 | 一种基于沙箱的身份认证的方法、装置、设备及存储介质 |
| CN108256326A (zh) * | 2017-12-14 | 2018-07-06 | 捷开通讯(深圳)有限公司 | 一种阻止恶意代码编译的方法、存储介质及电子装置 |
| US11552962B2 (en) | 2018-08-31 | 2023-01-10 | Sophos Limited | Computer assisted identification of intermediate level threats |
| US11409884B2 (en) * | 2018-10-31 | 2022-08-09 | Dell Products L.P. | Security profiling of system firmware and applications from an OOB appliance at a differentiated trust boundary |
| CN111222128B (zh) * | 2019-12-31 | 2024-11-01 | 北京握奇数据股份有限公司 | 一种安全输入和校验USBKey PIN码的方法及模块 |
| CN111562951B (zh) * | 2020-05-11 | 2022-05-03 | 电子科技大学 | 一种雷达应用组件服务化实现方法 |
| CN115657870A (zh) | 2021-07-07 | 2023-01-31 | 荣耀终端有限公司 | 一种触摸屏采样率的调整方法及电子设备 |
| US12526289B2 (en) | 2022-05-17 | 2026-01-13 | Sophos Limited | Methods and apparatus for machine learning to generate a decision tree database to identify commands similar to a command of interest |
| CN119227083A (zh) * | 2024-09-23 | 2024-12-31 | 扬州数安技术有限公司 | 一种软件供应链安全检测综合管理平台 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20070073361A (ko) * | 2006-01-05 | 2007-07-10 | 주식회사 코드젠 | 듀얼엔진에서의 악성트래픽 스캐닝 |
| US20100107160A1 (en) * | 2008-10-29 | 2010-04-29 | Novell, Inc. | Protecting computing assets with virtualization |
| CN102663285A (zh) * | 2012-03-21 | 2012-09-12 | 奇智软件(北京)有限公司 | 一种apk病毒特征码的提取方法及装置 |
| CN103577757A (zh) * | 2013-11-15 | 2014-02-12 | 北京奇虎科技有限公司 | 病毒防御方法和装置 |
Family Cites Families (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8533844B2 (en) * | 2008-10-21 | 2013-09-10 | Lookout, Inc. | System and method for security data collection and analysis |
| US8984628B2 (en) * | 2008-10-21 | 2015-03-17 | Lookout, Inc. | System and method for adverse mobile application identification |
| CN102682228A (zh) * | 2011-03-09 | 2012-09-19 | 北京网秦天下科技有限公司 | 利用sim卡查杀移动设备的病毒的方法和系统 |
| CN102254113A (zh) * | 2011-06-27 | 2011-11-23 | 深圳市安之天信息技术有限公司 | 一种检测和拦截移动终端恶意代码的方法及系统 |
| US20130067577A1 (en) * | 2011-09-14 | 2013-03-14 | F-Secure Corporation | Malware scanning |
| US9183380B2 (en) * | 2011-10-11 | 2015-11-10 | Citrix Systems, Inc. | Secure execution of enterprise applications on mobile devices |
| US9152784B2 (en) * | 2012-04-18 | 2015-10-06 | Mcafee, Inc. | Detection and prevention of installation of malicious mobile applications |
| CN102810143B (zh) * | 2012-04-28 | 2015-01-14 | 天津大学 | 基于Android平台手机应用程序的安全检测系统及方法 |
| US20130333039A1 (en) * | 2012-06-07 | 2013-12-12 | Mcafee, Inc. | Evaluating Whether to Block or Allow Installation of a Software Application |
| CN102799826B (zh) * | 2012-07-19 | 2015-07-29 | 腾讯科技(深圳)有限公司 | 应用程序安装包解压过程的检测方法与装置、客户端设备 |
| KR101907529B1 (ko) * | 2012-09-25 | 2018-12-07 | 삼성전자 주식회사 | 사용자 디바이스에서 어플리케이션 관리 방법 및 장치 |
| US8869274B2 (en) * | 2012-09-28 | 2014-10-21 | International Business Machines Corporation | Identifying whether an application is malicious |
| CN103092661A (zh) * | 2013-01-31 | 2013-05-08 | 晨风云(北京)科技有限公司 | 一种智能移动终端的软件安装方法及系统 |
-
2013
- 2013-11-15 CN CN201310575193.9A patent/CN103577757B/zh active Active
-
2014
- 2014-08-26 WO PCT/CN2014/085187 patent/WO2015070653A1/zh not_active Ceased
- 2014-08-26 US US15/036,921 patent/US10216925B2/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20070073361A (ko) * | 2006-01-05 | 2007-07-10 | 주식회사 코드젠 | 듀얼엔진에서의 악성트래픽 스캐닝 |
| US20100107160A1 (en) * | 2008-10-29 | 2010-04-29 | Novell, Inc. | Protecting computing assets with virtualization |
| CN102663285A (zh) * | 2012-03-21 | 2012-09-12 | 奇智软件(北京)有限公司 | 一种apk病毒特征码的提取方法及装置 |
| CN103577757A (zh) * | 2013-11-15 | 2014-02-12 | 北京奇虎科技有限公司 | 病毒防御方法和装置 |
Non-Patent Citations (1)
| Title |
|---|
| WANF, FEIFEI: "Study on Detection and Protection Techniques of Mobile Phone Malicious Code under the Android Platform", CHINA MASTER'S THESES FULL-TEXT DATABASE (ELECTRONIC JOURNALS, 15 October 2012 (2012-10-15), pages 5 * |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2022143126A1 (zh) * | 2020-12-29 | 2022-07-07 | 花瓣云科技有限公司 | 应用的安全性分析方法、装置、设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN103577757B (zh) | 2017-05-24 |
| CN103577757A (zh) | 2014-02-12 |
| US10216925B2 (en) | 2019-02-26 |
| US20160267267A1 (en) | 2016-09-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN103577757B (zh) | 病毒防御方法和装置 | |
| US11210390B1 (en) | Multi-version application support and registration within a single operating system environment | |
| US10848521B1 (en) | Malicious content analysis using simulated user interaction without user involvement | |
| CN103632096B (zh) | 一种对设备进行安全检测的方法和装置 | |
| CN103577237B (zh) | 应用程序启动的控制方法及装置 | |
| CN102902919B (zh) | 一种可疑操作的识别处理方法、装置和系统 | |
| CN103390130B (zh) | 基于云安全的恶意程序查杀的方法、装置和服务器 | |
| KR101626398B1 (ko) | 가상 분할 모니터링을 위한 시스템 및 방법 | |
| WO2015070655A1 (zh) | 智能设备的广播拦截方法和装置 | |
| CN104462978B (zh) | 一种应用程序权限管理的方法和装置 | |
| CN103826215B (zh) | 一种在终端设备上进行Root权限管理的方法和装置 | |
| CN104199711B (zh) | 建立root权限的方法和装置 | |
| CN102882875B (zh) | 主动防御方法及装置 | |
| CN104036019B (zh) | 网页链接的开启方法及装置 | |
| CN105159771A (zh) | 处理应用间链式启动的方法及装置 | |
| CN102208002B (zh) | 一种新型计算机病毒查杀装置 | |
| WO2014071867A1 (zh) | 程序处理方法和系统,用于程序处理的客户端和服务器 | |
| CN105975320B (zh) | 一种第三方应用禁止安装的方法、装置以及终端 | |
| WO2016078323A1 (zh) | 检测恶意软件的方法及装置 | |
| WO2014206183A1 (zh) | 宏病毒查杀方法及系统 | |
| CN105095758B (zh) | 锁屏应用程序处理方法、装置以及移动终端 | |
| CN108959917A (zh) | 一种电子邮件检测的方法、装置、设备及可读存储介质 | |
| CN103473350B (zh) | 文件处理方法及设备 | |
| CN102857519B (zh) | 主动防御系统 | |
| CN105844161B (zh) | 安全防御方法、装置与系统 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 14861364 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 15036921 Country of ref document: US |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 14861364 Country of ref document: EP Kind code of ref document: A1 |