SlideShare una empresa de Scribd logo
1 de 51
Descargar para leer sin conexión
The OWASP Foundation
                                                                        http://www.owasp.org




                      Sécurité des Web Services
                                                  (SOAP vs REST)
   Sylvain MARET
   Principal Consultant / MARET Consulting / @smaret

   OpenID Switzerland & OWASP Switzerland




Copyright © The OWASP Foundation
Permission is granted to copy, distribute and/or modify this document
under the terms of the OWASP License.



05/06.11.2012, Version 1.1 @smaret
Agenda
•   Qu’est-ce qu’un Web Service ?
•   SOAP
•   REST
•   Threat Modeling / ACME SA
•   Réduction des risques
•   Conclusion
•   Questions
    2
Bio
•   18 years of experience in ICT Security
•   Principal Consultant at MARET Consulting
•   Expert & Lecturer at University of Applied Sciences (Yverdon)
•   Swiss French Area delegate at OpenID Switzerland
•   Co-founder Application Security Forum #ASFWS
•   OWASP Member
•   Author of the blog: la Citadelle Electronique
•   http://ch.linkedin.com/in/smaret or @smaret
•   http://www.slideshare.net/smaret

• Chosen field
        – AppSec / Digital Identity Security / Cyber Defense

    3
Agenda
•       Qu’est-ce qu’un Web Service ?
•       SOAP
•       REST
•       Threat Modeling / ACME SA
•       Réduction des risques
•       Conclusion
•       Questions


    4
Web Service ?



                XML, JSON,   Provider
     Consumer     etc.




 5
Un peu d’histoire

•   1990 : DCE/RPC – Distributed Computing Environment
•   1992 : CORBA – Common Object Request Broker Architecture
•   1990-1993 : Microsoft’s DCOM -- Distributed Component Object Model
•   1995: RMI – Monde Java

• Pour arriver à une standardisation (toujours en cours) des protocoles,
  outils, langages et interfaces

        – SOAP
        – REST
        – Etc.
                            Web Service
    6
Typical Web Services environment




  7
Source: Mastering Web Services Security / www.wiley.com
Agenda
•       Qu’est-ce qu’un Web Service ?
•       SOAP
•       REST
•       Threat Modeling / ACME SA
•       Réduction des risques
•       Conclusion
•       Questions


    8
SOAP: Démystification des technologies
• Langages
      –   XML
      –   WSDL : Descripteur du service
      –   UDDI: Annuaire des services
      –   Xpath
• Protocoles
      – Transport: HTTP, HTTPS, SMTP, FTP, SMS, TFTP, SSH, etc. (TCP or UDP)
      – Message: Enveloppe SOAP
• Sécurité
      – WS-Security (Signature & Chiffrement)
• Autres éléments
      – AuthN: SAML, X509, Username & Password, Kerberos, HTTP Digest, etc.


  9
Enveloppe SOAP

                         - SOAP : Simple Object Access Protocol

                         - Permet l’envoi de messages XML




10   Source= wikipédia
SOAP request




               SOAP response



11
UDDI
• Universal Description Discovery and Integration,
  connu aussi sous l'acronyme UDDI, est un annuaire
  de services fondé sur XML et plus particulièrement
  destiné aux services Web.




 12
WSDL
  • WSDL est une grammaire XML permettant
    de décrire un Service Web.

  • Le WSDL sert à décrire :
          – le format de messages requis pour communiquer avec ce
            service
          – les méthodes que le client peut invoquer
          – la localisation du service
          – le protocole de communication (SOAP RPC ou SOAP
            orienté message)

     13
http://fr.wikipedia.org/wiki/Web_Services_Description_Language
WSDL




http://predic8.com/wsdl-reading.htm
      14
WSDL: exemple




15
SOAP: Démystification des protocoles
      Découverte                  UDDI



      Description                WSDL



        Message               SOAP / XML


                    HTTP, HTTPS, FTP, SFTP, SMS, SMTP
      Protocole
                              (TCP or UDP)


       Transport                   IP
 16
Agenda
•        Qu’est-ce qu’un Web Service ?
•        SOAP
•        REST
•        Threat Modeling / ACME SA
•        Réduction des risques
•        Conclusion
•        Questions


    17
REST: Démystification des technologies
• Langages
       – XML
       – JSON
       – XHTML, HTML, PDF... as data formats
• Protocoles
       – HTTP(s)  Utilisation d’une URL
       – Méthode de communication (GET, POST, PUT, DELETE)
• Sécurité
       – Sécurité du transport (SSL/TLS)
       – Sécurité des messages: HMAC / Doseta / JWS, etc. (Like XML Signature)
• Autres éléments
       – Oauth, API Keys, etc.


  18
Représentation REST (exemple JSON)




 19
Méthodes REST




20
REST: Démystification des protocoles
        Découverte           ???


        Description   WADL, Swagger ***


           Message     XML, JSON, etc.


        Protocole        HTTP, HTTPS


          Transport        TCP/IP


     21
*** Avant-gardiste!
Example




22
Example Twitter (OAuth)




 23
24
SOAP vs REST




25
Agenda
•        Qu’est-ce qu’un Web Service ?
•        SOAP
•        REST
•        Threat Modeling / ACME SA
•        Réduction des risques
•        Conclusion
•        Questions


    26
