{"id":13565975,"url":"https://github.com/fullhunt/log4j-scan","last_synced_at":"2025-04-03T23:30:47.927Z","repository":{"id":37409762,"uuid":"437729997","full_name":"fullhunt/log4j-scan","owner":"fullhunt","description":"A fully automated, accurate, and extensive scanner for finding log4j RCE CVE-2021-44228 ","archived":false,"fork":false,"pushed_at":"2022-11-23T18:23:24.000Z","size":70,"stargazers_count":3404,"open_issues_count":35,"forks_count":742,"subscribers_count":55,"default_branch":"master","last_synced_at":"2024-11-04T19:42:28.119Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fullhunt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-13T03:57:50.000Z","updated_at":"2024-11-03T14:41:46.000Z","dependencies_parsed_at":"2022-07-14T04:30:32.504Z","dependency_job_id":null,"html_url":"https://github.com/fullhunt/log4j-scan","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullhunt%2Flog4j-scan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullhunt%2Flog4j-scan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullhunt%2Flog4j-scan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullhunt%2Flog4j-scan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fullhunt","download_url":"https://codeload.github.com/fullhunt/log4j-scan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247097620,"owners_count":20883122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T13:01:59.260Z","updated_at":"2025-04-03T23:30:47.330Z","avatar_url":"https://github.com/fullhunt.png","language":"Python","funding_links":[],"categories":["Python","Recon","扫描器、资产收集、子域名","漏洞扫描","Network","others"],"sub_categories":["网络服务_其他","log4j-scan","Network Vulnerability Scanners"],"readme":"\u003ch1 align=\"center\"\u003elog4j-scan\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003eA fully automated, accurate, and extensive scanner for finding vulnerable log4j hosts\u003c/h4\u003e\n\n![](https://dkh9ehwkisc4.cloudfront.net/static/files/80e52a5b-7d72-44c2-8187-76a2a58f5657-demo.png)\n\n# Features\n\n- Support for lists of URLs.\n- Fuzzing for more than 60 HTTP request headers (not only 3-4 headers as previously seen tools).\n- Fuzzing for HTTP POST Data parameters.\n- Fuzzing for JSON data parameters.\n- Supports DNS callback for vulnerability discovery and validation.\n- WAF Bypass payloads.\n\n---\n\n# 🚨 Annoucement (October 20th, 2022)\n\nFullHunt released an update to identify Apache Commons Text RCE (CVE-2022-42889). Apache Commons Text RCE is highly similar to Log4J RCE, and we recommend patching it as soon as possible. Vulnerable applications allow full remote-code execution. If help is needed in scanning and discovering this vulnerability on your infrastructure, please get in touch at (team@fullhunt.io).\n\n![](https://dkh9ehwkisc4.cloudfront.net/static/files/545a0960-3dc4-4157-bf82-c79d0b73a3e7-CVE-2022-42889-demo.png)\n\n# 🚨 Announcement (December 17th, 2021)\n\nThere is a patch bypass on Log4J v2.15.0 that allows a full RCE. FullHunt added community support for log4j-scan to reliably detect CVE-2021-45046. If you're having difficulty discovering and scanning your infrastructure at scale or keeping up with the Log4J threat, please get in touch at (team@fullhunt.io).\n\n![](https://dkh9ehwkisc4.cloudfront.net/static/files/d385f9d8-e2b1-4d72-b9c2-a62c4c1c34a0-Screenshot-cve-2021-45046-demo.png)\n\n---\n\n# Description\n\nWe have been researching the Log4J RCE (CVE-2021-44228) since it was released, and we worked in preventing this vulnerability with our customers. We are open-sourcing an open detection and scanning tool for discovering and fuzzing for Log4J RCE CVE-2021-44228 vulnerability. This shall be used by security teams to scan their infrastructure for Log4J RCE, and also test for WAF bypasses that can result in achieving code execution on the organization's environment.\n\nIt supports DNS OOB callbacks out of the box, there is no need to set up a DNS callback server.\n\n# Usage\n\n```python\n$ python3 log4j-scan.py -h\npython3 log4j-scan.py -h\n[•] CVE-2021-44228 - Apache Log4j RCE Scanner\n[•] Scanner provided by FullHunt.io - The Next-Gen Attack Surface Management Platform.\n[•] Secure your External Attack Surface with FullHunt.io.\nusage: log4j-scan.py [-h] [-u URL] [-p PROXY] [-l USEDLIST] [--request-type REQUEST_TYPE] [--headers-file HEADERS_FILE] [--run-all-tests] [--exclude-user-agent-fuzzing]\n                     [--wait-time WAIT_TIME] [--waf-bypass] [--custom-waf-bypass-payload CUSTOM_WAF_BYPASS_PAYLOAD] [--test-CVE-2021-45046] [--test-CVE-2022-42889]\n                     [--dns-callback-provider DNS_CALLBACK_PROVIDER] [--custom-dns-callback-host CUSTOM_DNS_CALLBACK_HOST] [--disable-http-redirects]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -u URL, --url URL     Check a single URL.\n  -p PROXY, --proxy PROXY\n                        send requests through proxy\n  -l USEDLIST, --list USEDLIST\n                        Check a list of URLs.\n  --request-type REQUEST_TYPE\n                        Request Type: (get, post) - [Default: get].\n  --headers-file HEADERS_FILE\n                        Headers fuzzing list - [default: headers.txt].\n  --run-all-tests       Run all available tests on each URL.\n  --exclude-user-agent-fuzzing\n                        Exclude User-Agent header from fuzzing - useful to bypass weak checks on User-Agents.\n  --wait-time WAIT_TIME\n                        Wait time after all URLs are processed (in seconds) - [Default: 5].\n  --waf-bypass          Extend scans with WAF bypass payloads.\n  --custom-waf-bypass-payload CUSTOM_WAF_BYPASS_PAYLOAD\n                        Test with custom WAF bypass payload.\n  --test-CVE-2021-45046\n                        Test using payloads for CVE-2021-45046 (detection payloads).\n  --test-CVE-2022-42889\n                        Test using payloads for Apache Commons Text RCE (CVE-2022-42889).\n  --dns-callback-provider DNS_CALLBACK_PROVIDER\n                        DNS Callback provider (Options: dnslog.cn, interact.sh) - [Default: interact.sh].\n  --custom-dns-callback-host CUSTOM_DNS_CALLBACK_HOST\n                        Custom DNS Callback Host.\n  --disable-http-redirects\n                        Disable HTTP redirects. Note: HTTP redirects are useful as it allows the payloads to have a higher chance of reaching vulnerable systems.\n```\n\n## Scan a Single URL\n\n```shell\n$ python3 log4j-scan.py -u https://log4j.lab.secbot.local\n```\n\n## Scan a Single URL using all Request Methods: GET, POST (url-encoded form), POST (JSON body)\n\n```shell\n$ python3 log4j-scan.py -u https://log4j.lab.secbot.local --run-all-tests\n```\n\n## Discover WAF bypasses against the environment.\n\n```shell\n$ python3 log4j-scan.py -u https://log4j.lab.secbot.local --waf-bypass\n```\n\n## Scan a list of URLs\n\n```shell\n$ python3 log4j-scan.py -l urls.txt\n```\n\n# Installation\n\n```\n$ pip3 install -r requirements.txt\n```\n\n# Docker Support\n\n```shell\ngit clone https://github.com/fullhunt/log4j-scan.git\ncd log4j-scan\nsudo docker build -t log4j-scan .\nsudo docker run -it --rm log4j-scan\n\n# With URL list \"urls.txt\" in current directory\ndocker run -it --rm -v $PWD:/data log4j-scan -l /data/urls.txt\n```\n\n# About FullHunt\n\nFullHunt is the next-generation attack surface management platform. FullHunt enables companies to discover all of their attack surfaces, monitor them for exposure, and continuously scan them for the latest security vulnerabilities. All, in a single platform, and more.\n\nFullHunt provides an enterprise platform for organizations. The FullHunt Enterprise Platform provides extended scanning and capabilities for customers. FullHunt Enterprise platform allows organizations to closely monitor their external attack surface, and get detailed alerts about every single change that happens. Organizations around the world use the FullHunt Enterprise Platform to solve their continuous security and external attack surface security challenges.\n\n# Legal Disclaimer\n\nThis project is made for educational and ethical testing purposes only. Usage of log4j-scan for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program.\n\n# License\n\nThe project is licensed under MIT License.\n\n# Author\n\n_Mazin Ahmed_\n\n- Email: _mazin at FullHunt.io_\n- FullHunt: [https://fullhunt.io](https://fullhunt.io)\n- Website: [https://mazinahmed.net](https://mazinahmed.net)\n- Twitter: [https://twitter.com/mazen160](https://twitter.com/mazen160)\n- Linkedin: [http://linkedin.com/in/infosecmazinahmed](http://linkedin.com/in/infosecmazinahmed)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffullhunt%2Flog4j-scan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffullhunt%2Flog4j-scan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffullhunt%2Flog4j-scan/lists"}