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

# Elasticsearch - 9200

{% hint style="info" %}
Elasticsearch es un motor de búsqueda y análisis en tiempo real que se utiliza para indexar y buscar rápidamente grandes volúmenes de datos. Se integra en la pila ELK para proporcionar capacidades avanzadas de visualización y análisis de datos.
{% endhint %}

### Elasticsearch - Fuga de información

#### El puerto 9200 aloja Elasticsearch versión 6.4.2.

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

<figure><img src="/files/1546c2b3453fb50f17855680a67cb7d43a837d02" alt=""><figcaption></figcaption></figure>

Accediendo a la `/_cat/indices?` La URL devuelve una lista de índices con sus UUID. Para extraer el contenido de un índice, usa la siguiente URL:

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

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

**Filtrado de datos con Curl**

Usando las `citas` índice y al filtrar por la palabra clave del desafío, se encuentra información relevante:

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

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

**Decodificación de cadenas codificadas en Base64**

Se recuperan dos cadenas codificadas en base64. Al decodificarlas, se revelan las credenciales:

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

<figure><img src="/files/149755c803e5bb81c693b13905a1f02291df2c0e" alt=""><figcaption></figcaption></figure>

**Usuario:** `security`/ **Contraseña:** `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/es/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.
