CIS 450 – Network Security Chapter 7 – Buffer Overflow Attacks.

Slides:



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

Network Security Attack Analysis. cs490ns - cotter2 Outline Types of Attacks Vulnerabilities Exploited Network Attack Phases Attack Detection Tools.
Lecture 16 Buffer Overflow modified from slides of Lawrie Brown.
Remote Procedure Call (RPC)
WebGoat & WebScarab “What is computer security for $1000 Alex?”
Breno de MedeirosFlorida State University Fall 2005 Buffer overflow and stack smashing attacks Principles of application software security.
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.
Chapter 15 : Attacking Compiled Applications Alexis Kirat - International Student.
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.
Network & Computer Attacks (Part 2) February 11, 2010 MIS 4600 – MBA © Abdou Illia.
Assembly תרגול 8 פונקציות והתקפת buffer.. Procedures (Functions) A procedure call involves passing both data and control from one part of the code to.
SQL Injection and Buffer overflow
Computer Security and Penetration Testing
Attack Profiles CS-480b Dick Steflik Attack Categories Denial-of-Service Exploitation Attacks Information Gathering Attacks Disinformation Attacks.
CMSC 414 Computer and Network Security Lecture 20 Jonathan Katz.
Installing Samba Vicki Insixiengmay Jonathan Krieger.
Microsoft October 2004 Security Bulletins Briefing for Senior IT Managers updated October 20, 2004 Marcus H. Sachs, P.E. The SANS Institute October 12,
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Basic Security Networking for Home and Small Businesses – Chapter 8.
Security Exploiting Overflows. Introduction r See the following link for more info: operating-systems-and-applications-in-
Web Application Access to Databases. Logistics Test 2: May 1 st (24 hours) Extra office hours: Friday 2:30 – 4:00 pm Tuesday May 5 th – you can review.
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
Computer Security and Penetration Testing
BLENDED ATTACKS EXPLOITS, VULNERABILITIES AND BUFFER-OVERFLOW TECHNIQUES IN COMPUTER VIRUSES By: Eric Chien and Peter Szor Presented by: Jesus Morales.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 45 How Hackers can Cripple the Internet and Attack Your PC How Hackers can Cripple the.
Buffer Overflows Lesson 14. Example of poor programming/errors Buffer Overflows result of poor programming practice use of functions such as gets and.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
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.
Implementing a Port Knocking System in C Honors Thesis Defense by Matt Doyle.
Introduction: Exploiting Linux. Basic Concepts Vulnerability A flaw in a system that allows an attacker to do something the designer did not intend,
1 CHAPTER 3 CLASSES OF ATTACK. 2 Denial of Service (DoS) Takes place when availability to resource is intentionally blocked or degraded Takes place when.
Brian E. Brzezicki. This tutorial just illustrates the underlying concepts of buffer overflows by way of an extremely simple stack overflow  Most buffer.
1 Application Security: Electronic Commerce and Chapter 9 Copyright 2003 Prentice-Hall.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
Lecture 20 Hacking. Over the Internet Over LAN Locally Offline Theft Deception Modes of Hacker Attack.
Distributed Denial of Service Attacks Shankar Saxena Veer Vivek Kaushik.
CIS 450 – Network Security Chapter 14 – Specific Exploits for UNIX.
PwC New Technologies New Risks. PricewaterhouseCoopers Technology and Security Evolution Mainframe Technology –Single host –Limited Trusted users Security.
Chapter 12: How Private are Web Interactions?. Why we care? How much of your personal info was released to the Internet each time you view a Web page?
Introduction Program File Authorization Security Theorem Active Code Authorization Authorization Logic Implementation considerations Conclusion.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Sairajiv Burugapalli. This chapter covers three main categories of classic software vulnerability: Buffer overflows Integer vulnerabilities Format string.
Buffer Overflows Taught by Scott Coté.-. _ _.-. / \.-. ((___)).-. / \ /.ooM \ / \.-. [ x x ].-. / \ /.ooM \ -/ \ /-----\-----/---\--\ /--/---\-----/-----\ / \-
Web Security Firewalls, Buffer overflows and proxy servers.
MCSE Guide to Microsoft Exchange Server 2003 Administration Chapter One Introduction to Exchange Server 2003.
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.
Role Of Network IDS in Network Perimeter Defense.
CNIT 127: Exploit Development Ch 8: Windows Overflows Part 1.
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.
Securing a Host Computer BY STEPHEN GOSNER. Definition of a Host  Host  In networking, a host is any device that has an IP address.  Hosts include.
Unit 2 Personal Cyber Security and Social Engineering Part 2.
@Yuan Xue Worm Attack Yuan Xue Fall 2012.
Microsoft OS Vulnerabilities April 1, 2010 MIS 4600 – MBA © Abdou Illia.
SQL Injection.
Protecting Memory What is there to protect in memory?
Chapter 7: Identifying Advanced Attacks
Chapter 6 Application Hardening
Protecting Memory What is there to protect in memory?
Web Development Web Servers.
Protecting Memory What is there to protect in memory?
Chapter 2: System Structures
CS 465 Buffer Overflow Slides by Kent Seamons and Tim van der Horst
Format String.
Lecture 3: Secure Network Architecture
Crisis and Aftermath Morris worm.
Understanding and Preventing Buffer Overflow Attacks in Unix
Presentation transcript:

