pentesting-memcached

Tests Memcached servers on port 11211 for unauthenticated access, key dumping, cache poisoning, and UDP amplification.

954|172|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/xalgord/xalgorix --skill pentesting-memcached
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pentesting-memcached
Source: https://github.com/xalgord/xalgorix/tree/main/internal/tools/skills/data/network-services-pentesting/pentesting-memcached
Command: npx skills add https://github.com/xalgord/xalgorix --skill pentesting-memcached

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Exposed Memcached instances frequently run without authentication, leaking cached session tokens, credentials, and query results while also enabling UDP reflection DDoS attacks. This Skill provides a structured workflow to enumerate, exploit, and document these weaknesses during authorized penetration tests.

Core Features & Use Cases

  • Unauthenticated Enumeration: Confirm exposure with version, stats, and stats items over plain nc, plus nmap NSE and Metasploit auxiliary modules.
  • Key Dumping & Data Exfiltration: Extract all key names and values using stats cachedump (≤ 1.4.30), lru_crawler metadump (≥ 1.4.31), or libmemcached-tools (memcdump/memccat).
  • Cache Poisoning & UDP Amplification Checks: Verify write access with set commands and assess UDP 11211 reflection/amplification DDoS risk.
  • Use Case: During an internal pentest, you find port 11211 open. You dump cached session objects with memcdump/memccat, replay a valid session token against the web app, and report the exposure with remediation steps.

Quick Start

Use the pentesting-memcached skill to enumerate and dump keys from the Memcached server at 10.0.0.5 on port 11211 and document any unauthenticated access findings.

Frequently Asked Questions about pentesting-memcached

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I dump all keys from a Memcached server?

Dump Memcached keys using memcdump from libmemcached-tools, or manually with 'stats items' followed by 'stats cachedump <slab> 0' over nc. For Memcached 1.4.31 and later, use 'lru_crawler metadump all' for a non-blocking, production-safe key metadata dump.

How to test Memcached for unauthenticated access?

Test unauthenticated Memcached access by running 'echo stats | nc -w1 <IP> 11211'. A response containing 'STAT pid' confirms the server answers without authentication, since most instances never enable SASL.

Does Memcached support authentication?

Memcached supports SASL authentication, but it is rarely enabled and most deployments accept plain-text commands with no credentials. If SASL is configured, the binary protocol handshake via libmemcached or mcrouter clients is required.

What is the Memcached UDP amplification attack?

The Memcached UDP amplification attack abuses UDP port 11211, where a small spoofed request like 'stats' returns a much larger response, enabling reflection DDoS (the Memcrashed attacks). Confirm exposure with 'nmap -sU -p11211' and recommend disabling UDP with the -U 0 flag.

What are the limitations of stats cachedump?

The stats cachedump command only dumps up to 1MB per slab class and is deprecated in newer Memcached versions. The peep tool can dump everything but freezes the memcached process, so it should only be used in lab environments.