Memcached Extractor - Metasploit
This page contains detailed information about how to use the auxiliary/gather/memcached_extractor metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Memcached Extractor
Module: auxiliary/gather/memcached_extractor
Source code: modules/auxiliary/gather/memcached_extractor.rb
Disclosure date: -
Last modification time: 2021-02-17 12:33:59 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 11211
List of CVEs: -
This module extracts the slabs from a memcached instance. It then finds the keys and values stored in those slabs.
Module Ranking and Traits
Module Ranking:
- normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.
Basic Usage
This module is a scanner module, and is capable of testing against multiple hosts.
msf > use auxiliary/gather/memcached_extractor
msf auxiliary(memcached_extractor) > show options
... show and set options ...
msf auxiliary(memcached_extractor) > set RHOSTS ip-range
msf auxiliary(memcached_extractor) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(memcached_extractor) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(memcached_extractor) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(memcached_extractor) > set RHOSTS file:/tmp/ip_list.txt
Required Options
- RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
Go back to menu.
Msfconsole Usage
Here is how the gather/memcached_extractor auxiliary module looks in the msfconsole:
msf6 > use auxiliary/gather/memcached_extractor
msf6 auxiliary(gather/memcached_extractor) > show info
Name: Memcached Extractor
Module: auxiliary/gather/memcached_extractor
License: Metasploit Framework License (BSD)
Rank: Normal
Provided by:
Paul Deardorff <[email protected]>
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 11211 yes The target port (TCP)
THREADS 1 yes The number of concurrent threads (max one per host)
Description:
This module extracts the slabs from a memcached instance. It then
finds the keys and values stored in those slabs.
References:
https://github.com/memcached/memcached/blob/master/doc/protocol.txt
Module Options
This is a complete list of options available in the gather/memcached_extractor auxiliary module:
msf6 auxiliary(gather/memcached_extractor) > show options
Module options (auxiliary/gather/memcached_extractor):
Name Current Setting Required Description
---- --------------- -------- -----------
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 11211 yes The target port (TCP)
THREADS 1 yes The number of concurrent threads (max one per host)
Advanced Options
Here is a complete list of advanced options supported by the gather/memcached_extractor auxiliary module:
msf6 auxiliary(gather/memcached_extractor) > show advanced
Module advanced options (auxiliary/gather/memcached_extractor):
Name Current Setting Required Description
---- --------------- -------- -----------
CHOST no The local client address
CPORT no The local client port
ConnectTimeout 10 yes Maximum number of seconds to establish a TCP connection
MAXKEYS 100 yes Maximum number of keys to be pulled from each slab
PRINTKEYS 10 yes Number of keys shown in preview table for each instance
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
SSL false no Negotiate SSL/TLS for outgoing connections
SSLCipher no String for SSL cipher - "DHE-RSA-AES256-SHA" or "ADH"
SSLVerifyMode PEER no SSL verification method (Accepted: CLIENT_ONCE, FAIL_IF_NO_PEER_CERT, NONE, PEER)
SSLVersion Auto yes Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are auto-negotiate) (Accepted: Auto, TLS, SSL23, SSL3, TLS1, TLS1.1, TLS1.2)
ShowProgress true yes Display progress messages during a scan
ShowProgressPercent 10 yes The interval in percent that progress should be shown
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
Auxiliary Actions
This is a list of all auxiliary actions that the gather/memcached_extractor module can do:
msf6 auxiliary(gather/memcached_extractor) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the gather/memcached_extractor auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(gather/memcached_extractor) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
TCP::max_send_size 0 no Maxiumum tcp segment size. (0 = disable)
TCP::send_delay 0 no Delays inserted before every send. (0 = disable)
Go back to menu.
Error Messages
This module may fail with the following error messages:
Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.
unable to determine memcached protocol version
Here is a relevant code snippet related to the "unable to determine memcached protocol version" error message:
142: proto: 'tcp',
143: info: version
144: )
145: end
146: else
147: print_error("unable to determine memcached protocol version")
148: return
149: end
150: if(command_string=='cachedump')
151: keys = enumerate_keys
152: else
Could not connect to memcached server!
Here is a relevant code snippet related to the "Could not connect to memcached server!" error message:
165: print_line
166: print_line("#{result_table}")
167: unless localhost?(ip)
168: path = store_loot('memcached.dump', 'text/plain', ip, data, 'memcached.txt', 'Memcached extractor')
169: print_good("memcached loot stored at #{path}")
170: end
171: rescue Rex::ConnectionRefused, Rex::ConnectionTimeout
172: vprint_error("Could not connect to memcached server!")
173: end
174: end
175: end
Go back to menu.
Related Pull Requests
- #14769 Merged Pull Request: Handle nil versions in preparation for rubygems 4
- #13468 Merged Pull Request: Fix memcached extractor issue 12884
- #8338 Merged Pull Request: Fix msf/core and self.class msftidy warnings
- #7200 Merged Pull Request: Rex::Ui::Text cleanup
- #6655 Merged Pull Request: use MetasploitModule as a class name
- #6648 Merged Pull Request: Change metasploit class names
- #6526 Merged Pull Request: Peers for the peer god
- #4596 Merged Pull Request: Add memcached extractor / gather
memcached_extractor.rb
module
References
See Also
Check also the following modules related to this module:
- auxiliary/scanner/memcached/memcached_amp
- auxiliary/scanner/memcached/memcached_udp_version
- auxiliary/dos/misc/memcached
- auxiliary/admin/http/dlink_dir_645_password_extractor
- auxiliary/admin/http/dlink_dsl320b_password_extractor
- auxiliary/admin/http/netgear_soap_password_extractor
- auxiliary/admin/http/zyxel_admin_password_extractor
- auxiliary/gather/redis_extractor
Authors
- Paul Deardorff <paul_deardorff[at]rapid7.com>
Version
This page has been produced using Metasploit Framework version 6.1.24-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.