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 for cve_2021_40449.rb #18800

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
20 changes: 10 additions & 10 deletions modules/exploits/windows/local/cve_2021_40449.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,35 +87,35 @@ def check
end

# Build numbers taken from https://www.qualys.com/research/security-alerts/2021-10-12/microsoft/
if version.build_number == Msf::WindowsVersion::Win11_21H2 && version.build_number.revision_number.between?(0, 257)
if version.build_number == Msf::WindowsVersion::Win11_21H2 && version.revision_number.between?(0, 257)
return CheckCode::Appears('Vulnerable Windows 11 build detected!')
elsif version.build_number == Msf::WindowsVersion::Server2022 && version.build_number.revision_number.between?(0, 287)
elsif version.build_number == Msf::WindowsVersion::Server2022 && version.revision_number.between?(0, 287)
return CheckCode::Appears('Vulnerable Windows Server 2022 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win10_21H2 && version.build_number.revision_number.between?(0, 1318)
elsif version.build_number == Msf::WindowsVersion::Win10_21H2 && version.revision_number.between?(0, 1318)
return CheckCode::Appears('Vulnerable Windows 10 21H2 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win10_21H1 && version.build_number.revision_number.between?(0, 1287)
elsif version.build_number == Msf::WindowsVersion::Win10_21H1 && version.revision_number.between?(0, 1287)
return CheckCode::Appears('Vulnerable Windows 10 21H1 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win10_20H2 && version.build_number.revision_number.between?(0, 1287)
elsif version.build_number == Msf::WindowsVersion::Win10_20H2 && version.revision_number.between?(0, 1287)
return CheckCode::Appears('Vulnerable Windows 10 20H2 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win10_2004 && version.build_number.revision_number.between?(0, 1287)
elsif version.build_number == Msf::WindowsVersion::Win10_2004 && version.revision_number.between?(0, 1287)
return CheckCode::Appears('Vulnerable Windows 10 20H1 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win10_1909 && version.build_number.revision_number.between?(0, 1853)
elsif version.build_number == Msf::WindowsVersion::Win10_1909 && version.revision_number.between?(0, 1853)
return CheckCode::Appears('Vulnerable Windows 10 v1909 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win10_1903
return CheckCode::Appears('Vulnerable Windows 10 v1903 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win10_1809 && version.build_number.revision_number.between?(0, 2236)
elsif version.build_number == Msf::WindowsVersion::Win10_1809 && version.revision_number.between?(0, 2236)
return CheckCode::Appears('Vulnerable Windows 10 v1809 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win10_1803
return CheckCode::Appears('Vulnerable Windows 10 v1803 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win10_1709
return CheckCode::Appears('Vulnerable Windows 10 v1709 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win10_1703
return CheckCode::Appears('Vulnerable Windows 10 v1703 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win10_1607 && version.build_number.revision_number.between?(0, 4703)
elsif version.build_number == Msf::WindowsVersion::Win10_1607 && version.revision_number.between?(0, 4703)
return CheckCode::Appears('Vulnerable Windows 10 v1607 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win10_1511
return CheckCode::Appears('Vulnerable Windows 10 v1511 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win10_1507 && version.build_number.revision_number.between?(0, 19085)
elsif version.build_number == Msf::WindowsVersion::Win10_1507 && version.revision_number.between?(0, 19085)
return CheckCode::Appears('Vulnerable Windows 10 v1507 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win81 # Includes Server 2012 R2
return CheckCode::Detected('Windows 8.1/Windows Server 2012 R2 build detected!')
Expand Down
Loading