Shuo Chen, Jun Xu, Emre C. Sezer, Prachi Gauriar, and Ravishankar K. Iyer Brett Hodges April 8, 2010.

Slides:



Advertisements
Similar presentations
USENIX Security Symposium, Baltimore, MD, Non-Control-Data Attacks Are Realistic Threats Shuo Chen *, Jun Xu, Emre Sezer, Prachi Gauriar, Ravi Iyer.
Advertisements

Smashing the Stack for Fun and Profit
Defenses. Preventing hijacking attacks 1. Fix bugs: – Audit software Automated tools: Coverity, Prefast/Prefix. – Rewrite software in a type safe languange.
Dr. Kalpakis CMSC 421, Operating Systems. Fall 2008 URL: Security.
Network Security Attack Analysis. cs490ns - cotter2 Outline Types of Attacks Vulnerabilities Exploited Network Attack Phases Attack Detection Tools.
Computer Security: Principles and Practice EECS710: Information Security Professor Hossein Saiedian Fall 2014 Chapter 10: Buffer Overflow.
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 11 – Buffer Overflow.
Lecture 16 Buffer Overflow modified from slides of Lawrie Brown.
Abhinn Kothari, 2009CS10172 Parth Jaiswal 2009CS10205 Group: 3 Supervisor : Huzur Saran.
1 CHAPTER 8 BUFFER OVERFLOW. 2 Introduction One of the more advanced attack techniques is the buffer overflow attack Buffer Overflows occurs when software.
Stack-Based Buffer Overflows Attacker – Can take over a system remotely across a network. local malicious users – To elevate their privileges and gain.
Defeating Memory Corruption Attacks via Pointer Taintedness Detection Shuo Chen †, Jun Xu ‡, Nithin Nakka †, Zbigniew Kalbarczyk † and Ravi K. Iyer † ‡
Information Networking Security and Assurance Lab National Chung Cheng University The Ten Most Critical Web Application Security Vulnerabilities Ryan J.W.
Information Networking Security and Assurance Lab National Chung Cheng University 1 Top Vulnerabilities in Web Applications (I) Unvalidated Input:  Information.
1 Achieving Trusted Systems by Providing Security and Reliability (Research Project #22) Project Members: Ravishankar K. Iyer, Zbigniew Kalbarczyk, Jun.
Non-Control-Data Attacks and Securing software by enforcing data- flow integrity Zhiqiang Lin Mar 28, 2007 CS590 paper presentation.
Achieving Trusted Systems by Providing Security and Reliability Ravishankar K. Iyer, Zbigniew Kalbarczyk, Jun Xu, Shuo Chen, Nithin Nakka and Karthik Pattabiraman.
Building Secure Software Chapter 9 Race Conditions.
Information Networking Security and Assurance Lab National Chung Cheng University 1 A Real World Attack: wu-ftp.
SQL Injection and Buffer overflow
The 10 Most Critical Web Application Security Vulnerabilities
Web Application Attacks ECE 4112 Fall 2007 Group 9 Zafeer Khan & Simmon Yau.
Web Application Vulnerabilities Checklist. EC-Council Parameter Checklist  URL request  URL encoding  Query string  Header  Cookie  Form field 
On-Chip Control Flow Integrity Check for Real Time Embedded Systems Fardin Abdi Taghi Abad, Joel Van Der Woude, Yi Lu, Stanley Bak, Marco Caccamo, Lui.
Address Space Layout Permutation
Csci5233 Computer Security1 Bishop: Chapter 27 System Security.
Computer Security and Penetration Testing
OSI and TCP/IP Models And Some Vulnerabilities AfNOG th May 2011 – 10 th June 2011 Tanzania By Marcus K. G. Adomey.
Attacking Applications: SQL Injection & Buffer Overflows.
Automatic Generation of Data-Oriented Exploits
Mitigation of Buffer Overflow Attacks
Top Five Web Application Vulnerabilities Vebjørn Moen Selmersenteret/NoWires.org Norsk Kryptoseminar Trondheim
OWASP Top Ten #1 Unvalidated Input. Agenda What is the OWASP Top 10? Where can I find it? What is Unvalidated Input? What environments are effected? How.
1 Enhancing Security of Real-World Systems with a Better Understanding of Threats Shuo Chen Ph.D. Candidate in Computer Science Center for Reliable and.
1 Application Security: Electronic Commerce and Chapter 9 Copyright 2003 Prentice-Hall.
COMPUTER SECURITY MIDTERM REVIEW CS161 University of California BerkeleyApril 4, 2012.
 Chapter 14 – Security Engineering 1 Chapter 12 Dependability and Security Specification 1.
Defending Browsers against Drive-by Downloads:Mitigating Heap-Spraying Code Injection Attacks Authors:Manuel Egele, Peter Wurzinger, Christopher Kruegel,
Identification and Protection of Security-Critical Data Nora Sovarel University of Virginia Computer Science June 6, 2006 MCS Project Presentation.
APPLICATION PENETRATION TESTING Author: Herbert H. Thompson Presentation by: Nancy Cohen.
CIS 450 – Network Security Chapter 14 – Specific Exploits for UNIX.
Linux Security. Authors:- Advanced Linux Programming by Mark Mitchell, Jeffrey Oldham, and Alex Samuel, of CodeSourcery LLC published by New Riders Publishing.
A Tool for Pro-active Defense Against the Buffer Overrun Attack D. Bruschi, E. Rosti, R. Banfi Presented By: Warshavsky Alex.
On the Effectiveness of Address-Space Randomization Hovav Shacham, Matthew Page, Ben Pfaff, Eu-Jin Goh, Nagendra Modadugu, Dan Boneh.
A Survey on Runtime Smashed Stack Detection 坂井研究室 M 豊島隆志.
Information Security - 2. A Stack Frame. Pushed to stack on function CALL The return address is copied to the CPU Instruction Pointer when the function.
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.
Security Attacks Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Slides by Kent Seamons and Tim van der Horst Last Updated: Nov 11, 2011.
MOPS: an Infrastructure for Examining Security Properties of Software Authors Hao Chen and David Wagner Appears in ACM Conference on Computer and Communications.
VM: Chapter 7 Buffer Overflows. csci5233 computer security & integrity (VM: Ch. 7) 2 Outline Impact of buffer overflows What is a buffer overflow? Types.
Beyond Stack Smashing: Recent Advances In Exploiting Buffer Overruns Jonathan Pincus and Brandon Baker Microsoft Researchers IEEE Security and.
Software Security. Bugs Most software has bugs Some bugs cause security vulnerabilities Incorrect processing of security related data Incorrect processing.
Mitigation against Buffer Overflow Attacks
Protecting Memory What is there to protect in memory?
World Wide Web policy.
Protecting Memory What is there to protect in memory?
Protecting Memory What is there to protect in memory?
Secure Software Development: Theory and Practice
High Coverage Detection of Input-Related Security Faults
CS 465 Buffer Overflow Slides by Kent Seamons and Tim van der Horst
Software Security Lesson Introduction
Format String.
Lecture 2 - SQL Injection
Security.
Operating System Concepts
Understanding and Preventing Buffer Overflow Attacks in Unix
Format String Vulnerability
Set-UID Privileged Programs
Return-to-libc Attacks
Presentation transcript:

Shuo Chen, Jun Xu, Emre C. Sezer, Prachi Gauriar, and Ravishankar K. Iyer Brett Hodges April 8, 2010

 Emphasis  Control Data vs. Non-Control Data  Security critical non-control data types  Real world application tests  Defense for such attacks  Conclusion

 To show that non-control-data attacks are realistic  To show “The viability of non-control-data attacks against real-world applications”  Applicability of Claim: › “Many real-world software applications are susceptible to non-control-data attacks, and the severity of the resulting security compromises is equivalent to that of control-data attacks.”

 What is a control data attack? › Corrupt function pointers, jump targets and return addresses to run malicious code  Common Design for attack › Hijack the target program › Inject own code or out-of-context library › Make a system call to spawn root shell  Most dominate

 Attacks not corrupting any control data  Corrupt a variety of application data that is critical to program security › User Identity Data › Configuration Data › User Input Data › Decision-making Data  More rare

 Server applications require remote user authentication › Applications cache user ID, group ID, and access rights  Overwrite cached information › First stored in memory -> time used for access control  Attacker can change identity and perform unauthorized operations

 Site specific configuration files › i.e., Apache web server  “httpd.conf” file  CGI-BIN path directory › Preselected lists of “trusted” programs  Overwritten through memory corruption vulnerability › Attacker can bypass the ACL defined

 Input validation  After validation altering steps: › 1.Use a legit input to pass the validation checking › 2. Alter the buffered input data to become malicious › 3. Force the application to use the altered Data  Time Of Check to Time Of Use attack

 Network server applications use multiple steps for user authentication › Rely on several Boolean values  Corrupt the value of the final decision- making data › Will influence the eventual critical decision

 Manual source code analysis needed  Attackers use known exploits to overwrite the Non-Control Data › Format string vulnerabilities › Heap overflow › Stack buffer overflow › Integer overflow

 Goal: To construct an attack against user identity data that can lead to root privilege compromise without injecting external code.  WU-FTPD FTP server  The Site Exec Command Format String Vulnerability

 Find data items that if corrupted could allow the attacker to log in to the system › Login as root without providing correct password  Why? › The SITE EXEC format string  Could not change data due to FTPD authentication steps

 Overwrite the information source used for authentication  UNIX system user names and IDs stored in /etc/passwd › Overwrite passwd to give user root  Exploit getdatasock() on specific FTP server › Escalate seteuid(0)  Root access

Changes the EUID Cached copy of the User ID saved on the heap Invoked when a user issues a data transfer command such at “get” or “put Exploit

 Goal: to corrupt the CGI-BIN configuration string that will result in root compromise without executing any external code  Attacking the Null HTTPD daemon › Server name: › CGI-BIN Path: /usr/local/httpd/cgi-bin › Request: › Server executes: /usr/local/httpd/cgi-bin /bar

Heap corruption triggered with POST command

 Goal: To construct an attack that neither injects code nor alters the return address  HTTPD server : GHTTPD › Stack buffer overflow in function log() › Alter the backup value of ESI register to compromise validation checks

Change value of ESI register to point to URL containing “/..” You can now run /bin/sh as a CGI program serveconnection() checks to see if “/..” is embedded in the URL

0xbfffd7dc

 Goal: Overwrite Boolean variables to get access to target without using password  Attack on SSH server implementation › SSH Communications Inc. › OpenSSH.org

Boolean flag indicates FALSE Integer Flow Vulnerability Send very large packet here Server fails but breaks out of loop Boolean set to 1 (TRUE) and spawns a shell

 Current program does not calculate checksums › Proof-of-concept attack › SSH validation does packet checksums  To make attack complete: › Understand DES cryptographic algorithms

 Categorized into two classes: › 1. Techniques to avoid having memory- safety bugs in software › 2. Techniques to defeat exploitations of these bugs  Failed Techniques  Better Techniques

 StackShield › NCD: no address changes  Intrusion Detection Systems › NCD: No invocation of system calls  Non-Executable-Memory Protections › NCD: No code is injected

 StackGuard & Libsafe can still defeat stack buffer overflow unless it is in the same frame as the overflowing buffer like the GHTTPD example.  Minimize the lifetime of security critical data › Period of “in between” time where code is changed then executed

 The Applicability Claim is empirically validated  Experiments conducting non-control- data attacks against major network server applications › Each attack exploits a different type of memory vulnerability to corrupt non-control data and gain privileges

 NCD are not as straightforward so they require semantic knowledge › Harder to do so less do it  Control flow integrity may not be sufficient enough for security  Finding a generic solution for NCD attacks is still an open problem

 Increase awareness that NCD attacks are very important  Provide flaws in current defensive techniques  Offers suggestions to secure critical data better

 Poor organization  Spent more time on their validations  Organize the paper to have a better flow  Explain the main real world tests more in depth  Offer modified code solutions for defensive techniques