{"id":344,"date":"2009-11-13T15:55:06","date_gmt":"2009-11-13T20:55:06","guid":{"rendered":"http:\/\/www.webadminblog.com\/?p=344"},"modified":"2010-02-01T18:54:34","modified_gmt":"2010-02-01T23:54:34","slug":"techniques-in-attacking-and-defending-xmlweb-services","status":"publish","type":"post","link":"https:\/\/www.webadminblog.com\/index.php\/2009\/11\/13\/techniques-in-attacking-and-defending-xmlweb-services\/","title":{"rendered":"Techniques in Attacking and Defending XML\/Web Services"},"content":{"rendered":"<p>This presentation was by Jason Macy and Mamoon Yunus of Crosscheck Networks &#8211; Forum Systems.\u00a0 It wins the award (the one I just made up) for being the most vendor-oriented presentation at the conference.\u00a0 Not that it wasn&#8217;t an interesting presentation, but their solution to defend against most of the attacks was &#8220;Use an XML Gateway&#8221; (guess what Forum Systems sells?) and the attacks were all presented using the CrossCheck SOAPSonar tool.\u00a0 I realize that being a vendor they probably have more knowledge than most in the field, but being an Open Source conference, you&#8217;d think they would have demonstrated using a free\/open tool (SOAPUI?) and talked more about non-hardware solutions to fix the issues.\u00a0 My notes from the session are below:<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Agenda<\/strong><\/span><\/p>\n<ol>\n<li>Introduction to XML\/Web Services Threats<\/li>\n<li>Techniques for Defending XML Threats<\/li>\n<li>XML Attack Examples and Classification<\/li>\n<li>Review sample attacks<\/li>\n<\/ol>\n<p><span style=\"text-decoration: underline;\"><strong>Introduction to XML Threats<\/strong><\/span><\/p>\n<ul>\n<li>Explicit Attacks\n<ul>\n<li>Forced Disruption<\/li>\n<li>Information Theft<\/li>\n<li>Vendor Discovery<\/li>\n<\/ul>\n<\/li>\n<li>Implicit Vulnerability\n<ul>\n<li>Perimeter Breach (embeeded virus, malware)<\/li>\n<li>Infrastructure Malfunction (parser and data processing failures)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><strong>New Attack Vectors<\/strong><\/span><\/p>\n<ul>\n<li>Protocol Firewalls are blind to XML<\/li>\n<li>Malware and virus delivered via SOAP attachments<\/li>\n<li>WSDL exposes schema and message structure<\/li>\n<li>Injection attacks exposed via XML parameters<\/li>\n<li>Data replay attacks<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><strong>Security Testing &#8211; Base Requirements<\/strong><\/span><\/p>\n<ul>\n<li>Security Framework\n<ul>\n<li>Sign, ENcrypt, Decrypt, SSL<\/li>\n<\/ul>\n<\/li>\n<li>Identity Framework\n<ul>\n<li>Basic auth, SSL auth, WS-Security token auth<\/li>\n<\/ul>\n<\/li>\n<li>Parameter Injection\n<ul>\n<li>Database or file driven<\/li>\n<li>Permutations for security, identity, and SOAP\/XML<\/li>\n<\/ul>\n<\/li>\n<li>Concurrent Client Simultaneous Loading\n<ul>\n<li>Denial of Service Testing<\/li>\n<\/ul>\n<\/li>\n<li>SOAP with Attachments\n<ul>\n<li>Malware and Virus testing<\/li>\n<\/ul>\n<\/li>\n<li>Dynamic XSD Mutation\n<ul>\n<li>Derive SOAP vulnerability profile from WSDL schema<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<p><span style=\"text-decoration: underline;\"><strong> XML Security Gateway &#8211; Base Requirements<\/strong><\/span><\/p>\n<ul>\n<li>Certified PKI Infrastructure (DOD PKI)\n<ul>\n<li>X509 Path validation<\/li>\n<li>Sign\/verify, SSL initiation, SSL termination<\/li>\n<\/ul>\n<\/li>\n<li>Certified Security Architecture (FIPS)\n<ul>\n<li>Key management and storage<\/li>\n<li>Physical security device<\/li>\n<\/ul>\n<\/li>\n<li>Transaction Privacy\n<ul>\n<li>Encryption, decryption, SSL<\/li>\n<\/ul>\n<\/li>\n<li>Transaction Integrity\n<ul>\n<li>Digital signature, signature verification, schema validation<\/li>\n<\/ul>\n<\/li>\n<li>Transaction Accountability\n<ul>\n<li>Archiving, logging, reporting, and monitoring<\/li>\n<\/ul>\n<\/li>\n<li>Transaction Threat Mitigation\n<ul>\n<li>Intrusion detection and prevention<\/li>\n<li>Rate-based rules, size-based rules, anti-virus detection, pattern recognition<\/li>\n<li>Structural integrity, protocol adherence, athorization attempts<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><strong>XML Attack Examples and Classification<\/strong><\/span><\/p>\n<ol>\n<li>SQL Injection Attack<\/li>\n<li>Denial of Service Attack<\/li>\n<li>XSD Mutation Attack<\/li>\n<\/ol>\n<p><span style=\"text-decoration: underline;\"><strong>XML Web Services SQL Injection Attack Example<\/strong><\/span><\/p>\n<ul>\n<li>How to Attack\n<ul>\n<li>Construct SQL escape sequences<\/li>\n<li>Construct SQL 1=1 query<\/li>\n<li>Inject into XML node values<\/li>\n<\/ul>\n<\/li>\n<li>Discovered Exposure\n<ul>\n<li>Sensitive data loss<\/li>\n<li>Database corruption<\/li>\n<\/ul>\n<\/li>\n<li>Used &#8220;SOAPSonar&#8221; tool to load WSDL and send responses<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><strong>SQL Injection &#8211; XML Gateway Secured<\/strong><\/span><\/p>\n<ul>\n<li>How to Defend\n<ul>\n<li>Deploy XML Gateway<\/li>\n<li>Enable pattern scanning IDP rules<\/li>\n<li>Configure response message size and complexity limits<\/li>\n<\/ul>\n<\/li>\n<li>Advantages\n<ul>\n<li>Prevent Data Loss<\/li>\n<li>Alert and Quarantine Attempted Breaches<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><strong>XML Web Services based Denial of Service Attack<\/strong><\/span><\/p>\n<ul>\n<li>How to Attack\n<ul>\n<li>Loading client with concurrent simultaneous threads<\/li>\n<li>Coercive parsing attack<\/li>\n<\/ul>\n<\/li>\n<li>Discovered Exposure\n<ul>\n<li>Unlimited message flow<\/li>\n<li>Unfair service SLA distribution<\/li>\n<li>Back-end CPU and I\/O Saturation<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><strong>Denial of Service &#8211; XML Gateway Secured<\/strong><\/span><\/p>\n<ul>\n<li>How to Defend\n<ul>\n<li>Deploy XML gateway<\/li>\n<li>Set allowed transaction rates (Group, user, or IP)<\/li>\n<\/ul>\n<\/li>\n<li>Advantages\n<ul>\n<li>Message flow limited to specified rate<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><strong>Another Example: Denial of Service through Coercive Parsing<\/strong><\/span><\/p>\n<ul>\n<li>Sending malformed XML data (removing the &#8220;&gt;&#8221; end tag) creates increased time to parse a request<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><strong>XML Web Services Based XSD Mutation Attack<\/strong><\/span><\/p>\n<ul>\n<li>How to Attack\n<ul>\n<li>Obtain WSDL<\/li>\n<li>Derive message structure and types from WSDL schema<\/li>\n<li>Send SOAP message mutations based on schema<\/li>\n<\/ul>\n<\/li>\n<li>Discovered Exposure\n<ul>\n<li>Code paths not handled for exceptions<\/li>\n<li>Stack traces returned with implementation details<\/li>\n<li>Application failure<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><strong>XSD Mutation Attack &#8211; XML Gateway Secured<\/strong><\/span><\/p>\n<ul>\n<li>How to Defend\n<ul>\n<li>Deploy XML Gateway<\/li>\n<li>Enforce inbound message structure and type validation<\/li>\n<li>Cleanse outbound data (stack traces, sensitive data)<\/li>\n<\/ul>\n<\/li>\n<li>Advantages\n<ul>\n<li>Reduce parser impact on web service<\/li>\n<li>Remove vendor and implementation details in response<\/li>\n<li>Protect application layer code paths on web service<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><strong>XSD Mutation &#8211; Secured<\/strong><\/span><\/p>\n<ol>\n<li>Deploy specialized XML Gateways &#8211; Packet firewalls and HTML application firewalls are insufficient<\/li>\n<li>Validate XML against a robust schema<\/li>\n<li>Tighten Schema: restrict unbounded strings, etc<\/li>\n<li>Enforce XML specific detection rules (node depth, recursive payloads)<\/li>\n<\/ol>\n<p><span style=\"text-decoration: underline;\"><strong>Best Practices for Countermeasures<\/strong><\/span><\/p>\n<ul>\n<li>Information Control &#8211; Outbound\n<ul>\n<li>Restrict SOAP Faults<\/li>\n<li>Protect Sensitive Information<\/li>\n<li>Audit Transaction Flows<\/li>\n<\/ul>\n<\/li>\n<li>Information Control &#8211; Inbound\n<ul>\n<li>Tighten Payloads<\/li>\n<li>Enforce SLA<\/li>\n<li>Disallow SQL, virus, malicious code<\/li>\n<\/ul>\n<\/li>\n<li>Use Web Services Penetration Testing Product<\/li>\n<li>Deploy XML web Services Gateway<\/li>\n<li>Deploy Centralized XML Security<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This presentation was by Jason Macy and Mamoon Yunus of Crosscheck Networks &#8211; Forum Systems.\u00a0 It wins the award (the one I just made up) for being the most vendor-oriented presentation at the conference.\u00a0 Not that it wasn&#8217;t an interesting presentation, but their solution to defend against most of the attacks was &#8220;Use an XML [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[307,4],"tags":[148,372,373,374,375,371,102,321],"class_list":["post-344","post","type-post","status-publish","format-standard","hentry","category-owasp-appsec-dc-2009","category-web-app-sec","tag-attack","tag-attacking","tag-defend","tag-defending","tag-services","tag-techniques","tag-web","tag-xml"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pfI0c-5y","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.webadminblog.com\/index.php\/wp-json\/wp\/v2\/posts\/344","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webadminblog.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webadminblog.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webadminblog.com\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webadminblog.com\/index.php\/wp-json\/wp\/v2\/comments?post=344"}],"version-history":[{"count":5,"href":"https:\/\/www.webadminblog.com\/index.php\/wp-json\/wp\/v2\/posts\/344\/revisions"}],"predecessor-version":[{"id":374,"href":"https:\/\/www.webadminblog.com\/index.php\/wp-json\/wp\/v2\/posts\/344\/revisions\/374"}],"wp:attachment":[{"href":"https:\/\/www.webadminblog.com\/index.php\/wp-json\/wp\/v2\/media?parent=344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webadminblog.com\/index.php\/wp-json\/wp\/v2\/categories?post=344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webadminblog.com\/index.php\/wp-json\/wp\/v2\/tags?post=344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}