copyright © 2007 - the owasp foundation permission is granted to copy, distribute and/or modify...

30
Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License. The OWASP Foundation OWASP http://www.owasp.org Infosecurity France Paris le 22 Novembre 2007 Les enjeux de la sécurité des Services Web

Upload: fulbert-pinto

Post on 03-Apr-2015

110 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

Copyright © 2007 - The OWASP FoundationPermission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License.

The OWASP Foundation

OWASP

http://www.owasp.org

Infosecurity FranceParis le 22 Novembre 2007

Les enjeux de la sécurité des Services Web

Page 2: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Agenda

L’OWASP Les publications de l’OWASP Les outils Quelques attaques Architecture Orientée Services (SOA) Les attaques sur les architectures SOA Les technologies de protection

Page 3: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Sébastien Gioria

Consultant indépendant en sécurité des systèmes d’informations.

+10 ans dans le domaine de la sécurité informatique (banque, assurance, télécoms, …)

Représentant Français de l’association américaine.

Page 4: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Agenda

L’OWASP Les publications de l’OWASP Les outils Quelques attaques Architecture Orientée Services (SOA) Les attaques sur les architectures SOA Les technologies de protection

Page 5: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

L’OWASP

OWASP : Open Web Application Security Project Indépendant des fournisseurs et des

gouvernements. Objectif principal : produire des outils, documents et

standards dédiés à la sécurité des applications Web. Toutes les documentations, standards, outils sont

fournis sous le modèle de l’open-source. Organisation :

Réunion d’experts indépendants en sécurité informatique Communauté mondiale(plus de 100 chapitres) réunie en une fondation américaine

pour supporter son action En France : une association. L’adhésion est gratuite et ouverte a tous.

Le point d’entrée est le wiki http://www.owasp.org

Page 6: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

6© 2007 - S.Gioria && OWASP

TrainingCLASP

Testing Guide

Project incubator

Wiki portal

Forums

Blogs

Top 10

Conferences

WebScarab

WebGoatAjax

Orizon

.NET, Java

Yours!

Validation

Chapters

Building our brand

Certification

BuildingGuide

Page 7: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Agenda

L’OWASP Les publications de l’OWASP Les outils Quelques attaques Architecture Orientée Services (SOA) Les attaques sur les architectures SOA Les technologies de protection

Page 8: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Les publications

Toutes les publications sont disponibles sur le site de l’OWASP: http://www.owasp.org

L’ensemble des documents est régi par la licence GFDL (GNU Free Documentation License)

Les documents sont issus de différentes collaborations : Projets universitairesRecherche & développements des membres

Page 9: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Les publications majeures

Le TOP 10 des vulnérabilités applicatives Le guide de conception d’applications Web

sécurisées Le FAQ de la sécurité des applications Le guide « les 10 commandements sur

l’écriture d’une application non sécurisée »

Page 10: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Le Top 10

Liste les 10 vulnérabilités des applications Web les plus rencontrées

Mis a jour tous les ans D’importantes organisations l’ont adopté

dans leurs référentiels Federal Trade Commission (US Gov) US Defense Information Systems Agency VISA (Cardholder Information Security Program) Le NIST

Page 11: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Le Top 10

Le Top 10 actuel : A1. Non validation des données d’entréeA2. Failles du Contrôle d’accèsA3. Failles d’authentification et mauvaise

gestion des sessionsA4. Failles de Cross Site ScriptingA5. Débordement de tamponsA6. Injections de données/commandes, .. A7. Mauvaise gestion des erreursA8. Stockage de données non sécuriséA9. Déni de serviceA10. Gestion non sécurisée de la configuration

Page 12: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Les Guides

100% Libres. Issus de l’expérience de milliers d’experts à

travers le monde OWASP guide

Un ouvrage pour la création d’applications Web sécurisées à l’intention des :

Développeurs Architectes …

Inclus les meilleurs pratiques dans différents langages (PHP, Java, .Net, …)

Plusieurs centaines de pages OWASP Testing guide

Ouvrage dédié à l’audit sécurité des applications Web à l’intention des pen-testeurs principalement.

Page 13: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Agenda

L’OWASP Les publications de l’OWASP Les outils Quelques attaques Architecture Orientée Services (SOA) Les attaques sur les architectures SOA Les technologies de protection

Page 14: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

OWASP Enterprise Security API (ESAPI)

Un framework de sécurité pour les développeurs

Permettre de créer une application Web Sécurisé

Classes Java Disponible sur le site

de l’OWASP

Page 15: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

WebGoat - WebScarab

WebGoat :Application Java serveur (JSP, JEEE) non

sécurisé. Sert a démontrer les failles, leur principe et a

éduquer

WebScarab :Application Java permettant d’effectuer des

tests de sécurité : Sur les applications Web Sur les WebServices

Page 16: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Quelques outils

Outil de génération de données aléatoires(Fuzzer) permettant d’injecter des données pour les tests JBroFuzz :

