10.07.2015 Views

Lutte Anti-Virus Limites des techniques de détection et d ... - OSSIR

Lutte Anti-Virus Limites des techniques de détection et d ... - OSSIR

Lutte Anti-Virus Limites des techniques de détection et d ... - OSSIR

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Computer Emergency Response TeamIndustrie Service TertiaireE<strong>de</strong>lWebGroupe On-x<strong>Lutte</strong> <strong>Anti</strong>-<strong>Virus</strong><strong>Limites</strong> <strong><strong>de</strong>s</strong> <strong>techniques</strong> <strong>de</strong> détection <strong>de</strong>td'éradicationPhilippe.Bourgeois (à) cert-ist.comJerome.Rochcongar (à) e<strong>de</strong>lweb.frAgenda Les faiblesses connues <strong><strong>de</strong>s</strong> anti-virus Cas <strong><strong>de</strong>s</strong> archives malformées : Etu<strong>de</strong> Cert-IST Eradication <strong>de</strong> virus “persistants” : R<strong>et</strong>our d’expérience <strong>et</strong>recommandations E<strong>de</strong>lWeb Recommandations Cert-ISTNota : "<strong>Virus</strong>" est utilisé ici pour désigner tout type <strong>de</strong> co<strong>de</strong> malveillant :virus, ver, trojan, rootkit, …Computer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 2


