CPSC 253: Lecture 9-10 Malware, Viruses, and Worms

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/62

encourage image

There's no tags or description

Looks like no tags are added yet.

63 Terms

1
New cards

Mobile Malcode

  • Malicious programs that spread from machine to machine without the consent of the owners/operators/users

  • Strains include:

    • Viruses

    • Worms

    • Compromised auto-updates


2
New cards

Trapdoors/Backdoors

  • Secret entry point into a program

  • Allows those who know access bypassing usual security procedures, e.g., authentications

  • Have been commonly used by developers

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

  • Very hard to block in O/S

  • Requires good s/w development & update


3
New cards

What types of malicious programs need a host?

  • Trapdoors

  • Logic Bombs

  • Trojan horses

  • Viruses(can replicate)


4
New cards

Logic Bomb

  • One of oldest types of malicious software

  • Code embedded in legitimate program

  • Activated when specified conditions met

  • When triggered, typically damages system

    • Modify/delete files/disk


5
New cards

Viruses

  • A piece of code that inserts itself into a host, including operating systems, to propagate. It cannot run independently. It requires that its host program be run to activate it.

  • Only spread when contaminated files are moved from machine to machine

  • Mature defenses available


6
New cards

Executing viruses

  • Searches for valid target files

    • Usually, executable files

    • Often only infect uninfected files

  • Insert a copy into targeted files

  • When the target is executed, the virus starts running


7
New cards

Key Malware Statistics

  • 560,000 new pieces of malware are detected every day.

  • There are now more than 1 billion malware programs out there.

  • Every minute, four companies fall victim to ransomware attacks.

  • Trojans account for 58% of all computer malware.


8
New cards

Virus phases

  1. Dormant – waiting on trigger event

  2. Propagation – replicating to programs/disks

  3. Triggering – by event to execute payload

  4. Execution – of payload


9
New cards

Details of virus operations

  • Machine/os specific

  • Based on Instruction set architecture(ISA)

  • Opcode | Operand

    • Opcode is stored locally in a register→ memory


10
New cards

Primary components of a Virus

  • Propagation mechanism

  • Payload


11
New cards

Propagation

  • Method by which the virus spreads itself.

  • Old days: single PC, transferred to other hosts by ways of floppy diskettes or disks.

  • Nowadays: Internet.


12
New cards
<p>Virus Compression</p>

Virus Compression

  • CV is the virus

  • t1 shows proprogation


13
New cards

Virus Infectables - Macros

  • Usually executable files: .com, .exe, .bat

  • Macro code attached to some data file

  • Interpreted by program using file

    • E.g., Word/Excel macros

    • Especially using auto command & command macros

  • Code is now platform independent

    • Is a major source of new viral infections

  • Blur distinction between data and program files

  • Classic trade-off: “ease of use” vs “security”

  • Have improved security in Word etc.

  • Are no longer dominant virus threat


14
New cards

System sector viruses

  • Infect control sectors on a disk

    • DOS boot sectors

    • Partition (MBR) sectors

  • Spread easily via disk transfers and infections


15
New cards

Companion viruses

  • Create a .com files for each .exe files

  • DOS runs COM files before EXE files

  • Relatively easy to find and eliminate


16
New cards

Cluster viruses

  • Change the DOS directory info so that directory entries point to the virus code instead of the real program

  • Even though every program on the disk may be "infected“, there is only one copy of the virus on the disk


17
New cards

Polymorphic viruses

  • Change with each infection

    • Executables virus code changing (macros: var name, line spacing, etc.)

    • Control flow permutations (rearrange code with goto’s)

  • Attempt to defeat scanners


18
New cards

Virus writing tool kits

  • Current ones create viruses that can be detected easily with existing scanner technology


19
New cards

Virus Detection/Evasion

  • Look for changes in size

  • Check time stamp on file

  • Look for bad behavior/do bad thing insidiously

    • False alarm prone

  • Look for patterns (byte streams) in virus code that are unique

  • Look for changes in file check sum

  • Compression of virus and target code

  • Modify time stamp to original

  • Change patterns – polymorphism

  • Rearrange data in the file

  • Disable anti-virus programs


