WO2015101044A1 - 特征提取的方法及装置 - Google Patents

特征提取的方法及装置 Download PDF

Info

Publication number
WO2015101044A1
WO2015101044A1 PCT/CN2014/083910 CN2014083910W WO2015101044A1 WO 2015101044 A1 WO2015101044 A1 WO 2015101044A1 CN 2014083910 W CN2014083910 W CN 2014083910W WO 2015101044 A1 WO2015101044 A1 WO 2015101044A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
function
sample
feature
virtual machine
Prior art date
Application number
PCT/CN2014/083910
Other languages
English (en)
French (fr)
Inventor
杨康
陈卓
唐海
Original Assignee
北京奇虎科技有限公司
奇智软件(北京)有限公司
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 北京奇虎科技有限公司, 奇智软件(北京)有限公司 filed Critical 北京奇虎科技有限公司
Priority to US15/109,343 priority Critical patent/US20170214704A1/en
Publication of WO2015101044A1 publication Critical patent/WO2015101044A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1425Traffic logging, e.g. anomaly detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/562Static detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/562Static detection
    • G06F21/563Static detection by source code analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/566Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S40/00Systems for electrical power generation, transmission, distribution or end-user application management characterised by the use of communication or information technologies, or communication or information technology specific aspects supporting them
    • Y04S40/20Information technology specific aspects, e.g. CAD, simulation, modelling, system security

