国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

ElasticSearch單機(jī)或集群未授權(quán)訪問(wèn)漏洞

這篇具有很好參考價(jià)值的文章主要介紹了ElasticSearch單機(jī)或集群未授權(quán)訪問(wèn)漏洞。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

漏洞處理方法:

1、可以使用系統(tǒng)防火墻

來(lái)做限制只允許ES集群和Server節(jié)點(diǎn)的IP來(lái)訪問(wèn)漏洞節(jié)點(diǎn)的9200端口,其他的全部拒絕。

2、在ES節(jié)點(diǎn)上設(shè)置用戶密碼

漏洞現(xiàn)象:直接訪問(wèn)9200端口不需要密碼驗(yàn)證

修復(fù)過(guò)程

2.1 生成認(rèn)證文件

必須要生成認(rèn)證文件,且ES配置文件里要引用這些生成的認(rèn)證文件,否則啟動(dòng)ES的時(shí)候,日志會(huì)報(bào)錯(cuò):Caused by: javax.net.ssl.SSLHandshakeException: No available authentication scheme。
CA 證書

[root@node1 elasticsearch-7.6.2]# su es
[es@node1 elasticsearch-7.6.2]$ ./bin/elasticsearch-certutil ca
This tool assists you in the generation of X.509 certificates and certificate
signing requests for use with SSL/TLS in the Elastic stack.

The 'ca' mode generates a new 'certificate authority'
This will create a new X.509 certificate and private key that can be used
to sign certificate when running in 'cert' mode.

Use the 'ca-dn' option if you wish to configure the 'distinguished name'
of the certificate authority

By default the 'ca' mode produces a single PKCS#12 output file which holds:
    * The CA certificate
    * The CA's private key

If you elect to generate PEM format certificates (the -pem option), then the output will
be a zip file containing individual files for the CA certificate and private key

Please enter the desired output file [elastic-stack-ca.p12]: 
Enter password for elastic-stack-ca.p12 :

elasticsearch未授權(quán)訪問(wèn)漏洞修復(fù),linux運(yùn)維,elasticsearch,大數(shù)據(jù),搜索引擎,linux,運(yùn)維,centos,全文檢索

2.2 生成p12密鑰

使用第一步生成的證書,生成p12秘鑰

[es@node1 elasticsearch-7.6.2]$ ./bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12 
This tool assists you in the generation of X.509 certificates and certificate
signing requests for use with SSL/TLS in the Elastic stack.

The 'cert' mode generates X.509 certificate and private keys.
    * By default, this generates a single certificate and key for use
       on a single instance.
    * The '-multiple' option will prompt you to enter details for multiple
       instances and will generate a certificate and key for each one
    * The '-in' option allows for the certificate generation to be automated by describing
       the details of each instance in a YAML file

    * An instance is any piece of the Elastic Stack that requires an SSL certificate.
      Depending on your configuration, Elasticsearch, Logstash, Kibana, and Beats
      may all require a certificate and private key.
    * The minimum required value for each instance is a name. This can simply be the
      hostname, which will be used as the Common Name of the certificate. A full
      distinguished name may also be used.
    * A filename value may be required for each instance. This is necessary when the
      name would result in an invalid file or directory name. The name provided here
      is used as the directory name (within the zip) and the prefix for the key and
      certificate files. The filename is required if you are prompted and the name
      is not displayed in the prompt.
    * IP addresses and DNS names are optional. Multiple values can be specified as a
      comma separated string. If no IP addresses or DNS names are provided, you may
      disable hostname verification in your SSL configuration.

    * All certificates generated by this tool will be signed by a certificate authority (CA).
    * The tool can automatically generate a new CA for you, or you can provide your own with the
         -ca or -ca-cert command line options.

By default the 'cert' mode produces a single PKCS#12 output file which holds:
    * The instance certificate
    * The private key for the instance certificate
    * The CA certificate

If you specify any of the following options:
    * -pem (PEM formatted output)
    * -keep-ca-key (retain generated CA key)
    * -multiple (generate multiple certificates)
    * -in (generate certificates from an input file)
then the output will be be a zip file containing individual certificate/key files

Enter password for CA (elastic-stack-ca.p12) : 

Please enter the desired output file [elastic-certificates.p12]: 
Enter password for elastic-certificates.p12 : 

Certificates written to /home/elasticsearch-7.6.2/elastic-certificates.p12

This file should be properly secured as it contains the private key for 
your instance.

