Trojan.BAT.TOGGLEDEFENDER.A
Trojan:BAT/ToggleDefender.LK!MTB (MICROSOFT)
Windows
Threat Type: Trojan
Destructiveness: No
Encrypted:
In the wild: Yes
OVERVIEW
Downloaded from the Internet, Dropped by other malware
This Trojan arrives on a system as a file dropped by other malware or as a file downloaded unknowingly by users when visiting malicious sites.
TECHNICAL DETAILS
11,372 bytes
BAT
No
19 Feb 2023
Drops files, Displays message/message boxes, Modifies system registry
Arrival Details
This Trojan arrives on a system as a file dropped by other malware or as a file downloaded unknowingly by users when visiting malicious sites.
Installation
This Trojan drops the following files:
- %User Temp%\MpCmdRun.log
(Note: %User Temp% is the current user's Temp folder, which is usually C:\Documents and Settings\{user name}\Local Settings\Temp on Windows 2000(32-bit), XP, and Server 2003(32-bit), or C:\Users\{user name}\AppData\Local\Temp on Windows Vista, 7, 8, 8.1, 2008(64-bit), 2012(64-bit) and 10(64-bit).)
It adds the following processes:
- cmd.exe powershell -nop -win 1 -c iex ([io.file])::ReadAllText($env:0))
- sc.exe qc windefend
- whoami.exe /groups
- net1.exe start TrustedInstaller
Other System Modifications
This Trojan adds the following registry entries:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\
Microsoft\Windows Defender\MpEngine
MpCloudBlockLevel = 2
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\
Microsoft\Windows Defender\Spynet
SpyNetReporting = 2
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\
Microsoft\Windows Defender\Spynet
SubmitSamplesConsent = 0
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\
Microsoft\Windows Defender
PUAProtection = 1
HKEY_CURRENT_USER\Volatile Environment
ToggleDefend = {script of the batch file} → Deletes afterward
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\
Microsoft\Edge\ExemptDomainFileTypePairsFromFileTypeDownloadWarning
1 = {"file_extension":"exe","domains":["*"]}
It adds the following registry keys as part of its installation routine:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\
Microsoft\Windows Defender\Security Center\
Notification
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\
Microsoft\Windows Defender\UX Configuration
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\
Microsoft\Windows Defender\MpEngine
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\
Microsoft\Windows Defender\Spynet
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\
Microsoft\Windows Defender\Real-Time Protection
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\
Microsoft\Edge
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\
Microsoft\Edge\ExemptDomainFileTypePairsFromFileTypeDownloadWarning
It deletes the following registry keys:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\
Microsoft\Windows Defender
DisableRoutinelyTakingAction =
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\
Microsoft\Windows Defender\Real-Time Protection
RealtimeScanDirection =
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\
Microsoft\Windows Defender
PUAProtection =
Other Details
This Trojan does the following:
- Display the following message box:
- It enables/disables Windows Defender:
- If enabled:
- Deletes the following registry values:
- HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\Notifications
- DisableNotifications
- HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\UX Configuration
- Notification_Suppress
- HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\UX Configuration
- UILockdown
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender Security Center\Notifications
- DisableNotifications
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\UX Configuration
- Notification_Suppress
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\UX Configuration
- UILockdown
- HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System
- EnableSmartScreen
- HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection
- DisableRealtimeMonitoring
- HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
- DisableAntiSpyware
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender
- DisableAntiSpyware
- Modifies the following registry values:
- HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System
- ShellSmartScreenLevel = Warn
- HKEY_Users\S-1-5-21{SID}\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost
- EnableWebContentEvaluation = 1
- HKEY_Users\S-1-5-21{SID}\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost
- PreventOverride = 0
- HKEY_Users\S-1-5-21{SID}\SOFTWARE\Microsoft\Edge\SmartScreenEnabled
- (Default) = 1
- HKEY_Users\S-1-5-21{SID}\SOFTWARE\Microsoft\Edge\SmartScreenPuaEnabled
- (Default) = 1
- Adds the following processes:
- sc.exe config windefend depend= RpcsSs
- net1 start windefend
- MpCmdRun.exe -EnableService
- If disabled:
- Modifies the following registry values:
- HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\Notifications
- DisableNotifications = 1
- HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\UX Configuration
- Notification_Suppress = 1
- HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\UX Configuration
- UILockdown = 0
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender Security Center\Notifications
- DisableNotifications = 1
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\UX Configuration
- Notification_Suppress = 1
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\UX Configuration
- UILockdown = 0
- HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System
- EnableSmartScreen = 0
- HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System
- ShellSmartScreenLevel = Warn
- HKEY_Users\S-1-5-21{SID}\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost
- EnableWebContentEvaluation = 0
- HKEY_Users\S-1-5-21{SID}\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost
- PreventOverride = 0
- KEY_Users\S-1-5-21{SID}\SOFTWARE\Microsoft\Edge\SmartScreenEnabled
- (Default) = 0
- HKEY_Users\S-1-5-21{SID}\SOFTWARE\Microsoft\Edge\SmartScreenPuaEnabled
- (Default) = 0
- HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\PhishingFilter
- EnabledV9 = 0
- HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection
- DisableRealtimeMonitoring = 1
- HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
- DisableAntiSpyware = 1
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender
- DisableAntiSpyware = 1
- Adds the following processes:
- net1 stop windefend
- sc.exe config windefend depend= RpcSs- TOGGLE
- MpCmdRun.exe -DisableService
- Deletes the following file:
- %ProgramData%\Microsoft\Windows Defender\mpengine.db
- Deletes the following directory:
- %ProgramData%\Microsoft\Windows Defender\Scans\History\Service
SOLUTION
9.800
19.196.03
04 Mar 2024
19.197.00
05 Mar 2024
Step 1
Before doing any scans, Windows 7, Windows 8, Windows 8.1, and Windows 10 users must disable System Restore to allow full scanning of their computers.
Step 2
Note that not all files, folders, and registry keys and entries are installed on your computer during this malware's/spyware's/grayware's execution. This may be due to incomplete installation or other operating system conditions. If you do not find the same files/folders/registry information, please proceed to the next step.
Step 3
Delete this registry key
Important: Editing the Windows Registry incorrectly can lead to irreversible system malfunction. Please do this step only if you know how or you can ask assistance from your system administrator. Else, check this Microsoft article first before modifying your computer's registry. Before you could do this, you must restart in Safe Mode. For instructions on how to do this, you may refer to this page If the preceding step requires you to restart in safe mode, you may proceed to edit the system registry.
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Security Center
- Notification
- Notification
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
- UX Configuration
- UX Configuration
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
- MpEngine
- MpEngine
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
- Spynet
- Spynet
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
- Real-Time Protection
- Real-Time Protection
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft
- Edge
- Edge
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge
- ExemptDomainFileTypePairsFromFileTypeDownloadWarning
- ExemptDomainFileTypePairsFromFileTypeDownloadWarning
Step 4
Delete this registry value
Important: Editing the Windows Registry incorrectly can lead to irreversible system malfunction. Please do this step only if you know how or you can ask assistance from your system administrator. Else, check this Microsoft article first before modifying your computer's registry.
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\MpEngine
- MpCloudBlockLevel = 2
- MpCloudBlockLevel = 2
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet
- SpyNetReporting = 2
- SpyNetReporting = 2
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet
- SubmitSamplesConsent = 0
- SubmitSamplesConsent = 0
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
- PUAProtection = 1
- PUAProtection = 1
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\ExemptDomainFileTypePairsFromFileTypeDownloadWarning
- 1 = {file_extension:exe,domains:[*]}
- 1 = {file_extension:exe,domains:[*]}
Step 5
Restore this modified registry value
Important: Editing the Windows Registry incorrectly can lead to irreversible system malfunction. Please do this only if you know how to or you can seek your system administrator’s help. You may also check out this Microsoft article first before modifying your computer's registry.
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\Notifications
- From DisableNotifications = 1
- To DisableNotifications = 0
- From DisableNotifications = 1
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\UX Configuration
- From Notification_Suppress = 1
- To Notification_Suppress = 0
- From Notification_Suppress = 1
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\UX Configuration
- From UILockdown = 0
- To UILockdown = 1
- From UILockdown = 0
- In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender Security Center\Notifications
- From DisableNotifications = 1
- To DisableNotifications = 0
- From DisableNotifications = 1
- In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\UX Configuration
- From Notification_Suppress = 1
- To Notification_Suppress = 0
- From Notification_Suppress = 1
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System
- From EnableSmartScreen = 0
- To EnableSmartScreen = 1
- From EnableSmartScreen = 0
- In HKEY_Users\S-1-5-21{SID}\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost
- From EnableWebContentEvaluation = 0
- To EnableWebContentEvaluation = 1
- From EnableWebContentEvaluation = 0
- In HKEY_Users\S-1-5-21{SID}\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost
- From PreventOverride = 0
- To PreventOverride = 1
- From PreventOverride = 0
- In HKEY_Users\S-1-5-21{SID}\SOFTWARE\Microsoft\Edge\SmartScreenEnabled
- From (Default) = 0
- To (Default) = 1
- From (Default) = 0
- In HKEY_Users\S-1-5-21{SID}\SOFTWARE\Microsoft\Edge\SmartScreenPuaEnabled
- From (Default) = 0
- To (Default) = 1
- From (Default) = 0
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\PhishingFilter
- From EnabledV9 = 0
- To EnabledV9 = 1
- From EnabledV9 = 0
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection
- From DisableRealtimeMonitoring = 1
- To DisableRealtimeMonitoring = 0
- From DisableRealtimeMonitoring = 1
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
- From DisableAntiSpyware = 1
- To DisableAntiSpyware = 0
- From DisableAntiSpyware = 1
- In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
- From DefenderDisableAntiSpyware = 1
- To DefenderDisableAntiSpyware = 0
- From DefenderDisableAntiSpyware = 1
Step 6
Restore these deleted registry keys/values from backup
*Note: Only Microsoft-related keys/values will be restored. If the malware/grayware also deleted registry keys/values related to programs that are not from Microsoft, please reinstall those programs on your computer.
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
- DisableRoutinelyTakingAction
- DisableRoutinelyTakingAction
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection
- RealtimeScanDirection
- RealtimeScanDirection
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
- PUAProtection
- PUAProtection
Step 7
Search and delete this file
- %User Temp%\MpCmdRun.log
Step 8
Scan your computer with your Trend Micro product to delete files detected as Trojan.BAT.TOGGLEDEFENDER.A. If the detected files have already been cleaned, deleted, or quarantined by your Trend Micro product, no further step is required. You may opt to simply delete the quarantined files. Please check the following Trend Micro Support pages for more information:
Did this description help? Tell us how we did.