27
http://fr.wikipedia.org/wiki/Diagramme_de_flux_de_donn%C3%A9es
28
Modèle STRIDE




https://www.owasp.org/index.php/Application_Threat_Modeling


29
Menaces - DFD Acme SA
• Threat 1
      – Interception des messages (Information disclosure)
      – Modification des messages (Tampering)
      – Usurpation d’identité (Spoofing)

• Threat 2
      – Attaque de l’application
         •   BoF
         •   Injection
         •   DoS & DDoS
         •   Etc

 30
Agenda
•        Qu’est-ce qu’un Web Service ?
•        SOAP
•        REST
•        Threat Modeling / ACME SA
•        Réduction des risques
•        Conclusion
•        Questions


    31
ACME SA: Réduction
des risques ?

•    Chiffrement du transport
•    AuthN
•    SSL Mutual AuthN / X509
•    WAF / XML Gateway
•    Intégrité et confidentialité des messages
•    Secure Coding


    32
Chiffrement du transport
                 SOAP / XML           REST
HTTPS                         HTTPS
SSL/TLS tunnel
SSH
IPSEC
Etc.




    33
AuthN
              SOAP / XML                          REST
HTTP Basic, Digest,              HTTP Basic, Digest,
HTTP Header                      HTTP Header
Mutual SSL                       Mutual SSL
IP trust                         IP trust
WS Security user name password   Oauth
WS SAML Authentication token     API Keys
XML Signature                    JSON Web Token (JWT)
Kerberos
Etc.




    34
SSL Mutual AuthN / X509 / PKI
               SOAP / XML                                    REST
SSL/TLS Mutual AuthN**                      SSL/TLS Mutual AuthN**




    35
** Man in the middle not possible… (As I Know)
WAF / XML Gateway (Protection périmétrique)
               SOAP / XML                     REST
Reverse Proxy               Reverse Proxy
Contrôle requêtes HTTP      Contrôle requêtes HTTP
Rupture SSL/TLS             Rupture SSL/TLS
Black List                  Black List
White List                  White List
Validation WSDL
Signature & Verification
Encryption & Decryption
SAML




    36
Intégrité et confidentialité des messages
                 SOAP / XML                              REST
XML Signature                 •(p.ex: HMAC, Doseta)
XML Encryption                • JSON Web Signature (JWS) – Draft v7
                              • JSON Web Encryption




                                 http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-07



    37
                                    ** Pas de chiffrement à ma connaissance
Example XML Signature (SOAP)




38
Example JSON “Signature”




39
Code security
                 SOAP / XML                                          REST
- Data input validation                          - Data input validation
- Data output encoding                           - Data output encoding
- Pseudorandom data generation, high             - Pseudorandom data generation, high
entropy                                          entropy
- Strong / reliable data encryption algorithms   - Strong / reliable data encryption algorithms
- Data leakage prevention                        - Data leakage prevention
- Robust error & exception handling              - Robust error & exception handling
- Anti-automation and expiration measures        - Anti-automation and expiration measures

OWASP Application Security Verification Standard (ASVS):
https://www.owasp.org/index.php/ASVS
WASC web application weaknesses:
http://projects.webappsec.org/w/page/13246978/Threat%20Classification

     40
Agenda
•        Qu’est-ce qu’un Web Service ?
•        SOAP
•        REST
•        Threat Modeling / ACME SA
•        Réduction des risques
•        Conclusion
•        Questions


    41
Conclusion
•    SOAP:
         –   Implémenter les standards WS-* liés à la sécurité?
         –   Mettre en place un filtrage applicatif (WAF, XML GW)
         –   Complexe à mettre en œuvre (PKI, Secure coding, Cryptography, etc.)
         –   Architecture à forte contrainte de sécurité

•    REST
         –   Mettre en place un filtrage applicatif (WAF, XML GW)
         –   Implémentation rapide et facile  tendance
         –   Architecture de type Cloud, Intranet, Social Login, etc.
         –   Emergence des standards (JSON Web Algorithms)


•    On attend avec impatience les standards sécu pour REST ???
      – Pragmatique: protection périmétrique, chiffrement et Secure Coding ???


    42
Approche périmétrique vs WS-Security ?




 43
Questions?




44
Merci / Thank you!

Contact:
      sma@maret-consulting.ch
      @smaret
      http://www.maret-consulting.ch
      Slides:
         http://slideshare.net/ASF-WS/




 45
The OWASP Foundation
                                                                        http://www.owasp.org




                                               Backup Slides
        By Sylvain Maret




Copyright © The OWASP Foundation
Permission is granted to copy, distribute and/or modify this document
under the terms of the OWASP License.


        46
47
SoapBox




48
Capture HTTP




49
Signer le message




 50
Signer le message




 51

Más contenido relacionado

La actualidad más candente

Chp5 - Sécurité des Services
Chp5 - Sécurité des ServicesChp5 - Sécurité des Services
Chp5 - Sécurité des ServicesLilia Sfaxi
 
SOA - Architecture Orientée Service : Démystification
SOA - Architecture Orientée Service : DémystificationSOA - Architecture Orientée Service : Démystification
SOA - Architecture Orientée Service : DémystificationKhaled Ben Driss
 
