Potential exposure to Hafnium Microsoft Exchange targeting - Nessus

High   Plugin ID: 147193

This page contains detailed information about the Potential exposure to Hafnium Microsoft Exchange targeting Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 147193
Name: Potential exposure to Hafnium Microsoft Exchange targeting
Filename: hafnium_ioc_detect.nbin
Vulnerability Published: 2021-03-02
This Plugin Published: 2021-03-08
Last Modification Time: 2022-05-03
Plugin Version: 1.38
Plugin Type: local
Plugin Family: Windows
Dependencies: microsoft_exchange_installed.nbin
Required KB Items [?]: installed_sw/Microsoft Exchange, SMB/Registry/Enumerated

Vulnerability Information


Severity: High
Vulnerability Published: 2021-03-02
Patch Published: 2021-03-02
CVE [?]: CVE-2021-26857, CVE-2021-26858, CVE-2021-27065
CPE [?]: cpe:/a:microsoft:exchange_server
Exploited by Malware: True

Synopsis

Detects potential IOCs for Hafnium

Description

This plugin detects the potential presence of a web shell in selected directories and this can be indicative that the host might have been targeted in the Hafnium campaign. It is recommended that the results are manually verified and appropriate remediation actions taken.

Note that Nessus has not tested for this issue but has instead looked for .aspx files that could potentially indicate compromise.

Solution

Microsoft has released security updates KB5000978 and KB5000871 to address this issue

Public Exploits