CIS 450 – Network Security Chapter 7 – Buffer Overflow Attacks

Smashing The Stack For Fun And Profit : Analysis of Buffer Overflow Attacks: ffer_Overflow_Attacks.html ffer_Overflow_Attacks.html wnloads/ExploitingSoftware-Ch07.pdf wnloads/ExploitingSoftware-Ch07.pdf What is a buffer overflow? Broadly speaking, buffer overflow occurs anytime the program writes more information into the buffer than the space it has allocated in the memory. This allows an attacker to overwrite data that controls the program execution path and hijack the control of the program to execute the attacker’s code instead the process code.

Process Memory When a program is executed, its various compilation units are mapped in memory in a well-structured manner. The text segment contains primarily the program code, i.e., a series of executable program instructions. The next segment is an area of memory containing both initialized and uninitialized global data. Its size is provided at compilation time. Going further into the memory structure toward higher addresses, we have a portion shared by the stack and heap that, in turn, are allocated at run time. The stack is used to store function call-by arguments, local variables and values of selected registers allowing it to retrieve the program state. The heap holds dynamic variables. To allocate memory, the heap uses the malloc function or the new operator.

What is the stack used for? The stack works according to a LIFO model (Last In First Out). Since the spaces within the stack are allocated for the lifetime of a function, only data that is active during this lifetime can reside there. Only this type of structure results from the essence of a structural approach to programming, where the code is split into many code sections called functions or procedures. When a program runs in memory, it sequentially calls each individual procedure, very often taking one from another, thereby producing a multi-level chain of calls. Upon completion of a procedure it is required for the program to continue execution by processing the instruction immediately following the CALL instruction. In addition, because the calling function has not been terminated, all its local variables, parameters and execution status require to be “frozen” to allow the remainder of the program to resume execution immediately after the call. The implementation of such a stack will guarantee that the behavior described here is exactly the same.