Architectures orientées services
Architectures orientées servicesArchitectures orientées services
Architectures orientées servicesDonia Hammami
 
Les architectures client serveur
Les architectures client serveurLes architectures client serveur
Les architectures client serveurAmeni Ouertani
 
Architectures orientés services (SOA)
Architectures orientés services (SOA)Architectures orientés services (SOA)
Architectures orientés services (SOA)Heithem Abbes
 
Architecture réparties et les services web
Architecture réparties et les services webArchitecture réparties et les services web
Architecture réparties et les services webCHOUAIB EL HACHIMI
 
Introduction aux web services
Introduction aux web servicesIntroduction aux web services
Introduction aux web servicesmohammed addoumi
 
Architectures distribuées
Architectures distribuéesArchitectures distribuées
Architectures distribuéesFranck SIMON
 
Securisation des web services soap contre les attaques par injection
Securisation des web services soap contre les attaques par injectionSecurisation des web services soap contre les attaques par injection
Securisation des web services soap contre les attaques par injectionZakaria SMAHI
 
Architecture orientée service (SOA)
Architecture orientée service (SOA)Architecture orientée service (SOA)
Architecture orientée service (SOA)Klee Group
 
eServices-Chp5: Microservices et API Management
eServices-Chp5: Microservices et API ManagementeServices-Chp5: Microservices et API Management
eServices-Chp5: Microservices et API ManagementLilia Sfaxi
 
Services web soap-el-habib-nfaoui
Services web soap-el-habib-nfaouiServices web soap-el-habib-nfaoui
Services web soap-el-habib-nfaouiEl Habib NFAOUI
 
eServices-Tp1: Web Services
eServices-Tp1: Web ServiceseServices-Tp1: Web Services
eServices-Tp1: Web ServicesLilia Sfaxi
 
Webinaire : sécurité informatique sur le web - Jérôme Thémée
Webinaire : sécurité informatique sur le web - Jérôme ThéméeWebinaire : sécurité informatique sur le web - Jérôme Thémée
Webinaire : sécurité informatique sur le web - Jérôme ThéméeMarie Tapia
 

La actualidad más candente (20)

Chp2 - SOA
Chp2 - SOAChp2 - SOA
Chp2 - SOA
 
Chp5 - Sécurité des Services
Chp5 - Sécurité des ServicesChp5 - Sécurité des Services
Chp5 - Sécurité des Services
 
SOA - Architecture Orientée Service : Démystification
SOA - Architecture Orientée Service : DémystificationSOA - Architecture Orientée Service : Démystification
SOA - Architecture Orientée Service : Démystification
 
Support Web Services SOAP et RESTful Mr YOUSSFI
Support Web Services SOAP et RESTful Mr YOUSSFISupport Web Services SOAP et RESTful Mr YOUSSFI
Support Web Services SOAP et RESTful Mr YOUSSFI
 
Architectures orientées services
Architectures orientées servicesArchitectures orientées services
Architectures orientées services
 
Les architectures client serveur
Les architectures client serveurLes architectures client serveur
Les architectures client serveur
 
Architectures orientés services (SOA)
Architectures orientés services (SOA)Architectures orientés services (SOA)
Architectures orientés services (SOA)
 
Architecture réparties et les services web
Architecture réparties et les services webArchitecture réparties et les services web
Architecture réparties et les services web
 
Web services SOAP et REST
Web services  SOAP et RESTWeb services  SOAP et REST
Web services SOAP et REST
 
Introduction aux web services
Introduction aux web servicesIntroduction aux web services
Introduction aux web services
 
Architectures distribuées
Architectures distribuéesArchitectures distribuées
Architectures distribuées
 
Securisation des web services soap contre les attaques par injection
Securisation des web services soap contre les attaques par injectionSecurisation des web services soap contre les attaques par injection
Securisation des web services soap contre les attaques par injection
 
Architecture orientée service (SOA)
Architecture orientée service (SOA)Architecture orientée service (SOA)
Architecture orientée service (SOA)
 
Soa & services web
Soa & services webSoa & services web
Soa & services web
 
eServices-Chp5: Microservices et API Management
eServices-Chp5: Microservices et API ManagementeServices-Chp5: Microservices et API Management
eServices-Chp5: Microservices et API Management
 
Services web soap-el-habib-nfaoui
Services web soap-el-habib-nfaouiServices web soap-el-habib-nfaoui
Services web soap-el-habib-nfaoui
 
eServices-Tp1: Web Services
eServices-Tp1: Web ServiceseServices-Tp1: Web Services
eServices-Tp1: Web Services
 
Support distributed computing and caching avec hazelcast
Support distributed computing and caching avec hazelcastSupport distributed computing and caching avec hazelcast
Support distributed computing and caching avec hazelcast
 
Support JEE Spring Inversion de Controle IOC et Spring MVC
Support JEE Spring Inversion de Controle IOC et Spring MVCSupport JEE Spring Inversion de Controle IOC et Spring MVC
Support JEE Spring Inversion de Controle IOC et Spring MVC
 
Webinaire : sécurité informatique sur le web - Jérôme Thémée
Webinaire : sécurité informatique sur le web - Jérôme ThéméeWebinaire : sécurité informatique sur le web - Jérôme Thémée
Webinaire : sécurité informatique sur le web - Jérôme Thémée
 

