Memcached Enumeration with libmemcached tools
If you want a cleaner operator workflow than raw nc, use libmemcached-tools. It wraps common operations, supports SASL options, and makes stats collection fast.
Quick stats with memcstat
Targeted stats you usually care about:
Interpretation:
settingstells you exposure and limits.itemsandslabstell you whether key dump techniques are likely to return anything useful.
Key enumeration with memcdump
Interpretation:
Expect incomplete results. Memcached does not guarantee a complete key listing via dump mechanisms.
If it returns nothing but the cache is clearly active, move to
lru_crawler metadumpor pull keys via application knowledge.
Fetch values with memccat
Once you have a key:
Use this when values are large or when you want clean output without VALUE wrappers.
Capability checks with memccapable
This is useful when you suspect protocol quirks, binary-only behavior, or proxies.
Interpretation:
If capability checks fail but the port is open, you might be dealing with TLS-wrapped memcached or access controls that require different client settings.
memcached-tool for slab overviews
memcached-tool is a long-lived stats script shipped in the memcached repository. Good for fast slab and item summaries.
Metasploit convenience modules
Important
This may be restricted in exams such as OSCP. Metasploit modules are limited to one machine per exam. The manual enumeration above does not need Metasploit.
What you expect:
If the instance allows reads and keys are discoverable, it will attempt to extract cached values.
If dumping is disabled, it usually returns minimal output and you should fall back to metadump or known-key reads.
References
-
manpages.debian.orgmanpages.debian.org/experimental/libmemcached-tools/memcstat.1.en.html (opens in new tab)
memcstat options including binary mode and SASL flags.
-
manpages.debian.orgmanpages.debian.org/experimental/libmemcached-tools/memcdump.1.en.html (opens in new tab)
memcdump behavior and key dump limitations.
-
manpages.debian.orgmanpages.debian.org/unstable/libmemcached-tools/memccapable.1.en.html (opens in new tab)
memccapable purpose and usage.
-
tool naming conventions mem* vs memc*.
-
memcached-tool script source.
-
memcached-tool modes and usage.
Was this helpful?
Your feedback helps improve this page.