JSSI 2013. Veille avancée sur le noyau Linux. Etienne Comet 19/03/2013 19/03/2013 JSSI 2013 1



Documents pareils
Utiliser une WebCam. Micro-ordinateurs, informations, idées, trucs et astuces

OWASP Open Web Application Security Project. Jean-Marc Robert Génie logiciel et des TI

VTP. LAN Switching and Wireless Chapitre 4

Contents Windows

DOCUMENTATION MODULE BLOCKCATEGORIESCUSTOM Module crée par Prestacrea - Version : 2.0

AMENDMENT TO BILL 32 AMENDEMENT AU PROJET DE LOI 32

Règlement sur le télémarketing et les centres d'appel. Call Centres Telemarketing Sales Regulation

lundi 3 août 2009 Choose your language What is Document Connection for Mac? Communautés Numériques L informatique à la portée du Grand Public

Package Contents. System Requirements. Before You Begin

Monitor LRD. Table des matières

How to Login to Career Page

WEB page builder and server for SCADA applications usable from a WEB navigator

DOCUMENTATION - FRANCAIS... 2

Once the installation is complete, you can delete the temporary Zip files..

Principe de TrueCrypt. Créer un volume pour TrueCrypt

Gestion des prestations Volontaire

APPENDIX 6 BONUS RING FORMAT

RULE 5 - SERVICE OF DOCUMENTS RÈGLE 5 SIGNIFICATION DE DOCUMENTS. Rule 5 / Règle 5

Instructions pour mettre à jour un HFFv2 v1.x.yy v2.0.00

Air Transportation Tax Order, Décret de 1995 sur la taxe de transport aérien CONSOLIDATION CODIFICATION

MELTING POTES, LA SECTION INTERNATIONALE DU BELLASSO (Association étudiante de lʼensaparis-belleville) PRESENTE :

THE EVOLUTION OF CONTENT CONSUMPTION ON MOBILE AND TABLETS

APPENDIX 2. Provisions to be included in the contract between the Provider and the. Holder

Exercices sur SQL server 2000

TEST D INTRUISION. Document Technique

The new consumables catalogue from Medisoft is now updated. Please discover this full overview of all our consumables available to you.

DOCUMENTATION - FRANCAIS... 2