Similar a Securite des Web Services (SOAP vs REST) / OWASP Geneva dec. 2012

ASFWS 2012 / Initiation à la sécurité des Web Services par Sylvain Maret
ASFWS 2012 / Initiation à la sécurité des Web Services par Sylvain MaretASFWS 2012 / Initiation à la sécurité des Web Services par Sylvain Maret
ASFWS 2012 / Initiation à la sécurité des Web Services par Sylvain MaretSylvain Maret
 
ASFWS 2012 WS Security - REST vs SOAP par Sylvain Maret
ASFWS 2012 WS Security - REST vs SOAP par Sylvain MaretASFWS 2012 WS Security - REST vs SOAP par Sylvain Maret
ASFWS 2012 WS Security - REST vs SOAP par Sylvain MaretCyber Security Alliance
 
Utilisation de services Web sécurisés en Java en environnement Open Source
Utilisation de services Web sécurisés en Java en environnement Open SourceUtilisation de services Web sécurisés en Java en environnement Open Source
Utilisation de services Web sécurisés en Java en environnement Open Sourceguest3be047
 
Sophia conf securite microservices - 2017
Sophia conf   securite microservices - 2017Sophia conf   securite microservices - 2017
Sophia conf securite microservices - 2017SecludIT
 
soapC1.pdfnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
soapC1.pdfnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnsoapC1.pdfnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
soapC1.pdfnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnHINDGUENDOUZ
 
Sécurité des web services soap
Sécurité des web services soapSécurité des web services soap
Sécurité des web services soapZakaria SMAHI
 
Asterid: Linked Data Asterisms
Asterid: Linked Data AsterismsAsterid: Linked Data Asterisms
Asterid: Linked Data AsterismsGregoire Burel
 
Sécurité des applications Web
Sécurité des applications WebSécurité des applications Web
Sécurité des applications WebSylvain Maret
 
Wbm12 formation-webmaster-expert-securite-des-applications-web
Wbm12 formation-webmaster-expert-securite-des-applications-webWbm12 formation-webmaster-expert-securite-des-applications-web
Wbm12 formation-webmaster-expert-securite-des-applications-webCERTyou Formation
 
Cours services web_fabrice_mourlin
Cours services web_fabrice_mourlinCours services web_fabrice_mourlin
Cours services web_fabrice_mourlinangeeLee
 
Sécurité des Développements Webs et Mobiles
Sécurité des Développements Webs et MobilesSécurité des Développements Webs et Mobiles
Sécurité des Développements Webs et MobilesPhonesec
 
Es66 g formation-cours-avance-sur-la-securite-z-os-cryptographie-reseau-racf-...
Es66 g formation-cours-avance-sur-la-securite-z-os-cryptographie-reseau-racf-...Es66 g formation-cours-avance-sur-la-securite-z-os-cryptographie-reseau-racf-...
Es66 g formation-cours-avance-sur-la-securite-z-os-cryptographie-reseau-racf-...CERTyou Formation
 
ARCHITECTURE MICROSERVICE : TOUR D’HORIZON DU CONCEPT ET BONNES PRATIQUES
ARCHITECTURE MICROSERVICE : TOUR D’HORIZON DU CONCEPT ET BONNES PRATIQUESARCHITECTURE MICROSERVICE : TOUR D’HORIZON DU CONCEPT ET BONNES PRATIQUES
ARCHITECTURE MICROSERVICE : TOUR D’HORIZON DU CONCEPT ET BONNES PRATIQUESSOAT
 

Similar a Securite des Web Services (SOAP vs REST) / OWASP Geneva dec. 2012 (20)

ASFWS 2012 / Initiation à la sécurité des Web Services par Sylvain Maret
ASFWS 2012 / Initiation à la sécurité des Web Services par Sylvain MaretASFWS 2012 / Initiation à la sécurité des Web Services par Sylvain Maret
ASFWS 2012 / Initiation à la sécurité des Web Services par Sylvain Maret
 
ASFWS 2012 WS Security - REST vs SOAP par Sylvain Maret
ASFWS 2012 WS Security - REST vs SOAP par Sylvain MaretASFWS 2012 WS Security - REST vs SOAP par Sylvain Maret
ASFWS 2012 WS Security - REST vs SOAP par Sylvain Maret
 
Utilisation de services Web sécurisés en Java en environnement Open Source
Utilisation de services Web sécurisés en Java en environnement Open SourceUtilisation de services Web sécurisés en Java en environnement Open Source
Utilisation de services Web sécurisés en Java en environnement Open Source
 
Sophia conf securite microservices - 2017
Sophia conf   securite microservices - 2017Sophia conf   securite microservices - 2017
Sophia conf securite microservices - 2017
 
soapC1.pdfnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
soapC1.pdfnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnsoapC1.pdfnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
soapC1.pdfnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
 
Démystifions l'API-culture!
Démystifions l'API-culture!Démystifions l'API-culture!
Démystifions l'API-culture!
 
Sécurité des web services soap
Sécurité des web services soapSécurité des web services soap
Sécurité des web services soap
 
SRI.pdf
SRI.pdfSRI.pdf
SRI.pdf
 
Asterid: Linked Data Asterisms
Asterid: Linked Data AsterismsAsterid: Linked Data Asterisms
Asterid: Linked Data Asterisms
 
Sécurité des applications Web
Sécurité des applications WebSécurité des applications Web
Sécurité des applications Web
 
SSL.pdf
SSL.pdfSSL.pdf
SSL.pdf
 
OpenSSL
OpenSSLOpenSSL
OpenSSL
 
OpenSSL
OpenSSLOpenSSL
OpenSSL
 
Wbm12 formation-webmaster-expert-securite-des-applications-web
Wbm12 formation-webmaster-expert-securite-des-applications-webWbm12 formation-webmaster-expert-securite-des-applications-web
Wbm12 formation-webmaster-expert-securite-des-applications-web
 
Cours services web_fabrice_mourlin
Cours services web_fabrice_mourlinCours services web_fabrice_mourlin
Cours services web_fabrice_mourlin
 
Soap
SoapSoap
Soap
 
Sécurité des Développements Webs et Mobiles
Sécurité des Développements Webs et MobilesSécurité des Développements Webs et Mobiles
Sécurité des Développements Webs et Mobiles
 
Es66 g formation-cours-avance-sur-la-securite-z-os-cryptographie-reseau-racf-...
Es66 g formation-cours-avance-sur-la-securite-z-os-cryptographie-reseau-racf-...Es66 g formation-cours-avance-sur-la-securite-z-os-cryptographie-reseau-racf-...
Es66 g formation-cours-avance-sur-la-securite-z-os-cryptographie-reseau-racf-...
 
ARCHITECTURE MICROSERVICE : TOUR D’HORIZON DU CONCEPT ET BONNES PRATIQUES
ARCHITECTURE MICROSERVICE : TOUR D’HORIZON DU CONCEPT ET BONNES PRATIQUESARCHITECTURE MICROSERVICE : TOUR D’HORIZON DU CONCEPT ET BONNES PRATIQUES
ARCHITECTURE MICROSERVICE : TOUR D’HORIZON DU CONCEPT ET BONNES PRATIQUES
 
education
educationeducation
education
 

Más de Sylvain Maret

Air Navigation Service Providers - Unsecurity on Voice over IP Radion
Air Navigation Service Providers - Unsecurity on Voice over IP RadionAir Navigation Service Providers - Unsecurity on Voice over IP Radion
Air Navigation Service Providers - Unsecurity on Voice over IP RadionSylvain Maret
 
factsheet_4g_critical_comm_en_vl
factsheet_4g_critical_comm_en_vlfactsheet_4g_critical_comm_en_vl
factsheet_4g_critical_comm_en_vlSylvain Maret
 
INA Volume 1/3 Version 1.02 Released / Digital Identity and Authentication
INA Volume 1/3 Version 1.02 Released / Digital Identity and AuthenticationINA Volume 1/3 Version 1.02 Released / Digital Identity and Authentication
INA Volume 1/3 Version 1.02 Released / Digital Identity and AuthenticationSylvain Maret
 
INA Volume 1/3 Version 1.0 Released / Digital Identity and Authentication
INA Volume 1/3 Version 1.0 Released / Digital Identity and AuthenticationINA Volume 1/3 Version 1.0 Released / Digital Identity and Authentication
INA Volume 1/3 Version 1.0 Released / Digital Identity and AuthenticationSylvain Maret
 
INA Volume 1/3 Version 1.0 RC / Digital Identity and Authentication
INA Volume 1/3 Version 1.0 RC / Digital Identity and AuthenticationINA Volume 1/3 Version 1.0 RC / Digital Identity and Authentication
INA Volume 1/3 Version 1.0 RC / Digital Identity and AuthenticationSylvain Maret
 
Strong Authentication State of the Art 2012 / Sarajevo CSO
Strong Authentication State of the Art 2012 / Sarajevo CSOStrong Authentication State of the Art 2012 / Sarajevo CSO
Strong Authentication State of the Art 2012 / Sarajevo CSOSylvain Maret
 
Threat Modeling / iPad
Threat Modeling / iPadThreat Modeling / iPad
Threat Modeling / iPadSylvain Maret
 
Strong Authentication in Web Application #SCS III
Strong Authentication in Web Application #SCS IIIStrong Authentication in Web Application #SCS III
Strong Authentication in Web Application #SCS IIISylvain Maret
 
Strong Authentication in Web Applications: State of the Art 2011
Strong Authentication in Web Applications: State of the Art 2011Strong Authentication in Web Applications: State of the Art 2011
Strong Authentication in Web Applications: State of the Art 2011Sylvain Maret
 
Strong Authentication in Web Application / ConFoo.ca 2011
Strong Authentication in Web Application / ConFoo.ca 2011Strong Authentication in Web Application / ConFoo.ca 2011
Strong Authentication in Web Application / ConFoo.ca 2011Sylvain Maret
 
Authentication and strong authentication for Web Application
Authentication and strong authentication for Web ApplicationAuthentication and strong authentication for Web Application
Authentication and strong authentication for Web ApplicationSylvain Maret
 
Geneva Application Security Forum 2010
Geneva Application Security Forum 2010Geneva Application Security Forum 2010
Geneva Application Security Forum 2010Sylvain Maret
 
