39
MALWARE 1

malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

MALWARE

1

Page 2: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Malware

• Software creato con il solo scopo di causare

danni più o meno gravi al computer su cui

viene eseguito

• Diffusione in continuo aumento• Diffusione in continuo aumento

• Anno 2008: 15 milioni di malware

– Numeri destinati ad aumentare

2

Page 3: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Categorie di malware

• Virus

• Worm

• Trojan Horse

• Spyware• Spyware

• Logicbombs

• Rootkit

• Backdoor

• …

3

Page 4: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Virus

• Tipo più conosciuto di malware

• Simile a un virus biologico

– Software auto-replicante che si “attacca” ad un altro

programmaprogramma

• Richiede l’intervento umano per entrare in azione

– Esecuzione o apertura di un file

4

Page 5: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Virus: metodi di infezione

• Virus Non-Resident, composto da due moduli

– Finder: cerca nuovi file da infettare

– Replication: richiamato dal Finder, ogni volta che viene trovato un file da infettareche viene trovato un file da infettare

• Virus Resident, composto solamente dal modulo Replication

– Il modulo viene caricato in memoria

– Viene eseguito ogni volta che si verificano determinate condizioni

• Es. apertura di un file

5

Page 6: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Virus: mezzi di trasmissione

• File binari (exe, com, elf, …)

• MBR (Master Boot Record)

• Script (Batch, VBScript, Shell script)

• Autorun script (autorun.inf)• Autorun script (autorun.inf)

• Documenti contenenti macro (doc, xls, …)

• Vulnerabilità XSS (cross-site scripting) delle

web application

• Bug dei programmi (buffer overflow, race

condition, …)6

Page 7: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Metodi per impedire

l’individuazione

• La data di ultima modifica nei file infettati rimane invariata

• La dimensione dei file infettati non aumenta (cavity virus)(cavity virus)– Utilizza aree vuote nei file eseguibili

• L’antivirus viene disattivato prima che riesca ad individuare l’infezione

• L’azione dell’antivirus viene intercettata, restituendo una versione non infetta dei file (stealth)

7

Page 8: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Metodi per impedire l’individuazione

• Il codice del virus viene modificato ad ogni

nuova infezione

– Virus polimorfi– Virus polimorfi

• Il codice del virus viene criptato e associato

ad un modulo di decriptazione

– La chiave utilizzata cambia ad ogni nuova

infezione

8

Page 9: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Worm

• Programma che si replica in maniera

autonoma

• Il primo worm venne creato anni prima

della comparsa dei virusdella comparsa dei virus

– Sfruttava un’imperfezione del comando UNIX

“finger” per causare un blocco totale ad

Internet

9

Page 10: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Worm• Utilizza la rete per spedire copie di sé stesso

ad altri computer

• Sfrutta le vulnerabilità dei sistemi per

ottenere l’accesso

• Non necessità di legarsi ad altri programmi• Non necessità di legarsi ad altri programmi

• Può essere progettato per la sola diffusione

oppure per compiere azioni all’interno dei

sistemi infetti

– Installazione di backdoor (Sobig, MyDoom, …)

10

Page 11: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Trojan Horse

• Permette al suo creatore di ottenere un facile accesso al sistema

• Si nasconde sotto forma di software o funzionalità di interesse per l’utentefunzionalità di interesse per l’utente

• L’accesso al sistema avviene con gli stessi privilegi dell’utente che ne ha eseguito l’installazione

– Nei sistemi Windows spesso è un utente amministratore

11

Page 12: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Trojan Horse• Richiede l’intervento di un hacker per

compiere delle azioni

– Uso della macchina come parte di una botnet

– Furto di informazioni

– Apertura di ulteriori falle– Apertura di ulteriori falle

– Download / upload di file

– Modifica o cancellazione di documenti

– Keylogging

– Registrazione delle azioni compiute dall’utente

– Crash del sistema

12

Page 13: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Trojan Horse: metodi di distribuzione

• Download di software

– Trojan incluso come componente nascosta di

un applicativo

• Website contenente codice eseguibile • Website contenente codice eseguibile

(ActiveX)

• Allegati delle Email

• Sfruttamento di bug delle applicazioni

(browser, lettori multimediali, instant

messaging, …)13

Page 14: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Spyware

• Raccoglie di nascosto informazioni sulle

