More Network Security Threats Worm = a stand-alone program that can replicate itself and spread Worms can also contain manipulation routines to perform.

Slides:



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

Exploring Security Vulnerabilities by Exploiting Buffer Overflow using the MIPS ISA Andrew T. Phillips Jack S. E. Tan Department of Computer Science University.
Procedure Calls Prof. Sirer CS 316 Cornell University.
Lecture 6: MIPS Instruction Set Today’s topic –Control instructions –Procedure call/return 1.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /17/2013 Lecture 12: Procedures Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL.
Ch. 8 Functions.
The University of Adelaide, School of Computer Science
C risis And A ftermath Eugene H. Spafford 발표자 : 손유민.
Communications of the ACM (CACM), Vol. 32, No. 6, June 1989
Lecture 16 Buffer Overflow modified from slides of Lawrie Brown.
Utilizing the GDB debugger to analyze programs Background and application.
 Procedures (subroutines) allow the programmer to structure programs making them : › easier to understand and debug and › allowing code to be reused.
October 15, 2002Serguei A. Mokhov, 1 UNIX Security 2: A Quick Recap SOEN321 - Information Systems Security Revision 1.3 Date: September.
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.
Silberschatz, Galvin and Gagne  Operating System Concepts The Security Problem A system is secure iff its resources are used and accessed as.
Processes CSCI 444/544 Operating Systems Fall 2008.
The Internet Worm Crisis and Aftermath Miyu Nakagawa Cameron Smithers Ying Han.
04/30/2010CSCI 315 Operating Systems Design1 Protection and Security.
Inter Process Communication:  It is an essential aspect of process management. By allowing processes to communicate with each other: 1.We can synchronize.
Overview Computer security threats Unintentional:
Assembly תרגול 8 פונקציות והתקפת buffer.. Procedures (Functions) A procedure call involves passing both data and control from one part of the code to.
CMSC 414 Computer and Network Security Lecture 20 Jonathan Katz.
1 Network File System. 2 Network Services A Linux system starts some services at boot time and allow other services to be started up when necessary. These.
University of Washington CSE 351 : The Hardware/Software Interface Section 5 Structs as parameters, buffer overflows, and lab 3.
Chapter 8 :: Subroutines and Control Abstraction
Chapter 15: Security (Part 1). The Security Problem Security must consider external environment of the system, and protect the system resources Intruders.
System Calls 1.
13.1 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Security.
Security Exploiting Overflows. Introduction r See the following link for more info: operating-systems-and-applications-in-
14.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 14: Protection.
CAP6135: Malware and Software Vulnerability Analysis Buffer Overflow : Example of Using GDB to Check Stack Memory Cliff Zou Spring 2011.
Administrative: Objective: –Tutorial on Risks –Phoenix recovery Outline for today.
Copyright © 2005 Elsevier Chapter 8 :: Subroutines and Control Abstraction Programming Language Pragmatics Michael L. Scott.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Lecture 18: 11/5/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
COP4020 Programming Languages Subroutines and Parameter Passing Prof. Xin Yuan.
©Ian Sommerville 2004Software Engineering Case Studies Slide 1 The Internet Worm Compromising the availability and reliability of systems through security.
Module R3 Process Scheduling. Module R3 involves the creation of a simple “Round Robin” dispatcher. The successful completion of this module will require.
Lecture 9: Buffer Ovefflows and ROP EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer Engineering Spring 2014,
Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents.
4061 Session 26 (4/19). Today Network security Sockets: building a server.
Viruses a piece of self-replicating code attached to some other code – cf biological virus both propagates itself & carries a payload – carries code to.
JMU GenCyber Boot Camp Summer, Introduction to Penetration Testing Elevating privileges – Getting code run in a privileged context Exploiting misconfigurations.
The Internet Worm Incident Eugene H. Spafford  Attack Format –Worm vs. Virus  Attack Specifications –Worm operation –Infection and propagaion  Topics.
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.
Preocedures A closer look at procedures. Outline Procedures Procedure call mechanism Passing parameters Local variable storage C-Style procedures Recursion.
Chapter 10 Chapter 10 Implementing Subprograms. Implementing Subprograms  The subprogram call and return operations are together called subprogram linkage.
CAP6135: Malware and Software Vulnerability Analysis Buffer Overflow : Example of Using GDB to Check Stack Memory Cliff Zou Spring 2014.
LECTURE 19 Subroutines and Parameter Passing. ABSTRACTION Recall: Abstraction is the process by which we can hide larger or more complex code fragments.
CHAPTERS 7-8 TJADEN Computer Security and Computer Security Threats
Computer Architecture & Operations I
The Internet Worm Compromising the availability and reliability of systems through security failure.
Lecture 5: Procedure Calls
Chapter 9 :: Subroutines and Control Abstraction
Chap. 8 :: Subroutines and Control Abstraction
Chap. 8 :: Subroutines and Control Abstraction
The University of Adelaide, School of Computer Science
CAP6135: Malware and Software Vulnerability Analysis Buffer Overflow : Example of Using GDB to Check Stack Memory Cliff Zou Spring 2015.
Security.
Procedures and Calling Conventions
Where is all the knowledge we lost with information? T. S. Eliot
Crisis and Aftermath Morris worm.
CAP6135: Malware and Software Vulnerability Analysis Buffer Overflow : Example of Using GDB to Check Stack Memory Cliff Zou Spring 2016.
Understanding and Preventing Buffer Overflow Attacks in Unix
Chapter 14: Protection.
CAP6135: Malware and Software Vulnerability Analysis Buffer Overflow : Example of Using GDB to Check Stack Memory Cliff Zou Spring 2013.
Return-to-libc Attacks
Presentation transcript:

