This tool will allow you to search for ALL public RDS snapshots based on a given regular expression (regex). The default regular expression is .* which means match everything.
Like most tools that could be exploited for nefarious means, we did think long and hard about wether we should release this tool or not, but we decided that most of the bad actors
already have tools like this and this tool could be used by the good guys
to protect themselves.
The following example will search for all public RDS snapshots which contain the word wolf software
.
./find-public-rds-snapshots.py -s 'wolf.+software'
The search text is matched against the DBSnapshotIdentifier and the DBInstanceIdentifier. Please refer to the AWS documentation for more details.
usage: find-public-rds-snapshots [-h] [-v] [-r REGIONS] [-s SEARCH] [-i] [-t] [-c] [-j] [-f FILENAME] [-S SORT_ORDER]
Locate any public rds snapshots
flags:
-h, --help show this help message and exit
-v, --verbose Account level output (default: False)
required arguments:
-r REGIONS, --regions REGIONS
A comma separated list of regions to search (default: all)
-s SEARCH, --search SEARCH
The search regex (default: .*)
optional arguments:
-i, --case-insensitive
Make the search case insensitive (default: False)
-t, --terminal Draw a table of the results on the terminal (default: False)
-c, --csv Save the results as a csv formatted file (default: False)
-j, --json Save the results as a json formatted file (default: False)
-f FILENAME, --filename FILENAME
The filename to save the results to (default: search-results)
sorting arguments:
-S SORT_ORDER, --sort-order SORT_ORDER
Define the sort order of the results (E, R, S, T) (default: None)
Search Options: E=Database Engine, R=Region Name, S=Database Size, T=Creation Time.
Prefixing any of the above with an exclamation sign (!) will invert the order.
The script can only locate public RDS snapshots within regions to which your account credentials have access, so if a region is NOT enabled in your account then you will not see public RDS snapshots from that region.
If you want to see which regions you have access to, then we provide a tool for that also. AWS List Regions