Η παρουσίαση φορτώνεται. Παρακαλείστε να περιμένετε

Η παρουσίαση φορτώνεται. Παρακαλείστε να περιμένετε

Ιόνιο Πανεπιστήμιο Τμήμα Πληροφορικής Ακαδημαϊκό Έτος Εξάμηνο: Δ’

Παρόμοιες παρουσιάσεις


Παρουσίαση με θέμα: "Ιόνιο Πανεπιστήμιο Τμήμα Πληροφορικής Ακαδημαϊκό Έτος Εξάμηνο: Δ’"— Μεταγράφημα παρουσίασης:

1 Ιόνιο Πανεπιστήμιο Τμήμα Πληροφορικής Ακαδημαϊκό Έτος 2011-2012 Εξάμηνο: Δ’
Ασφάλεια Υπολογιστών και Προστασία Δεδομένων Ενότητα E: Κακόβουλο Λογισμικό (Computer Malware Εμμανουήλ Μάγκος

2 0. Motivation & Definitions

3 Κακόβουλο λογισμικό (Malicious Software – Malware) 1
Κώδικας που δημιουργήθηκε με σκοπό την πραγματοποίηση ενός η περισσοτέρων εκ των παρακάτω: αλλοίωση δεδομένων ή προγραμμάτων υποκλοπή δεδομένων διαγραφή δεδομένων ή προγραμμάτων παρεμπόδιση λειτουργίας ή υποβάθμιση συστήματος Γενικά, επιθέσεις εναντίον Εμπιστευτικότητας (C) Ακεραιότητας (I) Διαθεσιμότητας (A) Κακόβουλο Λογισμικό. Πρόκειται για προγράμματα (κώδικας) που αποσκοπούν στην πραγματοποίηση επιθέσεων κατά της Εμπιστευτικότητας, της Ακεραιότητας ή / και της διαθεσιμότητας των συστημάτων. Για την εγκατάσταση (μόλυνση) ενός κακόβουλου λογισμικού σε έναν Η/Υ, συνήθως απαιτείται η ανθρώπινη συμμετοχή, άμμεση (π.χ. ανταλλαγή αρχείων, άνοιγμα μηνυμάτων αλληλογραφίας αμφιβόλου προέλευσης) ή έμμεση (ανεπαρκής προστασία του υπολογιστή, παράλειψη λήψης ενημερωμένων εκδόσεων –updates του λογισμικού ασφαλείας και των προγραμμάτων του Η/Υ). Το τμήμα του κώδικα που είναι υπεύθυνο για τις παρενέργειες του λογισμικού ονομάζεται φορτίο (payload) ή «σύμπτωμα». Εκτός από τις παρενέργειες, το κακόβουλο λογισμικό μπορεί να περιλαμβάνει κώδικα με σκοπό την: Αναπαραγωγή του: Εξάπλωση του στο μηχάνημα το οποίο «μολύνει» (από πρόγραμμα σε πρόγραμμα). Μετάδοση του: Εξάπλωση του από το μηχάνημα που μολύνθηκε σε άλλο/άλλα μηχανήματα (από Η/Υ σε Η/Υ) Εγκατάσταση στην κατάλληλη περιοχή. Όλα τα είδη κακόβουλου λογισμικού, ανεξάρτητα με το είδος του φορτίου τους, έχουν κάποια κοινά χαρακτηριστικά. Για παράδειγμα, το λογισμικό προσπαθεί α) να εγκατασταθεί στην κατάλληλη περιοχή, ώστε το φορτίο να εκτελείται μια φορά, συχνά ή πάντα. Η πλέον συνήθης τακτική είναι η δημιουργία μιας εγγραφής στο μητρώο του συστήματος, στη θέση ΗKLM\Software\Microsoft\Windows\CurrentVersion\Run, β) Προσπαθεί να εγκατασταθεί στην κατάλληλη περιοχή ώστε η εκτέλεση του να μην είναι ανιχνεύσιμη και γ) Προσπαθεί να εγκατασταθεί στην κατάλληλη περιοχή ώστε η αφαίρεση του να είναι δύσκολη. Όπως θα δούμε και στη συνέχεια της ενότητας, συχνά το κακόβουλο λογισμικό έχει τη δυνατότητα να πραγματοποιεί επιθέσεις κατά της διαθεσιμότητας του λογισμικού Antivirus (π.χ. αλλαγή στο αρχείο C:\WINDOWS\SYSTEM32\DRIVERS\ETC\hosts και εισαγωγή μιας «ψεύτικης» IP διεύθυνσης για τον update server του Antivirus, ώστε αυτό να μη μπορεί να ενημερώνεται με τις «υπογραφές» των πιο πρόσφατων ιών). CIA

4 Κακόβουλο λογισμικό - Ταξινομία
Ιοί (Viruses) Μολυσματικό λογισμικό με ικανότητα αυτό-αναπαραγωγής «Σκουλήκια» (Worms) Μολυσματικό λογισμικό. Αυτo-μεταδίδεται μέσω δικτύων Δούρειοι Ίπποι (Trojan Horses): Μη μολυσματικό λογισμικό. Εκτελεί κάτι «άλλο» αντί (ή, παράλληλα) αυτό για το οποίο προορίζεται Bots - zombies Χρήση ξενιστή για κατανεμημένες επιθέσεις (π.χ. DDOS, spam, phishing) … Άλλες κατηγορίες – συχνά συνδυάζονται με προηγούμενες Spyware & Adware Υποκλοπή στοιχείων και χρηστών Αποστολή μη ζητηθεισών διαφημίσεων Rootkits – back doors Χαρακτηριστικά stealth, «Κερκόπορτες» για σύνδεση με προνόμια διαχειριστή Κακόβουλο Λογισμικό – Ταξινομία. Μια ταξινομία του κακόβουλου λογισμικού είναι η εξής. Ιός (virus). Κακόβουλο λογισμικό το οποίο αφού μολύνει έναν Η/Υ έχει την ικανότητα να αναπαράγεται και να μολύνει άλλα προγράμματα στον Η/Υ. Η μετάδοση του σε άλλους Η/Υ μπορεί να γίνεται αυτόματα (να έχει δηλαδή τα χαρακτηριστικά ενός Σκουληκιού – Worm) ή να απαιτεί ανθρώπινη παρέμβαση (π.χ. αντιγραφή ενός αρχείου σε δισκέτα και άνοιγμα του αρχείου σε κάποιον Η/Υ). O Fred Cohen, to 1985 (F. Cohen, “Computer Viruses”, ASP Press, 1985) περιέγραψε έναν ιό ως «…. ένα πρόγραμμα το οποίο μολύνει άλλα προγράμματα τροποποιώντας τον κώδικα τους ώστε να περιλαμβάνουν μια έκδοση του εαυτού του (that can 'infect' other programs by modifying them to include a ... version of itself»…). Σημείωση: Από τη βιολογία, γνωρίζουμε ότι ένας ιός δεν είναι αυτόνομη οντότητα, δηλαδή δεν μπορεί να ζήσει από μόνος του. Επομένως, προσκολλάται σε άλλες αυτόνομες οντότητες (Ασφάλεια Η/Υ: Προγράμματα) Σκουλήκι (Worm). Κακόβουλο λογισμικό το οποίο, αφού μολύνει έναν Η/Υ, έχει την ικανότητα να μεταδίδεται αυτόματα, κάνοντας χρήση της δικτυακής υποδομής (Τοπικά Δίκτυα - Δίκτυα WAN) ή/και των υπηρεσιών του Internet (chat, , newsgroups, κ.λ.π). Δούρειοι Ίπποι (Trojan Horses). Κακόβουλο λογισμικό στο οποίο είναι εγγενές το στοιχείο της παραπλάνησης: Συνήθως εκτελείται ως μια (καθ’ όλα) χρήσιμη εφαρμογή, η οποία όμως περιέχει κακόβουλο κώδικα. Συνήθως τα trojan δεν έχουν μολυσματικό χαρακτήρα, δηλαδή δεν αναπαράγονται και για αυτό δεν θεωρούνται επισήμως ως Ιοί. Spyware – Adware. Κακόβουλο λογισμικό με χαρακτηριστικά που πλησιάζουν-εντάσσονται στις λειτουργίες ενός δουρείου Ίππου (κυρίως ως προς τον τρόπο μόλυνσης), με σκοπό την παρακολούθηση ή υποκλοπή ευαίσθητων δεδομένων (spyware), καθώς και την αποστολή ανεπιθύμητων διαφημιστικών μηνυμάτων (adware). Αναφέρονται ως μέλη της ίδιας κατηγορίας, καθώς συνήθως συνεργάζονται για να πετύχουν τον σκοπό τους (π.χ παρακολούθησης της αγοραστικής συμπεριφοράς κατά την περιήγηση στο Web και στη συνέχεια αποστολή-εμφάνιση διαφημιστικών μηνυμάτων) Rootkits (Κερκόπορτες). Όπως φαίνεται από την ονομασία τους, ένα Rootkit είναι κακόβουλο λογισμικό το οποίο εντοπίζει ή δημιουργεί μια «τρύπα» στον μηχανισμό Ελέγχου Πρόσβασης ξενιστή (π.χ. αλλαγή των δικαιωμάτων πρόσβασης), ώστε να επιτρέψει τη μετέπειτα απομακρυσμένη διαχείριση του ξενιστή (host: ο μολυσμένος Η/Υ) από κάποιον τρίτο. Βots – zombies. Παρόμοια με τα τα rootkits, με τη διαφορά ότι οι ξενιστές συνήθως προορίζονται για την πραγματοποίηση επιθέσεις Κατανεμημένων Επιθέσεων Άρνησης Εξυπηρέτησης (DDOS attacks), δηλαδή επιθέσεων κατά τις οποίες ένας (συνήθως μεγάλος) αριθμός μολυσμένων υπολογιστών προσπαθεί να συνδεθεί στον Η/Υ-στόχο μέσω δικτύου. Ο όρος bot, προέρχεται από την Τσεχοσλοβακική λέξη «robota» (McClure, 2005) και χρησιμοποιείται για να περιγράψει κάθε είδους αυτοματοποιημένη διαδικασία. Ένας Η/Υ που έχει μολυνθεί από ένα bot συχνά αναφέρεται ως «zombie». Οι Η/Υ – zombies μπορεί να χρησιμοποιηθούν για επιθέσεις DOS σε εξυπηρετητές Web, για την αποστολή spam μηνυμάτων, ή για την πραγματοποίηση επιθέσεων τύπου phishing κ.λ.π.

5 Κακόβουλο λογισμικό Κύκλος Ζωής (1)
Κακόβουλο λογισμικό Κύκλος Ζωής (1) Δημιουργία Περιέχει ένα σύνολο εντολών προς τον Η/Υ Δεν απαιτούνται ιδιαίτερες τεχνικές γνώσεις Αρχική Μόλυνση Εκμετάλλευση ευπαθειών προγραμμάτων ή ανθρώπινου παράγοντα Εγκατάσταση ώστε το φορτίο να εκτελείται συχνά ή πάντα π.χ. : ΗKLM\Software\Microsoft\Windows\CurrentVersion\Run Εγκατάσταση ώστε η ανίχνευση & η αφαίρεση να είναι δύσκολες Ενεργοποίηση (έκρηξη) του φορτίου (payload) - Παρενέργειες Επιθέσεις Υποκλοπής, Διακοπής, Αλλοίωσης ή Εισαγωγής Δεδομένα, προγράμματα, αρχεία συστήματος, τομείς εκκίνησης Δημιουργία «κερκόπορτας» Επιθέσεις εναντίον της διαθεσιμότητας (μνήμη, bandwidth, DDOS)

6 Κακόβουλο λογισμικό Κύκλος Ζωής (2)
Κακόβουλο λογισμικό Κύκλος Ζωής (2) Αναπαραγωγή & Μετάδοση Kατά την εκτέλεση του φορτίου γίνεται προσπάθεια να μολυνθούν άλλα υποκείμενα (προγράμματα ή Η/Υ)… Ανίχνευση (detect) Ανίχνευση βλαβερού κώδικα/συμπεριφοράς Εξάλειψη – Μετάλλαξη (π.χ. πολυμορφικοί ιοί) Το κακόβουλο λογισμικό εξαλείφεται. Σε αρκετές περιπτώσεις, μια επανέκδοση παραλλαγμένη

7 Κακόβουλο Λογισμικό – Aναπαραγωγή & Μετάδοση
Μέσω ηλεκτρονικής αλληλογραφίας π.χ. Εκτέλεση συνημμένων αρχείων Μέσω Web (κακόβουλος κώδικας ενσωματωμένος σε σελίδες html) π.χ. Drive-by downloads, ενεργός κώδικας, ασφάλεια browsers και web servers, .. Μέσω άλλων διαδικτυακών υπηρεσιών Chat (IRC, Instant Messengers - IM), newsgroups … Δίκτυα ανταλλαγής αρχείων (P2P file sharing) Μέσω αφαιρούμενων αποθηκευτικών μέσων USB, optical, floppy, zip,.. Μέσω Δικτύων Μεταγωγής Σάρωση δικτύου για εντοπισμό ευπαθειών εφαρμογών & υπηρεσιών LAN, WLANs: κοινή χρήση αρχείων, μετάδοση μέσω Bluetooth,… Κακόβουλο Λογισμικό – Τρόποι μόλυνσης. Η διαδικασίες της μόλυνσης-μετάδοσης μπορούν να συμβούν με έναν από τους ακόλουθους τρόπους: Μέσω Ηλεκτρονικής Αλληλογραφίας. Το κακόβουλο λογισμικό βρίσκεται συνημμένο σε ένα μήνυμα ηλεκτρονικής αλληλογραφίας. Η αποστολή του μηνύματος μπορεί να είναι είτε ηθελημένη από κάποιον τρίτο, είτε ως αποτέλεσμα αυτόματης μετάδοσης (π.χ. Worm) Μέσω αφαιρούμενων αποθηκευτικών μέσων (floppy, cd, zip,..). Ο τρόπος αυτός μόλυνσης ήταν και είναι ο πλέον δημοφιλής στην κατηγορία των κλασσικών ιών. Μέσω Web (εκτελέσιμος κώδικας ενσωματωμένος σε σελίδες html). Οι κίνδυνοι στο Web (εκτελέσιμος κώδικας) θα μας απασχολήσουν στη συνέχεια της παρούσας ενότητας, καθώς και στην επόμενη ενότητα (Ασφάλεια στο Web) Μέσω άλλων υπηρεσιών διαδικτυακής επικοινωνίας. Υπηρεσίες συνομιλίας σε πραγματικό χρόνο (Chat messengers, Internet telephony, video conferencing, IRC clients) υπηρεσίες Ομάδων Συζήτησης (newsgroups), προγράμματα ανταλλαγής αρχείων (Peer to Peer) κ.λ.π… Μέσω τοπικού δικτύου (LAN). Το κακόβουλο λογισμικό (κυρίως τύπου Worm) εκμεταλλεύται ευπάθειες δικτυακών πρωτοκόλλων, υπηρεσιών ή άλλων ευπαθειών των λειτουργικών συστημάτων και μεταδίδεται αυτόματα μέσω τοπικών δικτύων που εκτελούν την οικογένεια πρωτοκόλλων TCP/IP. Η κοινή χρήση αρχείων, εγγράφων και φακέλων σε τοπικά δίκτυα, διευκολύνει επίσης την εξάπλωση του κακόβουλου λογισμικού (όλων των κατηγοριών). Σε έναν παρεμφερές σενάριο, το κακόβουλο λογισμικό (συνήθως worm) αντιγράφει τον εαυτό του στους φακέλους με τα διαμοιραζόμενα (shared) αρχεία που χρησιμοποιούν οι εφαρμογές ανταλλαγής αρχείων (P2P) Κακόβουλο Λογισμικό – Παρενέργειες. Οι παρανέργειες του φορτίου (payload) του κακόβουλου λογισμικού ποικίλλουν: Eνοχλητικά μηνύματα, διαφημίσεις κ.λ.π (σχετική κατηγορία: adware) Επιθέσεις Υποκλοπής δεδομένων και πληροφοριών, ή κλήσης (dialers) με υπεραστική χρέωση (σχετική κατηγορία: trojans, spyware) Επιθέσεις Διακοπής, Αλλοίωσης, Εισαγωγής (σχετικές κατηγορίες: Ιοί, worms) Διαγραφή ή αλλοίωση δεδομένων, εφαρμογών και αρχείων συστήματος Αντιγραφή αρχείων στο τοπικό δίκτυο (μετάδοση μέσω κοινής χρήσης αρχείων) ή στο Internet (για μετάδοση μέσω των προγραμμάτων P2P) Αναστολή λειτουργίας ή δυσλειτουργία του Λ.Σ. Καταστροφή των τομέων εκκίνησης (boot sectors), πινάκων καταχώρησης αρχείων (FAT), και πινάκων κατατμήσεων (partition tables) Δημιουργία «κερκόπορτας» (back door) με σκοπό την (μετέπειτα) παραβίαση της ασφάλειας του συστήματος (σχετικές κατηγορίες: trojans, rootikits, zombies) Επιθέσεις εναντίον της διαθεσιμότητας συστημάτων (σχετικές κατηγορίες: worms, bots- zombies) Κατανάλωση υπολογιστικών πόρων (κύρια μνήμη, αποθηκευτικός χώρος) Κατανάλωση της χωρητικότητας (bandwidth) του δικτύου Χρήση των ξενιστών για συγχρονισμένη επίθεση σε κάποιον τρίτο, στα πλαίσια μιας επίθεσης DDOS (Distributed DOS)

8 Symantec Internet Security Threat Report - 2010

9 1. Old times

10 Κακόβουλο λογισμικό 2. Ιστορικά στοιχεία
F. Cohen, “Computer Viruses”, ASP Press, 1985 …. «program that can 'infect' other programs by modifying them to include a ... version of itself»… 1986: Brain 1987: Christmas Card, Jerusalem 1988: The Internet Worm 1992: Michelangelo 1994: Good times (hoax) 1995: Μακρο-ιοί 1999: Melissa 1998: Chernobyl 2000: ILOVEYOU 2003: Slammer, Blaster,… … 2006: Botnets, Wikipedia attack, Myspace/XSS, Storm worm

11 «Κλασσικοί» Ιοί (Viruses)
Κακόβουλο – παρασιτικό λογισμικό που αποτελείται από: Το “Φορτίο” (payload): κώδικας που όταν εκτελείται έχει παρενέργειες: π.χ. Παραβίαση της εμπιστευτικότητας ή/και ακεραιότητας ή/και διαθεσιμότητας των δεδομένων-συστημάτων Το Μηχανισμό Αναπαραγωγής (propagation, replication): κώδικας για την αντιγραφή σε άλλα προγράμματα (αναπαραγωγή) στον Η/Υ Αναπαραγωγή: Οι ιοί (συνήθως) σχεδιάζονται ώστε να αναπαράγονται μόνοι τους σε έναν Η/Υ Π.χ. Μολύνοντας διαδοχικά τα εκτελέσιμα αρχεία του Η/Υ Μετάδοση (σε άλλον-ους Η/Υ): απαιτείται (σε μικρό ή μεγάλο βαθμό) η συμμετοχή του ανθρώπινου παράγοντα