Toni Lazazzera Tmanco is expert partner from Anatole ( and distributes the solution AnatoleTEM

Netdays Comprendre et prévenir les risques liés aux codes malicieux

Quick Start Guide This guide is intended to get you started with Rational ClearCase or Rational ClearCase MultiSite.

First Nations Assessment Inspection Regulations. Règlement sur l inspection aux fins d évaluation foncière des premières nations CONSOLIDATION

Notice Technique / Technical Manual

L ABC de l acquisition de petites entreprises

Créer un blog ou un site e-commerce avec WordPress

RAPID Prenez le contrôle sur vos données

L analyse de logs. Sébastien Tricaud Groupe Resist - Toulouse 2013

XtremWeb-HEP Interconnecting jobs over DG. Virtualization over DG. Oleg Lodygensky Laboratoire de l Accélérateur Linéaire

Guide d'installation rapide TFM-560X YO.13

Plan. Department of Informatics

POLICY: FREE MILK PROGRAM CODE: CS-4

Application Form/ Formulaire de demande

GIGABIT PCI DESKTOP ADAPTER DGE-530T. Quick Installation Guide+ Guide d installation+

Le passé composé. C'est le passé! Tout ça c'est du passé! That's the past! All that's in the past!

PACKZ System Requirements. Version: Version: Copyright 2015, PACKZ Software GmbH. 1

Topologies et Outils d Alertesd

Sécurité des systèmes d exploitation

Guide d'installation et de configuration de Pervasive.SQL 7 dans un environnement réseau Microsoft Windows NT

Face Recognition Performance: Man vs. Machine

Surveillance de Scripts LUA et de réception d EVENT. avec LoriotPro Extended & Broadcast Edition

Comment Accéder à des Bases de Données MySQL avec Windows lorqu'elles sont sur un Serveur Linux

Credit Note and Debit Note Information (GST/ HST) Regulations

BILL C-452 PROJET DE LOI C-452 C-452 C-452 HOUSE OF COMMONS OF CANADA CHAMBRE DES COMMUNES DU CANADA

Instructions Mozilla Thunderbird Page 1

Compléter le formulaire «Demande de participation» et l envoyer aux bureaux de SGC* à l adresse suivante :

Le Cloud Computing est-il l ennemi de la Sécurité?

Motivations (many2many) Motivations (many2one) Sur le thème de la Version. La gestion de version. La gestion de configuration.

that the child(ren) was/were in need of protection under Part III of the Child and Family Services Act, and the court made an order on

FÉDÉRATION INTERNATIONALE DE NATATION Diving

Adeunis-RF Softwares. Stand-Alone configuration Manager V2. User guide version V1 FRANCAIS ENGLISH

de stabilisation financière

TABLE DES MATIERES A OBJET PROCEDURE DE CONNEXION

Lavatory Faucet. Instruction Manual. Questions?

Garage Door Monitor Model 829LM

calls.paris-neuroscience.fr Tutoriel pour Candidatures en ligne *** Online Applications Tutorial

Nouveautés printemps 2013

1.The pronouns me, te, nous, and vous are object pronouns.

Please kindly find below a synoptic table showing the various ways of transport from Mahe to La Digue, with a stop over on Praslin:

SERVEUR DÉDIÉ DOCUMENTATION

WiFi Security Camera Quick Start Guide. Guide de départ rapide Caméra de surveillance Wi-Fi (P5)

INDIVIDUALS AND LEGAL ENTITIES: If the dividends have not been paid yet, you may be eligible for the simplified procedure.

M2-Images. Rendu Temps Réel - OpenGL 4 et compute shaders. J.C. Iehl. December 18, 2013

Calculation of Interest Regulations. Règlement sur le calcul des intérêts CONSOLIDATION CODIFICATION. Current to August 4, 2015 À jour au 4 août 2015

Ocs Inventory et GLPI s appuie sur un serveur LAMP. Je vais donc commencer par installer les paquets nécessaires.

Plan global Outils de développement et compilation. Plan. Objectifs des outils présentés. IDE, GCC/Clang, ASAN, perf, valgrind, GDB.

SunATM 4.0 Release Notes

affichage en français Nom de l'employeur *: Lions Village of Greater Edmonton Society

ONTARIO Court File Number. Form 17E: Trial Management Conference Brief. Date of trial management conference. Name of party filing this brief

Paxton. ins Net2 desktop reader USB

Contrôle d'accès Access control. Notice technique / Technical Manual

IPSAS 32 «Service concession arrangements» (SCA) Marie-Pierre Cordier Baudouin Griton, IPSAS Board

Improving the breakdown of the Central Credit Register data by category of enterprises

Installation de Vmware serveur Windows

THE LAW SOCIETY OF UPPER CANADA BY-LAW 19 [HANDLING OF MONEY AND OTHER PROPERTY] MOTION TO BE MOVED AT THE MEETING OF CONVOCATION ON JANUARY 24, 2002

Folio Case User s Guide

SNMP for cloud Jean Parpaillon. SNMP4cloud - 1

Utiliser un proxy sous linux

Cedric Dumoulin (C) The Java EE 7 Tutorial

LOGICIEL D'ADMINISTRATION POUR E4000 & G4000 MANAGEMENT SOFTWARE FOR E4000 & G4000

Bill 12 Projet de loi 12

Cahier d exploitation

SCHOLARSHIP ANSTO FRENCH EMBASSY (SAFE) PROGRAM APPLICATION FORM

CALCUL DE LA CONTRIBUTION - FONDS VERT Budget 2008/2009

Disclosure on Account Opening by Telephone Request (Trust and Loan Companies) Regulations

Note d Application. Bascule d ALOHA via injection de route en BGP

Logiciel Libre & qualité. Présentation

Warning: Failure to follow these warnings could result in property damage, or personal injury.

3615 SELFIE. HOW-TO / GUIDE D'UTILISATION

Scénarios économiques en assurance

Comprendre l impact de l utilisation des réseaux sociaux en entreprise SYNTHESE DES RESULTATS : EUROPE ET FRANCE

Transcription:

JSSI 2013 Veille avancée sur le noyau Linux Etienne Comet 19/03/2013 19/03/2013 JSSI 2013 1

Sommaire Analyser un CVE noyau Chercher les bugs corrigés silencieusement Le GIT Pousser l analyse d un bug : étudier son exploitabilité 19/03/2013 JSSI 2013 2

Introduction Contexte Pénurie d exploits publics Objectif Elever ses privilèges Problématiques : De nombreuses informations à examiner Des informations peu détaillées Beaucoup de bugs corrigés silencieusement De nombreux bugs inutiles 19/03/2013 JSSI 2013 3

Analyser un CVE noyau 19/03/2013 JSSI 2013 4

Analyser un CVE noyau 19/03/2013 JSSI 2013 5

Analyser un CVE noyau Les éléments importants Nature du bug Conséquences du bug Versions affectées Partie du noyau affectée Configuration nécessaire Complexité d exploitation 19/03/2013 JSSI 2013 6

Analyser un CVE noyau Différents types de bugs Integer overflows (CVE-2010-3442) Bugs de signe (CVE-2010-3437) Buffer overflows (CVE-2010-1084) Double free (CVE-2011-1479) Reuse after free (CVE-2009-4141 : fasync) Mauvaises vérifications de droits (CVE-2010-4347) Race conditions (CVE-2012-3552) Leak d'informations (CVE-2011-2495) Dead locks, infinite loop et bien d'autres... 19/03/2013 JSSI 2013 7

Analyser un CVE noyau 19/03/2013 JSSI 2013 8

Analyser un CVE noyau 19/03/2013 JSSI 2013 9

Analyser un CVE noyau CVE-2012-3400 Heap-based buffer overflow in the udf_load_logicalvol function in fs/udf/super.c in the Linux kernel before 3.4.5 allows remote attackers to cause a denial of service (system crash) or possibly have unspecified other impact via a crafted UDF filesystem. Question : est-ce intéressant? 19/03/2013 JSSI 2013 10

Analyser un CVE noyau CVE-2012-3510 Use-after-free vulnerability in the xacct_add_tsk function in kernel/tsacct.c in the Linux kernel before 2.6.19 allows local users to obtain potentially sensitive information from kernel memory or cause a denial of service (system crash) via a taskstats TASKSTATS_CMD_ATTR_PID command. Question : est-ce intéressant? 19/03/2013 JSSI 2013 11

Analyser un CVE noyau CVE-2013-0217 Memory leak in drivers/net/xen-netback/netback.c in the Xen netback functionality in the Linux kernel before 3.7.8 allows guest OS users to cause a denial of service (memory consumption) by triggering certain error conditions. Question : est-ce intéressant? 19/03/2013 JSSI 2013 12

Analyser un CVE noyau Conclusions sur les CVE Il y en a assez peu Beaucoup sont inutiles Bugs qui ont pignon sur rue : vite corrigés Il est bon de chercher d'autres bugs 19/03/2013 JSSI 2013 13

Chercher les bugs corrigés silencieusement Les sources d information Les mailing lists des développeurs Le bug tracker RedHat (bugzilla) OpenWall Kerneloops.org Le GIT kernel 19/03/2013 JSSI 2013 14

Chercher les bugs corrigés silencieusement Bugzilla Description of the problem: Lack proper synchronization to manipulate inet->opt ip_options can lead to system crash. Problem is that ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can change inet->opt pointer and free old one under us. Given right server application (setting socket options and processing traffic over the same socket at the same time), remote attacker could use this flaw to crash the system. More likely though, local unprivileged user could use this flaw to crash the system. 19/03/2013 JSSI 2013 15

Chercher les bugs corrigés silencieusement 19/03/2013 JSSI 2013 16

Chercher les bugs corrigés silencieusement Userland can send a netlink message requesting SOCK_DIAG_BY_FAMILY with a family greater or equal then AF_MAX -- the array size of sock_diag_handlers[]. The current code does not test for this condition therefore is vulnerable to an out-ofbound access opening doors for a privilege escalation. --- diff --git a/net/core/sock_diag.c b/net/core/sock_diag.c index 602cd63..750f44f 100644 --- a/net/core/sock_diag.c +++ b/net/core/sock_diag.c @@ -121,6 +121,9 @@ static int sock_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) if (nlmsg_len(nlh) < sizeof(*req)) return -EINVAL; + if (req->sdiag_family >= AF_MAX) + return -EINVAL; + hndl = sock_diag_lock_handler(req->sdiag_family); -- 1.7.10.4 19/03/2013 JSSI 2013 17

