Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for detecting code security hole based on constraint analysis and model checking

A model detection and vulnerability detection technology, applied in the static detection field of source code vulnerability detection, can solve problems such as inability to directly detect program vulnerabilities, high false positive rate, inability to detect more complex buffer operation security, etc.

Inactive Publication Date: 2009-11-04
BEIHANG UNIV
View PDF0 Cites 36 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Different from the static detection method, the dynamic detection technology has no limit to the size of the program and can detect large programs. However, the obvious disadvantage is that the dynamic detection technology is dependent on the input, and only when a specific input makes the program execute to a dangerous point Vulnerabilities are not discovered until , resulting in a high rate of false positives
[0004] Simple model detection methods generally cannot directly detect program vulnerabilities. For example, Blast used Securd to detect references to null pointers in programs, but it cannot detect the security of more complex buffer operations.
It is even more difficult to detect vulnerabilities related to system security with a simple model detection method, so it is generally necessary to use other program analysis methods to cooperate with model detection to detect such buffer overflow vulnerabilities

Method used

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
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for detecting code security hole based on constraint analysis and model checking
  • Method for detecting code security hole based on constraint analysis and model checking
  • Method for detecting code security hole based on constraint analysis and model checking

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0019] The present invention first traces the change of variable information in the program through static analysis, adds attribute information to the buffer and records the scope of the buffer, and inserts corresponding attribute generation, attribute Transfer and attribute verification statement information, build a buffer attribute constraint model, and then use Blast to verify whether the dangerous points in the attribute model are reachable, and transform the problem of security vulnerability detection into the problem of determining the accessibility of a certain location in the program. This ensures accurate detection of source code vulnerabilities. Structure diagram such as figure 1 .

[0020] 1. Constraint analysis

[0021] First abstract the buffer as an integer value pair containing the maximum length of the buffer and the used length, and call it the attribute of the corresponding buffer, and abstract various operations on the buffer (including pointer assignment...

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 method for detecting a code security hole based on constraint analysis and model checking, which can extract the source code of a C program in a constraint way and detect the security hole of the program with the model checking. The main content comprises the following steps: buffer attribute information which is involved in the source code of the C program is extracted with a constraint analysis technology; the corresponding ASSERT sentence information of attribute generation, attribute transmission and attribute constraint is inserted into variable declaration, variable assignment and function call site with the buffer attribute information; the inserted code can be taken as the input of the model checking to judge whether the program is accessible, find whether the dangerous points in the program really has an accessible path and finally find the security hole in the source code. Currently, independent model checking can not detect the security hole of the buffer and the like, the method combines the static detecting technology of the constraint analysis with the model detecting technology to realize the detection of the security hole of the buffer overflow and the like, wherein, the detecting precision of the method is higher than that of the general static detecting technology. By extracting the other dangerous function information of the source code, corresponding inserting process is carried out. The invention also can detect the security holes such as formative character string, code injection, privilege escalation, etc.

Description

Technical field: [0001] The invention relates to a static detection method for source code loophole detection. Background technique: [0002] With the development of information technology, computer software has penetrated into various fields of the national economy and is closely related to people's production and life. The security of software is becoming more and more important. Once some key software is damaged, it will cause industrial and even national paralysis. Malicious users can target specific software bugs and run malicious code to gain access to illegal data. Buffer overflow vulnerability is the most important kind of this kind of security hole at present. Malicious users can analyze the input data format of the program and determine that these data are stored in the buffer of the program, so that the user may overwrite the sensitive data in the stack space through special input data, especially return the saved The address is replaced with the address of the...

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
no application Login to View More
IPC IPC(8): G06F11/36
Inventor 王雷陈归赵朋超张强
Owner BEIHANG UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products