-
Notifications
You must be signed in to change notification settings - Fork 14k
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
WIP: LPE CVE-2024-1086 #19625
base: master
Are you sure you want to change the base?
WIP: LPE CVE-2024-1086 #19625
Conversation
release = kernel_release | ||
if ( | ||
Rex::Version.new(release.split('-').first) >= Rex::Version.new('5.15.0') && | ||
Rex::Version.new(release.split('-').first) < Rex::Version.new('6.0') | ||
) || | ||
( | ||
Rex::Version.new(release.split('-').first) < Rex::Version.new('6.6') && | ||
Rex::Version.new(release.split('-').first) >= Rex::Version.new('6.0') | ||
) | ||
return CheckCode::Appears("Kernel version #{release} appears to be vulnerable") | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
release = kernel_release | |
if ( | |
Rex::Version.new(release.split('-').first) >= Rex::Version.new('5.15.0') && | |
Rex::Version.new(release.split('-').first) < Rex::Version.new('6.0') | |
) || | |
( | |
Rex::Version.new(release.split('-').first) < Rex::Version.new('6.6') && | |
Rex::Version.new(release.split('-').first) >= Rex::Version.new('6.0') | |
) | |
return CheckCode::Appears("Kernel version #{release} appears to be vulnerable") | |
end | |
release = kernel_release().split('-').first | |
if release.between(Rex::Version.new('5.15.0'), Rex::Version.new('6.0')) | |
return CheckCode::Appears("Kernel version #{release} appears to be vulnerable") | |
elsif release.between(Rex::Version.new('6.0'), Rex::Version.new('6.6')) | |
return CheckCode::Appears("Kernel version #{release} appears to be vulnerable") | |
end |
but it seems that this can be simplified even further to:
release = kernel_release().split('-').first
if release.between(Rex::Version.new('5.15.0'), Rex::Version.new('6.6'))
return CheckCode::Appears("Kernel version #{release} appears to be vulnerable")
end
end | ||
|
||
def check_musl_tools? | ||
lib = cmd_exec('dpkg --get-selections | grep musl-tools') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will only work on Debian :/
zip.add_file(file.split('CVE-2024-1086/')[1], file_contents) | ||
end | ||
print_status('Finished creating exploit source zip, uploading...') | ||
zip_path = "#{nested_base}/.#{rand_text_alphanumeric(5..10)}.zip" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't the files be concatenated instead?
fail_with Failure::BadConfig, "#{base_dir} is not writable" | ||
end | ||
|
||
nested_base = "#{base_dir}/.#{rand_text_alphanumeric(5..10)}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of IDS are flagging binary execution happening instead hidden folders. I think it'd be better to let the user specify the full path of the folder.
Fixes: #19153
WIP exploit for CVE-2024-1086 . Running the exploit by hand on the box seems fairly reliable. However running it through metasploit currently results in about 75% hard lock of the box either instantly, or within 6min. 25% of the time its perfect though!
Only been testing the live build functionality, not the 'drop a pre-complied binary' branch
I forgot to bring along a bunch of the library files as well, so need to add those back.