abitudini degli utenti

– Siti visitati– Siti visitati

– Applicazioni utilizzate

– Keylogging

– …

14

Page 15: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Spyware

• In certi casi può risultare altamente

invasivo

– Redirezione di pagine web

– Perdita di connettività

– Installazione di software

– Apertura di finestre di popup

– Perdita di prestazioni del computer

– Dialer

– ….

15

Page 16: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Rootkit

• Software progettato per prendere il

controllo di una rete di computer, senza

essere individuato

• Spesso cancella eventuali tracce di attività, • Spesso cancella eventuali tracce di attività,

lasciate nel registro degli eventi

– Modifica parti del sistema operativo, per

nascondere processi e file all’utente

– Si installa come un driver

16

Page 17: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Rootkit• Le operazioni effettuate possono variare in

base alla progettazione

– Trojan

– Spyware

– Corruzione di file– Corruzione di file

– Botnet

– DoS (Denial of Service) Attack

• Sono progettati per ottenere i permessi di amministratore (root) del sistema

– Ottengono un accesso completo alle risorse

17

Page 18: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Tipologie di rootkit• Hardware / Firmware Level

– Si nasconde nel firmware dei dispositivi

– Spesso non vengono controllati per verificarne l’integrità

• Hypervisor Level

– Modifica la sequenza di boot– Modifica la sequenza di boot

– Si installa come controllore (hypervisor) del sistema operativo

– Sfruttando i sistemi di virtualizzazione CPU (Intel-VT, AMD-V) può eseguire il SO come una macchina virtuale

• Consente di intercettare tutte le chiamate all’hardware

18

Page 19: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Tipologie di rootkit• Boot Loader Level

– Sostituisce il boot loader originale

– Una piattaforma TPM (Trusted Platform Module) configurata per proteggere il path di boot è l’unica difesa efficace

• Kernel Level– Aggiunge / rimpiazza porzioni del codice del – Aggiunge / rimpiazza porzioni del codice del

sistema operativo

– Alcuni SO consentono di caricare i driver in KernelMode

• Il rootkit può ottenere un controllo completo della macchina

• Difficili da intercettare, perché lavorano allo stesso livello di sicurezza del Kernel

19

Page 20: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Tipologie di rootkit• Library Level

– Modifica le System Call con versioni che

nascondono il rootkit e le azioni dell’attaccante

– Applica patch alle librerie di sistema (DLL)

– La firma digitale sui file di sistema aiuta ad – La firma digitale sui file di sistema aiuta ad

identificare cambiamenti non autorizzati

• Application Level

– Modificano o rimpiazzano gli eseguibili dei

programma, inserendo dei Trojan

20

Page 21: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Backdoor• Tecnica per superare i sistemi di

autenticazione

– Viene inserita all’interno del codice del software

– Consente di ottenere un accesso al sistema da parte del realizzatore

• Esempi famosi• Esempi famosi

– Novembre 2003: tentativo di inserire una backdoornel Kernel Linux

– Sobig / MyDoom: worm che installano backdoorsui pc infetti

– Sony/BMG Rootkit: installa routine creando notevoli problemi di sicurezza

21

Page 22: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Backdoor• Symmetric Backdoor

– Chiunque è a conoscenza della backdoor può

utilizzarla

• Asymmetric Backdoor

– Può essere utilizzata unicamente da chi la – Può essere utilizzata unicamente da chi la

implementa

– Anche se resa pubblica, risulta inaccessibile

– Richiede l’uso di metodi di autenticazione

• Es: Smartcard

22

Page 23: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Dialer• Programma utilizzato per creare una

connessione a una rete di computer attraverso

una linea telefonica analogica o ISDN

• Spesso utilizza il protocollo PPP (Point-to-

Point)Point)

• Il dialer è necessario per collegarsi ad Internet

in presenza di connessioni non-broadband

• Dialer “cattivi”: sfruttano i bug del SO per

installarsi e connettere il modem a numeri a

tariffazione speciale

23

Page 24: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Logicbombs• Porzione di codice inserita intenzionalmente

che compie azioni dannose al verificarsi di

determinate condizioni

– Es. un programmatore può inserire una routine

che cancella i progetti su cui lavora, in caso di

licenziamentolicenziamento

• Vengono inserite all’interno di virus e worm,

