FOOTHOLD Metodoloji Cheat-sheet
11211

Memcached

linux

Memcached (kimlik dogrulamasiz): stats ile enumeration, key slab dump ile onbellekteki hassas veri/oturum loot.

┌──

Komutlar

nmap ✓ EXAM-SAFE
nmap -sV -p {{RPORT}} --script=memcached-info {{RHOST}}
Memcached surum tespiti ve istatistik enumeration. HackTricks — 11211 Pentesting Memcached
ncat ✓ EXAM-SAFE
ncat -C {{RHOST}} {{RPORT}}
Memcached'e ham TCP baglanti (interaktif komut girisi). HackTricks — 11211 Pentesting Memcached
memcstat ✓ EXAM-SAFE
memcstat --servers={{RHOST}}:{{RPORT}}
libmemcached araci ile genel istatistik dökümü. HackTricks — 11211 Pentesting Memcached
ncat ✓ EXAM-SAFE
printf 'stats\r\nstats items\r\nstats slabs\r\n' | ncat -C {{RHOST}} {{RPORT}}
stats/items/slabs ile slab sinifi ve key sayilarini cikar. HackTricks — Memcached Commands
ncat ✓ EXAM-SAFE
printf 'stats cachedump 1 0\r\n' | ncat -C {{RHOST}} {{RPORT}}
Bir slab sinifindaki tum key isimlerini dump et (cachedump <slab> <limit>). HackTricks — Memcached Commands
ncat ✓ EXAM-SAFE
printf 'get KEYNAME\r\n' | ncat -C {{RHOST}} {{RPORT}}
Belirli bir key'in degerini oku (onbellekteki hassas veri). HackTricks — Memcached Commands

Genel Bakis

Memcached basit bir key-value cache servisidir, kimlik dogrulamasizdir ve OSCP’de loot kaynagi olarak degerlidir. RCE saglamaz ama uygulamanin onbellege koydugu oturum token’lari, kullanici verileri ve bazen kredleri sizdirir.

Enumeration

  • nmap memcached-info veya ham ncat/telnet ile baglan.
  • stats genel bilgi (surum, baglanti sayisi, uptime), stats items hangi slab’larda kac key oldugunu, stats slabs slab siniflarini gosterir.
  • libmemcached araclari (memcstat, memcdump, memccat) Kali’de mevcuttur ve isi kolaylastirir.

Key Dump (Loot)

  • stats items ciktisindaki slab numaralarini al, her biri icin stats cachedump <slab_id> <limit> calistirip key isimlerini topla (limit 0 = tum keyler).
  • Bulunan her key icin get <key> ile degeri oku. Oturum verileri, kullanici nesneleri, API yanitlari burada onbelleklenmis olabilir.
  • memcdump --servers=host ile tum keyleri tek seferde listele, ardindan memccat ile degerleri cek.

Notlar

  • Komut sonlandiricilari \r\n olmali; bu yuzden ncat -C (CRLF) veya printf ile gonderiyoruz.
  • Memcached’in UDP modu (amplifikasyon) pentestte genelde ilgisizdir; TCP key dump’a odaklanin.
  • Elde edilen oturum token’larini web uygulamasinda cookie olarak deneyerek auth bypass/pivot saglayabilirsin.
┌──

İlgili teknikler

┌──

Kaynaklar

0/15 set