12 «Κλασσικοί Ιοί» Παρασιτικοί Ιοί (parasitic, file-infecting)
Δημοφιλείς μέχρι την έλευση των Win 3.1 Οι ιοί αυτής της κατηγορίας «μολύνουν» άλλα προγράμματα Μόλυνση: Εκτέλεση του προγράμματος που «περιέχει» τον Ιό Αναπαραγωγή: Όταν εκτελεστεί o «ξενιστής», ο ιός συχνά παραμένει στην κύρια μνήμη και μολύνει άλλα προγράμματα που εκτελούνται Εισαγωγή του κώδικα του ιού στον κώδικα εκτελέσιμων προγραμμάτων (..EXE, .COM, .BAT, .SYS, .BIN, .PIF,...) Μετάδοση: μέσω αποσπώμενων αποθηκευτικών μέσων ή μέσω δικτύου Memory-resident Μελέτη Περίπτωσης: Jerusalem (1987) Non-resident (direct action) Μελέτη Περίπτωσης: ο ιός Vienna Κλασσικοί Ιοί – Παρασιτικοί Ιοί. Οι παρασιτικοί ιοί προσκολλώνται σε άλλα εκτελέσιμα προγράμματα. Για να μολυνθεί ένας Η/Υ με παρασιτικό ιό θα πρέπει να εκτελέσει ένα πρόγραμμα που «φέρει» τον ιό. Όταν εκτελεστεί το μολυσμένο πρόγραμμα, η συνήθης συμπεριφορά ενός παρασιτικού ιού είναι να παραμένει στην κύρια μνήμη του συστήματος (για αυτό και ονομάζονται memory-resident), ώστε να μπορεί να «μολύνει» και άλλα προγράμματα που εκτελεί ο χρήστης. Κάθε φορά που εκτελείται ένα πρόγραμμα, ο ιός προσθέτει τον κώδικα του μέσα στον κώδικα του αρχικού προγράμματος (συνήθως στην αρχή ή στο τέλος του -για προστασία από την ανίχνευση από antivirus), χωρίς συνήθως να καταστρέψει το αρχικό αρχείο. Στη συνέχεια ο ιός καλεί το αρχικό πρόγραμμα ώστε να κρύψει την παρουσία του. Με τον τρόπο αυτό ο ιός αναπαράγεται μέσα στον ίδιο Η/Υ. Για τη μετάδοση ενός παρασιτικού ιού, απαιτείται ανθρώπινη παρέμβαση (π.χ. ο χρήστης του Η/Υ δίνει σε κάποιον άλλον χρήστη ένα από τα μολυσμένα προγράμματα που έχει, μέσω ή με αφαιρούμενα αποθηκευτικά μέσα). Μελέτη περίπτωσης. (Πηγή: McAfee Inc. AVERT library). Ο Vienna υπήρξε ένας παρασιτικός ιός, ο οποίος όμως δεν παρέμενε στην κύρια μνήμη του συστήματος. Ο Vienna μόλυνε αρχεία με κατάληξη com. Όταν εκτελούνταν ένα πρόγραμμα μολυσμένο με τον Vienna, ο ιός επέλεγε τυχαία και μόλυνε ένα πρόγραμμα .com στον τρέχοντα κατάλογο (που δεν είχε ήδη μολυνθεί). Ο ιός αυτός ήταν πιο δύσκολο να ανιχνευθεί, αφού δεν μόλυνε όλα τα προγράμματα, και δεν παρέμενε στη μνήμη του συστήματος. Μελέτη Περίπτωσης: To φορτίο του ιού Jerusalem (1987) περιείχε μια αποκαλούμενη και ως λογική βόμβα (logic bomb). Οι λογικές βόμβες ενεργοποιούνται όταν επέλθει μια συγκεκριμένη χρονική στιγμή, π.χ. στις 18.00, τις 13 του Σεπτέμβρη. Συνήθως είτε επιτελούν καταστροφικό έργο, είτε (συγχρονισμένες) επιθέσεις σε τρίτους μέσω του δικτύου. Ο Jerusalem, έσβηνε όλα τα προγράμματα που εκτελούσε ο χρήστης, εφόσον η ημερομηνία έλεγε Παρασκευή και 13. Σημείωση: Οι παρασιτικοί ιοί υπήρξαν οι πλέον δημοφιλείς για πολλά χρόνια. Σήμερα ωστόσο δεν αποτελούν απειλή.

13 Παρασιτικοί Ιοί (parasitic, file-infecting) H διαδικασία της Αναπαραγωγής
integrate A V A V A V A V A Pre-pend Append Overwrite

14 Μελέτη περίπτωσης: Jerusalem (memory resident)
Ανακαλύφθηκε: Όταν εκτελεστεί το μολυσμένο αρχείο, ο ιός παραμένει στην κύρια μνήμη του Η/Υ Φορτίο (payload) Παρασκευή και 13: ο ιός σβήνει όλα τα προγράμματα που θα εκτελέσει ο χρήστης Αναπαραγωγή Μολύνει εκτελέσιμα αρχεία με επέκταση (COM, .EXE, .SYS, .BIN, .PIF, .OVL) όταν αυτά εκτελούνται

15 Ιός - Ψευδοκώδικας

16 «Κλασσικοί Ιοί» Ιοί Boot sector
Δημοφιλείς μέχρι την έλευση των Win 95 Ο ιός «μολύνει» εκτελέσιμο κώδικα συστήματος που εντοπίζει σε συσκευές βοηθητικής μνήμης (π.χ. δίσκος, δισκέτα,..) π.χ. Τομέας Εκκίνησης (boot sector) ή MBR (Master Boot Record). Ως αποτέλεσμα, o ιός φορτώνεται στη μνήμη κατά την εκκίνηση (boot) του συστήματος Αναπαραγωγή: ο ιός μολύνει κάθε δίσκο ή δισκέτα που θα χρησιμοποιηθεί τοπικά στον Η/Υ. Μετάδοση: Ένας Η/Υ μολύνεται με τον ιό όταν προσπαθεί να εκκινήσει το σύστημα π.χ. με «μολυσμένη» δισκέτα Μελέτη Περίπτωσης: Michelangelo (1992), Brain (1986) Κλασσικοί Ιοί – Ιοί boot sector. Οι ιοί αυτού του είδους μολύνουν τον τομέα εκκίνησης (boot sector) ενός αποθηκευτικού μέσου ή μιας κατάτμησης (partition). Ο τομέας εκκίνησης περιέχει ένα πρόγραμμα μικρού μεγέθους το οποίο εντοπίζει και «φορτώνει» στη κύρια μνήμη το λειτουργικό σύστημα ενός Η/Υ. Ένας ιός boot sector μπορεί επίσης να μολύνει την περιοχή MBR (Master Boot Record) που περιέχει τον πίνακα κατατμήσεων του δίσκου. Τρόπος μόλυνσης & μετάδοσης: Ο Η/Υ προσπαθεί να πραγματοποιήσει εκκίνηση από μία π.χ. μολυσμένη δισκέτα και ο ιός μετακινείται από τη δισκέτα στο σύστημα. Αναπαραγωγή: Αφού ενεργοποιηθεί, ο ιός μολύνει όλους τους δίσκους καθώς και τις δισκέτες που θα τοποθετηθούν στον οδηγό δισκετών. Ένας ιός boot sector με καταστροφικές παρενέργειες μπορεί να έχει ως αποτέλεσμα την αδυναμία εκκίνησης ενός συστήματος. Μελέτη Περίπτωσης (Πηγή - McAfee Inc. AVERT library) : ο ιός Michelangelo ήταν προγραμματισμένος να απενεργοποιήσει τους μολυσμένους Η/Υ στις 6 Μαρτίου 1992 («λογική βόμβα»). Σε ένα άλλο παράδειγμα, ο Ιός Brain (1986) ήταν ο πρώτος που εμφάνισε τα χαρακτηριστικά stealth: σε περίπτωση που ένα πρόγραμμα antivirus εξέταζε τον τομέα εκκίνησης, ο Brain (ο οποίος ήταν «φορτωμένος» στη μνήμη – memory resident) προωθούσε το αίτημα στον αυθεντικό τομέα εκκίνησης ώστε να «ξεγελάσει» το antivirus. Σημείωση: Σήμερα οι ιοί Boot Sector δεν αποτελούν μεγάλη απειλή εφόσον έχει περιοριστεί η χρήση δισκετών εκκίνησης (bootable). Ωστόσο, εφόσον τα σύγχρονα BIOS επιτρέπουν την εκκίνηση από USB δίσκους, στο μέλλον μπορεί να αναζωπυρωθεί το ενδιαφέρον για τους ιούς boot sector.

17 Κλασσικοί ιοί – Υβριδικοί Ιοί (Multi-partite, ή Hybrid)
Συνδυάζουν χαρακτηριστικά δύο κατηγοριών Περίπτωση: ιοί “Boot and file” Mολύνουν τομείς εκκίνησης (π.χ. MBR) & εκτελέσιμα αρχεία (.exe) Ο ιός Ghostball (1989) ο πρώτος multipartite ιός Περίπτωση: ο ιός Melissa (1999) Συνδυάζει χαρακτηριστικά Μακρο-ιού και Worm Σύγχρονο κακόβουλο λογισμικό Σύνοψη χαρακτηριστικών δύο ή περισσότερων κατηγοριών π.χ. Virus και trojan, trojan worms κ.λ.π Κλασσικοί ιοί – Υβριδικοί ή πολυμερείς Ιοί (Multi-partite, ή Hybrid). Ονομάζονται οι ιοί που περιέχουν (τουλάχιστον) 2 μέρη. Ως εκ τούτου μπορεί να στοχεύουν σε διαφορετικά τμήματα του συστήματος. Συνήθως συνδυάζουν χαρακτηριστικά ιών boot sector και παρασιτικών ιών. Ένας Η/Υ μολύνεται αν χρησιμοποιήσει μια «μολυσμένη» δισκέτα εκκίνησης ή αν εκτελέσει ένα μολυσμένο πρόγραμμα. O ιός αποτελείται από κώδικα που καλύπτει και τις δύο περιπτώσεις: Ανάλογα με την περίσταση, εκτελείται το αντίστοιχο τμήμα. Το γεγονός αυτός αυξάνει τις πιθανότητα αναπαραγωγής. Για να αφαιρεθεί ο ιός από το σύστημα, θα πρέπει να αφαιρεθούν και τα δύο μέρη του, διαφορετικά, το ένα μέρος μπορεί να επανενεργοποιήσει το άλλο. Μελέτη περίπτωσης: ο ιός Melissa (1999) μπορεί να θεωρηθεί ως ιός multipartite (μακρο-ιός & ςορμ). Όταν το «θύμα» άνοιγε το αρχείο word που λάμβανε μέσω , ο ιός (ως μακρο-ιός) ενεργοποιούνταν και μόλυνε το πρότυπο normal.dot. Αυτό είχε ως συνέπεια να μολύνονται όλα τα μελλοντικά έγγραφα word που θα δημιουργούσε ο χρήστης. Στη συνέχεια ο ιός έστελνε τον εαυτό του (όπως ένα worm) με mail στις πρώτες 50 διευθύνσεις από το βιβλίο διευθύνσεων (address book) του χρήστη. Ο ιός είχε ως στόχο επίθεση άρνησης εξυπηρέτησης (DOS) στους mail servers. O Ιός δε μόλυνε προγράμματα (όπως οι file-infecting ιοί) αλλά μόνο έγγραφα και templates. Σημείωση: Σήμερα οι περισσότερες περιπτώσεις κακόβουλου λογισμικού συνδυάζουν στοιχεία από περισσότερες από μια κατηγορίες. Έτσι, ένα κακόβουλο λογισμικό το οποίο α) ενεργοποιείται με την παρέμβαση του χρήστη, ωστόσο μετά την ενεργοποίηση του β) στέλνει τον εαυτό του με σε παραλήπτες που βρίσκονται στο βιβλίο διευθύνσεων του χρήστη, θα μπορούσε να χαρακτηριστεί ως multipartite λογισμικό (στοιχεία trojan kai worm). Συχνά επίσης συναντούμε μελέτες περιπτώσεων με λογισμικό spyware & adware, virus και trojan ή virus και worm κ.λ.π.

18 Άλλοι «Κλασσικοί Ιοί» Ιοί Companion
Εκμεταλλεύονται μια ευπάθεια του DOS Αν υπάρχουν δύο προγράμματα με το ίδιο όνομα σε έναν κατάλογο, το Λ.Σ. θα εκτελέσει πρώτα το αρχείο .com Ο ιός δεν μολύνει το αρχείο .exe, αλλά δημιουργεί ένα αντίγραφο με την κατάληξη .com το οποίο περιέχει το «φορτίο» του ιού Συχνά το αρχείο αυτό μπορεί να είναι «κρυφό» (hidden) Ομοιότητα με τους ιούς file system: δε μολύνουν τα αρχεία καθ’ αυτά Τρόποι Μετάδοσης Με αποθηκευτικά μέσα (μαγνητικά-οπτικά) ή μέσω δικτύου

19 Άλλοι «Κλασσικοί Ιοί» Ιοί Συστήματος Αρχείων και Flash Bios
Ιοί Συστήματος Αρχείων (file system virus). Τροποποίηση του Πίνακα Καταχώρησης Αρχείων (FAT -File Allocation Table) Γνωστοί και ως (link virus), (cluster virus), (FAT virus) Αλλαγή του συνδέσμου που «δείχνει» προς ένα πρόγραμμα, ώστε να «δείχνει» στη συστοιχία (cluster) όπου αρχίζει ο κώδικας του ιού Εκτελείται ο ιός αντί για το πρόγραμμα Δεν μολύνεται το πρόγραμμα καθ’ αυτό Πρόδρομοι των σημερινών ιών τύπου rootkit - stealth Μελέτη περίπτωσης: DIR-II Flash Bios. Αντικατάσταση (ovewriting) του BIOS Απρόβλεπτες συνέπειες ή/και αδυναμία εκκίνησης του Η/Υ Μελέτη Περίπτωσης: CIH/Chernobyl (1999) Κλασσικοί Ιοί – Ιοί Συστήματος Αρχείων (File System). Οι ιοί τύπου Link, γνωστοί και ως Cluster, FAT, ή ιοί «file system», δεν συμπεριφέρονται όπως οι παραδοσιακοί ιοί, δηλαδή δεν μολύνουν τον κώδικα εκτελέσιμων ή άλλων αρχείων. Έχουν ωστόσο τη δυνατότητα να παρεμβάλλονται κατά την κλήση ενός προγράμματος και να εκτελούν τον καταστρεπτικό τους κώδικα. Για να το επιτύχουν αυτό, τροποποιούν τον πίνακα FAT του Η/Υ. Ο πίνακας FAT είναι ένας πίνακας στο σκληρό δίσκο στον οποίο είναι καταχωρημένη η ακριβής θέση (διεύθυνση) του κάθε αρχείου στο δίσκο. Το Λ.Σ. χρησιμοποιεί τον πίνακα FAT για να οργανώσει τα αρχεία στο δίσκο, καθώς και κάθε φορά που γίνεται κλήση ενός αρχείου. Ο ιός file system αλλάζει τον πίνακα διευθύνσεων ώστε όταν ζητείται η εκτέλεση του «μολυσμένου» προγράμματος Χ, το Λ.Σ. παραπέμπεται στη θέση Υ όπου βρίσκεται ο κώδικας του ιού, ο οποίος στη συνέχεια φορτώνεται στη μνήμη και εκτελείται. Πέρα από τις όποιες άλλες παρενέργειες, από τη θέση αυτή ο ιός έχει τη δυνατότητα να μολύνει όλα τα προγράμματα που θα εκτελεστούν στη συνέχεια από τον χρήστη. Συνήθως οι ιοί file system εμφανίζουν χαρακτηριστικά ιών stealth: αφού παρεμβληθούν κατά την εκτέλεση ενός προγράμματος και απελευθερώσουν το φορτίο τους, στη συνέχεια φορτώνουν και εκτελούν το πρόγραμμα που είχε ζητηθεί αρχικά (Μελέτη περίπτωσης: Ο ιός DIR-II). Ιοί Flash Bios. Σημείωση: Οι κατασκευαστές μητρικών αποθηκεύουν το πρόγραμμα BIOS σε ένα ολοκληρωμένο (chip) μνήμης flash ROM. Η μνήμη αυτή είναι επανεγγράψιμη (rewritable). Οι ιοί flash BIOS αντικαθιστούν (ovewriting) το λογισμικού BIOS στην μητρική πλακέτα. To αποτέλεσμα της «μόλυνσης» είναι καταστρεπτικό (π.χ. διαγραφή των περιεχομένων του σκληρού δίσκου). O ιός CIH (1999 – Πηγή: McAfee Inc. AVERT library) είναι το χαρακτηριστικό παράδειγμα ενός ιού που τροποποιούσε τον κώδικα του προγράμματος BIOS. Σε μια από (τις αρκετές) εκδόσεις του ο ιός περιείχε μια «λογική βόμβα»: στις 26 Απριλίου ενεργοποιούνταν το φορτίο και δεν μπορεί να γίνει εκκίνηση του συστήματος. Σε ορισμένες περιπτώσεις κρίνεται απαραίτητη η αντικατάσταση του chip ή ακόμα και της ίδιας της μητρικής πλακέτα (motherboard).

20 Μακρό - Ιοί (Macro viruses)
Δημιουργούνται με γλώσσες σεναρίων (scripting languages) Χρήση διερμηνέα (interpreter) αντί για μεταγλωττιστή (compiler) Ανεξαρτησία από πλατφόρμα (platform independent) Τα σενάρια (scripts) συχνά ονομάζονται μακρο-εντολές (macros) Αυτοματοποίηση ενεργειών & αποθήκευση με τα αρχεία Αφορούν: Επεξεργαστές κειμένου, DBMS, υπολογιστικά φύλλα Μολύνουν αρχεία δεδομένων (και όχι προγράμματα) Μεταδίδονται πιο εύκολα, αφού τα έγγραφα ανταλλάσσονται συχνότερα σε σχέση με τα προγράμματα Μελέτη περίπτωσης: Melissa (1999) Κλασσικοί Ιοί - Μακρο-Ιοί. Οι ιοί αυτής της κατηγορίας προσβάλλουν αρχεία δεδομένων που περιέχουν μακροεντολές. Οι μακρο-εντολές είναι κώδικας εντολών, γραμμένος σε μια γλώσσα συγγραφής σεναρίων (scripting language) – π.χ. VBA (Visual Basic for Applications) και χρησιμοποιούνται σε συγκεκριμένα προγράμματα (κυρίως προγράμματα εφαρμογών γραφείου – Office: Word, Excel, Office, PowerPoint, Access) για την αυτοματοποίηση ορισμένων από τις λειτουργίες που εκτελεί ο χρήστης. Για παράδειγμα, μπορούμε να δημιουργήσουμε μια μακροεντολή στο Microsoft Word ώστε με το πάτημα ενός πλήκτρου, να εκτελεί ταυτόχρονα τις ακόλουθες λειτουργίες: α) Επιλογή του κειμένου, β) γραμματοσειρά: Arial, και γ) Μέγεθος γραμματοσειράς: 14. Οι μακροεντολές αποθηκεύονται μαζί με το αρχείο δεδομένων στο δίσκο. Στον αντίποδα, οι μακρο-ιοί είναι μακροεντολές που αυτοματοποιούν ένα σύνολο από καταστροφικές ενέργειες: όταν π.χ. σε έναν επεξεργαστή κειμένου εκτελεστεί η μακροεντολή ενός μολυσμένου εγγράφου, ο ιός ενεργοποιείται και απελευθερώνει το καταστροφικό του φορτίο. Η δημοτικότητα των εφαρμογών γραφείου, έχουν συνεισφέρει κατά πολύ στην εξάπλωση αυτού του είδους των ιών. Επίσης, ο κώδικας που δημιουργείται από μια γλώσσα συγγραφής σεναρίων, μπορεί να εκτελεστεί σε όλες τις πλατφόρμες (platform-independent): ένας μακρο-ιός μπορεί να εκτελεστεί σε ένα PC και σε ένα MAC. Τρόπος μόλυνσης: Λήψη και άνοιγμα εγγράφου που περιέχει μακρο-εντολές. Οι περισσότερες μακρο-εντολές ενεργοποιούνται με το άνοιγμα ενός εγγράφου – Auto-open (Στις τελευταίες εκδόσεις των εφαρμογών γραφέιο, ο χρήστης προειδοποιείται για την ύπαρξη τέτοιων εντολών) Τρόπος αναπαραγωγής: Ο μακρο-ιός συνήθως είναι προγραμματισμένος να μετατρέπει τα μολυσμένα έγγραφα σε πρότυπα (templates) ώστε να μολυνθούν όλα τα έγγραφα που θα δημιουργήσει μελλοντικά ο χρήστης. Τρόπος μετάδοσης: Με αφαιρούμενα αποθηκευτικά μέσα ή μέσω δικτύου (Μελέτη περίπτωσης: ο Melissa – 1999, έστελνε τον εαυτό του μέσω , με τη μορφή ενός εγγράφου Word με ενσωματωμένες μακροεντολές).

21 O ιός Melissa (1999)

22 O ιός Melissa (1999) Mακρο-ιός με στοιχεία Worm.
Όταν το θύμα ανοίγει το .doc ο ιός μολύνει το πρότυπο normal.dot Μόλυνση μελλοντικών εγγράφων word. O Melissa στέλνει τον εαυτό του ( ) στις πρώτες 50 διευθύνσεις του address book. Ο ιός είχε ως στόχο επίθεση άρνησης εξυπηρέτησης (DOS) στους mail servers. O ιός δε μόλυνε προγράμματα (όπως οι file-infecting ιοί) αλλά μόνο έγγραφα κειμένου

23 2. Worms & Bots