perché si attivino solo in precisi contesti

• Esempio di logicbomb funzionante:

– 1982: Trans-siberian Pipeline Incident

24

Page 25: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Timebombs

• Variante della logicbomb

• Si attiva e opera solo a partire da una data

prefissata

• Timebomb non dannosa

– Un programma di prova che smette di

funzionare dopo un certo lasso di tempo dalla

sua installazione

25

Page 26: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

ANTIVIRUS

26

Page 27: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Antivirus

• Antivirus is a software used to prevent, detect, and remove malware

• Can degrade computer performance

• A false positive is identifying a file as a virus • A false positive is identifying a file as a virus when it is not a virus

– false positives in essential files can render the operating system or some applications unusable

• Anti-virus programs are not very effective against new viruses

27

Page 28: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Identification methods

• Signature based detection

– Most common method

– Compares the contents of a file to a dictionary

of virus signatures

– Antivirus software heavily relied upon – Antivirus software heavily relied upon

signatures to identify malware

– Signature-based approaches are not effective

against new, unknown viruses

– Requires frequent updates of the virus

signature dictionary

28

Page 29: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Identification methods• Malicious activity detection

– Monitors the system for suspicious program behavior

– If suspicious behavior is detected, the suspect program may be further investigated, using signature based detection or another method

– This type of detection can be used to identify unknown viruses or variants on existing viruses

• Heuristic-based detection• Heuristic-based detection– Can be used to identify unknown viruses

– File analysis• Process of searching a suspect file for virus-like instructions

• Large amount of computer resources needed to analyse every file

– File emulation• Executing a program in a virtual environment

• Logging what actions the program performs

29

Page 30: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

On-demand detection capabilities

30

Page 31: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Graph of missed malware

31

Page 32: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

False positive

32

Page 33: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Performance Test

33

Page 34: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

ERRORI DI PROGRAMMAZIONE

34

Page 35: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Software bug

• Software bug

– common term used to describe an error, flaw,

mistake, failure, or fault in a computer program

or system that produces an incorrect or

unexpected resultunexpected result

– They cost the US economy an estimated $59

billion annually

– Malicious software may attempt to exploit

known vulnerabilities in a system

35

Page 36: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Common types of computer bugs• Arithmetic bugs

– Division by zero• many computer programming languages explicitly forbid the execution of

the operation and may prematurely halt a program that attempts it

– Arithmetic overflow• the condition that occurs when a calculation produces a result that is

greater in magnitude than that which a given register or storage location can store or represent can store or represent

Es. Max value in 32 bit data is 4294967296 (2^32)

– Loss of arithmetic precision

• Logic bugs– Infinite loops

• sequence of instructions in a computer program which loops endlessly

– Off-by-one error• It often occurs when an iterative loop iterates one time too many or too

few

36

Page 37: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Common types of computer bugs

• Syntax bugs– Use of the wrong operator, such as performing

assignment instead of equality test• many compilers detect these errors

• Multi-threading programming bugs– Deadlock– Deadlock

• situation wherein two or more competing actions are waiting for the other to finish, and thus neither ever does

– Race condition• the output and/or result of the process is unexpectedly

and critically dependent on the sequence or timing of other events

• A time-of-check-to-time-of-use bug is a software bug

37

Page 38: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Common types of computer bugs• Resource bugs

– Null pointer dereference

– Using an uninitialized variable

– Using the wrong data type

– Access violations (Segmentation Fault)• program attempts to access a memory location that it is not allowed to access

– Resource leaks• system resource (memory, ...) are exhausted by repeated allocation without release• system resource (memory, ...) are exhausted by repeated allocation without release

– Buffer Overflow• anomaly where a process stores data in a buffer outside the memory the

programmer set aside for it

• This may result in erratic program behavior, including memory access errors, incorrect results, program termination (a crash), or a breach of system security

– Stack overflow• call stack contains a limited amount of memory

• When too much memory is used on the call stack the stack is said to overflow

38

Page 39: malware - WordPress.comand remove malware • Can degrade computer performance • A false positive is identifying a file as a virus when it is not a virus – false positives in essential

Common types of computer bugs

• Teamworking bugs

– Unpropagated updates

– Comments out of date or incorrect– Comments out of date or incorrect

– Differences between documentation and the

actual product

39