This file is a self contained file and can be copied and used 'as is'
For each Elastic product that you wish to configure, you should copy
this '.p12' file to the relevant configuration directory
and then follow the SSL configuration instructions in the product guide.

For client applications, you may only need to copy the CA certificate and
configure the client to trust this certificate.

elasticsearch未授權(quán)訪問(wèn)漏洞修復(fù),linux運(yùn)維,elasticsearch,大數(shù)據(jù),搜索引擎,linux,運(yùn)維,centos,全文檢索

2.3 將p12認(rèn)證文件copy到其他節(jié)點(diǎn)

[es@node1 elasticsearch-7.6.2]$ cd config/
[es@node1 config]$ ll
total 36
-rw-rw---- 1 es es  3284 Dec 14 07:49 elasticsearch.yml
-rw-rw---- 1 es es  2301 Mar 26  2020 jvm.options
-rw-rw---- 1 es es 17545 Mar 26  2020 log4j2.properties
-rw-rw---- 1 es es   473 Mar 26  2020 role_mapping.yml
-rw-rw---- 1 es es   197 Mar 26  2020 roles.yml
-rw-rw---- 1 es es     0 Mar 26  2020 users
-rw-rw---- 1 es es     0 Mar 26  2020 users_roles
[es@node1 config]$ mkdir certs
[es@node1 config]$ cp ../elastic-certificates.p12 certs/
[root@node1 elasticsearch-7.6.2]# scp -r config node2:/home/elasticsearch-7.6.2/
log4j2.properties                                                                                100%   17KB  12.2MB/s   00:00    
users_roles                                                                                      100%    0     0.0KB/s   00:00    
roles.yml                                                                                        100%  197   406.7KB/s   00:00    
users                                                                                            100%    0     0.0KB/s   00:00    
role_mapping.yml                                                                                 100%  473     1.0MB/s   00:00    
elasticsearch.yml                                                                                100% 3284     3.2MB/s   00:00    
jvm.options                                                                                      100% 2301     4.4MB/s   00:00    
elastic-certificates.p12                                                                         100% 3443     3.1MB/s   00:00    
[root@node1 elasticsearch-7.6.2]# scp -r config node3:/home/elasticsearch-7.6.2/
log4j2.properties                                                                                100%   17KB  14.6MB/s   00:00    
users_roles                                                                                      100%    0     0.0KB/s   00:00    
roles.yml                                                                                        100%  197   492.4KB/s   00:00    
users                                                                                            100%    0     0.0KB/s   00:00    
role_mapping.yml                                                                                 100%  473     1.1MB/s   00:00    
elasticsearch.yml                                                                                100% 3284     2.7MB/s   00:00    
jvm.options                                                                                      100% 2301     5.0MB/s   00:00    
elastic-certificates.p12                                                                         100% 3443     3.9MB/s   00:00    
[root@node1 elasticsearch-7.6.2]#

2.4 修改所有ES節(jié)點(diǎn)配置文件

xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: certs/elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: certs/elastic-certificates.p12

elasticsearch未授權(quán)訪問(wèn)漏洞修復(fù),linux運(yùn)維,elasticsearch,大數(shù)據(jù),搜索引擎,linux,運(yùn)維,centos,全文檢索

2.5 啟動(dòng)集群各節(jié)點(diǎn)

[es@node1 elasticsearch-7.6.2]$ ./bin/elasticsearch -d

2.6 自動(dòng)生成密碼

集群也是一臺(tái)節(jié)點(diǎn)生成密碼即可

[es@node1 elasticsearch-7.6.2]$ ./bin/elasticsearch-setup-passwords auto
Initiating the setup of passwords for reserved users elastic,apm_system,kibana,logstash_system,beats_system,remote_monitoring_user.
The passwords will be randomly generated and printed to the console.
Please confirm that you would like to continue [y/N]y


Changed password for user apm_system
PASSWORD apm_system = BY8QVLtnyPiIKQKWB9TH

Changed password for user kibana
PASSWORD kibana = 4MLTzLOC6LGYHkGw0YuW

Changed password for user logstash_system
PASSWORD logstash_system = GatyQw87IIPPs8dNReSf

Changed password for user beats_system
PASSWORD beats_system = WsahN3DcIKa4514sxv4n

Changed password for user remote_monitoring_user
PASSWORD remote_monitoring_user = KBqzFIkgkxytVpswaJW6

Changed password for user elastic
PASSWORD elastic = ltwcC9q77f0yZMV9CPWl

[es@node1 elasticsearch-7.6.2]$

