The safety of the C language compiler
- Author
- GaoPan
- Advisor
- ChenJingChun
- School
- University of Electronic Science and Technology
- Major
- Computer Software and Theory
- Classification
- TP314 Compiler,interpreter
- Degree
- Master's thesis
- Year
- 2005
- Downloads
- 573
- Citations
- 3
Abstract
With the computer more and more widely , and the Internet continues to expand , the information security is increasingly important. System with a large Internet facing a growing number of security challenges , the biggest challenge stems from buffer overflow attacks , the main form of such attacks is to stack overflow attacks . Buffer overflow attack because C / C program is the lack of appropriate security mechanisms and procedures vulnerabilities . Stack overflow buffer overflow relatively more , and stack overflow exploit is relatively easy to implement , in particular, need to focus . Stack overflow boundary conditions to check the use of the program is not rigorous, modify a local variables on the stack , while completing the task injection attack code and change the program running processes . Buffer overflow attacks may be a remote access system administrator privileges , in many attack is particularly dangerous . With numerous methods are used to the defense stack overflow attack , roughly from program compiled angle , the operating system kernel , cpu architecture aspects . Whether the stack is detected by the Canary placed in the stack overflow greater impact as Stackguard , process through the the save stack return address assurance procedures ; stackshield correct ; libsafe library to replace the standard by providing secure unsafe library ; soloaris non-executable stack and linux ; These ways and means to develop ideas for a follow-up study . Our program tries to proceed from the compiler point of view , the use of open source software GCC as a pilot starting point . So brief introduction to the contents of the GCC front end . GCC front - end purpose of to AST parse tree is generated based on the source code , according to the AST tree generated RTL intermediate representation . RTL intermediate representation to the GCC backend further processing . Finally, as the ultimate purpose of this paper , we propose a stack of two separate data and control program run - time environment . And further analyzing the problem of the safety of such a structure , compatibility . Finally, a brief description of how to modify such separation stack GCC runtime environment .
Table of contents
The first chapter 9-13
1.1 Overview 9-12
1.1.1 buffer overflow and stack overflow attacks 9-10
1.1 .2 current information security major challenge - buffer overflow attacks 10-12
1.2 main job 12
1.3 the paper is organized 12-13 <br / > stack overflow attacks Overview Chapter 13-23
2.1 buffer / stack overflow attacks Introduction 13-14
2.2 stack overflow attacks inherent reason 14 -15
2.2.1 C / C lack of security mechanisms 14
2.2.2 common cause a buffer overflow error in C and C 14-15
2.2. 3 programming error is difficult to avoid 15
2.3 stack overflow attack works 15-22
2.3.1 user process stack segment 15-16
2.3.2 The program is running stack effect 16-18
2.3.3 program is running stack changes 18-21
2.3.4 Buffer Overflow mechanism 21-22
2.3.5 ShellCode 22
2.4 Summary 22-23
Chapter stack overflow attacks against the current means of defense 23-32
3.1 STACKGUARD and the VS.NET / GS option 23-26
3.1.1 principle 23-25 ??
3.1.2 VS.net the / GS option 25
3.1.3 Stackguard evaluation 25-26
3.2 STACKSHIELD 26-28
3.3 LIBSAFE 28 -29
3.4 other methods 29-31
3.4.1 ProPolice 30
3.4.2 unenforceable buffer / stack 30-31 < br /> 3.4.3 page executable bit NX 31
3.5 Summary 31-32
Chapter GCC compiler construction 32-44 <br / > 4.1 GCC Introduction 32-35
4.1.1 GCC process 32-33
4.1.2 GCC framework 33-35
4.2 GCC 's AST representation 35-38
4.3 RTL (REGISTER TRANSFER LANGUAGE) 38-43
4.3.1 RTL role 38-39
4.3 .2 RTL defined 39-42
4.3.3 AST generated from RTL 42-43
4.4 Summary 43-44
Chapter separation parameters and function control dual-stack architecture 44-56
5.1 the previous stack model 44-45
5.2 separate control and data information stack model 45-54
5.2.1 dual-stack model runtime environment - complete separation of data and control information 46-49
5.2.2 operation after taking into account the compatibility of environmental models - only partial separation variable 49-54
5.3 Summary 54-56
Chapter VI test -CRACK GCC 56-65
6.1 debug 56 -57
6.2 CRACKGCC faced three main problems 57-61
6.2.1 pseudo-register 1vp, 1vb setting 57-59
6.2.2 data stack initialization 59-60
6.2.3 in the data allocate local variables on the stack 60-61
6.2.4 to enter and exit code 61 < br /> 6.3 final target code analysis and comparison 61-65
Chapter Summary and Outlook 65-66
References 66-68 <br / > Thanks 68-69
biographical 69
Related dissertations
- Research on the Buffer Overflow Technology Based on GCC
- Research on Automatic Detection of Buffer Overflow for C Language
- Research and Development of the Cross Compiler Based on GCC for Embedded System
- GCC compiler system architecture analysis and back-end transplant practice
- Research and Implementation of Cross-compiler System
- Automatically explore model -based static analysis of stack buffer overflow vulnerability
- Windows platform Buffer Overflow Vulnerability Detection Technology
- Research and Development of Compiler in Embedded System Based on GCC
- Research and Implementation of the Autovectorization for YHFT-Matrix Complier
- Static Security Detection of C Applications
- WEB-based Programming Style Training and Research
- Co-simulation Based Fault Injection Technologies Analysis and Design
- Key Technology Research of Fault Detection Mechanism Based on Compiler Generated Micro-thread
- Research on Fault-Tolerance Techniques against Single Event Effects for SRAM-based FPGAs
- Study on Design of Massive Open Online Course
- The Gulf Regional Cooperation after the Cold War: a Regionalism Perspective
- Development of Eddy Current Testing System for Detecting Cemented Carbide Bars' Defects
- Research and Development of Stored Energy Spot Welding Control Systembased on the STM32
- A New Algorithm of Sound Source Localization Based on Special Acoustic Detection
- Technical Structure Analysis for Chinese Manufactured Goods Export to GCC