Definitions

  • the present invention relates to the field of network security technologies, and in particular, to a method and device for feature extraction. Background technique
  • a feature extraction method comprising: obtaining a batch of black sample files and white sample files from an application layer of a smart terminal operating system; parsing each file to obtain each file The information structure of all the functions included, calculate the check code of each function; determine whether each file contains a function corresponding to each check code, thereby counting the number of times each function appears in the black sample file and the white sample file; Black sample features are extracted from functions that appear only in black sample files but not in white sample files, or white sample features are extracted based on functions that appear only in white sample files but not in black sample files.
  • a feature extraction apparatus including: a file acquisition unit, For obtaining a batch of black sample files and white sample files from the application layer of the smart terminal operating system; a parsing unit for parsing each file, obtaining an information structure of all functions included in each file; a check code calculation unit , a check unit for calculating each function; a statistical unit, configured to determine whether each file contains a function corresponding to each check code, thereby counting the number of occurrences of each function in the black sample file and the white sample file; a unit for extracting a black sample feature from a function that appears only in a black sample file but not in a white sample file, or a function that does not appear in a black sample file based on a white sample file only, White sample features are extracted.
  • the embodiment of the present invention analyzes and calculates the obtained black sample file and white sample file, and counts the number of occurrences of the check code of each function in the file, and finally appears only in the black sample file but not in white.
  • the functions that appear in the sample file serve as the basis for feature extraction.
  • an efficient feature library can be constructed to ensure the implementation of the protection technology.
  • the features may be preferred such that after acquiring a large number of extractable black sample features, the most features are used to detect the most files.
  • FIG. 1 is a flow chart showing a method of feature extraction according to an embodiment of the present invention
  • FIG. 2 is a flow chart showing a feature in a method of feature extraction according to an embodiment of the present invention. Schematic diagram of a device for feature extraction according to an embodiment of the present invention
  • Figure 4 shows a block diagram of an intelligent electronic device for performing the method according to the invention
  • Figure 5 shows a schematic diagram of a storage unit for holding or carrying program code implementing the method according to the invention.
  • the app layer can be understood as the upper layer, which is responsible for interacting with the user, such as application maintenance, and identifying different kinds of click content when the page is clicked to display different context menus.
  • the framework layer acts as the middle layer.
  • the main responsibility of this layer is to transfer the user requests obtained by the app layer, such as launching the application, clicking the link, clicking to save the image, etc., and forwarding it to the lower layer; Or distribute it to the upper layer through a message or through an intermediate proxy class to present it to the user.
  • the inventors of the present invention found in the course of the research that by counting the number of occurrences of the check code of the function contained in the sample file in the file, it can be determined that the function is a black sample or a white sample.
  • the method of feature extraction includes the following steps.
  • S101 Obtain a batch of black sample files and white sample files from an application layer of the smart terminal operating system
  • the black sample file refers to a file that contains a black sample in advance, for example, a file containing a malicious code
  • a white sample file refers to a file that does not contain a black sample after preliminary judgment, such as a file that does not contain malicious code.
  • the black sample file or the white sample file may be, for example, a dex file.
  • the dex file is a virtual system that can be loaded and run directly in the Da lvik virtual machine ( Da lvik VM ) in the Android system.
  • Dalvik is a Java virtual machine for the Android platform. Dalvik is optimized to allow multiple instances of virtual machines to run simultaneously in limited memory, and each Dalvik application executes as a separate Linux process. A separate process prevents all programs from being closed when the virtual machine crashes.
  • the Dalvik virtual machine can support the running of Java applications that have been converted to dex (Dalvik Executable) format.
  • the dex format is a compression format designed for Dalvik, suitable for systems with limited memory and processor speed.
  • the dex file is the result of optimization for the embedded system.
  • the Dalvik virtual machine's script is not a standard Java virtual machine script, but instead uses its own set of instructions.
  • the dex file shares a lot of class names and constant strings, making it smaller in size and more efficient.
  • the method for obtaining a batch of black sample dex files and white sample dex files from the smart terminal may be: from the application layer of the smart terminal operating system, finding an installation package of the application; parsing the installation package, and obtaining the application dex File;
  • the dex executable file is used as a black sample file or a white sample file.
  • it can be obtained by parsing the APK (Android Package, Android installation package).
  • the APK file is actually a zip file, but the suffix name is modified to apk. After decompressing with UnZip, you can get the Dex file.
  • the Android operating system includes an application layer (app layer) and a system framework layer (framework layer), and the present invention focuses on the research and improvement of the app layer.
  • apps layer application layer
  • framework layer framework layer
  • the present invention focuses on the research and improvement of the app layer.
  • Dalvik VM monitors all programs (APK files) and frames and creates a dependency tree for them.
  • DalvikVM optimizes the code for each program through this dependency tree and stores it in the Dalvik cache (dalvik-cache). This way, all programs will use optimized code at runtime.
  • a program or framework library
  • the Dalvik VM will re-optimize the code and store it again in the cache.
  • the cache/da lvik-cache is the dex file generated by the program stored on the system
  • the data/dalvik-cache J ⁇ J is the dex file generated by the data/ap. That is, the present invention focuses on the analysis and processing of the dex file generated by the data/app, but it should be understood that the theory and operation of the present invention are equally applicable to the dex file generated by the program on the system.
  • S102 Parse each file, obtain an information structure of all functions included in each file, and calculate a check code of each function; Still taking the dex file as an example, parsing the file to get all the function information structures contained in the file includes: Decompiling the dex file, and obtaining the decompiled information structure of all the functions included in the dex file.
  • the first way is to parse the dex file according to the dex file format to obtain the function information structure of each class; according to the field in the function information structure, determine the position and size of the function of the dex file, and obtain the decompiled function.
  • Information structure wherein, by parsing the function information structure, a bytecode array field indicating the function position of the dex file and a column length field indicating the function size of the dex file are obtained, thereby determining the position and size of the function of the dex file.
  • the dex file is parsed, and the function information body of each class is found.
  • the function information structure contains the fields as shown in Table 1.
  • the code calling method needs to provide space for the function's output function tr i es_s i z ushort
  • the data shall follow the format specified by debug_info_item i nsns_s i z uint
  • Bytecode array bytecode array format in the file "Bytecode for the Dalvik VM” nsns siz
  • Tr i es_s i ze is non-zero and exists only when it is odd. tr i es try_item
  • This array is used to identify where the delegate might throw an exception and how to handle it.
  • Array elements must [tr i es_s
  • Handl encod exists when it is not 0. These bytes represent a list of exception types and the address list of their processing methods. ers ed— catch- Each try_item has a byte-width offset, only when the series-size is not When it is 0,
  • the insns_size and insns fields in each function information structure represent the size and position of the function. Then, you can decompile the information structure of the function according to the two fields insns_size and insns.
  • the decompiled information structure is composed of Dalvik VM bytecodes, which will be described in detail later.
  • the second way is to decompile the dex file into a virtual machine bytecode using the dex file decompiler.
  • the Dalvik virtual machine runs Dalvik bytecode, which exists as a dex (Dalvik Executable) executable.
  • the Dalvik virtual machine executes the code by interpreting the dex file.
  • dex file decompilation tools include: baksmali, Dedexer 1.26, dexdump, dexinspecto 03_12_12r, IDA Pro, androguard ⁇ dex2 jar . 010 Editor. It can be seen that all the function information structures of the decompilation can be obtained by decompiling the dex file.
  • the function information structure includes function execution code.
  • the virtual machine instruction sequence and the virtual machine mnemonic sequence are formed, as in the following example, the Dalvik VM instruction sequence and the Dalvik VM mnemonic.
  • the sequence constitutes a function information structure.
  • a function information structure obtained by decompiling a dex file according to an embodiment of the present invention is:
  • the dex file is decompiled into the instruction sequence of the Da 1 vik VM and the mnemonic sequence of the Da 1 vik VM.
  • the first two digits of each line in the machine code field are the instruction sequence (the left part of the upper part of the example), and the part corresponding to the instruction sequence is the mnemonic (on On the right side of the example, the part is circled, not all selected).
  • the mnemonic is mainly for user communication and code writing.
  • the check code of the function can be calculated, and the subsequent use of the check code can represent its corresponding unique function.
  • the checksum of the function can be calculated using existing or future algorithms.
  • the hash value of the function is calculated using the hash algorithm as the aforementioned check code.
  • the hash algorithm includes multiple types, such as CRC (Cyclic Redundancy Check), MD5 (Message Digest Algorithm) or SHA (Secure Hash Algorithm).
  • SI 03 Determine whether each file contains a function corresponding to each check code, thereby counting each function The number of occurrences in the black sample file and the white sample file;
  • This step is to count the number of occurrences of hash values for a batch of black sample files and white sample files obtained in step S101.
  • the hash value of each function is determined by analyzing and calculating the black sample file and the white sample file; then the number of times each hash value appears in the black sample file and the white sample file is counted.
  • the method before counting the number of occurrences of each function in the black sample file and the white sample file, the method further comprises: de-duplicating the check code of the function in the file.
  • performing the in-file deduplication of the check code of the function means: for each file, if there are multiple functions having the same check code, A function is extracted from the function as a function of the check code. For example, suppose a dex file, by parsing it, obtains the information structure of all the functions it contains, assuming that three information structures sl, s 2 and s 3 are parsed, and further three data structures are obtained through the hash algorithm. 3 hash values for sl, s 2, and s 3: hashl, ha sh2, and hash3.
  • S104 Extract a black sample feature according to a function that appears only in the black sample file but does not appear in the white sample file, or extract a function according to a function that appears only in the white sample file but does not appear in the black sample file.
  • White sample features Extract a black sample feature according to a function that appears only in the black sample file but does not appear in the white sample file, or extract a function according to a function that appears only in the white sample file but does not appear in the black sample file.
  • the following steps may be further performed: adding the black sample feature to the black sample feature library; matching the target file by using the black sample feature library, if the target file includes the black sample feature corresponding to A subset of a function or function that determines the presence of malicious code.
  • the target file may be subjected to sample feature killing, virtual machine based killing, heuristic killing or similar sample clustering using a function corresponding to the black sample feature in the black sample feature library.
  • Malicious code refers to a program or code that spreads through a storage medium or network, destroys the integrity of the operating system without unauthorized authentication, and steals undisclosed secret information in the system.
  • a mobile phone malicious code is a malicious code that points to a handheld device such as a mobile phone or a PDA.
  • Mobile phone malicious code can be simply divided into duplicate malicious code and non-replicated malicious code.
  • the copy type malicious code mainly includes virus (Virus), worm (Worm), non-replicating malicious code master. To include Trojan Horse, Rogue Sof tware, Ma l ic ious Mobi le Code, and Rootki t programs.
  • Mobile phone malicious code protection technology protects against malicious code.
  • the feature value scanning method requires pre-learning to establish a malicious code feature library, and the feature value stored in the malicious code feature library may be a continuous fixed string or a discontinuity in which several other uncertain characters are inserted in the middle.
  • the string determines the signature string; when scanning, it is based on malicious code.
  • malicious code protection based on virtual machine technology. This type of protection is primarily targeted at polymorphic and morphing viruses.
  • a so-called virtual machine is a complete computer system that runs in a completely isolated environment by software emulation with full hardware system functionality.
  • This program also known as software simulation, is a software analyzer that uses software methods to simulate and analyze program runs.
  • the first feature is the feature value scanning technology.
  • the virtual machine module is started to allow the encrypted code to decode itself. After decoding, the traditional code can be used.
  • the feature value scanning method is used for killing.
  • Another example is the heuristic scanning method. Heuristic scanning solutions focus on the constant variation of malicious code and in order to enhance the study of unknown malicious code.
  • Heuristic comes from artificial intelligence, which refers to "the ability to self-discover” or “the knowledge and skills to use certain methods or methods to determine things.”
  • Heuristic scanning of malicious code means that the scanning software can use the rules extracted from experience to discover the virus by analyzing the structure of the program and its behavior. Because malicious code is intended to achieve infection and destruction, the usual behavior has certain characteristics, such as non-conventional read and write files, termination itself, unconventional cut-in zero ring, and so on. Therefore, it is possible to judge whether a program is malicious code according to a specific behavior of scanning or a combination of multiple behaviors.
  • similar sample clustering can be performed on the target program. For example, the K-means clustering algorithm is used to cluster the similar samples determined by the analysis.
  • the core consists of two parts.
  • the first is to organize a reasonable malicious code feature library, and the second is an efficient scanning algorithm (also called matching algorithm).
  • the matching algorithm is generally divided into a single pattern matching algorithm and a multi-pattern matching algorithm.
  • Single pattern matching algorithms include BF (Brute-Force) algorithm, KMP (Knuth-Morth i s- Pra tt) algorithm, BM (Boerer-Moore) algorithm and QS (Quick Search) algorithm.
  • the multi-pattern matching algorithm includes a classical multi-pattern matching DFSA algorithm and an ordered binary tree-based multi-pattern matching algorithm.
  • the matching algorithm can also be divided into fuzzy matching algorithm, similar Matching algorithm.
  • the present invention does not limit what malicious code protection scheme is used to detect malicious code.
  • the sample feature detection characteristic value scanning
  • virtual machine based killing or heuristic can be used. Kill, you can also perform similar sample clustering.
  • the matching algorithm there is no limitation on the matching algorithm.
  • the fuzzy matching algorithm or the similar matching algorithm described above may be used.
  • the file set of the checkout function A contains the file set of the check function B.
  • the function A it is preferable to use the function A as a feature and discard the function B feature. This is because, after acquiring a large number of extractable black sample features, it is necessary to consider how to detect the most files with the least number of features, and the embodiment of the present invention achieves this by the feature optimization method.
  • the feature optimization method includes: for different file sets of different features, if one file set contains all files in another file set, the feature corresponding to the file set with a larger range is retained, and the file with a smaller range is discarded. Set the corresponding features.
  • the file containing the first feature constitutes a first file set
  • the file containing the second feature constitutes a second file set
  • FIG. 2 shows a flow chart of features preferred in a method of feature extraction in accordance with one embodiment of the present invention. This feature preferably includes the following steps:
  • S202 Initialize a set
  • S203 compare the set with the vector of each feature in turn
  • S204 determining whether the set includes the compared vector; if the set includes the compared vector, executing S205, if the set does not include the compared vector, executing S206;
  • S206 taking a union of the set and the compared vector
  • S207 determining whether the vector of all features is compared, if yes, executing S208, otherwise returning to performing S203 and comparing with the next feature vector
  • N features ie, functions
  • An M-dimensional vector is generated for each extractable feature, and the vector of the i-th dimension represents whether the black sample file indexed by i can be detected using the feature.
  • the vector generated by feature A is 1: 1, 2: 0, 3: 1, 4: 1, 5: 0, 6: 0, which means that the feature can detect three files with indexes 1, 3, and 4.
  • an embodiment of the present invention further provides a device for feature extraction.
  • the device can be implemented by software, hardware or a combination of software and hardware.
  • the device may refer to a terminal device, or may be a functional entity inside the device.
  • the device may refer to a functional module inside the mobile phone.
  • the device operates under the Android operating system.
  • the feature extraction device includes:
  • a file obtaining unit 301 configured to obtain a batch of black sample files and white sample files from an application layer of the smart terminal operating system
  • the parsing unit 302 is configured to parse each file to obtain an information structure of all functions included in each file;
  • a check code calculation unit 303 configured to calculate a check code of each function
  • the extracting unit 305 is configured to extract the black sample feature according to a function that appears only in the black sample file but does not appear in the white sample file, or White sample features are extracted based on functions that appear only in the white sample file and do not appear in the black sample file.
  • the apparatus further includes a feature preference unit 306 for different file sets for different features. If one file set contains all files in another file set, the feature corresponding to the file set having a larger range is retained, and discarded. A feature with a smaller range of file sets. For example, in the When the first file set includes all the files in the second file set, the feature preference unit 306 retains the first feature corresponding to the first file set and discards the second feature corresponding to the second file set.
  • the apparatus further includes a feature preference unit 306 for establishing a vector for all files for each feature; initializing a set, which in turn is compared to a vector of each feature; if the set includes features being compared, maintaining the set, if If the set does not include the compared feature, then the union of the set and the compared vector is taken; the vectors of all the features are compared in turn, and the features included in the finally obtained set are taken as the last retained feature.
  • a feature preference unit 306 for establishing a vector for all files for each feature; initializing a set, which in turn is compared to a vector of each feature; if the set includes features being compared, maintaining the set, if If the set does not include the compared feature, then the union of the set and the compared vector is taken; the vectors of all the features are compared in turn, and the features included in the finally obtained set are taken as the last retained feature.
  • the apparatus further comprises: an internal deduplication unit 307 for performing a file deduplication of the check code of the function.
  • the internal deduplication unit 307 is specifically configured to, for each file, extract a function from the plurality of functions as a function of the check code if there are multiple functions having the same check code.
  • the black sample file and the white sample file are virtual machine execution files; the parsing unit
  • the 302 is specifically configured to perform decompilation on the virtual machine execution file to obtain a decompiled information structure of all functions included in the virtual machine execution file.
  • the check code calculation unit 303 is specifically configured to calculate a hash value of the information structure of the function by using a hash algorithm, and use a hash value as a check code of the function.
  • the parsing unit 302 is further configured to: parse the virtual machine execution file according to the virtual machine execution file format, to obtain a function information structure of each class; and determine the virtual according to the field in the function information structure. The location and size of each function of the machine execution file, get the function information structure of each function decompiled.
  • the parsing unit 302 is further configured to: parse the function information structure, obtain a bytecode array field indicating a function location of a virtual machine execution file, and a list length field indicating a function size of the virtual machine execution file; The section code array field and the list length field determine the location and size of the function of the virtual machine execution file.
  • the parsing unit 302 is specifically configured to perform a file decompilation tool by using a virtual machine to decompile the virtual machine execution file into a virtual machine byte code.
  • the extracting unit 303 is specifically configured to: use the function that appears only in the black sample file but does not appear in the white sample file as the black sample feature, or the black sample file only a partial code of a function appearing but not appearing in the white sample file as the black sample feature; or, the function that appears only in the white sample file but not in the black sample file is used as the white sample feature, Alternatively, the partial code of the function that appears only in the white sample file but does not appear in the black sample file is used as the white sample feature.
  • the apparatus further includes: a feature library adding unit 308, configured to add the black sample feature to the black sample feature library, and a matching unit 309, configured to use the black sample feature library to match the target file, if
  • the object file contains a subset of functions or functions corresponding to the black sample features to determine the presence of malicious code.
  • the matching unit may specifically perform sample feature killing on the target file, virtual machine killing, heuristic killing, and/or similar sample clustering by using a function corresponding to the black sample feature in the black sample feature library.
  • the black sample file refers to a file that contains a black sample after preliminary judgment
  • the white sample file refers to a file that does not include a black sample after preliminary preliminary judgment.
  • the file obtaining unit 301 is specifically configured to: find an installation package of the application from an application layer of the operating system of the smart terminal; parse the installation package, and obtain a virtual machine execution file of the application; The virtual machine executes the file as a black sample file or a white sample file.
  • the algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device.
  • Various general purpose systems can also be used with the teaching based on the teachings herein. From the above description, the structure required to construct such a system is obvious. Moreover, the invention is not directed to any particular programming language.
  • 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.
  • 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 present 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 illustrates an intelligent electronic device that can implement a method of implementing push notification of an extended application in accordance with the present invention.
  • the intelligent electronic device conventionally includes a processor 410 and a computer program product or computer readable medium in the form of a memory 420.
  • the memory 420 can be such as a flash An electronic memory such as an 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.
  • storage space 430 for program code may include various program code 431 for implementing various steps in the above methods, respectively.
  • the program code can be read from or written to one or more computer program products.
  • 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 intelligent electronic device of FIG.
  • the program code may, for example, be in program 431, ie, code readable by a processor, such as 410, which when executed by the intelligent electronic device causes the intelligent electronic device to perform each of the methods described above step.
  • any reference signs placed between parentheses shall not be construed as a limitation.
  • the word “comprising” does not exclude the presence of the elements or steps that are not in the claims.
  • the word “a” or “an” preceding a component does not exclude the presence of a plurality of such elements.
  • the invention can be implemented by means of hardware comprising several distinct elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by the same hardware item.
  • the use of the words first, second, and third does not indicate any order. These words can be interpreted as names.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Virology (AREA)
  • Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)
  • Stored Programmes (AREA)

