From 4b5d04e59ef85aafbcef7496df9464489517a85d Mon Sep 17 00:00:00 2001 From: upsidedwn Date: Wed, 7 Feb 2024 11:30:42 +0800 Subject: [PATCH] Fix revision number checks in cve_2022_26904_superprofile.rb --- .../windows/local/cve_2022_26904_superprofile.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/exploits/windows/local/cve_2022_26904_superprofile.rb b/modules/exploits/windows/local/cve_2022_26904_superprofile.rb index 3beb2ecb7285..fa75836c79de 100644 --- a/modules/exploits/windows/local/cve_2022_26904_superprofile.rb +++ b/modules/exploits/windows/local/cve_2022_26904_superprofile.rb @@ -120,28 +120,28 @@ def check # Build numbers taken from https://msrc.microsoft.com/update-guide/en-US/vulnerability/CVE-2022-26904, and associated # security update information (e.g. https://support.microsoft.com/en-us/topic/windows-10-update-history-857b8ccb-71e4-49e5-b3f6-7073197d98fb, # https://support.microsoft.com/en-us/topic/windows-11-version-21h2-update-history-a19cd327-b57f-44b9-84e0-26ced7109ba9) - if version.build_number == Msf::WindowsVersion::Win11_21H2 && version.build_number.revision_number.between?(0, 612) + if version.build_number == Msf::WindowsVersion::Win11_21H2 && version.revision_number.between?(0, 612) return CheckCode::Appears('Vulnerable Windows 11 build detected!') - elsif version.build_number == Msf::WindowsVersion::Server2022 && version.build_number.revision_number.between?(0, 642) + elsif version.build_number == Msf::WindowsVersion::Server2022 && version.revision_number.between?(0, 642) return CheckCode::Appears('Vulnerable Windows Server 2022 build detected!') - elsif version.build_number == Msf::WindowsVersion::Win10_21H2 && version.build_number.revision_number.between?(0, 1644) + elsif version.build_number == Msf::WindowsVersion::Win10_21H2 && version.revision_number.between?(0, 1644) return CheckCode::Appears('Vulnerable Windows 10 21H2 build detected!') - elsif version.build_number == Msf::WindowsVersion::Win10_21H1 && version.build_number.revision_number.between?(0, 1644) + elsif version.build_number == Msf::WindowsVersion::Win10_21H1 && version.revision_number.between?(0, 1644) target_not_presently_supported return CheckCode::Appears('Vulnerable Windows 10 21H1 build detected!') - elsif version.build_number == Msf::WindowsVersion::Win10_20H2 && version.build_number.revision_number.between?(0, 1644) + elsif version.build_number == Msf::WindowsVersion::Win10_20H2 && version.revision_number.between?(0, 1644) target_not_presently_supported return CheckCode::Appears('Vulnerable Windows 10 20H2 build detected!') elsif version.build_number == Msf::WindowsVersion::Win10_2004 target_not_presently_supported return CheckCode::Appears('Vulnerable Windows 10 v2004 build detected!') - elsif version.build_number == Msf::WindowsVersion::Win10_1909 && version.build_number.revision_number.between?(0, 2211) + elsif version.build_number == Msf::WindowsVersion::Win10_1909 && version.revision_number.between?(0, 2211) target_not_presently_supported return CheckCode::Appears('Vulnerable Windows 10 v1909 build detected!') elsif version.build_number == Msf::WindowsVersion::Win10_1903 target_not_presently_supported return CheckCode::Appears('Vulnerable Windows 10 v1903 build detected!') - elsif version.build_number == Msf::WindowsVersion::Win10_1809 && version.build_number.revision_number.between?(0, 2802) + elsif version.build_number == Msf::WindowsVersion::Win10_1809 && version.revision_number.between?(0, 2802) target_not_presently_supported return CheckCode::Appears('Vulnerable Windows 10 v1809 build detected!') elsif version.build_number == Msf::WindowsVersion::Win10_1803 @@ -153,7 +153,7 @@ def check elsif version.build_number == Msf::WindowsVersion::Win10_1703 target_not_presently_supported return CheckCode::Appears('Vulnerable Windows 10 v1703 build detected!') - elsif version.build_number == Msf::WindowsVersion::Win10_1607 && version.build_number.revision_number.between?(0, 5065) + elsif version.build_number == Msf::WindowsVersion::Win10_1607 && version.revision_number.between?(0, 5065) target_not_presently_supported return CheckCode::Appears('Vulnerable Windows 10 v1607 build detected!') elsif version.build_number == Msf::WindowsVersion::Win10_1511