20
New cards

Scanning

  • Virus Detection

  • Depend on prior knowledge of a virus

  • Check programs before execution

  • Need to be regularly updated


21
New cards

Integrity checking

  • Read entire disk and record integrity data that acts as a signature for the files and system sectors(parity check)

  • Use cryptographic computation technique instead of simple checksum


22
New cards

Interception

  • Monitoring for system-level routines that perform destructive acts

  • Good for detecting logic bomb and Trojan horse

  • Cannot depend entirely upon behavior monitors as they are easily bypassed


23
New cards

Virus Recovery

  • Extricate the virus from the infected file to leave the original behind

  • Remove the redirection(cluster) to the virus code

  • Recover the file from backup

  • Delete the files and move on with life


24
New cards

Apple’s 3 wild viruses

  • 1981

  • Boot sector(where necessary files and drivers are contained to start the operating system) viruses

  • Floppies of that time had the Disk Operating System (DOS) on them by default


25
New cards

Pakistani Brain Virus(1986)

  • Written by Pakistani brothers to protect their copyright

  • Claim: infect only machines that had an unlicensed copy of their software

  • Boot sector, memory resident

  • Printed


26
New cards

Chernobyl Virus(1998)

  • Destructive virus designed to inflict harm

    • Flash BIOS: would cause permanent hardware damage to vulnerable motherboards

    • Also overwrote first 2K sectors of each disk

  • Typically resulted in a loss of data and made it unbootable

  • Previously believed that being benign was necessary for virus longevity

  • This provided evidence to the contrary


27
New cards

Melissa(1999)

  • Microsoft Word 97 Macro virus

  • Worm

  • Targeted the first 50 entries in Outlook’s address book

  • Adjusted subject “Important messages from ______”, ILOVEYOU, Homepage

  • Points to attachment as a document requested

    • Contains a list of porn sites

  • Macro security was greatly increased with Melissa


28
New cards

Virus Detection

  • Combining scanning, integrity checking, and interception can detect most viruses


29
New cards
<p>What is this image showing?</p>

What is this image showing?

Structure of a Virus

30
New cards

Virus Statistics

  • 1988: Less than 10 known viruses

  • 1990: New virus found every day

  • 1993: 10-30 new viruses per week

  • 1999: 45,000 viruses and variants


31
New cards

Possible activation conditions for logic bombs

  • Presence/absence of some file

  • Particular date/time

  • Particular user

  • Particular series of keystrokes


32
New cards

Trojan Horse

  • Programs that appear to have one function but actually perform another.

  • Modern Variant: resembles a program that the user wishes to run - usually superficially attractive

    • E.g., 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


33
New cards

Zombie

  • Program which secretly takes over another networked computer

  • Then uses it to indirectly launch attacks

  • Often used to launch distributed denial of service (DDoS) attacks

  • Exploits known flaws in network systems


34
New cards

Worms

  • Autonomous, active code that can replicate to remote hosts without any triggering

    • Replicating but not infecting programs

  • Because they propagate autonomously, they can spread much more quickly than viruses!

  • Speed and general lack of user interaction make them the most significant threats


35
New cards

Payload

Executable containing malicious code in malware

36
New cards

Port Scanning

  • Target discovery method

  • Sequential: working through an address block

  • Random


37
New cards

Target lists

  • Target discovery method

  • Externally generated through Meta servers

  • Internal target list

  • Passive worms


38
New cards

I/O modules

  • Disk

  • Network controller



39
New cards

Metaserver Worms

  • A server for information about other servers

  • Games: Use as a matchmaker for local servers

  • Google: Query google to find web servers

  • Windows Active Directory: Maintains the "Network Neighborhood"


40
New cards

Query types

  • Select

  • Action


41
New cards

Self-Carried

Worm transmits itself as a part of the infection

42
New cards

What types of malicious programs are independent(no host program)?

  • Worms

  • Zombies


43
New cards
<p>How do worms use metaservers?</p>

How do worms use metaservers?

  • Construct a query to find new targets

  • Each new victim also constructs queries

  • Creates a divide-and-conquer infection strategy


44
New cards

