Data Security and Encryption (CSE348) 1. Lecture # 27 2.

60
Data Security and Encryption (CSE348) 1

Transcript of Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Page 1: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Data Security and Encryption

(CSE348)

1

Page 2: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Lecture # 27

2

Page 3: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Review

• have considered:– problem of intrusion, behavior and techniques– intrusion detection (statistical & rule-based)– password management

3

Page 4: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Chapter 21 – Malicious Software

4

Page 5: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Viruses and Other Malicious Content

• Computer viruses have got a lot of publicity • One of a family of malicious software • Effects usually obvious • Have figured in news reports, fiction, movies• Getting more attention than deserve • Are a concern though

5

Page 6: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Malicious Software

6

Page 7: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Malicious Software• The terminology used for malicious software

presents problems

• Because of a lack of universal agreement on all terms and because of overlap

• Stallings Table 21.1, and this diagram from 3/e, provide a useful taxonomy

7

Page 8: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Malicious Software• It can be divided into two categories: those that

need a host program (being a program fragment eg virus)

• Those that are independent programs (eg worm)

• Alternatively one can also differentiate between those software threats that do not replicate (are activated by a trigger)

• Those that do (producing copies of themselves)

8

Page 9: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Backdoor or Trapdoor

• A backdoor, or trapdoor, is a secret entry point into a program that allows someone

• That is aware of it to gain access without going through the usual security access procedures

• Have been used legitimately for many years to debug and test programs

9

Page 10: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Backdoor or Trapdoor

• But become a threat when left in production programs, allowing intruders to gain unauthorized access

• It is difficult to implement operating system controls for backdoors

• Security measures must focus on the program development and software update activities

10

Page 11: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Backdoor or Trapdoor

• Secret entry point into a program

• Allows those who know access bypassing usual security procedures

• Have been commonly used by developers

11

Page 12: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Backdoor or Trapdoor

• A threat when left in production programs allowing exploited by attackers

• Very hard to block in O/S

• Requires good s/w development & update

12

Page 13: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Logic Bomb

• One of oldest types of malicious software• Code embedded in legitimate program• Activated when specified conditions met– eg presence/absence of some file– particular date/time– particular user

• When triggered typically damage system– modify/delete files/disks, halt machine, etc

13

Page 14: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Trojan Horse

• Program with hidden side-effects • Which is usually superficially attractive– eg game, s/w upgrade etc

• When run performs some additional tasks– allows attacker to indirectly gain access they do not have

directly• Often used to propagate a virus/worm or install a

backdoor• or simply to destroy data

14

Page 15: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Mobile Code• Mobile code refers to programs (e.g., script, macro,

or other portable instruction)

• That can be shipped unchanged to a heterogeneous collection of platforms and execute with identical semantics

• The term also applies to situations involving a large homogeneous collection of platforms (e.g., Microsoft Windows)

15

Page 16: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Mobile Code• Mobile code is transmitted from a remote system to

a local system

• And then executed on the local system without the user’s explicit instruction

• Mobile code often acts as a mechanism for a virus, worm, or Trojan horse to be transmitted to the user’s workstation

16

Page 17: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Mobile Code• Mobile code is transmitted from a remote system to

a local system

• And then executed on the local system without the user’s explicit instruction

• Mobile code often acts as a mechanism for a virus, worm, or Trojan horse to be transmitted to the user’s workstation

17

Page 18: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Mobile Code• In other cases, mobile code takes advantage of

vulnerabilities to perform its own exploits

• Such as unauthorized data access or root compromise

18

Page 19: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Mobile Code• Popular vehicles for mobile code include Java

applets, ActiveX, JavaScript, and VBScript

• The most common ways of using mobile code for malicious operations on local system are

• Cross-site scripting, interactive and dynamic Web sites, e-mail attachments, and downloads from untrusted sites or of untrusted software

19

Page 20: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Mobile Code• Program/script/macro that runs unchanged– on heterogeneous collection of platforms– on large homogeneous collection (Windows)

• Transmitted from remote system to local system & then executed on local system

• Often to inject virus, worm, or Trojan horse• or to perform own exploits– unauthorized data access, root compromise

20

Page 21: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Multiple-Threat Malware• Malware may operate in multiple ways

