• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Owasp Forum Web Services Security
 

Owasp Forum Web Services Security

on

  • 6,673 views

 

Statistics

Views

Total Views
6,673
Views on SlideShare
6,658
Embed Views
15

Actions

Likes
0
Downloads
95
Comments
0

2 Embeds 15

http://www.slideshare.net 14
http://www.lmodules.com 1

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Owasp Forum Web Services Security Owasp Forum Web Services Security Presentation Transcript

    • OWASP Top Ten Web Services Vulnerabilities Marco Morana OWASP Chapter Lead [email_address] Based upon Gunnar Peterson Presentation OWASP T10 Web Services Proposal OWASP USA 08 NYC Appsec Conference Cincinnati Chapter August 2009 Meeting
    • Meeting Agenda
      • Video Presentation: Web Services OWASP Top Ten Proposal by from Gunnar Peterson
        • http://video.google.com/videoplay?docid=5680040858618100893
      • Discussion Forum
        • Summary Of OWASP Top Ten For Web Services
          • Web Services Security Highlights
          • OWASP T10 Vulnerabilities
            • Issues
            • Countermeasures
        • Discussion Points: Q&A
        • OWASP References
    • Web Services Security Highlights
      • The security of web services and distributed architecture represents several challenges:
        • Security of the perimeter is not enough
        • Data segregation does not separate good from evil
        • Security goal cannot be limited to CIA attributes
        • Location independence : authenticate in one place and authorize in another place
        • Interoperability across systems and technologies
        • Consistent policy enforcement
        • Secure email vs. tiered architecture
        • Security of the delivery channel and the intermediaries
      • Design-time activity aimed at pointing out common security pitfalls and proper ways to implement security within design patterns
      • Originally a white paper – donated to OWASP by Security Compass
    • Web Services OWASP T1 Vulnerability
      • Injection Attacks
        • Issue highlights:
          • Larger attack surface and new targets for injection flaws: SQL injection, LDAP and XPATH/XQUERY, XSLT, HTML, XML, OS command injection
          • WS as gateway to inject data in backend services : mainframes, MQs, ESB, SAP
          • More attack vector opportunities: decoupling between web service requester and provider
        • Countermeasures:
          • Determine the application attack surface and the entry points
          • Validate at each trust boundary (front end, middleware, backend)
          • Input validation strategy: encoding, sanitization , canonicalization
    • Web Services OWASP T2 Vulnerability
      • Malicious file execution
        • Issue highlights:
          • Web service processing can take un-trusted input to inject system and backend commands and exploit it for remote command execution, upload malware or cause a denial/degradation of service
          • DOS via file upload and SOAP interface can be abused to cause denial or degradation of services (overload the XML parser)
        • Countermeasures:
          • Do not trust client supplied parameters for remote command execution, when uploading files, validate server side the file upload size, name, file path and the file extension/parameters
          • Validate XML size and XSD schema before processing
    • Web Services OWASP T3 Vulnerability
      • Insecure Object Reference
        • Issue highlights:
          • Abuse of object references lead to remote code execution
          • Failure to check data reference and URL parameters lead to remote root kit installation and compromise: Some cases banking applications use ACC# as PK that can be misused for SQL injection if is not validated
        • Countermeasures:
          • Use encryption and signatures to prevent tampering of SOAP messages, validate references on the server side
          • Beware of REST: some IDE add a REST call in form of a GET that can be called without authorization: this need to be turned off.
    • Web Services OWASP T4 Vulnerability
      • Information Leakage
        • Issue highlight:
          • Too much WS configuration information such as application type and methods used via WSDL readable to public, access to XSD and XML let the attacker know the data and the values to attack, the UDDI (the registry) can leak information such as addressing routing structure or behavior
        • Countermeasures:
          • Remove WSDL files from web server
          • Disable the documentation protocols to prevent dynamic generation of WSDL
          • Capture exceptions that return minimal information to the users
    • Web Services OWASP T5 Vulnerability
      • Broken Authentication And Weak Tokens
        • Issue highlights:
          • Tokens non protected as well as assertions, flaws allow to hijack user admin accounts, bypass authorizations and allow for reply attacks.
          • Claim based (SAML) access control vs. RBAC exposes the application to new vulnerabilities
        • Countermeasures:
          • Authentication via password digest, SAML and Kerberos tickets ,X509 certificates, Username and password in plaintext
          • SSL and message payload encryption for transit protection
          • Unique message ID, data stamp and nonce with each request to prevent message replay
          • Digital signature to prevent tampering
    • Web Services OWASP T6 Vulnerability
      • Insecure Crypto Usage
        • Issue highlights:
          • Not encrypting secrets and protecting keys
          • Use of weak crypto and non standard algorithms such as MD5 and RC3 and RC4
          • Hard-coding keys
          • Misuse of XML encryption: signature tag with no signature value, homegrown encryption algorithms
        • Countermeasures:
          • Protect secrets with encryption use secure key storage
          • Use standard secure cryptographic algorithms
          • Do not hardcode secrets
          • Do not use homegrown encryption implementations/schemes
          • Test your crypto implementation
    • Web Services OWASP T7 Vulnerability
      • Insecure communications
        • Issues highlights:
          • Not using SSL exposes authentication, sensitive and session data and sensitive info.
          • Sniffing attacks : WS and SAML tokens can be sniffed in transit with no SSL that protects them
          • Timing and replay attacks are possible for unprotected session data
        • Countermeasures:
          • Protect data in transit: SSL/IPsec
          • Protect XML documents/sections with XML encryptionValidate signatures properly (presence and who trusted it)
    • Web Services OWASP T8 Vulnerability
      • Failure to restrict access
        • Issue highlights:
          • Failure to enforce WS method authentication
          • Some web service methods use MQ listeners with no authentication to call them , attackers can exploit the gateway to mainframes and messaging systems (e.g. ESB)
        • Countermeasures:
          • Server to server and trusted authentication (SAML) across systems
          • Message level authentication (usr/pwd, kerberos, X509, SAML)
          • Application level auth (role-based authorization for methods)
    • Web Services OWASP T9 Vulnerability (New proposal)
      • Broken XML
        • Issue highlights:
          • WS rely on XML document binding based upon data parameters encoded and parsed that can be injected
          • Failure to validate parameters and well formed XML and XSD can lead to DOS
          • Recursive XMLs (DTD based) can lead to DOS
          • Injected CDATA elements (not interpreted) can fail the parser
        • Countermeasures:
          • Specify the XML size and schema via DTD for old SOAP (do not use DTD not allowed in current spec!) and XSD
          • Do not use old Xerces parser (prone to DOS)
          • Validate all input and encode output
    • Web Services OWASP T10 Vulnerability (New proposal)
      • Identity Misuse
        • Issue highlights:
          • The WS identity is the basis for WS claims and assertions for routing decisions ( to pass to different back end services), business logic and access control (authentication)
          • A mis-configured identity claim can be misused : A malicious service provider can have access to different services used by Google (token sent back was valid for any Google service) and other identity providers.
        • Countermeasures:
          • Protect the identity for misuse
          • Map identity to resources used for access control decisions
          • Enforce SAML SCOPE assertions
    • Discussion Forum: Q & A
      • Are web services based architectures (SOA, SaaS) used in your organization ?
        • Which assessment processes, guidelines, testing tools are being deployed for securing web services?
      • Which challenges you faced in deploying web services for your organization ?
        • Integration with backend services: MQ/ESB ?
        • Trusted authentication: Kerberos-SSO, SAML ?
      • Can cloud computing and web services be made secure ?
        • Do WS-Security, SAML buy security?
    • Further OWASP Web Services References
      • G uide to Building Secure Web Applications and Web Services (Development Guide)
        • http://www.owasp.org/index.php/Category:OWASP_Guide_Project
      • Web Services Portal
        • http://www.owasp.org/index.php/Web_Services
      • Web Services Security Project
        • http://www.owasp.org/index.php/Category:OWASP_Web_Services_Security_Project
      • Testing Guide Web Service Security Test Cases
        • http://www.owasp.org/index.php/Testing_for_Web_Services