How fast are metaserver worms?

  • Game Metaserver: Use to attack a small to large population

    • ~1 minute to infect all targets

  • Google: Use to enhance a scanning type of this program

    • Each of this program type conducts initial queries to find URLs


<ul><li><p>Game Metaserver: Use to attack a small to large population</p><ul><li><p>~1 minute to infect all targets</p></li></ul></li><li><p>Google: Use to enhance a scanning type of this program</p><ul><li><p>Each of this program type conducts initial queries to find URLs</p></li></ul></li></ul><p></p>
45
New cards

Internal Target Lists: Topological Information

  • Look for local info to find new targets

    • URLs on disks and caches

    • Mail addresses

    • .ssh/known hosts

  • Ubiquitous in mail worms

    • New ones are more aggressive with finding new addresses

  • Basis of the Morris worm(1988)

    • Address space was too sparse for scanning to work


46
New cards

How fast are topological worms?

  • Depends on the topology G = (V, E)

    • Vulnerable machines are vertices, edges are local information

    • Time to infect is a function of the shortest paths from the initial point of infection


47
New cards

Passive Worms

  • Waits for info about other targets

    • E.g., CRclean, Nimda

  • Speed depends on normal communication traffic, highly variable

  • High Stealth

    • Have to detect the act of infection, not target selection


48
New cards

Second Channel

E.g.: A blaster worm using RPC(Remote procedure call) to exploit but use TFTP(Trivial file transfer protocol) to download the whole virus body

49
New cards

Types of worm activation

  • Human

  • Human activity-based

  • Scheduled process

  • Self


50
New cards

Human Activation

  • Needs social engineering, especially for email worms

    • E.g. Melissa – “Attached is an important message for you!”

    • E.g. Iloveyou – “Open this message to see who loves you!”


51
New cards

Human activity based activation

E.g. logging in, rebooting (Nimda’s secondary propagation)

52
New cards

Scheduled process activation

  • E.g. updates, backup etc.


53
New cards

Self-activiation

  • E.g. Code Red exploit the web servers


54
New cards
<p>What is this image showing?</p>

What is this image showing?

Klez worm

55
New cards

Attacker motivations

  • Experimental Curiosity, e.g., I Love You worm

  • Pride and Power

  • Commercial Advantage

  • Extortion and Criminal Gain

  • Terrorism

  • Cyber Warfare


56
New cards

Morris Worm

  • 1988

  • Strategy: Topological

  • Victims: 6000

  • First major autonomous worm. Attacked multiple vulnerabilities.


57
New cards

Code Red worm

  • 2001

  • Strategy: Scanning

  • Victims: 300000

  • First recent "fast" worm, 2nd wave infected 360,000 servers in 14 hours


58
New cards

CRClean Worm

  • 2001

  • Strategy: Passive

  • Victims: None

  • Unreleased Anti-code-red worm


59
New cards

Nimda Worm

  • 2001

  • Strategy: Scanning IIS, Code Red 2 backdoor, etc

  • Victims: 200000

  • Local subnet scanning mixing techniques


60
New cards

Scalper worm

  • 2002

  • Strategy: Scanning

  • Victims: 10000

  • Released 10 days after vulnerability revealed


61
New cards

Slammer Worm

  • 2003

  • Strategy: Scanning

  • Victims: 75000

  • Spread worldwide in 10 minutes


<ul><li><p>2003</p></li><li><p>Strategy: Scanning</p></li><li><p>Victims: 75000</p></li><li><p>Spread worldwide in 10 minutes</p></li></ul><p></p>
62
New cards

How fast was the slammer worm?

  • Infected ~75,000 machines in 10 minutes

  • Full scanning rate in ~3 minutes

    • >55 Million IPs/s

  • Initial doubling rate was about every 8.5 seconds

    • Local saturations occur in <1 minute


<ul><li><p>Infected ~75,000 machines in 10 minutes</p></li><li><p>Full scanning rate in ~3 minutes</p><ul><li><p>&gt;55 Million IPs/s</p></li></ul></li><li><p>Initial doubling rate was about every 8.5 seconds</p><ul><li><p>Local saturations occur in &lt;1 minute</p></li></ul></li></ul><p></p>
63
New cards