Path: blob/master/documentation/modules/auxiliary/scanner/http/elasticsearch_traversal.md
55903 views
Vulnerable Application
This module exploits a directory traversal vulnerability in ElasticSearch versions prior to 1.6.1. The flaw exists in the Snapshot API and allows an unauthenticated attacker to read arbitrary files from the target system with the privileges of the JVM process.
The vulnerability is tracked as CVE-2015-5531.
Setup
Install a vulnerable version of ElasticSearch (prior to 1.6.1). Older releases are available from the ElasticSearch downloads archive.
Configure a
path.repoinelasticsearch.ymlso that the Snapshot API is available:Start ElasticSearch. It listens on port 9200 by default.
Verification Steps
Start msfconsole
Do:
use auxiliary/scanner/http/elasticsearch_traversalDo:
set RHOSTS [target IP]Do:
runYou should see the requested file contents saved as loot.
Options
FILEPATH
The path to the file to read on the target. The default value is /etc/passwd.
DEPTH
The number of ../ traversal sequences to include. The default is 7. Increase this if the file cannot be reached with the default depth.