• Multipartite virus infects in multiple ways– eg. multiple file types

21

Page 22: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Multiple-Threat Malware• Blended attack uses multiple methods of infection or

transmission– to maximize speed of infection and severity– may include multiple types of malware– eg. Nimda has worm, virus, mobile code– can also use IM & P2P

22

Page 23: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Viruses

• A virus is a piece of software that can "infect" other programs by modifying them

• The modification includes a copy of the virus program

• Which can then go on to infect other programs

• A virus can do anything that other programs do

23

Page 24: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Viruses• The difference is that a virus attaches itself to

another program and executes secretly when the host program is run

• Once a virus is executing, it can perform any function, such as erasing files and programs

• Most viruses carry out their work in a manner that is specific to a particular operating system and, in some cases, specific to a particular hardware platform

24

Page 25: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Viruses• Thus, they are designed to take advantage of the

details and weaknesses of particular systems

• During its lifetime, a typical virus goes through the following four phases:

• Dormant phase: The virus is idle. The virus will eventually be activated by some event, such as a date, the presence of another program or file, or the capacity of the disk exceeding some limit

• Not all viruses have this stage25

Page 26: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Viruses• Propagation phase: The virus places an identical

copy of itself into other programs or into certain system areas on the disk

• Each infected program will now contain a clone of the virus, which will itself enter a propagation phase

26

Page 27: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Viruses• Triggering phase: The virus is activated to perform

the function for which it was intended

• As with the dormant phase, the triggering phase can be caused by a variety of system events

• Including a count of the number of times that this copy of the virus has made copies of itself

27

Page 28: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Viruses• Execution phase: The function is performed, which

may be harmless

• e.g. a message on the screen, or damaging

• e.g. the destruction of programs and data files

28

Page 29: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Viruses• Piece of software that infects programs– modifying them to include a copy of the virus– so it executes secretly when host program is run

• Specific to operating system and hardware– taking advantage of their details and weaknesses

29

Page 30: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Viruses• A typical virus goes through phases of:– dormant– propagation– triggering– execution

30

Page 31: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Virus Structure• Components:– infection mechanism - enables replication– trigger - event that makes payload activate– payload - what it does, malicious or benign

31

Page 32: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Virus Structure• Prepended / postpended / embedded

• When infected program invoked, executes virus code then original program code

• Can block initial infection (difficult)

• or propogation (with access controls)

32

Page 33: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Virus Structure

33

Page 34: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Compression Virus

34

Page 35: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Virus Classification

• There has been a continuous arms race between virus writers and writers of antivirus software since viruses first appeared

• As effective countermeasures have been developed for existing types of viruses, new types have been developed

• A virus classification by target includes the following categories:

35

Page 36: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Virus Classification

• Boot sector infector: Infects a master boot record or boot record and spreads when a system is booted from the disk containing the virus

• File infector: Infects files that operating system or shell consider to be executable

• Macro virus: Infects files with macro code that is interpreted by an application

36

Page 37: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Virus Classification

• A virus classification by concealment strategy includes the following categories:

• Encrypted virus: the virus creates a random encryption key, stored with the virus, and encrypts the remainder of the virus

• When an infected program is invoked, the virus uses the stored random key to decrypt the virus

37

Page 38: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Virus Classification

• When the virus replicates, a different random key is selected

• Stealth virus: A form of virus explicitly designed to hide itself from detection by antivirus software

• Thus, the entire virus, not just a payload is hidden

38

Page 39: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Virus Classification

• Polymorphic virus: A virus that mutates with every infection, making detection by the “signature” of the virus impossible

39

Page 40: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Virus Classification

• Metamorphic virus: As with a polymorphic virus ,a metamorphic virus mutates with every infection

• The difference is that a metamorphic virus rewrites itself completely at each iteration, increasing the difficulty of detection

• Metamorphic viruses may change their behavior as well as their appearance

40

Page 41: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Virus Classification

• boot sector• file infector• macro virus• encrypted virus• stealth virus• polymorphic virus• metamorphic virus

41

Page 42: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Macro Virus

• Became very common in mid-1990s since– platform independent– infect documents– easily spread

• Exploit macro capability of office apps– executable program embedded in office doc– often a form of Basic

