Malicious Logic What is malicious logic Defenses

Slides:



Advertisements
Similar presentations
Computer Science CSC 474Dr. Peng Ning1 CSC 474 Information Systems Security Topic 5.1 Malicious Logic.
Advertisements

Computer Viruses and Worms* *Referred to slides by Dragan Lojpur, Zhu Fang at Florida State University.
 Application software consists of programs designed to make users more productive and/or assist with personal tasks.  Growth of internet simplified.
Compiled by : S. Agarwal, Lecturer & Systems Incharge, St. Xavier's Computer Centre, Kolkata : Compiled By : S. Agarwal, S. Agarwal, Lecturer.
Lecturer: Fadwa Tlaelan
1 Anti Virus vs virus System i-Specific Anti-Virus Product Ali ameen al said.
Chapter 3 (Part 1) Network Security
November 1, 2004Introduction to Computer Security ©2004 Matt Bishop Slide #19-1 Chapter 19: Malicious Logic What is malicious logic Types of malicious.
CS526: Information Security Chris Clifton November 25, 2003 Malicious Code.
Unit 18 Data Security 1.
November 1, 2004Introduction to Computer Security ©2004 Matt Bishop Slide #9-1 Chapter 19: Malicious Logic What is malicious logic Types of malicious logic.
Introduction to Malware Dan Fleck CS469 Security Engineering Reference: Angelos Stavrou’s ISA564 and Computer Security by Bishop Coming up: What is Malicious.
Malicious Logic What is malicious logic Types of malicious logic Defenses Computer Security: Art and Science © Matt Bishop.
Fall 2008CS 334: Computer SecuritySlide #1 Malicious Logic Trojan Horses Viruses Worms.
________________ CS3235, Nov 2002 Viruses Adapted from Pfleeger[Chap 5]. A virus is a program [fragment] that can pass on malicious code [usually itself]
Chapter 14 Computer Security Threats Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Security: Attacks. 2 Trojan Horse Malicious program disguised as an innocent one –Could modify/delete user’s file, send important info to cracker, etc.
1 Pertemuan 05 Malicious Software Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
June 1, 2004Computer Security: Art and Science © Matt Bishop Slide #22-1 Chapter 22: Malicious Logic What is malicious logic Types of malicious.
Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE USC CSci530 Computer Security Systems Lecture.
1 Computer Viruses (and other “Malicious Programs) Computer “Viruses” and related programs have the ability to replicate themselves on an ever increasing.
1 Malicious Logic CSSE 490 Computer Security Mark Ardis, Rose-Hulman Institute March 25, 2004.
Guide to Operating System Security Chapter 2 Viruses, Worms, and Malicious Software.
Henric Johnson1 Chapter 10 Malicious Software Henric Johnson Blekinge Institute of Technology, Sweden
Video Following is a video of what can happen if you don’t update your security settings! security.
1 Chap 10 Malicious Software. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on.
Chapter 15: Security (Part 1). The Security Problem Security must consider external environment of the system, and protect the system resources Intruders.
Computer Viruses Preetha Annamalai Niranjan Potnis.
D. Beecroft Fremont High School VIRUSES.
Virus and Antivirus Team members: - Muzaffar Malik - Kiran Karki.
Lecture 14 Overview. Program Flaws Taxonomy of flaws: – how (genesis) – when (time) – where (location) the flaw was introduced into the system 2 CS 450/650.
VIRUSES - Janhavi Naik. Overview Structure Classification Categories.
Structure Classifications &
CHAPTER 14 Viruses, Trojan Horses and Worms. INTRODUCTION Viruses, Trojan Horses and worm are malicious programs that can cause damage to information.
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Malware.
1 Higher Computing Topic 8: Supporting Software Updated
1 Chap 10 Virus. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on an ever increasing.
Viruses, Trojans and Worms The commonest computer threats are viruses. Virus A virus is a computer program which changes the way in which the computer.
Compiled & Designed by : Presentation Point Idea by: SAAD(CEO Future IT) © 2011 Presentation Point Compiled By & Designed : Presentation Point(
Everything you wanted to know about Computer Viruses.
Malicious Code By Diana Peng. What is Malicious Code? Unanticipated or undesired effects in programs/program parts, caused by an agent with damaging intentions.
Chapter 10 Malicious software. Viruses and ” Malicious Programs Computer “ Viruses ” and related programs have the ability to replicate themselves on.
Types of Electronic Infection
30.1 Lecture 30 Security II Based on Silberschatz & Galvin’s slides And Stallings’ slides.
For any query mail to or BITS Pilani Lecture # 1.
Computer Viruses and Worms By: Monika Gupta Monika Gupta.
Security CS Introduction to Operating Systems.
Malicious Logic and Defenses. Malicious Logic Trojan Horse – A Trojan horse is a program with an overt (documented or known) effect and covert (undocumented.
Computer Virus: “A program that can infect other programs by modifying them to include a version of itself” -- Dr Fred Cohen Compare to an office clerk.
VIRUS.
n Just as a human virus is passed from person from person, a computer virus is passed from computer to computer. n A virus can be attached to any file.
Computer Systems Viruses. Virus A virus is a program which can destroy or cause damage to data stored on a computer. It’s a program that must be run in.
Computer virus Speaker : 蔡尚倫.  Introduction  Infection target  Infection techniques Outline.
Computer Security Threats CLICKTECHSOLUTION.COM. Computer Security Confidentiality –Data confidentiality –Privacy Integrity –Data integrity –System integrity.
CHAPTER 2 Laws of Security. Introduction Laws of security enable user make the judgment about the security of a system. Some of the “laws” are not really.
14.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Protection.
Types of Computer Malware. The first macro virus was written for Microsoft Word and was discovered in August Today, there are thousands of macro.
Page 1 Viruses. Page 2 What Is a Virus A virus is basically a computer program that has been written to perform a specific set of tasks. Unfortunately,
Malicious Programs (1) Viruses have the ability to replicate themselves Other Malicious programs may be installed by hand on a single machine. They may.
COMPUTER VIRUSES ….! Presented by: BSCS-I Maheen Zofishan Saba Naz Numan Sheikh Javaria Munawar Aisha Fatima.
Virus Infections By: Lindsay Bowser. Introduction b What is a “virus”? b Brief history of viruses b Different types of infections b How they spread b.
Computer Viruses Author: Alyse Allen.
Chapter 19. Malicious Logic
Trojan Horses Viruses Worms
Chapter 22: Malicious Logic
Chap 10 Malicious Software.
UNIT 18 Data Security 1.
Chapter 22: Malicious Logic
Chap 10 Malicious Software.
Malicious Program and Protection
Presentation transcript:

Malicious Logic What is malicious logic Defenses Computer Security: Art and Science ©2002-2004 Matt Bishop

Malicious Logic Set of instructions that cause site security policy to be violated Computer Security: Art and Science ©2002-2004 Matt Bishop

Example Shell script on a UNIX system: cp /bin/sh /tmp/.xyzzy chmod u+s,o+x /tmp/.xyzzy rm ./ls ls $* Place in program called “ls” and trick someone into executing it You now have a setuid-to-them shell! UNIX assigns a user-id to each user. The user-id ranges from 0 to 65,535. Each login name corresponds to a single user-id. More than one login name could be mapped to the same user-id. A special class of programs called setuid program create processes that have effective uids of the owner of the program, rather than the user process that initiates it. So, rights are that of the owner. chmod u+s - set the setuid bit O+x – for owner + execute permissions Together it means, change the permission to owners’s permission and allow owner to execute it. If the root runs this program, then you now have a shell calle /tmp/,xyzzy that has root access. So, you can later login and run that shell with root access. Computer Security: Art and Science ©2002-2004 Matt Bishop

Trojan Horse Program with an overt purpose (known to user) and a covert purpose (unknown to user) Often called a Trojan Named by Dan Edwards in Anderson Report Example: previous script is Trojan horse Overt purpose: list files in directory Covert purpose: create setuid shell Computer Security: Art and Science ©2002-2004 Matt Bishop

Violation of security policy It is a violation if a user is tricked into running the modified “ls” script. It is not a violation if a user accidentally typed in the first two statements. Therefore, it is difficult to detect intent and hence whether it is malicious or not. Computer Security: Art and Science ©2002-2004 Matt Bishop

Example: NetBus Designed for Windows NT system Victim uploads and installs this Usually disguised as a game program, or in one Acts as a server, accepting and executing commands for remote administrator This includes intercepting keystrokes and mouse motions and sending them to attacker Also allows attacker to upload, download files Patch.exe, SysEdit.exe (server name) Modifies system registry, so it starts automatically on system startup Back Orifice – smaller and can gain access and then download NetBus Use anti-virus software to detect and remove. NetBuster pretends to be NetBus. NetBus = NetPrank in Swedish. Computer Security: Art and Science ©2002-2004 Matt Bishop

Replicating Trojan Horse Trojan horse that makes copies of itself Also called propagating Trojan horse Early version of animal game used this to delete copies of itself Hard to detect 1976: Karger and Schell suggested modifying compiler to include Trojan horse that copied itself into specific programs including later version of the compiler 1980s: Thompson implements this Computer Security: Art and Science ©2002-2004 Matt Bishop

Thompson's Compiler Modify the compiler so that when it compiles login , login accepts the user's correct password or a fixed password (the same one for all users) Then modify the compiler again, so when it compiles a new version of the compiler, the extra code to do the first step is automatically inserted Recompile the compiler Delete the source containing the modification and put the undoctored source back The program in question was actually the preprocessor cpp(1), not the compiler proper (ccom). Question: how do you fix this? Your login source is right, and if you get suspicious and check your compiler source, it is too. You can even recompile both! Computer Security: Art and Science ©2002-2004 Matt Bishop

The Login Program user password login source correct compiler login executable logged in user password or Top part: giving the login program to the undoctored compiler gets you the correct login executable. Bottom part: giving the login program to the doctored compiler gets you a login program that accepts either the right password or the magic password. In both cases it is the same login source. magic password login source doctored compiler login executable logged in Computer Security: Art and Science ©2002-2004 Matt Bishop

The Compiler login source compiler source correct compiler compiler executable correct login executable Top part: giving the compiler program to the undoctored compiler gets you the correct compiler executable. Bottom part: giving the compiler program to the doctored compiler gets you a compiler program that adds the bogus code to the login program,. In both cases it is the same compiler source. login source compiler source doctored compiler compiler executable rigged login executable Computer Security: Art and Science ©2002-2004 Matt Bishop

Comments Great pains taken to ensure second version of compiler never released Finally deleted when a new compiler executable from a different system overwrote the doctored compiler The point: no amount of source-level verification or scrutiny will protect you from using untrusted code Also: having source code helps, but does not ensure you’re safe Computer Security: Art and Science ©2002-2004 Matt Bishop

Computer Virus Program that inserts itself into one or more files and performs some action Insertion phase is inserting itself into file Execution phase is performing some (possibly null) action Insertion phase must be present Need not always be executed Lehigh virus inserted itself into boot file only if boot file not infected Erased the disk if the counter was 4. Computer Security: Art and Science ©2002-2004 Matt Bishop

Pseudocode beginvirus: if spread-condition then begin for some set of target files do begin if target is not infected then begin determine where to place virus instructions copy instructions from beginvirus to endvirus into target alter target to execute added instructions end; perform some action(s) goto beginning of infected program endvirus: Computer Security: Art and Science ©2002-2004 Matt Bishop

Trojan Horse Or Not? Yes No Semantic, philosophical differences Overt action = infected program’s actions Covert action = virus’ actions (infect, execute) No Overt purpose = virus’ actions (infect, execute) Covert purpose = none Semantic, philosophical differences Defenses against Trojan horse also inhibit computer viruses Computer Security: Art and Science ©2002-2004 Matt Bishop

History of virus Programmers for Apple II wrote some Fred Cohen Not called viruses; very experimental Fred Cohen Graduate student at USC who described them Teacher (Adleman) named it “computer virus” Tested idea on UNIX systems and UNIVAC 1108 system Computer Security: Art and Science ©2002-2004 Matt Bishop

Cohen’s Experiments UNIX systems: goal was to get superuser privileges Max time 60m, min time 5m, average 30m Virus small, so no degrading of response time UNIVAC 1108 system: goal was to spread Mechanisms of systems that did not inhibit writing using mandatory access controls did little to prohibit virus propagation. Mandatory Access Control (MAC) system mechanism controls access to object, and individual cannot alter that access Rule-based access control Computer Security: Art and Science ©2002-2004 Matt Bishop

First Reports Brain (Pakistani) virus (1986) Written for IBM PCs Alters boot sectors of floppies, spreads to other floppies Slows down the floppy disk drive. Does not affect hard disk drives. Computer Security: Art and Science ©2002-2004 Matt Bishop

First Reports MacMag Peace virus (1987) Written for Macintosh Prints “universal message of peace” on March 2, 1988 and deletes itself 1st anniversary of Macintosh II introduction Computer Security: Art and Science ©2002-2004 Matt Bishop

More Reports Duff’s experiments (1987) Small virus placed on UNIX system, spread to 46 systems in 8 days Attached to a Bourne shell script Showed that viruses are not intrinsically machine-dependent Highland’s Lotus 1-2-3 virus (1989) Stored as a set of commands in a spreadsheet and loaded when spreadsheet opened Changed a value in a specific row, column and spread to other files Lotus 1-2-3 is a spreadsheet program from IBM. Computer Security: Art and Science ©2002-2004 Matt Bishop

Types of Viruses Boot sector infectors Executable infectors Multipartite viruses TSR viruses Stealth viruses Encrypted viruses Polymorphic viruses Macro viruses Computer Security: Art and Science ©2002-2004 Matt Bishop

Boot Sector Infectors A virus that inserts itself into the boot sector of a disk Section of disk containing code Executed when system first “sees” the disk Including at boot time …  Example: Brain virus Computer Security: Art and Science ©2002-2004 Matt Bishop

Executable Infectors A virus that infects executable programs Can infect either .EXE or .COM on PCs May prepend itself (as shown) or put itself anywhere, fixing up binary so it is executed at some point Computer Security: Art and Science ©2002-2004 Matt Bishop

Executable Infectors (con’t) Jerusalem (Israeli) virus Checks if system infected If not, set up to respond to requests to execute files Checks date If not 1987 or Friday 13th, set up to respond to clock interrupts and then run program Otherwise, set destructive flag; will delete, not infect, files Then: check all calls asking files to be executed Do nothing for COMND.COM Otherwise, infect or delete Error: doesn’t set signature when .EXE executes So .EXE files continually reinfected Computer Security: Art and Science ©2002-2004 Matt Bishop

Multipartite Viruses A virus that can infect either boot sectors or executables Typically, two parts One part boot sector infector Other part executable infector Computer Security: Art and Science ©2002-2004 Matt Bishop

TSR Viruses A virus that stays active in memory after the application (or bootstrapping, or disk mounting) is completed TSR is “Terminate and Stay Resident” Examples: Brain, Jerusalem viruses Stay in memory after program or disk mount is completed Computer Security: Art and Science ©2002-2004 Matt Bishop

Stealth Viruses A virus that conceals infection of files Example: IDF virus modifies DOS service interrupt handler as follows: Request for file length: return length of uninfected file Request to open file: temporarily disinfect file, and reinfect on closing Request to load file for execution: load infected file Compromises the FAT table, because it appends to executables. http://www.ciac.org/ciac/bulletins/a-29.shtml Israeli Defense Forces Name: 4096 virus (also known as the 4k, Stealth, IDF--Israel Defense Forces, 100 years, Century, and Frodo virus) Types: Two known versions (also see note 1 about Fish virus) Platform: MS-DOS computers running DOS 3.x or 4.x ; does not appear to infect files in DOS 2.x Damage: Can damage files by destructive cross-linking Symptoms: May slow system performance somewhat; may cause the system to crash/hang, or may create hard disk errors; may write "FRODO LIVES" on screen on or after September 22, 1990 (one variant only) Detection: VIRHUNT, RESSCAN, CodeSafe, Vi-Spy, IBM Scan, FPROT Eradication: VIRHUNT, CodeSafe, FPROT, and others (contact CIAC for information about these products) Computer Security: Art and Science ©2002-2004 Matt Bishop

Encrypted Viruses A virus that is enciphered except for a small deciphering routine Detecting virus by signature now much harder as most of virus is enciphered Computer Security: Art and Science ©2002-2004 Matt Bishop

Example (* Decryption code of the 1260 virus *) (* initialize the registers with the keys *) rA = k1; rB = k2; (* initialize rC with the virus; starts at sov, ends at eov *) rC = sov; (* the encipherment loop *) while (rC != eov) do begin (* encipher the byte of the message *) (*rC) = (*rC) xor rA xor rB; (* advance all the counters *) rC = rC + 1; rA = rA + 1; end Computer Security: Art and Science ©2002-2004 Matt Bishop

Polymorphic Viruses A virus that changes its form each time it inserts itself into another program Idea is to prevent signature detection by changing the “signature” or instructions used for deciphering routine At instruction level: substitute instructions At algorithm level: different algorithms to achieve the same purpose Toolkits to make these exist (Mutation Engine, Trident Polymorphic Engine) Computer Security: Art and Science ©2002-2004 Matt Bishop

Example These are different instructions (with different bit patterns) but have the same effect: add 0 to register subtract 0 from register xor 0 with register no-op Polymorphic virus would pick randomly from among these instructions Computer Security: Art and Science ©2002-2004 Matt Bishop

Macro Viruses A virus composed of a sequence of instructions that are interpreted rather than executed directly Can infect either executables (Duff’s shell virus) or data files (Highland’s Lotus 1-2-3 spreadsheet virus) Independent of machine architecture But their effects may be machine dependent Computer Security: Art and Science ©2002-2004 Matt Bishop

Example Melissa Infected Microsoft Word 97 and Word 98 documents Windows and Macintosh systems Invoked when program opens infected file Installs itself as “open” macro and copies itself into Normal template This way, infects any files that are opened in future Invokes mail program, sends itself to everyone in user’s address book Computer Security: Art and Science ©2002-2004 Matt Bishop