> 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/ja/ports-and-services/elasticsearch-9200.md).

# Elasticsearch - 9200

Elasticsearchのインデックス列挙、データ露出レビュー、キーワードフィルタリング、base64認証情報復元。

{% hint style="info" %}
Elasticsearchは、大量のデータを迅速にインデックス化して検索するために使用される、リアルタイムの検索および分析エンジンです。ELKスタックに統合され、高度なデータ可視化と分析機能を提供します。
{% endhint %}

### Elasticsearch - 情報漏えい

#### ポート9200でElasticsearchバージョン6.4.2が稼働しています。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-845fb1672437b01cefd0b2d0d8a5ef12fe5873b5%2Fimage%20(2346).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-a6fa307777b94d07df14f3a092c87293f442f19c%2Fimage%20(2342).png?alt=media" alt=""><figcaption></figcaption></figure>

アクセスすると `/_cat/indices?` URLは、UUID付きのインデックス一覧を返します。インデックスの内容を抽出するには、次のURLを使用します：

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

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-d67ff3ba6fb8ae20077e89f3264944303a23fe19%2Fimage%20(2350).png?alt=media" 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="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-c07fc40eea9a17fe56fb69b73a5f6218e2804a4b%2Fimage%20(2351).png?alt=media" alt=""><figcaption></figcaption></figure>

**Base64エンコード文字列のデコード**

2つのbase64エンコード文字列が取得されます。これをデコードすると、認証情報が明らかになります：

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

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-cc8b39a983eb79b8bb21141eb943bc402c34642a%2Fimage%20(2347).png?alt=media" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
