SafePay 내부 탐구: 새로운 중앙 집중식 랜섬웨어 그룹 분석
Detection stack
- AIDR
- Alert
- ETL
- Query
개요
SafePay는 최근 등장한 랜섬웨어 작전으로, 전형적인 Ransomware-as-a-Service 생태계라기보다는 엄격히 통제되는 중앙 집중형 그룹으로 운영되는 것으로 보입니다. 이 행위자들은 이중 갈취 수법을 사용하여 암호화하기 전에 민감한 데이터를 준비하고 Tor 기반의 유출 사이트를 통해 공개하겠다고 위협합니다. 배포는 주로 네이티브 Windows DLL을 포함하며, 실행 및 전파는 널리 사용 가능한 living-off-the-land 유틸리티들에 의해 지원됩니다. 관찰된 사례에서는 전체 대기 시간이 공격적이며, 초기 접근부터 환경 전체 암호화까지 약 24시간 내에 압축하는 경우가 자주 있습니다.
조사
연구자들은 SafePay가 종종 유출된 VPN 또는 RDP 계정을 도난당하거나 추측하여 로그인하고, 일부 시나리오에서는 잘못 구성된 FortiGate 배포를 남용하며 특히 MFA가 없는 환경에서 침투한다고 보고합니다. 지속성을 위해 운영자들은 QDoor와 같은 백도어를 배포하고 ScreenConnect 같은 합법적인 원격 관리 툴을 사용하여 일반적인 IT 활동에 녹아드는 모습을 보였습니다. 측면 이동은 주로 PsExec와 WinRM을 통해 추진되며, 호스트 및 공유 디스커버리는 맞춤형 PowerShell 유틸리티(ShareFinder.ps1)에 의해 지원됩니다. 암호화 이전에, 페이로드는 영향을 최대화하고 복구를 방해하기 위한 “pre-ransom” 작업을 수행하며, 섀도 복사본을 제거하고 부트 구성 설정을 변경하며 보안 관련 프로세스 및 서비스를 종료합니다.
완화
모든 원격 접근 경로에 MFA를 필수로 하고 로컬 계정 인증을 제한하며 관리적 노출을 줄여 방화벽 위험을 줄입니다. PsExec, WinRM, regsvr32, rundll32의 비정상적 사용을 모니터링하세요—특히 원격 실행 및 준비와 일치하는 연속적으로. 일반적인 보안 도구 종료, 섀도 복사본 삭제 및 BCD/부팅 설정 변경을 감지하기 위해 엔드포인트 탐지를 조정하세요. 서명되지 않은 DLL 로딩을 차단하거나 엄격히 통제하고 모든 엔드포인트와 서버에 애플리케이션 제어 정책을 시행하여 실행 기회를 줄이세요.
대응
SafePay 지표가 식별되면, 영향을 받은 시스템을 즉시 격리하고 휘발성 메모리를 캡처하며 관련 인증, 엔드포인트 및 네트워크 로그를 보존하세요. 관련 명령 및 제어 인프라를 식별하여 차단한 후 악성 프로세스를 종료하고 지속성 메커니즘을 제거합니다. 가능한 경우 섀도 복사본 복구 등의 복구 작업을 시도하지만 데이터 도난이 발생했음을 가정하고 유출 범위를 검증하세요. 영향을 받은 데이터를 결정하고, 이해관계자 통지 및 이중 갈취 대응 절차에 맞춘 에스컬레이션 단계 실행을 포함한 전체 포렌식 검토를 완료하세요.
“graph TB %% Class definitions classDef technique fill:#99ccff classDef tool fill:#ffcc99 classDef operator fill:#ff9900 %% Initial Access tech_valid_accounts[“<b>기법</b> – T1078 유효한 계정<br />적들이 도난 또는 무차별 대입으로 얻은 자격 증명을 사용하여 VPN이나 RDP에 로그인”] class tech_valid_accounts technique tech_brute_force[“<b>기법</b> – T1110 무차별 대입<br />유효한 자격 증명을 얻기 위한 비밀번호 추측”] class tech_brute_force technique tool_vpn[“<b>도구</b> – VPN 게이트웨이”] class tool_vpn tool tool_rdp[“<b>도구</b> – RDP 서비스”] class tool_rdp tool op_and_access((“AND”)) class op_and_access operator %% Execution tech_regsvr32[“<b>기법</b> – T1218.010 Regsvr32<br />등록을 통해 악성 DLL 로드”] class tech_regsvr32 technique tech_rundll32[“<b>기법</b> – T1218.011 Rundll32<br />DLL에서 코드 실행”] class tech_rundll32 technique tech_powershell[“<b>기법</b> – T1059.001 PowerShell<br />배포 후 PowerShell 명령어 실행”] class tech_powershell technique tech_cmd[“<b>기법</b> – T1059.003 명령 셸<br />Windows 명령어 줄을 실행”] class tech_cmd technique op_and_execution((“AND”)) class op_and_execution operator %% Persistence tech_boot_autostart[“<b>기법</b> – T1547.010 부팅 또는 로그온 자동 시작 실행<br />Regsvr32와 등록된 DLL로 지속성 확보”] class tech_boot_autostart technique tech_appinit[“<b>기법</b> – T1546.010 AppInit DLLs<br />시스템 시작 시 악성 DLL 로드”] class tech_appinit technique op_and_persistence((“AND”)) class op_and_persistence operator %% Discovery tech_share_discovery[“<b>기법</b> – T1135 네트워크 공유 발견<br />ShareFinder.ps1이 SMB 공유를 나열”] class tech_share_discovery technique %% Lateral Movement tech_psexec[“<b>기법</b> – T1021.002 PsExec<br />SMB 관리자 공유를 통해 명령 실행”] class tech_psexec technique tech_rdp_lm[“<b>기법</b> – T1021.001 원격 서비스 RDP<br />측면 이동을 위해 RDP 사용”] class tech_rdp_lm technique tech_deploy_tools[“<b>기법</b> – T1072 소프트웨어 배포 도구<br />배포 유틸리티를 활용하여 원격 호스트에서 명령 실행”] class tech_deploy_tools technique op_and_lateral((“AND”)) class op_and_lateral operator %% Defense Evasion tech_service_stop[“<b>기법</b> – T1489 서비스 중지<br />백신 또는 백업 서비스를 종료”] class tech_service_stop technique tech_inhibit_recovery[“<b>기법</b> – T1490 시스템 복구 억제<br />VSS 스냅샷을 삭제하고 부트 구성 수정”] class tech_inhibit_recovery technique tech_cmstp[“<b>기법</b> – T1548.002 CMSTP를 통한 UAC 우회<br />CMSTP를 사용하여 높은 권한으로 코드 실행”] class tech_cmstp technique op_and_evasion((“AND”)) class op_and_evasion operator %% Collection & Exfiltration tech_winrar[“<b>기법</b> – T1560.001 WinRAR을 통한 압축<br />수집된 데이터의 암호화된 .rar 파일 생성”] class tech_winrar technique tech_lateral_transfer[“<b>기법</b> – T1570 측면 도구 전송<br />감염된 호스트 간에 아카이브 파일 이동”] class tech_lateral_transfer technique tech_ingress_transfer[“<b>기법</b> – T1105 내부 도구 전송<br />아카이브를 외부 서버에 업로드”] class tech_ingress_transfer technique op_and_collection((“AND”)) class op_and_collection operator %% Impact tech_encrypt_impact[“<b>기법</b> – T1486 영향을 위한 데이터 암호화<br />AES/ChaCha20로 파일을 암호화하고 RSA/x25519로 키 저장”] class tech_encrypt_impact technique %% Command and Control tech_encrypted_c2[“<b>기법</b> – T1573.001 암호화된 채널 대칭 암호화<br />암호화로 C2 트래픽 보호”] class tech_encrypted_c2 technique %% Flow connections %% Initial Access flow tech_brute_force u002du002d>|leads to| tech_valid_accounts tech_valid_accounts u002du002d>|uses| tool_vpn tech_valid_accounts u002du002d>|uses| tool_rdp tech_valid_accounts u002du002d>|enables| op_and_access op_and_access u002du002d>|leads to| tech_regsvr32 op_and_access u002du002d>|leads to| tech_rundll32 op_and_access u002du002d>|leads to| tech_powershell op_and_access u002du002d>|leads to| tech_cmd op_and_access u002du002d>|enables| op_and_execution op_and_execution u002du002d>|enables| tech_boot_autostart op_and_execution u002du002d>|enables| tech_appinit op_and_execution u002du002d>|enables| op_and_persistence op_and_persistence u002du002d>|leads to| tech_share_discovery tech_share_discovery u002du002d>|enables| op_and_lateral op_and_lateral u002du002d>|uses| tech_psexec op_and_lateral u002du002d>|uses| tech_rdp_lm op_and_lateral u002du002d>|uses| tech_deploy_tools op_and_lateral u002du002d>|enables| op_and_evasion op_and_evasion u002du002d>|uses| tech_service_stop op_and_evasion u002du002d>|uses| tech_inhibit_recovery op_and_evasion u002du002d>|uses| tech_cmstp op_and_evasion u002du002d>|enables| op_and_collection op_and_collection u002du002d>|uses| tech_winrar op_and_collection u002du002d>|uses| tech_lateral_transfer op_and_collection u002du002d>|uses| tech_ingress_transfer op_and_collection u002du002d>|leads to| tech_encrypt_impact tech_encrypt_impact u002du002d>|supports| tech_encrypted_c2 “
공격 흐름
탐지
의심스러운 Bcdedit 실행 (via cmdline)
보기
암호화 전 PowerShell 준비 가능성 (RunAs + 복구 억제) (via powershell)
보기
PsExec 또는 유사한 방식으로 측면 이동 가능성 (via audit)
보기
WMI 명령 실행 Windows 원격 관리 사용 (via cmdline)
보기
의심스러운 VSSADMIN 활동 (via cmdline)
보기
PsExec 사용자가 공용 폴더에서 시작한 경우 (via process_creation)
보기
IOC(이메일)를 감지하기: SafePay 내부: 새로운 중앙 스타일 랜섬웨어 그룹 분석
보기
SafePay 랜섬웨어 PsExec 및 DLL 실행 [Windows 프로세스 생성]
보기
취약한 자격 증명 및 잘못 구성된 FortiGate [방화벽]을 통한 SafePay 초기 접근
보기
SafePay 랜섬웨어 암호화된 파일 .safepay 확장자 [Windows 파일 이벤트]
보기
시뮬레이션 실행
전제 조건: Telemetry & Baseline 사전 비행 체크가 통과해야 합니다.
이유: 이 섹션은 탐지 규칙을 유도하기 위해 설계된 적의 기술(TTP)의 정확한 실행을 설명합니다. 명령 및 내러티브는 식별된 TTP와 직접적으로 일치해야 하며 탐지 논리에 의해 기대되는 정확한 텔레메트리를 생성해야 합니다.
-
공격 내러티브 및 명령:
도메인 관리자 자격 증명을 가진 공격자는 피봇 머신을 손상시키고 PsExec 를 사용하여 원격cmd.exe를 보조 호스트(TARGET_IP)에서 실행합니다. 원격 셸을 설정한 직후, 공격자는 악성 DLL (malicious.dll)을 원격 호스트로 전송하고 regsvr32.exe (대안으로 rundll32.exe)를 사용하여 랜섬웨어 페이로드를 실행합니다. 이 순서는 Sigma 규칙을 만족시키는 두 가지 명확한 프로세스 생성 이벤트를 생성합니다: 정확한 명령 줄을 가진 PsExec 프로세스와 이후의 DLL 로더 프로세스. -
회귀 테스트 스크립트 :
# ------------------------------------------------------------------------- # SafePay 랜섬웨어 시뮬레이션 – PsExec + Regsvr32 # ------------------------------------------------------------------------- # 필요 조건: # - 현재 폴더 또는 PATH에 PsExec.exe # - 동일 폴더에 있는 악성 DLL명 malicious.dll # - 유효한 도메인 관리자 자격 증명 (자리 표시자를 교체하십시오) # ------------------------------------------------------------------------- $targetIP = "10.0.0.20" # <--- 대상 IP 변경 $username = "DomainAdmin" # <--- 유효한 사용자 변경 $password = "Password123!" # <--- 유효한 비밀번호 변경 $dllPath = "$PSScriptRootmalicious.dll" # 1) PsExec를 통해 원격 cmd.exe 실행 Write-Host "[*] PsExec를 통해 원격 cmd.exe 실행..." $psexecArgs = "$targetIP -u $username -p $password cmd.exe" & .PsExec.exe $psexecArgs Start-Sleep -Seconds 5 # 원격 세션 시작 시간 부여 # 2) 악성 DLL을 원격 호스트로 복사 (SMB 사용) Write-Host "[*] 악성 DLL을 원격 호스트로 복사 중..." $destPath = "$targetIPC$Tempmalicious.dll" Copy-Item -Path $dllPath -Destination $destPath -Force # 3) regsvr32를 통해 DLL 로드 (두 번째 이벤트 생성) Write-Host "[*] regsvr32로 악성 DLL 로드 중..." $regsvrArgs = "/s $destPath" & regsvr32.exe $regsvrArgs Write-Host "[+] 시뮬레이션 완료. SIEM에서 알림 확인." -
정리 명령:
# ------------------------------------------------------------------------- # SafePay 시뮬레이션 정리 # ------------------------------------------------------------------------- $targetIP = "10.0.0.20" $dllRemote = "$targetIPC$Tempmalicious.dll" # 원격 호스트에서 악성 DLL 제거 Write-Host "[*] 원격 호스트에서 악성 DLL 제거 중..." Remove-Item -Path $dllRemote -Force -ErrorAction SilentlyContinue # 선택적으로 남아 있는 regsvr32/rundll32 프로세스 종료 Get-Process -Name regsvr32, rundll32 -ErrorAction SilentlyContinue | Where-Object {$_.Path -like "*$targetIP*"} | Stop-Process -Force Write-Host "[+] 정리 완료."