Vulnerabilities > CVE-2020-0796 - Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in Microsoft Windows 10 and Windows Server 2016

047910
CVSS 10.0 - CRITICAL
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
HIGH
Integrity impact
HIGH
Availability impact
HIGH
network
low complexity
microsoft
CWE-119
critical
nessus
exploit available
metasploit

Summary

A remote code execution vulnerability exists in the way that the Microsoft Server Message Block 3.1.1 (SMBv3) protocol handles certain requests, aka 'Windows SMBv3 Client/Server Remote Code Execution Vulnerability'.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

Exploit-Db

  • idEDB-ID:48267
    last seen2020-03-30
    modified2020-03-30
    published2020-03-30
    reporterExploit-DB
    sourcehttps://www.exploit-db.com/download/48267
    titleMicrosoft Windows 10 (1903/1909) - 'SMBGhost' SMB3.1.1 'SMB2_COMPRESSION_CAPABILITIES' Local Privilege Escalation
  • idEDB-ID:48537
    last seen2020-06-02
    modified2020-06-02
    published2020-06-02
    reporterExploit-DB
    sourcehttps://www.exploit-db.com/download/48537
    titleMicrosoft Windows - 'SMBGhost' Remote Code Execution
  • idEDB-ID:48216
    last seen2020-03-14
    modified2020-03-14
    published2020-03-14
    reporterExploit-DB
    sourcehttps://www.exploit-db.com/download/48216
    titleMicrosoft Windows 10 (1903/1909) - 'SMBGhost' SMB3.1.1 'SMB2_COMPRESSION_CAPABILITIES' Buffer Overflow (PoC)

Metasploit

descriptionA vulnerability exists within the Microsoft Server Message Block 3.1.1 (SMBv3) protocol that can be leveraged to execute code on a vulnerable server. This local exploit implementation leverages this flaw to elevate itself before injecting a payload into winlogon.exe.
idMSF:EXPLOIT/WINDOWS/LOCAL/CVE_2020_0796_SMBGHOST
last seen2020-06-12
modified2020-04-16
published2020-04-02
references
reporterRapid7
sourcehttps://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/windows/local/cve_2020_0796_smbghost.rb
titleSMBv3 Compression Buffer Overflow

