POC详情: e55d06b90774c4e5d4d95d8f9359c9a39cc96461

来源
关联漏洞
标题: Apache Log4j 代码问题漏洞 (CVE-2021-44228)
描述:Apache Log4j是美国阿帕奇(Apache)基金会的一款基于Java的开源日志记录工具。 Apache Log4J 存在代码问题漏洞,攻击者可设计一个数据请求发送给使用 Apache Log4j工具的服务器,当该请求被打印成日志时就会触发远程代码执行。
介绍
# CVE-2021-44228

[![Dockerfile](https://github.com/ahmad4fifz/CVE-2021-44228/actions/workflows/test-dockerfile.yml/badge.svg)](https://github.com/ahmad4fifz/CVE-2021-44228/actions/workflows/test-dockerfile.yml)  [![docker-compose](https://github.com/ahmad4fifz/CVE-2021-44228/actions/workflows/test-docker-compose.yml/badge.svg)](https://github.com/ahmad4fifz/CVE-2021-44228/actions/workflows/test-docker-compose.yml)

This is the deployment for [Spring Boot app](https://github.com/ahmad4fifz/log4shell-vulnerable-app) with Apache Log4j2 that is vulnerable to [CVE-2021-44228](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228) either using **docker-compose** or **Podman**.

## Description:

Apache Log4j2 <=2.14.1 JNDI features used in configuration, log messages, and parameters do not protect against attacker controlled LDAP and other JNDI related endpoints. An attacker who can control log messages or log message parameters can execute arbitrary code loaded from LDAP servers when message lookup substitution is enabled. From log4j 2.15.0, this behavior has been disabled by default. In previous releases (>2.10) this behavior can be mitigated by setting system property "log4j2.formatMsgNoLookups" to &#8220;true&#8221; or it can be mitigated in prior releases (<2.10) by removing the JndiLookup class from the classpath (example: zip -q -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class).

## Deployment:

### Using docker-compose:

```
docker-compose up -d
```

### Using podman: (not tested)

```
sudo podman build -t ahmad4fifz/cve-2021-44228 app/.
sudo podman play kube pods/cve-2021-44228-pod
```

## References:

- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228
- https://nvd.nist.gov/vuln/detail/CVE-2021-44228
- https://logging.apache.org/log4j/2.x/security.html
- https://www.forescout.com/blog/forescout%E2%80%99s-response-to-cve-2021-44228-apache-log4j-2/
- https://www.docker.com/blog/apache-log4j-2-cve-2021-44228/

## License

Released under [MIT](/LICENSE) by [@ahmad4fifz](https://github.com/ahmad4fifz).
文件快照

[4.0K] /data/pocs/e55d06b90774c4e5d4d95d8f9359c9a39cc96461 ├── [4.0K] app │   └── [ 714] Dockerfile ├── [4.0K] data │   └── [ 19M] app.jar ├── [ 610] docker-compose.yml ├── [1.0K] LICENSE ├── [4.0K] pods │   └── [1.1K] cve-2021-44228-pod.yaml ├── [4.0K] proxy │   ├── [ 110] Caddyfile │   └── [ 210] Dockerfile └── [2.0K] README.md 4 directories, 8 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。