Function calls The program works by sequentially executing CPU instructions. For this purpose the CPU has the Extended Instruction Counter (EIP register) to maintain the sequence order. It controls the execution of the program, indicating the address of the next instruction to be executed. For example, running a jump or calling a function causes the said register to be appropriately modified. Suppose that the EIP calls itself at the address of its own code section and proceeds with execution. What will happen then? `When a procedure is called, the return address for function call, which the program needs to resume execution, is put into the stack. Looking at it from the attacker’s point of view, this is a situation of key importance. If the attacker somehow managed to overwrite the return address stored on the stack, upon termination of the procedure, it would be loaded into the EIP register, potentially allowing any overflow code to be executed instead of the process code resulting from the normal behavior of the program. We may see how the stack behaves after the code of Listing 1 has been executed.

Types of Buffer Overflow Attacks Denial of Service Attack by causing the machine to crash – if enough information can be overwritten in memory the system can not function and the OS will crash Gaining Access – by overwriting enough information on the stack and the overwrite the return pointer can cause the pointer to point to attacker’s code instead of the actual program Programs are vulnerable due to lack of error checking. Should add bounds checking to programs.

Ten Buffer Overflow Attacks NextMeeting BufferOverflow Attacker sends a victim a specially crafted SpeedDial link; when the victim clicks on the SpeedDial link to supposedly connect to a remote system, the input that is located in the link causes a buffer overflow attack, which can be used to run arbitrary code on the victim’s system. m m Protection – Apply patches Outlook Buffer Overflow Attacker sends an with a malformed header that causes a buffer overflow; it has two variations: crash the victim’s machine or cause arbitrary code to run on the victim’s computer; an easy way to plant a backdoor on a machine; some launched when attachment opened and some launched when was downloaded; nasty because it leaves a copy on the mail server; thus, each time you check your mail, an overflow can occur. Protection – Re-install newer patched version of Outlook or install appropriate service pack

Ten Buffer Overflow Attacks Linuxconf Buffer Overflow Linuxconf is a system administrator’s tool which opens a port for remote access; runs on port 98; if the attacker inserts too much information in the HTTP header, it causes a buffer overflow on the victim’s machine. Protection It should only be run on a local host if possible If Internet or remote access is needed should be run over an encrypted link or the firewall should limit which addresses can connect Apply patches ToolTalk Buffer Overflow Unix and Unix-derivative systems; remote buffer overflow that allows arbitrary code to be run in superuser privileges on the target machine; attacker connects to ToolTalk RPC service and sends it a message whose signature overflows an internal buffer in the program and causes it to execute instructions contained in the message. Protection Apply Patches Disable vulnerable service

Ten Buffer Overflow Attacks IMPAD Buffer Overflow Internet Message Access Protocol (IMAP) on mail server (on port 143); attacker connects to the IMAPD mail service and sends it a specific message which overflows an internal buffer that causes instructions in the message to be executed; the attacker issues and oversized AUTHENTICATE message larger than 1024 bytes; attacker then runs at the privilege of IMAP. Protection Upgrade to a newer version of IMAPD Apply vendor patches Configure firewall to reject incoming TCP connections to port 143 AOL Instant Messenger (AIM) Buffer Overflow The AIM URL protocol connects AIM:// URLs to the AIM client; a buffer overflow can occur when parsing the URL parameters; can be activated just by typing the AIM::// URL in a browser window; it is a significant problem because AIM is bundled into other software like Netscape. Protection AOL is blocking this on the server side. With time they might also produce a client side fix..

Ten Buffer Overflow Attacks AOL Instant Messenger BuddyIcon Buffer Overflow stack overflow occurs if the source parameter is more than 3000 characters Windows 2000 ActiveX Control Buffer Overflow unchecked buffer in the System Monitor ActiveX Control; can be exploited remotely through a web browser or an HTML-compliant , only if ActiveX is enabled in the browser or mail client; depending on the data supplied, the attacker can execute arbitrary code on the victim’s machine mspx mspx

Ten Buffer Overflow Attacks IIS 4.0/5.0 Phone Book Server Buffer Overflow this is the phone book service of AOL; overflow occurs when the PB parameter of the query string is too long; filling this parameter with uppercase As causes the inetinfo process to crash the victim’s system. Protection If you do not need the Phone Book Service you should remove pbserver.dll. Users of the Phone Book Service should download and install the patch provided by Microsoft SQL Server 2000 Extended Stored Procedures Buffer Overflow clients can issue extended called procedures through a normal SQL Server query; some of these stored procedures are vulnerable to buffer overflow attacks by an unauthorized user. us%3BQ us%3BQ

General Protection Against Buffer Overflow Attacks Close the port or service Know what is installed on your system and have the least amount of services running and ports open that are required for the system to operate in a specific environment Apply the vendor’s patches or install the latest version of the software Filter specific traffic at the firewall Test key applications Run software at the least privilege required