Final conclusions of Working Group 3 at Workshop Münchenwiler 20-21 of May 20...
Final conclusions of Working Group 3 at Workshop Münchenwiler 20-21 of May 20...Final conclusions of Working Group 3 at Workshop Münchenwiler 20-21 of May 20...
Final conclusions of Working Group 3 at Workshop Münchenwiler 20-21 of May 20...Sylvain Maret
 
Comment protéger de façon efficace son/ses identité(s) numérique(s) sur le We...
Comment protéger de façon efficace son/ses identité(s) numérique(s) sur le We...Comment protéger de façon efficace son/ses identité(s) numérique(s) sur le We...
Comment protéger de façon efficace son/ses identité(s) numérique(s) sur le We...Sylvain Maret
 
Digital identity trust & confidence
Digital identity trust & confidenceDigital identity trust & confidence
Digital identity trust & confidenceSylvain Maret
 
Implementation of a Biometric Solution Providing Strong Authentication To Gai...
Implementation of a Biometric Solution Providing Strong Authentication To Gai...Implementation of a Biometric Solution Providing Strong Authentication To Gai...
Implementation of a Biometric Solution Providing Strong Authentication To Gai...Sylvain Maret
 
Geneva Application Security Forum: Vers une authentification plus forte dans ...
Geneva Application Security Forum: Vers une authentification plus forte dans ...Geneva Application Security Forum: Vers une authentification plus forte dans ...
Geneva Application Security Forum: Vers une authentification plus forte dans ...Sylvain Maret
 
Geneva Application Security Forum: Vers une authentification plus forte dans ...
Geneva Application Security Forum: Vers une authentification plus forte dans ...Geneva Application Security Forum: Vers une authentification plus forte dans ...
Geneva Application Security Forum: Vers une authentification plus forte dans ...Sylvain Maret
 
Geneva Application Security Forum: Vers une authentification plus forte dans ...
Geneva Application Security Forum: Vers une authentification plus forte dans ...Geneva Application Security Forum: Vers une authentification plus forte dans ...
Geneva Application Security Forum: Vers une authentification plus forte dans ...Sylvain Maret
 
Geneva Application Security Forum: Vers une authentification plus forte dans ...
Geneva Application Security Forum: Vers une authentification plus forte dans ...Geneva Application Security Forum: Vers une authentification plus forte dans ...
Geneva Application Security Forum: Vers une authentification plus forte dans ...Sylvain Maret
 

Más de Sylvain Maret (20)

Air Navigation Service Providers - Unsecurity on Voice over IP Radion
Air Navigation Service Providers - Unsecurity on Voice over IP RadionAir Navigation Service Providers - Unsecurity on Voice over IP Radion
Air Navigation Service Providers - Unsecurity on Voice over IP Radion
 
factsheet_4g_critical_comm_en_vl
factsheet_4g_critical_comm_en_vlfactsheet_4g_critical_comm_en_vl
factsheet_4g_critical_comm_en_vl
 
INA Volume 1/3 Version 1.02 Released / Digital Identity and Authentication
INA Volume 1/3 Version 1.02 Released / Digital Identity and AuthenticationINA Volume 1/3 Version 1.02 Released / Digital Identity and Authentication
INA Volume 1/3 Version 1.02 Released / Digital Identity and Authentication
 
INA Volume 1/3 Version 1.0 Released / Digital Identity and Authentication
INA Volume 1/3 Version 1.0 Released / Digital Identity and AuthenticationINA Volume 1/3 Version 1.0 Released / Digital Identity and Authentication
INA Volume 1/3 Version 1.0 Released / Digital Identity and Authentication
 
INA Volume 1/3 Version 1.0 RC / Digital Identity and Authentication
INA Volume 1/3 Version 1.0 RC / Digital Identity and AuthenticationINA Volume 1/3 Version 1.0 RC / Digital Identity and Authentication
INA Volume 1/3 Version 1.0 RC / Digital Identity and Authentication
 
Strong Authentication State of the Art 2012 / Sarajevo CSO
Strong Authentication State of the Art 2012 / Sarajevo CSOStrong Authentication State of the Art 2012 / Sarajevo CSO
Strong Authentication State of the Art 2012 / Sarajevo CSO
 
Threat Modeling / iPad
Threat Modeling / iPadThreat Modeling / iPad
Threat Modeling / iPad
 
Strong Authentication in Web Application #SCS III
Strong Authentication in Web Application #SCS IIIStrong Authentication in Web Application #SCS III
Strong Authentication in Web Application #SCS III
 
Strong Authentication in Web Applications: State of the Art 2011
Strong Authentication in Web Applications: State of the Art 2011Strong Authentication in Web Applications: State of the Art 2011
Strong Authentication in Web Applications: State of the Art 2011
 
Strong Authentication in Web Application / ConFoo.ca 2011
Strong Authentication in Web Application / ConFoo.ca 2011Strong Authentication in Web Application / ConFoo.ca 2011
Strong Authentication in Web Application / ConFoo.ca 2011
 
Authentication and strong authentication for Web Application
Authentication and strong authentication for Web ApplicationAuthentication and strong authentication for Web Application
Authentication and strong authentication for Web Application
 
Geneva Application Security Forum 2010
Geneva Application Security Forum 2010Geneva Application Security Forum 2010
Geneva Application Security Forum 2010
 
