项目说明
scan4log4shell
> Scanner to send specially crafted requests and catch callbacks of systems that are impacted by log4j log4shell and to detect log4j on your local file-system
Features
Local and remote scannerSupports URL and CIDR scansSupports DNS, LDAP & TCP callbacks for discovery and Fuzzing of 50 HTTP request headers by defaultFuzzing of HTTP POST data parametersFuzzing of JSON data parametersHTTP Form detection & fuzzingAuth detection & fuzzing (Basic & Bearer)WAF Bypass payloadsBackground
C is a remote code execution (RCE) in Apache Log4j 2. An unauthenticated, remote attacker could exploit this flaw by sending a specially crafted request to a ser a of log4j. The crafted request uses a Ja and Directory Interface (JNDI) injection via a of services including:
Lightweight Directory Access Protocol (LDAP)Secure LDAP (LDAPS)Remote Method In (RMI)Domain Name Service (DNS):warning: There is a patch bypass on Log4J v2.15.0: C
:warning: Log4J v2.16 High Se discovered: C
Installing
You can install the pre-compiled binary in several different ways
homebrew tap:
scoop:
deb/rpm/apk:
Download the .deb, .rpm or .apk from the releases page and install them with the appropriate tools.
manually:
Download the pre-compiled binaries from the releases page and copy to the desired location.
Building from source
Install a Go 1.17 compiler.
Most system Go compiler come with OS are older than 1.17.
Run the following command in the checked-out repository:
(Add the appropriate .exe extension on Windows systems, of course.)
Docker Support
Usage
Catch
Start a standalone callback catcher
Local
Detect log4j on your file-system
Example
Remote
Send specially crafted requests and catch callbacks of systems that are impacted by log4j log4shell
Remote CIDR
Send specially crafted requests to a cidr
Remote url
Send specially crafted requests to an url
Example
Custom Payloads
If you specify a file with custom payloads, you can use the following placeholders for callback address and resource:
{{ .CADDR }}{{ .Resource }}For example:
You can find more examples here
References
License
MIT
项目信息
开发语言:Go
Star 数:12
技术要点
该项目属于安全软件方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕Scanner to send specially crafted requests and catch callbacks of systems that are impacted by log4j log4shell vulnerability and to detect vulnerable log4j versions on your local file-system展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
使用与学习建议
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
免责声明
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。