24 1. «Σκουλήκια» (Worms) -Γενικά
Αρχική Μόλυνση Εκμετάλλευση ανθρώπινου παράγο-ντα ή ευπαθειών προγραμμάτων Εξάπλωση & Μετάδοση Συνήθως αυτόματα, μέσω δικτύου Mail worms, Scanning Worms,.. Σκουλήκια- Worms. Τα worms δεν προσκωλλόνται σε άλλα αρχεία για να επιβιώσουν, αλλά λειτουργούν ως αυτόνομα προγράμματα: Το κύριο χαρακτηριστικό τους είναι πως ενσωματώνουν κώδικα για τον πολλαπλασιασμό – μετάδοση τους σε άλλους Η/Υ, σε αντίθεση με τους παραδοσιακούς ιούς που απαιτούν την ανθρώπινη συμμετοχή για τη μετάδοση τους. Για τη μετάδοση του χρησιμοποιούν είτε συμβατικές μεθόδους ( , IRC, αντιγραφή του ιού στον κοινόχρηστο φάκελο του δικτύου LAN ή του δικτύου P2P), είτε, στην πιο επικίνδυνη τους μορφή εκμεταλλεύονται ευπάθειες των λειτουργικών συστημάτων ή/και των δικτυακών εφαρμογών που εκτελούνται σε δικτυωμένων Η/Υ. Παρενέργειες: Οι παρενέργειες των worms ποικίλλουν, ωστόσο στην πλειονότητα τους, όπως φαίνεται και από τις περισσότερες μελέτες περιπτώσεων, στοχεύουν κατά της διαθεσιμότητας των συστημάτων. Σημείωση: Υπερχείλιση Καταχωρητή. Η υπερχείλιση καταχωρητών μπορεί να έχει ποικίλα αποτελέσματα: την αναστολή λειτουργίας μιας υπηρεσίας, ή την εκτέλεση κακόβουλου κώδικα με δικαιώματα administrator. Οι επιθέσεις αυτές οφείλονται στη λανθασμένη διαχείριση μνήμης από τους προγραμματιστές εφαρμογών. Όταν μια ποσότητα πληροφορίας δίνεται ως είσοδος (input) σε ένα πρόγραμμα, το πρόγραμμα θα πρέπει να συγκρατήσει την πληροφορία σε συγκεκριμένα όρια στη μνήμη του συστήματος. Εάν, λόγω κακής συγγραφής του κώδικα, κάτι τέτοιο δεν είναι εφικτό, τότε ένας εισβολέας μπορεί να εκτελέσει, μέσω δικτύου, τον κώδικα της αρεσκείας του σε έναν σταθμό εργασίας: Αυτό γίνεται δίνοντας ως input ποσότητα πληροφορίας που υπερβαίνει τη μέγιστη ποσότητα που μπορεί να διαχειριστεί το πρόγραμμα. Το Λ.Σ. μεταφέρει την «περισσευούμενη» πληροφορία σε μια γειτονική θέση μνήμης, επικαλύπτοντας (overwriting) δεδομένα που βρίσκονται εκεί. Εάν η γειτονική αυτή θέση μνήμης περιέχει εκτελέσιμο κώδικα, τότε ο εισβολέας, δίνοντας το κατάλληλο input στο πρόγραμμα, μπορεί να εκτελέσει τον κώδικα της αρεσκείας του. Αυτό-μεταδιδόμενος κώδικας (συνήθως μικρού μεγέθους) με σκοπό τη γρήγορη εξάπλωση Μικρή ή μηδενική ανάμειξη ανθρώπινου παράγοντα κατά τη μετάδοση

25 «Σκουλήκια» (Worms) Διαφορές με ιούς
Ένα πρόγραμμα που προσκολλάται σε άλλα προγράμματα, θεωρείται ιός. Όταν ταξιδεύει μόνο του, θεωρείται σκουλήκι.. «Σκουλήκια» (Worms) Διαφορές με ιούς Ένα worm είναι αυτόνομος κώδικας (stand-alone app), Δεν προσκολλάται σε άλλα προγράμματα (ξενιστές) για να επιβιώσει Δεν μολύνει προγράμματα ή αρχεία, αλλά Η/Υ Στέλνει αντίγραφα του εαυτού του για να εκτελεστεί σε άλλους Η/Υ Διαθέτει ικανότητες αυτομετάδοσης από Η/Υ σε Η/Υ Οι ιοί αυτό-αναπαράγονται από πρόγραμμα σε πρόγραμμα, ωστόσο για τη μετάδοση τους σε άλλους Η/Υ απαιτείται ανθρώπινη παρέμβαση Κυρίως επιθέσεις στη Διαθεσιμότητα των συστημάτων The Internet Worm (1988) ILOVEYOU (2000), ANNAKOURNIKOVA.JPG.VBS (2001), Code Red (2001), Blaster, Slammer (2003), MyDoom (2004)

26 «Σκουλήκια» (Worms) Φορτίο (Payload)
Άρνηση εξυπηρέτησης (π,χ, bandwidth, υπολογιστικών πόρων φόρτος σε mail servers) Δημιουργία κερκόπορτας με σκοπό την εξ’ αποστάσεως διαχείριση Δημιουργία δικτύων Botnets Κακόβουλο φορτίο (π.χ. αλλοίωση, διαγραφή) Περίπτωση: Witty, Nyxem,… Σκουλήκια- Worms. Τα worms δεν προσκωλλόνται σε άλλα αρχεία για να επιβιώσουν, αλλά λειτουργούν ως αυτόνομα προγράμματα: Το κύριο χαρακτηριστικό τους είναι πως ενσωματώνουν κώδικα για τον πολλαπλασιασμό – μετάδοση τους σε άλλους Η/Υ, σε αντίθεση με τους παραδοσιακούς ιούς που απαιτούν την ανθρώπινη συμμετοχή για τη μετάδοση τους. Για τη μετάδοση του χρησιμοποιούν είτε συμβατικές μεθόδους ( , IRC, αντιγραφή του ιού στον κοινόχρηστο φάκελο του δικτύου LAN ή του δικτύου P2P), είτε, στην πιο επικίνδυνη τους μορφή εκμεταλλεύονται ευπάθειες των λειτουργικών συστημάτων ή/και των δικτυακών εφαρμογών που εκτελούνται σε δικτυωμένων Η/Υ. Παρενέργειες: Οι παρενέργειες των worms ποικίλλουν, ωστόσο στην πλειονότητα τους, όπως φαίνεται και από τις περισσότερες μελέτες περιπτώσεων, στοχεύουν κατά της διαθεσιμότητας των συστημάτων. Σημείωση: Υπερχείλιση Καταχωρητή. Η υπερχείλιση καταχωρητών μπορεί να έχει ποικίλα αποτελέσματα: την αναστολή λειτουργίας μιας υπηρεσίας, ή την εκτέλεση κακόβουλου κώδικα με δικαιώματα administrator. Οι επιθέσεις αυτές οφείλονται στη λανθασμένη διαχείριση μνήμης από τους προγραμματιστές εφαρμογών. Όταν μια ποσότητα πληροφορίας δίνεται ως είσοδος (input) σε ένα πρόγραμμα, το πρόγραμμα θα πρέπει να συγκρατήσει την πληροφορία σε συγκεκριμένα όρια στη μνήμη του συστήματος. Εάν, λόγω κακής συγγραφής του κώδικα, κάτι τέτοιο δεν είναι εφικτό, τότε ένας εισβολέας μπορεί να εκτελέσει, μέσω δικτύου, τον κώδικα της αρεσκείας του σε έναν σταθμό εργασίας: Αυτό γίνεται δίνοντας ως input ποσότητα πληροφορίας που υπερβαίνει τη μέγιστη ποσότητα που μπορεί να διαχειριστεί το πρόγραμμα. Το Λ.Σ. μεταφέρει την «περισσευούμενη» πληροφορία σε μια γειτονική θέση μνήμης, επικαλύπτοντας (overwriting) δεδομένα που βρίσκονται εκεί. Εάν η γειτονική αυτή θέση μνήμης περιέχει εκτελέσιμο κώδικα, τότε ο εισβολέας, δίνοντας το κατάλληλο input στο πρόγραμμα, μπορεί να εκτελέσει τον κώδικα της αρεσκείας του. Ψευδοκώδικας του Witty worm

27 «Σκουλήκια» (Worms) Μετάδοση
Αυτό-μεταδιδόμενα (self-replicating) προγράμματα π.χ. στέλνοντας σε όσους βρίσκουν στο βιβλίο επαφών Επιτίθενται σε ευπαθείς δικτυακές εφαρμογές ή ευπαθείς υπηρεσίες & πρωτόκολλα Λειτουργικών Συστημάτων Επιθέσεις σε hosts στο LAN ή σε απομακρυσμένους Η/Υ στο Internet Π.χ. Επιθέσεις Υπερχείλισης - buffer overflow (Περιπτώσεις blaster, Slammer, Code red…) Χρήση κοινόχρηστων αρχείων και φακέλων στο LAN Χρήση λειτουργιών προγραμμάτων συνομιλίας (IRC ή IΜ) Χρήση προγραμμάτων ανταλλαγής αρχείων P2P Σκουλήκια- Worms. Τα worms δεν προσκωλλόνται σε άλλα αρχεία για να επιβιώσουν, αλλά λειτουργούν ως αυτόνομα προγράμματα: Το κύριο χαρακτηριστικό τους είναι πως ενσωματώνουν κώδικα για τον πολλαπλασιασμό – μετάδοση τους σε άλλους Η/Υ, σε αντίθεση με τους παραδοσιακούς ιούς που απαιτούν την ανθρώπινη συμμετοχή για τη μετάδοση τους. Για τη μετάδοση του χρησιμοποιούν είτε συμβατικές μεθόδους ( , IRC, αντιγραφή του ιού στον κοινόχρηστο φάκελο του δικτύου LAN ή του δικτύου P2P), είτε, στην πιο επικίνδυνη τους μορφή εκμεταλλεύονται ευπάθειες των λειτουργικών συστημάτων ή/και των δικτυακών εφαρμογών που εκτελούνται σε δικτυωμένων Η/Υ. Παρενέργειες: Οι παρενέργειες των worms ποικίλλουν, ωστόσο στην πλειονότητα τους, όπως φαίνεται και από τις περισσότερες μελέτες περιπτώσεων, στοχεύουν κατά της διαθεσιμότητας των συστημάτων. Σημείωση: Υπερχείλιση Καταχωρητή. Η υπερχείλιση καταχωρητών μπορεί να έχει ποικίλα αποτελέσματα: την αναστολή λειτουργίας μιας υπηρεσίας, ή την εκτέλεση κακόβουλου κώδικα με δικαιώματα administrator. Οι επιθέσεις αυτές οφείλονται στη λανθασμένη διαχείριση μνήμης από τους προγραμματιστές εφαρμογών. Όταν μια ποσότητα πληροφορίας δίνεται ως είσοδος (input) σε ένα πρόγραμμα, το πρόγραμμα θα πρέπει να συγκρατήσει την πληροφορία σε συγκεκριμένα όρια στη μνήμη του συστήματος. Εάν, λόγω κακής συγγραφής του κώδικα, κάτι τέτοιο δεν είναι εφικτό, τότε ένας εισβολέας μπορεί να εκτελέσει, μέσω δικτύου, τον κώδικα της αρεσκείας του σε έναν σταθμό εργασίας: Αυτό γίνεται δίνοντας ως input ποσότητα πληροφορίας που υπερβαίνει τη μέγιστη ποσότητα που μπορεί να διαχειριστεί το πρόγραμμα. Το Λ.Σ. μεταφέρει την «περισσευούμενη» πληροφορία σε μια γειτονική θέση μνήμης, επικαλύπτοντας (overwriting) δεδομένα που βρίσκονται εκεί. Εάν η γειτονική αυτή θέση μνήμης περιέχει εκτελέσιμο κώδικα, τότε ο εισβολέας, δίνοντας το κατάλληλο input στο πρόγραμμα, μπορεί να εκτελέσει τον κώδικα της αρεσκείας του.

28 2. E-Mail Worms mail server Μολυσμένος Η/Υ Από x προς a Από x προς b
Χρήστης: Ανοίγει συνημμένο αρχείο Από x προς c infected computer infected computer c Μολυσμένοι Η/Υ b a

29 ANNAKOURNIKOVA.JPG.VBS (2001),

30 Τοπολογία Δικτύου Εξάπλωσης: Οι γείτονες του δικτύου είναι οι «διευθύνσεις» ηλεκτρονικής αλληλογραφίας στο βιβλίο διευθύνσεων του θύματος…

31 Μελέτη Περίπτωσης: «Σκουλήκι» ILOVEYOU
Μόλυνση: εκτέλεση συν. αρχείου Αναπαραγωγή: Εντοπίζει αρχεία .JPG, JPEG, MP3, MP2, VBS, JS, και τα αντικαθιστά με αντίγραφο του, με κατάληξη .vbs tec_n/f_il0005iloveyou.htm Προσθέτει την ακόλουθη εγγραφή στο Μητρώο του συστήματος HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices\ Win32DLL=WINDOWS\Win32DLL.vbs Μετάδοση Το worm στέλνει τον εαυτό του στις επαφές του βιβλίου διευθύνσεων Επίσης χρησιμοποιεί λογισμικό IRC client (εάν είναι εγκατεστημένο) Εξάπλωση: 45 εκ. χρήστες έλαβαν το σε μία ημέρα (2000)

32 3. Scanning Worms IPv4 space Random Scanning Local Preference
Περιπτώσεις: Slammer, Code Red Ι,… Local Preference Το σκουλήκι επιλέγει με μεγαλύτερη πιθανότητα μια διεύθυνση από το ίδιο δίκτυο (π.χ. /16 ή /32) Περιπτώσεις: Blaster, Code Red II,… IPv4 space Ένα «Μελλοντικό» worm Εφοδιασμένο με λίστα (hitlist) από «γνωστές» διευθύνσεις κόμβων με ευπαθές λογισμικό Flash Worm [Staniford et al 2002]

33 Μελέτη Περίπτωσης: The Internet Worm (1988)
Μόλυνση & Μετάδοση: Εκμετάλλευση ευπάθειας των προγραμμάτων fingerd & sendmail σε συστήματα UNIX Π.χ. Επίθεση στο fingerd Επίθεση υπερχείλισης καταχωρητή (buffer overflow) στο σύστημα που «τρέχει» το fingerd Το worm εκτελείται ως root και εγκαθίσταται στο σύστημα Στη συνέχεια επιτίθεται σε άλλα συστήματα Από λάθος, το worm επιτιθόταν σε Η/Υ που είχαν ήδη μολυνθεί! 6.000 υπολογιστές (10% του Internet) κατέρρευσαν

34 Μελέτη Περίπτωσης: Code Red I και ΙΙ (2001)
bulletins/l-117.shtml bulletins/l-117.shtml Μόλυνση Υπερχείλιση καταχωρητή (IIS Web server 4.0) Μετάδοση Δημιουργία λίστας τυχαίων IP διευθύνσεων και απόπειρα μόλυνσης Φορτίο Επίθεση στο whitehouse.gov (Code Red I) μολύνσεις- 14 ώρες ( CERT)

35 Slammer (Sapphire) Worm- January 25, 2003
74855 μολυσμένοι κόμβοι μέσα σε 30 λεπτά !! – Το πλέον «γρήγορο» σκουλήκι μέχρι σήμερα

36 Slammer Worm Μόλυνση Μετάδοση Ταχύτατη εξάπλωση Φορτίο
Υπερχείλιση (SQL server) Μετάδοση Δημιουργία λίστας τυχαίων IP διευθύνσεων Αποστολή ενός πακέτου 376-bytes στην θύρα UDP/1434 για κάθε διεύθυνση IP της λίστας Χρήση πρωτοκόλλου UDP στο επίπεδο μεταφοράς Φορτίο Όχι κακόβουλο Ταχύτατη εξάπλωση ανιχνεύσεις το δευτερόλεπτο !! Ο μολυσμένος πληθυσμός διπλασιάζεται κάθε 8.5 ’’ 90% των ευπαθών συστημάτων μολύνθηκαν σε 10’ από την εμφάνιση του worm

37 Blaster (worm) – Αύγουστος 2003

38 Μελέτη Περίπτωσης: Blaster (worm)
Μόλυνση & Μετάδοση: Αυτόματη (μέσω δικτύου) Λ.Σ.: Windows 2000 & Windows XP Ευπάθεια: υπηρεσία RPC (135 TCP) Υπερχείλιση καταχωρητή (buffer overflow) Λήψη και εκτέλεση του worm (msblast.exe) Υπηρεσία tftp – (69 UDP) Φορτίο (Payload) Αλλαγή του Μητρώου.. Λογική Βόμβα: Επίθεση (DDOS) στο windowsupdate.com στις 16– Μήνυμα σφάλματος στην υπηρεσία RPC  Επανεκκίνηση Αντιμετώπιση Απαιτείται και ενημέρωση του Λ.Σ. (patch) Ωστόσο το ευπαθές σύστημα που συνδέεται στο δίκτυο υφίσταται (από γειτονικούς, μολυσμένους κόμβους) επιθέσεις υπερχείλισης  επανεκκίνηση Μελέτη περίπτωσης: Τo σκουλήκι Blaster. Προκειμένου να μεταδοθεί το worm εξαπέλυε μια επίθεση τύπου buffer overflow στην υπηρεσία DCOM RPC σε λειτουργικά συστήματα Windows XP Και Windows Ένας μολυσμένος Η/Υ (HOST) στέλνει στέλνει πακέτα δεδομένων στη θύρα 135 (TCP) σε έναν Η/Υ – ΣΤΟΧΟ, προκαλώντας υπερχείλιση καταχωρητή. Το αποτέλεσμα της υπερχείλισης είναι η δημιουργία «κερκόπορτας» (remote shell) στη θύρα 4444 του ΣΤΟΧΟΥ. Ο HOST στέλνει μια εντολή «tftp get» στον ΣΤΟΧΟ μέσω της διαθέσιμης κερκόπορτας. Ο ΣΤΟΧΟΣ συνδέεται μέσω της υπηρεσίας tftp (trivial file transfer service) στη θύρα 69 (TCP) του HOST, και μεταφέρει το αρχείο msblast.exe. Παράλληλα, τροποποιείται το Μητρώο (registry) του ΣΤΟΧΟΥ ώστε το msblast.exe να εκτελείται κατά την εκκίνηση του συστήματος. Ο Η/Υ έχει μολυνθεί: όταν εκκινηθεί πάλι, θα αναλάβει το ρόλο του HOST ώστε ο ιός να πολλαπλασιαστεί μέσα στο δίκτυο. Σημείωση: Η υπηρεσία RPC. Η υπηρεσία RPC (Remote Procedure Call) χρησιμοποιείται από κατανεμημένες δικτυακές εφαρμογές client-server για να ανταλλάξουν δεδομένα. Μια διαδικασία (process) Α που εκτελείται ως τμήμα μιας εφαρμογής ενός Η/Υ μπορεί να επικοινωνήσει με μια άλλη διαδικασία Β μιας διαφορετικής εφαρμογής ενός άλλου Η/Υ χρησιμοποιώντας την υπηρεσία RPC. Δυσκολία καταπολέμησης του worm. H δυσκολία καταπολέμησης του Blaster βασιζόταν στο γεγονός ότι ο μολυσμένος Η/Υ δεν μπορούσε να συνδεθεί στο δίκτυο προκειμένου να λάβει την επιδιόρθωση (patch) από τη Microsoft. Για να αντιμετωπιστεί η κατάσταση, θα έπρεπε να ακολουθηθούν τα εξής βήματα (Πηγή: CERT): O H/Y αποσυνδέεται με φυσικό τρόπο από το δίκτυο Μέσα από τη Διαχείριση Εργασιών (Task Manager) των Windows, τερματισμός της εφαρμογής msblast.exe Απενεργοποίηση της υπηρεσίας RPC, ή Ενεργοποίηση του firewall του συστήματος, ώστε να φιλτράρει τα αιτήματα σύνδεσης στη θύρα (port) 135/TCP Σύνδεση του συστήματος στο δίκτυο, και λήψη της επιδιόρθωσης από το δικτυακό τόπο της Microsoft Σημείωση: Προγράμματα antivirus με ανανεωμένη (update) τη βάση δεδομένων τους ανίχνευαν τον ιό (εμποδίζοντας έτσι την εγκατάσταση του msblast.exe) ωστόσο, εάν η επιδιόρθωση (patch) των windows δεν ήταν εγκατεστημένη, τότε το σύστημα ήταν ευάλωτο στην επίθεση τύπου buffer overflow.

39 MyDoom (worm) vil.nai.com/vil/ content/v_ htm

40 Μελέτη Περίπτωσης: MyDoom (worm) - 2004
Μόλυνση: λήψη παραπλανητικού και εκτέλεση συν. αρχείου Μετάδοση: μέσω ΚΑΙ μέσω δικτύων P2P Αποστολή στις επαφές του βιβλίου διευθύνσεων Αντιγραφή του worm στο διαμοιραζόμενο φάκελο του KAZAA Φορτίο (Payload) Αλλαγή στο Μητρώο… «Κερκόπορτα» (backdoor) – στη θύρα 3127 (TCP) Επίθεση (DDOS) στον δικτυακό τόπο (στις 1 ΦΕΒ 2004) Παραλλαγές του worm: Επίθεση σε μηχανές αναζήτησης (26 ΙΟΥΛ)

41 Περίπτωση: Το Σκουλήκι Nimda (2001)

42 To Σκουλήκι QuickTime - XSS
Κατηγορία: XSS (Cross-Site Scripting) Το σκουλήκι εκμεταλλεύεται Ευπάθεια στην εφαρμογή QuickTime Ευπάθεια στην εφαρμογή Web (MySpace) Αρχική Μόλυνση: Αναπαραγωγή του «κακόβουλου» αρχείου video Φορτίο: Αλλαγή προφίλ χρήστη Οι σύνδεσμοι στη σελίδα του παραπέμπουν στο phishing site Αντίγραφο κακόβουλου αρχείου video ενσωματώνεται στη σελίδα του χρήστη