Fuzzer destiné à tester les applications Web WS Fuzz :

Fuzzer destiné à tester les WebServices.

Sprajax Outil destiné a tester la sécurité des applications AJAX

Et bien d’autres : http://www.owasp.org/index.php/Category:OWASP_Project

Page 17: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Agenda

L’OWASP Les publications de l’OWASP Les outils Quelques attaques Architecture Orientée Services (SOA) Les attaques sur les architectures SOA Les technologies de protection

Page 18: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Principe d’une attaque XSS

But : Envoyer l’utilisateur vers un site Web malicieux Récupérer des informations contenues dans le

navigateur Principe :

Mail ou lien malicieux Exécution de code dans le navigateur Récupération de données :

cookies, objets(IE)

Envoi des données vers l’attaquant. Dangerosité :

Passe outre les contrôles de sécurité (Firewall, IDS, …) Coupler à certaines attaques, cela permet d’accéder au

LAN

Page 19: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Principe d’une attaque XSS

(1) Injection du script(2) l’utilisateur se rend sur le serveur vulnérable :

• Suite à un SPAM • Sur un forum

(3) Récupération des données de façon malicieuse

Page 20: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Injection de données (SQL, LDAP, commandes, …)

But : Corrompre des données d’une base, d’un

annuaire.Récupérer des informations sensibles dans des

bases ou annuairesExécuter des commandes sur un système

distant.

Principe :Par la modification de la donnée attendue, la

requête d’accès à une base SQL est modifiée.

Dangerosité :Est-il utile de l’expliciter ?

Page 21: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Agenda

L’OWASP Les publications de l’OWASP Les outils Quelques attaques Architecture Orientée Services (SOA) Les attaques sur les architectures SOA Les technologies de protection

Page 22: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Architecture Orientées Services (SOA)

Architecture de type Demandeur/Fournisseur (Client/Serveur).

Les services du Fournisseur sont regroupés dans un annuaire.

Ré-usabilité des modules Indépendant des langages de programmation Proche du « métier » Une architecture SOA se construit, elle n’existe pas sur

« étagère »

Page 23: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

XML, WSDL && SOAP eXtensible Markup Language (XML) :

Langage de description d’un élément Son objectif initial est de faciliter l'échange automatisé de

contenus entre systèmes d'informations hétérogènes. Il est la base des échanges entre WebServices

Web Services Description Language (WSDL) : Langage de description d’un service Son objectif est de décrire comment dialoguer avec un

service. Simple Object Access Protocol (SOAP) :

Protocole de dialogue entre les acteurs des WebServices Normalisé par l’ Organization for the Advancement of

Structured Information Standards (OASIS) Web Services :

Dialogue entre un demandeur et un fournisseur par l’intermédiaire de messages

Page 24: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Agenda

L’OWASP Les publications de l’OWASP Les outils Quelques attaques Architecture Orientée Services (SOA) Les attaques sur les architectures SOA Les technologies de protection

Page 25: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Le constat actuel

Le système d’information s’ouvre :Architectures orientées services Intégration de partenaires« multi-play/multi-canal » : Internet,

Téléphone, Mail, Vidéo, … La sécurité aujourd’hui

Niveau 2 : VLANNiveau 3 : Liste de contrôle d’accèsNiveau 4 à 7 : Firewall, Proxy, IDS, IPSNiveau 8 : L’utilisateur

Page 26: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Les attaques sur les architectures SOA

XML Bomb :Trivial à effectuer :

Référence récursive à une entité du même document :

Peut provoquer un déni de service !

<?xml …….<!entity owasp0 « Owasp »><!entity owasp1 « &owasp0;&owasp0>….….<!entity owasp424242 « &owasp424241;&owasp424241 »><owasptest>&owasp424242;</owasptest>

Page 27: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Les Attaques sur les architectures SOA

Injection XML Permet de modifier les données d’entrée d’un

WebService. Injection Xpath/Xquery

Permet d'exécuter des requêtes de façon similaire à SQL XSS && Injection SQL

Même principe que dans une architecture classique. Mêmes dégâts possibles !

Bombes SOAP : Attaques en dénis de services via les tableaux SOAP Bombes XML + SOAP

…..

Page 28: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Agenda

L’OWASP Les publications de l’OWASP Les outils Quelques attaques Architecture Orientée Services (SOA) Les attaques sur les architectures SOA Les technologies de protection

Page 29: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

Les protections possibles WS-*

WS-Security WS-Trust WS-SecureConversation WS-SecurityPolicy WS-Federation WS-Privacy

Les Firewalls XML/SOAP

Mais cela ne protège que les messages ! Le contenu des messages n’est pas inspecté

Page 30: Copyright © 2007 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

© 2007 - S.Gioria && OWASP

La protection ultime d’une architecture SOA

Former les développeurs au développement sécurisé !

Vérifier les données ! Effectuer des tests de sécurité sur chaque

WebService !