A stack overflow protection method and device

A protection device and stack overflow technology, applied in the field of stack overflow protection methods and devices, can solve the problems of large consumption of Canaries, fixed character filling is easy to be detected by attackers, errors, etc., to achieve the effect of enhanced protection

Inactive Publication Date: 2011-12-28
RAISECOM TECH
View PDF2 Cites 19 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Although this method can detect overflow, it uses fixed characters to fill the position of Canaries that can be easily detected by attackers, and skips the buffer and directly modifies the subsequent data. In this case, the overflow protection is invalid.
[0012] The second method is to generate a random number and store it in a memory page that is not mapped into the virtual address space. A segment fault will occur when trying to access the memory that stores the random number through a pointer, but this random number It will eventually be saved in the function stack as Canaries, so the attacker still has a chance to obtain the value of the random number
However, this method involves a lot of calculations, and the calculation of Canaries consumes too much

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
  • A stack overflow protection method and device
  • A stack overflow protection method and device
  • A stack overflow protection method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0050] The principles and features of the present invention are described below in conjunction with the accompanying drawings, and the examples given are only used to explain the present invention, and are not intended to limit the scope of the present invention.

[0051] As an embodiment of a stack overflow protection method of the present invention, it includes the step of generating a random character string; the step of applying for a stack; the step of filling a string in a buffer; the step of checking the stack and the step of releasing the stack, specifically as Figure 4 shown.

[0052] Generate Random String: Generates a string of random length and content as part of filling the buffer. The upper limit of the string length can be determined according to the combination of device performance and actual application, and the value of each character is randomly generated from 0-255;

[0053] Applying for the stack: The application of the heap is operated by malloc. By en...

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 provides a stack overflow protection method, by inserting a buffer into the stack, and filling the buffer with filling characters in the format of "fixed character string + random character string" or "random character string+fixed character string" String, and check the filling value in the buffer when the stack is released, which solves the problem of poor defense against stack overflow vulnerabilities, thereby reducing the risk of attackers using stack overflow vulnerabilities to damage the system. The invention also includes a stack overflow protection device.

Description

technical field [0001] The invention relates to the field of computers, in particular to a stack overflow protection method and device. Background technique [0002] The construction and development of computer technology and the Internet have brought huge impetus and impact to the economy, culture, technology and other aspects of the entire society. A large number of information systems such as telecommunications, e-commerce, and financial networks have become the key foundation of the country and the government. facilities, so how to ensure the security of computer systems has become an urgent problem in front of us. [0003] The stack overflow vulnerability is an extremely serious system security vulnerability. It destroys the system memory space by writing too long data into a limited memory space, causing the system to run abnormally, crash or restart. Through the stack overflow attack, the address of the attack code is used to overwrite the function pointer, allowing ...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F21/02G06F21/52
Inventor 宋卿
Owner RAISECOM TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products