From ccb26637e7f5fb3de4d8a747df6be6ff7fb5aaf9 Mon Sep 17 00:00:00 2001 From: ikkini Date: Thu, 24 Jul 2014 23:26:41 +0200 Subject: [PATCH] List all (listable) modules from a rsync daemon --- .../auxiliary/scanner/rsync/rsync_modules_list.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/auxiliary/scanner/rsync/rsync_modules_list.rb b/modules/auxiliary/scanner/rsync/rsync_modules_list.rb index b3b1fa10a3..51586d600b 100644 --- a/modules/auxiliary/scanner/rsync/rsync_modules_list.rb +++ b/modules/auxiliary/scanner/rsync/rsync_modules_list.rb @@ -14,8 +14,8 @@ class Metasploit3 < Msf::Auxiliary def initialize super( 'Name' => 'Rsync Unauthenticated List Command', - 'Description' => 'List rsync available modules', - 'Author' => 'avuko', + 'Description' => 'List all (listable) modules from a rsync daemon', + 'Author' => 'ikkini', 'License' => MSF_LICENSE ) register_options( @@ -36,16 +36,17 @@ class Metasploit3 < Msf::Auxiliary connect() version = sock.recv(1024) # making sure we match the version of the server - sock.puts("#{version}" ) + sock.puts("#{version}") + # the listing command sock.puts("\n") listing = sock.get() # not interested in EXIT message listing = listing.to_s.gsub('@RSYNCD: EXIT', '') disconnect() - listing_santized = Rex::Text.to_hex_ascii(listing.to_s.strip) - print_status("#{ip}:#{rport} #{version.rstrip.to_s} #{listing_santized}") - report_service(:host => rhost, :port => rport, :name => "rsync", :info => listing_santized) + listing_sanitized = Rex::Text.to_hex_ascii(listing.to_s.strip) + print_status("#{ip}:#{rport} #{version.rstrip} #{listing_sanitized}") + report_service(:host => rhost, :port => rport, :name => 'rsync', :info => listing_sanitized) end rescue ::Rex::ConnectionError rescue Timeout::Error