diff --git a/modules/auxiliary/scanner/concrete5_member_list.rb b/modules/auxiliary/scanner/concrete5_member_list.rb new file mode 100644 index 0000000000..70953d1773 --- /dev/null +++ b/modules/auxiliary/scanner/concrete5_member_list.rb @@ -0,0 +1,137 @@ +## +# $Id$ +## + +## +# This file is part of the Metasploit Framework and may be subject to +# redistribution and commercial restrictions. Please see the Metasploit +# web site for more information on licensing and terms of use. +# http://metasploit.com/ +## + +require 'msf/core' + +class Metasploit4 < Msf::Auxiliary + + include Msf::Exploit::Remote::HttpClient + include Msf::Auxiliary::Scanner + include Msf::Auxiliary::Report + + def initialize + super( + 'Name' => 'Concrete5 Member List', + 'Version' => '$Revision$', + 'Description' => %q{ + This module extracts username information from the Concrete5 member page + }, + 'References' => + [ + # General + [ 'URL', 'http://blog.c22.cc' ] + ], + 'Author' => [ 'Chris John Riley' ], + 'License' => MSF_LICENSE + ) + + register_options( + [ + Opt::RPORT(80), + OptString.new('URI', [false, 'URL of the Concrete5 root', '/']), + ], self.class) + deregister_options('RHOST') + end + + def run_host(rhost) + # check the only one forward slash appears in the url + if datastore['URI'][0,1] == "/" + url = datastore['URI'] + else + url = "/" + datastore['URI'] + end + + begin + res = send_request_cgi({ + 'uri' => "#{url}/members", + 'method' => 'GET', + 'headers' => + { + 'User-Agent' => datastore['UserAgent'] + } + }, 25) + + rescue ::Rex::ConnectionError + print_error("#{rhost}:#{rport} Unable to connect to #{url}") + return + end + + if not res + print_error("#{rhost}:#{rport} Unable to connect to #{url}") + return + end + + # extract member info from response if present + if res and res.body =~ /ccm-profile-member-username/i + extract_members(res, url) + elsif res + print_status("#{rhost}:#{rport} No members listed or profiles disabled") + else + print_error("#{rhost}:#{rport} No response received") + end + + end + + def extract_members(res, url) + + members = res.body.scan(/