Apache Log4j 远程代码执行漏洞的响应 (CVE-2021-44228)--vCenter Server6.5实践--临时解决方案

简介: Apache Log4j 远程代码执行漏洞的响应 (CVE-2021-44228)核弹级漏洞,在VMware补丁没出之前,根据官方临时缓解办法总结出的方案

0.建议操作前系统做快照

vMON

1.停止vcenter服务

cd "C:\Program Files\VMware\vCenter Server\bin"

执行

.\service-control --stop --all

2.备份vsphere-ui.jsonvsphere-client.jsonc:\Log4j(环境中没有更改的用例,所以备份可以忽略)

C:\ProgramData\VMware\vCenterServer\cfg\vmware-vmon\svcCfgfiles\

执行 :

copy .\vsphere-ui.json ,.\vsphere-client.json C:\Log4j\

 

3.接下来检查两个脚本中的参数,但是在我的环境中一条都没有符合

example of types of lines to remove

// Enable remote debugging

// NOTE: Use this option only when you really need it. Don't keep it on by default.

//       It has the potential to cause memory leaks. For further details, see

//       https://bugs.openjdk.java.net/browse/JDK-8164921 as well as our own

//      observations at PR 1878411, comments 21, 33, 34, and 35

//"-Xdebug",

//"-Xnoagent",

//"-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8002",

// Enable JMX

//"-Dcom.sun.management.jmxremote",

//"-Dcom.sun.management.jmxremote.port=9876",

//"-Dcom.sun.management.jmxremote.local.only=false",

//"-Dcom.sun.management.jmxremote.authenticate=false",

//"-Dcom.sun.management.jmxremote.ssl=false",5-bri

 

C:\ProgramData\VMware\vCenterServer\cfg\vmware-vmon\svcCfgfiles\vsphere-client.json

example of types of lines to remove

// This option will be removed soon. See JIRA VSUIP-180

// Enable remote debugging

// NOTE: Use this option only when you really need it. Don't keep it on by default.

//       It has the potential to cause memory leaks. For further details, see

//       https://bugs.openjdk.java.net/browse/JDK-8164921 as well as our own

//      observations at PR 1878411, comments 21, 33, 34, and 35

//"-Xdebug",

//"-Xnoagent",

//"-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8001",

// Enable JMX

//"-Dcom.sun.management.jmxremote",

//"-Dcom.sun.management.jmxremote.port=9875",

//"-Dcom.sun.management.jmxremote.local.only=false",

//"-Dcom.sun.management.jmxremote.authenticate=false",

//"-Dcom.sun.management.jmxremote.ssl=false",

 

Note: Do not simply uncomment these lines. Remove them completely.

4.执行vMON.py

cd "C:\Program Files\VMware\vCenter Server\python"

.\python.exe vMON.py

5.重启服务(建议最后执行)

 .\service-control --start --all

 .\service-control --status

STS

1.备份wrapper.conf

copy C:\ProgramData\VMware\vCenterServer\runtime\VMwareSTSService\conf\wrapper.conf C:\Log4j

\sts-wrapper.conf

2.Java Additional Parameters末尾添加

wrapper.java.additional.27="-Dlog4j2.formatMsgNoLookups=true"

image.png

 

PSC

1.备份

c:\ProgramData\VMware\vCenterServer\runtime\vmware-psc-client\conf\wrapper.conf

C:\Program Files\VMware\vCenter Server\bin> copy c:\ProgramData\VMware\vCenterServer\runtime\vmware-psc-client\conf\wrapper.conf C:\Log4

j\psc-client-wrapper.conf

2.编辑wrapper.conf,添加 wrapper.java.additional.23="-Dlog4j2.formatMsgNoLookups=true"# Java Additional Parameters" 的最后一项

image.png

Identity Management Service

1.备份注册表

2.在此处添加-Dlog4j2.formatMsgNoLookups=true

image.png

Component Manager

1.备份C:\Program Files\VMware\vCenter Server\cm\lib\log4j-core.jar

copy 'C:\Program Files\VMware\vCenter Server\cm\lib\log4j-core.jar' C:\Log4j\log4j-core.jar

 

2.重命名为.zip,解压log4j-core.jar,删除

core.jar.zip\org\apache\logging\log4j\core\lookup\JndiLookup.class

3.去掉.zip后缀

最后重启vcenter服务

C:\Program Files\VMware\vCenter Server\bin> .\service-control --start --all

目录
相关文章
|
1月前
|
消息中间件 存储 大数据
快手基于Apache Hudi的实践
快手基于Apache Hudi的实践
20 0
|
1月前
|
SQL 关系型数据库 MySQL
Apache Hudi在信息服务行业构建流批一体的实践
Apache Hudi在信息服务行业构建流批一体的实践
61 2
|
2月前
|
存储 监控 安全
360 企业安全浏览器基于阿里云数据库 SelectDB 版内核 Apache Doris 的数据架构升级实践
为了提供更好的日志数据服务,360 企业安全浏览器设计了统一运维管理平台,并引入 Apache Doris 替代了 Elasticsearch,实现日志检索与报表分析架构的统一,同时依赖 Doris 优异性能,聚合分析效率呈数量级提升、存储成本下降 60%....为日志数据的可视化和价值发挥提供了坚实的基础。
360 企业安全浏览器基于阿里云数据库 SelectDB 版内核 Apache Doris 的数据架构升级实践
|
4月前
|
存储 SQL 大数据
带你读《Apache Doris 案例集》—— 01 招商信诺人寿 基于 Apache Doris 统一 OLAP 技术栈实践(1)
带你读《Apache Doris 案例集》—— 01 招商信诺人寿 基于 Apache Doris 统一 OLAP 技术栈实践(1)
142 0
|
4月前
|
SQL 缓存 监控
带你读《Apache Doris 案例集》——03 Apache Doris 在金融壹账通指标中台的应用实践(2)
带你读《Apache Doris 案例集》——03 Apache Doris 在金融壹账通指标中台的应用实践(2)
带你读《Apache Doris 案例集》——03  Apache   Doris  在金融壹账通指标中台的应用实践(2)
|
4月前
|
SQL 运维 数据挖掘
带你读《Apache Doris 案例集》——03 Apache Doris 在金融壹账通指标中台的应用实践(1)
带你读《Apache Doris 案例集》——03 Apache Doris 在金融壹账通指标中台的应用实践(1)
|
1月前
|
存储 分布式计算 Hadoop
Apache Hudi:云数据湖解决方案
Apache Hudi:云数据湖解决方案
13 0
|
1月前
|
存储 SQL 分布式计算
Apache Hudi在Linkflow构建实时数据湖的生产实践
Apache Hudi在Linkflow构建实时数据湖的生产实践
38 0
|
1月前
|
存储 分布式计算 分布式数据库
字节跳动基于Apache Hudi构建EB级数据湖实践
字节跳动基于Apache Hudi构建EB级数据湖实践
25 2
|
1月前
|
存储 SQL 数据管理
字节跳动基于Apache Hudi构建实时数据湖平台实践
字节跳动基于Apache Hudi构建实时数据湖平台实践
39 0

推荐镜像

更多