IntroductionWe continue to share details on the malicious techniques and toolsets used by the ToddyCat APT group. In the first part of this report, we examined the group’s attacks aimed at stealing data from browsers, as well as from local and cloud email services. The methods used in that campaign indicated that ToddyCat was attempting to access corporate correspondence while evading monitoring tools. However, all of the group’s methods we described previously are effectively detected by EPP and EDR solutions.The attackers continued their search for ways to bypass security solutions and developed a new tool to gain access to a victim’s cloud account via the Google API. Armed with this tool, the group automated all stages of the attack and managed to remain undetected by monitoring systems.In this part of the report, we break down the mechanics of this new attack and analyze the tool that was used to automate it. We’ll also discuss how to detect and defend against this threat.UmbrijIn this campaign, the attackers focused their attention on corporate email communications hosted on Gmail, targeting access compromise via APIs. Because the Google API relies on the OAuth 2.0 protocol for authorization, applications can use an OAuth token to access requested email resources. To acquire this token, the threat actors developed a tool called Umbrij and used it to connect to the browser’s management console in headless mode via a remote debugging port. Through a series of requests, they obtained an OAuth authorization code, which they subsequently exchanged for an access token to reach the target resources via the API. We have dubbed this technique Shadow Token via Remote Debug (STRD).This attack is viable on Chromium-based browsers. If the user has not logged out of their Gmail account, the browser maintains an active session. The attackers exploit this: they launch the browser, connect via the remote debugging port to take control, and send a request to the Gmail service to grant access to the Google account resources within the context of the user’s saved session.During our investigation of this attack, we discovered several versions of the Umbrij tool. These versions included a variety of helper functions designed for debugging, as well as for searching and selecting user accounts within the browser, among other tasks.Kaspersky solutions detect this tool with the following verdicts: HEUR:Trojan-PSW.MSIL.Umbrij.gen, HEUR:Trojan.MSIL.Agent.gen, HEUR:Trojan-PSW.MSIL.Agent.gen.ExecutionThe Umbrij tool was discovered during a proactive threat hunting operation: a scheduled task, KasperskyEndpointSecurityEDRAvp, was running on a user host, launching a digitally signed file. Kaspersky solutions do not create scheduled tasks with that name; the attackers were attempting to masquerade their malicious activity as a legitimate process.The signed file then used the DLL sideloading technique to load the malicious tool.Umbrij execution events within Kaspersky Managed Detection and ResponseThroughout our observation period, we identified the following legitimate files vulnerable to the DLL sideloading technique that were used to launch Umbrij:BDSubWiz.exe: a component of the Submission Wizard in Bitdefender ConnectAgent, which is used to support connection features and interaction with other Bitdefender services or agents. This file insecurely loads a file named log.dll.VSTestVideoRecorder.exe: a component of the video-recording tool used for testing with Visual Studio (VS Test). This executable insecurely loads a file named Microsoft.VisualStudio.QualityTools.VideoRecorderEngine.dll.GoogleDesktop.exe: the discontinued Google Desktop Search application for indexing files and performing quick searches on a local Windows computer. This executable insecurely loads a file named GoogleServices.dll.These files were used to load different versions of Umbrij; the same legitimate file could be leveraged to launch more than one variant. In total, we discovered three versions of Umbrij, which we refer to as a, b, and c for convenience.The tool itself is a DLL written in .NET and obfuscated with ConfuserEx, an open-source obfuscator for .NET applications.Example of an obfuscated code snippetUmbrij is managed with the help of parameters passed through a command line at startup, although it is occasionally executed without any parameters. Below are examples of the command lines observed in attacks against users:"c:\Users\Public\BDSubWiz.exe" -regex -deepsearchc:\windows\vss\bds.exeHowever, these are not the only parameters the tool can accept and process. During the analysis of its executable code, we discovered additional parameters that vary depending on the version of Umbrij. See the table below for the parameters and their descriptions.VersionCommandDescriptiona-regex Used in conjunction with the -deepsearch parameter. Specifies a substring to search for within the user_name field of the user profile file, which typically contains the email address. The tool will utilize the user profile that matches this specified substringa-user Specifies the system username under which the tool will runa-runas-currentuserConfigures Umbrij to run within the execution context of the current usera-deepsearchEnforces additional checks on the user_name field in the user profile: verifying that it is not empty and that it contains the substring specified in the -regex parametera, b, c-path Specifies the full path to the directory containing the browser’s executable filea, b, c-browser Specifies which browser the tool should target: Google Chrome, Microsoft Edge, or botha, b, c-debugport Specifies the remote debugging port numbera, b, c-syncWhen this parameter is specified in the URL, the value 1095133494869 replaces 279448736670 in the permission requestb-domainAdSpecifies the domain name if the user account is a domain accountb-savepdfInstructs Umbrij to save a screenshot of the user profile as a PDF filec-lportSame as debugportEnvironment preparationAt startup, the tool evaluates several prerequisites required to carry out the attack and performs preparatory actions to subsequently compromise the Gmail account.First, Umbrij verifies the availability of the port that will be designated for browser debugging. To accomplish this, the tool utilizes a function named ChekPortAvailable() (original spelling retained), which accepts the target port number as a parameter. It then retrieves information about active connections on the host using the .NET GetActiveTcpConnections() function from the System.Net.NetworkInformation namespace. The tool iterates through each connection in a loop, comparing the port number to the one it is checking.The ChekPortAvailable function used to verify open portsAfter this, the tool retrieves the user context. It searches the system for the explorer.exe process and duplicates its token, retaining all of its privileges (T1134.003 Access Token Manipulation: Make and Impersonate Token). This is the exact same mechanism used by another tool in the group’s arsenal, TomBerBil, which we covered previously.The ImpersonateWithProcess function used to retrieve user contextBy default, Umbrij duplicates the token of the first explorer.exe process it encounters. If multiple users are logged in to the system, the -user switch can be used to specify the name of the target user whose token to duplicate. If the -runas-currentuser switch is specified, the tool will execute within the context of the current user without duplicating any tokens.Next, Umbrij constructs the path to the browser application folder within the user’s local application data repository. To do this, it uses the Environment.SpecialFolder.LocalApplicationData command to retrieve the repository directory from the environment variable and appends the directory of the target browser. The tool then searches for the Local State file in the following folders:%LOCALAPPDATA%\Google\Chrome\User Data\Local State%LOCALAPPDATA%\Microsoft\Edge\User Data\Local StateSee below for an example of the Local State file structure.Structure of the Local State JSON fileWithin this file, the tool searches for the info_cache array, which stores information about browser user profiles. Umbrij enumerates all user profiles and looks for those containing a user_name field that includes an email address. The presence of an email address indicates that the user is authenticated to a Google service. While the tool can interact with every profile it finds, if the -regex parameter is passed through a command line, it searches for the specified substring within the email addresses being enumerated and proceeds exclusively with those matches.Next, Umbrij creates the following directories for Google Chrome and Microsoft Edge, respectively:%LOCALAPPDATA%\Google\Chrome\BackupFiles\%LOCALAPPDATA%\Microsoft\Edge\BackupFiles\The tool copies the following user files and folders of each target user profile into these directories:IndexedDB: a folder containing a relational database used for client-side storage of structured dataLocal Storage: a component of the browser’s web storage that provides a key-value mechanism for storing data on the client sideNetwork: a folder where the browser stores files related to network requests and caching, such as the network cache and session filesLogin Data: a file that stores saved passwords for various websites and applicationsLogin Data For Account: a file that stores credentials associated with a Google account or other synchronized accounts within the browserPreferences: a file containing profile-level browser settingsSecure Preferences: a file that stores protected configurations, such as security and synchronization dataWeb Data: a file that stores auto-fill dataIf these files are locked by other processes, the tool includes a dedicated function to force-copy them.The ForceCopyFolder function used to copy files locked by other processesAs the next step, the tool searches the “Program Files” and “Program Files (x86)” directories for the browser installation folder. Once it locates the executable file and successfully copies all required files, it is ready to proceed with acquiring the authorization code.Acquiring the authorization codeIn the next phase of execution, Umbrij launches Google Chrome, Microsoft Edge, or both browsers sequentially, depending on the parameters passed in the command line. It then passes arguments to the browser based on the following template:"\"{1}\" --user-data-dir=\"{0}\" --remote-debugging-port={2} --profile-directory=\"Default\" --headless https://www.google.com/"It populates the template with the following values:{0}: the path to \BackupFiles\, where the user profile files were copied{1}: the path to the browser executable file{2}: the remote debugging port numberThe table below describes the parameters used in this browser launch template:ParameterDescription–user-data-dirSpecifies the path to the root directory that will store the shared browser data and user profiles–remote-debugging-portOpens a port for remote browser debugging over the DevTools protocol. This switch is commonly used for automated testing with frameworks like Selenium–profile-directorySpecifies the name of the specific profile folder within the user-data-dir–headlessLaunches the browser in headless mode, that is, without a graphical user interfaceThe browser process runs in headless mode while utilizing the copied user profile. Consequently, all active user cookies are applied, which means sites with saved credentials will skip authentication prompts. Furthermore, the browser will log history to a new folder, keeping it completely hidden from the user’s primary account view.Through this method, the threat actors gain access to the user’s authenticated sessions — specifically their Google account — along with the ability to erase any trace of their activity within the browser.Code snippet showing Umbrij connecting to the browser via the debugging portNext, the tool uses the Puppeteer Sharp library, a .NET version of Puppeteer, to connect to the remote debugging port. Puppeteer provides a high-level API to control Chrome or Chromium browsers over the DevTools protocol. Its primary use is for automated testing.The Puppeteer module GitHub pageIf the connection to the remote debugging port is successful, Umbrij sends a GET request to direct the browser to the following URL:https[:]//accounts[.]google[.]com/o/oauth2/v2/auth/identifier?response_type=code&client_id=279448736670.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcalendar%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcalendar.readonly%20https%3A%2F%2Fwww.google.com%2Fm8%2Ffeeds%2F%20https%3A%2F%2Fwww.google.com%2Fm8%2Ffeeds%2F%20https%3A%2F%2Fmail.google.com%2F%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.insert%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.labels%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fadmin.directory.user%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ftasks%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fadmin.directory.group.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fapps.groups.migration%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&flowName=GeneralOAuthFlowThe value specified in the client_id field belongs to Google Workspace Migration for Microsoft Outlook (GWMMO). This is Google’s official tool for importing email, calendar events, and contacts from Microsoft Exchange accounts or local PST files into a Google Workspace account.Umbrij also includes the ability to switch the client_id value from 279448736670 to 1095133494869 by using the -sync parameter. This second identifier belongs to another application: Google Workspace Sync for Microsoft Outlook (GWSMO), which allows users to sync email, calendars, and other data from the cloud account directly into Microsoft Outlook.Code snippet where the client_id replacement occursThe remaining parameters used in the request differ from those typically utilized by the legitimate applications. See the table below for a comparison of these parameters:GET request parameterURL used by UmbrijOriginal URLflowName=GeneralOAuthFlowPresentAbsentcode_challenge (PKCE)AbsentPresent (method=S256)stateAbsentPresentlogin_hintAbsentPresentredirect_urihttp://localhosthttp://localhost:61619/callbackAs seen from the list above, Umbrij omits several parameters characteristic of the legitimate applications. For instance, Umbrij drops the code_challenge parameter, normally used for data protection when retrieving an authorization code. Additionally, the tool modifies the redirection address: while the legitimate application specifies a dedicated port and a callback path, the tool simply points to localhost.The authorization code request specifies the set of permissions for Google services required by the application. This list also differs significantly between requests issued by the legitimate application and those generated by Umbrij. The table below details the variations in the requested scopes:Service parameterURL used by UmbrijOriginal URLhttps://www.google.com/m8/feeds/Present (specified twice)Absenthttps://www.googleapis.com/auth/contactsAbsentPresenthttps://www.googleapis.com/auth/admin.directory.resource.calendar.readonlyAbsentPresenthttps://www.googleapis.com/auth/peopleapi.readonlyAbsentPresentAfter the browser navigates to the URL provided by Umbrij, the Google account selection page opens.Account selectionBecause the attackers copied the victim’s profile folder and are operating within their specific environment, the account selection options will include the currently signed-in user’s authenticated session. Umbrij identifies the corresponding element within the page’s HTML source code.Searching for HTML code elements on the pageThe tool uses JavaScript to emulate a mouse click on the elements, allowing it to proceed to the next step.Simulating a mouse click on a page elementThe subsequent step opens a page displaying the list of requested permissions.Confirming the list of requested access permissionsAs shown in the screenshot, Umbrij requests full access to email, cloud storage, and contacts. Just like in the previous step, it uses JavaScript to click the “Allow” button, which completes the authentication process.The browser is then redirected to the local address that was specified in the redirect_uri parameter of the initial request. The tool intentionally omits a port and a path to a specific page in the redirect_uri because the true objective of this action is simply to capture the code parameter from the context of the GET request. This parameter contains the OAuth authorization code. To retrieve it, Umbrij extracts the substring located between the code= and &scope parameters.Extracting the authorization code from the GET requestResultsUmbrij, like most other tools in ToddyCat’s arsenal, logs its actions in detail and saves them to a file. It also saves the retrieved authorization code to this log file, which the operator subsequently exfiltrates from the compromised host.Below is an example of a log file generated by version a of the tool.------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[*] switch to sync mode.[!] port 11111 is available![*] Impersonate success![*] browser switch to chrome .Parsing C:\Users\\AppData\Local\Google\Chrome\User Data\Local State ...[*] detected profile: Profile 4 ==> @gmail.com[*] ready auth for @gmail.com.[*] Browser Exe path C:\Program Files\Google\Chrome\Application\chrome.exe.[!] CreateProcessAsUserW...[*] Browser created with pid 3108[???] @gmail.com[pup] mail : @gmail.com[pup] account choice click ![pup] Allow click ![@gmail.com] 4%2F0AcvDMrDtzQaC-TT8uMhg [*] RevertToSelf succeed!^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^The log indicates that the sync mode is selected (meaning the Google Workspace Sync for Microsoft Outlook application is used) and the debugging port is set to 11111. After locating the user profile and copying its folder, Umbrij launches Google Chrome. After this, the tool emulates clicks on the appropriate buttons to confirm permissions, ultimately outputting the final result of the operation: the stolen OAuth authorization code.Since all requests occur within a background browser instance, the tool includes a feature to generate a PDF snapshot of the web page where the permission confirmation process halted in the event of an error.Saving a web page as a PDF file in the case of an errorAdditionally, the tool can create a PDF file for the user profile in Google Chrome and Microsoft Edge by navigating to the following internal addresses:edge://profile-internalschrome://profile-internalsExample contents of a generated PDF fileThe acquired authorization code is then exchanged for an OAuth access token. The threat actors use that token to connect to the Gmail account through the API, thus compromising corporate email communications. The diagram below illustrates the complete attack workflow.Umbrij workflow diagramDetectionDLL sideloadingFirst and foremost, defenders should monitor library loading events (DLL loads) associated with the known applications vulnerable to DLL sideloading that are exploited by this tool: Bitdefender ConnectAgent, Visual Studio, and Google Desktop Search.title: Possible Dll Hijacking Of Microsoft VisualStudio QualityTools dllid: 246f1409-2993-46f6-9b77-e447a327df5dstatus: experimentaldescription: Detects possible DLL hijacking of Microsoft.VisualStudio.QualityTools.VideoRecorderEngine.dll by looking for suspicious image loads, loading this DLL from unexpected locationsauthor: kasperskydate: 2025-08-11tags: - attack.defense-evasion - attack.t1574.001logsource: product: windows category: image_loaddetection: selection: ImageLoaded|endswith: 'Microsoft.VisualStudio.QualityTools.VideoRecorderEngine.dll' filter: ImageLoaded|contains: '\IDE\Extensions\TestPlatform\Extensions\' condition: selectionfalsepositives: Legitimate activitylevel: highBrowser launchLaunching a browser with a remote debugging port specified is a highly unusual event on standard user hosts that are not running web application development or automated testing workflows. Consequently, monitoring for these specific command-line arguments can serve as a reliable indicator of this attack.title: Launching Chrome With Debug Parametersid: f072803f-3cf4-4537-82e6-e8b3a201d99fstatus: stabledescription: Detects the execution of Chromium based browsers launched with incognito mode and remote debugging enabledauthor: kasperskydate: 2025-12-11tags: - attack.lateral_movement - attack.defense_evasion - attack.t1550.001logsource: category: process_creation product: windowsdetection: selection: CommandLine|contains|all: - '--remote-debugging-port' - '--headless' condition: selectionfalsepositives: Opening a browser as part of web application testing. Legitimate activitylevel: highRevoking third-party accessTo review the authorization codes granted to applications, navigate to the Google Account settings under the Third-party apps & services section, or access the following URL directly:https://myaccount.google.com/connectionsThis page displays a comprehensive list of applications and services that currently have permission to access the account.List of apps connected to the Google accountIf the Google Workspace Migration for Microsoft Outlook or Google Workspace Sync for Microsoft Outlook applications appear in this list but are not actually used within your organization, revoke their access immediately. This will invalidate all potentially compromised OAuth tokens associated with them.Risk mitigationLaunching a browser with a remote debugging port enabled is inherently suspicious for users who do not engage in web development. For these employees, you can completely disable Chromium-based browser developer tools.This can be achieved by configuring the DeveloperToolsAvailability policy. To enforce this, set the registry value to 0x00000002 for the following Windows Registry key and restart the browser:HKLM\Software\Policies\Google\Chrome\DeveloperToolsAvailabilityTo verify that the policy has been successfully applied, navigate to the browser’s internal policies page at chrome://policy:Note that while disabling developer tools can successfully disrupt the automated retrieval of the OAuth authorization code, it will not help, however, if the adversary decides to leverage the browser’s graphical user interface (GUI) — though this manual approach is significantly less likely due to the friction it introduces for the attackers. Therefore, as a risk mitigation measure, users should be instructed to explicitly log out of their Google accounts as soon as their sessions are complete.TakeawaysThe ToddyCat APT group continues to search for ways of compromising corporate email communications. We have been tracking the group for a long time and we have observed continuous updates to its arsenal in an attempt to bypass security defenses, even as their core techniques remain consistent. For instance, the group has long relied on DLL sideloading to stealthily drop malicious utilities and scheduled tasks. However, their new tool, Umbrij, automates the attackers’ attempts to gain access to organizational email accounts. This automation not only helps increase the scale and frequency of their attacks but also demonstrates ToddyCat’s strong motivation and advanced technical skills.To defend against these threats, corporate security teams must monitor for suspicious library loading events initiated by legitimate files, watch for instances of browsers launching in developer mode, and conduct regular audits of third-party applications and services with access permissions to Google accounts. Furthermore, deploying a robust, comprehensive security solution — such as Kaspersky Next — is critical to detect this type of malicious host-based activity in a timely manner.Indicators of compromiseAdditional information about this threat is available to customers of the Kaspersky Threat Intelligence Reporting service. Contact: intelreports@kaspersky.com.Malicious files1AB58838E5790EFB22F2D35AB98C0B7D Umbrij ver. aA7D7D6C4C3F227F7117261C63B9E23A9 Umbrij ver. a3D3A621F852C42D97FD7260681E42508 Umbrij ver. a3432DD9AC0DF80EF86EB80BD080F839B Umbrij ver. a22AAEB4946BA6D2F2E27FEB7DBB295DE Umbrij ver. bF61FBFB7AA1CD5DC8F70B055B51563E2 Umbrij ver. bF169D6D172DFB775895A5E2B1540C854 Umbrij ver. cLegitimate files leveraged for DLL sideloadingMD5File nameName of DLL being loaded9F5F2F0FB0A7F5AA9F16B9A7B6DAD89FGoogleDesktop.exeGoogleServices.DLL28CB7B261F4EB97E8A4B3B0D32F8DEF1BDSubWiz.exelog.dllBAE82A15D1DBFB024617B9B56A8E5F66VSTestVideoRecorder.exeMicrosoft.VisualStudio.QualityTools.VideoRecorderEngine.dllPaths to DLL sideloading filesPath to the file that loads the DLLPath to the DLL being loadedC:\Users\\AppData\Local\Temp\BDS.exeC:\Users\\AppData\Local\Temp\log.dllC:\Users\Public\BDS.exeC:\Users\Public\log.dllc:\users\public\bdsubwiz.exeC:\Users\Public\log.dllC:\Windows\Temp\BDS.exeC:\Windows\Temp\log.dllc:\windows\vss\bds.exeC:\Windows\Vss\log.dllc:\windows\temp\GoogleDesktop.exec:\windows\temp\GoogleServices.DLLc:\windows\temp\VSTestVideoRecorder.exec:\windows\temp\Microsoft.VisualStudio.QualityTools.VideoRecorderEngine.dll