MS17-010: Security Update for Microsoft Windows SMB Server (4013389) (ETERNALBLUE) (ETERNALCHAMPION) (ETERNALROMANCE) (ETERNALSYNERGY) (WannaCry) (EternalRocks) (Petya) - Nessus

High   Plugin ID: 97737

This page contains detailed information about the MS17-010: Security Update for Microsoft Windows SMB Server (4013389) (ETERNALBLUE) (ETERNALCHAMPION) (ETERNALROMANCE) (ETERNALSYNERGY) (WannaCry) (EternalRocks) (Petya) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 97737
Name: MS17-010: Security Update for Microsoft Windows SMB Server (4013389) (ETERNALBLUE) (ETERNALCHAMPION) (ETERNALROMANCE) (ETERNALSYNERGY) (WannaCry) (EternalRocks) (Petya)
Filename: smb_nt_ms17-010.nasl
Vulnerability Published: 2017-03-14
This Plugin Published: 2017-03-15
Last Modification Time: 2022-04-07
Plugin Version: 1.29
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: 2017-03-14
Patch Published: 2017-03-14
CVE [?]: CVE-2017-0143, CVE-2017-0144, CVE-2017-0145, CVE-2017-0146, CVE-2017-0147, CVE-2017-0148
CPE [?]: cpe:/o:microsoft:windows
Exploited by Malware: True
In the News: True

Synopsis

The remote Windows host is affected by multiple vulnerabilities.

Description

The remote Windows host is missing a security update. It is, therefore, affected by the following vulnerabilities :

- Multiple remote code execution vulnerabilities exist in Microsoft Server Message Block 1.0 (SMBv1) due to improper handling of certain requests. An unauthenticated, remote attacker can exploit these vulnerabilities, via a specially crafted packet, to execute arbitrary code. (CVE-2017-0143, CVE-2017-0144, CVE-2017-0145, CVE-2017-0146, CVE-2017-0148)

- An information disclosure vulnerability exists in Microsoft Server Message Block 1.0 (SMBv1) due to improper handling of certain requests. An unauthenticated, remote attacker can exploit this, via a specially crafted packet, to disclose sensitive information. (CVE-2017-0147)

ETERNALBLUE, ETERNALCHAMPION, ETERNALROMANCE, and ETERNALSYNERGY are four of multiple Equation Group vulnerabilities and exploits disclosed on 2017/04/14 by a group known as the Shadow Brokers. WannaCry / WannaCrypt is a ransomware program utilizing the ETERNALBLUE exploit, and EternalRocks is a worm that utilizes seven Equation Group vulnerabilities. Petya is a ransomware program that first utilizes CVE-2017-0199, a vulnerability in Microsoft Office, and then spreads via ETERNALBLUE.

Solution

Microsoft has released a set of patches for Windows Vista, 2008, 7, 2008 R2, 2012, 8.1, RT 8.1, 2012 R2, 10, and 2016. Microsoft has also released emergency patches for Windows operating systems that are no longer supported, including Windows XP, 2003, and 8.

Public Exploits


