
(1) 개요
- ConnectWise ScreenConnect는 서버와 클라이언트 요소(응용 프로그램)로 구성된 원격 데스크톱 솔루션임.
- 2월 19일, ConnectWise는 ScreenConnect 제품에서 CVE-2024-1708 및 1709라는 두 가지 취약점을 보고함.
- ConnectWise는 두 가지 취약점에 대한 패치를 만들었지만, 업데이트에도 불구하고 초기 문제가 발견된 지 한 달이 넘도록 새로운 공격 벡터에 대한 보고가 계속 나오고 있음.
링크: https://securityintelligence.com/articles/remote-access-risks-cve20241708-cve20241709/
(2) 취약한 버전
취약점
|
제품명
|
영향받는 버전
|
CVE-2024-1708,
CVE-2024-1709 |
ScreenConnect
|
23.9.7 이하 버전
|
(3) 내용
링크: https://securityintelligence.com/articles/remote-access-risks-cve20241708-cve20241709/
CVE-2024-1708 CVSS 3.1 점수 10점 만점에 8.4점으로 지정됨.
이는 ScreenConnect 버전 23.9.7 및 모든 이전 버전에 영향을 미침.
CVE-2024-1708은 공격자가 취약한 인스턴스에서 원격으로 코드를 실행할 수 있게 하는 경로 탐색 취약점임.
공격자는 파일을 올바른 확장 하위 디렉터리에 제한하지 않고 App_Exntensions 루트 디렉터리 내에 쓸 수 있음.
이 익스플로잇은 문제가 있었지만 관리 자격 증명이 필요했기 때문에 그 영향은 제한적이었음.
그러나 CVE-2024-1709와 결합하여 이 취약점은 훨씬 더 우려됨.
CVE-2024-1709 CVSS 3.1 점수 10점 만점에 10점으로 지정되어 “심각”으로 표시됨.
이는 SetupWizard.aspx 파일의 텍스트 기반 특성에 의존하는 인증 우회 공격임.
이상한 .Net 기능으로 인해 합법적인 URL 경로 뒤에 잘못된 URL 구성 요소를 입력해도 이 데이터가 여전히 애플리케이션에 전달될 수 있음.
실제로 이는 공격자가 /SetupWizard.aspx/anything을 요청할 수 있으며 이미 구성된 경우에도 모든 ScreenConnect 인스턴스에서 ScreenConnect 설정 마법사에 액세스할 수 있음을 의미함.
공격자가 설치 마법사 시작 화면에 액세스하면 "다음"을 클릭하기만 하면 됨.
설정 프로세스가 완료되지 않은 경우에도 다음을 클릭하면 새 사용자가 생성되고 다른 모든 로컬 사용자가 삭제됨.
전체 관리자 액세스 권한을 통해 공격자는 쉽게 악성 확장 프로그램을 생성하고 업로드하여 RCE(원격 코드 실행) 액세스 권한을 얻을 수 있음.
(4) PoC
CVE-2024-1708 - 경로 탐색
ConnectWise ScreenConnect 권고에서 언급된 두 번째 취약점은 ZipSlip 공격의 위험을 나타냄. ScreenConnect.Core.dll 의 변경 사항을 관찰함 .
11057c11057
< public void ExtractAllEntries(string basePath)
---
> public void ExtractAllEntries(string basePath, string requireEntriesInMoreStringentPath = null)
11062c11062
< FileSystemExtensions.DemandInParentPath(basePath, text);
---
> FileSystemExtensions.DemandInParentPath(requireEntriesInMoreStringentPath ?? basePath, text);
및 ScreenConnect.Server.dll :
8392a8393
> DirectoryInfo extensionsDirectory = GetExtensionsDirectory();
8398c8399
< zipFile.ExtractAllEntries(GetExtensionsDirectory().FullName);
---
> zipFile.ExtractAllEntries(extensionsDirectory.FullName, extensionDirectory.FullName);
이는 ZIP 파일에서 콘텐츠를 추출할 때 파일 경로를 엄격하게 처리하기 위한 새로운 함수 인수를 추가함.
코드 베이스를 살펴보면 이러한 유틸리티 함수가 ScreenConnect 확장을 처리할 때만 사용되는 것으로 보임.
이 패치 이전에는 악성 확장 프로그램이 확장 하위 디렉터리로 적절하게 제한되지 않고 C:\Program Files (x86)\ScreenConnect\App_Extensions 내의 어느 곳에나 파일을 쓸 수 있었음.
이는 특정 조건에서 원격 코드 실행으로 이어질 수 있는 버전 23.9.8 에서 수정된 또 다른 취약점이지만 확장 기능을 사용하려면 관리 자격 증명 및 액세스 권한이 있어야 함. 이 기능은 인증 우회에 의해 "잠금 해제"되지만 그 자체로는 덜 심각함.
재현된 개념 증명 익스플로잇에서는 이 잠재적인 ZipSlip 공격 벡터를 활용할 필요가 없었음.
인증 우회를 통해 관리자 액세스 권한을 얻은 후에는 이미 일반적인 확장 기능 세트를 사용하여 임의 코드를 실행할 수 있음
주요 차이점은 이 취약점을 사용하여 작성된 악성 코드를 실행하기 위해 반드시 설치된 확장 프로그램이 필요하지 않다는 것
이는 귀하의 환경 내에서 더 쉽게 눈에 띄지 않게 될 수 있음을 의미함.
C:\Program Files (x86)\ScreenConnect\App_Extensions\ 루트에 있는 모든 .aspx 또는 .ashx 파일은 악성 아티팩트일 가능성이 높음.
ScreenConnect는 일반적으로 이 디렉터리에 파일을 배치하지 않음.
링크:
https://github.com/watchtowrlabs/connectwise-screenconnect_auth-bypass-add-user-poc
(5) 대응방안
- 패치 버전 다운로드
https://screenconnect.connectwise.com/download/archive
- 온프레미스 인스턴스를 v23.9.8 이상의 패치 버전 적용 권장.
2. 소프트웨어 개발자 경우
- 파일 이름을 지정할 때 사용자 입력을 사용하는 대신 각 파일에 대해 무작위 식별자를 생성하고 관련 메타데이터를 별도로(예: 데이터베이스에) 저장함.
- 파일 이름에 제공할 수 있는 문자 유형을 엄격하게 제한함(예: 영숫자 문자로 제한).
- 업로드된 파일에 실행 권한이 없는지 확인함.
3. Sigma / yara 패턴 적용
CVE-2024-1708 - 경로 탐색
경로 탐색 익스플로잇을 통해 공격자는 App_Extensions 디렉터리의 루트에 파일을 쓸 수 있음.
다음 Sigma 규칙은 확장 프로그램 자체에 대한 합법적인 수정 사항을 제외하면서 App_Extensions 디렉터리 루트의 파일 수정 사항에 대해 경고해야 함.
title: CVE-2024-1708 - ScreenConnect Path Traversal Exploitation
id: 4c198a60-7d05-4daf-8bf7-4136fb6f5c62
status: experimental
description: This detects file modifications to ASPX and ASHX files within the root of the App_Extensions directory, which is allowed by a ZipSlip vulnerability in versions prior to 23.9.8. This occurs during exploitation of CVE-2024-1708. This requires an Advanced Auditing policy to log a successful Windows Event ID 4663 events and with a SACL set on the directory.
references:
- https://www.connectwise.com/company/trust/security-bulletins/connectwise-screenconnect-23.9.8
- https://www.cve.org/CVERecord?id=CVE-2024-1708
- https://www.huntress.com/blog/a-catastrophe-for-control-understanding-the-screenconnect-authentication-bypass
author: Huntress DE&TH
Teamdate: 2024/02/20
tags:
- attack.initial_access
- attack.persistence
- cve.2024.1709
logsource:
product: windows
service: security
definition: 'Requirements: SACLs must be enabled for the ScreenConnect directory'detection:
selection:
EventID: 4663
ObjectType: 'File'
ProcessName|contains: 'ScreenConnect.Service.exe'
AccessMask: '0x6'
ObjectName|endswith:
- 'ScreenConnect\\App_Extensions\\*.ashx'
- 'ScreenConnect\\App_Extensions\\*.aspx'
legitimate_path:
ObjectName|contains: 'ScreenConnect\App_Extensions\\*\\'
condition: selection and not legitimate_path
falsepositives: - Unknown
level: critical
CVE-2024-1709 - 인증 우회
다음 Sigma 규칙은 후행 경로 세그먼트가 있는 SetupWizard.aspx 에 대한 요청을 감지함.
이 동작은 결코 합법적이지 않으며, 실제로 관찰되는 경우 악의적인 의도를 분명히 나타내야 함.
title: CVE-2024-1709 - ScreenConnect Authentication Bypass Exploitation
id: d27eabad-9068-401a-b0d6-9eac744d6e67
status: experimental
description: |
Detects GET requests to '/SetupWizard.aspx/[anythinghere]' that indicate exploitation of the ScreenConnect vulnerability CVE-2024-1709.
references:
- https://www.connectwise.com/company/trust/security-bulletins/connectwise-screenconnect-23.9.8
- https://www.huntress.com/blog/a-catastrophe-for-control-understanding-the-screenconnect-authentication-bypass
- https://www.cve.org/CVERecord?id=CVE-2024-1709author: Matt Anderson, Huntressdate: 2024/02/20
tags:
- attack.initial_access
- attack.persistence
- cve.2024.1709
logsource:
category: webserver
detection:
selection:
cs-uri-stem|contains: '/SetupWizard.aspx/'
condition: selection
falsepositives:
- Unknown
level: critical
공격자는 설정 마법사에 액세스한 후 화면 연결에 액세스하기 위해 새 자격 증명을 입력함.
그렇게 하면 새 사용자 데이터베이스가 임시 XML 파일에 기록됨.
다음 Sigma 규칙을 사용하여 ScreenConnect 서버가 서버의 임시 XML 파일에 쓰는 것을 감지할 수 있음.
이는 손상의 지표일 수 있지만 이 활동은 ScreenConnect에서 로컬 사용자 또는 해당 권한을 합법적으로 수정할 때도 관찰되는 것으로 알려져 있으므로 오탐률이 0이 아님.
title: ScreenConnect User Database Modification
id: 4109cb6a-a4af-438a-9f0c-056abba41c6f
status: experimental
description: This detects file modifications to the temporary xml user database file indicating local user modification in the ScreenConnect server. This will occur during exploitation of the ScreenConnect Authentication Bypass vulnerability (CVE-2024-1709) in versions <23.9.8, but may also be observed when making legitimate modifications to local users or permissions. This requires an Advanced Auditing policy to log a successful Windows Event ID 4663 events and with a SACL set on the directory.
references:
- https://www.connectwise.com/company/trust/security-bulletins/connectwise-screenconnect-23.9.8
- https://www.huntress.com/blog/a-catastrophe-for-control-understanding-the-screenconnect-authentication-bypass
- https://www.cve.org/CVERecord?id=CVE-2024-1709
author: Huntress DE&TH
Teamdate: 2024/02/20
logsource:
product: windows
service: security
definition: 'Requirements: SACLs must be enabled for the ScreenConnect directory'
detection:
selection:
EventID: 4663
ObjectType: 'File'
AccessMask: '0x6'
ObjectName|endswith: '.xml'
ObjectName|contains|all:
- 'Temp'
- 'ScreenConnect'
ProcessName|contains: ScreenConnect.Service.exe
condition: selection
falsepositives: - Unknown
level: medium
tags:
- cve.2024.1709
다음 YARA 규칙은 위에 제공된 IIS 로그 시그마 규칙과 유사함.
후행 경로 구성 요소와 함께 SetupWizard.aspx를 참조하는 IIS 로그 항목을 검색함.
앞서 언급했듯이 이 파일의 후행 경로 구성 요소는 항상 악의적인 활동과 연결되어 있음.
rule ScreenConnect_CVE_2024_1709_Exploitation {
meta:
description = "Detects a GET request to '/SetupWizard.aspx/' with anything following it, which is a potential indicator of compromise of the 2024 ConnectWise ScreenConnect 23.9.8 vulnerability (CWE-288), when found in IIS logs"
author = "Huntress DE&TH Team"
reference = "https://www.huntress.com/blog/a-catastrophe-for-control-understanding-the-screenconnect-authentication-bypass"
date = "2024-02-20"
id = "2886530b-e164-4c4b-b01e-950e3c40acb4"
strings:
$s1 = "/SetupWizard.aspx/" ascii
condition:
$s1}
'BLUE' 카테고리의 다른 글
Yara rule 개념 및 이론 (0) | 2025.03.11 |
---|---|
240322_ivanti Standalone Sentry와 ivanti Neurons 제품 취약점(CVE-2023-41724, CVE-2023-46808) (0) | 2025.03.11 |
240721_CrowdStrike Falcon 제품군 패치 적용시 윈도우 시스템 블루스크린(BSOD) 현상 (0) | 2025.03.11 |
리눅스 상에서 작업 스케줄러 이용하여 Thor apt scanner 실행 (0) | 2025.03.11 |