黑產團伙正在利用 ES 未授權訪問漏洞實施勒索
VSole2022-08-12 09:07:46
最近在測試 Elasticsearch 的未授權訪問的問題,其本身是一個文檔型數據庫,如果存在未授權訪問的問題,那么就一定存在數據泄漏的風險,如果無任何有效數據,那么也可能被用來存儲違法違規的內容,同樣可以給企業帶來麻煩。
就在昨天,一個知名企業內網被勒索病毒侵襲,造成大面積系統無法正常使用,這給企業帶來的損失是不可估量的,今天我發現了一些針對 Elasticsearch 的勒索方式,以下是其留下的勒索話術:
All indexs has been dropped. But we backup all indexs. The only method of recoveribing database is to pay 0.021 BTC. Transfer to this BTC address 14UCEfQG5vs7kZAbFrcZ7K4BCiEa48mdFu . You can buy bitcoin here, does not take much time to buy https://localbitcoins.com or https://buy.moonpay.io/ . After paying write to me in the mail with your DB IP: recmydata@onionmail.org and you will receive a link to download your database dump.\n
大概意思是說:
es 的所有索引都被刪除了,但是黑客團伙已經備份了所有數據,如果你想恢復這些數據,需要支付 0.021 比特幣。
說是這么說,我認為,大概率支付后也無法恢復數據,這種批量勒索的方式,估計黑客團伙也沒有辦法把所有數據備份,這種就像大海撈針,坑一個算一個,所以建議各家企業自查自家使用的 Elasticsearch 是否存在公網可以訪問并且存在未授權訪問問題的系統。
整體測試下來發現 676 個未授權系統中,有 436 個被該組織發布了勒索信息,勒索比例為 64.5%,這個比例還是蠻高的,這些目標的發現大概率是通過網絡空間搜索引擎,通過搜索端口 9200 開放的目標,批量檢測并添加勒索信息。
下面以其中一個例子來看看該黑客團伙留下的信息,首先通過訪問路徑 /_cat/indices 查看所有索引信息:

圖中索引 read_me 就是黑客團隊創建的一個索引,用來提醒企業進行勒索,編寫一個簡易 python 腳本來獲取一下這個索引的內容:
#coding: utf-8
import sys
import json
import gzip
import getopt
from datetime import datetime
from elasticsearch import Elasticsearch, helpers
import warnings
def read_elastic(es_host, index):
body = {'query': {'match_all':{}}}
elastic = Elasticsearch(es_host)
res = elastic.search(index=index, body=body, scroll='3m', size=1, request_timeout=60)
print(es_host, index, res)
if __name__=="__main__":
read_elastic(sys.argv[1], sys.argv[2])
VSole
網絡安全專家