Target Network Port(s): 139, 445
Target Asset(s): Host/patch_management_checks
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub, Immunity Canvas, Core Impact)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the MS17-010: Security Update for Microsoft Windows SMB Server (4013389) (ETERNALBLUE) (ETERNALCHAMPION) (ETERNALROMANCE) (ETERNALSYNERGY) (WannaCry) (EternalRocks) (Petya) vulnerability:

  1. Metasploit: exploit/windows/smb/smb_doublepulsar_rce
    [SMB DOUBLEPULSAR Remote Code Execution]
  2. Metasploit: auxiliary/admin/smb/ms17_010_command
    [MS17-010 EternalRomance/EternalSynergy/EternalChampion SMB Remote Windows Command Execution]
  3. Metasploit: exploit/windows/smb/ms17_010_eternalblue
    [MS17-010 EternalBlue SMB Remote Windows Kernel Pool Corruption]
  4. Metasploit: exploit/windows/smb/ms17_010_eternalblue_win8
    [MS17-010 EternalBlue SMB Remote Windows Kernel Pool Corruption]
  5. Metasploit: exploit/windows/smb/ms17_010_psexec
    [MS17-010 EternalRomance/EternalSynergy/EternalChampion SMB Remote Windows Code Execution]
  6. Metasploit: auxiliary/scanner/smb/smb_ms17_010
    [MS17-010 SMB RCE Detection]
  7. Exploit-DB: exploits/windows/dos/41891.rb
    [EDB-41891: Microsoft Windows - SMB Remote Code Execution Scanner (MS17-010) (Metasploit)]
  8. Exploit-DB: exploits/windows/remote/43970.rb
    [EDB-43970: Microsoft Windows - 'EternalRomance'/'EternalSynergy'/'EternalChampion' SMB Remote Code Execution (Metasploit) (MS17-010)]
  9. Exploit-DB: exploits/windows_x86-64/remote/41987.py
    [EDB-41987: Microsoft Windows Server 2008 R2 (x64) - 'SrvOs2FeaToNt' SMB Remote Code Execution (MS17-010)]
  10. Exploit-DB: exploits/windows/remote/47456.rb
    [EDB-47456: DOUBLEPULSAR - Payload Execution and Neutralization (Metasploit)]
  11. GitHub: https://github.com/3hydraking/MS17-010_CVE-2017-0143
    [CVE-2017-0143]
  12. GitHub: https://github.com/4n0nym0u5dk/MS17-010_CVE-2017-0143
    [CVE-2017-0143]
  13. GitHub: https://github.com/6A0BCD80/Etern-blue-Windows-7-Checker
    [CVE-2017-0143: This would basically send smb1 (not smb2) packets to determine if a machine is ...]
  14. GitHub: https://github.com/Al1ex/WindowsElevation
    [CVE-2017-0143]
  15. GitHub: https://github.com/ArcadeHustle/X3_USB_softmod
    [CVE-2017-0143]
  16. GitHub: https://github.com/Ascotbe/Kernelhub
    [CVE-2017-0143]
  17. GitHub: https://github.com/Cyberwatch/cyberwatch_api_powershell
    [CVE-2017-0143]
  18. GitHub: https://github.com/ErdemOzgen/ActiveDirectoryAttacks
    [CVE-2017-0143]
  19. GitHub: https://github.com/HacTF/poc--exp
    [CVE-2017-0143]
  20. GitHub: https://github.com/Jean-Francois-C/Boot2root-CTFs-Writeups
    [CVE-2017-0143]
  21. GitHub: https://github.com/Kiz619ao630/StepwisePolicy3
    [CVE-2017-0143]
  22. GitHub: https://github.com/NatteeSetobol/Etern-blue-Windows-7-Checker
    [CVE-2017-0143: Eternal Blue is a well known SMB expliot created by the NSA to attack various ...]
  23. GitHub: https://github.com/Nieuport/Active-Directory-Kill-Chain-Attack-Defense
    [CVE-2017-0143]
  24. GitHub: https://github.com/PWN-Kingdom/Test_Tasks
    [CVE-2017-0143]
  25. GitHub: https://github.com/RodrigoVarasLopez/Download-Scanners-from-Nessus-8.7-using-the-API
    [CVE-2017-0143]
  26. GitHub: https://github.com/R-Vision/ms17-010
    [CVE-2017-0143]
  27. GitHub: https://github.com/SexyBeast233/SecBooks
    [CVE-2017-0143]
  28. GitHub: https://github.com/androidkey/MS17-011
    [CVE-2017-0143]
  29. GitHub: https://github.com/cb4cb4/EternalBlue-EK-Auto-Mode
    [CVE-2017-0143]
  30. GitHub: https://github.com/cb4cb4/EternalBlue-EK-Manual-Mode
    [CVE-2017-0143]
  31. GitHub: https://github.com/ceskillets/DCV-Predefined-Log-Filter-of-Specific-CVE-of-EternalBlue-and-BlueKeep-with-Auto-Tag-
    [CVE-2017-0143]
  32. GitHub: https://github.com/chaao195/EBEKv2.0
    [CVE-2017-0143]
  33. GitHub: https://github.com/czq945659538/-study
    [CVE-2017-0143]
  34. GitHub: https://github.com/ericjiang97/SecScripts
    [CVE-2017-0143]
  35. GitHub: https://github.com/geeksniper/active-directory-pentest
    [CVE-2017-0143]
  36. GitHub: https://github.com/gwyomarch/Legacy-HTB-Writeup-FR
    [CVE-2017-0143]
  37. GitHub: https://github.com/homjxi0e/Script-nmap-scan-ms17-010
    [CVE-2017-0143]
  38. GitHub: https://github.com/ihebski/A-Red-Teamer-diaries
    [CVE-2017-0143]
  39. GitHub: https://github.com/infosecn1nja/AD-Attack-Defense
    [CVE-2017-0143]
  40. GitHub: https://github.com/jeredbare/ms17-010_to_slack
    [CVE-2017-0143]
  41. GitHub: https://github.com/k4u5h41/MS17-010_CVE-2017-0143
    [CVE-2017-0143]
  42. GitHub: https://github.com/mishmashclone/infosecn1nja-AD-Attack-Defense
    [CVE-2017-0143]
  43. GitHub: https://github.com/mynameisv/MMSBGA
    [CVE-2017-0143]
  44. GitHub: https://github.com/notsag-dev/htb-legacy
    [CVE-2017-0143]
  45. GitHub: https://github.com/rosonsec/Exploits
    [CVE-2017-0143]
  46. GitHub: https://github.com/superhero1/OSCP-Prep
    [CVE-2017-0143]
  47. GitHub: https://github.com/tataev/Security
    [CVE-2017-0143]
  48. GitHub: https://github.com/uroboros-security/SMB-CVE
    [CVE-2017-0143]
  49. GitHub: https://github.com/wateroot/poc-exp
    [CVE-2017-0143]
  50. GitHub: https://github.com/wrlu/Vulnerabilities
    [CVE-2017-0143]
  51. GitHub: https://github.com/xiaoy-sec/Pentest_Note
    [CVE-2017-0143]
  52. GitHub: https://github.com/ycdxsb/Exploits
    [CVE-2017-0143]
  53. GitHub: https://github.com/ycdxsb/WindowsPrivilegeEscalation
    [CVE-2017-0143]
  54. GitHub: https://github.com/zhang040723/web
    [CVE-2017-0143]
  55. GitHub: https://github.com/zimmel15/HTBBlueWriteup
    [CVE-2017-0143]
  56. GitHub: https://github.com/61106960/adPEAS
    [CVE-2017-0144]
  57. GitHub: https://github.com/Ali-Imangholi/EternalBlueTrojan
    [CVE-2017-0144: EternalBlueTrojan(CVE-2017-0144)]
  58. GitHub: https://github.com/Astrogeorgeonethree/Starred
    [CVE-2017-0144]
  59. GitHub: https://github.com/Cyberwatch/cyberwatch_api_powershell
    [CVE-2017-0144]
  60. GitHub: https://github.com/EEsshq/CVE-2017-0144---EtneralBlue-MS17-010-Remote-Code-Execution
    [CVE-2017-0144]
  61. GitHub: https://github.com/ErdemOzgen/ActiveDirectoryAttacks
    [CVE-2017-0144]
  62. GitHub: https://github.com/JeffEmrys/termux-
    [CVE-2017-0144]
  63. GitHub: https://github.com/Kiz619ao630/StepwisePolicy3
    [CVE-2017-0144]
  64. GitHub: https://github.com/Nieuport/Active-Directory-Kill-Chain-Attack-Defense
    [CVE-2017-0144]
  65. GitHub: https://github.com/PWN-Kingdom/Test_Tasks
    [CVE-2017-0144]
  66. GitHub: https://github.com/Project-WARMIND/Exploit-Modules
    [CVE-2017-0144]
  67. GitHub: https://github.com/RodrigoVarasLopez/Download-Scanners-from-Nessus-8.7-using-the-API
    [CVE-2017-0144]
  68. GitHub: https://github.com/R-Vision/ms17-010
    [CVE-2017-0144]
  69. GitHub: https://github.com/ShubhamGuptaIN/WannaCry-ransomware-attack-Virus
    [CVE-2017-0144]
  70. GitHub: https://github.com/androidkey/MS17-011
    [CVE-2017-0144]
  71. GitHub: https://github.com/cb4cb4/EternalBlue-EK-Auto-Mode
    [CVE-2017-0144]
  72. GitHub: https://github.com/cb4cb4/EternalBlue-EK-Manual-Mode
    [CVE-2017-0144]
  73. GitHub: https://github.com/ceskillets/DCV-Predefined-Log-Filter-of-Specific-CVE-of-EternalBlue-and-BlueKeep-with-Auto-Tag-
    [CVE-2017-0144]
  74. GitHub: https://github.com/chaao195/EBEKv2.0
    [CVE-2017-0144]
  75. GitHub: https://github.com/ericjiang97/SecScripts
    [CVE-2017-0144]
  76. GitHub: https://github.com/fernandopaezmartin/SAD_2021--Metasploit
    [CVE-2017-0144]
  77. GitHub: https://github.com/geeksniper/active-directory-pentest
    [CVE-2017-0144]
  78. GitHub: https://github.com/infosecn1nja/AD-Attack-Defense
    [CVE-2017-0144]
  79. GitHub: https://github.com/kimocoder/eternalblue
    [CVE-2017-0144]
  80. GitHub: https://github.com/mishmashclone/infosecn1nja-AD-Attack-Defense
    [CVE-2017-0144]
  81. GitHub: https://github.com/tataev/Security
    [CVE-2017-0144]
  82. GitHub: https://github.com/uroboros-security/SMB-CVE
    [CVE-2017-0144]
  83. GitHub: https://github.com/wuvel/TryHackMe
    [CVE-2017-0144]
  84. GitHub: https://github.com/ycdxsb/WindowsPrivilegeEscalation
    [CVE-2017-0144]
  85. GitHub: https://github.com/zorikcherfas/eternalblue_linux_cpp
    [CVE-2017-0144]
  86. GitHub: https://github.com/Astrogeorgeonethree/Starred
    [CVE-2017-0145]
  87. GitHub: https://github.com/Cyberwatch/cyberwatch_api_powershell
    [CVE-2017-0145]
  88. GitHub: https://github.com/ErdemOzgen/ActiveDirectoryAttacks
    [CVE-2017-0145]
  89. GitHub: https://github.com/JeffEmrys/termux-
    [CVE-2017-0145]
  90. GitHub: https://github.com/Kiz619ao630/StepwisePolicy3
    [CVE-2017-0145]
  91. GitHub: https://github.com/Nieuport/Active-Directory-Kill-Chain-Attack-Defense
    [CVE-2017-0145]
  92. GitHub: https://github.com/RodrigoVarasLopez/Download-Scanners-from-Nessus-8.7-using-the-API
    [CVE-2017-0145]
  93. GitHub: https://github.com/R-Vision/ms17-010
    [CVE-2017-0145]
  94. GitHub: https://github.com/androidkey/MS17-011
    [CVE-2017-0145]
  95. GitHub: https://github.com/cb4cb4/EternalBlue-EK-Auto-Mode
    [CVE-2017-0145]
  96. GitHub: https://github.com/cb4cb4/EternalBlue-EK-Manual-Mode
    [CVE-2017-0145]
  97. GitHub: https://github.com/ceskillets/DCV-Predefined-Log-Filter-of-Specific-CVE-of-EternalBlue-and-BlueKeep-with-Auto-Tag-
    [CVE-2017-0145]
  98. GitHub: https://github.com/chaao195/EBEKv2.0
    [CVE-2017-0145]
  99. GitHub: https://github.com/ericjiang97/SecScripts
    [CVE-2017-0145]
  100. GitHub: https://github.com/geeksniper/active-directory-pentest
    [CVE-2017-0145]
  101. GitHub: https://github.com/infosecn1nja/AD-Attack-Defense
    [CVE-2017-0145]
  102. GitHub: https://github.com/mishmashclone/infosecn1nja-AD-Attack-Defense
    [CVE-2017-0145]
  103. GitHub: https://github.com/tataev/Security
    [CVE-2017-0145]
  104. GitHub: https://github.com/uroboros-security/SMB-CVE
    [CVE-2017-0145]
  105. GitHub: https://github.com/Cyberwatch/cyberwatch_api_powershell
    [CVE-2017-0146]
  106. GitHub: https://github.com/ErdemOzgen/ActiveDirectoryAttacks
    [CVE-2017-0146]
  107. GitHub: https://github.com/Kiz619ao630/StepwisePolicy3
    [CVE-2017-0146]
  108. GitHub: https://github.com/Nieuport/Active-Directory-Kill-Chain-Attack-Defense
    [CVE-2017-0146]
  109. GitHub: https://github.com/RodrigoVarasLopez/Download-Scanners-from-Nessus-8.7-using-the-API
    [CVE-2017-0146]
  110. GitHub: https://github.com/R-Vision/ms17-010
    [CVE-2017-0146]
  111. GitHub: https://github.com/Urahara3389/SmbtouchBatchScan
    [CVE-2017-0146]
  112. GitHub: https://github.com/androidkey/MS17-011
    [CVE-2017-0146]
  113. GitHub: https://github.com/cb4cb4/EternalBlue-EK-Auto-Mode
    [CVE-2017-0146]
  114. GitHub: https://github.com/cb4cb4/EternalBlue-EK-Manual-Mode
    [CVE-2017-0146]
  115. GitHub: https://github.com/ceskillets/DCV-Predefined-Log-Filter-of-Specific-CVE-of-EternalBlue-and-BlueKeep-with-Auto-Tag-
    [CVE-2017-0146]
  116. GitHub: https://github.com/chaao195/EBEKv2.0
    [CVE-2017-0146]
  117. GitHub: https://github.com/ericjiang97/SecScripts
    [CVE-2017-0146]
  118. GitHub: https://github.com/geeksniper/active-directory-pentest
    [CVE-2017-0146]
  119. GitHub: https://github.com/infosecn1nja/AD-Attack-Defense
    [CVE-2017-0146]
  120. GitHub: https://github.com/mishmashclone/infosecn1nja-AD-Attack-Defense
    [CVE-2017-0146]
  121. GitHub: https://github.com/tataev/Security
    [CVE-2017-0146]
  122. GitHub: https://github.com/uroboros-security/SMB-CVE
    [CVE-2017-0146]
  123. GitHub: https://github.com/ycdxsb/WindowsPrivilegeEscalation
    [CVE-2017-0146]
  124. GitHub: https://github.com/Kiz619ao630/StepwisePolicy3
    [CVE-2017-0147]
  125. GitHub: https://github.com/Malware-S/Exploit-Win32.CVE-2017-0147.A
    [CVE-2017-0147: the name of virus is the detection of microsoft defender, is the tipic antivirus]
  126. GitHub: https://github.com/RobertoLeonFR-ES/Exploit-Win32.CVE-2017-0147.A
    [CVE-2017-0147: The name of virus is the detection of microsoft defender, is the tipic antivirus]
  127. GitHub: https://github.com/RodrigoVarasLopez/Download-Scanners-from-Nessus-8.7-using-the-API
    [CVE-2017-0147]
  128. GitHub: https://github.com/R-Vision/ms17-010
    [CVE-2017-0147]
  129. GitHub: https://github.com/Urahara3389/SmbtouchBatchScan
    [CVE-2017-0147]
  130. GitHub: https://github.com/androidkey/MS17-011
    [CVE-2017-0147]
  131. GitHub: https://github.com/cb4cb4/EternalBlue-EK-Auto-Mode
    [CVE-2017-0147]
  132. GitHub: https://github.com/cb4cb4/EternalBlue-EK-Manual-Mode
    [CVE-2017-0147]
  133. GitHub: https://github.com/ceskillets/DCV-Predefined-Log-Filter-of-Specific-CVE-of-EternalBlue-and-BlueKeep-with-Auto-Tag-
    [CVE-2017-0147]
  134. GitHub: https://github.com/chaao195/EBEKv2.0
    [CVE-2017-0147]
  135. GitHub: https://github.com/ericjiang97/SecScripts
    [CVE-2017-0147]
  136. GitHub: https://github.com/uroboros-security/SMB-CVE
    [CVE-2017-0147]
  137. GitHub: https://github.com/Cyberwatch/cyberwatch_api_powershell
    [CVE-2017-0148]
  138. GitHub: https://github.com/ErdemOzgen/ActiveDirectoryAttacks
    [CVE-2017-0148]
  139. GitHub: https://github.com/Kiz619ao630/StepwisePolicy3
    [CVE-2017-0148]
  140. GitHub: https://github.com/Nieuport/Active-Directory-Kill-Chain-Attack-Defense
    [CVE-2017-0148]
  141. GitHub: https://github.com/RodrigoVarasLopez/Download-Scanners-from-Nessus-8.7-using-the-API
    [CVE-2017-0148]
  142. GitHub: https://github.com/R-Vision/ms17-010
    [CVE-2017-0148]
  143. GitHub: https://github.com/androidkey/MS17-011
    [CVE-2017-0148]
  144. GitHub: https://github.com/cb4cb4/EternalBlue-EK-Auto-Mode
    [CVE-2017-0148]
  145. GitHub: https://github.com/cb4cb4/EternalBlue-EK-Manual-Mode
    [CVE-2017-0148]
  146. GitHub: https://github.com/ceskillets/DCV-Predefined-Log-Filter-of-Specific-CVE-of-EternalBlue-and-BlueKeep-with-Auto-Tag-
    [CVE-2017-0148]
  147. GitHub: https://github.com/chaao195/EBEKv2.0
    [CVE-2017-0148]
  148. GitHub: https://github.com/ericjiang97/SecScripts
    [CVE-2017-0148]
  149. GitHub: https://github.com/geeksniper/active-directory-pentest
    [CVE-2017-0148]
  150. GitHub: https://github.com/infosecn1nja/AD-Attack-Defense
    [CVE-2017-0148]
  151. GitHub: https://github.com/mishmashclone/infosecn1nja-AD-Attack-Defense
    [CVE-2017-0148]
  152. GitHub: https://github.com/tataev/Security
    [CVE-2017-0148]
  153. GitHub: https://github.com/trend-anz/Deep-Security-Open-Patch
    [CVE-2017-0148]
  154. GitHub: https://github.com/uroboros-security/SMB-CVE
    [CVE-2017-0148]
  155. GitHub: https://github.com/ycdxsb/WindowsPrivilegeEscalation
    [CVE-2017-0148]
  156. GitHub: https://github.com/valarauco/wannafind
    [CVE-2017-0143: Simple script using nmap to detect CVE-2017-0143 MS17-010 in your network]
  157. GitHub: https://github.com/peterpt/eternal_scanner
    [CVE-2017-0144: An internet scanner for exploit CVE-2017-0144 (Eternal Blue) & CVE-2017-0145 ...]
  158. GitHub: https://github.com/MelonSmasher/chef_tissues
    [CVE-2017-0145: Install patch for CVE-2017-0145 AKA WannaCry.]
  159. GitHub: https://github.com/peterpt/eternal_scanner
    [CVE-2017-0145: An internet scanner for exploit CVE-2017-0144 (Eternal Blue) & CVE-2017-0145 ...]
  160. Immunity Canvas: CANVAS

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-2017-0148
CVSS V2 Vector: AV:N/AC:M/Au:N/C:C/I:C/A:C/E:H/RL:OF/RC:C
CVSS Base Score:9.3 (High)
Impact Subscore:10.0
Exploitability Subscore:8.6
CVSS Temporal Score:8.1 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.1 (High)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:8.1 (High)
Impact Subscore:5.9
Exploitability Subscore:2.2
CVSS Temporal Score:7.7 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:7.7 (High)
STIG Severity [?]: I
STIG Risk Rating: High

