Code homology detection method and device based on code fingerprint

A detection method and homology technology, applied in code compilation, program code conversion, platform integrity maintenance, etc., can solve problems such as low detection efficiency and weak anti-confuse ability, so as to improve detection efficiency and prevent malicious The spread of the code, the effect of ensuring accuracy

A detection method and homology technology, applied in code compilation, program code conversion, platform integrity maintenance, etc., can solve problems such as low detection efficiency and weak anti-confuse ability, so as to improve detection efficiency and prevent malicious The spread of the code, the effect of ensuring accuracy

CN107169358BActive Publication Date: 2019-10-08THE PLA INFORMATION ENG UNIV +1

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Code homology detection method and device based on code fingerprint
  • Code homology detection method and device based on code fingerprint
  • Code homology detection method and device based on code fingerprint

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0059] In order to make the purpose, technical solution and advantages of the present invention more clear and understandable, the present invention will be further described in detail below in conjunction with the accompanying drawings and technical solutions.

[0060] At this stage, the method research on code homology detection is mostly based on a single type. Coarse-grained feature detection can improve detection efficiency but reduce detection accuracy, while fine-grained features can improve detection accuracy and bring a computationally intensive performance bottleneck. How to effectively deal with complex code obfuscation methods under the condition of efficient detection, accurately abstract code logic and summarize code features is an important content that needs to be studied at present.

[0061] In an embodiment, a method for detecting code homology based on code fingerprints is provided, see figure 1 shown, including the following steps:

[0062] Step 1. Perfor...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a code homology detection method based on code fingerprint and a device thereof. The method comprises: performing dependence analysis on input codes, obtaining an original program dependence graph PDG; performing structure simplification, removing nesting and performing shading on the original program dependence graph PDG, to obtain a simplified program dependence graph sPDG; based on an abstract syntax tree, analyzing code key grammar information; extracting a system call sequence of a code execution path, to obtain a full path parameter vector assembly of an object code, to build code fingerprint; calculating a homology coefficient of code fingerprint components; according to the homology coefficient, calculating a homology index of two codes S and T, and through the homology index, determining a homologous relation exists in the both codes. The method can give consideration to code semantics and behaviors on the basis of similarity, and improves detection efficiency by using a lightweight characteristic and simplified mechanism, and measures homologous relations among codes in a multi-angle manner, and improves detection efficiency while ensuring accuracy.

Description

technical field [0001] The invention belongs to the technical field of computer software applications, and in particular relates to a method for detecting code homology based on code fingerprints and a device thereof. Background technique [0002] With the growth of various Internet application requirements and the increase of code iteration speed, higher requirements are put forward for programmers' development efficiency and speed. In the software development pipeline, secondary development based on templates and reuse of existing components are common phenomena; at the same time, in order to solve new requirements, developers usually refer to codes in open source code warehouses on the Internet. This has resulted in the continuous growth of code with the same origin through different channels, and the wide spread of hidden defects and errors in the code. At the same time, with the continuous development of computer security technology and the continuous improvement of vi...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
08 Oct 2019
Publication
CN107169358B
IPC
G06F21/56; G06F8/41
Inventors
魏强; 刘臻