Chercher les bugs corrigés silencieusement Les mailing lists développeurs Quantité énorme d'informations Difficile à trier Avantage : on a les bugs avant qu'ils ne soient corrigés 19/03/2013 JSSI 2013 18

Le GIT Le GIT noyau Intérêt : on voit toutes les modifications Chaque commit contient un texte d'explication L'output est facile à parser On y trouve tous les bugs patchés silencieusement 19/03/2013 JSSI 2013 19

Le GIT commit a5cd335165e31db9dbab636fd29895d41da55dd2 Author: Xi Wang <xi.wang@gmail.com> Date: Wed Nov 23 01:12:01 2011-0500 drm: integer overflow in drm_mode_dirtyfb_ioctl() There is a potential integer overflow in drm_mode_dirtyfb_ioctl() if userspace passes in a large num_clips. The call to kmalloc would allocate a small buffer, and the call to fb->funcs->dirty may result in a memory corruption. Reported-by: Haogang Chen <haogangchen@gmail.com> 19/03/2013 JSSI 2013 20

Le GIT Le GIT : une mine d or Les bugs corrigés silencieusement sont beaucoup plus intéressants Problème : beaucoup trop d'informations Solution : industrialiser le parsing 19/03/2013 JSSI 2013 21

Le GIT Industrialisation de la veille Analyse constante des commits noyaux Recherche des patterns intéressants Mise en valeur des éléments importants du commit Interface permettant une sélection plus fine Résultat : une veille constante, efficace et complète Aller à l essentiel Objectif : devenir root Trier en fonction de la région du noyau touchée Ecarter rapidement les bugs inutiles Bien connaître sa cible Approfondir l étude d un bug 19/03/2013 JSSI 2013 22

Pousser l analyse d un bug : étudier son exploitabilité Grandes étapes de l étude d un bug Trouver l emplacement du bug dans les sources Trouver un chemin d accès vers la fonction vulnérable Faire un PoC nous permettant de déclencher le bug Coder l exploit 19/03/2013 JSSI 2013 23

Pousser l analyse d un bug : étudier son exploitabilité Des outils utiles pour parcourir les sources Linux Cross Reference (LXR). Lxr.linux.no Understand de SciTool Cscope Outils incontournables de debug noyau SystemTap Vmware + GDB Cscope 19/03/2013 JSSI 2013 24

Questions? Etienne Comet / e.comet@lexfo.fr pour toutes questions sur la présentation 19/03/2013 JSSI 2013 25