Skip to content

Commit

Permalink
Land #18798, fix version checks
Browse files Browse the repository at this point in the history
windows/local/cve_2020_0787_bits_arbitrary_file_move (and similar) fails due to incorrect revision_number checks
  • Loading branch information
smcintyre-r7 committed Feb 12, 2024
2 parents 8eb5aa6 + 47d3069 commit ce04983
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,23 +102,23 @@ def check
end

# Build numbers taken from https://www.qualys.com/research/security-alerts/2020-03-10/microsoft/
if version.build_number == Msf::WindowsVersion::Win10_1909 && version.build_number.revision_number.between?(0, 718)
if version.build_number == Msf::WindowsVersion::Win10_1909 && version.revision_number.between?(0, 718)
return CheckCode::Appears('Vulnerable Windows 10 v1909 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win10_1903 && version.build_number.revision_number.between?(0, 718)
elsif version.build_number == Msf::WindowsVersion::Win10_1903 && version.revision_number.between?(0, 718)
return CheckCode::Appears('Vulnerable Windows 10 v1903 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win10_1809 && version.build_number.revision_number.between?(0, 1097)
elsif version.build_number == Msf::WindowsVersion::Win10_1809 && version.revision_number.between?(0, 1097)
return CheckCode::Appears('Vulnerable Windows 10 v1809 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win10_1803 && version.build_number.revision_number.between?(0, 1364)
elsif version.build_number == Msf::WindowsVersion::Win10_1803 && version.revision_number.between?(0, 1364)
return CheckCode::Appears('Vulnerable Windows 10 v1803 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win10_1709 && version.build_number.revision_number.between?(0, 1746)
elsif version.build_number == Msf::WindowsVersion::Win10_1709 && version.revision_number.between?(0, 1746)
return CheckCode::Appears('Vulnerable Windows 10 v1709 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win10_1703 && version.build_number.revision_number.between?(0, 2312)
elsif version.build_number == Msf::WindowsVersion::Win10_1703 && version.revision_number.between?(0, 2312)
return CheckCode::Appears('Vulnerable Windows 10 v1703 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win10_1607 && version.build_number.revision_number.between?(0, 3563)
elsif version.build_number == Msf::WindowsVersion::Win10_1607 && version.revision_number.between?(0, 3563)
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, 18518)
elsif version.build_number == Msf::WindowsVersion::Win10_1507 && version.revision_number.between?(0, 18518)
return CheckCode::Appears('Vulnerable Windows 10 v1507 build detected!')
elsif version.build_number == Msf::WindowsVersion::Win81 # Includes Server 2012 R2
target_not_presently_supported
Expand Down

0 comments on commit ce04983

Please sign in to comment.