eSentire Threat Intelligence: GootLoader Striking with a New…

On December 2, 2022, one of our 24/7 SOC
Cyber Analysts escalated an incident involving the GootLoader malware at a pharmaceutical company. eSentire’s Threat Response Unit (TRU) responded quickly and proceeded with an in-depth threat investigation of GootLoader.

eSentire leveraged Microsoft Defender for Endpoint to quarantine and prevent the threat (Figure 1).

Figure 1: The malicious ZIP archive was delivered via a compromised WordPress website

GootLoader Initial Stage Analysis

TRU proceeded to conduct a deep analysis of the GootLoader payload and made a notable discovery: the compromised WordPress website serving the payload generated different names for the ZIP archives when different users visited the page, shown in Figure 2 above. Some examples of the names generated were:

  • Uaw_fca_contract_2019_highlights_78352
  • Telecommunications_franchise_agreement_13105
  • Vwr_bio_agreement_85841
  • Standard_agreement_calculation_hplc_11285

Based on analysis, TRU also determined that the last five digits of the filename can also change.

Figure 2: Gootloader new infection chain

The initial malicious JavaScript code is mixed with legitimate Sizzle.js JavaScript Library (Figure 3).

Figure 3: Malicious code is highlighted in red color

For the initial infection, the first obfuscated script is executed via wscript.exe process. After the script finishes executing, it sleeps for ~12 seconds before spawning a secondary JS script. The second JS file is another obfuscated script with approximately 40 MB in size. The script is padded with garbage strings as shown in Figure 4.

Figure 4: The secondary JS is padded with garbage strings

This is a departure from the previous GootLoader persistence technique. Specifically after communicating with the C2 server and domain join checks, the scheduled task was created to decode the registry values containing the payload (see our analysis on GootLoader delivering IcedID).

The current persistence mechanism is achieved right after the successful infection without the malware communicating with the C2. The persistence is created via a scheduled task using Schedule.Service COMObject (Figure 5). The secondary JS file is dropped under C:Users<username>AppDataRoaming path under one of the existing folders on the machine and runs at each logon attempt. The task name and JS script file contains randomly generated words.

Figure 5: Scheduled Task

The secondary JS script will spawn a PowerShell process with the command line “pOWErsHELl” that contains the script shown in Figure 6.

Figure 6: PowerShell script spawned from the secondary JS script

The script retrieves the list of applications under the Desktop folder of the infected user, gets the processes running on the host, operating system, environment variables, list of running user processes that use GUI excluding background and system processes, the drives that has 50 MB free space or greater. The gathered information then is base64-encoded and compressed to be sent out over POST requests to WordPress domains with the tags in the Cookie field over HTTP/HTTPs (Figures 7-8). Please note that the tags will change based on the JS payload:

  • 0D2B9F9A72 – contains environment variables and OS information
  • 0D2B9F9A721 – contains list of running processes
  • 0D2B9F9A722 – contains list of running user processes that use GUI
  • 0D2B9F9A723 – contains the list of applications under the Desktop folder
  • 0D2B9F9A724 – local disk letter

The user-agent used: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/107.0.0.0 Safari/537.36;

Figure 7: Traffic capture of a successful GootLoader infection
Figure 8: Beacon connections to contacted domains

On November 21, GootLoader Sites mentioned that GootLoader has access to approximately 34k domains.

With the new infection technique, a threat actor can consistently receive the fingerprinted information on the host while having access to it and make further decisions on whether to deploy additional malware or not.

Indicators of Compromise

Contacted domain momo[.]com/xmlrpc[.]php
Contacted domain diariojudio[.]com/xmlrpc[.]php
Contacted domain hortencollection[.]com/xmlrpc[.]php
Contacted domain willowdragonstonecommunity[.]org/xmlrpc[.]php
Contacted domain afxotec[.]gr/xmlrpc[.]php
Contacted domain blog[.]bayareadisc[.]org/xmlrpc[.]php
Contacted domain diagnosa[.]net/xmlrpc[.]php
Contacted domain vivporn[.]com/xmlrpc[.]php
Contacted domain arinanikitina[.]com/xmlrpc[.]php
Contacted domain legit-helpers[.]com/xmlrpc[.]php
Contacted domain kumpulantukang[.]com/xmlrpc[.]php
Contacted domain aaa-media-solutions[.]de/xmlrpc[.]php
Contacted domain hbi-wohnen[.]de/xmlrpc[.]php
Contacted domain mentecounseling[.]com/xmlrpc[.]php
Contacted domain sert-service[.]ru/xmlrpc[.]php
Contacted domain cafeintra[.]nickit[.]dk/xmlrpc[.]php
Contacted domain meerlezen[.]nl/xmlrpc[.]php
Contacted domain svezazdravlje[.]site/xmlrpc[.]php
Contacted domain thegreatideaz[.]com/xmlrpc[.]php
Contacted domain cardinalconstruction[.]ca/xmlrpc[.]php

Our Threat Response Unit (TRU) combines threat intelligence obtained from research and security incidents to create action-oriented outcomes for our customers. We are taking a full-scale response approach to fight modern cybersecurity threats by deploying countermeasures, such as:

  • Performing global threat hunts for indicators associated with GootLoader

Our detection content is supported by investigation runbooks, ensuring our SOC (Security Operations Center) analysts respond rapidly to any intrusion attempts related to a known malware Tactics, Techniques, and Procedures. In addition, TRU closely monitors the threat landscape and constantly addresses capability gaps and conducts retroactive threat hunts to assess customer impact.

We recommend implementing the following controls to help secure your organization against GootLoader malware:

  • Address security issues in Active Directory by thoroughly reviewing and securing SYSVOL permissions, implementing Least-Privilege administrative models and patching any known vulnerabilities.

While the TTPs used by adversaries grow in sophistication, they lead to a certain level of difficulties at which critical business decisions must be made. Preventing the various attack paths utilized by the modern threat actor requires actively monitoring the threat landscape, developing, and deploying endpoint detection, and the ability to investigate logs & network data during active intrusions.

eSentire’s TRU is a world-class team of threat researchers who develop new detections enriched by original threat intelligence and leverage new machine learning models that correlate multi-signal data and automate rapid response to advanced threats.

If you are not currently engaged with an MDR provider, eSentire MDR can help you reclaim the advantage and put your business ahead of disruption.

Learn what it means to have an elite team of Threat Hunters and Researchers that works for you. Connect with an eSentire Security Specialist.

https://twitter.com/GootLoaderSites/status/1594888020058337281?s=20&t=PwGqmHiqKVu2KKJlbzioRw

Source: https://www.esentire.com/blog/gootloader-striking-with-a-new-infection-technique