ElasticSearch漏洞检测
2020-06-06 本文已影响0人
migrate_
- ElasticSearch
- Elasticsearch服务普遍存在一个未授权访问的问题,攻击者通常可以请求一个开放9200或9300的服务器进行恶意攻击。

- 安装插件(Chrome插件elasticsearch-head)
- 因为Chrome商店不能使用,安装插件很麻烦。
- 可以在github上下载elasticsearch-Head插件:https://github.com/mobz/elasticsearch-head/blob/master/crx/es-head.crx
下载到本地。 - 如果直接拖拽到Chrome会不能使用,告诉你非Chrome来源的。
- 这个时候将文件后缀名".crx"改为“.rar”,然后解压到文件夹里,再通过Chrome“加载已解压的扩展程序”按钮加入文件夹就可以使用了。


- 随便找个漏洞来验证一下

命令执行漏洞
- 该漏洞需要es中至少存在一条数据,若没有,需要先创建一条数据(可以利用火狐hackbar直接提交数据)
POST /website/blog/ HTTP/1.1
Host: your-ip:9200
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 25
{
"name": "phithon"
}

- 添加了数据就可以用漏洞利用工具执行命令(为所欲为)