Target Network Port(s): 139, 445
Target Asset(s): N/A
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Potential exposure to Hafnium Microsoft Exchange targeting vulnerability:

  1. Metasploit: exploit/windows/http/exchange_proxylogon_rce
    [Microsoft Exchange ProxyLogon RCE]
  2. Metasploit: auxiliary/scanner/http/exchange_proxylogon
    [Microsoft Exchange ProxyLogon Scanner]
  3. Exploit-DB: exploits/windows/webapps/49895.rb
    [EDB-49895: Microsoft Exchange 2019 - Unauthenticated Email Download (Metasploit)]
  4. GitHub: https://github.com/00011100/HAFHunt
    [CVE-2021-26857]
  5. GitHub: https://github.com/Ahsanzia/Exchange-Exploit
    [CVE-2021-26857]
  6. GitHub: https://github.com/Astrogeorgeonethree/Starred
    [CVE-2021-26857]
  7. GitHub: https://github.com/Mr-xn/Penetration_Testing_POC
    [CVE-2021-26857]
  8. GitHub: https://github.com/NTUTtopicBryan/NTUT_HomeWork
    [CVE-2021-26857]
  9. GitHub: https://github.com/Seeps/shellcollector
    [CVE-2021-26857]
  10. GitHub: https://github.com/SpearTip-Cyber-Counterintelligence/Zirconium
    [CVE-2021-26857]
  11. GitHub: https://github.com/WiredPulse/Invoke-HAFNIUMCheck.ps1
    [CVE-2021-26857]
  12. GitHub: https://github.com/bhassani/Recent-CVE
    [CVE-2021-26857]
  13. GitHub: https://github.com/cyware-labs/Operation-Exchange-Marauder
    [CVE-2021-26857]
  14. GitHub: https://github.com/doris0213/Proxy-Logon
    [CVE-2021-26857]
  15. GitHub: https://github.com/herwonowr/exprolog
    [CVE-2021-26857]
  16. GitHub: https://github.com/mysticwayfarer1/Exchange-HAFNIUM
    [CVE-2021-26857]
  17. GitHub: https://github.com/netlas-io/MsExchangeServerVersionCheck
    [CVE-2021-26857]
  18. GitHub: https://github.com/vehemont/nvdlib
    [CVE-2021-26857]
  19. GitHub: https://github.com/00011100/HAFHunt
    [CVE-2021-26858]
  20. GitHub: https://github.com/Ahsanzia/Exchange-Exploit
    [CVE-2021-26858]
  21. GitHub: https://github.com/Astrogeorgeonethree/Starred
    [CVE-2021-26858]
  22. GitHub: https://github.com/Mr-xn/Penetration_Testing_POC
    [CVE-2021-26858]
  23. GitHub: https://github.com/NTUTtopicBryan/NTUT_HomeWork
    [CVE-2021-26858]
  24. GitHub: https://github.com/Securonix/sigma2snypr
    [CVE-2021-26858]
  25. GitHub: https://github.com/Seeps/shellcollector
    [CVE-2021-26858]
  26. GitHub: https://github.com/bhassani/Recent-CVE
    [CVE-2021-26858]
  27. GitHub: https://github.com/cyware-labs/Operation-Exchange-Marauder
    [CVE-2021-26858]
  28. GitHub: https://github.com/doris0213/Proxy-Logon
    [CVE-2021-26858]
  29. GitHub: https://github.com/herwonowr/exprolog
    [CVE-2021-26858]
  30. GitHub: https://github.com/mysticwayfarer1/Exchange-HAFNIUM
    [CVE-2021-26858]
  31. GitHub: https://github.com/netlas-io/MsExchangeServerVersionCheck
    [CVE-2021-26858]
  32. GitHub: https://github.com/vehemont/nvdlib
    [CVE-2021-26858]
  33. GitHub: https://github.com/00011100/HAFHunt
    [CVE-2021-27065]
  34. GitHub: https://github.com/Ahsanzia/Exchange-Exploit
    [CVE-2021-27065]
  35. GitHub: https://github.com/Astrogeorgeonethree/Starred
    [CVE-2021-27065]
  36. GitHub: https://github.com/FDlucifer/Proxy-Attackchain
    [CVE-2021-27065]
  37. GitHub: https://github.com/Mr-xn/Penetration_Testing_POC
    [CVE-2021-27065]
  38. GitHub: https://github.com/NTUTtopicBryan/NTUT_HomeWork
    [CVE-2021-27065]
  39. GitHub: https://github.com/Seeps/shellcollector
    [CVE-2021-27065]
  40. GitHub: https://github.com/SexyBeast233/SecBooks
    [CVE-2021-27065]
  41. GitHub: https://github.com/Udyz/Proxylogon
    [CVE-2021-27065]
  42. GitHub: https://github.com/ZephrFish/Exch-CVE-2021-26855
    [CVE-2021-27065]
  43. GitHub: https://github.com/bhassani/Recent-CVE
    [CVE-2021-27065]
  44. GitHub: https://github.com/boson87225/111
    [CVE-2021-27065]
  45. GitHub: https://github.com/charlottelatest/CVE-2021-26855
    [CVE-2021-27065]
  46. GitHub: https://github.com/cyware-labs/Operation-Exchange-Marauder
    [CVE-2021-27065]
  47. GitHub: https://github.com/doris0213/Proxy-Logon
    [CVE-2021-27065]
  48. GitHub: https://github.com/dwisiswant0/proxylogscan
    [CVE-2021-27065]
  49. GitHub: https://github.com/evilashz/ExchangeSSRFtoRCEExploit
    [CVE-2021-27065]
  50. GitHub: https://github.com/gobysec/Goby
    [CVE-2021-27065]
  51. GitHub: https://github.com/h4x0r-dz/CVE-2021-26855
    [CVE-2021-27065]
  52. GitHub: https://github.com/helsecert/2021-march-exchange
    [CVE-2021-27065]
  53. GitHub: https://github.com/herwonowr/exprolog
    [CVE-2021-27065]
  54. GitHub: https://github.com/hosch3n/ProxyLogon
    [CVE-2021-27065: CVE-2021-26855 & CVE-2021-27065]
  55. GitHub: https://github.com/hosch3n/ProxyVulns
    [CVE-2021-27065]
  56. GitHub: https://github.com/l3shyyy/ProxyLogon-Useful-PowershellScripts
    [CVE-2021-27065]
  57. GitHub: https://github.com/mysticwayfarer1/Exchange-HAFNIUM
    [CVE-2021-27065]
  58. GitHub: https://github.com/netlas-io/MsExchangeServerVersionCheck
    [CVE-2021-27065]
  59. GitHub: https://github.com/r0ckysec/CVE-2021-26855_Exchange
    [CVE-2021-27065]
  60. GitHub: https://github.com/raheel0x01/CVE-2021-26855
    [CVE-2021-27065]
  61. GitHub: https://github.com/raheel0x01/eeb927d1189ad44742095f58636483984bfbfa355f69f94439e276df306d9568
    [CVE-2021-27065: CVE-2021-26855, also known as Proxylogon, is a server-side request forgery (SSRF) ...]
  62. GitHub: https://github.com/seanjosee/NTUT_HOMEWORK
    [CVE-2021-27065]
  63. GitHub: https://github.com/srvaccount/CVE-2021-26855-PoC
    [CVE-2021-27065]
  64. GitHub: https://github.com/vehemont/nvdlib
    [CVE-2021-27065]
  65. GitHub: https://github.com/zhzyker/vulmap
    [CVE-2021-27065]
  66. GitHub: https://github.com/cert-lv/exchange_webshell_detection
    [CVE-2021-26857: Detect webshells dropped on Microsoft Exchange servers exploited through ...]
  67. GitHub: https://github.com/cryptolakk/ProxyLogon-Mass-RCE
    [CVE-2021-26857: Python for mass deploying payload on Microsoft Exchange Servers affected by ...]
  68. GitHub: https://github.com/DCScoder/Exchange_IOC_Hunter
    [CVE-2021-26857: CVE-2021-26855, CVE-2021-26857, CVE-2021-26858, CVE-2021-27065]
  69. GitHub: https://github.com/Immersive-Labs-Sec/ProxyLogon
    [CVE-2021-26857: Chaining CVE-2021-26855 and CVE-2021-26857 to exploit Microsoft Exchange]
  70. GitHub: https://github.com/SCS-Labs/HAFNIUM-Microsoft-Exchange-0day
    [CVE-2021-26857: CVE-2021-26855, CVE-2021-26857, CVE-2021-26858, CVE-2021-27065]
  71. GitHub: https://github.com/sgnls/exchange-0days-202103
    [CVE-2021-26857: IoC determination for exploitation of CVE-2021-26855, CVE-2021-26857, CVE-2021-26858 ...]
  72. GitHub: https://github.com/soteria-security/HAFNIUM-IOC
    [CVE-2021-26857: A PowerShell script to identify indicators of exploitation of CVE-2021-26855, ...]
  73. GitHub: https://github.com/Yt1g3r/CVE-2021-26855_SSRF
    [CVE-2021-26857: POC of CVE-2021-26855, CVE-2021-26857, CVE-2021-26858, and CVE-2021-26865, ...]
  74. GitHub: https://github.com/cert-lv/exchange_webshell_detection
    [CVE-2021-26858: Detect webshells dropped on Microsoft Exchange servers exploited through ...]
  75. GitHub: https://github.com/DCScoder/Exchange_IOC_Hunter
    [CVE-2021-26858: CVE-2021-26855, CVE-2021-26857, CVE-2021-26858, CVE-2021-27065]
  76. GitHub: https://github.com/SCS-Labs/HAFNIUM-Microsoft-Exchange-0day
    [CVE-2021-26858: CVE-2021-26855, CVE-2021-26857, CVE-2021-26858, CVE-2021-27065]
  77. GitHub: https://github.com/sgnls/exchange-0days-202103
    [CVE-2021-26858: IoC determination for exploitation of CVE-2021-26855, CVE-2021-26857, CVE-2021-26858 ...]
  78. GitHub: https://github.com/soteria-security/HAFNIUM-IOC
    [CVE-2021-26858: A PowerShell script to identify indicators of exploitation of CVE-2021-26855, ...]
  79. GitHub: https://github.com/Yt1g3r/CVE-2021-26855_SSRF
    [CVE-2021-26858: POC of CVE-2021-26855, CVE-2021-26857, CVE-2021-26858, and CVE-2021-26865, ...]
  80. GitHub: https://github.com/adamrpostjr/cve-2021-27065
    [CVE-2021-27065: Quick One Line Powershell scripts to detect for webshells, possible zips, and logs. ...]
  81. GitHub: https://github.com/cert-lv/exchange_webshell_detection
    [CVE-2021-27065: Detect webshells dropped on Microsoft Exchange servers exploited through ...]
  82. GitHub: https://github.com/cryptolakk/ProxyLogon-Mass-RCE
    [CVE-2021-27065: Python for mass deploying payload on Microsoft Exchange Servers affected by ...]
  83. GitHub: https://github.com/DCScoder/Exchange_IOC_Hunter
    [CVE-2021-27065: CVE-2021-26855, CVE-2021-26857, CVE-2021-26858, CVE-2021-27065]
  84. GitHub: https://github.com/hictf/CVE-2021-26855-CVE-2021-27065
    [CVE-2021-27065: analytics ProxyLogo Mail exchange RCE]
  85. GitHub: https://github.com/mekhalleh/exchange_proxylogon
    [CVE-2021-27065: Module pack for #ProxyLogon (part. of my contribute for Metasploit-Framework) ...]
  86. GitHub: https://github.com/Nick-Yin12/106362522
    [CVE-2021-27065: 針對近期微軟公布修補遭駭客攻擊的Exchange ...]
  87. GitHub: https://github.com/p0wershe11/ProxyLogon
    [CVE-2021-27065: ProxyLogon(CVE-2021-26855+CVE-2021-27065) Exchange Server RCE(SSRF->GetWebShell)]
  88. GitHub: https://github.com/praetorian-inc/proxylogon-exploit
    [CVE-2021-27065: Proof-of-concept exploit for CVE-2021-26855 and CVE-2021-27065. Unauthenticated RCE ...]
  89. GitHub: https://github.com/RickGeex/ProxyLogon
    [CVE-2021-27065: ProxyLogon is the formally generic name for CVE-2021-26855, a vulnerability on ...]
  90. GitHub: https://github.com/SCS-Labs/HAFNIUM-Microsoft-Exchange-0day
    [CVE-2021-27065: CVE-2021-26855, CVE-2021-26857, CVE-2021-26858, CVE-2021-27065]
  91. GitHub: https://github.com/sgnls/exchange-0days-202103
    [CVE-2021-27065: IoC determination for exploitation of CVE-2021-26855, CVE-2021-26857, CVE-2021-26858 ...]
  92. GitHub: https://github.com/sirpedrotavares/Proxylogon-exploit
    [CVE-2021-26857: Proxylogon exploit - CVE-2021-26857]

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-27065
CVSS V2 Vector: AV:N/AC:M/Au:N/C:P/I:P/A:P/E:H/RL:OF/RC:C
CVSS Base Score:6.8 (Medium)
Impact Subscore:6.4
Exploitability Subscore:8.6
CVSS Temporal Score:5.9 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:5.9 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:7.8 (High)
Impact Subscore:5.9
Exploitability Subscore:1.8
CVSS Temporal Score:7.5 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:7.5 (High)

Go back to menu.

Plugin Source


The hafnium_ioc_detect.nbin Nessus plugin is distributed in a propriatory binary format and its source code is protected. This script is Copyright (C) 2021-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

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

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

Go back to menu.

How to Run


Here is how to run the Potential exposure to Hafnium Microsoft Exchange targeting 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 plugin family.
  6. On the right side table select Potential exposure to Hafnium Microsoft Exchange targeting plugin ID 147193.
  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 hafnium_ioc_detect.nbin -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

/opt/nessus/bin/nasl -T - hafnium_ioc_detect.nbin -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 hafnium_ioc_detect.nbin -t <IP/HOST>

Go back to menu.

References


See also: Similar and related Nessus plugins:
  • 147024 - Security Update for Microsoft Exchange Server 2010 SP 3 (March 2021)
  • 147003 - Security Updates for Microsoft Exchange Server (March 2021)
  • 134437 - FreeBSD : Django -- potential SQL injection vulnerability (1685144e-63ff-11ea-a93a-080027846a02)
  • 88149 - FreeBSD : sudo -- potential privilege escalation via symlink misconfiguration (2e8cdd36-c3cc-11e5-b5fe-002590263bf5)
  • 83794 - FreeBSD : davmail -- fix potential CVE-2014-3566 vulnerability (POODLE) (384fc0b2-0144-11e5-8fda-002590263bf5) (POODLE)
  • 130239 - FreeBSD : sudo -- Potential bypass of Runas user restrictions (3a1474ba-f646-11e9-b0af-b888e347c638)
  • 133476 - FreeBSD : Django -- potential SQL injection vulnerability (5a45649a-4777-11ea-bdec-08002728f74c)
  • 123574 - FreeBSD : Kubectl -- Potential directory traversal (6a0129bf-54ad-11e9-987c-1c39475b9f84)
  • 140558 - FreeBSD : Rails -- Potential XSS vulnerability (7b630362-f468-11ea-a96c-08002728f74c)
  • 133433 - FreeBSD : sudo -- Potential bypass of Runas user restrictions (b4e5f782-442d-11ea-9ba9-206a8a720317)
  • 60102 - FreeBSD : php -- potential overflow in _php_stream_scandir (bdab0acd-d4cd-11e1-8a1c-14dae9ebcf89)
  • 132943 - FreeBSD : drm graphics drivers -- potential information disclusure via local access (d2c2c815-3793-11ea-8be3-54e1ad3d6335)
  • 118478 - FreeBSD : liveMedia -- potential remote code execution (fa194483-dabd-11e8-bf39-5404a68ad561)
  • 16670 - HP-UX PHNE_28143 : HPSBUX0305-261 SSRT3451 Potential Security Vulnerability in HP-UX network drivers (Data Leakage) (rev. 01)
  • 17417 - HP-UX PHNE_28636 : HPSBUX0305-261 SSRT3451 Potential Security Vulnerability in HP-UX network drivers (Data Leakage) (rev. 01)
  • 16926 - HP-UX PHNE_29244 : HPSBUX0305-261 SSRT3451 Potential Security Vulnerability in HP-UX network drivers (Data Leakage) (rev. 01)
  • 17420 - HP-UX PHNE_29267 : HPSBUX0305-261 SSRT3451 Potential Security Vulnerability in HP-UX network drivers (Data Leakage) (rev. 01)
  • 74326 - OpenSSL 'ChangeCipherSpec' MiTM Potential Vulnerability

Version


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

Go back to menu.