43 To Σκουλήκι Warezov (2006) «Κλασσική» εξάπλωση Μετάλλαξη:
Μετά την αρχική μόλυνση, στέλνει τον εαυτό του σε χρήστες του address book Μετάλλαξη: Συνδέεται σε απομακρυσμένο server και «κατεβάζει» μια ενημέρωση του κώδικά του Πολυμορφικές Ιδιότητες ! Server-side polymorphism Ανήκει στη λεγόμενη «νέα γενιά»

44

45 Bots & Botnets Introduction
* * (Feily et al, 2009) (Bailey et al, 2009) Bots & Botnets Introduction * * (Giu et al, 2007) (Liu et al, 2009) Bots Self-propagating application that infects hosts through direct exploitation or Trojans… What makes them special? Establish Command & Control cha-nnel (C&C) for updates & direction Bots then run as an automated task over the Internet (“robot”) Infected hosts: “zombies” Botnets Many bots under control of a C&C server form a botnet Difference with worms: bots coo-perate towards a common purpose Initial Infection: How? Similar to other malware classes Scanning for vulnerabilities (like scanning worms) Send with attachments (like mail worms) File sharing, P2P networks, IM,… Drive-by downloads, Social engineering,… Combination of the above ! Other features Some bots try to evade detection like rootkits Thousands of variants * *

46 Bots & Botnets How it works: (Case) A Spamming Botnet
* A botnet operator unleashes some malware (viruses, worms or trojans) The bot is their payload ! The bot logs into a particular C&C server (e.g., IRC or Web server). A spammer purchases the services of the botnet from the operator & provides spam messages to operator Operator instructs compromised machines via the control panel on C&C server, to send out spam msgs

47 € € Botnet Attacks (Liu et al, 2009) Economics
* (Liu et al, 2009) Economics Collection of slave computing to be sold for illicit activities Spamming: About 70%-90% of spam today is due to botnets Phishing: Zombies may be used as web hosts for phishing attacks Mounting DDOS attacks: TCP SYN, UDP flooding,… Information leakage: retrieve (& sell) usernames & passwords Click Fraud: promote CTR (clickthrough rate) artificially * * * *, * *

48 Bots & Botnets Life cycle of a Bot
(Giu et al, 2007) * Cycle Target scanning infection exploit binary egg download & exec C&C channel establishment outbound scanning As with many common bots that propagate through remote exploit injection, Phatbot first (step 1) probes an address range in search of exploitable network services or responses from Trojan backdoors that may be used to enter and hijack the infected machine. If Phatbot receives a connection reply to one of the targeted ports on a host, it then launches an exploit or logs in to the host using a backdoor. In our experimental case, a Windows workstation replies to a 135-TCP (MS DCE/RPC) connection request, establishing a connection that leads to an immediate RPC buffer overflow (step 2). Once infected, the victim host is directed by an upload shell script to open a communication channel back to the attacker to download the full Phatbot binary (step 3). The bot inserts itself into the system boot process, turns off security software, probes the local network for additional NetBIOS shares, and secures the host from other malware that may be loaded on the machine. The infected victim next distinguishes itself as a bot by establishing a connection to a botnet C&C server, which in the case of Phatbot is established over an IRC channel (step 4). Finally, the newly infected bot establishes a listen port to accept new binary updates and begins scanning other external victims on behalf of the botnet (step 5).

49 Bots & Botnets Life cycle of a Bot
(Giu et al, 2007) * Cycle Target scanning infection exploit binary egg download & exec C&C channel establishment outbound scanning

50 Bots & Botnets Life cycle
(Liu et al, 2009) *

51 Taxonomy A. IRC-based botnets Client-server model
* * (Liu et al, 2009) (Zhu et al, 2006) A. IRC-based botnets Client-server model Centralized architecture Agobot (2002), SDBot (2002), SpyBot (2003), GT bot (2004) * * * Fast-flux Botnets make agile use of short-lived domains to evasively move their command-and-control (C&C) infrastructure. Fast-flux networks rapidly change DNS records to evade blacklists and resist take downs [25]. In an attempt to evade domain name blacklisting, attackers now make very aggressive use of DNS agility. The most common example of an agile malicious resource is a fast-flux network, but DNS agility takes many other forms including disposable domains (e.g., tens of thousands of randomly generated domain names used for spam or botnet C&C), domains with dozens of A records or NS records (in excess of levels recommended by RFCs, in order to resist takedowns), or domains used for only a few hours of a botnet’s lifetime. Perhaps the best example is the Conficker. C worm [15]. After Conficker.C infects a machine, it will try to contact its C&C server, chosen at random from a list of 50,000 possible domain names created every day. Clearly, the goal of Conficker.C was to frustrate blacklist maintenance and takedown efforts. Other malware that abuse DNS include Sinowal (a.k.a. Torpig) [9], Kraken [20], and Srizbi [22]. The aggressive use of newly registered domain names is seen in other contexts, such as spam campaigns and malicious flux networks [25, 19]. This strategy delays takedowns, degrades the effectiveness of blacklists, and pollutes the Internet’s name space with unwanted, discarded domains. * * B. Peer-to-Peer botnets Decentralized architecture More difficult to detect No central server to shut down C. Other HTTP-based (Rustock, Blackenergy, Conficker,… ) DNS-based (Fast-flux) * * Slaper (2002) Sinit (2003) (PKC for update auth) Phatbot (2004), Storm worm (2007) Conficker E (2009) * *, * * * * * *

52 Types of Bots * (Liu et al, 2009)

53 IRC-based Botnets The IRC Network
(Cooke et al, 2005) * (Puri, 2003) * IRC Internet protocol for (one to many) real-time chat Follows the client-server model (Legitimate) IRC-based bot Scripts that perform automated actions in response of an event Support IRC channel operations Managing access lists, moving files, sharing clients, channel information etc... (Cooke et al 2005) Studying the evolution of bots and botnets provides insight into their current capabilities. One of the original uses of computer bots was to assist in Internet Relay Chat (IRC) channel management [16]. IRC is a chat system that provides one-to-one and one-to-many instant messaging over the Internet. Users can join a named channel on an IRC network and communicate with groups of other users. Administering busy chat channels can be time consuming, and so channel operators created bots to help manage the operation of popular channels. One of the first bots was Eggdrop, which was written in 1993 to assist channel operators [1]. In time, IRC bots with more nefarious purposes emerged. The goal of these bots was to attack other IRC users and IRC servers. These attacks often involved flooding the target with packets (i.e., DoS attacks). The use of bots helped to hide the attacker because the attack packets were sent from the bot rather than directly from the attacker (assuming a non-spoofed attack). This new level of indirection also allowed multiple computers to be grouped together to perform distributed attacks (DDoS) and bring down bigger targets.

54 IRC-based Botnets (Puri, 2003) ♪ * *
A bot must communicate with a controller to receive commands or send back information. One method for establishing a communication channel is to connect directly to the controller. The problem is that this connection could compromise the controller’s location. Instead, the bot controller can use a proxy such as a public message drop point (e.g., a well-known message board). However, because websites and other drop points can introduce significant communication latency, a more active approach is desirable. A well-known public exchange point that enables virtually instant communication is IRC. IRC provides a common protocol that is widely deployed across the Internet and has a simple text-based command syntax. There are also a large number of existing IRC networks that can be used as public exchange points. In addition, most IRC networks lack any strong authentication, and a number of tools to provide anonymity on IRC networks are available. Thus, IRC provides a simple, low-latency, widely available, and anonymous command and control channel for botnet communication. An IRC network is composed of one or more IRC servers as depicted in Figure 2. In a typical botnet, each bot connects to a public IRC network or a hidden IRC server on another compromised system. The bot then enters a named channel and can receive commands directly from a controller or even from sequences encoded into the title of the channel. The bot and any other bots in the same channel can then be instructed to attack as shown in Figure 2. * (Puri, 2003) (Cooke et al, 2005) *

55 IRC-based Botnets Mitigating IRC-based botnets
(Holz et al, 2008) * Botnet tracking Step 1: Acquire and analyze a copy of a bot Use Honeypots & special analysis software Step 2: Connect to IRC channel, infiltrate & collect data from botnet Use a specially crafted IRC client Step 3: Central IRC server is taken offline by law enforcement *, *, * * The common control infrastructure of botnets in the past was based on Internet Relay Chat (IRC): The attacker sets up an IRC server and opens a specific channel in which he posts his commands. Bots connect to this channel and act upon the commands they observe. Today, the standard technique to mitigate IRCbased botnets is called botnet tracking [11, 15, 14] and includes three steps. The first step consists of acquiring and analyzing a copy of a bot. This can be achieved for example using honeypots [1] and special analysis software [4, 32]. In the second step, the botnet is infiltrated by connecting to the IRC channel with a specially crafted IRC client. Using the collected information, it is possible to analyze the means and techniques used within the botnet. More specifically, it is possible to identify the central IRC server which, in the third and final step, can be taken offline by law enforcement or other means [9]. An attacker can also use an HTTP server for distributing commands: in this setup, the bots periodically poll this server for new commands and act upon them. The botnet tracking methodology outlined above can also be applied in this scenario. *, * Hint: Use same strategy for HTTP-based botnets

56 P2P-based Botnets P2P network architecture
(Holz et al, 2008) * «Τύπου» Napster P2P network architecture All network nodes are both clients and servers Any node can provide & retrie-ve information at same time Resilience Network robust against node failures Loosely-coupled communication No consumer knows who published information they get No provider knows who gets published information The class of botnets we consider are those which use unauthenticated content-based publish/subscribe style communication. This communication paradigm is popular in many of the well-known file sharing systems like Gnutella, eMule, or BitTorrent. The characteristics of such systems are:  Peer-to-peer network architecture: These networks have in common that all network nodes are both clients and servers: Any node can provide and retrieve information at the same time. This feature makes P2P networks extremely robust against node failures, i.e., they provide high resilience.  Content-based publish/subscribe-style communication: In such systems the network nodes do not directly send information to each other. Instead, an information provider publishes a piece of information i, e.g., a file, using an identifier which is derived solely from i. An information consumer can then subscribe to certain information using a filter on such identifiers. In practice, such identifiers can be derived from specific content of i or simply computed using a hash function. The P2P system matches published information items to subscriptions and delivers the requested information to the consumer.  Unauthenticated communication: Content providers do not authenticate information, but authentication is usually implicit: If the information received by a peer matches its subscription, then it is assumed to be correct. None of the popular file sharing systems does provide authentication. Note that in such systems communication is very loosely coupled. Neither do information consumers in general know, which node published the information they receive, nor does an information provider know, which nodes will receive their published information. Both points, loose coupling and high resilience, make these networks attractive technologies for running botnets. «Τύπου» Kazaa «Τύπου» Gnutella

57 P2P-based Botnets Case: Storm Worm
♪, *, Propagation mechanism body contains a varying English text (soc. engineering) Binary installation: User opens attachment or User clicks link that exploits a browser’s vulnerability or suggests a download ! Polymorphic features Binary is always different (even from same web site) Rootkit features Goal: hide presence on host P2P characteristics File contains info on other peers Each peer is identified via a hash value and IP address/port Each infected machine has an accurate clock System time is synchronized via Network Time Protocol (NTP) Kademlia-based DHT routing for finding other bots & controller *

58 * Wikipedia

59 HTTP-based Botnets Case: Conficker Bot
(SRI, 2009) *

60 Case: Conficker Bot * (SRI, 2009)

61 Case: Conficker Bot * (SRI, 2009)

62 Case: Conficker Bot * (SRI, 2009)

