diff --git a/modules/exploits/windows/local/cve_2021_40449.rb b/modules/exploits/windows/local/cve_2021_40449.rb index a5a82980c9c6..549fc90addd2 100644 --- a/modules/exploits/windows/local/cve_2021_40449.rb +++ b/modules/exploits/windows/local/cve_2021_40449.rb @@ -87,23 +87,23 @@ 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!') @@ -111,11 +111,11 @@ def check 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!')