Nessus

  • NASL familyWindows : Microsoft Bulletins
    NASL idSMB_NT_MS20_MAR_4551762.NASL
    descriptionThe remote Windows host is missing security update 4551762. It is, therefore, affected by a remote code execution vulnerability. The vulnerability exists in the way that the Microsoft Server Message Block 3.1.1 (SMBv3) protocol handles certain requests. An attacker who successfully exploited the vulnerability could gain the ability to execute code on the target server or client.
    last seen2020-04-18
    modified2020-03-12
    plugin id134428
    published2020-03-12
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/134428
    titleKB4551762: Windows 10 Version 1903 and Windows 10 Version 1909 OOB Security Update (ADV200005)(CVE-2020-0796)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    
    
    
    
    
    # The descriptive text and package checks in this plugin were  
    # extracted from the Microsoft Security Updates API. The text
    # itself is copyright (C) Microsoft Corporation.
    #
    
    
    
    
    
    
    
    include('compat.inc');
    
    if (description)
    {
      script_id(134428);
      script_version("1.7");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/04/17");
    
      script_cve_id("CVE-2020-0796");
      script_xref(name:"MSKB", value:"4551762");
      script_xref(name:"MSFT", value:"MS20-4551762");
    
      script_name(english:"KB4551762: Windows 10 Version 1903 and Windows 10 Version 1909 OOB Security Update (ADV200005)(CVE-2020-0796)");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote Windows host is affected by a remote code execution vulnerability.");
      script_set_attribute(attribute:"description", value:
    "The remote Windows host is missing security update 4551762. It is, therefore, affected by a remote code execution
    vulnerability. The vulnerability exists in the way that the Microsoft Server Message Block 3.1.1
    (SMBv3) protocol handles certain requests. An attacker who successfully exploited the vulnerability could gain the
    ability to execute code on the target server or client.");
      # https://support.microsoft.com/en-us/help/4551762/windows-10-update-kb4551762
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?ab6efe1b");
      script_set_attribute(attribute:"solution", value:
    "Apply Cumulative Update KB4551762.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2020-0796");
    
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_set_attribute(attribute:"exploited_by_malware", value:"true");
      script_set_attribute(attribute:"metasploit_name", value:'SMBv3 Compression Buffer Overflow');
      script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/03/12");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/03/12");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/03/12");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:microsoft:windows");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Windows : Microsoft Bulletins");
    
      script_copyright(english:"This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("smb_check_rollup.nasl", "smb_hotfixes.nasl", "ms_bulletin_checks_possible.nasl");
      script_require_keys("SMB/MS_Bulletin_Checks/Possible");
      script_require_ports(139, 445, "Host/patch_management_checks");
    
      exit(0);
    }
    
    include("audit.inc");
    include("smb_hotfixes_fcheck.inc");
    include("smb_hotfixes.inc");
    include("smb_func.inc");
    include("misc_func.inc");
    
    get_kb_item_or_exit("SMB/MS_Bulletin_Checks/Possible");
    
    bulletin = "MS20-03";
    kbs = make_list('4551762');
    
    if (get_kb_item("Host/patch_management_checks")) hotfix_check_3rd_party(bulletin:bulletin, kbs:kbs, severity:SECURITY_HOLE);
    
    get_kb_item_or_exit("SMB/Registry/Enumerated");
    get_kb_item_or_exit("SMB/WindowsVersion", exit_code:1);
    
    if (hotfix_check_sp_range(win10:'0') <= 0) audit(AUDIT_OS_SP_NOT_VULN);
    
    share = hotfix_get_systemdrive(as_share:TRUE, exit_on_fail:TRUE);
    if (!is_accessible_share(share:share)) audit(AUDIT_SHARE_FAIL, share);
    
    if (
      smb_check_rollup(os:"10",
                       sp:0,
                       os_build:"18362",
                       rollup_date:"04_2020_oob",
                       bulletin:bulletin,
                       rollup_kb_list:[4551762])
      ||
      smb_check_rollup(os:"10",
                     sp:0,
                     os_build:"18363",
                     rollup_date:"04_2020_oob",
                     bulletin:bulletin,
                     rollup_kb_list:[4551762])
    )
    {
      replace_kb_item(name:'SMB/Missing/'+bulletin, value:TRUE);
      hotfix_security_hole();
      hotfix_check_fversion_end();
      exit(0);
    }
    else
    {
      hotfix_check_fversion_end();
      audit(AUDIT_HOST_NOT, hotfix_get_audit_report());
    }
    
  • NASL familyWindows
    NASL idSMB_MICROSOFT_WINDOWS_ADV200005_REMOTE.NASL
    descriptionA remote code execution vulnerability exists in Microsoft Server Message Block 3.1.1 (SMBv3) protocol due to how it handles a maliciously crafted compressed data packet. An unauthenticated, remote attacker can exploit this to bypass authentication and execute arbitrary commands. Note, the plugin checks if SMB 3.1.1 with compression is enabled. It does not currently verify the vulnerability itself.
    last seen2020-04-07
    modified2020-03-11
    plugin id134421
    published2020-03-11
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/134421
    titleMicrosoft Windows SMBv3 Compression RCE (ADV200005)(CVE-2020-0796)(Remote)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include('compat.inc');
    
    if (description)
    {
      script_id(134421);
      script_version("1.6");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/04/06");
    
      script_cve_id("CVE-2020-0796");
    
      script_name(english:"Microsoft Windows SMBv3 Compression RCE (ADV200005)(CVE-2020-0796)(Remote)");
      script_summary(english:"Checks the Windows version and mitigative measures.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote Windows host is using a vulnerable version of SMB.");
      script_set_attribute(attribute:"description", value:
    "A remote code execution vulnerability exists in Microsoft Server Message Block
    3.1.1 (SMBv3) protocol due to how it handles a maliciously crafted compressed
    data packet. An unauthenticated, remote attacker can exploit this to bypass
    authentication and execute arbitrary commands.
    
    Note, the plugin checks if SMB 3.1.1 with compression is enabled. It does not
    currently verify the vulnerability itself.");
      # https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/ADV200005
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?736703d3");
      script_set_attribute(attribute:"solution", value:
    "Microsoft has provided additional details and guidance in the ADV200005 advisory.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2020-0796");
    
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_set_attribute(attribute:"exploited_by_malware", value:"true");
      script_set_attribute(attribute:"metasploit_name", value:'SMBv3 Compression Buffer Overflow');
      script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/03/12");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/03/12");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/03/11");
    
      script_set_attribute(attribute:"potential_vulnerability", value:"true");
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:microsoft:windows");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Windows");
    
      script_copyright(english:"This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("smb_dialects_enabled.nasl");
      script_require_keys("SMB/smb_dialect/3.1.1", "Settings/ParanoidReport");
      script_require_ports(139, 445);
    
      exit(0);
    }
    include('audit.inc');
    include('global_settings.inc');
    include('smb_func.inc');
    include('misc_func.inc');
    
    if (report_paranoia < 2) audit(AUDIT_PARANOID);
    
    port = kb_smb_transport();
    
    if (get_kb_item('SMB/smb_dialect/3.1.1/compression'))
    {
      report = 'Nessus was able to detect SMB 3.1.1 with compression enabled using a specially crafted packet.\n';
      security_report_v4(port:port, extra:report, severity:SECURITY_HOLE);
    }
    else
    {
      audit(AUDIT_HOST_NOT, 'affected');
    }
    
    
  • NASL familyWindows
    NASL idMICROSOFT_SMB_CVE-2020-0796.NASL
    descriptionA remote code execution vulnerability exists in Microsoft Server Message Block 3.1.1 (SMBv3) protocol due to how it handles a maliciously crafted compressed data packet. An unauthenticated, remote attacker can exploit this to bypass authentication and execute arbitrary commands. Note that this plugin works only if it can to connect to the IPC$ share anonymously using SMB dialect 3.1.1.
    last seen2020-04-18
    modified2020-04-02
    plugin id135177
    published2020-04-02
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/135177
    titleMicrosoft Windows SMBv3 Compression RCE (ADV200005)(CVE-2020-0796)(Remote)

Packetstorm

The Hacker News