# 9200 - Pentesting Elasticsearch {% hint style="success" %} Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\ Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
Support HackTricks * Check the [**subscription plans**](https://github.com/sponsors/carlospolop)! * **Join the** ๐Ÿ’ฌ [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** ๐Ÿฆ [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.** * **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
{% endhint %} ## Basic information Elasticsearch๋Š” **๋ถ„์‚ฐํ˜•**, **์˜คํ”ˆ ์†Œ์Šค** ๊ฒ€์ƒ‰ ๋ฐ ๋ถ„์„ ์—”์ง„์œผ๋กœ **๋ชจ๋“  ์œ ํ˜•์˜ ๋ฐ์ดํ„ฐ**๋ฅผ ์ฒ˜๋ฆฌํ•ฉ๋‹ˆ๋‹ค. **์†๋„**, **ํ™•์žฅ์„ฑ**, **๊ฐ„๋‹จํ•œ REST API**๋กœ ์ž˜ ์•Œ๋ ค์ ธ ์žˆ์Šต๋‹ˆ๋‹ค. Apache Lucene์„ ๊ธฐ๋ฐ˜์œผ๋กœ ํ•˜๋ฉฐ, 2010๋…„์— Elasticsearch N.V. (ํ˜„์žฌ Elastic๋กœ ์•Œ๋ ค์ง)์—์„œ ์ฒ˜์Œ ์ถœ์‹œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. Elasticsearch๋Š” ๋ฐ์ดํ„ฐ ์ˆ˜์ง‘, ๋ณด๊ฐ•, ์ €์žฅ, ๋ถ„์„ ๋ฐ ์‹œ๊ฐํ™”๋ฅผ ์œ„ํ•œ ์˜คํ”ˆ ์†Œ์Šค ๋„๊ตฌ ๋ชจ์Œ์ธ Elastic Stack์˜ ํ•ต์‹ฌ ๊ตฌ์„ฑ ์š”์†Œ์ž…๋‹ˆ๋‹ค. ์ด ์Šคํƒ์€ ์ผ๋ฐ˜์ ์œผ๋กœ ELK Stack์ด๋ผ๊ณ  ํ•˜๋ฉฐ, Logstash์™€ Kibana๋ฅผ ํฌํ•จํ•˜๊ณ  ์žˆ์œผ๋ฉฐ, ํ˜„์žฌ Beats๋ผ๋Š” ๊ฒฝ๋Ÿ‰ ๋ฐ์ดํ„ฐ ์ „์†ก ์—์ด์ „ํŠธ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ### What is an Elasticsearch index? Elasticsearch **์ธ๋ฑ์Šค**๋Š” **๊ด€๋ จ ๋ฌธ์„œ**์˜ ๋ชจ์Œ์œผ๋กœ **JSON** ํ˜•์‹์œผ๋กœ ์ €์žฅ๋ฉ๋‹ˆ๋‹ค. ๊ฐ ๋ฌธ์„œ๋Š” **ํ‚ค**์™€ ํ•ด๋‹น **๊ฐ’**(๋ฌธ์ž์—ด, ์ˆซ์ž, ๋ถˆ๋ฆฌ์–ธ, ๋‚ ์งœ, ๋ฐฐ์—ด, ์ง€๋ฆฌ์  ์œ„์น˜ ๋“ฑ)์œผ๋กœ ๊ตฌ์„ฑ๋ฉ๋‹ˆ๋‹ค. Elasticsearch๋Š” ๋น ๋ฅธ ์ „์ฒด ํ…์ŠคํŠธ ๊ฒ€์ƒ‰์„ ์šฉ์ดํ•˜๊ฒŒ ํ•˜๊ธฐ ์œ„ํ•ด **์—ญ ์ธ๋ฑ์Šค**๋ผ๋Š” ํšจ์œจ์ ์ธ ๋ฐ์ดํ„ฐ ๊ตฌ์กฐ๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ์ด ์ธ๋ฑ์Šค๋Š” ๋ฌธ์„œ ๋‚ด์˜ ๋ชจ๋“  ๊ณ ์œ  ๋‹จ์–ด๋ฅผ ๋‚˜์—ดํ•˜๊ณ  ๊ฐ ๋‹จ์–ด๊ฐ€ ๋‚˜ํƒ€๋‚˜๋Š” ๋ฌธ์„œ๋ฅผ ์‹๋ณ„ํ•ฉ๋‹ˆ๋‹ค. ์ธ๋ฑ์‹ฑ ๊ณผ์ •์—์„œ Elasticsearch๋Š” ๋ฌธ์„œ๋ฅผ ์ €์žฅํ•˜๊ณ  ์—ญ ์ธ๋ฑ์Šค๋ฅผ ๊ตฌ์„ฑํ•˜์—ฌ ๊ฑฐ์˜ ์‹ค์‹œ๊ฐ„ ๊ฒ€์ƒ‰์„ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•ฉ๋‹ˆ๋‹ค. **์ธ๋ฑ์Šค API**๋Š” ํŠน์ • ์ธ๋ฑ์Šค ๋‚ด์—์„œ JSON ๋ฌธ์„œ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ฑฐ๋‚˜ ์—…๋ฐ์ดํŠธํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. **๊ธฐ๋ณธ ํฌํŠธ**: 9200/tcp ## Manual Enumeration ### Banner Elasticsearch์— ์ ‘๊ทผํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋˜๋Š” ํ”„๋กœํ† ์ฝœ์€ **HTTP**์ž…๋‹ˆ๋‹ค. HTTP๋ฅผ ํ†ตํ•ด ์ ‘๊ทผํ•˜๋ฉด ํฅ๋ฏธ๋กœ์šด ์ •๋ณด๋ฅผ ์ฐพ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค: `http://10.10.10.115:9200/` ![](<../.gitbook/assets/image (294).png>) `/`์— ์ ‘๊ทผํ•  ๋•Œ ํ•ด๋‹น ์‘๋‹ต์ด ๋ณด์ด์ง€ ์•Š์œผ๋ฉด ๋‹ค์Œ ์„น์…˜์„ ์ฐธ์กฐํ•˜์„ธ์š”. ### Authentication **๊ธฐ๋ณธ์ ์œผ๋กœ Elasticsearch๋Š” ์ธ์ฆ์ด ํ™œ์„ฑํ™”๋˜์–ด ์žˆ์ง€ ์•Š์Šต๋‹ˆ๋‹ค**, ๋”ฐ๋ผ์„œ ๊ธฐ๋ณธ์ ์œผ๋กœ ์ž๊ฒฉ ์ฆ๋ช… ์—†์ด ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ๋‚ด์˜ ๋ชจ๋“  ๊ฒƒ์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ธ์ฆ์ด ๋น„ํ™œ์„ฑํ™”๋˜์–ด ์žˆ๋Š”์ง€ ํ™•์ธํ•˜๋ ค๋ฉด ๋‹ค์Œ ์š”์ฒญ์„ ๋ณด๋‚ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค: ```bash curl -X GET "ELASTICSEARCH-SERVER:9200/_xpack/security/user" {"error":{"root_cause":[{"type":"exception","reason":"Security must be explicitly enabled when using a [basic] license. Enable security by setting [xpack.security.enabled] to [true] in the elasticsearch.yml file and restart the node."}],"type":"exception","reason":"Security must be explicitly enabled when using a [basic] license. Enable security by setting [xpack.security.enabled] to [true] in the elasticsearch.yml file and restart the node."},"status":500} ``` **๊ทธ๋Ÿฌ๋‚˜**, `/`์— ์š”์ฒญ์„ ๋ณด๋‚ด๊ณ  ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์‘๋‹ต์„ ๋ฐ›์œผ๋ฉด: ```bash {"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401} ``` ๊ทธ๊ฒƒ์€ ์ธ์ฆ์ด ๊ตฌ์„ฑ๋˜์–ด ์žˆ์œผ๋ฉฐ **์œ ํšจํ•œ ์ž๊ฒฉ ์ฆ๋ช…์ด ํ•„์š”**ํ•˜๋‹ค๋Š” ๊ฒƒ์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฐ ๋‹ค์Œ, [**๋ธŒ๋ฃจํŠธํฌ์Šค๋ฅผ ์‹œ๋„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค**](../generic-methodologies-and-resources/brute-force.md#elasticsearch) (HTTP ๊ธฐ๋ณธ ์ธ์ฆ์„ ์‚ฌ์šฉํ•˜๋ฏ€๋กœ BF HTTP ๊ธฐ๋ณธ ์ธ์ฆ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค).\ ์—ฌ๊ธฐ **๊ธฐ๋ณธ ์‚ฌ์šฉ์ž ์ด๋ฆ„ ๋ชฉ๋ก**์ด ์žˆ์Šต๋‹ˆ๋‹ค: _**elastic** (์Šˆํผ์œ ์ €), remote\_monitoring\_user, beats\_system, logstash\_system, kibana, kibana\_system, apm\_system,_ \_anonymous\_.\_ ์ด์ „ ๋ฒ„์ „์˜ Elasticsearch๋Š” ์ด ์‚ฌ์šฉ์ž์— ๋Œ€ํ•ด ๊ธฐ๋ณธ ๋น„๋ฐ€๋ฒˆํ˜ธ **changeme**๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ``` curl -X GET http://user:password@IP:9200/ ``` ### ๊ธฐ๋ณธ ์‚ฌ์šฉ์ž ์—ด๊ฑฐ ```bash #List all roles on the system: curl -X GET "ELASTICSEARCH-SERVER:9200/_security/role" #List all users on the system: curl -X GET "ELASTICSEARCH-SERVER:9200/_security/user" #Get more information about the rights of an user: curl -X GET "ELASTICSEARCH-SERVER:9200/_security/user/" ``` ### Elastic Info ๋‹ค์Œ์€ elasticsearch์— ๋Œ€ํ•œ **์ •๋ณด**๋ฅผ **์–ป๊ธฐ ์œ„ํ•ด** **GET**์„ ํ†ตํ•ด **์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋Š”** ๋ช‡ ๊ฐ€์ง€ ์—”๋“œํฌ์ธํŠธ์ž…๋‹ˆ๋‹ค: | \_cat | /\_cluster | /\_security | | ------------------------------- | ----------------------------- | ------------------------- | | /\_cat/segments | /\_cluster/allocation/explain | /\_security/user | | /\_cat/shards | /\_cluster/settings | /\_security/privilege | | /\_cat/repositories | /\_cluster/health | /\_security/role\_mapping | | /\_cat/recovery | /\_cluster/state | /\_security/role | | /\_cat/plugins | /\_cluster/stats | /\_security/api\_key | | /\_cat/pending\_tasks | /\_cluster/pending\_tasks | | | /\_cat/nodes | /\_nodes | | | /\_cat/tasks | /\_nodes/usage | | | /\_cat/templates | /\_nodes/hot\_threads | | | /\_cat/thread\_pool | /\_nodes/stats | | | /\_cat/ml/trained\_models | /\_tasks | | | /\_cat/transforms/\_all | /\_remote/info | | | /\_cat/aliases | | | | /\_cat/allocation | | | | /\_cat/ml/anomaly\_detectors | | | | /\_cat/count | | | | /\_cat/ml/data\_frame/analytics | | | | /\_cat/ml/datafeeds | | | | /\_cat/fielddata | | | | /\_cat/health | | | | /\_cat/indices | | | | /\_cat/master | | | | /\_cat/nodeattrs | | | | /\_cat/nodes | | | ์ด ์—”๋“œํฌ์ธํŠธ๋Š” [**๋ฌธ์„œ์—์„œ ๊ฐ€์ ธ์˜จ ๊ฒƒ์ž…๋‹ˆ๋‹ค**](https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-apis.html) ์—ฌ๊ธฐ์—์„œ **๋” ๋งŽ์€** ์ •๋ณด๋ฅผ ์ฐพ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.\ ๋˜ํ•œ, `/_cat`์— ์ ‘๊ทผํ•˜๋ฉด ์‘๋‹ต์—๋Š” ์ธ์Šคํ„ด์Šค์—์„œ ์ง€์›ํ•˜๋Š” `/_cat/*` ์—”๋“œํฌ์ธํŠธ๊ฐ€ ํฌํ•จ๋ฉ๋‹ˆ๋‹ค. `/_security/user`์—์„œ (์ธ์ฆ์ด ํ™œ์„ฑํ™”๋œ ๊ฒฝ์šฐ) ์–ด๋–ค ์‚ฌ์šฉ์ž๊ฐ€ `superuser` ์—ญํ• ์„ ๊ฐ€์ง€๊ณ  ์žˆ๋Š”์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ### Indices `http://10.10.10.115:9200/_cat/indices?v`์— ์ ‘๊ทผํ•˜์—ฌ **๋ชจ๋“  ์ธ๋ฑ์Šค**๋ฅผ **์ˆ˜์ง‘ํ•  ์ˆ˜** ์žˆ์Šต๋‹ˆ๋‹ค. ``` health status index uuid pri rep docs.count docs.deleted store.size pri.store.size green open .kibana 6tjAYZrgQ5CwwR0g6VOoRg 1 0 1 0 4kb 4kb yellow open quotes ZG2D1IqkQNiNZmi2HRImnQ 5 1 253 0 262.7kb 262.7kb yellow open bank eSVpNfCfREyYoVigNWcrMw 5 1 1000 0 483.2kb 483.2kb ``` To obtain **์ •๋ณด๋ฅผ ์–ป์œผ๋ ค๋ฉด ์–ด๋–ค ์ข…๋ฅ˜์˜ ๋ฐ์ดํ„ฐ๊ฐ€ ์ธ๋ฑ์Šค์— ์ €์žฅ๋˜์–ด ์žˆ๋Š”์ง€** `http://host:9200/`์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ๊ฒฝ์šฐ `http://10.10.10.115:9200/bank` ![](<../.gitbook/assets/image (342).png>) ### ๋คํ”„ ์ธ๋ฑ์Šค ๋ชจ๋“  **๋‚ด์šฉ์„ ๋คํ”„ํ•˜๋ ค๋ฉด** ์ธ๋ฑ์Šค์˜ ๋ชจ๋“  ๋‚ด์šฉ์„ ๋คํ”„ํ•˜๋ ค๋ฉด `http://host:9200//_search?pretty=true`์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด `http://10.10.10.115:9200/bank/_search?pretty=true` ![](<../.gitbook/assets/image (914).png>) _์€ํ–‰ ์ธ๋ฑ์Šค ๋‚ด ๊ฐ ๋ฌธ์„œ(ํ•ญ๋ชฉ)์˜ ๋‚ด์šฉ์„ ๋น„๊ตํ•˜๊ณ  ์ด์ „ ์„น์…˜์—์„œ ๋ณธ ์ด ์ธ๋ฑ์Šค์˜ ํ•„๋“œ๋ฅผ ํ™•์ธํ•ด ๋ณด์„ธ์š”._ ๋”ฐ๋ผ์„œ ์ด ์‹œ์ ์—์„œ **"hits" ๋‚ด์— "total"์ด๋ผ๋Š” ํ•„๋“œ๊ฐ€ ์žˆ์–ด** ์ด ์ธ๋ฑ์Šค ๋‚ด์—์„œ **1000๊ฐœ์˜ ๋ฌธ์„œ๊ฐ€ ๋ฐœ๊ฒฌ๋˜์—ˆ์ง€๋งŒ** 10๊ฐœ๋งŒ ๊ฒ€์ƒ‰๋˜์—ˆ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋Š” **๊ธฐ๋ณธ์ ์œผ๋กœ 10๊ฐœ์˜ ๋ฌธ์„œ์— ์ œํ•œ์ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค.**\ ํ•˜์ง€๋งŒ ์ด์ œ **์ด ์ธ๋ฑ์Šค์— 1000๊ฐœ์˜ ๋ฌธ์„œ๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ์•˜์œผ๋ฏ€๋กœ**, **๋ชจ๋‘ ๋คํ”„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.** ์›ํ•˜๋Š” ํ•ญ๋ชฉ ์ˆ˜๋ฅผ **`size`** ๋งค๊ฐœ๋ณ€์ˆ˜์— ์ง€์ •ํ•˜์—ฌ ๋คํ”„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค: `http://10.10.10.115:9200/quotes/_search?pretty=true&size=1000`asd\ _์ฐธ๊ณ : ๋” ํฐ ์ˆซ์ž๋ฅผ ์ง€์ •ํ•˜๋ฉด ๋ชจ๋“  ํ•ญ๋ชฉ์ด ์–ด์จŒ๋“  ๋คํ”„๋ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด `size=9999`๋ฅผ ์ง€์ •ํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, ๋” ๋งŽ์€ ํ•ญ๋ชฉ์ด ์žˆ์„ ๊ฒฝ์šฐ ์ด์ƒํ•  ๊ฒƒ์ž…๋‹ˆ๋‹ค(ํ•˜์ง€๋งŒ ํ™•์ธํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค)._ ### ๋ชจ๋‘ ๋คํ”„ ๋ชจ๋‘ ๋คํ”„ํ•˜๋ ค๋ฉด **์ด์ „๊ณผ ๋™์ผํ•œ ๊ฒฝ๋กœ๋กœ ๊ฐ€๋˜ ์ธ๋ฑ์Šค๋ฅผ ์ง€์ •ํ•˜์ง€ ์•Š๊ณ ** `http://host:9200/_search?pretty=true`์— ์ ‘๊ทผํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด `http://10.10.10.115:9200/_search?pretty=true`\ ์ด ๊ฒฝ์šฐ **๊ธฐ๋ณธ 10๊ฐœ์˜ ๊ฒฐ๊ณผ ์ œํ•œ**์ด ์ ์šฉ๋ฉ๋‹ˆ๋‹ค. `size` ๋งค๊ฐœ๋ณ€์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ **๋” ๋งŽ์€ ๊ฒฐ๊ณผ๋ฅผ ๋คํ”„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.** ๋” ๋งŽ์€ ์ •๋ณด๋Š” ์ด์ „ ์„น์…˜์„ ์ฐธ์กฐํ•˜์„ธ์š”. ### ๊ฒ€์ƒ‰ ์ •๋ณด๋ฅผ ์ฐพ๊ณ  ์žˆ๋‹ค๋ฉด **๋ชจ๋“  ์ธ๋ฑ์Šค์—์„œ ์›์‹œ ๊ฒ€์ƒ‰์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.** `http://host:9200/_search?pretty=true&q=`์— ์ ‘๊ทผํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด `http://10.10.10.115:9200/_search?pretty=true&q=Rockwell` ![](<../.gitbook/assets/image (335).png>) ์ธ๋ฑ์Šค์—์„œ๋งŒ **๊ฒ€์ƒ‰ํ•˜๋ ค๋ฉด** **๊ฒฝ๋กœ**์— ์ธ๋ฑ์Šค๋ฅผ **์ง€์ •**ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค: `http://host:9200//_search?pretty=true&q=` _๊ฒ€์ƒ‰ ์ฝ˜ํ…์ธ ์— ์‚ฌ์šฉ๋˜๋Š” q ๋งค๊ฐœ๋ณ€์ˆ˜๋Š” **์ •๊ทœ ํ‘œํ˜„์‹**์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค._ Elasticsearch ์„œ๋น„์Šค๋ฅผ ํผ์ง•ํ•˜๊ธฐ ์œ„ํ•ด [https://github.com/misalabs/horuz](https://github.com/misalabs/horuz)์™€ ๊ฐ™์€ ๊ฒƒ์„ ์‚ฌ์šฉํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ### ์“ฐ๊ธฐ ๊ถŒํ•œ ์ƒˆ ์ธ๋ฑ์Šค ๋‚ด์— ์ƒˆ ๋ฌธ์„œ๋ฅผ ์ƒ์„ฑํ•˜๋ ค๊ณ  ์‹œ๋„ํ•˜์—ฌ ์“ฐ๊ธฐ ๊ถŒํ•œ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋ช…๋ น์„ ์‹คํ–‰ํ•ด ๋ณด์„ธ์š”: ```bash curl -X POST '10.10.10.115:9200/bookindex/books' -H 'Content-Type: application/json' -d' { "bookId" : "A00-3", "author" : "Sankaran", "publisher" : "Mcgrahill", "name" : "how to get a job" }' ``` ํ•ด๋‹น cmd๋Š” "_bookId_", "_author_", "_publisher_" ๋ฐ "_name_" ์†์„ฑ์„ ๊ฐ€์ง„ `books` ์œ ํ˜•์˜ ๋ฌธ์„œ๋กœ `bookindex`๋ผ๋Š” **์ƒˆ ์ธ๋ฑ์Šค**๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. **์ƒˆ ์ธ๋ฑ์Šค๊ฐ€ ์ด์ œ ๋ชฉ๋ก์— ๋‚˜ํƒ€๋‚˜๋Š”์ง€ ํ™•์ธํ•˜์„ธ์š”**: ![](<../.gitbook/assets/image (130).png>) ๊ทธ๋ฆฌ๊ณ  **์ž๋™์œผ๋กœ ์ƒ์„ฑ๋œ ์†์„ฑ**์„ ์ฃผ๋ชฉํ•˜์„ธ์š”: ![](<../.gitbook/assets/image (434).png>) ## ์ž๋™ ์—ด๊ฑฐ ์ผ๋ถ€ ๋„๊ตฌ๋Š” ์ด์ „์— ์ œ์‹œ๋œ ๋ฐ์ดํ„ฐ ์ค‘ ์ผ๋ถ€๋ฅผ ์–ป์Šต๋‹ˆ๋‹ค: ```bash msf > use auxiliary/scanner/elasticsearch/indices_enum ``` {% embed url="https://github.com/theMiddleBlue/nmap-elasticsearch-nse" %} ## Shodan * `port:9200 elasticsearch` {% hint style="success" %} AWS ํ•ดํ‚น ๋ฐฐ์šฐ๊ธฐ ๋ฐ ์—ฐ์Šตํ•˜๊ธฐ:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\ GCP ํ•ดํ‚น ๋ฐฐ์šฐ๊ธฐ ๋ฐ ์—ฐ์Šตํ•˜๊ธฐ: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
HackTricks ์ง€์›ํ•˜๊ธฐ * [**๊ตฌ๋… ๊ณ„ํš**](https://github.com/sponsors/carlospolop) ํ™•์ธํ•˜๊ธฐ! * **๐Ÿ’ฌ [**Discord ๊ทธ๋ฃน**](https://discord.gg/hRep4RUj7f) ๋˜๋Š” [**ํ…”๋ ˆ๊ทธ๋žจ ๊ทธ๋ฃน**](https://t.me/peass)์— ์ฐธ์—ฌํ•˜๊ฑฐ๋‚˜ **Twitter** ๐Ÿฆ [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**๋ฅผ ํŒ”๋กœ์šฐํ•˜์„ธ์š”.** * **[**HackTricks**](https://github.com/carlospolop/hacktricks) ๋ฐ [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) ๊นƒํ—ˆ๋ธŒ ๋ฆฌํฌ์— PR์„ ์ œ์ถœํ•˜์—ฌ ํ•ดํ‚น ํŒ์„ ๊ณต์œ ํ•˜์„ธ์š”.**
{% endhint %}