I5020 Computer Security
Session 4 Malware and Protection
Sébastien Combéfis Fall 2019
Session 4 Malware and Protection Sbastien Combfis Fall 2019 This - - PowerPoint PPT Presentation
I5020 Computer Security Session 4 Malware and Protection Sbastien Combfis Fall 2019 This work is licensed under a Creative Commons Attribution NonCommercial NoDerivatives 4.0 International License. Objectives Discovering the
Sébastien Combéfis Fall 2019
This work is licensed under a Creative Commons Attribution – NonCommercial – NoDerivatives 4.0 International License.
Definition, classification, threat and countermeasure
Propagation mechanism on several targets Different payload types and associated threats
Criterion for a good countermeasure and examples
3
Affects different programs (application, kernel, compiler...) “A program that is inserted into a system, usually covertly, with the intent of compromising the confidentiality, integrity, or avail- ability of the victim’s data, applications, or operating system or
5
Also present in servers, forged spam emails...
Depending on how they are propagating Depending on their action type or payload used once in place
6
Cybercrime directed towards business and political targets Persistent threats over an extended period of time
Advertising integrated in a software (popup, HTTP redirection...)
Set of tools generating malware automatically
Hacker tools to penetrate machines remotely
7
Mechanism that overrides a normal security check
Code that installs something on a machine being attacked
Code that exploits browser vulnerability to attack clients
Code specific to one (a set of) vulnerability(ies)
8
Generate large volume of data to attack a networked system
Capture keys pressed on a system
Sleeping code inserted in malware, waking up under conditions
Virus that uses macro/script, embedded in a document Enabled when the document is open and replicates in others
9
Software that can be send on heterogeneous platforms Does not need to be modified and same semantic execution
Set of tools for after introduction and getting root access
Sending a large volume of unsolicited emails
Collection/transmission of information about system activity
10
Software with useful function that hides malicious code
Malware that duplicates itself in other code
Software running independently and that can spread
Program on infected machine attacking other machines
11
First malwares were real artworks
Also known as crimeware (Zeus, for example)
Construction by composition, selection and deployment Exploitation of opportunity window after discovery
12
Motivated to show their skills to their peers
“Political” attackers, criminals and organised crime Organisation selling services to companies and nations
Attack kits sale, compromised host access/stolen information...
13
Application of intrusion technologies and malwares Rather business or political target type
Very rigorous selection of the target Persistent and stealthy intrusion efforts over a long period
Intellectual property theft, data on infrastructure Interference or physical interruption of the infrastructure
14
Need or no need to have a host program Possibility or not to replicate itself
Infection of existing executables with viruses Exploitation of software vulnerabilities by worms Drive-by-downloads to enable malware replication Social engineering types of attack
16
Affects application, utility, system program, bootcode...
Initially easy because no access control
Microsoft Word document or Adobe PDF, Excel spreadsheet...
17
Will change its content and therefore its behaviour
Considered as the first virus for MS-DOS on IBM PC Remplace the boot sector of a floppy disk with a virus copy
Countermeasures for existing viruses during creation of new ones
18
Infection vector defines how the virus propagate Trigger defines when the payload is activated Payload defines what the virus is doing
One or several, and sometimes variants
Exploit a host with all the permissions it holds
19
Sleeping does nothing because in idle mode Propagation makes copies (sometimes morphs) of itself Triggering activated to realise its function Execution of the function
Designed to take advantages of weaknesses
20
Virus must be executed first when the host is running
Possible to compress the executable file
t0
P′
1 infected version of P1
P2 is clean CV P′
1
P2
t1
P2 compressed in P′
2
P2 P′
2
t2
CV attached to P′
2
CV CV P′
1
P′
2
t3
P′
1 decompressed as P1
CV P′
1
P1
21
Boot sector infection and propagation at startup Infection of files considered as executable by the OS Infection of macros/scripts executed by an application Multi-party infection
Encrypted, stealthy, polymorphic or metamorphic viruses
22
Virus portion creates a random key to encrypt the remainder Random key is stored inside the virus Choice of a different key at each replication No constant bits pattern to observe
All the virus, including the payload is hidden Code mutation, compression, rootkit techniques
23
Allows the virus to create variants of itself Mutation engine itself is altered with each use The different versions are functionally equivalent
The virus completely rewrite itself at each iteration Can also change behaviour in addition to appearance
24
Exploit the possibility of having document with active content
Independent of the platform, only linked to the application Attack documents, more easily introduced Much more easily propagated, including by email Bypasses more easily file access control
25
Infected machine as launch base for attacks to other
Main goal is to gain access to new systems Broadcast over network connections or removable media
26
Send oneself by email/messenger, copy on removable media Execution, access o a remote file or login
Phases as for viruses: sleeping, propagation, triggering, execution
Host table, address book, buddy list...
27
I(t) number of individuals infected at time t S(t) number of individuals likely to be infected at t β the infection rate N = I(t) + S(t) the size of the population
28
Slow start, fast propagation and slow final phase
0.0 0.2 0.4 0.6 0.8 1.0
Time Fraction
Fraction of infected hosts Fraction of uninfected hosts
29
Common technique consists to go through the web browser
No active propagation, waiting for infected page visit
The attacker targets his/her ads to target websites
30
Or reveals his/her private personal information
Sending bulk unsolicited emails
90% of sent emails are SPAM
Hide malicious code inside a Trojan
Harmful, unwanted function when executed
Broadcast through apps download platforms
31
Spreading, hiding, updating...
Corruption of the system and its data Service theft to make the system a zombie Information theft like passwords Stealth when the malware hides its presence
33
But most of them do have a payload
Destruction of data on the infected system Displaying unwanted messages or content Infliction of actual damages
34
Or encryption of the content and ransom to retrieve
Rewriting of BIOS boot code, industrial control system
Alters or modifies data or files
35
The infected machine acts like a (ro)bot, zombie, drone...
Make it difficult to trace the creator of the bot
Setting up a collection of bots called botnet
36
Causes loss of services of a system for its users
Massive sending of unsolicited emails thanks to botnet
Clear information watching over compromised machine
Captures key pressed, better than sniffing if encrypted
37
Bot can download and execute files via HTTP/FTP
Fake website with ads and bots to click on them
Saturate IRC network of a victim as with DDoS attacks
Each bot can vote with its own IP address, legitimately
38
A worm propagates and activates itself Bot controlled by command-and-control (C&C) servers
Bots join an IRC channel to receive commands Communication channels hidden above HTTP Distributed control mechanism with peer-to-peer protocol
39
Communicated to attacker for fraudulent use
For banking, game and other similar applications
Configuration details and system documents, for example Used for reconnaissance or espionage
40
Attacks against this protection use keyloggers Using filters to obtain relevant information
History and browsing activity Redirect users on fake webpages Dynamic of exchanges between browser and serveur
41
Fake site completely controlled by the attacker Spam message invokes an emergency
Leverage user trust through social engineering
Search on target, citing personal information
42
Allow undercover access to the infected system
Getting around security and access control mechanism “Legal” backdoor for maintenance and test
Programs installed undercover to access OS Persistent/in memory, user/kernel mode, VM based
43
Low level presence and much more complicated detection
Changing the system call table or target
Rootkit completely hidden from the kernel code of the target OS
44
Initially called anti-virus mechanism
Do not let in and block possibility of changing the system
Politics, awareness, vulnerability and threat mitigation
46
Detection of the infection and location of the malware Identification of the type of the malware infecting the system Removing of all traces of the malware
As general as possible and react quickly to limit propagation Resistance to malware evasion techniques Minimising DoS countermeasure, maintaining normal operation Transparency and no modification os OS, application, hardware
47
Maximum access to all malware information and activity
Simple search for signatures and possibility of wildcards Probable malware found with heuristic and integrity check Activity trap actively scans system activities Full-feature protection combines several techniques
48
It must nevertheless be decrypted before execution
CPU emulator is a software virtual computer Scanner of known virus/malwares signatures Target code emulation control module
49
Real-time monitoring of program behaviour Identification of malicious actions and possible block
File opening, accessing, deleting, modifying Disk format or other unrecoverable operations System critical configuration modification Sending e-mails, instant messages... Initiation of a network communication
50
Rootkits are therefore very difficult to detect
Identify rootkit attack signature in incoming traffic Locate keylogger, interception of system calls
Being able to realise that the system has been modified
51
Higher level supervision in the company
Ingress monitor: network company/internet border Egress monitor: output of individual LANs
To place monitoring software
52
Harvesting data from a large amount of sources Both based on hosts than on perimeter sensors
Able to correlate and analyse data Return signatures and behaviours pattern
53
Faris Algosaibi, January 11, 2014, https://www.flickr.com/photos/siraf72/11885592144. Nancy Hoang, October 14, 2017, https://www.flickr.com/photos/nancyhoang/36982441854. NASA HQ PHOTO, August 5, 2011, https://www.flickr.com/photos/nasahqphoto/6012617390. Dane Erland, September 15, 2012, https://www.flickr.com/photos/lord_dane/7989074153.
54