Detect Downgrade Attack in Microsoft Sentinel
Adversaries may downgrade or use a version of system features that may be outdated, vulnerable, and/or does not support updated security controls. Downgrade attacks typically take advantage of a system's backward compatibility to force it into less secure modes of operation. Adversaries may downgrade and use various less-secure versions of features of a system, such as Command and Scripting Interpreters or even network protocols that can be abused to enable Adversary-in-the-Middle or Network Sniffing. For example, PowerShell versions 5+ include Script Block Logging (SBL), which can record executed script content. However, adversaries may attempt to execute a previous version of PowerShell that does not support SBL to evade detection. Adversaries may similarly target network traffic to downgrade from an encrypted HTTPS connection to an unsecured HTTP connection. On Windows systems, adversaries may downgrade the boot manager to a vulnerable version that bypasses Secure Boot.
MITRE ATT&CK
- Tactic
- Defense Evasion
- Technique
- T1562 Impair Defenses
- Sub-technique
- T1562.010 Downgrade Attack
- Canonical reference
- https://attack.mitre.org/techniques/T1562/010/
KQL Detection Query
let OldPowerShellVersions = dynamic(["powershell", "-version", "-Version"]);
let SMBv1Patterns = dynamic(["SMB1Protocol", "SMB1", "\\LANMANSERVER"]);
union
(
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ ("powershell.exe", "pwsh.exe")
| where ProcessCommandLine has "-version" and ProcessCommandLine has_any ("2", "1")
| extend DowngradedVersion = extract(@"-[Vv]ersion\s+(\d+)", 1, ProcessCommandLine)
| where DowngradedVersion in ("1", "2")
| project Timestamp, DeviceName, AccountName, FileName,
ProcessCommandLine, InitiatingProcessFileName,
InitiatingProcessCommandLine, DowngradedVersion,
DetectionType="PowerShell_Downgrade"
),
(
DeviceProcessEvents
| where Timestamp > ago(24h)
| where ProcessCommandLine has_any ("Enable-WindowsOptionalFeature", "Set-SmbServerConfiguration", "sc config")
| where ProcessCommandLine has_any ("SMB1Protocol", "SMB1", "lanmanworkstation", "mrxsmb10")
| project Timestamp, DeviceName, AccountName, FileName,
ProcessCommandLine, InitiatingProcessFileName,
InitiatingProcessCommandLine,
DetectionType="SMBv1_Enable"
),
(
DeviceRegistryEvents
| where Timestamp > ago(24h)
| where RegistryKey has "LANMANSERVER\\Parameters"
| where RegistryValueName == "SMB1"
| where RegistryValueData == "1"
| project Timestamp, DeviceName, AccountName,
RegistryKey, RegistryValueName, RegistryValueData,
InitiatingProcessFileName, InitiatingProcessCommandLine,
DetectionType="SMBv1_Registry"
),
(
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName =~ "bcdedit.exe"
| where ProcessCommandLine has_any ("bootmgr", "winload", "path", "loadoptions")
| where ProcessCommandLine has_any ("downgrade", "rollback", "old", "testsigning")
| project Timestamp, DeviceName, AccountName, FileName,
ProcessCommandLine, InitiatingProcessFileName,
InitiatingProcessCommandLine,
DetectionType="SecureBoot_Downgrade"
)
| sort by Timestamp desc Detects multiple downgrade attack vectors: (1) PowerShell version downgrade to v1 or v2 to evade Script Block Logging, (2) SMBv1 protocol re-enablement via PowerShell cmdlets, sc config, or direct registry modification, and (3) boot manager downgrades via bcdedit that may bypass Secure Boot. Each detection vector is labeled with a DetectionType field for analyst triage.
Data Sources
Required Tables
False Positives & Tuning
- Legacy application compatibility testing that requires PowerShell v2 — some older SCCM scripts or compliance tools explicitly invoke PowerShell v2 for backward compatibility
- IT administrators enabling SMBv1 temporarily to support legacy network printers, scanners, or NAS devices that do not support SMBv2+
- Windows feature management scripts that enumerate optional features including SMB1Protocol as part of a configuration audit without actually enabling it
- Development and QA teams testing application behavior across different protocol versions in isolated lab environments
Other platforms for T1562.010
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1PowerShell Version 2 Downgrade
Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing '-Version 2'. Note: Script Block Logging (Event ID 4104) will NOT capture the executed commands if the v2 engine loaded successfully. Security Event ID 4688 will still show the command line.
- Test 2Enable SMBv1 Protocol via PowerShell
Expected signal: Sysmon Event ID 1: Process Create with CommandLine containing 'Set-SmbServerConfiguration' and 'EnableSMB1Protocol'. Sysmon Event ID 13: Registry Value Set for HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\SMB1 set to 1. SMBServer Operational Event ID 3000.
- Test 3Enable SMBv1 via Windows Optional Feature
Expected signal: Sysmon Event ID 1: Process Create with CommandLine containing 'Enable-WindowsOptionalFeature' and 'SMB1Protocol'. DISM operational events may also be generated. The feature state change persists across reboots.
References (8)
- https://attack.mitre.org/techniques/T1562/010/
- https://www.crowdstrike.com/blog/how-falcon-complete-stopped-a-big-game-hunting-ransomware-attack/
- https://www.mandiant.com/resources/bring-your-own-land-novel-red-teaming-technique
- https://nsfocusglobal.com/attack-and-defense-around-powershell-event-logging/
- https://www.safebreach.com/blog/downgrade-attacks-using-windows-updates/
- https://www.praetorian.com/blog/man-in-the-middle-tls-ssl-protocol-downgrade-attack/
- https://www.crowdstrike.com/cybersecurity-101/attack-types/downgrade-attacks/
- https://www.welivesecurity.com/2023/03/01/blacklotus-uefi-bootkit-myth-confirmed/
Unlock Pro Content
Get the full detection package for T1562.010 including response playbook, investigation guide, and atomic red team tests.