Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Intégrer la sécurité dans votre quotidien

Intégrer la sécurité dans votre quotidien

Talk "Intégrer la sécurité dans votre quotidien" présenté à Devoxx Marocco le 27/11/2018, par Mickael Jeanroy (@mickaeljeanroy) et Houssem Belhadj Ahmed (@7ouss3m).

Avatar for Mickael Jeanroy

Mickael Jeanroy

November 27, 2018

More Decks by Mickael Jeanroy

Other Decks in Technology

Transcript

  1. Présentation #SecurityMA @mickaeljeanroy -- @7ouss3m Mickael Jeanroy Houssem Belhadj Ahmed

    Développeur @ Malt @mickaeljeanroy https://github.com/mjeanroy Développeur @ Malt @7ouss3m https://github.com/houssemba
  2. •2012 / 2016 : plus de 160 millions de comptes

    LinkedIn dans la nature •2013 : 150 millions de comptes Adobe •2016 : 80 millions de comptes dailymotion •Etc… •Source : https://haveibeenpwned.com Pourquoi ce talk ? #SecurityMA @mickaeljeanroy -- @7ouss3m
  3. Application type “Twitter” •Backend : Spring Boot, Java 8 •Frontend

    : jQuery •Infrastructure : Docker, traefik •Intégration Continue : Jenkins Contexte #SecurityMA @mickaeljeanroy -- @7ouss3m
  4. Première étape : nos dépendances sont-elles sûres ? •Maintenue /

    Éprouvée ? •Mise à jour récente ? •Affectée par une CVE connue ? Mais au fait, c’est quoi une CVE ? Etape 1 : Dépendances #SecurityMA @mickaeljeanroy -- @7ouss3m
  5. Vérifier ses dépendances sur une base de CVE •Plugin Maven

    : OWASP Dependency-Check •Plugin NPM : retire •Depuis NPM 6 : npm audit Etape 1 : Dépendances #SecurityMA @mickaeljeanroy -- @7ouss3m
  6. Dépendances Back - Maven •Installation : ajout du plugin dans

    le fichier pom.xml •Automatisation : mvn dependency-check:check Etape 1 : Dépendances #SecurityMA @mickaeljeanroy -- @7ouss3m
  7. Dépendances Front - NPM •Installation : npm install --save-dev retire

    •Automatisation : npm run retire Etape 1 : Dépendances #SecurityMA @mickaeljeanroy -- @7ouss3m
  8. NPM Audit •Source : nodesecurity.io •Automatisation : npm audit Etape

    1 : Dépendances #SecurityMA @mickaeljeanroy -- @7ouss3m
  9. •Un outil open source de l’OWASP •Il sert à trouver

    des failles de sécurités dans les applications web •Utilisé par les développeurs, les débutants en sécurités, ainsi que par les professionnels •URL : https://github.com/zaproxy Etape 2 : ZAP Zed Attack Proxy #SecurityMA @mickaeljeanroy -- @7ouss3m
  10. • Passif • Analyse tout le trafic entre le navigateur

    et l'application web. • Cherche les problèmes liés à la configuration (Headers de sécurité qui manquent etc.). • Peut être utiliser directement sur l’environnement de production (pas d’actions sur les données). • Actif • Utilise des attaques connues pour détecter des vulnérabilités potentielles • NE PAS UTILISER EN PROD OU SUR UNE APPLICATION QUE VOUS NE POSSÉDEZ PAS ! ;) Etape 2 : ZAP Zed Attack Proxy #SecurityMA @mickaeljeanroy -- @7ouss3m
  11. ZAP IS NOT A SILVER BULLET Etape 2 : ZAP

    Zed Attack Proxy #SecurityMA @mickaeljeanroy -- @7ouss3m
  12. 1- Dépendances à jour 2- Tests d’intrusion Well done, but

    wait… Etape 2 : ZAP Zed Attack Proxy #SecurityMA @mickaeljeanroy -- @7ouss3m
  13. • open source system for analyzing container images for vulnerabilities

    • static analysis for fast, reproducible results • extensible to allow for easy addition of new analyzers, reporters, image formats, etc • https://github.com/coreos/clair Etape 3 : Containers #SecurityMA @mickaeljeanroy -- @7ouss3m
  14. 1- Dépendances à jour 2- Tests d’intrusion 3- Images Docker

    Etape 3 : Containers #SecurityMA @mickaeljeanroy -- @7ouss3m
  15. Etape 4 : Falco • Les appels systèmes sont interceptés

    • Chaque appel système est transfomé en évenement #SecurityMA @mickaeljeanroy -- @7ouss3m
  16. Falco peut détecter des comportements suspects : • Exécution d’un

    shell dans un container • Lecture d’un fichier « sensible » • Connexion sortante • Etc. Les alertes peuvent être envoyées sur plusieurs canaux : sortie standard, syslog, programme externe (Slack, etc.), etc. Etape 4 : Falco #SecurityMA @mickaeljeanroy -- @7ouss3m
  17. Etape 4 : Falco - rule: shell_in_container desc: notice shell

    activity within a container condition: container.id != host and proc.name = bash output: shell in a container (user=%user.name container_id=%container.id container_name=%container.name shell=%proc.name parent=%proc.pname cmdline=%proc.cmdline) priority: WARNING Exemple : Shell in container #SecurityMA @mickaeljeanroy -- @7ouss3m