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
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
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)
0 comments
Post a comment