Service bank
DATABASE 9200/tcp 9300/tcp

Elasticsearch

aka ELK, elastic

Search/analytics store on 9200, commonly exposed without auth. An open cluster lets you dump every index, which often contains credentials and PII; old versions add script RCE.

Ports

PortProtoNotes
9200tcpREST API (HTTP)
9300tcptransport (node-to-node)

Fingerprint

  • GET / returns cluster JSON with the tagline You Know, for Search
  • GET /_cat/indices lists all indices

Key files

PathHoldsSensitive
/etc/elasticsearch/elasticsearch.yml cluster config and security settings

Default / weak creds

  • none when X-Pack security is disabled

Service users

elasticsearch

Known CVEs

CVEImpact
CVE-2015-1427Groovy sandbox bypass RCE via the _search API
CVE-2014-3120MVEL dynamic-script RCE

Exploitation primitives

  • Unauthenticated: list indices and dump documents (creds, tokens, PII)
  • Legacy script RCE (Groovy/MVEL) on old, unpatched clusters

Overview

Elasticsearch on 9200 frequently ships with security off, so the whole cluster is one HTTP request away. The indices are the prize, and ancient versions add scripted RCE.

Enumeration

Cluster info:

curl -s http://<TARGET>:9200/

List indices:

curl -s http://<TARGET>:9200/_cat/indices?v

Dump documents from an index:

curl -s "http://<TARGET>:9200/<index>/_search?pretty&size=100"

Hardening

Enable the built-in security (auth + TLS), bind to localhost, and patch legacy script-execution CVEs.

References