WSDL XXE Vulnerability - v0.2
WSDL XXE Vulnerability - v0.2
WSDL XXE Vulnerability - v0.2
1.1.1.1 Description
CWE Categories:
The software processes an XML document that can contain XML entities with
URIs that resolve to documents outside of the intended sphere of control,
causing the product to embed incorrect documents into its output.
An XML External Entity (XXE) attack is a type of attack against an application that
parses XML input. This attack occurs when XML input containing a reference to an
external entity is processed by a weakly configured XML parser. This attack may
lead to the disclosure of confidential data, denial of service, server side request
forgery, port scanning from the perspective of the machine where the parser is
located, and other system impacts.
o https://www.client-name.com/folder1/servicename
The following screenshot was taken from UAT environment where a POST SOAP
request was sent to the server. The request contains an XXE script requesting a
DNS request to 3459i47ja3fz2li6pfp6mablcci46w3m8a6yxpkf84.burpcollaborator.net:
c c
c c
The application performed a DNS lookup of the specified domain, indicating that the
XML parser processed the injected doctype definition:
XXE attacks can include disclosing local files, which may contain sensitive data such
as passwords or private user data, using file: schemes or relative paths in the
system identifier. Since the attack occurs relative to the application processing the
XML document, an attacker may use this trusted application to pivot to other internal
systems, possibly disclosing other internal content via http(s) requests or launching
a CSRF attack to any unprotected internal services. In some situations, an XML
processor library that is vulnerable to client-side memory corruption issues may be
exploited by dereferencing a malicious URI, possibly allowing arbitrary code
execution under the application account. Other attacks can access local resources
that may not stop returning data, possibly impacting application availability if too
many threads or processes are not released.
Next example shows pen-tester send a SOAP request to perform an HTTP request.
This PoC shows it is possible to induce the application to perform server-side HTTP
requests to arbitrary domains. The tag <!DOCTYPE soapenv:envelope PUBLIC
"-//B/A/EN"
"http://8foet9iol8q4dqtb0k0bxfmqnht9h1erjfh38uvkj9.burpcollaborator.net"> was
injected into the XML sent to the server. This payload defines an XML doctype that
references a URL on an external domain. Below screenshot shows the HTTP
request:
The application performed an HTTP request to the specified domain, indicating that
the XML parser processed the injected doctype definition:
1.1.1.3 Recommendations
a) Disable DOCTYPE
Development of security standards and policies will not require significant efforts.
Application owners,
ISO/IEC 27001:2013:
1.1.1.7 References
http://cwe.mitre.org/data/definitions/548.html