mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-07-18 18:31:41 +02:00
Rubocop
This commit is contained in:
parent
d7215b84b4
commit
4da94325f3
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
## Vulnerable Application
|
||||
|
||||
### Description
|
||||
Incorrect access control for the Lenovo Diagnostics Driver allows a low-privileged user the ability to issue device
|
||||
Incorrect access control for the Lenovo Diagnostics Driver allows a low-privileged user the ability to issue device
|
||||
IOCTLs to perform arbitrary physical/virtual memory read/write.
|
||||
|
||||
### Setup
|
||||
@ -207,4 +207,4 @@ System Language : en_US
|
||||
Domain : EXAMPLE
|
||||
Logged On Users : 8
|
||||
Meterpreter : x64/windows
|
||||
```
|
||||
```
|
||||
|
@ -61,8 +61,6 @@ class MetasploitModule < Msf::Exploit::Local
|
||||
end
|
||||
|
||||
def check
|
||||
sysinfo_value = sysinfo['OS']
|
||||
|
||||
unless session.platform == 'windows'
|
||||
# Non-Windows systems are definitely not affected.
|
||||
return Exploit::CheckCode::Safe
|
||||
@ -78,14 +76,15 @@ class MetasploitModule < Msf::Exploit::Local
|
||||
end
|
||||
|
||||
def target_compatible?
|
||||
sysinfo_value = sysinfo['OS']
|
||||
|
||||
build_num = sysinfo_value.match(/Build (\d+)/)[1].to_i
|
||||
build_num = sysinfo['OS'].match(/Build (\d+)/)[1].to_i
|
||||
vprint_status("Windows Build Number = #{build_num}")
|
||||
|
||||
return true if sysinfo_value =~ /Windows 10/
|
||||
return true if sysinfo_value =~ /Windows 11/
|
||||
return true if sysinfo_value =~ /Windows 2016\+/
|
||||
# As new versions of Windows Server 2022 and Windows 11 are released, it's possible they will be vulnerable as well.
|
||||
# In order to update the exploit for new versions of Windows edit the below as well as the offsets in the
|
||||
# ResolveRequirements method in external/source/exploits/CVE-2022-3699/CVE-2022-3699/exploit.cpp
|
||||
return true if sysinfo['OS'] =~ /Windows 10/ && build_num >= 14393 && build_num <= 19045
|
||||
return true if sysinfo['OS'] =~ /Windows 11/ && build_num >= 22000 && build_num <= 22621
|
||||
return true if sysinfo['OS'] =~ /Windows 2016\+/ && build_num >= 17763 && build_num <= 20348
|
||||
|
||||
false
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user