Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix revision number checks in cve_2022_26904_superprofile.rb #18801

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading