The Stack-based Buffer Overflow Vulnerability and Exploit Experimental Demonstration (in the controlled environment)
| ||
Compiler, Assembler & Linker Story
25 Most Dangerous Programming Errors
C Code Listing ~ 340 C code samples
C++ Code Listing ~ 500 C++ code Samples
| What do we have in this 'crap'?
This hands-on tutorial starts with an introduction of the study purposes, some literature review which contains the fundamental of the exploit environments. The environment discussion starts with the computer hardware (microprocessor) procedures on compiling and linking the C programs. Then, the discussion proceeds to the demonstration when the environment setup was completed. The study ends with a conclusion, recommendation and further research.
CHAPTER ONE: INTRODUCTION
1.0 Introduction1.1 Scope and Limitation1.2 Significance of the Study
CHAPTER TWO: LITERATURE REVIEW
2.1 The Current Trends2.2 Detection and Prevention Solutions2.3 The Current Implementation2.4 The Exploit Advancement2.5 Intel Processor Execution Environment2.5.1 Memory2.5.2 Registers2.5.3 Procedure Call2.5.3.1 Stack2.5.3.2 General Task of the Stack Set up2.5.3.3 Procedure Linking Information2.5.3.4 Calling Procedures Using CALL and RET2.6 Related Instructions and Stack Manipulation
CHAPTER THREE: METHODOLOGY
3.1 Introduction3.2 The Specifications3.3 Vulnerable Environment Preparation3.3.1 Disabling the SELinux3.3.2 Non-Executable Stack and Address Space Randomization3.4 Preparing the Vulnerable Code3.5 C Function Call Convention3.6 Stack Boundary Alignment3.7 Generating and Testing the Shellcode as a Payload3.8 Storing the Shellcode in the Environment Variable3.9 The Exploit: The Miserable setuid Program3.10 Optional Steps3.10.1 Disabling the 'Canary' [65]3.10.2 Flagging the Executable Bit3.10.3 The bash Shell Protection
CHAPTER FOUR: FINDING AND DISCUSSION
4.1 The Conditions for Buffer Overflow to Occur4.1.1 Using Unsafe C Function4.1.2 No Input Validation4.1.3 Return Address Adjacent to Code and Data4.1.4 Suitable Exploit Code Availability4.2 Current Implementation Review4.3 The Coding Stage Advantage4.4 Recommendations
CHAPTER FIVE: CONCLUSION AND FUTURE WORK
5.1 Research Contribution5.2 Related Future Work
BOF REFERENCEIMPORTANT ABBREVIATIONSGENERAL AND SIMPLIFIED VUL. & EXPLOIT FLOW CHART (pdf)
Summary
This tutorial revisits the stack-based buffer overflow problem which still dominate as one of the top threat to the computer security world. In this tutorial an experimental demonstration presented in a step-by-step manner which cover creating a simple buffer overflow C program, preparing the vulnerable environment and the exploit. It is a controlled experiment (well it is not the real one!), analyzing the vulnerability and how the exploit take action. An ample literature review also provided in the purpose to trace the problem from the lowest level and providing the current information regarding buffer overflow threat detection and prevention. In this case, the trends, current protection and detection techniques also discussed with the weaknesses and strength. At the end, after the demo has been completed the related issues mainly the current and previous detection and prevention mechanisms were discussed. Practical recommendations have been suggested while making the conclusion. The OS used is Fedora 9 as a guest OS on Win XP Pro SP2 machine using VMware.Note: This is the expanded online report version which has been submitted by writer in partial fulfillment of the Master Degree program in ICT
| |
| ||
Translate, email to friends and share: | ||
>> Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7 | ||