KB5004950: Windows 10 1507 LTS OOB Security Update RCE (July 2021) - Nessus

High   Plugin ID: 151475

This page contains detailed information about the KB5004950: Windows 10 1507 LTS OOB Security Update RCE (July 2021) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 151475
Name: KB5004950: Windows 10 1507 LTS OOB Security Update RCE (July 2021)
Filename: smb_nt_ms21_jul_5004950.nasl
Vulnerability Published: 2021-07-01
This Plugin Published: 2021-07-08
Last Modification Time: 2021-11-30
Plugin Version: 1.5
Plugin Type: local
Plugin Family: Windows : Microsoft Bulletins
Dependencies: ms_bulletin_checks_possible.nasl, smb_check_rollup.nasl, smb_hotfixes.nasl
Required KB Items [?]: SMB/MS_Bulletin_Checks/Possible

Vulnerability Information


Severity: High
Vulnerability Published: 2021-07-01
Patch Published: 2021-07-01
CVE [?]: CVE-2021-34527
CPE [?]: cpe:/o:microsoft:windows
Exploited by Malware: True

Synopsis

The remote Windows host is affected by a remote code execution vulnerabilty.

Description

A remote command execution vulnerability exists in Windows Print Spooler service improperly performs privileged file operations. An authenticated, remote attacker can exploit this to bypass and run arbitrary code with SYSTEM privileges.

Solution

Apply Cumulative Update 5004950

Public Exploits


