Skip to content

Commit

Permalink
Fix revision number checks in cve_2022_26904_superprofile.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
upsidedwn authored Feb 7, 2024
1 parent b72d8d1 commit 4b5d04e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions modules/exploits/windows/local/cve_2022_26904_superprofile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 4b5d04e

Please sign in to comment.