63 Botnets Detection and Analysis
* * (Liu et al, 2009) (Feily et al, 2009) (Cooke et al, 2005) * Detection & Analysis Traffic analysis (at network perimeter) Monitor in-bound AND out-bound flows Signature-based , anomaly-based, behavior-based Honeypots & Honeynets Computing “baits” attract mal-ware for analysis & detection Goal: identify and take down controlling nodes Other Techniques Mining-based detection (Machine learning, clustering,… Source-code analysis DNS Tracking * * * There are mainly two approaches for botnet detection and tracking [8]. One approach is based on setting up honeynets. For instance, solutions in [4, 18] have been initial honeynet-based solutions. In addition, many papers [2,6, 7, 13, 19, 20, 21, 22, 23] discussed how to use honeynets for botnet tracking and measurement. However, honeynets are mostly useful to understand botnet technology and characteristics, but do not necessarily detect bot infection. The other approach for botnet detection is based on passive network traffic monitoring and analysis. Botnet detection techniques based on passive traffic monitoring have been useful to identify the existence of botnets. Signature-based Detection Knowledge of useful signatures and behavior of existing botnets is useful for botnet detection. For example, Snort [24] is an open source intrusion detection system (IDS) that monitors network traffic to find signs of intrusion. Like most IDS systems, Snort is configured with a set of rules or signatures to log traffic which is deemed suspicious [24]. However, signature-based detection techniques can be used for detection of known botnets. Thus, this solution is not useful for unknown bots. One of the simplest methods of detecting IRC-based botnets is to offramp traffic from a live network on known IRC ports (e.g., TCP port 6667) and then inspect the payloads for strings that match known botnet commands. Unfortunately, botnets can run on non-standard ports. Anomaly-based Detection Anomaly-based detection techniques attempt to detect botnets based on several network traffic anomalies such as high network latency, high volumes of traffic, traffic on unusual ports, and unusual system behavior that could indicate presence of malicious bots in the network [1]. One study found that bots on IRC were idle most of the time and would respond faster than a human upon receiving a command. The system they designed looked for these characteristics in Netflow traffic and attempted to tag certain connections as potential bots [17]. The approach was successful in detecting idle IRC activity but suffered from a high false positive rate. Honeypots Given problems such as false positives on live networks, another approach is to use a non-productive resource or honeypot. One group set up a vulnerable system and waited for it to be infected with a bot. They then located outgoing connections to IRC networks and used their own bot to connect back and profile the IRC server [19]. DNS-based Detection DNS-based detection techniques are based on particular DNS information generated by a botnet. DNS-based detection techniques are similar to anomaly detection techniques as similar anomaly detection algorithms are applied on DNS traffic. As mentioned in Section II, bots typically initiate connection with C&C server to get commands. In order to access the C&C server bots perform DNS queries to locate the respective C&C server that is typically hosted by a DDNS provider. Thus, it is possible to detect botnet DNS traffic by DNS monitoring and detect DNS traffic anomalies [15, 17]. *, * * * * *

64

65 Botnets Detection and Analysis
* (Feily et al, 2009)

66 Botnets Prevention and Response
* (Liu et al, 2009) * (Puri, 2003)

67 Botnets Research challenges
(Aviv & Haeberlen, 2011) * Challenges & Future research Arms race between controllers & researchers Uneven playing field Botnets are global Detectors should be global (not easy: privacy issues) Thus detectors are small-scale (not representative) Challenges & Future research Encrypted C&C channels Obfuscation (e.g., alter traffic patterns) Adaptive botnets The untraceable feature of coordinated attacks Detection of P2P botnets * * * * Uneven playing field & Representativeness (Aviv & Haeberlen, 2011) botnet controllers have, at the touch of a button, ready access to vulnerable hosts in thousands of administrative domains all across the Internet, and they can easily send data back and forth between bots in different domains. Given this global nature of botnets, it would be natural to expect that the most successful botnet detectors would also be global, in the sense that they would combine data from many different domains. However, building and experimenting with such a detector is currently not realistic, for at least two reasons. First, most administrative domains consider any detailed information about their networks to be a business secret, and researchers (unlike botnet controllers) can only obtain such information through explicit collaboration agreements, which need to be manually negotiated with every single domain. Second, network traces – the most detailed and potentially most useful type of information – can contain sensitive information and are therefore treated like information plutonium: something to be mined only when absolutely necessary, to be carefully controlled, and never to be shared with outsiders or even others within the same organization. There are good reasons for this cautious treatment of network traces: recent scandals [29, 2] have demonstrated that even carefully anonymized data can accidentally leak private information. Nevertheless, it creates an asymmetry between botnet controllers and researchers: the former have access to plenty of information, while the latter can consider themselves lucky if they can, after hours of careful negotiation, obtain a small trace from their own organization. Not only does this dearth of data hamper the effectiveness of botnet detection, it is also a major obstacle to botnet research. Since real traces are difficult to obtain, researchers must be content with evaluating their systems on a small set of traces, which is risky because high heterogeneity on the Internet [32, 9] is not well represented by limited data sets. Adaptive Botnets (Aviv & Haeberlen, 2011) Honeypot traces do provide a good estimate of the traffic generated by bots, but they are gathered in an artificial environment, e.g., on machines purposely designed to be infected, or in a controlled lab environment. As a consequence, it is difficult to be sure that the botnet behaves in the same way as it would in the wild. Some modern botnets are adaptive; for example, certain spamming bots check their blacklist status regularly [34] because their value to the botnet is proportional to their ability to send spam [40]. Hence, a bot on a blacklist may not directly engage in spamming, but may instead assume other roles in the botnet, which can be easier or harder to detect. Experimenters may create additional artifacts by removing the harmful parts of the bots before generating the trace: this prevents harm to others but could reduces the realism of the resulting trace. * *

68 Rootkits Introduction
(Arnold, 2011) * * (Levine et al, 2005) The Windows Operating System (OS), like many modern operating systems, is designed as a layered architecture. Figure 1 shows how the users and applications are shielded from the hardware details by a number of software layers in the Windows OS. The layering provides a high level of portability and extensibility, but at the same time creates a number of opportunities for attackers to compromise the system. If one of the communication paths between the layers is controlled by a malicious user, the attacker can perform activities such as keystroke logging, or become a member of a botnet that sends spam s or performs Denial of Service attacks, and not be detected by the user or the OS. Rootkits focus on these communication paths and interfaces to conceal their presence on the OS. The Intel IA32 and IA64 architectures provide several different layers of memory protection, often known as “rings” numbered 0 through 3, with Ring 0 representing the high and Ring 3 representing the lowest. Rings 1 and 2 represent privilege levels that could be used by device drivers and user programs with I/O access permissions, respectively. The idea is that system code and data can be protected from being overwritten by a program running at a lower privilege level. Windows does not take advantage of all 4 levels of protection, instead focusing the OS operation only in Ring 0 (Kernel mode) and Ring 3 (User mode). Ring 3 users are limited to using the Application Programming Interface (API) to interface with the OS kernel, and Ring 0 users can interface directly with the memory and hardware. *

69 Rootkits Introduction
* (Levine et al, 2005) Rootkits Introduction * (Shields , 2008) (Arnold, 2011) * (Joy et al, 2011) * (Wang et al, 2009) * Original Infection Rootkits typically need root-level (administrative) privileges Trojan-like: e.g., replace a program but keep functionality Functionality (after infection) Opening system backdoors Stealing private information Escalating privileges of malicious processes Disabling defense mechanisms Hide, delete logs,… Goal Hiding the existence and actions of the malware History Brain (1986): stealth code created to hide its presence Botnet by Rustock: 50% of total spam detected (30 bpd) Today Many worms, viruses & bots in-clude rootkits in their payload!! (to hide themselves) (Joy et al, 2011). Main goal of a rootkit is to conceal the evidence of intruder activities. Most rootkits need administrative level privileges to install it in the system. Usually attacker make use of some system vulnerabilities to get administrative level privileges. An ordinary user will find it difficult to detect the presence of rootkit, since he will not find any discrepancy in the behavior of the system, even if the system is infected by a rootkit. With the increasing use of operating system in smart phones and other embedded devices the threat posed by rootkits[4][27] are of great concern (Levine et al, 2005) Fred Cohen defines a computer virus as a computer program that can replicate all or part of itself and attach this replication to another program.8 The types of rootkits we target don’t typically have this capability. An ideal rootkit program that aims to replace an existing program on the target system must appear to have the original program’s functionality, while also having some additional malicious functionality. This added functionality can allow backdoor root-level access; it might also enable the program to hide specified files, processes, and network connections on the target system. Brain Infection  ( Before this virus infects diskettes, it looks for a "signature". This makes it possible to "inoculate" against it, just by putting the signature in the correct place in the boot sector. The Brain virus tries to hide from detection by hooking into INT 13. When an attempt is made to read an infected boot sector, Brain will just show you the original boot sector instead. This means that if you look at the boot sector using DEBUG or any similar program, everything will look normal, if the virus is active in memory. This means the virus is the first "stealth" virus as well.  *, * *

70 Kernel-level Rootkits Functionality
(Petroni, 2008) * Hiding (HID) Conceal info that may indicate the presence of the attacker Files, connections, processes,… Privilege Escalation (PE) Change the user ID of process to “root” or “administrator” Add capabilities to a process, change entries in ACLs,… Reentry (REE) Insert an alternate access path (backdoor) e.g., command & control (botnets) Table 2.1 contains the list of Linux kernel rootkits that we were able to obtain. The left section of the table presents the set of attack goals that we identified for each analyzed rootkit. Based on our analysis, the objectives of each rootkit fall into one or more of the following categories: user-space object hiding (HID), privilege escalation (PE), reentry/backdoor (REE), reconnaissance (REC), and defense neutralization (NEU). We discuss each category in more detail. Hiding refers to the concealment or masking of information contained in the kernel that may indicate the presence of the attacker. The concealed information typically relates to resources currently in use by the attacker, such as files, network connections, or running processes. Kernel-level objects, including modules or kernel threads, may also be hidden. In addition to hiding, many rootkits implement a mechanism for providing privilege escalation for malicious userspace processes that are controlled by the attacker. As the term “rootkit” suggests, one popular technique is to elevate priv- ilege by changing the effective user identifier of a process to that of “root” or “administrator,” thereby giving that process access to nearly all system resources. Depending on the access control mechanisms employed by the kernel, other changes might also be made. For example, attackers may add specific capabilities to a pro- cess, change entries in an access control list, or compromise some other form of security policy. In Section 6.2, we describe a simulated attack that we have imple-mented against the Security Enhanced Linux (SELinux) access vector cache (AVC). This attack is another example of kernel-level privilege escalation. Frequently, attackers insert some form of “backdoor” – an alternate access path used to reenter the system at a later time that typically bypasses authentication and authorization checks. Backdoors are useful to attackers that lose their original entry path, for example, through the patching of an existing vulnerability or the disabling of a compromised account. More generally, attackers may be interested in installing and configuring mechanisms for directing future actions or workloads to be performed by the compromised machine. We refer to such “command and control” channels collectively as reentry mechanisms. As an example of a kernel- level backdoor, consider enyelkm, a Linux kernel rootkit that initiates a root shell connection to a remote host when carefully crafted ICMP packets are received by the infected kernel. Similar remote shell functionality was found in 6 of our 25 analyzed threats. Another feature found in many attacks is reconnaissance, which refers to functionality that allows attackers to gather information from a target system. Typ- ical examples of reconnaissance include keystroke logging, packet sniffing, collecting user information (including passwords or other credentials), and file exfiltration. Several of our analyzed rootkits implemented kernel-level reconnaissance, although many others provide features, such as hiding and privilege escalation, that facilitate the stealthy use of userspace reconnaissance components. The final major category of capabilities encountered during our rootkit anal-ysis is defense neutralization. Defense neutralization mechanisms are used to effectively disable, in whole or in part, various security and safety features of the target system. As shown in Table 2.1, only one analyzed rootkit, Adore-ng, provides a feature that we classify as defense neutralization. However, features such as hid- ing and reentry can be viewed as forms of defense neutralization, because they are frequently used to prevent standard security solutions from accessing their intended targets. As an example, consider a set of malicious files that have been hidden from all processes, except those of the attacker. These files will be inaccessible to an-tivirus and filesystem integrity checkers, thereby thwarting detection. More direct attacks against system defenses are also possible, such as the elimination of kernel firewall rules or the disabling of encryption capabilities Reconnaissance (REC) Gather info from target system Key-logging, packet sniffing,… Defense neutralization (NEU) Disable security and/or safety features of target system

71 Kernel-level Rootkits Mechanism
(Petroni, 2008) * Kernel’s Machine code (TXT) Overwrite a portion of kernel’s machine instructions e.g., insert direct jumps Processor registers (REG) Manipulate registers used to control processor’s execution cs, eip, esp, idtr, sysenter, dr0-dr3 Kernel control-flow data (FP) Modify kernel function pointers Statically or dynamically allocated kernel memory As shown in the right section of Table 2.1, we classify the type of object modified as falling into one of the following categories: (1) the kernel’s machine code (also called simply “code” or “text” (TXT)), (2) processor registers (REG), (3) kernel control-flow data, such as function pointers (FP), and (4) kernel non- control data (NCD). As shown in the left side of Figure 2.1, kernel text modifications refer to a class of changes whereby, at runtime, an attacker overwrites a portion of the kernel’s machine instructions to change its functionality. For example, an attacker may add logic to an instruction sequence to insert or remove conditionals, insert directjumps to other code found elsewhere in memory, or simply overwrite text with nop instructions, effectively “whiting out” specific functionality. As shown in Table 2.1,a handful of analyzed rootkits were found to modify the kernel’s in-memory code. The remainder chose to change the kernel’s execution by targeting registers or some other memory-resident object. Most CPUs contain two types of registers – those used to perform calculations or data manipulations and those used to control the processor’s execution. Attack- ers that are able to modify the latter can manipulate kernel or userspace execution in arbitrary ways. For example, on Intel x86 processors, registers controlling the current code segment (cs) and the current instruction pointer (eip) determine the immediate set of code executing on a processor at a given time. In addition, several registers control the set of instructions that might be executed as a result of specific events — including function returns (esp), hardware interrupts and software excep-tions (idtr), system calls (sysenter), and debug breakpoints (dr0-dr3). Attackers that manipulate these registers can cause their unauthorized code to be executed in addition to, or instead of, real kernel code. One of our analyzed rootkits, Mood-NT, uses the x86 debug registers to trap reads that might detect modifications made to other parts of memory. Attackers may also influence the kernel’s execution by manipulating data val-ues in memory that are used to calculate dynamic branches at runtime. Traditional buffer overflow attacks, such as stack-smashing, represent a transient form of control- data modifications. In these attacks, return addresses or other control-related data are overwritten such that dynamic branches (e.g., ret instructions) target the wrong memory location. As shown in Table 2.1, 22 of our analyzed rootkits (88%) utilized a control-data modification attack. In all cases, these modifications were found to take the form of modified kernel function pointers. Many modern kernels utilize dynamic call targets, in the form of C language function pointers, in order to facili-tate modularity and object-oriented design. While some of these function pointers exist in the statically allocated part of kernel data, the majority are found within the many dynamic data structures allocated in the kernel’s heap. Rather than attempt to alter the set of instructions executed by the kernel, attackers may be able to achieve their objectives by simply modifying the kernel’s non-control data, thereby using built-in functionality in unexpected, surreptitious ways. As shown in Table 2.1, eight of our analyzed rootkits modify kernel non-control data. In many cases, these modifications amount to simple value changes to critical kernel identifiers such as process ids and user ids. As described previously, changing a process’s user identifier is an effective mechanism for modifying that process’s privileges in many modern kernels. More complex data changes can also be made. As we describe in detail in Section 2.2.3, one of our analyzed rootkits, hp, effectively hides processes by modifying kernel non-control data pointers. In addition to the type of the modified object, malicious modifications may be classified as either transient or persistent. Informally, transient modifications are those for which the unauthorized modification is limited to a single (or small set) of executing threads for a short period of time. In contrast, persistent modifications refer to extended periods of altered execution.3 Several examples of persistent modifications are described later in this chapter. During our analysis, we found instances of both persistent and transient changes. For each modification that we identified in columns 7–10 of Table 2.1, we also determined whether the modification is persistent, represented by a P, or transient, represented by a T. Columns with a B indicate that both persistent and transient modifications of a given type are made. We found that all of the analyzed threats make some persistent change to the kernel. Kernel non-control data (NCD) e.g. value changes to critical kernel identifiers Process ids, user ids

72 Kernel-level Rootkits HowTo: Hide a Process (Control flow)
(Petroni, 2008) * When a process requires work from the kernel, such as performing a directory listing, it makes a request via the kernel’s system call interface. In x86 Linux, system calls are initiated via the software interrupt instruction int with a parameter of 0x80.5 As shown by the lines labeled “1” in Figure 2.2, the numerical parameter identifies which interrupt handler should be executed by providing an index to the processor’s interrupt descriptor table (IDT). Because the kernel supports multiple system calls, the top-level system call handler is passed, usually in a processor register, at least one additional parameter — an integer that indicates the system call number to be executed. Using this number as an index into a table of function pointers (referred to as the “system call table”), a specific system call handler is then called. In the case of a directory listing, the sys getdents() or sys getdents64() system call is used, as shown by the lines labeled “2” in Figure 2.2. After performing a set of access checks and resolving the passed file descriptor (obtained using an earlier open() system call), sys getdents() performs a direct call (labeled “3” in Figure 2.2) to vfs readdir() in the kernel’s virtual filesystem (VFS) infrastructure. The VFS is a subsystem that provides a generic interface for executing various operations, including directory listing, for an extensible set of filesystem implementations. The proc pseudo-filesystem is one such implementation. Each implemented filesystem provides a set of callback functions, which are passed to the VFS at module initialization. As shown by the lines labeled “4” in Figure 2.2, vfs readdir() calls, via a function pointer, the particular readdir() function that has been associated with the corresponding file object at an earlier time (e.g., when the file was opened). A common set of data structures are used to pass the directory information back to userspace, regardless of the low-level implementation. In the case of proc, directory reads for the root directory are performed by the proc root readdir() function. This function identifies the list of all active processes and returns a corresponding directory entry for each PID, along with a few non-numeric entries. In order to determine the set of current PIDs, the kernel must reference its internal process accounting infrastructure. We now describe the details of Linux’s process accounting subsystem 2.2.2 Control-Flow Modifications for Process Hiding Attackers with access to kernel memory can hide a process in a number of ways. One obvious approach is simply to change the kernel’s execution along the described path so that information about the surreptitious processes is removed from (or never included in) the returned data. This can occur as a result of any of the following actions: • The attacker modifies the idtr or sysenter registers, redirecting the top-level system call handler. The new system call handler calls a modified version of sys getdents(), but the correct version of all other system calls. • The attacker modifies the in-memory interrupt descriptor table (rather than the register itself) to reference a new top-level system call handler (Figure 2.2, label “1”). • The attacker directly rewrites the text of the top-level system call handler or one of the other functions called (e.g., sys getdents(), vfs readdir(), or proc root readdir()). • The attacker modifies the system call table to redirect the call to sys getdents() to an injected function (Figure 2.2, label “2”). • The attacker modifies the function pointer referenced via the file structure for the open /proc directory entry, thereby redirecting the call to proc root readdir() to an injected function (Figure 2.2, label “4”).

73 Kernel-level Rootkits HowTo: Hide a Process (Non-Control data)
(Petroni, 2008) * The primary data structure for process management in the Linux kernel is the task struct structure [64]. All threads are represented by a task struct instance within the kernel. A single-threaded process will therefore be represented internally by exactly one task struct. Since scheduling occurs on a per-thread basis, a multi- threaded processes is simply a group of task struct objects that share certain resources such as memory regions and open files, as well as a few other properties,including a common process identifier. In a correctly-running system, all task struct objects are connected in a complex set of linked lists that represent various groupings relevant to that task at a particular time. For accounting purposes, all tasks are members of a single doubly- linked list, identified by the task struct.tasks member. This list, which we refer to as the all-tasks list, insures that any kernel function needing access to all tasks, such as proc root readdir(), can easily traverse the list and encounter each task exactly once. 2.2.3 Non-Control Data Process Hiding Attackers do not need to alter the code that the kernel executes to hide processes within a running kernel. In fact, they do not need to rely on manipulating the control flow of the kernel at all. Instead, adversaries have found techniques to hide their processes even from correct, unmodified kernel code. By directly manipulating the underlying data structures used for process accounting, an attacker can quickly and effectively remove any desired process from the view of standard, unmodified administrator tools. While the process remains hidden for accounting purposes, it continues to execute normally and will remain unaffected from the perspective of the scheduler. This technique is implemented by the hp rootkit, the only analyzed rootkit that made no kernel control-flow modifications. Figure 2.3 depicts the primary step of the attack: removing the process from the doubly-linked all-tasks list (indicated by the solid line between tasks). Since this list is used for all process accounting functions, such as the proc root readdir() call in the /proc filesystem, removal from this list provides all of the stealth needed by an adversary. For an attacker who has already gained access to kernel memory, making this modification is as simple as modifying two pointers per hidden process. As a secondary step to the attack, adversaries might also choose to remove their processes from the PID hash table (not pictured) to prevent the receipt of unwanted signals. As shown in Figure 2.3, a task not present in the all-tasks list can continue to function because the set of lists used for scheduling is disjoint from the set used for accounting. The dashed line shows the relationship between objects relevant to a particular processor’s run queue, including tasks that are waiting to be run (or are currently running) on that processor. Even though the second depicted task is no longer present in the all-tasks list, it continues to be scheduled by the kernel. Two simple changes to dynamic data therefore result in perfect stealth for the attacker, without any modifications to control data, registers, or kernel text.

74 Rootkits Taxonomy 1st Generation: User-land 2nd Generation
(Shields , 2008) * (Arnold, 2011) * (Joy et al, 2011) * 1st Generation: User-land Modified system binaries, log cleaning, library-level rootkits 2nd Generation Kernel-land Modify OS at low level to eva-de user-land based detection Kernel-mode hooking 3rd Generation Virtualization Inject stealth system at a SW layer lower than kernel Direct Kernel Object Manipulation (DKOM) Manipulate kernel data structures

75 Application-level Rootkits (user-mode)
* (Shields , 2008) (Ries, 2006) * * Techniques File Masquerading Malicious binaries that replace or modify user-level programs Malicious DIR, netstat, ps, ls,… Userland Hooks Patch, hook or replace calls to system libraries (API calls) Difference with masquerading Affect large number of binaries without modifying more than just a few libraries Userland Hooking Mechanisms IAT Hooking Modify a program’s IAT table Inline Hooking Replace original system libra-ries with modified versions Intercept request for the library API Call the original API and filter responses to hide 3.1Application Level Application level rootkits are also referred to as user-mode rootkits. Typically these rootkits consist of recompiled binaries that replace the normal system binaries and operate in a malicious manner. For example, a system file that provides a service or function to list files and folders (eg., Windows “dir” command) could be replaced with a version that filters out all of the malicious files, effectively hiding the malware from the system. The next step in the evolution of rootkits was to redirect system calls to malicious code, a technique known as “hooking” [41]. Hooking is when a given pointer to a given resource or service is redirected to a different object. For example, instead of completely replacing the file containing the “dir” command as described in the previous section, the system call can be redirected to a custom “dir” command in memory space that filters out the malicious files and folders. Basically, hooking achieves the same effect as file masquerading, but is more difficult to detect, since the system files on disk are not altered. This type of technique cannot be detected by file integrity checkers. 3.2Library Level Library rootkits are installed onto a target system and patch, hook, or replace calls to system libraries. While these types of rootkits technically reside in user space as well, we have broken them into their own category for explanatory purposes. Implementing a rootkit in this fashion allows the attacking process to stay hidden by returning modified data for requests that would reveal its existence. The primary difference between library level rootkits and other user-land rootkits is that the library based rootkits affect a large number of binaries on the system without direct modification of more than just a few libraries. By moving one step closer to the underlying operating system it’s possible to hide from multiple different programs while minimizing the level of system modifications and potential clues for an investigator. This type of rootkit system is typically deployed by modifying publicly available operating system source code to create modified system libraries that execute the required functionality of the rootkit owner. Upon deploying the rootkit to the compromised host, the original system libraries of the compromised machine are replaced with the modified versions. It is also possible to create a library modification rootkit that constantly monitors the system for new processes that require specific libraries. This technique is known as run-time library patching. Once a process is found that utilizes the library to be subverted, the rootkit intercepts the request for the library API instead executing its own code. Generally the rootkit code will call the original API and modify or filter the responses from the library to hide the existence of the rootkit and attackers files. [21]. Mechanisms IAT: One common method of userland hooking is to modify the Import Address Table (IAT) or Export Address Table (EAT) of a program or library. Each executable has an IAT that contains a list of libraries used by the executable, as well as the specific functions used from each library. When the executable is loaded into memory, all libraries listed in the IAT are also loaded into memory, and the addresses of every function used from each library are filled into the IAT. For example, if an application uses the FindFirstFile() and FindNextFile() functions discussed above, each of those functions would have their own table entry in the application’s IAT. When the application is loaded into memory, kernel32.dll would also be loaded, and the entries in the application’s IAT for FindFirstFile() and FindNextFile() would be filled in with the functions’ addresses. Every call to those functions made by the application would go through the IAT. Similarly, executables such as dynamically linked libraries (DLLs) have export address tables that contain the entry points for all functions provided by the library. Following the earlier example, this means that kernel32.dll’s EAT contains table entries for both FindFirstFile() and FindNextFile(). A rootkit can modify either the IAT or EAT to intercept calls to particular functions. The FindNextFile() function could be intercepted by modifying either an application’s IAT or kernel32.dll’s EAT in memory with the address of rootkit code. * Also known as run-time library patching *

76 Application-level Rootkits (user-mode) Inline Hooking
(Ries, 2006) * B. Another way to hook userland API functions is to use the inline hooks. This involves overwriting the first few instructions of the target function with a JMP instruction that jumps to a detour function. This detour function can then call a trampoline function. The trampoline function executes the first few instructions that were overwritten in the original function, then it jumps to the location in the original function after the overwritten bytes. When the original function returns, it returns to the detour function, which can then modify the results from the original function and return the altered results to the calling function (see Figure 3). Some of the most famous publicly available rootkits, including Hacker Defender and Vanquish (available at [28]), use this technique to hide processes, registry keys, services, files, open ports, and other malicious resources. In order to insert these hooks into a process, the process’s memory needs to be modified. The most common way of installing these hooks is to inject code into the process that performs the necessary modifications. Code injection can be accomplished a number of different ways, such as using Win32 API functions like WriteProcessMemory(), CreateRemoteThread(), and SetThreadContext(). After compromising a system an attacker could run a rootkit that injects its code into every running process. The rootkit could also monitor the system for new processes, and inject its code into them. The injected code could then utilize user-mode hooks to hide the attacker’s files, processes, and ports from the targeted process, hiding the attacker’s presence on the compromised computer. One major disadvantage of userland functions is that they are usually easy to detect. Security software could use heuristics to determine that hooks have been added, or they could simply make the request in a location that subverts the hooked function. Also, installing the hooks is usually accomplished with process injection, which is detected by a wide variety of security software, including some personal firewalls, application firewalls, and host intrusion prevention systems. Still, due to its simplicity, userland hooking is frequently used in the wild by common malware.

77 Figure 3 shows a typical path of a Windows-based function call starting at the user application and ending in the physical hardware. There are several different locations along the way that can be hooked to perform both malicious and legitimate activities. These locations include userland hooks in the Import Address Tables (IAT), the Interrupt Descriptor Table (IDT), the System Service Dispatch Table (SSDT), and device drivers via I/O Request Packets [37]. These tables maintain memory addresses that point to various functions and interrupt request handlers, which can be modified to point to malicious programs that are resident in memory. (Ries, 2006) *

78 Kernel-level Rootkits
(Shields , 2008) * (Arnold, 2011) * (Petroni, 2008) * Kernel-level Rootkits (Joy et al, 2011) * * (Levine et al, 2005) “Patching the Kernel” Loadable Kernel Modules (Unix) Extend functionality without re-compiling the kernel Added / removed on the fly Load device drivers (Windows) Kernel-mode Hooking Hijack kernel control flow Requests for kernel resources pass through a gate This gate can be hooked to point to malicious code Hooking Targets System Call Table (SSDT) Redirection of system calls to rootkit-defined code Interrupt Descriptor Table (IDT) Rootkit can execute its subversion code before SSDT Virtual File System (VFS) Overwrite handler routines, which provide directory listings Kernel level rootkits are implemented by replacing or writing new code directly into the running system kernel. This goal is typically achieved by writing device driver code for windows or by creating and implementing a Loadable Kernel Module (LKM) on a UNIX system. Kernel modification in UNIX systems is accomplished by the use of an LKM. An LKM is a kernel subsystem that can be loaded and unloaded dynamically into the running kernel after the system boot process is complete [27]. Saying differently, LKM extends the functionality of the Kernel without recompiling the kernel. Windows achieves similar functionality by loading device drivers into the kernel. [21] Both methods allow a user with administrative rights over the system to create and execute hooks directly into the running kernel. Kernel-mode Hooking As a user land request for kernel resources is invoked, there is a specific path of system calls that must occur. Hooking of any number of places along this path will result in the execution of the subverted system code in the place of the original requested functionality. At a high level, the request for kernel resources passes through a gate. This gate can be hooked to point to our malicious code via modification of system interrupt mappings or modifications to function mappings for model specific registers. A Windows specific example of kernel hooking is the common method of modification of the system service descriptor table (SSDT). The SSDT is a table in kernel memory that holds the function pointers that contain the addresses for system calls. By generating a device driver that modifies the functions pointed to by the SSDT, a rootkit can point system calls to code of its choosing. [21] A second Windows specific location of kernel hooking is modification of the Interrupt Descriptor Table (IDT). In Windows, the IDT is used to handle interrupts. The IDT tells the kernel how to handle interrupts that can be generated from any number of sources including the keyboard, mouse, or when a system call is requested from user space. When a system call is generated, the 0x2e interrupt is triggered. This triggers the SSDT to take control and execute the appropriate system call. By modifying the IDT a rootkit can effectively execute their subversion code in place of the SSDT code thus blocking or modifying the execution of the particular system call. [23] VFS can be thought of as a kernel subsystem which provides a unified API to user-space applications. The VFS is a software layer in the Linux kernel that handles all system calls related to the standard Unix file system. VFS can handle several different types of file systems.10 The adore-ng kernel-level rootkit replaces existing handler routines—which provide directory listings to the /proc and /file systems—with its own routines. This lets the attacker hide specified files and processes from user mode programs.

79 Kernel-level Rootkits
* (Kozyrakis, 2009) 4.4 Σημεία εκτροπής της ροής εκτέλεσης Τα rootkits δρουν δημιουργώντας κάποια αλλαγή στη ροής εκτέλεσης συγκεκρι-μένων λειτουργιών του πυρήνα. Η αλλαγή αυτή συμβαίνει σε πολύ συγκεκριμένα σημεία, όπου και γίνονται οι κακόβουλες τροποποιήσεις σε στοιχεία της ροής. Οι τροποποιήσεις αυτές μπορούν να γίνουν σε πολλά και διαφορετικά επίπεδα τόσο στο περιβάλλον χρήστη όσο και στο περιβάλλον πυρήνα. Τα σημεία αυτά της εκτροπής καθορίζουν τι δυνατότητες προσφέρει το rootkit στον χειριστή του, και τον τρόπο με τον οποίο μπορεί να γίνει η ανίχνευση του. Στη συνέχεια θα αναλύσουμε τα σημεία στα οποία επεμβαίνουν τα rootkits και θα παρουσιάσουμε σχηματικά την αλλοίωση που επιφέρουν στην ροή εκτέλεσης. Ο πιο κοινός στόχος είναι οι κλήσεις συστήματος. Υπάρχουν περίπου 290 κλή- σεις συστήματος σε έναν τυπικό πυρήνα έκδοσης 2.6. Θα πρέπει να σημειωθεί ότι δεν τροποποιούνται όλες οι κλήσεις συστήματος, αλλά υπάρχουν ορισμένες πολύ δημοφιλείς τις οποίες παρουσιάζουμε στον πίνακα 4.1.

80 Kernel-level Rootkits System Call Τable Ηooking
(Joy et al, 2011) * * (Levine et al, 2005) Three approaches System Call Table modification Redirect a sys_call away from legitimate sys_call e.g., Knark rootkit System Call Target modification Overwrite legitimate sys_call targets with malicious code e.g., a jmp instruction System Call Table Redirection Redirect reference to the call table to a new system call table * When a user level program access a system resource, it is accomplished through a system call. The user level application performs a system call, which passes the control to the kernel. The requested work is done by the kernel and result is passed back to the user level application. So system call is an important target for attackers. Kernel level rootkits attack System Call table by different mechanisms [15]. Three of them are listed below : System Call Table modification In this method, attacker replaces original system call with his own custom version. Mainly this is done by modifying the system call address by inserting malicious LKM’s address. Knark [7] rootkit uses this approach. System Call Target modification In this attack, legitimate code in the target address is modified. This type of attack does not modify system call table. It works by modifying the flow of control in a system call. Usually a jump instruction is used to pass the control to the malicious code. System Call Table Redirection In this method attacker replaces the call to System Call Table with his own custom version. This is usually done by overwriting the memory where System Call Table address is stored. Unlike the table modification method, this approach doesn’t modify the original system call table. It can therefore pass many currently used consistency checks. *

81 Kernel-level Rootkits System Call Τable Ηooking
* (Levine et al, 2005) Kernel-level rootkits are one of the most recent developments in the attacker community’s arsenal. The kernel is generally considered the core; that is, the lowest levelof most modern OSs. The kernel provides the file system, CPU scheduling, memory management, and system-call-related OS functions. Programs operating at user-level interface to the kernel through a system call. When an application performs a sys_call, it passes control to the kernel, which then performs the requested work and returns output to the requesting application. Therefore, system calls are one of the primary targets for kernel-level rootkit developers, but many of the kernel’s data structures and code sections can be targeted. The sys_call addresses are maintained in the kernel memory’s system call table data structure. Unlike a traditional user-level rootkit, which modifies critical system-level programs on disk, a kernel-level rootkit can replace or modify the system call table and other data structures within the kernel itself. This allows the attacker to covertly control the system. We focus on kernel- level rootkits that modify the system call table, although other kernel targets can be modified as well, including the virtual file system data structures.

82 Kernel-level Rootkits System Call Τable Ηooking
* (Kozyrakis, 2009)

83 Kernel-level Rootkits System Call Table Redirection
* (Kozyrakis, 2009)

84 Kernel-level Rootkits Hooking Interrupt Descriptor Table (IDT)
* (Kozyrakis, 2009)

85 Kernel-level Rootkits Hooking Virtual File System (VFS)
* (Kozyrakis, 2009)

86 Kernel-level Rootkits DKOM
(Arnold, 2011) * Direct Kernel Object Modification (DKOM) Direct modification of dynamic kernel data objects in memory Case: FU Rootkit (Windows) DKOM The third generation of rootkits used technique known as Direct Kernel Object Manipulation (DKOM). DKOM can manipulate kernel data structures to hide processes, change privileges, etc. For example, kernel memory must keep a list of all running processes and a rootkit can simply remove themselves and other malicious processes they wish to hide from this list. This technique is known as direct kernel object modification (DKOM). The first known rootkit to perform DKOM was the FU rootkit, which modified the EPROCESS doubly linked list in Windows to “hide” the rootkit processes. This technique took advantage of the fact that there are two separate lists for processes and threads in Windows. As shown in Figure 4, by modifying the FLINK and BLINK pointers in the EPROCESS list (and leaving the thread list alone), the rootkit was able to remove the offending process. The associated malicious threads are then allowed to continue being executed by the CPU scheduler [37]. DKOM requires a lot of reverse engineering and a detailed knowledge of OS internals, and can be very challenging to detect due to many undocumented features and the proprietary nature of the Windows source Code. *

87 Virtualized Rootkits VMM (Hypervisor) Hypervisor rootkits
* (Shields , 2008) (Joy et al, 2011) * Virtualized Rootkits (King et al, 2006) * (Wang & Jiang, 2010) * VMM (Hypervisor) Visualization platform that allows multiple OS to run Hypervisor rootkits Subvert user-land AND kernel-based detection engines e.g., BluePill, SubVirt Load host OS as guest and can monitor all host OS activities Intercept the calls from the kernel to the HW itself … even without requiring a reboot! * 3.5Virtualized Rootkits Some of the more recent research in the arena of rootkits has surrounded virtualized rootkits [3] [6] [7] [9]. The other types of rootkits, application level, library level, and even kernel mode, are limited in a few select ways. It has not been possible for other types of rootkits, with the exception of firmware rootkits, to gain a clear advantage over rootkit detection software because they operate at the same or higher layers within the operating system than their defensive counterparts. If both an attacker and a defender operate at exactly the same level, a stalemate occurs in which the attacker can modify its methods, but will be easily detected by defensive software that adds similar methods to its detection routines. The end result is a cat and mouse game of offensive modifications and defensive counter modifications. The second way in which other types of rootkits are limited is with regards to size versus functionality. The more functional the rootkit, the larger the size, and the easier it is to detect its existence. Virtualized rootkits are not limited in similar manners. [3] With the exception of firmware rootkits, virtualized rootkits are the lowest level of software rootkit in existence to date. Virtualized rootkits insert themselves into the system below that of the general operating system. Installation of the rootkit may modify the normal system boot sequence or may migrate the existing operating system into the rootkit hypervisor without requiring a reboot. To migrate an operating system into a virtual machine without requiring a reboot requires special hardware (see “Hardware Assisted Virtual Machine Rootkits” below). When the compromised system is rebooted, instead of loading the operating system, the affected system loads the virtualized rootkit which in turn loads the operating system on top of it. Because the attacker uses virtual machine technology, the users of the operating system never know that they are running in a virtual machine. The point of insertion into the system stack allows the virtualized rootkit the ability to trap, drop, create, and otherwise modify all requests to and from the hardware layer * * * (Kozyrakis, 2009) Research challenges How to trust the Hypervisor *, * *

88 Rootkits Detection Host-based Intrusion Detection
* (Shields , 2008) (Arnold, 2011) * (Joy et al, 2011) * Host-based Intrusion Detection Signature-based techniques Analyze the byte pattern to identify a unique fingerprint Integrate the fingerprint “signature” into a DB Scan the system File integrity monitoring Detect modification of sensitive binaries & libraries User and/or kernel-level Defeat user-or-kernel land rootkits that modify binaries Tripwire, Samhain, AIDE,… Hooking detection Define “normal” memory range for function pointers Tools: GMER, Rootkit Unhooker Heuristics-Based detection (or, behaviour-based) Classify malicious behavior ba-sed on pre-determined rules Goal: detect zero-day malware Drawback: false positives Signed Kernel Modules Verify signatures before install * * * 3.1 Signature-Based The most common method for detecting rootkits (and malware in general) is the signature-based technique [22]. Once a sample of malware has been obtained, the byte pattern of the software is heavily analyzed to identify a unique fingerprint that will distinguish this specific malware from legitimate software, as well as other types of malicious software. The fingerprint “signature” will then be integrated into a database that can be used by detection software when performing system scanning. If a scanned piece of software has a pattern that matches an entry in the malware database, it is extremely likely that it is malicious and should be flagged to the system and the user. While this technique has been successfully used for over twenty years, the main weakness is that it cannot detect new types of malware, until a sample can be analyzed to extract a signature. Popular programs that employ signature-based detection include the Microsoft Malicious Software Removal Tool [7], Kaspersky Internet Security [5], and Malware Bytes Anti-Malware [6], and many others. 3.2 File Integrity Monitoring File integrity monitoring is a detection technique that was first employed on UNIX systems by Tripwire in the early 1990s [15]. The method calculates cryptographic hashes for critical, unchanging operating system files and compares them to known values that are stored in a database. Typically this database is generated against a clean version of the operating system, so when a mismatch is detected, a file has been altered (likely by malicious software). This technique works well against the file masquerading rootkit design as described in Section 2.1.1, but rootkit authors quickly adapted to use hooking techniques instead. As a result, file integrity monitoring is not widely employed as a method of detection for modern anti-rootkit systems. 3.3 Hooking Detection Detection of rootkit hooking is a fairly straightforward process. The SSDT, IAT, and IDT each has a set of function pointers for each service or interrupt, which are all within a specific range in memory. When the rootkit modifies a hook to point to a malicious service or interrupt routine, the memory location almost invariably is located outside this specific range of the “clean” system, and is easily detected by anti-rootkit software. Inline function and I/O Request Packet (IRP) hooking is detected in essentially the same manner. While hooking is easily detected, it should be noted that a kernel mode rootkit can alter the results of the detection software and make it appear that everything is nominal. Hooking detection is thoroughly provided in tools such as Rootkit Unhooker [13] and GMER [24]. 3.6 Heuristics-Based Detection Heuristics-Based detection of malware attempts to classify malicious behavior according to certain pre-determined rules. For example, an application that attempts to write to an illegal memory area, modify kernel-data structures, decrypt instructions, or send a large amount of in a short period of time likely has malicious intent. One significant advantage of this detection method is that “zero-day” variants of malware can be detected, which is the weakness of the signature-based detection method. However, the big drawback to the heuristics-based method is that more false positives can be generated, thus the definition of the ruleset must be developed very carefully. Several malware detectors in this study utilize heuristics-based detection algorithms, including Malwarebytes Anti-Malware and F-Secure Internet Security. * * * * *

89 This screenshot shows a GMER scan reporting a huge list of system modifications entirely caused by either the AVAST anti-virus package installed or GMER itself. The GMER executable in this case is named yoh0wrli.exe.

90 Rootkits Detection Questions & Answers Answer 1: Move at lower level
(Arnold, 2011) * Rootkits Detection * (Shields , 2008) (Joy et al, 2011) * Questions & Answers Answer 1: Move at lower level Virtualization techniques Hardware-based (e.g., TPM ) Answer 2: Cross-View Analysis Statically compiled tools: dire-ctly review kernel mem & HW Booting from a safe medium DKOM: Thread analysis, direct heuristic memory searching Network-based detection, also using an external gateway Answer 3: Differential approach Some questions are asked to the OS on the host system Then, the system is rebooted to a secure read-only OS Typically located on a CD .. same questions are asked, look for differences (e.g., time) Answer 4: Secure Logging * If detection routine is run at kernel level, how to detect kernel-level rootkits? Answer 1 Placing rootkit detection mechanism in the monitored host itself make it more visible, and could be modifiable by advanced rootkits. So the focus moved towards placing it in system other than the monitored host. Virtualization-based detection methods work based on this principle. In virtual machine based rootkit detection, observer modules working in hypervisor mode aides in detection. They are designed based on the assumption that vworking on a layer higher than kernel helps the monitor module to efficiently track the host OS activities. Detect DKOM (Answer 2) If our detection routines are operating at the same level as the rootkit system we can only hope to analyze the system in a fashion that the rootkit does not contain anti detection routines for. If there exists an installed kernel level rootkit a detection engine can only hope to utilize a section of the kernel that has not been subverted to be able to detect the infestation. [14] There are two common detection methods for DKOM style rootkits; thread analysis and direct heuristic memory searching for blocks of data that resemble process management objects. Thread analysis detection is enumeration of every thread running on the operating system and then using that information to back track to process objects. Thread objects must contain references to the process that owns them and as such it is possible to use these references to enumerate a list of all processes on the system. If the process list that was enumerated by thread backtracking results in a different process list than standard process list walking we have encountered a situation where there is a high chance that the kernel has been directly modified. [8] This method can be subverted by a rootkit system that hides or modifies threads as well as process listings directly in the kernel. The second, and somewhat less direct approach, is creating a heuristics based system that scans the general kernel memory space looking for objects and object signatures that appear similar to those of a kernel process object. If the system finds an object that appears to be a kernel process object it can then determine it the location in memory is currently linked to the active kernel process linked list. If it is not then there is a chance that these processes block is an unlinked process that may indicate that a rootkit has attempted to hide this data from discovery. [8] Network based detection. A novel technique developed by Symantec researchers to detect the presence of a rootkit is to analyze the network traffic of the system [44]. In [44], Szor proposes to have the system periodically send a snapshot of the network traffic and open ports to a trusted gateway for analysis. The gateway will compare this data with its “external” view of the system’s network activity (e.g., using Nmap). If there are ports that are not being reported as open, or traffic that is not being reported by the host system, but is observed by the gateway, then the host system is likely infected with a rootkit. At this time, this method of detection appears to not be used by Symantec in any of their products. It is an elegant solution that has a lot of potential to uncover “zero day” rootkits that would not otherwise be detected by the traditional signature-based techniques. It should be noted that if the rootkit author communicates via covert channel techniques, this technique would not be as effective. (Answer 3) The first and most straightforward method of generically detecting rootkit systems is utilizing a differential approach. The concept is simple in explanation but may be potentially difficult in practicality. A premise of all rootkit technologies is that they lie. They fool the system, and thus its users, into believing a set of data that are not truthful. In the physical world, one way of detecting lies is to review the situation from multiple witnesses and differing angles. Any subtle difference may indicate that someone is not telling the truth. This analogy is very similar to the “diff-based” approach to detecting rootkit implementations. A number of questions are asked of the operating system while running live on the potentially compromised host system. The system is then rebooted directly to a secure read only operating system, typically located on a compact disc, and the same questions are asked of the underlying system. If there are deltas in the returned data, someone has lied. This technique is particularly useful when looking for file and data directory hiding. It doesn’t matter if the stealth system is deployed in user-land, kernel mode, or in a virtual machine, the results will differ when compared to the same questions asked from a known good secure base [2]. (Answer 2) An additional method of detection a lies being told from the operating system is to bypass as many layers as possible and directly examine the underlying hardware. This can be done while the operating system is still live and does not require a reboot to be successful. One location that many rootkits fail to execute well on is the details involved with the file system. Using statically compiled tools such as ils and fls from the Coroner’s Toolkit [31] and Sleuth Kit [32 one can directly access the disk without requiring any kernel mode or user land calls to occur, thus bypassing the higher layers. With this technique we can look at the data from a different angle and determine if any inconsistencies exist between what the operating system is telling us and what direct evidential analysis provides.[25] Along the same line of bypassing operating system layers and directly analyzing the hardware is to directly review kernel memory without actually conducting the appropriate system calls to gain access to the data. By directly reviewing memory we can see if there are deltas in the responses returned by system calls when compared with the data gathered from the memory itself. If discrepancies exist, then again we have discovered the existence of a rootkit. ( The idea is that a rootkit will not be able to hide itself when the raw hardware is scanned. If a particular file or registry key is absent from the API view but is present in the hardware view, it is highly likely that a rootkit is attempting to hide itself from the system. This technique was first used in SysInternals’ RootkitRevealer software [38], and is now used in many other detectors such as IceSword [4]. *, * * * *, * *

91 Case: Sleuthkit *

92 Rootkits Detection (Arnold, 2011) * * Detect DKOM (Answer 2)
If our detection routines are operating at the same level as the rootkit system we can only hope to analyze the system in a fashion that the rootkit does not contain anti detection routines for. If there exists an installed kernel level rootkit a detection engine can only hope to utilize a section of the kernel that has not been subverted to be able to detect the infestation. [14] There are two common detection methods for DKOM style rootkits; thread analysis and direct heuristic memory searching for blocks of data that resemble process management objects. Thread analysis detection is enumeration of every thread running on the operating system and then using that information to back track to process objects. Thread objects must contain references to the process that owns them and as such it is possible to use these references to enumerate a list of all processes on the system. If the process list that was enumerated by thread backtracking results in a different process list than standard process list walking we have encountered a situation where there is a high chance that the kernel has been directly modified. [8] This method can be subverted by a rootkit system that hides or modifies threads as well as process listings directly in the kernel. The second, and somewhat less direct approach, is creating a heuristics based system that scans the general kernel memory space looking for objects and object signatures that appear similar to those of a kernel process object. If the system finds an object that appears to be a kernel process object it can then determine it the location in memory is currently linked to the active kernel process linked list. If it is not then there is a chance that these processes block is an unlinked process that may indicate that a rootkit has attempted to hide this data from discovery. [8] Network based detection. A novel technique developed by Symantec researchers to detect the presence of a rootkit is to analyze the network traffic of the system [44]. In [44], Szor proposes to have the system periodically send a snapshot of the network traffic and open ports to a trusted gateway for analysis. The gateway will compare this data with its “external” view of the system’s network activity (e.g., using Nmap). If there are ports that are not being reported as open, or traffic that is not being reported by the host system, but is observed by the gateway, then the host system is likely infected with a rootkit. At this time, this method of detection appears to not be used by Symantec in any of their products. It is an elegant solution that has a lot of potential to uncover “zero day” rootkits that would not otherwise be detected by the traditional signature-based techniques. It should be noted that if the rootkit author communicates via covert channel techniques, this technique would not be as effective. (Answer 4) The first and most straightforward method of generically detecting rootkit systems is utilizing a differential approach. The concept is simple in explanation but may be potentially difficult in practicality. A premise of all rootkit technologies is that they lie. They fool the system, and thus its users, into believing a set of data that are not truthful. In the physical world, one way of detecting lies is to review the situation from multiple witnesses and differing angles. Any subtle difference may indicate that someone is not telling the truth. This analogy is very similar to the “diff-based” approach to detecting rootkit implementations. A number of questions are asked of the operating system while running live on the potentially compromised host system. The system is then rebooted directly to a secure read only operating system, typically located on a compact disc, and the same questions are asked of the underlying system. If there are deltas in the returned data, someone has lied. This technique is particularly useful when looking for file and data directory hiding. It doesn’t matter if the stealth system is deployed in user-land, kernel mode, or in a virtual machine, the results will differ when compared to the same questions asked from a known good secure base [2]. (Answer 3) An additional method of detection a lies being told from the operating system is to bypass as many layers as possible and directly examine the underlying hardware. This can be done while the operating system is still live and does not require a reboot to be successful. One location that many rootkits fail to execute well on is the details involved with the file system. Using statically compiled tools such as ils and fls from the Coroner’s Toolkit [31] and Sleuth Kit [32 one can directly access the disk without requiring any kernel mode or user land calls to occur, thus bypassing the higher layers. With this technique we can look at the data from a different angle and determine if any inconsistencies exist between what the operating system is telling us and what direct evidential analysis provides.[25] Along the same line of bypassing operating system layers and directly analyzing the hardware is to directly review kernel memory without actually conducting the appropriate system calls to gain access to the data. By directly reviewing memory we can see if there are deltas in the responses returned by system calls when compared with the data gathered from the memory itself. If discrepancies exist, then again we have discovered the existence of a rootkit. ( The idea is that a rootkit will not be able to hide itself when the raw hardware is scanned. If a particular file or registry key is absent from the API view but is present in the hardware view, it is highly likely that a rootkit is attempting to hide itself from the system. This technique was first used in SysInternals’ RootkitRevealer software [38], and is now used in many other detectors such as IceSword [4]. *

93 Rootkits Detection (Arnold, 2011) * Detect DKOM (Answer 2)
If our detection routines are operating at the same level as the rootkit system we can only hope to analyze the system in a fashion that the rootkit does not contain anti detection routines for. If there exists an installed kernel level rootkit a detection engine can only hope to utilize a section of the kernel that has not been subverted to be able to detect the infestation. [14] There are two common detection methods for DKOM style rootkits; thread analysis and direct heuristic memory searching for blocks of data that resemble process management objects. Thread analysis detection is enumeration of every thread running on the operating system and then using that information to back track to process objects. Thread objects must contain references to the process that owns them and as such it is possible to use these references to enumerate a list of all processes on the system. If the process list that was enumerated by thread backtracking results in a different process list than standard process list walking we have encountered a situation where there is a high chance that the kernel has been directly modified. [8] This method can be subverted by a rootkit system that hides or modifies threads as well as process listings directly in the kernel. The second, and somewhat less direct approach, is creating a heuristics based system that scans the general kernel memoryspace looking for objects and object signatures that appear similar to those of a kernel process object. If the system finds an object that appears to be a kernel process object it can then determine it the location in memory is currently linked to the active kernel process linked list. If it is not then there is a chance that these processes block is an unlinked process that may indicate that a rootkit has attempted to hide this data from discovery. [8] (Answer 4) The first and most straightforward method of generically detecting rootkit systems is utilizing a differential approach. The concept is simple in explanation but may be potentially difficult in practicality. A premise of all rootkit technologies is that they lie. They fool the system, and thus its users, into believing a set of data that are not truthful. In the physical world, one way of detecting lies is to review the situation from multiple witnesses and differing angles. Any subtle difference may indicate that someone is not telling the truth. This analogy is very similar to the “diff-based” approach to detecting rootkit implementations. A number of questions are asked of the operating system while running live on the potentially compromised host system. The system is then rebooted directly to a secure read only operating system, typically located on a compact disc, and the same questions are asked of the underlying system. If there are deltas in the returned data, someone has lied. This technique is particularly useful when looking for file and data directory hiding. It doesn’t matter if the stealth system is deployed in user-land, kernel mode, or in a virtual machine, the results will differ when compared to the same questions asked from a known good secure base [2]. (Answer 3) An additional method of detection a lies being told from the operating system is to bypass as many layers as possible and directly examine the underlying hardware. This can be done while the operating system is still live and does not require a reboot to be successful. One location that many rootkits fail to execute well on is the details involved with the file system. Using statically compiled tools such as ils and fls from the Coroner’s Toolkit [31] and Sleuth Kit [32 one can directly access the disk without requiring any kernel mode or user land calls to occur, thus bypassing the higher layers. With this technique we can look at the data from a different angle and determine if any inconsistencies exist between what the operating system is telling us and what direct evidential analysis provides.[25] Along the same line of bypassing operating system layers and directly analyzing the hardware is to directly review kernel memory without actually conducting the appropriate system calls to gain access to the data. By directly reviewing memory we can see if there are deltas in the responses returned by system calls when compared with the data gathered from the memory itself. If discrepancies exist, then again we have discovered the existence of a rootkit.

94 Rootkits Challenges Challenges
* (Shields , 2008) Challenges Migrate detection software to lower (-st) abstraction level How to trust the core of OS Anything in the kernel can be a target of kernel-level rootkits Kernel-level & VM rootkits always difficult to detect What about firmware-level rootkits Εφαρμογή Χρήστη R o o t k i t Λειτουργικό Σύστημα *, *

95

96 Δούρειοι Ίπποι (Trojan Horses)
Κακόβουλο λογισμικό, ενσωματωμένο σε φαινομενικά «ακίνδυνο» (benign) λογισμικό π.χ. Screensaver, freeware-shareware, games,… … που όμως «κρύβει» ανεπιθύμητες παρενέργειες Adware, Browser Hijackers… Spyware, Keyloggers, dialers, bots, downloaders, rootkits, back doors Διαφορά με ιούς Τα trojans συνήθως δεν έχουν μηχανισμούς αναπαραγωγής & μετάδοσης Ωστόσο συχνά αναφέρονται-αντιμετωπίζονται ως ιοί Δούρειο Ίπποι (Trojan Horses). H ονομασία παραπέμπει στον Δούρειο Ίππο που χρησιμοποίησαν οι αρχαίοι Έλληνες για να παραπλανήσουν τους Τρώες, κατά τον Τρωικό πόλεμο. Οι σύγχρονοι Δούρειοι Ίπποι στον κλάδο της Ασφάλειας Η/Υ οφείλουν την ονομασία τους στο γεγονός ότι συνήθως είναι προγράμματα χρήσιμα (ή τουλάχιστον, αυτό ισχυρίζονται), που όμως ενσωματώνουν κακόβουλο κώδικα. Για παράδειγμα ο χρήστης παροτρύνεται να δει μια φωτογραφία, ή να κατεβάσει ένα δωρεάν εργαλείο που τελικά περιέχει κακόβουλο κώδικα. Τρόπος μόλυνσης: Ανθρώπινη παρέμβαση. Σημείωση: Οι Δούρειοι Ίπποι δεν έχουν μολυσματικό χαρακτήρα, δηλαδή δεν αναπαράγονται ούτε μεταδίδονται αυτόματα. Αυτό σημαίνει πως δεν εμφανίζουν το ρυθμό εξάπλωσης άλλων κατηγοριών (π.χ. Ιοί, σκουλήκια). Ωστόσο, συχνά αναφέρονται και αντιμετωπίζονται ως ιοί. Πρέπει επίσης να λάβουμε υπ’ όψιν μας το γεγονός πως σήμερα οι Δούρειοι Ίπποι χρησιμοποιούνται (και) ως μέσο μεταφοράς για spyware, adware, dialers, Rootkits, ιούς ή σκουλήκια (εμπίπτουν δηλαδή στην κατηγορία του πολυμερούς – multipartite κακόβουλου λογισμικού).

97 Trojans - Backdoors Αρχική μόλυνση Λειτουργικότητα Περιπτώσεις
Τρόπος Α: το «φορτίο» περιέχεται σε ένα χρήσιμο πρόγραμμα Τρόπος Β: Οι χρήστες εξαπατώνται νομίζοντας ότι είναι το εν λόγω πρόγραμμα είναι χρήσιμο, και το εκτελούν Λειτουργικότητα Τα Trojans συχνά περιλαμβάνουν μη-χανισμούς διατήρησης της πρόσβασης Backdoors Περιπτώσεις Tini Netbus, Netcat Back Orifice 2000, Subseven

98 Trojan Horses Back Orifice 2000

99 Trojan Horses SubSeven

100 Trojan Horses Wrappers
Στο θύμα, το αρχείο εκτελείται ως δύο processes (μια «κρυφή» και μια «φανερή» εφαρμογή) Γνωστοί και ως wrappers, binders, packers Εργαλεία One file exe maker Yet another binder (YAB)

101 Διατήρηση της Πρόσβασης (Backdoors)
* (Kozyrakis, 2009) Δαίμονας telnet ή κέλυφος συνδεδεμένο με θύρα TCP π.χ. χρησιμοποιώντας το εργαλείο Netcat Δαίμονας SSH συνδεδεμένος με θύρα TCP Μυστικότητα & αυθεντικοποίηση Κέλυφος CGI ή PHP To θύμα είναι διακομιστής Web Ανάποδο Κέλυφος (reverse shell) Το σύστημα συνδέεται πίσω στον εισβολέα Ανάποδο κέλυφος με συρρά-γωση (reverse tunneled shell) Παράκαμψη firewall όταν έστω μία θύρα είναι ενεργοποιημένη! Κερκόπορτα βασισμένη σε πα-ρακολούθηση πακέτων δικτύου Παρακολούθηση & ενεργοποίη-ση με το «κατάλληλο» πακέτο 2.3.1 Διατήρηση της πρόσβασης Ο τυπικός τρόπος διατήρησης της πρόσβασης στο σύστημα μετά από μια επιτυχή εισβολή, και χωρίς να χρειάζεται εκ νέου εισβολή είναι μέσω προγραμμάτων “κερ-κόπορτας” (backdoors). Υπάρχουν δύο διαφορετικά είδη τέτοιων προγραμμάτων, αυτά που δρουν σε τοπικό επίπεδο στο σύστημα και επιτρέπουν την αναβάθμιση των δικαιωμάτων ενός απλού χρήστη σε δικαιώματα υπερχρήστη, και αυτά που δρουν με απομακρυσμένο τρόπο, τα οποία επιτρέπουν σε έναν απομακρυσμένο χρήστη- εισβολέα να συνδεθεί στο σύστημα. Παρακάτω θα περιγράψουμε τις βασικές τεχνικές των προγραμμάτων “κερκόπορτας” τα οποία δρουν με απομακρυ-σμένο τρόπο, κατά σειρά αυξανόμενης δυνατότητας συγκάλυψης της λειτουργίας τους από τον διαχειριστή του συστήματος. • Δαίμονας telnet ή κέλυφος συνδεδεμένο με θύρα TCP. Ο εισβολέας μετά την επίθεση μπορεί απλά να συνδέσει ένα κέλυφος ή ένα δαίμονα telnet σε μια TCP πόρτα δικτύου (συνήθως μεγάλου αύξοντα αριθμού). Με αυτό τον τρόπο θα μπορεί να επιστρέψει στο σύστημα συνδεόμενος στη συγκεκριμένη θύρα TCP μέσω Internet. O δαίμονας telnet και το κέλυφος έχουν το μειονέκτημα ότι μεταφέρουν την πληροφορία (εντολές) στο δίκτυο χωρίς καμία κρυπτο- γράφηση. Η μέθοδος αυτή είναι εύκολο να ανιχνευθεί με διάφορους τρόπους από τον διαχειριστή του συστήματος, και έχει εγκαταλειφθεί. • Δαίμονας SSH συνδεδεμένος με θύρα TCP. Είναι μια μέθοδος που χρησιμο-ποιείται από τους λιγότερο προχωρημένους εισβολείς. Παρέχει σχετικά με- γάλη συγκάλυψη του εισβολέα εξαιτίας του γεγονότος ότι η σύνδεση μεταξύ εισβολέα και παραβιασμένου συστήματος είναι κρυπτογραφημένη. Πολλές φορές χρησιμοποιείται ειδικά τροποποιημένο πρόγραμμα SSH το οποίο δεν αφήνει ίχνη στα αρχεία καταγραφής του συστήματος. Η μέθοδος αυτή μπο- ρεί να προδοθεί μετά από μια προσεκτική εξωτερική εξέταση των ανοιχτών θυρών του συστήματος, με εργαλεία όπως το nmap. • Κέλυφος CGI ή PHP. Είναι μια ιδιαίτερα δημοφιλής τεχνική στις μέρες μας και χρησιμοποιείται συχνά σε συνδυασμό με άλλες τεχνικές. Αν το παρα- βιασμένο σύστημα είναι διακομιστής περιεχομένου Internet (web server), ο εισβολέας μπορεί να χρησιμοποιήσει ένα ειδικά γραμμένο σενάριο σε γλώσσα PHP ή CGI, το οποίο θα του επιτρέπει να τρέξει εντολές στο σύστημα απευ- θείας μέσω μιας ιστοσελίδας με τα δικαιώματα του χρήστη του διακομιστή περιεχομένου. • Ανάποδο κέλυφος (reverse shell). Είναι άλλη μια πολύ διαδεδομένη τεχνική και αρκετά δύσκολη στην ανίχνευση. Η ιδέα είναι ότι το πρόγραμμα – κερ- κόπορτα αντί να διατηρεί συνεχώς ανοιχτή μια θύρα του συστήματος ώστε να συνδεθεί απομακρυσμένα ο εισβολέας, το ίδιο το σύστημα συνδέεται πίσω στον εισβολέα. Η σύνδεση αυτή πολλές φορές είναι κωδικοποιημένη όπως στην παραπάνω περίπτωση. Ο μόνος τρόπος να ανιχνευθεί η μέθοδος αυ-τή είναι μέσω ενός εξωτερικού συστήματος παρακολούθησης δικτύου ή με ένα τοίχος προστασίας το οποίο δεν θα επιτρέπει τις συνδέσεις από έναν δια- κομιστή προς ένα σύστημα στο Internet. Πράγματι, τέτοιες συνδέσεις είναι πολύ ασυνήθιστες για τους περισσότερους διακομιστές και για αυτό το λόγο ένα σύστημα βασισμένο σε τεχνικές ανίχνευσης ανωμαλιών συμπεριφοράς μπορεί να τις ανιχνεύσει. • Ανάποδο κέλυφος με συρράγωση (reverse tunneled shell). Είναι μια τεχνι- κή που αντιμετωπίζει το παραπάνω πρόβλημα της απαγόρευσης εξωτερικής επικοινωνίας μέσω τοίχους προστασίας, όταν έστω και μια θύρα είναι επιτρε- πόμενη. Μέσω ειδικών προγραμμάτων ο εισβολέας μπορεί να καταφέρει να επικοινωνήσει από το παραβιασμένο σύστημα προς το σύστημα μέσω μιας ανοιχτής θύρας, όπως η θύρα 80 η οποία είναι ανοιχτή στους περισσότερους σταθμούς εργασίας. Η τεχνική αυτή είναι πολύ δύσκολα ανιχνεύσιμη από περιφερειακό επίπεδο, και προσπάθειες μπορούν να γίνουν μόνο στο ίδιο το σύστημα (host based intrusion detection). • Κερκόπορτα βασισμένη σε τεχνικές παρακολούθησης πακέτων δικτύου. Η μέθοδος αυτή παρέχει ένα πολύ υψηλό ποσοστό συγκάλυψης για τον ει- σβολέα. Στην περίπτωση αυτή το κακόβουλο πρόγραμμα παρακολουθεί τα πακέτα του δικτύου που φτάνουν στο παραβιασμένο σύστημα παθητικά, και με την παραλαβή ενός πακέτου φτιαγμένου από τον εισβολέα με συγκεκρι- μένο τρόπο, εκτελεί μια προγραμματισμένη εργασία ή εντολή. Οι απαντήσεις στον εισβολέα δίνονται με τροποποιημένη την διεύθυνση δικτύου του από- στολέα, ώστε να μην μπορεί κάποιος να ξέρει από πιο σύστημα προήλθαν. Η τεχνική αυτή είναι πολύ νέα στα rootkit και υπάρχουν τρόποι ανίχνευσης πολύ περιορισμένης αποτελεσματικότητας, βασισμένοι σε συστήματα παρα- κολούθησής πακέτων στο ίδιο τοπικό δίκτυο με το παραβιασμένο σύστημα. Αξίζει να τονίσουμε ότι ορισμένες από τις παραπάνω κατηγορίες προγραμμάτων κερκόπορτας απομακρυσμένου τρόπου δράσης είναι πολύ δύσκολο να ανιχνευ- θούν. Το γεγονός αυτό οδηγεί πολλούς διαχειριστές συστημάτων σε πλήρη επα- νεγκατάσταση του λειτουργικού συστήματος σε περιπτώσεις που αντιληφθούν ίχνη από πιθανό rootkit, καθώς δεν μπορούν ποτέ να είναι σίγουροι για την πλήρη α-φαίρεση όλων των στοιχείων του

102 Backdoors Netcat VICTIM

103 Backdoors Reverse shell
Επίθεση trojan μέσω HTTP To trojan ανοίγει ανά τακτά χρονικά διαστήματα συνδέσεις στο port 80 του server (hacker) Παράκαμψη firewall O server «απαντά» με την εντολή που θέλει να εκτελεστεί Η επίθεση είναι γνωστή και ως HTTP reverse shell

104 Άλλα Θέματα

105 Τεχνικές απόκρυψης – Stealth
O ιός παραμένει ενεργός στη μνήμη (memory resident) Μολύνει όσα προγράμματα τροποποιούν τον κώδικα τους κατόπιν μιας καθ’ όλα νόμιμης εντολής του χρήστη ή του προγράμματος π.χ. λήψη και εγκατάσταση μιας επιδιόρθωσης (patch) Κατ’ αυτόν τον τρόπο ο ιός «ξεγελάει» τα προγράμματα anti-virus που εκτελούν έλεγχο ακεραιότητας (integrity checking) Ειδική περίπτωση: ΡΕΤΡΟ- ΙΟΙ (retrovirus) Ιοί που επιτίθενται σε προγράμματα antivirus, προσπαθώντας να τα απενεργοποιήσουν ή να τα υπονομεύσουν Αλλαγή αρχείου \etc\hosts για την παρεμπόδιση της ενημέρωσης Τερματισμός σχετικού process (π.χ. navapw32.exe, vsmon.exe) &κατάργηση από τη λίστα αρχείων αυτόματης εκκίνησης από το Μητρώο

106 Τεχνικές Απόκρυψης Πολυμορφικοί Ιοί (polymorphic, self-mutating)
Ο ιός δημιουργεί αντίγραφα του εαυτού του, τα οποία διαφέρουν … με ωστόσο τα ίδια καταστροφικά αποτελέσματα Ο ιός κρυπτογραφεί τον εαυτό του με ένα κλειδί που αλλάζει Εναλλακτικά: συμπίεση (compression) O ιός εισάγει «θόρυβο» (noise) στα αντίγραφα του, π.χ. αλλάζοντας τη σειρά των εντολών ή εισάγοντας στον κώδικα άσκοπες εντολές Τεχνικές μετάλλαξης ιών (virus mutation techniques) Mutation Engines ή polymorphic engines Μελέτη περίπτωσης: Whale virus Πολυμορφικοί Ιοί. Οι ιοί αυτοί δημιουργούν πολλαπλούς κλώνους-αντίγραφα του εαυτού τους με σκοπό να «ξεγελάσουν» τις εφαρμογές antivirus. Έτσι, η «υπογραφή» του ιού, δηλαδή το τμήμα κώδικα που χρησιμοποιούν τα antivirus για να ανιχνεύσουν έναν ιό, δεν μπορεί να εντοπιστεί. Για να το επιτύχουν αυτό οι πολυμορφικοί ιοί χρησιμοποιούν τεχνικές συμπίεσης ή π.χ. κρυπτογράφησης του κώδικά τους με ένα συμμετρικό κλειδί που συνεχώς αλλάζει. Εναλλακτικά, ο ιός μπορεί να εισάγει «θόρυβο», π.χ. αλλαγή της σειράς των εντολών ή εισαγωγή εντολών που κατ’ ουσία δεν έχουν καμία σκοπιμότητα (π.χ. Εκτύπωσε « » - τον κενό χαρακτήρα). Οι εντολές αυτές δεν είναι ποτέ ίδιες (για παράδειγμα, ο ιός μπορεί να χρησιμοποιεί γεννήτορες τυχαίων αριθμών, και να χρησιμοποιεί τα αποτελέσματα ως «θόρυβο» στον κώδικα του). Σημείωση: Σήμερα υπάρχουν έτοιμες ρουτίνες μετάλλαξης (Mutation Engines) ενός ιού. Μια απλή αναζήτηση στο Internet αποδεικνύει του λόγου το αληθες (Μελέτη περίπτωσης: Trident Polymorphic Engine)

107 Παράδειγμα Πολυμορφικής Συμπεριφοράς- 1

108 Παράδειγμα Πολυμορφικής Συμπεριφοράς - 2

109 Παράδειγμα Πολυμορφικής Συμπεριφοράς - 3

110 Παράδειγμα Πολυμορφικής Συμπεριφοράς - 4

111 Λογισμικό Spyware Τρόποι Μόλυνσης
Παρακολούθηση συμπεριφοράς χρήστη ή υποκλοπή προσ. δεδομένων Προσωπικά στοιχεία, Usernames, Passwords, TAN, κλειδιά, Aριθμοί πιστωτικής κάρτας, λεπτομέρειες συναλλαγών Σχόλιο: Συσχέτιση ή συνεργασία Spyware & Adware Σχετιζόμενα Εργαλεία: keyloggers, sniffers, cookies Spyware – Adware. Συχνά ο ένας εκ των δύο όρων χρησιμοποιείται για να περιγράψει και τις δύο κατηγορίες κακόβουλου λογισμικού. Όπως γίνεται σαφές και από την ονομασία τους, οι παρενέργειες τους δίνουν έμφαση στην υποκλοπή (spyware) και την μη ζητηθείσα (ανεπιθύμητη) διαφήμιση. Συχνά εντάσσονται στην ευρύτερη κατηγορία των δουρείων ίππων (trojans), αφού συνήθως η απελευθέρωση του φορτίου τους είναι αποτέλεσμα εξαπάτησης των χρηστών. Τρόποι Μόλυνσης: Ένα spyware / adware εγκαθίσταται με ποικίλους τρόπους: Αποτελεί τμήμα του κώδικα freeware, shareware ή άλλων προγραμμάτων Αποτελεί το φορτίο ενός δούρειου ίππου (trojan) Εγκαθίσταται ως αποτέλεσμα της εκτέλεσης κινητού κώδικα (π.χ. ActiveX) σε σελίδες Web Αρμοδιότητες Spyware: Λογισμικό που συγκεντρώνει-υποκλέπτει πληροφορίες που αφορούν το χρήστη. Οι πληροφορίες αυτές περιλαμβάνουν (χωρίς να περιορίζονται από προσωπικά στοιχεία, ονόματα χρήστη (Usernames), κωδικούς πρόσβασης (passwords), κωδικούς TAN (Transaction Authorization Number), κλειδιά, αριθμούς πιστωτικής κάρτας, λεπτομέρειες συναλλαγών. Στη χείριστη του μορφή παίρνει τη μορφή λογισμικού keylogger που υποκλέπτει κάθε χαρακτήρα που πληκτρολογεί ο χρήστης και τα προωθεί (στο παρασκήνιο) π.χ. μέσω στον server ή σε ταχυδρομικές θυρίδες τρίτων. Συνήθως τα spyware συνεργάζονται με λογισμικά Adware ή/και με διαφημιστικές εταιρείες στο Internet, με σκοπό τη δημιουργία ενός προφίλ χρήστη και την αποστολή στοχευμένων διαφημίσεων. Σημείωση: Τα λογισμικά τύπου dialer θεωρούνται υποκατηγορία των λογισμικών τύπου spyware. Πρόκειται για κακόβουλο λογισμικό, το οποίο όταν ενεργοποιηθεί, μπορεί να πραγματοποιεί υπεραστικές κλήσεις μακρινής απόστασης με σκοπό τη χρέωση του τηλεφωνικού λογαριασμού του χρήστη. Αρμοδιότητες Adware. Ως λογισμικό adware (advertising-supported software) θεωρείται κάθε είδους λογισμικού το οποίο, με αυτόματο τρόπο, εκτελεί, επιδεικνύει, ή λαμβάνει διαφημιστικό υλικό μέσω Internet (Πηγή: Wikipedia). Η εκτέλεση αυτού του λογισμικού μπορεί να γίνεται νόμιμα, στα πλαίσια μιας εφαρμογής που ρητά το ορίζει στους Όρους Χρήσης, ή υπογείως. Στη δεύτερη περίπτωση τα λογισμικά τύπου adware θεωρούνται κακόβουλο λογισμικό. To λογισμικό adware συνήθως συνεργάζεται με (ή λειτουργία του βασίζεται στα αποτελέσματα της λειτουργίας ενός μηχανισμού) spyware. Οι παρενέργειες ενός λογισμικού adware ποικίλουν: Εμφάνιση ανεπιθύμητων μηνυμάτων στον browser, ή στην επιφάνεια εργασίας (desktop), αλλαγή της αρχικής σελίδας του browser (μια επίθεση γνωστή και ως browser hijacking), αλλαγή της αρχικής σελίδας αναζήτησης του browser, αναδρομολόγηση σε λανθασμένο (πλαστό) δικτυακό τόπο (web spoofing), κ.λ.π. Τρόποι Μόλυνσης Το λογισμικό spyware είναι το φορτίο (payload) ενός trojan Εγκατάσταση ως συνέπεια μιας επίθεσης phishing, π.χ. εκτέλεση συνημμένου ή επιλογή συνδέσμου που παραπέμπει σε site με κακόβουλο ενεργό κώδικα Εγκατάσταση κατά την πλοήγηση στο Web (π.χ. ActiveX) Περίπτωση: καταγραφή αγοραστικής συμπεριφοράς χρήστη και αποστολή στοιχείων σε εταιρίες (tracking companies), που με τη σειρά τους προωθούν την πληροφορία σε διαφημιστές ή παροχείς υπηρεσιών

112 Λογισμικό Spyware --Proposed Swedish Wiretapping Law Met with Criticism (March 7 & 8, 2007) Proposed legislation in Sweden would give the National Defense Radio Establishment (FRA) the power to tap cross-border Internet traffic and phone calls without a court order.  Current law allows FRA to monitor military radio communications; police may monitor communications only if they believe there is a crime being committed and they obtain a court order.  The law would allow FRA to use data mining software to ferret out communications containing keywords. Communications within Sweden would be unaffected by the law.  If the law is approved, it would go into effect on July 1. German Law Enforcement to Use Custom Malware. (27 February 2007) German law enforcement agencies are pushing for a legal basis to be able to use malware and spyware in investigations. The malware will be used to "bug" suspect's computers. In addition to collecting information from the computer itself, cameras and microphones connected to these computers could be used to monitor conversations. Spyware – Adware. Συχνά ο ένας εκ των δύο όρων χρησιμοποιείται για να περιγράψει και τις δύο κατηγορίες κακόβουλου λογισμικού. Όπως γίνεται σαφές και από την ονομασία τους, οι παρενέργειες τους δίνουν έμφαση στην υποκλοπή (spyware) και την μη ζητηθείσα (ανεπιθύμητη) διαφήμιση. Συχνά εντάσσονται στην ευρύτερη κατηγορία των δουρείων ίππων (trojans), αφού συνήθως η απελευθέρωση του φορτίου τους είναι αποτέλεσμα εξαπάτησης των χρηστών. Τρόποι Μόλυνσης: Ένα spyware / adware εγκαθίσταται με ποικίλους τρόπους: Αποτελεί τμήμα του κώδικα freeware, shareware ή άλλων προγραμμάτων Αποτελεί το φορτίο ενός δούρειου ίππου (trojan) Εγκαθίσταται ως αποτέλεσμα της εκτέλεσης κινητού κώδικα (π.χ. ActiveX) σε σελίδες Web Αρμοδιότητες Spyware: Λογισμικό που συγκεντρώνει-υποκλέπτει πληροφορίες που αφορούν το χρήστη. Οι πληροφορίες αυτές περιλαμβάνουν (χωρίς να περιορίζονται από προσωπικά στοιχεία, ονόματα χρήστη (Usernames), κωδικούς πρόσβασης (passwords), κωδικούς TAN (Transaction Authorization Number), κλειδιά, αριθμούς πιστωτικής κάρτας, λεπτομέρειες συναλλαγών. Στη χείριστη του μορφή παίρνει τη μορφή λογισμικού keylogger που υποκλέπτει κάθε χαρακτήρα που πληκτρολογεί ο χρήστης και τα προωθεί (στο παρασκήνιο) π.χ. μέσω στον server ή σε ταχυδρομικές θυρίδες τρίτων. Συνήθως τα spyware συνεργάζονται με λογισμικά Adware ή/και με διαφημιστικές εταιρείες στο Internet, με σκοπό τη δημιουργία ενός προφίλ χρήστη και την αποστολή στοχευμένων διαφημίσεων. Σημείωση: Τα λογισμικά τύπου dialer θεωρούνται υποκατηγορία των λογισμικών τύπου spyware. Πρόκειται για κακόβουλο λογισμικό, το οποίο όταν ενεργοποιηθεί, μπορεί να πραγματοποιεί υπεραστικές κλήσεις μακρινής απόστασης με σκοπό τη χρέωση του τηλεφωνικού λογαριασμού του χρήστη. Αρμοδιότητες Adware. Ως λογισμικό adware (advertising-supported software) θεωρείται κάθε είδους λογισμικού το οποίο, με αυτόματο τρόπο, εκτελεί, επιδεικνύει, ή λαμβάνει διαφημιστικό υλικό μέσω Internet (Πηγή: Wikipedia). Η εκτέλεση αυτού του λογισμικού μπορεί να γίνεται νόμιμα, στα πλαίσια μιας εφαρμογής που ρητά το ορίζει στους Όρους Χρήσης, ή υπογείως. Στη δεύτερη περίπτωση τα λογισμικά τύπου adware θεωρούνται κακόβουλο λογισμικό. To λογισμικό adware συνήθως συνεργάζεται με (ή λειτουργία του βασίζεται στα αποτελέσματα της λειτουργίας ενός μηχανισμού) spyware. Οι παρενέργειες ενός λογισμικού adware ποικίλουν: Εμφάνιση ανεπιθύμητων μηνυμάτων στον browser, ή στην επιφάνεια εργασίας (desktop), αλλαγή της αρχικής σελίδας του browser (μια επίθεση γνωστή και ως browser hijacking), αλλαγή της αρχικής σελίδας αναζήτησης του browser, αναδρομολόγηση σε λανθασμένο (πλαστό) δικτυακό τόπο (web spoofing), κ.λ.π.

113 Λογισμικό Adware Λογισμικό που μπορεί να σχετίζεται με:
Ζητηθείσα διαφήμιση Συγκατάθεση του χρήστη (π.χ. κατά την εγκατάσταση δωρεάν λογισμικού) Μη ζητηθείσα διαφήμιση Χωρίς τη συγκατάθεση του χρήστη Π.χ. παράθυρα Pop-up κατά την περιήγηση στο Web Spyware – Adware. Συχνά ο ένας εκ των δύο όρων χρησιμοποιείται για να περιγράψει και τις δύο κατηγορίες κακόβουλου λογισμικού. Όπως γίνεται σαφές και από την ονομασία τους, οι παρενέργειες τους δίνουν έμφαση στην υποκλοπή (spyware) και την μη ζητηθείσα (ανεπιθύμητη) διαφήμιση. Συχνά εντάσσονται στην ευρύτερη κατηγορία των δουρείων ίππων (trojans), αφού συνήθως η απελευθέρωση του φορτίου τους είναι αποτέλεσμα εξαπάτησης των χρηστών. Τρόποι Μόλυνσης: Ένα spyware / adware εγκαθίσταται με ποικίλους τρόπους: Αποτελεί τμήμα του κώδικα freeware, shareware ή άλλων προγραμμάτων Αποτελεί το φορτίο ενός δούρειου ίππου (trojan) Εγκαθίσταται ως αποτέλεσμα της εκτέλεσης κινητού κώδικα (π.χ. ActiveX) σε σελίδες Web Αρμοδιότητες Spyware: Λογισμικό που συγκεντρώνει-υποκλέπτει πληροφορίες που αφορούν το χρήστη. Οι πληροφορίες αυτές περιλαμβάνουν (χωρίς να περιορίζονται από προσωπικά στοιχεία, ονόματα χρήστη (Usernames), κωδικούς πρόσβασης (passwords), κωδικούς TAN (Transaction Authorization Number), κλειδιά, αριθμούς πιστωτικής κάρτας, λεπτομέρειες συναλλαγών. Στη χείριστη του μορφή παίρνει τη μορφή λογισμικού keylogger που υποκλέπτει κάθε χαρακτήρα που πληκτρολογεί ο χρήστης και τα προωθεί (στο παρασκήνιο) π.χ. μέσω στον server ή σε ταχυδρομικές θυρίδες τρίτων. Συνήθως τα spyware συνεργάζονται με λογισμικά Adware ή/και με διαφημιστικές εταιρείες στο Internet, με σκοπό τη δημιουργία ενός προφίλ χρήστη και την αποστολή στοχευμένων διαφημίσεων. Σημείωση: Τα λογισμικά τύπου dialer θεωρούνται υποκατηγορία των λογισμικών τύπου spyware. Πρόκειται για κακόβουλο λογισμικό, το οποίο όταν ενεργοποιηθεί, μπορεί να πραγματοποιεί υπεραστικές κλήσεις μακρινής απόστασης με σκοπό τη χρέωση του τηλεφωνικού λογαριασμού του χρήστη. Αρμοδιότητες Adware. Ως λογισμικό adware (advertising-supported software) θεωρείται κάθε είδους λογισμικού το οποίο, με αυτόματο τρόπο, εκτελεί, επιδεικνύει, ή λαμβάνει διαφημιστικό υλικό μέσω Internet (Πηγή: Wikipedia). Η εκτέλεση αυτού του λογισμικού μπορεί να γίνεται νόμιμα, στα πλαίσια μιας εφαρμογής που ρητά το ορίζει στους Όρους Χρήσης, ή υπογείως. Στη δεύτερη περίπτωση τα λογισμικά τύπου adware θεωρούνται κακόβουλο λογισμικό. To λογισμικό adware συνήθως συνεργάζεται με (ή λειτουργία του βασίζεται στα αποτελέσματα της λειτουργίας ενός μηχανισμού) spyware. Οι παρενέργειες ενός λογισμικού adware ποικίλουν: Εμφάνιση ανεπιθύμητων μηνυμάτων στον browser, ή στην επιφάνεια εργασίας (desktop), αλλαγή της αρχικής σελίδας του browser (μια επίθεση γνωστή και ως browser hijacking), αλλαγή της αρχικής σελίδας αναζήτησης του browser, αναδρομολόγηση σε λανθασμένο (πλαστό) δικτυακό τόπο (web spoofing), κ.λ.π. Τρόποι Μόλυνσης Παρόμοιοι με τα προγράμματα τύπου spyware Επιπλέον: Αυτόματη εγκατάσταση ως πρόσθετο στο πρόγραμμα περιήγησης Περίπτωση: Browser Helper Objects στον Internet Explorer

114 Spyware - Adware

115 Λογισμικό Adware The AP recently ran a story about a substitute teacher who was convicted of exposing students to pornography. Her contention that it was inadvertent because she couldn't keep up with pop-ups seems plausible, but the equally non-tech-savvy jury didn't buy it (despite the fact that the prosecution never even made a reasonable case by checking for spyware).  What seems particularly Kafka-esque is the potential 40-year sentence she faces. Spyware – Adware. Συχνά ο ένας εκ των δύο όρων χρησιμοποιείται για να περιγράψει και τις δύο κατηγορίες κακόβουλου λογισμικού. Όπως γίνεται σαφές και από την ονομασία τους, οι παρενέργειες τους δίνουν έμφαση στην υποκλοπή (spyware) και την μη ζητηθείσα (ανεπιθύμητη) διαφήμιση. Συχνά εντάσσονται στην ευρύτερη κατηγορία των δουρείων ίππων (trojans), αφού συνήθως η απελευθέρωση του φορτίου τους είναι αποτέλεσμα εξαπάτησης των χρηστών. Τρόποι Μόλυνσης: Ένα spyware / adware εγκαθίσταται με ποικίλους τρόπους: Αποτελεί τμήμα του κώδικα freeware, shareware ή άλλων προγραμμάτων Αποτελεί το φορτίο ενός δούρειου ίππου (trojan) Εγκαθίσταται ως αποτέλεσμα της εκτέλεσης κινητού κώδικα (π.χ. ActiveX) σε σελίδες Web Αρμοδιότητες Spyware: Λογισμικό που συγκεντρώνει-υποκλέπτει πληροφορίες που αφορούν το χρήστη. Οι πληροφορίες αυτές περιλαμβάνουν (χωρίς να περιορίζονται από προσωπικά στοιχεία, ονόματα χρήστη (Usernames), κωδικούς πρόσβασης (passwords), κωδικούς TAN (Transaction Authorization Number), κλειδιά, αριθμούς πιστωτικής κάρτας, λεπτομέρειες συναλλαγών. Στη χείριστη του μορφή παίρνει τη μορφή λογισμικού keylogger που υποκλέπτει κάθε χαρακτήρα που πληκτρολογεί ο χρήστης και τα προωθεί (στο παρασκήνιο) π.χ. μέσω στον server ή σε ταχυδρομικές θυρίδες τρίτων. Συνήθως τα spyware συνεργάζονται με λογισμικά Adware ή/και με διαφημιστικές εταιρείες στο Internet, με σκοπό τη δημιουργία ενός προφίλ χρήστη και την αποστολή στοχευμένων διαφημίσεων. Σημείωση: Τα λογισμικά τύπου dialer θεωρούνται υποκατηγορία των λογισμικών τύπου spyware. Πρόκειται για κακόβουλο λογισμικό, το οποίο όταν ενεργοποιηθεί, μπορεί να πραγματοποιεί υπεραστικές κλήσεις μακρινής απόστασης με σκοπό τη χρέωση του τηλεφωνικού λογαριασμού του χρήστη. Αρμοδιότητες Adware. Ως λογισμικό adware (advertising-supported software) θεωρείται κάθε είδους λογισμικού το οποίο, με αυτόματο τρόπο, εκτελεί, επιδεικνύει, ή λαμβάνει διαφημιστικό υλικό μέσω Internet (Πηγή: Wikipedia). Η εκτέλεση αυτού του λογισμικού μπορεί να γίνεται νόμιμα, στα πλαίσια μιας εφαρμογής που ρητά το ορίζει στους Όρους Χρήσης, ή υπογείως. Στη δεύτερη περίπτωση τα λογισμικά τύπου adware θεωρούνται κακόβουλο λογισμικό. To λογισμικό adware συνήθως συνεργάζεται με (ή λειτουργία του βασίζεται στα αποτελέσματα της λειτουργίας ενός μηχανισμού) spyware. Οι παρενέργειες ενός λογισμικού adware ποικίλουν: Εμφάνιση ανεπιθύμητων μηνυμάτων στον browser, ή στην επιφάνεια εργασίας (desktop), αλλαγή της αρχικής σελίδας του browser (μια επίθεση γνωστή και ως browser hijacking), αλλαγή της αρχικής σελίδας αναζήτησης του browser, αναδρομολόγηση σε λανθασμένο (πλαστό) δικτυακό τόπο (web spoofing), κ.λ.π.

116 Hoax - Φάρσες Subject: FW: VIRUS
IMPORTANT, URGENT - ALL SEEING EYE VIRUS! PASS THIS ON TO ANYONE YOU HAVE AN ADDRESS FOR. If you receive an titled "We Are Watching You!" DO NOT OPEN IT! It will erase everything on your hard drive. This information was announced yesterday morning from IBM, FBI and Microsoft states that this is a very dangerous and malicious virus, much worse than the "I Love You," virus and that there is NO remedy for it at this time. Some very sick individual has succeeded in using the reformat function from Norton Utilities causing it to completely erase all documents on the hard drive. It has been designed to work with Netscape Navigator and Microsoft Internet Explorer. It destroys Macintosh and IBM compatible computers. This is a new, very malicious virus and not many people on your address book will know about it. Pass this warning along to EVERYONE in it and please share it with all your online friendsASAP so that this threat may be stopped.

117 Προστασία από Κακόβουλο λογισμικό Άλλα θέματα
Εκπαίδευση – Ενημέρωση των χρηστών Κοινή λογική (Common Sense) Ποιόν εμπιστευόμαστε; Είναι ασφαλές το λογισμικό που «κατεβάζουμε» από το Internet; Εμπιστεύομαι το αρχείο που έχει επισυναφθεί στο ; Οργανισμοί για την ασφάλεια και προστασία από κακόβουλο λογισμικό CERT (Computer Emergency Response Team) OECD (Organisation for Economic Co-operation and Development)

118 Πολιτικές Ασφάλειας Εγκατάσταση και λειτουργία ενός Προσωπικού Firewall Λήψη Ενημερώσεων Ασφάλειας και Επιδιορθώσεων Εγκατάσταση και λειτουργία (στο παρασκήνιο) προγράμματος Anitvirus Περιοδικός Έλεγχος με τη χρήση προγραμμάτων AntiRootkit, Antispyware Ρυθμίσεις Ασφάλειας στα προγράμματα περιήγησης στο web, ηλεκτρονικής αλληλογραφίας και εφαρμογών γραφείου Εκτέλεση με ελάχιστα προνόμια (π.χ. σύνδεση στο Internet ως χρήστης χαμηλών δικαιωμάτων) Δυσπιστία κατά τη λήψη συνημμένων ή/και επίσκεψη δικτυακών σελίδων Φυσική ασφάλεια στο χώρο λειτουργίας του Η/Υ

119 Κακόβουλο Λογισμικό: Κίνητρα και Αιτίες…
Διασκέδαση, Περιέργεια, Μίσος, εκδίκηση, ακτιβισμός,… Χρήμα, Βιομηχανική κατασκοπία Φήμη-Δόξα (Κοινωνίες Hakers) Αιτίες Ανεπαρκής Έλεγχος Πρόσβασης στα σύγχρονα Λ.Σ Π.χ. εφαρμογή που εκτελείται με δικαιώματα administrator Απροσεξία χρηστών, Ελλιπής εκπαίδευση Π.χ. επιθέσεις κοινωνικής μηχανικής Σχεδίαση εφαρμογών και Λ.Σ. χωρίς έμφαση στην ασφάλεια Ασφάλεια: ένα χαρακτηριστικό που προστίθεται στην πορεία…

120 Μύθοι και Πραγματικότητα…
Αλήθειες 2 Τα τηλέφωνα γίνονται ολοένα και πιο «έξυπνα», και οι συνδέσεις πιο γρήγορες Διαβλέπετε τις προοπτικές; Οι ιοί κινητών τηλεφώνων σήμερα μοιάζουν με τους ιούς τα πρώτα χρόνια του Internet Hobbyist, amateurs Σε αντίθεση με τους Η/Υ, τα κινητά έχουν ενσωματωμένο σύστημα χρέωσης !!! Φαντάζεστε ένα worm-dialer σε συσκευές κινητής τηλεφωνίας Μέλλον: Botnets από κινητά (?) Μύθος 1 Στόχος είναι τα προγράμματα της ΧΧΧ διότι είναι περισσότερο ευπαθή… Αλήθεια 1 Στόχος είναι τα προγράμματα της XXX διότι είναι τα πλέον δημοφιλή… Μύθος 2 Τα κινητά τηλέφωνα είναι πιο ασφαλή…

121 Συμπεράσματα «Three basic things allow viruses to spread: sharing, programming, and changes. All we have to do is eliminate those three things and we will be perfectly free of viruses.» Fred Cohen, Short Course on Computer Viruses, 2nd Edition «There is no such thing as absolute security. Whether a host is penetrated depends on the time, money and risk that an attacker is willing to spend, compared with the time, money, and diligence we are willing to commit to defending a host» Cheswick et al. 2003


Κατέβασμα ppt "Ιόνιο Πανεπιστήμιο Τμήμα Πληροφορικής Ακαδημαϊκό Έτος Εξάμηνο: Δ’"

Παρόμοιες παρουσιάσεις


Διαφημίσεις Google