Target Network Port(s): 139, 445
Target Asset(s): Host/patch_management_checks
Exploit Available: True (GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the KB5004950: Windows 10 1507 LTS OOB Security Update RCE (July 2021) vulnerability:

  1. GitHub: https://github.com/0x6d69636b/windows_hardening
    [CVE-2021-34527]
  2. GitHub: https://github.com/0x727/usefull-elevation-of-privilege
    [CVE-2021-34527]
  3. GitHub: https://github.com/0xIrison/PrintNightmare_Resolver
    [CVE-2021-34527: A fix for PrintNightmare vulnerability that occurs to print spoolers for Windows ...]
  4. GitHub: https://github.com/0xIrison/PrinterNightmare-Patcher
    [CVE-2021-34527: A patch for PrintNightmare vulnerability that occurs to print spooler service for ...]
  5. GitHub: https://github.com/0xaniketB/HackTheBox-Driver
    [CVE-2021-34527]
  6. GitHub: https://github.com/0xirison/PrintNightmare-Patcher
    [CVE-2021-34527]
  7. GitHub: https://github.com/3gstudent/Invoke-BuildAnonymousSMBServer
    [CVE-2021-34527]
  8. GitHub: https://github.com/AdamAmicro/CAHard
    [CVE-2021-34527]
  9. GitHub: https://github.com/AdamPumphrey/PowerShell
    [CVE-2021-34527]
  10. GitHub: https://github.com/Alssi-consulting/HardeningKitty
    [CVE-2021-34527]
  11. GitHub: https://github.com/Amaranese/CVE-2021-34527
    [CVE-2021-34527]
  12. GitHub: https://github.com/Ascotbe/Kernelhub
    [CVE-2021-34527]
  13. GitHub: https://github.com/BeetleChunks/SpoolSploit
    [CVE-2021-34527]
  14. GitHub: https://github.com/CnOxx1/CVE-2021-34527-1675
    [CVE-2021-34527]
  15. GitHub: https://github.com/DenizSe/CVE-2021-34527
    [CVE-2021-34527]
  16. GitHub: https://github.com/Exploitspacks/CVE-2021-34527-CVE-2021-1675
    [CVE-2021-34527: PrintNightmare+Manual]
  17. GitHub: https://github.com/H0j3n/EzpzCheatSheet
    [CVE-2021-34527]
  18. GitHub: https://github.com/Iveco/xknow_infosec
    [CVE-2021-34527]
  19. GitHub: https://github.com/Jean-Francois-C/Windows-Penetration-Testing
    [CVE-2021-34527]
  20. GitHub: https://github.com/JohnHammond/CVE-2021-34527
    [CVE-2021-34527]
  21. GitHub: https://github.com/JumpsecLabs/PrintNightmare
    [CVE-2021-34527: Information on the Windows Spooler vulnerability - CVE-2021-1675; CVE 2021 34527]
  22. GitHub: https://github.com/LaresLLC/CVE-2021-1675
    [CVE-2021-34527]
  23. GitHub: https://github.com/Mr-xn/Penetration_Testing_POC
    [CVE-2021-34527]
  24. GitHub: https://github.com/S1ckB0y1337/Active-Directory-Exploitation-Cheat-Sheet
    [CVE-2021-34527]
  25. GitHub: https://github.com/S3cur3Th1sSh1t/PowerSharpPack
    [CVE-2021-34527]
  26. GitHub: https://github.com/S3cur3Th1sSh1t/WinPwn
    [CVE-2021-34527]
  27. GitHub: https://github.com/SSBhaumik/Printnightmare-safetool
    [CVE-2021-34527]
  28. GitHub: https://github.com/VK9D/PrintNightmare
    [CVE-2021-34527]
  29. GitHub: https://github.com/WiredPulse/Invoke-PrinterNightmareResponse
    [CVE-2021-34527]
  30. GitHub: https://github.com/alvesnet-suporte/microsoft-vulnerabilidades
    [CVE-2021-34527]
  31. GitHub: https://github.com/b4rtik/SharpKatz
    [CVE-2021-34527]
  32. GitHub: https://github.com/boh/RedCsharp
    [CVE-2021-34527]
  33. GitHub: https://github.com/byt3bl33d3r/ItWasAllADream
    [CVE-2021-34527]
  34. GitHub: https://github.com/carloslacasa/cyber-ansible
    [CVE-2021-34527]
  35. GitHub: https://github.com/cfalta/MicrosoftWontFixList
    [CVE-2021-34527]
  36. GitHub: https://github.com/chdav/offensive-cybersec-toolkit
    [CVE-2021-34527]
  37. GitHub: https://github.com/corelight/CVE-2021-1675
    [CVE-2021-34527]
  38. GitHub: https://github.com/crtaylor315/PrintNightmare-Before-Halloween
    [CVE-2021-34527]
  39. GitHub: https://github.com/cube0x0/CVE-2021-1675
    [CVE-2021-34527]
  40. GitHub: https://github.com/dywhoami/CVE-2021-34527-Scanner-Based-On-cube0x0-POC
    [CVE-2021-34527]
  41. GitHub: https://github.com/edsonjt81/CVE-2021-1675
    [CVE-2021-34527]
  42. GitHub: https://github.com/edsonjt81/SpoolSploit
    [CVE-2021-34527]
  43. GitHub: https://github.com/eng-amarante/CyberSecurity
    [CVE-2021-34527]
  44. GitHub: https://github.com/evilashz/CVE-2021-1675-LPE-EXP
    [CVE-2021-34527]
  45. GitHub: https://github.com/floridop/serviceflipper
    [CVE-2021-34527]
  46. GitHub: https://github.com/galoget/PrintNightmare-CVE-2021-1675-CVE-2021-34527
    [CVE-2021-34527]
  47. GitHub: https://github.com/galoget/PrintNightmare-CVE-2021-34527
    [CVE-2021-34527: CVE-2021-34527 - PrintNightmare LPE (PowerShell)]
  48. GitHub: https://github.com/geekbrett/CVE-2021-34527-PrintNightmare-Workaround
    [CVE-2021-34527]
  49. GitHub: https://github.com/hlldz/CVE-2021-1675-LPE
    [CVE-2021-34527]
  50. GitHub: https://github.com/mayormaier/printnightmare-fixes
    [CVE-2021-34527]
  51. GitHub: https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack
    [CVE-2021-34527]
  52. GitHub: https://github.com/mdecrevoisier/SIGMA-detection-rules
    [CVE-2021-34527]
  53. GitHub: https://github.com/nemo-wq/CVE-2021-1675_CVE-2021-34527_PrintNightmare
    [CVE-2021-34527: Windows Print Spooler Remote Code Execution Vulnerability (CVE-2021-34527)]
  54. GitHub: https://github.com/nemo-wq/PrintNightmare-CVE-2021-34527
    [CVE-2021-34527]
  55. GitHub: https://github.com/officedrone/CVE-2021-34527-workaround
    [CVE-2021-34527: Disable remote sessions to print spooler withtout disabling the print spooler service ...]
  56. GitHub: https://github.com/outflanknl/PrintNightmare
    [CVE-2021-34527]
  57. GitHub: https://github.com/ozergoker/PrintNightmare
    [CVE-2021-34527]
  58. GitHub: https://github.com/pwninx/WinPwn
    [CVE-2021-34527]
  59. GitHub: https://github.com/raithedavion/PrintNightmare
    [CVE-2021-34527]
  60. GitHub: https://github.com/romarroca/random-scripts
    [CVE-2021-34527]
  61. GitHub: https://github.com/scipag/HardeningKitty
    [CVE-2021-34527]
  62. GitHub: https://github.com/synth3sis/PrintNightmare
    [CVE-2021-34527]
  63. GitHub: https://github.com/thangnguyenchien/CVE
    [CVE-2021-34527]
  64. GitHub: https://github.com/uhub/awesome-c-sharp
    [CVE-2021-34527]
  65. GitHub: https://github.com/xbufu/PrintNightmareCheck
    [CVE-2021-34527]
  66. GitHub: https://github.com/ycdxsb/WindowsPrivilegeEscalation
    [CVE-2021-34527]
  67. GitHub: https://github.com/yyhh91/PrintNightMareChecker
    [CVE-2021-34527: To check if Spooler is on and whether is it vulnerable to CVE 2021-34527]
  68. GitHub: https://github.com/Eutectico/Printnightmare
    [CVE-2021-34527: Fix for PrintNightmare CVE-2021-34527]
  69. GitHub: https://github.com/fardinbarashi/Fix-CVE-2021-34527
    [CVE-2021-34527: Fix for the security]
  70. GitHub: https://github.com/glorisonlai/printnightmare
    [CVE-2021-34527: CVE-2021-34527 implementation]
  71. GitHub: https://github.com/glshnu/PrintNightmare
    [CVE-2021-34527: Kritische Sicherheitslücke PrintNightmare CVE-2021-34527]
  72. GitHub: https://github.com/powershellpr0mpt/PrintNightmare-CVE-2021-34527
    [CVE-2021-34527: How to fix the PrintNightmare vulnerability]
  73. GitHub: https://github.com/rdboboia/disable-RegisterSpoolerRemoteRpcEndPoint
    [CVE-2021-34527: Workaround for Windows Print Spooler Remote Code Execution ...]
  74. GitHub: https://github.com/syntaxbearror/PowerShell-PrintNightmare
    [CVE-2021-34527: A collection of scripts to help set the appropriate registry keys for CVE-2021-34527 ...]
  75. GitHub: https://github.com/Tomparte/PrintNightmare
    [CVE-2021-34527: To fight against Windows security breach PrintNightmare! (CVE-2021-34527, ...]
  76. GitHub: https://github.com/vinaysudheer/Disable-Spooler-Service-PrintNightmare-CVE-2021-34527
    [CVE-2021-34527: Simple batch script to disable the Microsoft Print Spooler service from system]
  77. GitHub: https://github.com/WidespreadPandemic/CVE-2021-34527_ACL_mitigation
    [CVE-2021-34527: Mitigation for CVE-2021-34527 RCE by setting WRITE ACLs - Setting Modify Deny ACLs ...]
  78. GitHub: https://github.com/ly4k/PrintNightmare
    [CVE-2021-34527: Python implementation for PrintNightmare (CVE-2021-1675 / CVE-2021-34527)]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS Score Source [?]: CVE-2021-34527
CVSS V2 Vector: AV:N/AC:L/Au:S/C:C/I:C/A:C/E:H/RL:OF/RC:C
CVSS Base Score:9.0 (High)
Impact Subscore:10.0
Exploitability Subscore:8.0
CVSS Temporal Score:7.8 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:7.8 (High)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:8.8 (High)
Impact Subscore:5.9
Exploitability Subscore:2.8
CVSS Temporal Score:8.4 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.4 (High)
STIG Severity [?]: I
STIG Risk Rating: High

Go back to menu.

Plugin Source


This is the smb_nt_ms21_jul_5004950.nasl nessus plugin source code. This script is Copyright (C) 2021 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
##
# (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('deprecated_nasl_level.inc');

include('compat.inc');

if (description)
{
  script_id(151475);
  script_version("1.5");
  script_set_attribute(attribute:"plugin_modification_date", value:"2021/11/30");

  script_cve_id("CVE-2021-34527");
  script_xref(name:"IAVA", value:"2021-A-0299");
  script_xref(name:"MSKB", value:"5004950");
  script_xref(name:"MSFT", value:"MS21-5004950");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2021/07/20");

  script_name(english:"KB5004950: Windows 10 1507 LTS OOB Security Update RCE (July 2021)");

  script_set_attribute(attribute:"synopsis", value:
"The remote Windows host is affected by a remote code execution vulnerabilty.");
  script_set_attribute(attribute:"description", value:
"A remote command execution vulnerability exists in Windows Print Spooler service improperly performs privileged file 
operations. An authenticated, remote attacker can exploit this to bypass and run arbitrary code with SYSTEM privileges.");
  script_set_attribute(attribute:"see_also", value:"https://support.microsoft.com/en-us/help/5004950");
  script_set_attribute(attribute:"solution", value:
"Apply Cumulative Update 5004950");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/C:C/I:C/A:C");
  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:L/UI:N/S:U/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-2021-34527");

  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:"vuln_publication_date", value:"2021/07/01");
  script_set_attribute(attribute:"patch_publication_date", value:"2021/07/01");
  script_set_attribute(attribute:"plugin_publication_date", value:"2021/07/08");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:microsoft:windows");
  script_set_attribute(attribute:"stig_severity", value:"I");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Windows : Microsoft Bulletins");

  script_copyright(english:"This script is Copyright (C) 2021 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('smb_func.inc');
include('smb_hotfixes.inc');
include('smb_hotfixes_fcheck.inc');
include('smb_reg_query.inc');

get_kb_item_or_exit('SMB/MS_Bulletin_Checks/Possible');

bulletin = 'MS21-07';
kbs = make_list(
  '5004950'
);

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:'10240',
                   rollup_date:'06_2021_07_01',
                   bulletin:bulletin,
                   rollup_kb_list:[5004950])
)
{
  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());
}

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/smb_nt_ms21_jul_5004950.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\smb_nt_ms21_jul_5004950.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/smb_nt_ms21_jul_5004950.nasl

Go back to menu.

How to Run


Here is how to run the KB5004950: Windows 10 1507 LTS OOB Security Update RCE (July 2021) as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Windows : Microsoft Bulletins plugin family.
  6. On the right side table select KB5004950: Windows 10 1507 LTS OOB Security Update RCE (July 2021) plugin ID 151475.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl smb_nt_ms21_jul_5004950.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a smb_nt_ms21_jul_5004950.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - smb_nt_ms21_jul_5004950.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state smb_nt_ms21_jul_5004950.nasl -t <IP/HOST>

Go back to menu.

References


MSKB | Microsoft Knowledge Base: MSFT | Microsoft Security Bulletin:
  • MS21-5004950
IAVA | Information Assurance Vulnerability Alert:
  • 2021-A-0299
See also: Similar and related Nessus plugins:
  • 151471 - KB5004945: Windows 10 2004 / 20H2 / 21H1 OOB Security Update RCE (July 2021)
  • 151472 - KB5004946: Windows 10 1909 OOB Security Update RCE (July 2021)
  • 151473 - KB5004947: Windows 10 1809 and Windows Server 2019 OOB Security Update RCE (July 2021)
  • 151474 - KB5004948: Windows 10 1607 and Windows Server 2016 OOB Security Update RCE (July 2021)
  • 151476 - KB5004951: Windows Server 2008 R2 OOB Security Update RCE (July 2021)
  • 151477 - KB5004958: Windows Server 2012 R2 OOB Security Update RCE (July 2021)
  • 151478 - KB5004959: Windows Server 2008 OOB Security Update RCE (July 2021)
  • 151479 - KB5004960: Windows Server 2012 OOB Security Update RCE (July 2021)
  • 151488 - Windows PrintNightmare Registry Exposure CVE-2021-34527 OOB Security Update RCE (July 2021)
  • 153822 - FreeBSD : Node.js -- July 2021 Security Releases (c174118e-1b11-11ec-9d9d-0022489ad614)
  • 152123 - NVIDIA Linux GPU Display Driver (July 2021)
  • 152124 - NVIDIA Windows GPU Display Driver (July 2021)
  • 152033 - Oracle JDeveloper XXE (July 2021 CPU)
  • 152035 - Oracle WebLogic Server Multiple Vulnerabilities (July 2021 CPU)
  • 151606 - KB5004237: Windows 10 Version 2004 / Windows 10 Version 20H2 / Windows 10 Version 21H1 Security Update (July 2021)
  • 151592 - KB5004238: Windows 10 Version 1607 / Windows Server 2016 Security Update (July 2021)
  • 151588 - KB5004244: Windows 10 version 1809 / Windows Server 2019 Security Update (July 2021)
  • 151604 - KB5004245: Windows 10 1909 Security Update (July 2021)
  • 151596 - KB5004249: Windows 10 1507 LTS Security Update (July 2021)
  • 151599 - KB5004302: Windows Server 2012 Security Update (July 2021)
  • 151598 - KB5004298: Windows Server 2012 R2 Security Update (July 2021)
  • 151601 - KB5004305: Windows Server 2008 Security Update (July 2021)
  • 151611 - KB5004307: Windows 7 and Windows Server 2008 R2 Security Update (July 2021)
  • 151664 - Security Updates for Exchange (July 2021)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file smb_nt_ms21_jul_5004950.nasl version 1.5. For more plugins, visit the Nessus Plugin Library.

Go back to menu.