Abstract

本发明公开了一种特征提取方法及装置。其中方法包括:从智能终端操作系统的应用程序层,获取一批黑样本文件和白样本文件;解析每个文件,得到每个文件包含的所有函数的信息结构,计算每个函数的校验码;判断各文件是否包含各个校验码对应的函数,从而统计每个函数在黑样本文件和白样本文件中出现的次数;根据仅在黑样本文件中出现而未在白样本文件中出现的函数,提取出黑样本特征,或者同理提取出白样本特征。可见,本发明通过对获取的黑样本文件和白样本文件进行分析、计算,统计每个函数的校验码在文件中出现的次数,最后将仅在黑样本文件中出现而未在白样本文件中出现的函数作为黑样本特征提取的基础。

Description

特征提取的方法及装置 技术领域
本发明涉及网络安全技术领域, 具体涉及一种特征提取的方法及装置。 背景技术
随着科技发展, 智能终端具有越来越多的功能。 例如, 人们的手机从传统 的 GSM、 TDMA数字手机转向了拥有能够处理多媒体资源、 提供网页浏览、 电话 会议、 电子商务等多种信息服务的智能手机。 然而, 品种日益繁多的手机恶意 代码攻击以及形势日益严峻的个人数据安全问题也随之而来,越来越多的手机 病毒让智能手机用户饱受其苦。 手机恶意代码防护技术针对恶意代码进行防护。手机恶意代码防护方式包 括多种。 例如, 特征值扫描方式、 基于虚拟机技术的恶意代码防护、 启发式扫 描方式及相似样本聚类等。 不论哪种防护方式, 除了高效的扫描算法(也称为 匹配算法)外, 组织合理的恶意代码特征库则是基础。 因此, 如何准确高效地 提取特征对于构建特征库乃至整个防护技术是至关重要的。 发明内容
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地 解决上述问题的特征提取的方法及装置。 依据本发明的一个方面, 提供一种特征提取方法, 其特征在于, 包括: 从 智能终端操作系统的应用程序层, 获取一批黑样本文件和白样本文件; 解析每 个文件, 得到每个文件包含的所有函数的信息结构, 计算每个函数的校验码; 判断各文件中是否包含各个校验码对应的函数,从而统计每个函数在黑样本文 件和白样本文件中出现的次数;根据仅在黑样本文件中出现而未在白样本文件 中出现的函数, 提取出黑样本特征, 或者, 根据仅在白样本文件中出现而未在 黑样本文件中出现的函数, 提取出白样本特征。 依据本发明的另一个方面,提供一种特征提取装置,包括:文件获取单元, 用于从智能终端操作系统的应用程序层, 获取一批黑样本文件和白样本文件; 解析单元, 用于解析每个文件, 得到每个文件包含的所有函数的信息结构; 校 验码计算单元, 用于计算每个函数的校验码; 统计单元, 用于判断各文件中是 否包含各个校验码对应的函数,从而统计每个函数在黑样本文件和白样本文件 中出现的次数; 提取单元, 用于根据仅在黑样本文件中出现而未在白样本文件 中出现的函数, 提取出黑样本特征, 或者, 根据仅在白样本文件中出现而未在 黑样本文件中出现的函数, 提取出白样本特征。 可见, 本发明实施例通过对获取的黑样本文件和白样本文件进行分析、计 算, 统计每个函数的校验码在文件中出现的次数, 最后将仅在黑样本文件中出 现而未在白样本文件中出现的函数作为特征提取的基础。 由此, 通过快速、 准 确地提取特征可保证构建高效的特征库, 保证防护技术的实施。 优选地, 可以 对特征进行优选,从而在获取大量可提取黑样本特征后, 利用最少的特征来检 出最多的文件。 上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术 手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、 特征和优点能够更明显易懂, 以下特举本发明的具体实施方式。 附图说明 通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领 域普通技术人员将变得清楚明了。 附图仅用于示出优选实施方式的目的, 而并 不认为是对本发明的限制。 而且在整个附图中, 用相同的参考符号表示相同的 部件。 在附图中: 图 1示出了根据本发明一个实施例的特征提取的方法流程图; 图 2示出了根据本发明一个实施例的特征提取的方法中特征优选流程图 图 3示出了根据本发明一个实施例的特征提取的装置示意图;
图 4示出了用于执行根据本发明的方法的智能电子设备的框图; 以及 图 5示出了用于保持或者携带实现根据本发明的方法的程序代码的存储单 元示意图。 具体实施方式
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了 本公开的示例性实施例, 然而应当理解, 可以以各种形式实现本公开而不应被 这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本 公开, 并且能够将本公开的范围完整的传达给本领域的技术人员。
以安卓 (Android )操作系统为例, 包括应用程序层 (app 层)和系统框 架层( framework层) , 至于从功能划分上有可能包括的的其他层本发明则不 作讨论。 其中, 通常 app层可以理解为上层, 负责与用户交互的界面, 例如应 用程序维护、以及点击页面时识别不同种类的点击内容从而显示不同的上下文 菜单等。 通常 framework层作为中间层, 这一层的主要职责是, 将 app层获得 的用户请求,如启动用用程序、点击链接、点击保存图片之类,转发往下层去; 将下层处理好的内容, 或者通过消息, 或者通过中间代理类, 来分发至上层, 对用户展现出来。 本发明的发明人在研究过程中发现,通过对样本文件所包含函数的校验码 在文件中出现次数的统计, 可以确定函数是黑样本或白样本。
参见图 1, 示出了根据本发明一个实施例的特征提取的方法的流程图。 该特征提取的方法包括以下步骤。
S101 : 从智能终端操作系统的应用程序层, 获取一批黑样本文件和白样本 文件;
其中, 黑样本文件是指经过预先初步判断包含黑样本的文件, 例如包含了 恶意代码的文件, 白样本文件是指经过预先初步判断不包含黑样本的文件, 例 如不包含恶意代码的文件。本领域技术人员了解,在进行恶意代码匹配和查杀 过程中, 需要建立特征库, 而特征库的建立是基于样本文件进行特征提取的。 在本发明实施例中,预先通过人工等方式初步确定一批文件是黑样本文件还是 白样本文件。 黑样本文件和白样本文件都是越多越好,有利于准确提取样本特 征。
本发明实施例中, 黑样本文件或白样本文件例如可以是 dex文件。 dex文 件是 Android系统中可以直接在 Da lvik虚拟机 ( Da lvik VM ) 中加载运行的虚 拟机执行文件。 Dalvik是用于 Android平台的 Java虚拟机。 Dalvik 经过优 化, 允许在有限的内存中同时运行多个虚拟机的实例, 并且每一个 Dalvik 应 用作为一个独立的 Linux 进程执行。 独立的进程可以防止在虚拟机崩溃的时 候所有程序都被关闭。 Dalvik 虚拟机可以支持已转换为 dex ( Dalvik Executable )格式的 Java应用程序的运行, dex格式是专为 Dalvik设计的一 种压缩格式, 适合内存和处理器速度有限的系统。 通过 ADT ( Android Development Tools ), 经过复杂的编译,可以把 java源代码转换为 dex文件。 dex文件是针对嵌入式系统优化的结果, Dalvik虚拟机的指令码并不是标准的 Java虚拟机指令码, 而是使用了自己独有的一套指令集。 dex文件中共用了很 多类名称、 常量字符串, 使它的体积比较小, 运行效率也比较高。
具体地,从智能终端获取一批黑样本 dex文件和白样本 dex文件的方式可 以为: 从智能终端操作系统的应用程序层, 查找到应用程序的安装包; 解析安 装包,得到应用程序的 dex文件; 将 dex执行文件作为黑样本文件或白样本文 件。 例如, 可以通过解析 APK (Android Package, Android安装包)获得。 APK文件其实是 zip格式的一个压缩包, 但后缀名被修改为 apk, 通过 UnZip 解压后, 就可以得到 Dex文件。
如前所述, Android操作系统包括应用程序层 ( app 层)和系统框架层 (framework层) , 本发明重点在于对 app层的研究和改进。 但是, 本领域技 术人员理解, 当 Android启动时, Dalvik VM监视所有的程序 ( APK文件)和 框架, 并且为它们创建一个依存关系树。 DalvikVM通过这个依存关系树来为 每个程序优化代码并存储在 Dalvik緩存 (dalvik-cache) 中。 这样, 所有程 序在运行时都会使用优化过的代码。 当一个程序 (或者框架库)发生变更, Dalvik VM 将会重新优化代码并且再次将其存在緩存中。 在 cache/da lvik- cache是存放 system上的程序生成的 dex文件, 而 data/dalvik-cache J^J是 存放 data/ap 生成的 dex文件。也就是, 本发明重点在于对 data/app生成的 dex文件进行的分析和处理,但是应该理解,对于 system上的程序生成的 dex 文件, 本发明的理论和操作同样适用。
S102: 解析每个文件, 得到每个文件包含的所有函数的信息结构, 计算每 个函数的校验码; 仍以 dex文件为例, 解析文件得到文件包含的所有的函数信息结构包括: 对 dex文件进行反编译,得到 dex文件所包含的所有函数经过反编译的信息结 构。
其中, 对 dex文件进行反编译(或称为: 反汇编)有多种方式。
第一种方式是, 根据 dex文件格式对 dex文件进行解析, 得到每个类的 函数信息结构体; 根据函数信息结构体中的字段,确定 dex文件的函数的位置 及大小, 得到反编译的函数信息结构。 其中, 通过解析函数信息结构体, 得到 指示 dex文件的函数位置的字节码数组字段以及指示 dex文件的函数大小的列 表长度字段, 从而确定 dex文件的函数的位置及大小。
例如, 根据 dex文件格式, 解析 dex文件, 查找到每个类得函数信息体。 比如函数信息结构体包含如表 1中的字段。
表 1
regi sters ushort
该段代码所用到的寄存器数目
_s i ze
i ns_s i ze ushort
该段代码中方法的输入参数的字数 (words) outs_s i ze ushort
该段代码调用方法需要为函数的输出函数提供的空间 tr i es_s i z ushort
该对象的 tryjtem的个数, 如果非 0, 它会作为一个 tr i es数组出现在 e
本对象 i nsns的后面 debug— i nf uint
从文件开始到 debug info的偏移量, 如果没有信息该值为 0, 如果非 0, o_off
代表数据段的一个位置, 数据须遵循 debug_info_item规定格式 i nsns_s i z uint
Instructions 列表的长度, 以两字节为单位
e
i nsns ushort[i
字节码数组, 字节码数组的格式在文件" Bytecode for the Dalvik VM" nsns siz
e]
中详述, 尽管它被定义为 ushort 型的数组, 但是有一些内部结构是 4字 节对齐方式, 如果这个文件恰好是经过字节交换操作的文件, 字节的交 换只在 ushort类型内部进行 padding ushort
用两个填充字节来满足 tries 4个字节的对齐方式, 该元素只有当 (optiona
1) = 0
tr i es_s i ze非 0并且为奇数时才存在 tr i es try_item
该数组用来标识代表中哪里可能抛出异常并且如何处理。 数组元素必须 [tr i es_s
i ze]
按照地址的升序排列,不能有重复地址出现。这个元素只有在 tries_size
(optiona
1)
不为 0时才存在 handl encod 这些字节代表一系列异常的类型以及他们的处理方法的地址列表, ers ed— catch- 每个 try_item都有一个字节宽度的偏移, 只有当 tries— size不为 0时,
handler— 1 该元素才存在。 ist
(opt ional
) 其中, 每个函数信息结构体中的 insns_size和 insns字段, 分别代表了 该函数大小及位置。 那么, 就可以根据 insns_size和 insns这两个字段, 反 编译出函数的信息结构。 反编译的信息结构是由 Dalvik VM字节码构成的, 后 续会详细介绍。 第二种方式是, 利用 dex文件反编译工具,将 dex文件反编译为虚拟机字 节码。
如前介绍的, Dalvik 虚拟机运行的是 Dalvik 字节码, 其以一个 dex ( Dalvik Executable )可执行文件形式存在, Dalvik 虚拟机通过解释 dex 文件来执行代码。 目前有一些工具, 可将 DEX文件反汇编成 Dalvik汇编代码。 这类 dex文件反编译工具包括: baksmali、Dedexer 1.26、dexdump、dexinspecto 03_12_12r、 IDA Pro、 androguard^ dex2 jar . 010 Editor等。 可见, 通过对 dex文件的反编译, 可以得到反编译的所有函数信息结构。 其中, 函数信息结构包含函数执行代码, 本发明实施例中, 是由虚拟机指令序 列和虚拟机助记符序列构成的, 如下面的例子, 由 Dalvik VM 的指令序列和 Dalvik VM的助记符序列构成函数信息结构。 例如,根据本发明一个实施例对 dex文件进行反编译得到的函数信息结构 ^口下:
Figure imgf000010_0001
可见, dex文件被反编译成 Da 1 v i k VM的指令序列和 Da 1 v i k VM的助记符 序列。 如上例子, 在反编译得到的函数信息结构中, 机器码字段中的每一行的 前 2个数字是指令序列(上例子左侧被圈部分), 而指令序列对应的部分为助 记符(上例子右侧, 部分被圈, 未全部选择)。 助记符主要是为了方便用户交 流和代码编写。
在得到每个函数的信息结构之后,就可以计算出该函数的校验码,后续利 用校验码可表示其对应的唯一函数。可以釆用现有或未来的算法计算出函数的 校验码。 例如, 釆用哈希(hash)算法计算出函数的 hash值作为前述校验码。 其中, hash算法包括多种, 例如 CRC (循环冗余码校验, Cyclical Redundancy Check) 、 MD5 (消息摘要算法第五版, Message Digest Algorithm )或 SHA (安 全哈希算法(Secure Hash Algorithm)等。
SI 03: 判断各文件中是否包含各个校验码对应的函数,从而统计每个函数 在黑样本文件和白样本文件中出现的次数;
本步骤是针对步骤 S101 获取的一批黑样本文件和白样本文件进行 hash 值出现次数的统计。
假设通过对黑样本文件和白样本文件的分析、 计算, 确定出每个函数的 hash值; 然后统计各个 hash值在黑样本文件及白样本文件中所出现的次数。
4叚设共有 n个样本文件 (包括一部分黑样本文件和一部分白样本文件) , 其中, 第 1个文件包含函数 hash值 、 B、 C; 第 2个文件包含函数 hash值 A、 C、 D; 第 3个文件包含函数 hash值^ C、 E; ……第 n个文件包含函数 hash 值(、 D。 总之, 在对所有文件进行分析之后, 假设共确定了 5个函数 hash值 A、 B、 C、 D、 E。 然后统计这 5个函数 hash值在黑样本中出现的次数, 在白样 本文件中出现的次数。 假设经过统计之后, 结果如表 2所示。 表 2
Figure imgf000011_0001
本领域技术人员理解,不同函数具有不同的 hash值,也就是不同的 hash 值代表了不同的函数, 因此后续也釆用 、 B、 C, D、 E表示 5个函数或 5个特 征。 通过上述对 hash值出现在文件中的次数, 就可以确定每个函数在文件中 出现的次数。
优选地,在统计每个函数在黑样本文件和白样本文件中出现的次数之前, 还包括: 将函数的校验码进行文件内去重。 具体地, 将函数的校验码进行文件 内去重是指: 针对每一个文件, 如果有多个函数具有相同校验码, 则从所述多 个函数中提取出一个函数作为该校验码的函数。 例如, 假设一个 dex文件, 通 过对其解析, 获得了它所包含的所有函数的信息结构,假设解析出三个信息结 构 s l、 s 2和 s 3, 进一步通过 hash算法, 得到了三个信息结构 s l、 s 2和 s 3 的 3个 hash值: hashl、 ha sh2和 hash3。 本领域技术人员理解, 不同函数具 有不同的 hash值, 也就是不同的 hash值代表了不同的函数。 假设上述三个 hash值中有的相同,比如 hashl=hash2,那么认为它们代表相同的函数。此时, 从 s i和 s 2中任选一个即可, 而将另一个抛弃。
S104: 根据仅在黑样本文件中出现而未在白样本文件中出现的函数,提取 出黑样本特征, 或者,根据仅在白样本文件中出现而未在黑样本文件中出现的 函数, 提取出白样本特征。
在提取样本时,选择仅在黑样本文件中出现而未在白样本文件中出现的函 数进行黑样本特征, 比如仍以表 1继续说明, 选择函数^ E进行黑样本特征 提取, 具体地, 可以将函数 B、 E作为黑样本特征, 或者将函数 B、 E的部分代 码作为黑样本特征。 同理,选择仅在白样本文件中出现而未在黑样本文件中出 现的函数进行白样本特征, 比如仍以表 1继续说明,选择函数 C进行白样本特 征提取, 具体地, 可以将函数 C作为白样本特征, 或者将函数 C的部分代码作 为白样本特征。 在 S104提取出黑样本特征之后, 还可以继续执行以下步骤: 将黑样本特 征添加到黑样本特征库中; 利用黑样本特征库对目标文件进行匹配,如果目标 文件包含所述黑样本特征对应的函数或函数的子集,确定存在恶意代码。如本 领域技术人员理解的,可利用黑样本特征库中黑样本特征对应的函数对目标文 件进行样本特征查杀、 基于虚拟机查杀、 启发式查杀或相似样本聚类。
下面对恶意代码及恶意代码的防护方案(样本特征查杀、基于虚拟机查杀、 启发式查杀和相似样本聚类)进行介绍。
恶意代码(Ma l i c ious Code )是指通过存储介质或网络进行传播, 在未经 授权认证的情况下破坏操作系统完整性、窃取系统中未公开秘密信息的程序或 代码。 以手机为例,手机恶意代码是指针对手机、 PDA等手持设备的恶意代码。 手机恶意代码可以简单地划分为复制型恶意代码和非复制型恶意代码。其中复 制型恶意代码主要包括病毒(Vi rus ) 、 蠕虫 (Worm ) , 非复制型恶意代码主 要包括特洛伊木马后门程序(Trojan Horse )、 流氓软件 ( Rogue Sof tware ) 、 恶意移动代码 ( Ma l ic ious Mobi le Code ) 以及 Rootki t程序等。 手机恶意代码防护技术针对恶意代码进行防护。 手机恶意代码防护方式 包括多种。 例如, 特征值扫描方式, 它需要预先学习建立恶意代码特征库, 恶 意代码特征库中保存的特征值可以是一段连续的固定字符串,也可以是几段中 间插有其他不确定字符的不连续的字符串确定其中的特征串; 在扫描时,基于 感染了恶意代码。 再如, 基于虚拟机技术的恶意代码防护。 此类防护方案主要 针对多态和变形病毒。所谓的虚拟机是指通过软件模拟具有完整硬件系统功能 的、运行在一个完全隔离环境中的完整计算机系统。该方案也称为软件模拟法, 是一种软件分析器, 用软件方法来模拟和分析程序的运行。 它实质是在内存中 模拟出一个小的封闭程序执行环境, 所有待查杀文件都在其中被虚拟执行。釆 用虚拟机技术进行杀毒时, 首先使用的还是特征值扫描技术, 当发现目标具有 加密恶意代码的特征时,才会启动虚拟机模块让加密代码自行解码,解码之后, 就可以釆用传统的特征值扫描方式进行查杀。 再如, 启发式扫描方式。 启发式 扫描方案主要针对恶意代码的不断变种以及为了加强对未知恶意代码的研究。 所谓 "启发式" 源自人工智能, 是指 "自我发现的能力" 或 "运用某种方式或 方法去判定事物的知识和技能"。 恶意代码的启发式扫描是指扫描软件能够利 用从经验中提取的规则,通过分析程序的结构和它的行为来发现病毒。 因为恶 意代码要达到感染和破坏的目的,通常的行为都会有一定的特征, 例如非常规 读写文件、 终结自身、 非常规切入零环等。 因此可以根据扫描特定的行为或多 种行为的组合来判断一个程序是否为恶意代码。 此外,还可以对目标程序进行 相似样本聚类, 例如釆用 K均值聚类算法对分析确定的相似样本进行聚类。 不论哪种防护方式, 其核心都包含两部分, 第一是组织合理的恶意代码 特征库, 第二是高效的扫描算法(也称为匹配算法)。 匹配算法一般分为单模 式匹配算法和多模式匹配算法两种。 单模式匹配算法包括 BF (Brute-Force)算 法、 KMP ( Knuth- Morr i s- Pra t t )算法、 BM ( Boyer-Moore )算法和 QS ( Quick Search )算法等。 多模式匹配算法包括经典多模式匹配 DFSA 算法和基于有序 二叉树的多模式匹配算法。 另外, 还可将匹配算法分为模糊匹配算法、 相似匹 配算法。
需要说明的是,本发明不限定釆用何种恶意代码防护方案对恶意代码进行 检测, 例如, 可以釆用上面介绍的样本特征查杀(特征值扫描)、 基于虚拟机 查杀或者启发式查杀, 另外还可以进行相似样本聚类。 而且, 对于匹配算法也 不作限制, 例如, 可以釆用上面介绍的模糊匹配算法或者相似匹配算法等。
有这么一种情况, 检出函数 A的文件集包含了检出函数 B的文件集, 这 种情况优选使用函数 A作为特征, 而抛弃函数 B特征。 这是因为, 在获取大量 可提取黑样本特征后, 就需要考虑如何用最少的特征来检出最多的文件, 本发 明实施例通过特征优选法来达到此目的。 概括而言, 特征优选法包括: 针对不同特征的不同文件集, 如果一个文件 集包含另一个文件集中所有文件, 则将具有较大范围的文件集对应的特征保 留, 而抛弃具有较小范围的文件集对应的特征。 例如, 假设两个特征: 第一特 征和第二特征, 包含所述第一特征的文件构成第一文件集, 包含所述第二特征 的文件构成第二文件集,如果第一文件集包含第二文件集中所有的文件, 则保 留第一特征, 而抛弃第二特征。
图 2示出了根据本发明一个实施例的特征提取的方法中特征优选流程图。 该特征优选包括以下步骤:
S201 : 为每个特征针对所有文件建立向量;
S202: 初始化一个集合; S203 : 将集合依次与每一个特征的向量做比较;
S204: 判断集合是否包括被比较的向量; 如果集合包括被比较的向量, 则 执行 S205, 如果集合不包括被比较的向量, 则执行 S206;
S205: 保持集合;
S206: 取集合与被比较向量的并集; S207 : 判断是否比较完所有特征的向量, 如果是, 则执行 S208, 否则返 回执行 S203与下一个特征向量进行比较;
S208: 将最终获得的集合中所包含的特征作为最后保留下来的特征。 下面给出一个具体例子。
假设共有黑样本文件 M个, 可提取特征(即函数) N个。 为每个可提取特 征生成一个 M维的向量,第 i维的向量代表着索引为 i的黑样本文件是否可以 使用该特征检出。
例如, 特征 A生成的向量为 1: 1, 2: 0, 3: 1, 4: 1, 5: 0, 6: 0, 这 代表该特征可以检出索引为 1, 3, 4三个文件。
步骤:
初始化一个集合 SA, 依次和每个特征向量做比较;
如果 SA包含 Mi则继续和下一个特征向量集合比较;
否则取 SA和 Mi的并集然后继续和下一个特征向量集合做比较。
如特征 A、 B、 C、 D 生成的向量如下
A: 1: 0, 2: 0, 3: 1, 4: 1, 5: 0, 6: 0
B: 1: 1, 2: 1, 3: 1, 4: 0, 5: 0, 6: 1
C: 1: 1, 2: 1, 3: 1, 4: 1, 5: 0, 6: 0
D: 1: 1, 2: 0, 3: 1, 4: 1, 5: 1, 6: 0 第一步:
比较 A、 B的向量, 因为 A不包含 B, 所以取 A、 B并集后得倒检测向量为: AB: 1: 1, 2: 1, 3: 1, 4: 1, 5: 0, 6: 1; 第二步:
使用 AB和 C比较, 因为 C可以检测的文件, AB已经可以检测, 所以抛弃
C;
循环第二步:
使用 AB和 D比较, 因为 D可以检出文件 5, 而 AB不行, 所以取 AB和 D 的并集;
即 ABD: 1: 1, 2: 1, 3: 1, 4: 1, 5: 1, 6: 1 如果后面还有特征 E, 则用 ABD和特征 E做比较, 类似第二步。 针对上面4、 B、 C , D四个向量, 最后选的特征为 A、 B、 D。 由此, 就得到可以检出这 M个文件的最短特征集合。 可见, 本发明实施例通过对获取的黑样本文件和白样本文件进行分析、计 算, 统计每个函数的 ha s h值在文件中出现的次数, 最后将仅在黑样本文件中 出现而未在白样本文件中出现的函数作为特征提取的基础。 由此, 通过快速、 准确地提取特征可保证构建高效的特征库, 保证防护技术的实施。 优选地, 可 以对特征进行优选,从而在获取大量可提取黑样本特征后, 利用最少的特征来 检出最多的文件。 与上述方法相对应,本发明实施例还提供一种特征提取的装置。该装置可 以通过软件、硬件或软硬件结合实现。具体地,该装置可以是指一个终端设备, 也可以是指设备内部的功能实体。例如,该装置可以是指手机内部的功能模块。 优选地, 该装置运行在 And r 0 i d操作系统下。 该特征提取装置包括:
文件获取单元 301, 用于从智能终端操作系统的应用程序层, 获取一批黑 样本文件和白样本文件;
解析单元 302, 用于解析每个文件, 得到每个文件包含的所有函数的信息 结构;
校验码计算单元 303, 用于计算每个函数的校验码;
统计每个函数在黑样本文件和白样本文件中出现的次数; 提取单元 305, 用于根据仅在黑样本文件中出现而未在白样本文件中出现 的函数, 提取出黑样本特征, 或者, 根据仅在白样本文件中出现而未在黑样本 文件中出现的函数, 提取出白样本特征。
优选地, 该装置还包括特征优选单元 306, 用于针对不同特征的不同文件 集,如果一个文件集包含另一个文件集中所有文件, 则将具有较大范围的文件 集对应的特征保留, 而抛弃具有较小范围的文件集对应的特征。 比如, 在所述 第一文件集包含所述第二文件集中所有的文件时,则特征优选单元 306保留第 一文件集对应的第一特征, 而抛弃所述第二文件集对应的第二特征。
或者, 该装置还包括特征优选单元 306, 用于为每个特征针对所有文件建 立向量; 初始化一个集合, 依次与每一个特征的向量做比较; 如果集合包括被 比较的特征, 则保持集合, 如果集合不包括被比较的特征, 则取集合与被比较 向量的并集; 依次比较完所有特征的向量,将最终获得的集合中所包含的特征 作为最后保留的特征。
优选地, 该装置还包括: 内去重单元 307, 用于将函数的校验码进行文件 内去重。 例如, 所述内去重单元 307具体用于, 针对每一个文件, 如果有多个 函数具有相同校验码,则从所述多个函数中提取出一个函数作为该校验码的函 数。
其中, 所述黑样本文件和白样本文件均为虚拟机执行文件; 所述解析单元
302具体用于, 对所述虚拟机执行文件进行反编译, 得到虚拟机执行文件所包 含的所有函数经过反编译的信息结构。
其中, 所述校验码计算单元 303具体用于, 利用哈希算法, 计算所述函数 的信息结构体的哈希值, 将哈希值作为所述函数的校验码。
其中, 所述解析单元 302进一步用于,根据虚拟机执行文件格式对虚拟机 执行文件进行解析,得到每个类的函数信息结构体; 根据所述函数信息结构体 中的字段,确定所述虚拟机执行文件的每个函数的位置及大小,得到每个函数 经过反编译的函数信息结构。
所述解析单元 302进一步用于, 解析所述函数信息结构体,得到指示虚 拟机执行文件的函数位置的字节码数组字段以及指示虚拟机执行文件的函数 大小的列表长度字段; 根据所述字节码数组字段以及所述列表长度字段,确定 所述虚拟机执行文件的函数的位置及大小。
所述解析单元 302具体用于, 利用虚拟机执行文件反编译工具,将所述虚 拟机执行文件反编译为虚拟机字节码。
其中, 所述提取单元 303具体用于,将所述仅在黑样本文件中出现而未在 白样本文件中出现的函数作为所述黑样本特征,或者将所述仅在黑样本文件中 出现而未在白样本文件中出现的函数的部分代码作为所述黑样本特征; 或者, 将所述仅在白样本文件中出现而未在黑样本文件中出现的函数作为所述 白样本特征,或者将所述仅在白样本文件中出现而未在黑样本文件中出现的函 数的部分代码作为所述白样本特征。 优选地, 该装置还包括:特征库添加单元 308, 用于将所述黑样本特征添 加到黑样本特征库中, 以及, 匹配单元 309, 用于利用黑样本特征库对目标文 件进行匹配,如果目标文件包含所述黑样本特征对应的函数或函数的子集,确 定存在恶意代码。其中, 匹配单元具体地可利用黑样本特征库中黑样本特征对 应的函数对目标文件进行样本特征查杀、基于虚拟机查杀、 启发式查杀, 和 / 或, 相似样本聚类。 其中, 所述黑样本文件是指经过预先初步判断包含黑样本的文件, 所述白 样本文件是指经过预先初步判断不包含黑样本的文件。 其中, 所述文件获取单元 301具体用于,从智能终端操作系统的应用程序 层, 查找到应用程序的安装包; 解析所述安装包, 得到所述应用程序的虚拟机 执行文件; 将所述虚拟机执行文件作为黑样本文件或白样本文件。 关于装置的具体实现, 可参见方法实施例, 此处不赘述。 在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有 相关。 各种通用系统也可以与基于在此的示教一起使用。 根据上面的描述, 构 造这类系统所要求的结构是显而易见的。此外, 本发明也不针对任何特定编程 语言。 应当明白, 可以利用各种编程语言实现在此描述的本发明的内容, 并且 上面对特定语言所做的描述是为了披露本发明的最佳实施方式。 在此处所提供的说明书中, 说明了大量具体细节。 然而, 能够理解, 本发 明的实施例可以在没有这些具体细节的情况下实践。在一些实例中, 并未详细 示出公知的方法、 结构和技术, 以便不模糊对本说明书的理解。 类似地,应当理解, 为了精简本公开并帮助理解各个发明方面中的一个或 多个,在上面对本发明的示例性实施例的描述中, 本发明的各个特征有时被一 起分组到单个实施例、 图、 或者对其的描述中。 然而, 并不应将该公开的方法 解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确 记载的特征更多的特征。 更确切地说, 如下面的权利要求书所反映的那样, 发 明方面在于少于前面公开的单个实施例的所有特征。 因此, 遵循具体实施方式 的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为 本发明的单独实施例。 本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适 应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实 施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它 们分成多个子模块或子单元或子组件。 除了这样的特征和 /或过程或者单元中 的至少一些是相互排斥之外, 可以釆用任何组合对本说明书(包括伴随的权利 要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所 有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、 摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征 来代替。
此外, 本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它 实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意 味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求 书中, 所要求保护的实施例的任意之一都可以以任意的组合方式来使用。 本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器 上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解, 可以在实践中使用微处理器或者数字信号处理器 (DSP ) 来实现根据本发明实 施例的特征提取的装置中的一些或者全部部件的一些或者全部功能。本发明还 可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程 序(例如, 计算机程序和计算机程序产品)。 这样的实现本发明的程序可以存 储在计算机可读介质上, 或者可以具有一个或者多个信号的形式。 这样的信号 可以从因特网网站上下载得到, 或者在载体信号上提供, 或者以任何其他形式 提供。
例如, 图 4示出了可以实现根据本发明的实现扩展应用程序的推送通知 的方法的智能电子设备。 该智能电子设备传统上包括处理器 410和以存储器 420形式的计算机程序产品或者计算机可读介质。 存储器 420可以是诸如闪 存、 EEPROM (电可擦除可编程只读存储器) 、 EPROM、 硬盘或者 ROM之 类的电子存储器。存储器 420具有用于执行上述方法中的任何方法步骤的程 序代码 431的存储空间 430。 例如, 用于程序代码的存储空间 430可以包括分 别用于实现上面的方法中的各种步骤的各个程序代码 431。这些程序代码可 以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算 机程序产品中。 这些计算机程序产品包括诸如硬盘, 紧致盘 (CD ) 、 存储 卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图 5 所述的便携式或者固定存储单元。该存储单元可以具有与图 4的智能电子设 备中的存储器 420类似布置的存储段或者存储空间等。程序代码可以例如以 的程序 431,, 即可以由例如诸如 410之类的处理器读取的代码, 这些代码当 由智能电子设备运行时, 导致该智能电子设备执行上面所描述的方法中的 各个步骤。 应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并 且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施 例。在权利要求中, 不应将位于括号之间的任何参考符号构造成对权利要求的 限制。 单词 "包含" 不排除存在未列在权利要求中的元件或步骤。 位于元件之 前的单词 "一" 或 "一个" 不排除存在多个这样的元件。 本发明可以借助于包 括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干 装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体 体现。 单词第一、 第二、 以及第三等的使用不表示任何顺序。 可将这些单词解 释为名称。

Claims

权 利 要 求
1、 一种特征提取方法, 其特征在于, 包括:
从智能终端操作系统的应用程序层, 获取一批黑样本文件和白样本文件; 解析每个文件,得到每个文件包含的所有函数的信息结构,计算每个函数 的校验码;
判断各文件中是否包含各个校验码对应的函数,从而统计每个函数在黑样 本文件和白样本文件中出现的次数; 本特征, 或者, ::、根据仅在白样本文件中出现而未在黑样本文件中出现的函 :iJ 提取出白样本特征。
2、如权利要求 1所述的方法,其特征在于,在统计出黑样本或白样本之后, 还包括: 对特征进行优选, 具体为:
为每个特征针对所有文件建立向量; 初始化一个集合,依次与每一个特征 的向量做比较; 如果集合包括被比较的特征, 则保持集合, 如果集合不包括被 比较的特征, 则取集合与被比较向量的并集; 依次比较完所有特征的向量, 将 最终获得的集合中所包含的特征作为最后保留的特征。
3、如权利要求 1所述的方法,其特征在于,在统计出黑样本或白样本之后, 还包括: 对特征进行优选, 具体为:
针对不同特征的不同文件集,如果一个文件集包含另一个文件集中所有文 件, 则将具有较大范围的文件集对应的特征保留, 而抛弃具有较小范围的文件 集对应的特征。
4、 如权利要求 3所述的方法, 其特征在于, 所述特征包括第一特征和第二 特征, 包含所述第一特征的文件构成第一文件集, 包含所述第二特征的文件构 成第二文件集,如果所述第一文件集包含所述第二文件集中所有的文件, 则保 留所述第一特征, 而抛弃所述第二特征。
5、 如权利要求 1所述的方法, 其特征在于, 在所述统计每个函数在黑样本 文件和白样本文件中出现的次数之前,还包括: 将函数的校验码进行文件内去 重。
6、 如权利要求 5所述的方法, 其特征在于, 所述将函数的校验码进行文件 内去重包括:
针对每一个文件,如果有多个函数具有相同校验码, 则从所述多个函数中 提取出一个函数作为该校验码的函数。
7、 如权利要求 1所述的方法, 其特征在于, 所述黑样本文件和白样本文件 均为虚拟机执行文件; 所述解析每个文件, 得到每个文件包含的所有的函数信息结构包括: 对所述虚拟机执行文件进行反编译,得到虚拟机执行文件所包含的所有函 数经过反编译的信息结构。
8、 如权利要求 7所述的方法, 其特征在于, 所述计算每个函数的校验码包 括:
利用哈希算法,计算所述函数的信息结构体的哈希值,将哈希值作为所述 函数的校验码。
9、 如权利要求 7所述的方法, 其特征在于, 所述对所述虚拟机执行文件进 行反编译,得到虚拟机执行文件所包含的所有函数经过反编译的的信息结构包 括:
根据虚拟机执行文件格式对虚拟机执行文件进行解析,得到每个类的函数 信息结构体;
根据所述函数信息结构体中的字段,确定所述虚拟机执行文件的每个函数 的位置及大小, 得到每个函数经过反编译的函数信息结构。
10、 如权利要求 9所述的方法, 其特征在于, 所述根据函数信息结构体中 的字段, 确定所述虚拟机执行文件的函数的位置及大小包括:
解析所述函数信息结构体,得到指示虚拟机执行文件的函数位置的字节码 数组字段以及指示虚拟机执行文件的函数大小的列表长度字段;
根据所述字节码数组字段以及所述列表长度字段,确定所述虚拟机执行文 件的函数的位置及大小。
11、 如权利要求 7所述的方法, 其特征在于, 所述对所述虚拟机执行文件 进行反编译,得到虚拟机执行文件所包含的所有函数经过反编译的的信息结构 包括:
利用虚拟机执行文件反编译工具,将所述虚拟机执行文件反编译为虚拟机 字节码。
12、 如权利要求 1所述的方法, 其特征在于, 黑样本特征包括:将 :所述仅在黑样本文件中出现而未在白样本文件中出现的函 数作为所述黑样本特征,或者将所述仅在黑样本文件中出现而未在白样本文件 中出现的函数的部分代码作为所述黑样本特征;
所述根据仅在白样本文件中出现而未在黑样本文件中出现的函数,提取出 白样本特征包括:将所述仅在白样本文件中出现而未在黑样本文件中出现的函 数作为所述白样本特征,或者将所述仅在白样本文件中出现而未在黑样本文件 中出现的函数的部分代码作为所述白样本特征。
1 3、 如权利要求 1所述的方法, 其特征在于, 还包括:
将所述黑样本特征添加到黑样本特征库中,
利用黑样本特征库对目标文件进行匹配,如果目标文件包含所述黑样本特 征对应的函数或函数的子集, 确定存在恶意代码。
14、 如权利要求 1 3所述的方法, 其特征在于, 利用所述黑样本特征库中黑 样本特征对应的函数对目标文件进行样本特征查杀、基于虚拟机查杀、启发式 查杀, 和 /或, 相似样本聚类。
15、 如权利要求 1所述的方法, 其特征在于, 所述黑样本文件是指经过预 先初步判断包含黑样本的文件,所述白样本文件是指经过预先初步判断不包含 黑样本的文件。
16、 如权利要求 15所述的方法, 其特征在于, 所述获取一批黑样本文件和 白样本文件包括:
从智能终端操作系统的应用程序层, 查找到应用程序的安装包; 解析所述安装包, 得到所述应用程序的虚拟机执行文件;
将所述虚拟机执行文件作为黑样本文件或白样本文件。
17、 如权利要求 1-16任一项所述的方法, 其特征在于, 所述操作系统是指 安卓系统。
18、 一种特征提取装置, 其特征在于, 包括:
文件获取单元, 用于从智能终端操作系统的应用程序层,获取一批黑样本 文件和白样本文件;
解析单元,用于解析每个文件,得到每个文件包含的所有函数的信息结构; 校验码计算单元, 用于计算每个函数的校验码; 每个函数在黑样本文件和 样本文件中出现^次数一; ' >
提取单元,用于根据仅在黑样本文件中出现而未在白样本文件中出现的函 数, 提取出黑样本特征, 或者, 根据仅在白样本文件中出现而未在黑样本文件 中出现的函数, 提取出白样本特征。
19、 如权利要求 18所述的装置, 其特征在于, 还包括: 特征优选单元, 用 于为每个特征针对所有文件建立向量; 初始化一个集合,依次与每一个特征的 向量做比较; 如果集合包括被比较的特征, 则保持集合, 如果集合不包括被比 较的特征, 则取集合与被比较向量的并集; 依次比较完所有特征的向量, 将最 终获得的集合中所包含的特征作为最后保留的特征。
20、 如权利要求 18所述的装置, 其特征在于, 还包括特征优选单元, 用于 针对不同特征的不同文件集, 如果一个文件集包含另一个文件集中所有文件, 则将具有较大范围的文件集对应的特征保留,而抛弃具有较小范围的文件集对 应的特征。
21、 如权利要求 20所述的装置, 其特征在于, 所述特征优选单元, 在所述 第一文件集包含所述第二文件集中所有的文件时,则保留第一文件集对应的第 一特征, 而抛弃所述第二文件集对应的第二特征。
22、 如权利要求 18所述的装置, 其特征在于, 还包括: 内去重单元, 用于 将函数的校验码进行文件内去重。
23、 如权利要求 22所述的装置, 其特征在于, 所述内去重单元具体用于, 针对每一个文件,如果有多个函数具有相同校验码, 则从所述多个函数中提取 出一个函数作为该校验码的函数。
24、 如权利要求 18所述的装置, 其特征在于, 所述黑样本文件和白样本文 件均为虚拟机执行文件; 所述解析单元具体用于,对所述虚拟机执行文件进行 反编译, 得到虚拟机执行文件所包含的所有函数经过反编译的信息结构。
25、 如权利要求 24所述的装置, 其特征在于, 所述校验码计算单元具体用 于, 利用哈希算法, 计算所述函数的信息结构体的哈希值, 将哈希值作为所述 函数的校验码。
26、 如权利要求 24所述的装置, 其特征在于, 所述解析单元进一步用于, 根据虚拟机执行文件格式对虚拟机执行文件进行解析,得到每个类的函数信息 结构体; 根据所述函数信息结构体中的字段,确定所述虚拟机执行文件的每个 函数的位置及大小, 得到每个函数经过反编译的函数信息结构。
27、 如权利要求 26所述的装置, 其特征在于, 所述解析单元进一步用于, 解析所述函数信息结构体,得到指示虚拟机执行文件的函数位置的字节码数组 字段以及指示虚拟机执行文件的函数大小的列表长度字段;根据所述字节码数 组字段以及所述列表长度字段, 确定所述虚拟机执行文件的函数的位置及大 小。
28、 如权利要求 24所述的装置, 其特征在于, 所述解析单元具体用于, 利 用虚拟机执行文件反编译工具, 将所述虚拟机执行文件反编译为虚拟机字节 码。
29、 如权利要求 18所述的装置, 其特征在于, 所述提取单元具体用于, 将 所述仅在黑样本文件中出现而未在白样本文件中出现的函数作为所述黑样本 特征,或者将所述仅在黑样本文件中出现而未在白样本文件中出现的函数的部 分代码作为所述黑样本特征; 或者,
将所述仅在白样本文件中出现而未在黑样本文件中出现的函数作为所述 白样本特征,或者将所述仅在白样本文件中出现而未在黑样本文件中出现的函 数的部分代码作为所述白样本特征。
30、 如权利要求 1 8所述的装置, 其特征在于, 还包括:
特征库添加单元, 用于将所述黑样本特征添加到黑样本特征库中, 匹配单元,用于利用黑样本特征库对目标文件进行匹配,如果目标文件包 含所述黑样本特征对应的函数或函数的子集, 确定存在恶意代码。
31、 如权利要求 30所述的装置, 其特征在于, 所述匹配单元利用黑样本特 征库中黑样本特征对应的函数对目标文件进行样本特征查杀、 基于虚拟机查 杀、 启发式查杀, 和 /或, 相似样本聚类。
32、 如权利要求 18所述的装置, 其特征在于, 所述黑样本文件是指经过预 先初步判断包含黑样本的文件,所述白样本文件是指经过预先初步判断不包含 黑样本的文件。
33、如权利要求 32所述的装置,其特征在于,所述文件获取单元具体用于, 从智能终端操作系统的应用程序层, 查找到应用程序的安装包; 解析所述安装 包,得到所述应用程序的虚拟机执行文件; 将所述虚拟机执行文件作为黑样本 文件或白样本文件。
34、 如权利要求 1 8-33任一项所述的装置, 其特征在于, 所述操作系统是 指安卓系统。
35、 一种计算机程序, 包括计算机可读代码, 当智能电子设备运行所述计 算机可读代码运行时,导致权利要求 1-17中的任一项权利要求所述的方法被执 行。
36、 一种计算机可读介质, 其中存储了如权利要求 35所述的计算机程序。
PCT/CN2014/083910 2013-12-30 2014-08-07 特征提取的方法及装置 WO2015101044A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/109,343 US20170214704A1 (en) 2013-12-30 2014-08-07 Method and device for feature extraction

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310746033.6A CN103761476B (zh) 2013-12-30 2013-12-30 特征提取的方法及装置
CN201310746033.6 2013-12-30

Publications (1)

Publication Number Publication Date
WO2015101044A1 true WO2015101044A1 (zh) 2015-07-09

Family

ID=50528712

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/CN2014/083910 WO2015101044A1 (zh) 2013-12-30 2014-08-07 特征提取的方法及装置
PCT/CN2014/090035 WO2015101097A1 (zh) 2013-12-30 2014-10-31 特征提取的方法及装置

Family Applications After (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/090035 WO2015101097A1 (zh) 2013-12-30 2014-10-31 特征提取的方法及装置

Country Status (3)

Country Link
US (2) US20170214704A1 (zh)
CN (1) CN103761476B (zh)
WO (2) WO2015101044A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105897923A (zh) * 2016-05-31 2016-08-24 中国科学院信息工程研究所 一种app安装包网络流量识别方法
CN110955895A (zh) * 2019-11-29 2020-04-03 珠海豹趣科技有限公司 一种操作拦截方法、装置及计算机可读存储介质
CN113536310A (zh) * 2021-07-08 2021-10-22 浙江网商银行股份有限公司 一种代码文件的处理方法、检验方法、装置及电子设备

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902910B (zh) * 2013-12-30 2016-07-13 北京奇虎科技有限公司 检测智能终端中恶意代码的方法及装置
CN103761476B (zh) * 2013-12-30 2016-11-09 北京奇虎科技有限公司 特征提取的方法及装置
CN103761475B (zh) * 2013-12-30 2017-04-26 北京奇虎科技有限公司 检测智能终端中恶意代码的方法及装置
CN105574408B (zh) * 2014-10-11 2018-04-17 安一恒通(北京)科技有限公司 用于文件病毒检测的特征获取方法及文件病毒检测的方法
EP3242240B1 (en) * 2015-02-04 2018-11-21 Nippon Telegraph and Telephone Corporation Malicious communication pattern extraction device, malicious communication pattern extraction system, malicious communication pattern extraction method and malicious communication pattern extraction program
CN105743877A (zh) * 2015-11-02 2016-07-06 哈尔滨安天科技股份有限公司 一种网络安全威胁情报处理方法及系统
CN106909839B (zh) * 2015-12-22 2020-04-17 北京奇虎科技有限公司 一种提取样本代码特征的方法及装置
CN106682507B (zh) 2016-05-19 2019-05-14 腾讯科技(深圳)有限公司 病毒库的获取方法及装置、设备、服务器、系统
CN105975854B (zh) * 2016-06-20 2019-06-28 武汉绿色网络信息服务有限责任公司 一种恶意文件的检测方法和装置
CN106127044A (zh) * 2016-06-20 2016-11-16 武汉绿色网络信息服务有限责任公司 一种函数恶意程度的检测方法和装置
CN106548069B (zh) * 2016-07-18 2020-04-24 北京安天网络安全技术有限公司 一种基于排序算法的特征提取系统及方法
US10607010B2 (en) * 2016-09-30 2020-03-31 AVAST Software s.r.o. System and method using function length statistics to determine file similarity
CN111368296A (zh) * 2019-06-27 2020-07-03 北京关键科技股份有限公司 源码文件匹配率分析方法
CN112580026B (zh) * 2019-09-27 2024-02-20 奇安信科技集团股份有限公司 网络系统及终端病毒查杀方法和装置
US11068595B1 (en) * 2019-11-04 2021-07-20 Trend Micro Incorporated Generation of file digests for cybersecurity applications
CN112818348B (zh) * 2021-02-24 2023-09-08 北京安信天行科技有限公司 一种勒索病毒文件识别与检测方法及系统
US11537463B1 (en) 2021-07-16 2022-12-27 Seagate Technology Llc Data integrity verification optimized at unit level
CN116088888B (zh) * 2022-07-22 2023-10-31 荣耀终端有限公司 应用程序更新方法及相关装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101604364A (zh) * 2009-07-10 2009-12-16 珠海金山软件股份有限公司 基于文件指令序列的计算机恶意程序分类系统和分类方法
CN101788915A (zh) * 2010-02-05 2010-07-28 北京工业大学 基于可信进程树的白名单更新方法
CN102567661A (zh) * 2010-12-31 2012-07-11 北京奇虎科技有限公司 基于机器学习的程序识别方法及装置
US20130205396A1 (en) * 2008-01-04 2013-08-08 International Business Machines Corporation Detecting Malicious Software
CN103440459A (zh) * 2013-09-25 2013-12-11 西安交通大学 一种基于函数调用的Android恶意代码检测方法
CN103761476A (zh) * 2013-12-30 2014-04-30 北京奇虎科技有限公司 特征提取的方法及装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4736771B2 (ja) 2005-12-09 2011-07-27 ソニー株式会社 効果音生成装置及び効果音生成方法、並びにコンピュータ・プログラム
WO2007117574A2 (en) * 2006-04-06 2007-10-18 Smobile Systems Inc. Non-signature malware detection system and method for mobile platforms
US8984628B2 (en) * 2008-10-21 2015-03-17 Lookout, Inc. System and method for adverse mobile application identification
CN102054149B (zh) * 2009-11-06 2013-02-13 中国科学院研究生院 一种恶意代码行为特征提取方法
CN101923617B (zh) 2010-08-18 2013-03-20 北京奇虎科技有限公司 一种基于云的样本数据库动态维护方法
US20130067577A1 (en) * 2011-09-14 2013-03-14 F-Secure Corporation Malware scanning
CN102663077B (zh) * 2012-03-31 2014-03-12 福建师范大学 基于Hits算法的Web搜索结果安全性排序方法
CN103383720B (zh) 2012-05-03 2016-03-09 北京金山安全软件有限公司 一种api日志的循环逻辑的识别方法及装置
CN102708186A (zh) * 2012-05-11 2012-10-03 上海交通大学 一种钓鱼网站的识别方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130205396A1 (en) * 2008-01-04 2013-08-08 International Business Machines Corporation Detecting Malicious Software
CN101604364A (zh) * 2009-07-10 2009-12-16 珠海金山软件股份有限公司 基于文件指令序列的计算机恶意程序分类系统和分类方法
CN101788915A (zh) * 2010-02-05 2010-07-28 北京工业大学 基于可信进程树的白名单更新方法
CN102567661A (zh) * 2010-12-31 2012-07-11 北京奇虎科技有限公司 基于机器学习的程序识别方法及装置
CN103440459A (zh) * 2013-09-25 2013-12-11 西安交通大学 一种基于函数调用的Android恶意代码检测方法
CN103761476A (zh) * 2013-12-30 2014-04-30 北京奇虎科技有限公司 特征提取的方法及装置

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105897923A (zh) * 2016-05-31 2016-08-24 中国科学院信息工程研究所 一种app安装包网络流量识别方法
CN105897923B (zh) * 2016-05-31 2019-04-30 中国科学院信息工程研究所 一种app安装包网络流量识别方法
CN110955895A (zh) * 2019-11-29 2020-04-03 珠海豹趣科技有限公司 一种操作拦截方法、装置及计算机可读存储介质
CN110955895B (zh) * 2019-11-29 2022-03-29 珠海豹趣科技有限公司 一种操作拦截方法、装置及计算机可读存储介质
CN113536310A (zh) * 2021-07-08 2021-10-22 浙江网商银行股份有限公司 一种代码文件的处理方法、检验方法、装置及电子设备

Also Published As

Publication number Publication date
US10277617B2 (en) 2019-04-30
CN103761476A (zh) 2014-04-30
CN103761476B (zh) 2016-11-09
US20160335437A1 (en) 2016-11-17
US20170214704A1 (en) 2017-07-27
WO2015101097A1 (zh) 2015-07-09

Similar Documents

Publication Publication Date Title
WO2015101044A1 (zh) 特征提取的方法及装置
US10114946B2 (en) Method and device for detecting malicious code in an intelligent terminal
WO2015101042A1 (zh) 检测智能终端中恶意代码的方法及装置
Alrabaee et al. Fossil: a resilient and efficient system for identifying foss functions in malware binaries
Chen et al. Detecting android malware using clone detection
Cozzi et al. The tangled genealogy of IoT malware
WO2015101043A1 (zh) 检测智能终端中恶意代码的方法及装置
Chen et al. Achieving accuracy and scalability simultaneously in detecting application clones on android markets
US10963563B2 (en) Method and system for evaluating security of application
US8352484B1 (en) Systems and methods for hashing executable files
WO2014166312A1 (zh) 一种广告插件识别的方法和系统
US11048798B2 (en) Method for detecting libraries in program binaries
WO2013139215A1 (zh) 病毒apk的识别方法及装置
US11036479B2 (en) Devices, systems, and methods of program identification, isolation, and profile attachment
CN106709336A (zh) 识别恶意软件的方法和装置
KR102006242B1 (ko) 바이너리 파일에 기초하여 오픈소스 소프트웨어 패키지를 식별하는 방법 및 시스템
Adkins et al. Heuristic malware detection via basic block comparison
US9251261B2 (en) Method and system for metadata driven testing of malware signatures
US11916937B2 (en) System and method for information gain for malware detection
WO2018121464A1 (zh) 一种病毒检测方法及装置、存储介质
Li et al. Juxtapp and dstruct: Detection of similarity among android applications
CN114595451A (zh) 基于图卷积的安卓恶意应用分类方法
Schmicker et al. Androparse-an android feature extraction framework and dataset
CN106372508B (zh) 恶意文档的处理方法及装置
CN115904486A (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: 14876985

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 15109343

Country of ref document: US

122 Ep: pct application non-entry in european phase

Ref document number: 14876985

Country of ref document: EP

Kind code of ref document: A1