Final conclusions of Working Group 3 at Workshop Münchenwiler 20-21 of May 20...
Final conclusions of Working Group 3 at Workshop Münchenwiler 20-21 of May 20...Final conclusions of Working Group 3 at Workshop Münchenwiler 20-21 of May 20...
Final conclusions of Working Group 3 at Workshop Münchenwiler 20-21 of May 20...
 
Comment protéger de façon efficace son/ses identité(s) numérique(s) sur le We...
Comment protéger de façon efficace son/ses identité(s) numérique(s) sur le We...Comment protéger de façon efficace son/ses identité(s) numérique(s) sur le We...
Comment protéger de façon efficace son/ses identité(s) numérique(s) sur le We...
 
Digital identity trust & confidence
Digital identity trust & confidenceDigital identity trust & confidence
Digital identity trust & confidence
 
Implementation of a Biometric Solution Providing Strong Authentication To Gai...
Implementation of a Biometric Solution Providing Strong Authentication To Gai...Implementation of a Biometric Solution Providing Strong Authentication To Gai...
Implementation of a Biometric Solution Providing Strong Authentication To Gai...
 
Geneva Application Security Forum: Vers une authentification plus forte dans ...
Geneva Application Security Forum: Vers une authentification plus forte dans ...Geneva Application Security Forum: Vers une authentification plus forte dans ...
Geneva Application Security Forum: Vers une authentification plus forte dans ...
 
Geneva Application Security Forum: Vers une authentification plus forte dans ...
Geneva Application Security Forum: Vers une authentification plus forte dans ...Geneva Application Security Forum: Vers une authentification plus forte dans ...
Geneva Application Security Forum: Vers une authentification plus forte dans ...
 
Geneva Application Security Forum: Vers une authentification plus forte dans ...
Geneva Application Security Forum: Vers une authentification plus forte dans ...Geneva Application Security Forum: Vers une authentification plus forte dans ...
Geneva Application Security Forum: Vers une authentification plus forte dans ...
 
Geneva Application Security Forum: Vers une authentification plus forte dans ...
Geneva Application Security Forum: Vers une authentification plus forte dans ...Geneva Application Security Forum: Vers une authentification plus forte dans ...
Geneva Application Security Forum: Vers une authentification plus forte dans ...
 