elasticsearch未授權(quán)訪問(wèn)漏洞修復(fù),linux運(yùn)維,elasticsearch,大數(shù)據(jù),搜索引擎,linux,運(yùn)維,centos,全文檢索

3、驗(yàn)證漏洞是否修復(fù)成功

elasticsearch未授權(quán)訪問(wèn)漏洞修復(fù),linux運(yùn)維,elasticsearch,大數(shù)據(jù),搜索引擎,linux,運(yùn)維,centos,全文檢索文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-787323.html

[es@node1 elasticsearch-7.6.2]$ curl http://192.168.200.167:9200/_cat/indices?pretty  -u elastic

到了這里,關(guān)于ElasticSearch單機(jī)或集群未授權(quán)訪問(wèn)漏洞的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • ElasticSearch9200端口未授權(quán)訪問(wèn)漏洞修復(fù)

    ElasticSearch9200端口未授權(quán)訪問(wèn)漏洞修復(fù)

    ElasticSearch 是一款Java編寫的企業(yè)級(jí)搜索服務(wù),啟動(dòng)此服務(wù)默認(rèn)會(huì)開放HTTP-9200端口,可被非法操作數(shù)據(jù)。 例如 ip:9200/_cat可以直接訪問(wèn)等。。 高危 9200端口不對(duì)外開放,如需開放,需在安全組限制只允許指定IP才能訪問(wèn)9200端口 // accept // drop // 保存規(guī)則 重啟iptables 這就成功了,親

    2024年02月11日
    瀏覽(24)
  • elasticsearch未授權(quán)訪問(wèn)漏洞怎么在日常的測(cè)試中發(fā)現(xiàn)

    elasticsearch未授權(quán)訪問(wèn)漏洞怎么在日常的測(cè)試中發(fā)現(xiàn)

    你好!在日常測(cè)試中容易遺漏的嚴(yán)重風(fēng)險(xiǎn)的漏洞,本文可以幫助安全測(cè)試工程師在日常測(cè)試中不遺漏這個(gè)嚴(yán)重風(fēng)險(xiǎn)的漏洞。 Elasticsearch 是一個(gè)分布式、高擴(kuò)展、高實(shí)時(shí)的搜索與數(shù)據(jù)分析引擎。它能很方便的使大量數(shù)據(jù)具有搜索、分析和探索的能力。充分利用Elasticsearch的水平伸

    2023年04月16日
    瀏覽(18)
  • elasticsearch單機(jī)多節(jié)點(diǎn)集群搭建

    elasticsearch單機(jī)多節(jié)點(diǎn)集群搭建

    elasticsearch7開始不支持單機(jī)多節(jié)點(diǎn)部署 centos服務(wù)器兩臺(tái):10.188.131.247、10.20.148.122 elasticsearch-6.8.23、kibana-6.8.23安裝包下載(下載地址:https://www.elastic.co/cn/downloads/past-releases#elasticsearch) 新增es用戶(elasticsearch不能用root用戶啟動(dòng)) 集群概覽:3個(gè)master節(jié)點(diǎn),3個(gè)數(shù)據(jù)節(jié)點(diǎn) 服務(wù)器

    2024年02月12日
    瀏覽(34)
  • 單機(jī)多節(jié)點(diǎn) elasticsearch 集群安全認(rèn)證

    es 版本:7.6.2 部署環(huán)境:CentOS Linux release 7.6.1810 (Core) cd 到 es 的安裝目錄,并執(zhí)行下面的命令來(lái)生成 ca 證書: 碰到第一個(gè)直接回車,不用管。 碰到第二個(gè)輸入密碼,例如 123456。 完成后會(huì)在當(dāng)前目錄生成一個(gè)文件: elastic-stack-ca.p12 需要輸入密碼時(shí)就直接輸入剛才的密碼,需

    2024年02月09日
    瀏覽(18)
  • web滲透測(cè)試漏洞復(fù)現(xiàn):Elasticsearch未授權(quán)漏洞復(fù)現(xiàn)

    Elasticsearch 是一款 Java 編寫的企業(yè)級(jí)搜索服務(wù),它以分布式多用戶能力和全文搜索引擎為特點(diǎn),采用 RESTful web 接口。這款搜索引擎由 Java 開發(fā),作為 Apache 許可下的開源軟件發(fā)布,是流行的企業(yè)級(jí)搜索引擎之一。Elasticsearch 的增刪改查操作都通過(guò) http 接口完成。開源的版本可能

    2024年04月10日
    瀏覽(27)
  • CentOS7下安裝ElasticSearch7.6.1詳細(xì)教程(單機(jī)、集群搭建)

    CentOS7下安裝ElasticSearch7.6.1詳細(xì)教程(單機(jī)、集群搭建)

    CentOS 7下安裝ElasticSearch7.6.1詳細(xì)教程 ElasticSearch客戶端Kibana7.6.1安裝教程 ElasticSearch分詞器IK安裝教程 Elasticsearch-head插件安裝教程 想要學(xué)習(xí)ElasticSearch技術(shù),需要在服務(wù)器搭建ElasticSearch環(huán)境。 CenOS:7; JDK:1.8; Elasticsearch:7.6.1; ES不能使用root用戶來(lái)啟動(dòng),必須使用普通用戶來(lái)

    2023年04月09日
    瀏覽(22)
  • Docker中部署ElasticSearch 和Kibana,用腳本實(shí)現(xiàn)對(duì)數(shù)據(jù)庫(kù)資源的未授權(quán)訪問(wèn)

    Docker中部署ElasticSearch 和Kibana,用腳本實(shí)現(xiàn)對(duì)數(shù)據(jù)庫(kù)資源的未授權(quán)訪問(wèn)

    圖未保存,不過(guò)文章當(dāng)中的某一步驟可能會(huì)幫助到您,那么:感恩! 1、docker中拉取鏡像 2、熟悉目錄 3、啟動(dòng),訪問(wèn)9200 4、訪問(wèn)測(cè)試 1、下載(同樣使用docker環(huán)境) 2、啟動(dòng) 3、連接測(cè)試easticsearch發(fā)現(xiàn)失敗,是前后端分離開發(fā)存在跨域問(wèn)題,需要在服務(wù)端做CORS的配置 (1)進(jìn)入

    2024年02月04日
    瀏覽(28)
  • 訪問(wèn)elasticsearch集群提示ERROR 新增es數(shù)據(jù)失敗,后臺(tái)日志返回413 Request Entity Too Larg

    訪問(wèn)elasticsearch集群提示ERROR 新增es數(shù)據(jù)失敗,后臺(tái)日志返回413 Request Entity Too Larg

    在運(yùn)維paas云平臺(tái)時(shí)有研發(fā)反饋客戶端訪問(wèn)elasticsearch服務(wù)偶發(fā)性的出現(xiàn)報(bào)錯(cuò),提示報(bào)錯(cuò)如下: 報(bào)錯(cuò)日志內(nèi)容核心點(diǎn)如下: 根據(jù)日志報(bào)錯(cuò)內(nèi)容及研發(fā)反饋的信息得到如下有用信息: 1、連接elasticsearch服務(wù)并請(qǐng)求處理業(yè)務(wù)是偶發(fā)性的提示報(bào)錯(cuò),也就是說(shuō)明elasticsearch服務(wù)是正常的

    2024年04月17日
    瀏覽(16)
  • Web漏洞-未授權(quán)訪問(wèn)漏洞

    未授權(quán)訪問(wèn)漏洞 漏洞介紹: 未授權(quán)訪問(wèn)漏洞就是在不需要請(qǐng)求授權(quán)的情況下對(duì)需要授權(quán)的功能進(jìn)行訪問(wèn)執(zhí)行,通常是由于認(rèn)證頁(yè)面存在缺陷,安全配置不當(dāng)。 漏洞原理: 未授權(quán)訪問(wèn)是系統(tǒng)對(duì)用戶的限制不全,或者無(wú)限制,可以讓用戶或者限制訪問(wèn)的用戶,訪問(wèn)到內(nèi)部的敏感

    2024年02月16日
    瀏覽(29)
  • springboot未授權(quán)漏洞(漏洞復(fù)現(xiàn)Springboot未授權(quán)訪問(wèn)及修復(fù))

    Actuator 的核心是端點(diǎn) Endpoint,它用來(lái)監(jiān)視應(yīng)用程序及交互,spring-boot-actuator 中已經(jīng)內(nèi)置了非常多的Endpoint(health、info、beans、metrics、httptrace、shutdown等等),同時(shí)也允許我們自己擴(kuò)展自己的Endpoints。每個(gè) Endpoint 都可以啟用和禁用。要遠(yuǎn)程訪問(wèn) Endpoint,還必須通過(guò) JMX 或 HTTP 進(jìn)

    2024年02月05日
    瀏覽(27)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包