Go back to menu.

Plugin Source


This is the smb_nt_ms17-010.nasl nessus plugin source code. This script is Copyright (C) 2017-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(97737);
  script_version("1.29");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/07");

  script_cve_id(
    "CVE-2017-0143",
    "CVE-2017-0144",
    "CVE-2017-0145",
    "CVE-2017-0146",
    "CVE-2017-0147",
    "CVE-2017-0148"
  );
  script_bugtraq_id(
    96703,
    96704,
    96705,
    96706,
    96707,
    96709
  );
  script_xref(name:"MSFT", value:"MS17-010");
  script_xref(name:"MSKB", value:"4012212");
  script_xref(name:"MSKB", value:"4012213");
  script_xref(name:"MSKB", value:"4012214");
  script_xref(name:"MSKB", value:"4012215");
  script_xref(name:"MSKB", value:"4012216");
  script_xref(name:"MSKB", value:"4012217");
  script_xref(name:"MSKB", value:"4012606");
  script_xref(name:"MSKB", value:"4013198");
  script_xref(name:"MSKB", value:"4013429");
  script_xref(name:"MSKB", value:"4012598");
  script_xref(name:"IAVA", value:"2017-A-0065");
  script_xref(name:"EDB-ID", value:"41891");
  script_xref(name:"EDB-ID", value:"41987");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/05/03");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/08/10");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/04/15");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/04/27");

  script_name(english:"MS17-010: Security Update for Microsoft Windows SMB Server (4013389) (ETERNALBLUE) (ETERNALCHAMPION) (ETERNALROMANCE) (ETERNALSYNERGY) (WannaCry) (EternalRocks) (Petya)");

  script_set_attribute(attribute:"synopsis", value:
"The remote Windows host is affected by multiple vulnerabilities.");
  script_set_attribute(attribute:"description", value:
"The remote Windows host is missing a security update. It is,
therefore, affected by the following vulnerabilities :

  - Multiple remote code execution vulnerabilities exist in
    Microsoft Server Message Block 1.0 (SMBv1) due to
    improper handling of certain requests. An
    unauthenticated, remote attacker can exploit these
    vulnerabilities, via a specially crafted packet, to
    execute arbitrary code. (CVE-2017-0143, CVE-2017-0144,
    CVE-2017-0145, CVE-2017-0146, CVE-2017-0148)

  - An information disclosure vulnerability exists in
    Microsoft Server Message Block 1.0 (SMBv1) due to
    improper handling of certain requests. An
    unauthenticated, remote attacker can exploit this, via a
    specially crafted packet, to disclose sensitive
    information. (CVE-2017-0147)

ETERNALBLUE, ETERNALCHAMPION, ETERNALROMANCE, and ETERNALSYNERGY are
four of multiple Equation Group vulnerabilities and exploits disclosed
on 2017/04/14 by a group known as the Shadow Brokers. WannaCry /
WannaCrypt is a ransomware program utilizing the ETERNALBLUE exploit,
and EternalRocks is a worm that utilizes seven Equation Group
vulnerabilities. Petya is a ransomware program that first utilizes
CVE-2017-0199, a vulnerability in Microsoft Office, and then spreads
via ETERNALBLUE.");
  script_set_attribute(attribute:"see_also", value:"https://docs.microsoft.com/en-us/security-updates/SecurityBulletins/2017/ms17-010");
  # https://blogs.technet.microsoft.com/msrc/2017/04/14/protecting-customers-and-evaluating-risk/
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?321523eb");
  # https://cloudblogs.microsoft.com/microsoftsecure/2017/05/12/wannacrypt-ransomware-worm-targets-out-of-date-systems/?source=mmpc
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?065561d0");
  # https://blogs.technet.microsoft.com/msrc/2017/05/12/customer-guidance-for-wannacrypt-attacks/
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?d9f569cf");
  script_set_attribute(attribute:"see_also", value:"https://github.com/stamparm/EternalRocks/");
  # https://www.tenable.com/blog/petyanotpetya-ransomware-detection-for-the-modern-enterprise
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?59db5b5b");
  script_set_attribute(attribute:"solution", value:
"Microsoft has released a set of patches for Windows Vista, 2008, 7,
2008 R2, 2012, 8.1, RT 8.1, 2012 R2, 10, and 2016. Microsoft has also
released emergency patches for Windows operating systems that are no
longer supported, including Windows XP, 2003, and 8.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/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:H/PR:N/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-2017-0148");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"exploit_framework_core", value:"true");
  script_set_attribute(attribute:"exploited_by_malware", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'SMB DOUBLEPULSAR Remote Code Execution');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
  script_set_attribute(attribute:"canvas_package", value:"CANVAS");
  script_set_attribute(attribute:"in_the_news", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2017/03/14");
  script_set_attribute(attribute:"patch_publication_date", value:"2017/03/14");
  script_set_attribute(attribute:"plugin_publication_date", value:"2017/03/15");

  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) 2017-2022 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("smb_hotfixes.nasl", "ms_bulletin_checks_possible.nasl", "smb_check_rollup.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 = 'MS17-010';
kbs = make_list(
  "4012212",
  "4012213",
  "4012214",
  "4012215",
  "4012216",
  "4012217",
  "4012606",
  "4013198",
  "4013429",
  "4012598"
);

vuln = 0;

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(xp:'3', win2003:'2',vista:'2', win7:'1', win8:'0', win81:'0', win10:'0') <= 0)
  audit(AUDIT_OS_SP_NOT_VULN);

if (hotfix_check_server_nano() == 1) audit(AUDIT_OS_NOT, "a currently supported OS (Windows Nano Server)");

productname = get_kb_item_or_exit("SMB/ProductName", exit_code:1);
if ("Windows Embedded" >< productname)
  exit(0, "Nessus does not support bulletin / patch checks for Windows Embedded.");

share = hotfix_get_systemdrive(as_share:TRUE, exit_on_fail:TRUE);
if (!is_accessible_share(share:share))
  audit(AUDIT_SHARE_FAIL, share);

if (
  ##############
  ## MAY 2017 ##
  ##############

  # Windows XP SP2
  hotfix_is_vulnerable(os:"5.2", sp:2, file:"srv.sys", version:"5.2.3790.6021", min_version:"5.2.3790.3000", dir:"\system32\drivers", bulletin:bulletin, kb:"4012598", arch:"x64") ||
  # Windows XP SP3
  hotfix_is_vulnerable(os:"5.1", sp:3, file:"srv.sys", version:"5.1.2600.7208", min_version:"5.1.2600.5000", dir:"\system32\drivers", bulletin:bulletin, kb:"4012598", arch:"x86") ||
  # Windows Server 2003 SP2
  hotfix_is_vulnerable(os:"5.2", sp:2, file:"srv.sys", version:"5.2.3790.6021", min_version:"5.2.3790.3000", dir:"\system32\drivers", bulletin:bulletin, kb:"4012598") ||
  # Windows 8
  (
    ("Windows 8" >< productname && "Windows 8.1" >!< productname && "2012" >!< productname)
    &&
    hotfix_is_vulnerable(os:"6.2", sp:0, file:"srv.sys", version:"6.2.9200.22099", min_version:"6.2.9200.16000", dir:"\system32\drivers", bulletin:bulletin, kb:"4012598")
  )
  ||
  
  # Windows Server 2012
  (
    "Windows 8" >!< productname
    &&
    hotfix_is_vulnerable(os:"6.2", sp:0, file:"srv.sys", version:"6.2.9200.22099", min_version:"6.2.9200.16000", dir:"\system32\drivers", bulletin:bulletin, kb:"4019213")
  ) ||

  # Windows 8.1 / Windows Server 2012 R2
    hotfix_is_vulnerable(os:"6.3", sp:0, file:"srv.sys", version:"6.2.9200.22137", min_version:"6.2.9200.16000", dir:"\system32\drivers", bulletin:bulletin, kb:"4019213") ||

  ##############
  ## MAR 2017 ##
  ##############

  # Windows Vista Service Pack 2 / Windows Server 2008
  hotfix_is_vulnerable(os:"6.0", sp:2, file:"srv.sys", version:"6.0.6002.19743", min_version:"6.0.6002.18000", dir:"\system32\drivers", bulletin:bulletin, kb:"4012598") ||
  hotfix_is_vulnerable(os:"6.0", sp:2, file:"srv.sys", version:"6.0.6002.24067", min_version:"6.0.6002.20000", dir:"\system32\drivers", bulletin:bulletin, kb:"4012598") ||

  # Windows 7 / Windows Server 2008 R2
  smb_check_rollup(os:"6.1", sp:1, rollup_date:"03_2017", bulletin:bulletin, rollup_kb_list:make_list(4012212, 4012215)) ||

  # Windows Server 2012
  (
    "Windows 8" >!< productname
    &&
    smb_check_rollup(os:"6.2", sp:0, rollup_date:"03_2017", bulletin:bulletin, rollup_kb_list:make_list(4012214, 4012217))
  ) ||

  # Windows 8.1 / Windows Server 2012 R2
  smb_check_rollup(os:"6.3", sp:0, rollup_date:"03_2017", bulletin:bulletin, rollup_kb_list:make_list(4012213, 4012216)) ||

  # Windows 10
  smb_check_rollup(os:"10", sp:0, os_build:"10240", rollup_date:"03_2017", bulletin:bulletin, rollup_kb_list:make_list(4012606)) ||

  # Windows 10 1511
  smb_check_rollup(os:"10", sp:0, os_build:"10586", rollup_date:"03_2017", bulletin:bulletin, rollup_kb_list:make_list(4013198)) ||

  # Windows 10 1607 / Windows Server 2016
  smb_check_rollup(os:"10", sp:0, os_build:"14393", rollup_date:"03_2017", bulletin:bulletin, rollup_kb_list:make_list(4013429))
)
{
  set_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_ms17-010.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\smb_nt_ms17-010.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/smb_nt_ms17-010.nasl

Go back to menu.

How to Run


Here is how to run the MS17-010: Security Update for Microsoft Windows SMB Server (4013389) (ETERNALBLUE) (ETERNALCHAMPION) (ETERNALROMANCE) (ETERNALSYNERGY) (WannaCry) (EternalRocks) (Petya) 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 MS17-010: Security Update for Microsoft Windows SMB Server (4013389) (ETERNALBLUE) (ETERNALCHAMPION) (ETERNALROMANCE) (ETERNALSYNERGY) (WannaCry) (EternalRocks) (Petya) plugin ID 97737.
  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_ms17-010.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a smb_nt_ms17-010.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_ms17-010.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_ms17-010.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: MSKB | Microsoft Knowledge Base: MSFT | Microsoft Security Bulletin:
  • MS17-010
IAVA | Information Assurance Vulnerability Alert:
  • 2017-A-0065
See also: Similar and related Nessus plugins:
  • 97833 - MS17-010: Security Update for Microsoft Windows SMB Server (4013389) (ETERNALBLUE) (ETERNALCHAMPION) (ETERNALROMANCE) (ETERNALSYNERGY) (WannaCry) (EternalRocks) (Petya) (uncredentialed check)
  • 99439 - SMB Server DOUBLEPULSAR Backdoor / Implant Detection (EternalRocks)
  • 96392 - MS17-003: Security Update for Adobe Flash Player (3214628)
  • 97729 - MS17-006: Cumulative Security Update for Internet Explorer (4013073)
  • 97730 - MS17-007: Cumulative Security Update for Microsoft Edge (4013071)
  • 97745 - MS17-008: Security Update for Windows Hyper-V (4013082)
  • 97732 - MS17-011: Security Update for Microsoft Uniscribe (4013076)
  • 97743 - MS17-012: Security Update for Microsoft Windows (4013078)
  • 97794 - MS17-013: Security Update for Microsoft Graphics Component (4013075)
  • 97733 - MS17-017: Security Update for Windows Kernel (4013081)
  • 97734 - MS17-020: Security Update for Windows DVD Maker (3208223)
  • 97735 - MS17-023: Security Update for Adobe Flash Player (4014329)
  • 99304 - Windows 7 and Windows 2008 R2 April 2017 Security Updates (Petya)
  • 99285 - Windows Server 2012 April 2017 Security Updates (Petya)
  • 99314 - Security Update for Microsoft Office Products (April 2017) (Petya)

Version


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

Go back to menu.