2006 2 nd Joint Workshop between Security Research Labs in JAPAN and KOREA An Enhanced Buffer Separation Scheme to Protect Security Sensitive Data against.

Slides:



Advertisements
Similar presentations
Buffer Overflows Nick Feamster CS 6262 Spring 2009 (credit to Vitaly S. from UT for slides)
Advertisements

Defenses. Preventing hijacking attacks 1. Fix bugs: – Audit software Automated tools: Coverity, Prefast/Prefix. – Rewrite software in a type safe languange.
Integrity & Malware Dan Fleck CS469 Security Engineering Some of the slides are modified with permission from Quan Jia. Coming up: Integrity – Who Cares?
Native x86 Decompilation Using Semantics-Preserving Structural Analysis and Iterative Control-Flow Structuring Edward J. Schwartz *, JongHyup Lee ✝, Maverick.
Computer Security: Principles and Practice EECS710: Information Security Professor Hossein Saiedian Fall 2014 Chapter 10: Buffer Overflow.
Lecture 16 Buffer Overflow modified from slides of Lawrie Brown.
Review: Software Security David Brumley Carnegie Mellon University.
Buffer Overflow Prevention ”\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e \x89\xe3\x50\x53\x50\x54\x53\xb0\x3b\x50\xcd\x80” Presented to CRAB April.
K. Salah1 Buffer Overflow The crown jewel of attacks.
Breno de MedeirosFlorida State University Fall 2005 Buffer overflow and stack smashing attacks Principles of application software security.
Gabe Kanzelmeyer CS 450 4/14/10.  What is buffer overflow?  How memory is processed and the stack  The threat  Stack overrun attack  Dangers  Prevention.
TaintCheck and LockSet LBA Reading Group Presentation by Shimin Chen.
Securing software by enforcing data-flow integrity Manuel Costa Joint work with: Miguel Castro, Tim Harris Microsoft Research Cambridge University of Cambridge.
Beyond Stack Smashing: Recent Advances in Exploiting Buffer Overruns Jonathan Pincus Microsoft Research Brandon Baker Microsoft Carl Hartung CSCI 7143:
Security Protection and Checking in Embedded System Integration Against Buffer Overflow Attacks Zili Shao, Chun Xue, Qingfeng Zhuge, Edwin H.-M. Sha International.
Windows XP SP2 Stack Protection Jimmy Hermansson Johan Tibell.
1 Achieving Trusted Systems by Providing Security and Reliability (Research Project #22) Project Members: Ravishankar K. Iyer, Zbigniew Kalbarczyk, Jun.
Achieving Trusted Systems by Providing Security and Reliability Ravishankar K. Iyer, Zbigniew Kalbarczyk, Jun Xu, Shuo Chen, Nithin Nakka and Karthik Pattabiraman.
1 RISE: Randomization Techniques for Software Security Dawn Song CMU Joint work with Monica Chew (UC Berkeley)
Lecture 16 Buffer Overflow
Address Obfuscation: An Efficient Approach to Combat a Broad Range of Memory Error Exploits Sandeep Bhatkar, Daniel C. DuVarney, and R. Sekar Stony Brook.
University of Washington CSE 351 : The Hardware/Software Interface Section 5 Structs as parameters, buffer overflows, and lab 3.
Vulnerability-Specific Execution Filtering (VSEF) for Exploit Prevention on Commodity Software Authors: James Newsome, James Newsome, David Brumley, David.
Security Exploiting Overflows. Introduction r See the following link for more info: operating-systems-and-applications-in-
Exploiting Buffer Overflows on AIX/PowerPC HP-UX/PA-RISC Solaris/SPARC.
Computer Security and Penetration Testing
Automatic Diagnosis and Response to Memory Corruption Vulnerabilities Authors: Jun Xu, Peng Ning, Chongkyung Kil, Yan Zhai, Chris Bookholt In ACM CCS’05.
nd Joint Workshop between Security Research Labs in JAPAN and KOREA Profile-based Web Application Security System Kyungtae Kim High Performance.
Buffer Overflow Detection Stuart Pickard CSCI 297 June 14, 2005.
Mitigation of Buffer Overflow Attacks
Lecture slides prepared for “Computer Security: Principles and Practice”, 3/e, by William Stallings and Lawrie Brown, Chapter 10 “Buffer Overflow”.
Branch Regulation: Low-Overhead Protection from Code Reuse Attacks.
Automatic Diagnosis and Response to Memory Corruption Vulnerabilities Presenter: Jianyong Dai Jun Xu, Peng Ning, Chongkyung Kil, Yan Zhai, Chris Bookhot.
nd Joint Workshop between Security Research Labs in JAPAN and KOREA Marking Scheme for Semantic- aware Web Application Security HPC.
Buffer Overflow Attack-proofing by Transforming Code Binary Gopal Gupta Parag Doshi, R. Reghuramalingam The University of Texas at Dallas 11/15/2004.
Lecture 8: Buffer Overflow CS 436/636/736 Spring 2013 Nitesh Saxena *Adopted from a previous lecture by Aleph One (Smashing the Stack for Fun and Profit)
Buffer Overflow Proofing of Code Binaries By Ramya Reguramalingam Graduate Student, Computer Science Advisor: Dr. Gopal Gupta.
Buffer Overflow Group 7Group 8 Nathaniel CrowellDerek Edwards Punna ChalasaniAxel Abellard Steven Studniarz.
Buffer Overflow Attack Proofing of Code Binary Gopal Gupta, Parag Doshi, R. Reghuramalingam, Doug Harris The University of Texas at Dallas.
Highly Scalable Distributed Dataflow Analysis Joseph L. Greathouse Advanced Computer Architecture Laboratory University of Michigan Chelsea LeBlancTodd.
Lecture 9: Buffer Ovefflows and ROP EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer Engineering Spring 2014,
What is exactly Exploit writing?  Writing a piece of code which is capable of exploit the vulnerability in the target software.
A Tool for Pro-active Defense Against the Buffer Overrun Attack D. Bruschi, E. Rosti, R. Banfi Presented By: Warshavsky Alex.
G ENESIS : A Framework For Achieving Component Diversity John C. Knight, Jack W. Davidson, David Evans, Anh Nguyen-Tuong University of Virginia Chenxi.
nd Joint Workshop between Security Research Labs in JAPAN and KOREA Polymorphic Worm Detection by Instruction Distribution Kihun Lee HPC Lab., Postech.
Introduction Program File Authorization Security Theorem Active Code Authorization Authorization Logic Implementation considerations Conclusion.
Buffer overflow and stack smashing attacks Principles of application software security.
Buffer Overflow Attack- proofing of Code Binaries Ramya Reguramalingam Gopal Gupta Gopal Gupta Department of Computer Science University of Texas at Dallas.
Sampling Dynamic Dataflow Analyses Joseph L. Greathouse Advanced Computer Architecture Laboratory University of Michigan University of British Columbia.
Exploiting Instruction Streams To Prevent Intrusion Milena Milenkovic.
Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software Paper by: James Newsome and Dawn Song.
A Survey on Runtime Smashed Stack Detection 坂井研究室 M 豊島隆志.
Group 9. Exploiting Software The exploitation of software is one of the main ways that a users computer can be broken into. It involves exploiting the.
Slides by Kent Seamons and Tim van der Horst Last Updated: Nov 11, 2011.
Scalable lock-free Stack Algorithm Wael Yehia York University February 8, 2010.
Beyond Stack Smashing: Recent Advances In Exploiting Buffer Overruns Jonathan Pincus and Brandon Baker Microsoft Researchers IEEE Security and.
Buffer Overflows: Attacks and Defenses for the Vulnerability of the Decade Crispin Cowan SANS 2000.
Automatic Diagnosis and Response to Memory Corruption Vulnerabilities Authors: Jun Xu, Peng Ning, Chongkyung Kil, Yan Zhai, Chris Bookholt Cyber Defense.
Software Security. Bugs Most software has bugs Some bugs cause security vulnerabilities Incorrect processing of security related data Incorrect processing.
@Yuan Xue Worm Attack Yuan Xue Fall 2012.
Memory Protection through Dynamic Access Control Kun Zhang, Tao Zhang and Santosh Pande College of Computing Georgia Institute of Technology.
Mitigation against Buffer Overflow Attacks
Sabrina Wilkes-Morris CSCE 548 Student Presentation
CS 465 Buffer Overflow Slides by Kent Seamons and Tim van der Horst
Defending against Stack Smashing attacks
Software Security Lesson Introduction
All You Ever Wanted to Know About Dynamic Taint Analysis & Forward Symbolic Execution (but might have been afraid to ask) Edward J. Schwartz, Thanassis.
Return-to-libc Attacks
Sampling Dynamic Dataflow Analyses
Presentation transcript:

nd Joint Workshop between Security Research Labs in JAPAN and KOREA An Enhanced Buffer Separation Scheme to Protect Security Sensitive Data against Buffer Overflow Attacks Researcher : Lee, Seung Min (Presenter : Lee, Seung Ick) High Performance Computing Laboratory at POSTECH

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 2/14 Contents  Introduction  Related Works  Motivation  Problem Definition  Proposed Idea  Performance Analysis  Conclusion and Future Works

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 3/14 Introduction  Buffer overflow Occur when a program or process stores more data in buffer than the buffer size  Security sensitive data Data to be a target of buffer overflow attack for a successful change of control flow  Basic steps of buffer overflow attack The first step  To find, discover and identify vulnerability of buffer overflow The second step  To overflow and overwrite security sensitive data near buffer The third step  To change control flow of process The fourth step  To execute intended instruction or process

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 4/14  Protection Methods are classified depending on the step the prevention method is applied.  The first step To eliminate buffer overflow vulnerability  The second step To prevent overflow or overwrite data  The third step To prevent no intended control flow of a program or process  The fourth step To apply that data of buffer can’t be executed through hardware support Protection Methods Related Works ( 1/2 )

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 5/14 Problems of Previous Works  Problem of the prevention method on the first step Generate too many false warnings and miss errors in the code  Problem of the prevention method on the second step Performance degradation through array bounds checking Not to provide complete protection against vulnerabilities in user defined or non standard library code  Problem of prevention method on the third and fourth steps Occur an exception or termination because of attack failure Related Works ( 2/2 )

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 6/14 Motivation ( 1/2 )  The prevention methods applied in these steps but the second have the problem of process availability, since the process stops its execution because of false warnings, exceptions or termination.  Our focus is to provide a reliable process availability and more secure protection method.  Buffer separation approach is the method applied on the second step for prevention. Remove buffers from stack Allow the occurrence of buffer overflow but prevent security sensitive data from being overwritten Gemini and DYBOC

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 7/14  Shortcoming of previous works Gemini  Can generate heap overflow because of buffer using heap area instead of stack DYBOC  Has a memory overhead problem because of using write- protected page Motivation ( 2/2 )

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 8/14 Problem Definition  To prevent stack and heap overflow for using enhanced buffer separation approach  To have minimal performance penalty

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 9/14 Basic Idea  Assumption We can know the size of arrays at compile time.  Enhanced buffer separation schemes Buffer stack  Separate buffer from the security sensitive data on the stack area. Separated meta data  Separate meta data from buffer on the heap area. Proposed Idea ( 1/3 )

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 10/14  Buffer stack is to prevent against stack overflow.  Buffer stack will be determined as using heap or stack at the compile time. Buffer Stack Architecture Proposed Idea ( 2/3 )

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 11/14 Separated Meta Data Architecture  Separated meta data is to prevent against heap overflow. Proposed Idea ( 3/3 )

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 12/14 Performance Analysis  Performance comparison with Gemini, DYBOC and our solutions  Limitation If the security sensitive data exists inside buffers, it is very hard to split them from the buffers. Our solutions can’t prevent data from pointer operations that use the primitive type variables. Compiler has to know the size of stack. Data(Stack)Data(Heap)TimeMemory OriginalOverwrite -- GeminiPreventOverwriteIncrease DYBOCPreventOverwritePoor Our Solution Prevent A little Increase Poor

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 13/14 Experiments  We chose two vulnerabilities which is similar to the source of finger demon and PCT SSL vulnerability.  We applied single thread program but it can be applied in multi-threaded environment easily.  In both cases, the security sensitive data of the original program is overwritten and make an exception.  But, the program applied our approaches correctly executes because it protects the security sensitive data even though the buffer data is tainted.

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 14/14 Conclusion and Future Works  Conclusion Buffer stack prevents the stack overflow attack. Separated meta data prevents the heap overflow attack.  Future works We must find trade-off between performance and memory overhead on case 1 and 2 of the Buffer stack architecture, and then will choose one of cases. Throughout the implementation, we can provide more exact performance analysis. We can provide more powerful solutions to change the main assumption: security sensitive data is located near the buffer and also in the buffer.

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 15/14 Thank you! Questions?

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 16/14 Backup slide

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 17/14 References  [1] Hiroaki Etoh and Kunikazu Yoda. Protecting from Stack-Smashing Attacks. Published on World-Wide Web at URL June 2000http://  [2] Donaldson, Mark E. Inside The Buffer Overflow Attack: Mechanism, Method, & Prevention. April 3, URL:  [3] Bharath Madhusudan, John Lockwood. Design of a System for Real-Time Worm  [4] H. Wang, C. Guo, D. Simon, and A. Zugenmaier. Shield: Vulnerability-driven network filters for preventing known vulnerability exploits. In Proceedings of ACM SIGCOMM, Portland, OR, Aug Detection, 12th Annual Proceedings of IEEE Hot Interconnects 2004  [5] J. Newsome and D. Song. Dynamic taint analysis for automatic detection, analysis, and signature generation of exploits on commodity software. In Proceedings of the 12th Annual Network and Distributed System Security Symposium(NDSS05), Feb  [6] Rinard. M., Cada. C., Dumitran. D., Roy. D., Leu.T. A Dynamic Technique for Eliminating Buffer Overflow Vulnerabilities (and Other Memory Errors). In: Proceedings 20th Annual Computer Security Applications Conference (ACSAC), 2004  [7] StackShield.  [8] A. Baratloo, T. Tsai, and N. Singh. Transparent Run-Time Defense Against Stack Smashing Attacks. In Proceedings. of the USENIX Annual Technical Conference, June 2000

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 18/14 Reference (Cont.)  [9] Crispin Cowan, Steve Beattie, John Johansen, and Perry Wagle. Pointguard: Protecting pointers from buffer overflow vulnerabilities. In Proceedings of the 12th USENIX Security Symposium, Washington, D.C., August 2003  [10] BB. Madan, S. Phoha, G. NIST, KS Trivedi, StackOfence: A Technique for Defending Against Buffer Overflow Attacks, In Proceedings of the International COnference on Information Technology: Coding and Computing(ITCC05), 2005  [11] J. Xu, Z. Kalbarczyk, S. Patel, and R. K. Iyer. Architecture support for defending against buffer overflow attacks. In 2nd Workshop on Evaluating and Architecting Systems for Dependability, 2002  [12] S Bhatkar, DC DuVarney, R Sekar, Address obfuscation: An efficient approach to combat a broad range of memory error exploits, In Proceedings of the 12th USENIX Security Symposium, 2003  [13] Wilander, J. and M. Kamkar, Comparison of Publicly Available Tools for Dynamic Buffer Overflow Prevention, 10th Network and Distributed System Security Symposium, 2003  [14] Stelios Sidiroglou, Giannis Giovanidis, and Angelos D. Keromytis, A Dynamic Mechanism for Recovering from Buffer Overflow Attacks  [15] R Hieb, RK Dybvig, C Bruggeman, L Hall, Representing Control in the Presence of First-Class Continuations, In Proceedings of the ACM SIGPLAN 1990 conference on 1990 [16] EG Barrantes, DH Ackley, S Forrest, D Stefanovic, Randomized Instruction Set Emulation, ACM Transactions on Information and System Security, 2005  [16] Christopher Dahn, Spiros Mancoridis, Using Program Transformation to Secure C Programs Against Buffer Overflows, in Proceedings of the 10 th Working Conference on Reverse Engineering (WCRE03)

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 19/14 Scenario void f(char *a) { char c[10]; strcpy(c,a); } void main() { char a[20]; int i; a[5] = 4; f1(a); } Original Code push ebp mov ebp, esp sub esp, 10 push [ebp+8] push [ebp-10] call strcpy add esp,10 leave ret push ebp mov ebp, esp sub esp, 24 mov [ebp-15],4 push ebp-20 call f1 add esp,24 leave ret Original Pseudo Assembly Code Prologue Epilogue Return Address of main Old EBP a i c Return Address of f Old EBP EBP ESP address of a push ebp mov ebp, esp sub exp, 10 push [ebp+4] push exp call strcpy add exp,10 leave ret push ebp mov ebp, esp sub esp, 4 sub exp, 20 mov [exp+5],4 push exp call f1 add exp,20 add esp,4 leave ret Modified Pseudo Assembly Code Return Address of main Old EBP a i c Return Address of f Old EBP EBP ESP address of a EXP

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 20/14 Scenario (Cont.) void f(char *a) { char c[10]; strcpy(c,a); } void main() { char a[20]; int i; a[5] = 4; f1(a); } Original Code push ebp mov ebp, esp sub esp, 10 push [ebp+4+S] push ebp-10+S call strcpy add esp,10 leave ret push ebp mov ebp, esp sub esp, 24 mov [exp-15+S],4 push exp call f1 add esp,24 leave ret Modified Pseudo Assembly Code Prologue Epilogue Return Address of main Old EBP a i c Return Address of f Old EBP EBP ESP address of a S : Size of Stack

nd Joint Workshop between Security Research Labs in JAPAN and KOREA 21/14 function(char *packet, unsigned int N) { char buf[32]; unsigned int register i; if(N < 32) { memcpy(buf,packet,N); for(i = 0; i < N; i++) buf[i+N] = ~buf[i]; } } Vulnerable code of PCT SSL vulnerability