More Network Security Threats Worm = a stand-alone program that can replicate itself and spread Worms can also contain manipulation routines to perform other actions: –Modifying or deleting files –Using system resources –Collecting information –Etc.

The Morris Worm Appeared in November, 1988 Created by a Computer Science graduate student Brought down thousands of the ~60,000 computers then attached to the Internet –Academic, governmental, and corporate –Suns or VAXes running BSD UNIX

Operation of the Morris Worm Used four different attack strategies to try to run a piece of code called the grappling hook on a target system When run, the grappling hook: –Made a network connection back to the infected system from which it had originated –Transferred a copy of the worm code from the infected system to the target system –Started the worm running on the newly infected system

The Morris Worm’s Grappling Hook

Attack Strategy #1: Exploiting sendmail Many versions of sendmail had a debug option –Allowed an message to specify a program as its recipient Named program ran with the body of the message as input The worm created an message: –Contained the grappling hook code –Invoked a command to strip off the mail headers –Passed the result to a command interpreter

Attack Strategy #2: Exploiting the finger daemon The finger daemon, fingerd, is a remote user information server –Which users currently logged onto the system –How long each has been logged on –The terminal from which they are logged on –Etc. A buffer overflow bug in fingerd on VAXes allowed the worm to execute the grappling hook code

Buffer Overflows A program’s stack segment: –Temporary working space for the program –Example: Subroutines int foo(int P1, int P2) /* subroutine “foo” */ { int L1, L2; /* local variables L1 and L2 */ L1 = P1 + P2; return(L1); /* return value */ } int main() /* main program */ { … x = foo(1,2); /* call to subroutine “foo” */ … }

Stack Frames Stack main foo Stack frames

Stack Frames (cont) A stack frame contains the corresponding routine’s: –Parameters –Return address (i.e. next instruction to execute upon completion) –Saved registers –Local variables Many architectures have registers: –SP, the stack pointer, points to the top of the stack –BP, the base pointer, points to a fixed location within the frame Used to reference the procedure’s parameters and local variables

Stack Frames (cont) The main routine calls foo: –foo’s parameters are first pushed onto the stack –The next instruction in main to execute after foo finishes, the return address, is pushed –Control is transferred to foo –foo’s prologue: Save caller’s (main’s) base pointer Set callee’s (foo’s) bp equal to the current sp Increment sp to reserve space on the stack for foo’s local variables

Stack Frames (cont) foo’s stack frame at the after the completion of the prologue: stack SP L1 main’s bpL2 P2 P1 return address BP

Stack Frames (cont) The execution of foo: –P1 = BP-4 –P2 = BP-3 –L1 = BP –L2 = BP+1 The statement “L1 = P1 + P2” would performed by the following assembly language instruction: –add BP-4, BP-3, BP // adds first two arguments and stores the result in the third

Stack Frames (cont) foo’s epilogue cleans up the stack and returns control to the caller: –Caller’s (main’s) bp is placed back into the bp register –The return address is placed into the ip (instruction pointer) register –The stack pointer is decremented to remove the callee’s frame from the stack Stack main Stack frame

A Buffer Overflow int foo(char *s) /* subroutine “foo” */ { char buffer[10]; /* local variable*/ strcpy(buffer,s); } int main() /* main program */ { char name[]=”ABCDEFGHIJKL”; foo(name); /* call to subroutine “foo” */ }

A Buffer Overflow (cont) foo’s stack frame after prologue: stack SP buffer[0] BP buffer[1] buffer[2] buffer[3] buffer[4] buffer[5] buffer[6] buffer[7] buffer[8] buffer[9] main’s bp return address s

A Buffer Overflow (cont) Stack after execution of foo (but before the epilogue): stack SP A BP B C D E F G H I J K L s

A Buffer Overflow (cont) The string overflowed foo’s buffer: –Overwrote main’s bp –Overwrote the return address with ‘L’ = 89 (ASCII) When foo finishes control will be transferred to the instruction at address 89 –Error The Morris worm sent a specially crafted 243-byte string to the finger daemon: –Overflowed a buffer and overwrote the return address –The fingerd executed the /bin/sh program which executed the grappling hook code

Attack Strategy #3: Exploiting rsh rsh = “remote shell” –Allows users to execute commands on a remote host from a machine that the remote host trusts /etc/hosts.equiv.rhosts The worm used rsh to run the grappling hook code on remote computers that trusted an infected machine

Attack Strategy #4: Exploiting rexec rexec = remote execution –Protocol that enables users to execute commands remotely Must specify: –A host –A valid username and password for that host The worm attempted to crack passwords on each computer that it infected so that it could use rexec to infect other hosts –No password –The username –The username appended to itself –The user’s last name or nickname –The user’s last name reversed –Dictionary attack using 432-word dictionary carried with the worm –Dictionary attack using ~25,000 words in /etc/dict/words

Operation of the Worm Performed many actions to try to camouflage its activity: –Changed its process name to sh –Erased its argument list after processing it –Deleted its executable from the filesystem once it was running –Various steps to make sure that a core file would not be generated –Spent most time sleeping –Forked every three minutes, parent process exited and the child continued Changed the worm’s process identification number (pid) often Prevent the worm from accumulating too much CPU time –All constant strings inside the worm were XORed character-by-character with the value –Used a simple challenge and response mechanism to determine whether or not a machine it had just infected was already running a copy of the worm Immortal – one in seven times this check was not performed

Aftermath The worm spread quickly and infected a large percentage of the computers connected to the Internet Noticed within hours Took days for researchers to discover how the worm worked and how to stop it In 1990, Morris was convicted by a federal court of violating the Computer Crime and Abuse Act of 1986: –Three years of probation –Four hundred hours of community service –$10,050 fine