苏州众里数码半导体行业信息安全专家

服务热线:18625216903
众里成立8大社群,1000+CIO人才构建行业生态链

苏州众里Apache Log4j2 漏洞处置建议

2021-12-17

    近日,网络上出现 Apache Log4j2 远程代码执行漏洞。目前已成为当前知名漏洞,且其漏洞利用办法已在互联网中广为流传,其危害性使得该漏洞吸引了安全圈所有人的目光。

    攻击者可利用该漏洞构造特殊的数据请求包,最终触发远程代码执行。由于该漏洞影响范围极广,建议广大用户及时排查相关漏洞。

该漏洞已与昨日(12 月 14 日)正式命名,详见:

CVE-2021-45046(原编号 CVE-2021-44228):

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-45046

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228

CNVD-2021-95919(原编号 CNVD-2021-95914):

https://www.cnvd.org.cn/flaw/show/CNVD-2021-95919

https://www.cnvd.org.cn/flaw/show/CNVD-2021-95914

【漏洞危害】

    Apache Log4j2 是一款开源的 Java 日志记录工具,大量的业务框架都使用了该组件。存在 JNDI 注入漏洞,当程序将用户输入的数据进行日志记录时,即可触发此漏洞,攻击者可利用该漏洞在未授权的情况下,构造恶意数据进行远程代码执行攻击,最终获取服务器最高权限。

编辑搜图

请点击输入图片描述(最多18字)

【危害级别】

    高危

【漏洞原理】

    此次漏洞是用于 Log4j2 提供的 lookup 功能造成的,该功能允许开发者通过一些协议去读取相应环境中的配置。但在实现的过程中,并未对输入进行严格的判断,从而造成漏洞的发生。既:在打印日志的时候,如果日志内容中包含特殊关键词,攻击者就能将关键字所包含的内容当作变量来替换成任何攻击命令,并且执行。

【影响范围】

目前受影响的 Apache Log4j2 版本:

Apache Log4j 2.x <= 2.15.0-rc1

目前已知影响的组件包括但不仅限于:

Apache Struts2

Apache Solr

Apache Flink

Apache Druid

flume

dubbo

logstash

VMware Horizon

VMware vCenter Server

VMware HCX

VMware NSX-T Data Center

VMware Unified Access Gateway

VMware WorkspaceOne Access

VMware Identity Manager`

VMware vRealize Operations

VMware vRealize Operations Cloud Proxy

VMware vRealize Log Insight

VMware vRealize Automation

VMware vRealize Lifecycle Manager

VMware Telco Cloud Automation

VMware Site Recovery Manager

VMware Carbon Black Cloud Workload Appliance

VMware Carbon Black EDR Server

VMware Tanzu GemFire

VMware Tanzu Greenplum

VMware Tanzu Operations Manager

VMware Tanzu Application Service for VMs

VMware Tanzu Kubernetes Grid Integrated Edition

VMware Tanzu Observability by Wavefront Nozzle

Healthwatch for Tanzu Application Service

Spring Cloud Services for VMware Tanzu

Spring Cloud Gateway for VMware Tanzu

Spring Cloud Gateway for Kubernetes


API Portal for VMware Tanzu

Single Sign-On for VMware Tanzu Application Service

App Metrics

VMware vCenter Cloud Gateway

VMware Tanzu SQL with MySQL for VMs

VMware vRealize Orchestrator

VMware Cloud Foundation

VMware Workspace ONE Access Connector

VMware Horizon DaaS

VMware Horizon Cloud Connector

【排查办法】

1、文件排查:

    在应用内部搜索 log4j-core-*.jar 以及 log4j-api-*.jar 两个关键字,查看其版本是否在受影响的版本范围中。

Windows 搜索:*log4j*.jar

编辑搜图

请点击输入图片描述(最多18字)

Linux 搜索:sudo find / -name "*log4j-*.jar"

编辑搜图

请点击输入图片描述(最多18字)

2、代码排查:

查看 pom.xml 是否引入 org.apache.logging.log4j、org.apache.logging.log4j2。也可以通过查看内部 JAVA 源代码库中所引入的组件清单列表来确认是否引入了 Apache Log4j2.x 的 Jar 包。

请点击输入图片描述(最多18字)

3、网内排查:

积极联系自己网内涉及的各品牌软硬原厂,确认该软硬件产品是否涉及该漏洞,并获取

原厂的升级补丁。

【处置办法】

1、升级 Log4j2 至 log4j-2.16.0-rc1 版本

官网地址:

https://github.com/apache/logging-log4j2/releases/tag/log4j-2.16.0-rc1

2、建议同时采用如下临时措施进行漏洞防范:

(1)、添加 jvm 启动参数-Dlog4j2.formatMsgNoLookups=true;

(2)、在应用 classpath 下添加 log4j2.component.properties 配置文件,文件内容为

log4j2.formatMsgNoLookups=true;

(3)、设置系统环境变量 FORMAT_MESSAGES_PATTERN_DISABLE_LOOKUPS 设置为

true

(4)、建议使用 11.0.1、8u191、7u201、6u211 及以上的高版本 JDK。

相关推荐
  • 2014.01.05

咨询热线

18625216903