Securite des Web Services (SOAP vs REST) / OWASP Geneva dec. 2012

  • 1. The OWASP Foundation http://www.owasp.org Sécurité des Web Services (SOAP vs REST) Sylvain MARET Principal Consultant / MARET Consulting / @smaret OpenID Switzerland & OWASP Switzerland Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. 05/06.11.2012, Version 1.1 @smaret
  • 2. Agenda • Qu’est-ce qu’un Web Service ? • SOAP • REST • Threat Modeling / ACME SA • Réduction des risques • Conclusion • Questions 2
  • 3. Bio • 18 years of experience in ICT Security • Principal Consultant at MARET Consulting • Expert & Lecturer at University of Applied Sciences (Yverdon) • Swiss French Area delegate at OpenID Switzerland • Co-founder Application Security Forum #ASFWS • OWASP Member • Author of the blog: la Citadelle Electronique • http://ch.linkedin.com/in/smaret or @smaret • http://www.slideshare.net/smaret • Chosen field – AppSec / Digital Identity Security / Cyber Defense 3
  • 4. Agenda • Qu’est-ce qu’un Web Service ? • SOAP • REST • Threat Modeling / ACME SA • Réduction des risques • Conclusion • Questions 4
  • 5. Web Service ? XML, JSON, Provider Consumer etc. 5
  • 6. Un peu d’histoire • 1990 : DCE/RPC – Distributed Computing Environment • 1992 : CORBA – Common Object Request Broker Architecture • 1990-1993 : Microsoft’s DCOM -- Distributed Component Object Model • 1995: RMI – Monde Java • Pour arriver à une standardisation (toujours en cours) des protocoles, outils, langages et interfaces – SOAP – REST – Etc. Web Service 6
  • 7. Typical Web Services environment 7 Source: Mastering Web Services Security / www.wiley.com
  • 8. Agenda • Qu’est-ce qu’un Web Service ? • SOAP • REST • Threat Modeling / ACME SA • Réduction des risques • Conclusion • Questions 8
  • 9. SOAP: Démystification des technologies • Langages – XML – WSDL : Descripteur du service – UDDI: Annuaire des services – Xpath • Protocoles – Transport: HTTP, HTTPS, SMTP, FTP, SMS, TFTP, SSH, etc. (TCP or UDP) – Message: Enveloppe SOAP • Sécurité – WS-Security (Signature & Chiffrement) • Autres éléments – AuthN: SAML, X509, Username & Password, Kerberos, HTTP Digest, etc. 9
  • 10. Enveloppe SOAP - SOAP : Simple Object Access Protocol - Permet l’envoi de messages XML 10 Source= wikipédia
  • 11. SOAP request SOAP response 11
  • 12. UDDI • Universal Description Discovery and Integration, connu aussi sous l'acronyme UDDI, est un annuaire de services fondé sur XML et plus particulièrement destiné aux services Web. 12
  • 13. WSDL • WSDL est une grammaire XML permettant de décrire un Service Web. • Le WSDL sert à décrire : – le format de messages requis pour communiquer avec ce service – les méthodes que le client peut invoquer – la localisation du service – le protocole de communication (SOAP RPC ou SOAP orienté message) 13 http://fr.wikipedia.org/wiki/Web_Services_Description_Language
  • 16. SOAP: Démystification des protocoles Découverte UDDI Description WSDL Message SOAP / XML HTTP, HTTPS, FTP, SFTP, SMS, SMTP Protocole (TCP or UDP) Transport IP 16
  • 17. Agenda • Qu’est-ce qu’un Web Service ? • SOAP • REST • Threat Modeling / ACME SA • Réduction des risques • Conclusion • Questions 17
  • 18. REST: Démystification des technologies • Langages – XML – JSON – XHTML, HTML, PDF... as data formats • Protocoles – HTTP(s)  Utilisation d’une URL – Méthode de communication (GET, POST, PUT, DELETE) • Sécurité – Sécurité du transport (SSL/TLS) – Sécurité des messages: HMAC / Doseta / JWS, etc. (Like XML Signature) • Autres éléments – Oauth, API Keys, etc. 18
  • 21. REST: Démystification des protocoles Découverte ??? Description WADL, Swagger *** Message XML, JSON, etc. Protocole HTTP, HTTPS Transport TCP/IP 21 *** Avant-gardiste!
  • 24. 24
  • 26. Agenda • Qu’est-ce qu’un Web Service ? • SOAP • REST • Threat Modeling / ACME SA • Réduction des risques • Conclusion • Questions 26
  • 28. 28
  • 30. Menaces - DFD Acme SA • Threat 1 – Interception des messages (Information disclosure) – Modification des messages (Tampering) – Usurpation d’identité (Spoofing) • Threat 2 – Attaque de l’application • BoF • Injection • DoS & DDoS • Etc 30
  • 31. Agenda • Qu’est-ce qu’un Web Service ? • SOAP • REST • Threat Modeling / ACME SA • Réduction des risques • Conclusion • Questions 31
  • 32. ACME SA: Réduction des risques ? • Chiffrement du transport • AuthN • SSL Mutual AuthN / X509 • WAF / XML Gateway • Intégrité et confidentialité des messages • Secure Coding 32
  • 33. Chiffrement du transport SOAP / XML REST HTTPS HTTPS SSL/TLS tunnel SSH IPSEC Etc. 33
  • 34. AuthN SOAP / XML REST HTTP Basic, Digest, HTTP Basic, Digest, HTTP Header HTTP Header Mutual SSL Mutual SSL IP trust IP trust WS Security user name password Oauth WS SAML Authentication token API Keys XML Signature JSON Web Token (JWT) Kerberos Etc. 34
  • 35. SSL Mutual AuthN / X509 / PKI SOAP / XML REST SSL/TLS Mutual AuthN** SSL/TLS Mutual AuthN** 35 ** Man in the middle not possible… (As I Know)
  • 36. WAF / XML Gateway (Protection périmétrique) SOAP / XML REST Reverse Proxy Reverse Proxy Contrôle requêtes HTTP Contrôle requêtes HTTP Rupture SSL/TLS Rupture SSL/TLS Black List Black List White List White List Validation WSDL Signature & Verification Encryption & Decryption SAML 36
  • 37. Intégrité et confidentialité des messages SOAP / XML REST XML Signature •(p.ex: HMAC, Doseta) XML Encryption • JSON Web Signature (JWS) – Draft v7 • JSON Web Encryption http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-07 37 ** Pas de chiffrement à ma connaissance
  • 40. Code security SOAP / XML REST - Data input validation - Data input validation - Data output encoding - Data output encoding - Pseudorandom data generation, high - Pseudorandom data generation, high entropy entropy - Strong / reliable data encryption algorithms - Strong / reliable data encryption algorithms - Data leakage prevention - Data leakage prevention - Robust error & exception handling - Robust error & exception handling - Anti-automation and expiration measures - Anti-automation and expiration measures OWASP Application Security Verification Standard (ASVS): https://www.owasp.org/index.php/ASVS WASC web application weaknesses: http://projects.webappsec.org/w/page/13246978/Threat%20Classification 40
  • 41. Agenda • Qu’est-ce qu’un Web Service ? • SOAP • REST • Threat Modeling / ACME SA • Réduction des risques • Conclusion • Questions 41
  • 42. Conclusion • SOAP: – Implémenter les standards WS-* liés à la sécurité? – Mettre en place un filtrage applicatif (WAF, XML GW) – Complexe à mettre en œuvre (PKI, Secure coding, Cryptography, etc.) – Architecture à forte contrainte de sécurité • REST – Mettre en place un filtrage applicatif (WAF, XML GW) – Implémentation rapide et facile  tendance – Architecture de type Cloud, Intranet, Social Login, etc. – Emergence des standards (JSON Web Algorithms) • On attend avec impatience les standards sécu pour REST ??? – Pragmatique: protection périmétrique, chiffrement et Secure Coding ??? 42
  • 43. Approche périmétrique vs WS-Security ? 43
  • 45. Merci / Thank you! Contact: sma@maret-consulting.ch @smaret http://www.maret-consulting.ch Slides: http://slideshare.net/ASF-WS/ 45
  • 46. The OWASP Foundation http://www.owasp.org Backup Slides By Sylvain Maret Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. 46
  • 47. 47