##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
class MetasploitModule < Msf::Auxiliary
include Msf::Auxiliary::Redis
include Msf::Auxiliary::Report
include Msf::Auxiliary::Scanner
def initialize(info = {})
super(update_info(info,
'Name' => 'Redis Command Execute Scanner',
'Description' => %q(
This module locates Redis endpoints by attempting to run a specified
Redis command.
),
'Author' => [ 'iallison <ian[at]team-allison.com>', 'Nixawk' ],
'License' => MSF_LICENSE))
register_options(
[
Opt::RPORT(6379),
OptString.new('COMMAND', [ true, 'The Redis command to run', 'INFO' ])
]
)
end
def command
datastore['COMMAND']
end
def run_host(_ip)
vprint_status("Contacting redis")
begin
connect
return unless (data = redis_command(command))
report_service(host: rhost, port: rport, name: "redis server", info: "#{command} response: #{data}")
print_good("Found redis with #{command} command: #{Rex::Text.to_hex_ascii(data)}")
rescue Rex::AddressInUse, Rex::HostUnreachable, Rex::ConnectionTimeout,
Rex::ConnectionRefused, ::Timeout::Error, ::EOFError, ::Errno::ETIMEDOUT => e
vprint_error("Error while communicating: #{e}")
ensure
disconnect
end
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