Static analysis: pre-encryption actions
Address: 0x14006ecf0, 0x140070c30, 0x140071d80 → 0x140071620, 0x140070e30
Callers / callees: main, once per run (not in -l mode); Restart Manager per locked file
Purpose
Prepare the host before any file is touched: avoid re-encrypting, spare system processes, and remove Volume Shadow Copies.
Walkthrough
- Skip-list update (
FUN_14006ecf0): adds.akiraand.arikato the extension skip set. - Protected-PID snapshot (
FUN_140070c30):WTSEnumerateProcessesW, storing the PIDs whose names are in the 20-name protected set. These PIDs are exempt from Restart Manager shutdown. - Shadow-copy deletion (
FUN_140071d80→FUN_140071620):- Decodes a 76-byte stack string with
((0x39 − b)·0x0B) mod 0x7Fintopowershell.exe -Command "Get-WmiObject Win32_Shadowcopy | Remove-WmiObject". - Launches it through COM/WMI in
ROOT\CIMV2:Win32_Process.Create, withWin32_ProcessStartup.ShowWindow = 0(hidden) andCreateFlags = 0. PowerShell therefore appears as a child ofWmiPrvSE.exe, not of the ransomware. - Opens the returned PID with SYNCHRONIZE and waits up to 15 s. The PID is read as a 16-bit value, so the wait silently fails for PIDs above 32767.
- The decoded string was confirmed live. In every run the executor was forced to return
(
rax=0; rip=[rsp]; rsp=rsp+8), so the VM’s shadow copies survived.
- Decodes a 76-byte stack string with
Restart Manager unlocking (FUN_140070e30) runs per file, only when the file cannot be opened:
RmStartSession→RmRegisterResources(file)→RmGetList.- If any holder is the ransomware itself or a protected PID, it calls
RmEndSessionand gives up on that file. - Otherwise it calls
RmShutdown(session, RmForceShutdown), which kills the holders (database engines, Office, backup agents), and retries the open.
Findings
- Nothing else runs beforehand: no service stops, no event-log clearing, no firewall or boot-configuration changes, no persistence.
- The WMI parentage (
WmiPrvSE.exe→ hiddenpowershell.exe) is the earliest and most reliable behavioural signal (05-detections/01-detections.md).
Cross-references
- Related:
07-string-obfuscation.md,04-dynamic/02-run2-crypto-validation.md