Archived material. This page is preserved for historical and educational value. It reflects the threat landscape, available guidance, and research context at the time it was written or last updated. It should not be treated as a current security advisory or production remediation guidance. See the Threat Archive index for context and full listing.
Vulnerability · Windows SMBv3 · 2020

SMBGhost

CVE-2020-0796 — pre-authentication wormable RCE in SMBv3.1.1 compression handling

What's SMBGhost?

SMBGhost is a critical remote code execution vulnerability in the Microsoft Server Message Block 3.1.1 (SMBv3) protocol, caused by improper handling of compressed data packets. It allows unauthenticated attackers to execute arbitrary code with SYSTEM privileges.

The vulnerability was accidentally leaked in Microsoft's Advance Notification Service for the March 2020 Patch Tuesday updates. Security researchers from Cisco Talos and Fortinet noticed references to an unannounced CVE in the updates, leading to public disclosure.

Key Facts

Impact

What's SMB

Server Message Block (SMB) is a network communication protocol developed by Microsoft for providing shared access to files, printers, and serial ports between nodes on a network. SMBv3.1.1 introduced features like compression to improve performance, but this introduced the vulnerability in handling compressed data.

Implications

This vulnerability poses significant operational and security risks, especially in unpatched environments. It could lead to data breaches, ransomware attacks, or denial-of-service incidents. In enterprise settings, it threatens entire networks due to its wormable nature, potentially disrupting business operations and compromising sensitive data.

Mitigation

Immediate (0–7 days)

Short-Term (1–4 weeks)

Medium-Term (1–3 months)

Long-Term (3–6+ months)

Timeline

DateEvent
March 10, 2020Vulnerability details leaked; Microsoft issues advisory ADV200005.
March 12, 2020Out-of-band patch KB4551762 released.
March 31, 2020Proof-of-concept exploits begin circulating.
June 2020Full exploit code published by researchers.

Key Takeaways

References

Identification Tool

Checklist for confirming if a system is affected:

  1. Run winver to check Windows version and build number.
  2. If version is 1903 (build 18362.xxx) or 1909 (build 18363.xxx) and xxx < 720, the system is potentially vulnerable.
  3. Check registry key HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\DisableCompression — if set to 1, compression is disabled (mitigated).
  4. Verify if SMBv3 is enabled by checking if port 445 is listening using netstat -an.
  5. Use vulnerability scanners like Nessus or OpenVAS to scan for CVE-2020-0796.

PowerShell Check Script

$os = Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
$build = $os.CurrentBuildNumber
$ubr = $os.UBR
$vulnerable = $false

if (($build -eq 18362 -and $ubr -lt 720) -or ($build -eq 18363 -and $ubr -lt 720)) {
    $vulnerable = $true
}

$compression = Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" -Name DisableCompression -ErrorAction SilentlyContinue

if ($vulnerable) {
    if ($compression -and $compression.DisableCompression -eq 1) {
        Write-Host -ForegroundColor Green "OK - Vulnerability mitigated by disabling compression."
    } else {
        Write-Host -ForegroundColor Red "Update Needed - System is vulnerable to SMBGhost."
    }
} else {
    Write-Host -ForegroundColor Green "OK - System is not affected or already patched."
}