• More recent releases include protection• Recognized by many anti-virus programs

42

Page 43: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

E-Mail Viruses• More recent development• e.g. Melissa– exploits MS Word macro in attached doc– if attachment opened, macro activates– sends email to all on users address list– and does local damage

• Then saw versions triggered reading email• Hence much faster propagation

43

Page 44: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Virus Countermeasures

• Prevention - ideal solution but difficult

• Realistically need:– detection– identification– removal

• If detect but can’t identify or remove, must discard and replace infected program

44

Page 45: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Anti-Virus Evolution

• Virus & antivirus tech have both evolved• Early viruses simple code, easily removed• As become more complex, so must the

countermeasures• Generations– first - signature scanners– second - heuristics– third - identify actions– fourth - combination packages

45

Page 46: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Generic Decryption• Runs executable files through GD scanner:– CPU emulator to interpret instructions– virus scanner to check known virus signatures– emulation control module to manage process

• Lets virus decrypt itself in interpreter• Periodically scan for virus signatures• Issue is long to interpret and scan– tradeoff chance of detection vs time delay

46

Page 47: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Digital Immune System

47

Page 48: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Behavior-Blocking Software

48

Page 49: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Worms• Replicating program that propagates over net

– using email, remote exec, remote login

• Has phases like a virus:– dormant, propagation, triggering, execution– propagation phase: searches for other systems, connects to it, copies

self to it and runs

• May disguise itself as a system process

• Concept seen in Brunner’s “Shockwave Rider”

• Implemented by Xerox Palo Alto labs in 1980’s

49

Page 50: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Morris Worm

• One of best know worms• Released by Robert Morris in 1988• Various attacks on UNIX systems– cracking password file to use login/password to

logon to other systems– exploiting a bug in the finger protocol– exploiting a bug in sendmail

• If succeed have remote shell access– sent bootstrap program to copy worm over

50

Page 51: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Recent Worm Attacks• Code Red– July 2001 exploiting MS IIS bug– probes random IP address, does DDoS attack

• Code Red II variant includes backdoor• SQL Slammer– early 2003, attacks MS SQL Server

• Mydoom– mass-mailing e-mail worm that appeared in 2004– installed remote access backdoor in infected systems

• Warezov family of worms– scan for e-mail addresses, send in attachment

51

Page 52: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Worm Technology

• multiplatform• multi-exploit• ultrafast spreading• polymorphic• metamorphic• transport vehicles• zero-day exploit

52

Page 53: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Mobile Phone Worms

• First appeared on mobile phones in 2004– target smartphone which can install s/w

• They communicate via Bluetooth or MMS• To disable phone, delete data on phone, or send

premium-priced messages• CommWarrior, launched in 2005– replicates using Bluetooth to nearby phones– and via MMS using address-book numbers

53

Page 54: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Worm Countermeasures• Overlaps with anti-virus techniques• Once worm on system A/V can detect• Worms also cause significant net activity• Worm defense approaches include:– signature-based worm scan filtering– filter-based worm containment– payload-classification-based worm containment– threshold random walk scan detection– rate limiting and rate halting

54

Page 55: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Proactive Worm Containment

55

Page 56: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Network Based Worm Defense

56

Page 57: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Distributed Denial of Service Attacks (DDoS)

• Distributed Denial of Service (DDoS) attacks form a significant security threat

• Making networked systems unavailable• By flooding with useless traffic• Using large numbers of “zombies” • Growing sophistication of attacks• Defense technologies struggling to cope

57

Page 58: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Constructing an Attack Network

• Must infect large number of zombies• Needs:

1. software to implement the DDoS attack2. an unpatched vulnerability on many systems3. scanning strategy to find vulnerable systems• random, hit-list, topological, local subnet

58

Page 59: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

DDoS Countermeasures

• Three broad lines of defense:1. attack prevention & preemption (before)2. attack detection & filtering (during)3. attack source traceback & ident (after)

• Huge range of attack possibilities

• Hence evolving countermeasures

59

Page 60: Data Security and Encryption (CSE348) 1. Lecture # 27 2.

Summary

• have considered:– various malicious programs– trapdoor, logic bomb, trojan horse, zombie– viruses– worms– distributed denial of service attacks

60