Faiblesses connues <strong><strong>de</strong>s</strong> anti-virus Fonctionnent essentiellement par signatureFaiblesse intrinsèque(par conception)Reconnaissent facilement les virus déjà connusMais sont souvent aveugles face à <strong><strong>de</strong>s</strong> variantes <strong>de</strong> ces attaques Doivent traiter <strong>de</strong> multiples formats <strong>et</strong> encodagesArchives (ZIP, RAR, TGZ, <strong>et</strong>c…)Encodage Mime Ne sont pas exempts <strong>de</strong> bugs (ex : Buffer overflow)Les antivirus ne sont que <strong><strong>de</strong>s</strong> logiciels … Certains bugs impactent la sécurité :– Mise en défaut <strong>de</strong> l'antivirus (non détection <strong>de</strong> virus)– Ou même mise en danger <strong>de</strong> la plate-forme hôte (exécution <strong>de</strong> co<strong>de</strong>)Faiblesse <strong>de</strong>constructionComputer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 3Faiblesses connues <strong><strong>de</strong>s</strong> anti-virus Les antivirus sont une cible d'attaque pour les co<strong><strong>de</strong>s</strong>malveillants :Désactivation <strong><strong>de</strong>s</strong> anti-virusDissimulation au moyens <strong>de</strong> « rootkits » ou <strong>de</strong> fonctions avancées<strong>de</strong> la plate-forme (exemple : ADS)Cible activementattaquée Synthèse <strong><strong>de</strong>s</strong> "stratégies" d'attaques :Neutralisation (stopper l'antivirus)Contournement (échapper à la détection)Tremplin (utiliser l'anti-virus pour infecter le système)Computer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 4


Evolution du nombre d’avis Cert-ISTsur les produits anti-virus Une augmentation Emission spectaculaire d'une pré-alertes Cert-IST <strong>de</strong>puis :mi 2004• CERT-IST/DG-2005.006 (07/10/05) Les anti-virus intéressent les "chercheurs" <strong>de</strong> failles ?<strong>Virus</strong> utilisant lesarchives malformées :• Sober-X30Etu<strong><strong>de</strong>s</strong> Systèmatiques 25 :• BlackHat 2005 (BoF)• Archives malformés20(contournement)15Failles "traditionnelles" :• ZipOfDeath 10(DOS)• Entêtes MIME incorrectes(contournement)501999 2000 2001 2002 2003 2004 2005 2006Avis distincts Avis multi-produits Extrapolation sur 2006Computer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 5Recherches connues surla vulnérabilité <strong><strong>de</strong>s</strong> anti-virus (1/2) Etu<strong>de</strong> 2005 par <strong><strong>de</strong>s</strong> chercheurs <strong>de</strong> ISS : Première étu<strong>de</strong> systématique dans ce domaine (reverse engineering <strong>de</strong> co<strong>de</strong>) Vulnérabilités <strong>de</strong> type « Buffer/Heap overflow » i<strong>de</strong>ntifiées dans les anti-virus :– Computer Associate, ClamAV, F-Secure, Kaspersky, McAfee, Panda,Sophos, Symantec, Trend Micro Etu<strong><strong>de</strong>s</strong> sur les archives malformées(Liste)IDefense (octobre 2004) : CAN-2004-0932 à CAN-2004-0936, CVE-2004-2442– Indiquer une taille <strong>de</strong> zéro dans l'entête ZIPfRoGGz (octobre 2005) ; CVE-2005-3210 à CVE-2005-3235– Ajouter un marqueur "MZ" en tête d'un fichier d'archive (RAR, CAB, ARJ)Andrey Bayora (octobre 2005) : The Magic of magic byte– Ajouter un marqueur "MZ" en tête <strong>de</strong> fichiers ".hmtl", ".bat" ou ".eml"Computer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 6


Recherches connues surla vulnérabilité <strong><strong>de</strong>s</strong> anti-virus (2/2) Thierry Zoller :17/10/05 : RAR - Evasion of <strong>Anti</strong> <strong>Virus</strong> D<strong>et</strong>ection03/11/05 : F-Prot/Frisk <strong>Anti</strong> <strong>Virus</strong> bypass - ZIP Version Hea<strong>de</strong>r28/12/05 : New AV-Evasion M<strong>et</strong>hods - Summary– New M<strong>et</strong>hods of Evasion : 5– AV Products currently affected : 22– Gateway Solutions affected : 219/01/06 : F-Secure AV - <strong>Anti</strong>-virus Bypass and Buffer OverflowComputer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 7Agenda Les faiblesses connues <strong><strong>de</strong>s</strong> anti-virus Cas <strong><strong>de</strong>s</strong> archives malformées : Etu<strong>de</strong> Cert-IST Eradication <strong>de</strong> virus “persistants” : R<strong>et</strong>our d’expérience <strong>et</strong>recommandations E<strong>de</strong>lWeb Recommandations Cert-IstComputer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 8


Principe d'une archive malformée Un fichier archive "normal" est légèrement déforméEx : ajouter "MZ" en tête d'un fichier "ZIP"(Illustration) Le fichier malformé contient un virus :Il n'est plus détecté comme infecté par l'anti-virus (du fait <strong>de</strong> la malformation)Mais l'outil <strong>de</strong> décompression (WinZip, WinRar) est capable d'extraire le virus(il n'est pas gêné par la malformation) Risque ?Perm<strong>et</strong> <strong>de</strong> contourner une protection périmétrique (passerelle antivirus)Mais sera normalement stoppé sur le poste utilisateur lorsque le virus sera extrait<strong>de</strong> l'archive malformée (analyse "à l'accès")Computer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 9Etu<strong>de</strong> réalisée par le Cert-IST Prolongement d'une étu<strong>de</strong> publiée par "Froggz"en octobre 2005 Construction d'un jeu <strong>de</strong> test systématiqueTrois malformations : MZ, MZ+, NullSeize formats d'archive : 7Z, ACE, ARJ, BZ2, CAB, CPIO, ISO, JAR, LHA, LZH,RAR, TAR, TGZ, UUE, XXE, ZIP Test <strong>de</strong> : Sept antivirus :Avast, ClamWin, F-Secure, Kaspersky, McAfee, Sophos, Trend Micro Quatre outils <strong>de</strong> manipulation d'archiveWinZip 9.0, PowerArchiver 9.26.02, WinRAR 3.51, Windows XPComputer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 10


Résultats <strong>de</strong> l'étu<strong>de</strong> Résultats : 92 anomalies i<strong>de</strong>ntifiées15 anomalies sont préoccupantes.Exemple : Fichier ZIP malformé extractible par WinZip(Détails)Les autres anomalies sont mineures.Exemple : Fichier LZH malformé extractible par WinRar. Conclusion :Il est facile <strong>de</strong> trouver <strong><strong>de</strong>s</strong> anomalies qui perm<strong>et</strong>tent <strong>de</strong> contournerune protection antivirale périmétrique;Computer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 11Recommandations Cert-IST Pourquoi l'antivirus est-il mis en échec ?Hypothèse 1 : L'AV fait entièrement confiance aux oct<strong>et</strong>s d'entêtepour déterminer la nature du fichierMZ = Exécutable le fichier n'est pas une archive ZIP.Quid <strong><strong>de</strong>s</strong> archives auto-extractibles, alors ?Hypothèse 2 : L'AV ne comprend pas la structure du fichier <strong>et</strong> déci<strong>de</strong>qu'il n'est pas dangereuxPourquoi ne pas ém<strong>et</strong>tre un avertissement : fichier non compris = fichier suspect Comment améliorer la détection ?Em<strong>et</strong>tre un avertissement (ou mise en quarantaine) sur détection d'une anomalie– Contradiction entre l'entête du fichier ("MZ") <strong>et</strong> son extension (".ZIP")– Ou toute autre anomalie dans la structure du fichierComputer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 12


Réaction <strong><strong>de</strong>s</strong> éditeurs anti-virus Résultats mitigés3 ont corrigé les anomalies dans le mois qui suivait le rapport d'anomalie.2 ont corrigé dans les 6 mois suivants, après relances.2 n'ont pas pris en compte les anomalies signalées(ils sont toujours vulnérables).Computer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 13Agenda Les faiblesses connues <strong><strong>de</strong>s</strong> anti-virus Cas <strong><strong>de</strong>s</strong> archives malformées : Etu<strong>de</strong> Cert-IST Eradication <strong>de</strong> virus “persistants” : R<strong>et</strong>our d’expérience <strong>et</strong>recommandations E<strong>de</strong>lWeb Recommandations Cert-ISTComputer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 14


Qu’est-ce qu’un virus “persistant”? Tout type <strong>de</strong> co<strong>de</strong> malveillant (virus, ver, troyen,…) Utilise <strong><strong>de</strong>s</strong> <strong>techniques</strong> <strong>de</strong> furtivité pour se cacher Utilise <strong><strong>de</strong>s</strong> <strong>techniques</strong> sophistiquées afin d’empêcher sasuppressionDIFFICULTES <strong>de</strong> DETECTION <strong>et</strong> d’ERADICATIONComputer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 15Exemple du ver Brontok (1/3) Ver apparu fin 2005 Propagation parmessagerie (pièce jointe au mail)copie sur les partages réseau <strong>et</strong> supports USB CaractéristiquesProcessus non interruptibles par les moyens propres ausystème : lancés au démarrage (même en mo<strong>de</strong> sans échec) utilisent le nom <strong>de</strong> processus systèmes (smss, lsass, ...) considérés comme légitimes,critiques <strong>et</strong> ininterruptibles par WindowsUtilisation <strong>de</strong> la ligne <strong>de</strong> comman<strong>de</strong> <strong>et</strong> <strong>de</strong> Regedit impossibleFichiers infectés <strong>et</strong> clés <strong>de</strong> registre recréés en permanenceComputer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 16


Exemple du ver Brontok (2/3)Difficultés d’éradication Avec un anti-virus en mo<strong>de</strong> scan Brontok détecte le lancement d’un antivirus <strong>et</strong> effectue unredémarrage du poste Avec <strong><strong>de</strong>s</strong> outils spécifiques fournis par <strong><strong>de</strong>s</strong> éditeurs Inefficaces sur la version du ver testée Manuellement Impossible par les moyens standard Windows car :- éditeur <strong>de</strong> registre désactivé- pas d’accès à la ligne <strong>de</strong> comman<strong>de</strong>- processus non interruptibles via taskmgr ou mo<strong>de</strong> sans échec- ...Computer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 17Exemple du ver Brontok (3/3)Solutions d’éradication Utilisation d’outils tiers Arrêt <strong><strong>de</strong>s</strong> processus Modification <strong><strong>de</strong>s</strong> valeurs <strong>de</strong> la base <strong>de</strong> registreRq: Le lancement <strong>de</strong> certains outils tiers entraîne un reboot Utilisation <strong>de</strong> la console <strong>de</strong> récupération <strong>de</strong> WindowsAccès au système sans que les processus du ver ne soient lancésSuppression <strong><strong>de</strong>s</strong> fichiers infectés Réinstallation du posteComputer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 18


Bilan sur les virus “persistants” ImpactsIndisponibilité <strong><strong>de</strong>s</strong> postes (mise en quarantaine)Interventions sur les postes infectés (éradication ouréinstallation)Remise en état du SI coûteuse TendanceDéveloppement <strong>de</strong> ce type <strong>de</strong> co<strong><strong>de</strong>s</strong>Computer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 19 PréventionRecommandations : Prise encompte <strong>de</strong> ce type <strong>de</strong> co<strong>de</strong>intégrer les évolutions <strong><strong>de</strong>s</strong> virus “persistants” à la veille antivirale <strong>et</strong> auxtests <strong><strong>de</strong>s</strong> capacités d’éradication <strong><strong>de</strong>s</strong> logiciels antivirus ProtectionM<strong>et</strong>tre en oeuvre une Protection multi-niveaux du SIUtiliser <strong><strong>de</strong>s</strong> Moyens <strong>de</strong> protection différents <strong>et</strong> complémentaires(plusieurs antivirus, filtrage, contrôle d’intégrité, paramétrage <strong><strong>de</strong>s</strong>systèmes, <strong><strong>de</strong>s</strong> applications, ...) RéactionAdapter la gestion <strong>de</strong> crise <strong>et</strong> les procédures / scénarios critiques (ex:association co<strong>de</strong> <strong>de</strong> type Blaster <strong>et</strong> capacités <strong>de</strong> persistance)Computer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 20


Prise en compte <strong>de</strong> la menace liéeau co<strong>de</strong> malveillantComputer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 21Recommandations :Prise en compte<strong>de</strong> la menace liée au co<strong>de</strong>malveillantMise en oeuvre d’une politique antivirale i<strong>de</strong>ntification <strong><strong>de</strong>s</strong> besoins, <strong><strong>de</strong>s</strong> moyens, <strong><strong>de</strong>s</strong> responsabilitésVeille technique <strong>Anti</strong>ciper les principales crisesApplication régulière <strong><strong>de</strong>s</strong> correctifs Diminuer la vulnérabilité <strong><strong>de</strong>s</strong> postesContrôles multi-niveaux (Passerelles HTTP, SMTP, Messagerieinterne, Serveurs <strong>de</strong> données, postes <strong>de</strong> travail)<strong>Anti</strong>virus, Firewall, contrôle d’intégrité, NIPS, HIPS Assurer l’administration <strong>et</strong> l’exploitation <strong><strong>de</strong>s</strong> moyens déployésContrôle <strong><strong>de</strong>s</strong> ordinateurs portables <strong>et</strong> supportsComputer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 22


Agenda Les faiblesses connues <strong><strong>de</strong>s</strong> anti-virus Cas <strong><strong>de</strong>s</strong> archives malformées : Etu<strong>de</strong> Cert-IST Eradication <strong>de</strong> virus “persistants” : R<strong>et</strong>our d’expérience <strong>et</strong>recommandations E<strong>de</strong>lweb Recommandations Cert-ISTComputer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 23Constat Le poste utilisateur est <strong>de</strong>venu la cible Nº 1 <strong><strong>de</strong>s</strong> attaquesOpportunistes (constitution <strong>de</strong> "botn<strong>et</strong>s")Ou ciblées (espionnage industriel) L'anti-virus est une protection indispensable,mais pas infaillibleIl ne protège que contre une menace déjà i<strong>de</strong>ntifiéeIl peut être parfois contournéSes capacités <strong>de</strong> désinfection peuvent être mises en défaut De plus en plus <strong>de</strong> "chercheurs" s'intéressent aux failles <strong><strong>de</strong>s</strong>anti-virusNota : la "mo<strong>de</strong>" n'est plus à publier <strong><strong>de</strong>s</strong> avis <strong>de</strong> sécurité sur Bugtraq,mais plutôt à gar<strong>de</strong>r secr<strong>et</strong> ses trouvailles.Computer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 24


ConclusionPas <strong>de</strong> solution miracle ☹Mais une prise <strong>de</strong> conscience commune perm<strong>et</strong> <strong>de</strong> maintenir/renforcer les défenses Pour les organismes <strong>de</strong> veille <strong>et</strong> les expertsVigilance pour i<strong>de</strong>ntifier les nouvelles menacesAdapter les outils <strong>et</strong> procédures à ces menaces Pour les éditeurs <strong>de</strong> solutions anti-virusRéceptivité (vigilance) face aux "nouvelles" attaquesRéactivité Pour l'entreprise : une défense en profon<strong>de</strong>urNe pas se limiter à une protection périmétriqueSensibiliser les utilisateursProtéger l'information au sein <strong>de</strong> l'entrepriseComputer Emergency Response TeamIndustrie Services & TertiaireReSIST Septembre 2006E<strong>de</strong>lWebGroupe On-Xpage 25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!