
취약한 elfinder 버전을 nginx와 apache 서버 모두에 설정할 수 있는 Docker 컨테이너입니다. 취약점 PoC를 테스트하는 데 사용할 수 있습니다.
이 저장소는 Docker를 사용하여 CVE-2021-23394 (elFinder의 임의 파일 실행)의 재현 환경을 제공합니다. 취약한 버전과 패치된 버전을 Apache와 Nginx에서 비교할 수 있도록 4가지 환경을 설정합니다.
설정은 다음을 포함합니다:
8080): Apache에서 elFinder 2.1.578081): Apache에서 elFinder 2.1.668082): Nginx에서 elFinder 2.1.578083): Nginx에서 elFinder 2.1.66설정 스크립트를 실행 가능하게 만드세요 (아직 아니라면):
chmod +x setup_containers.sh
설정 스크립트를 실행하세요:
./setup_containers.sh
이 명령은 Docker 이미지를 빌드하고 컨테이너를 시작합니다.
브라우저에서 다음 주소로 elFinder 인터페이스에 접근할 수 있습니다:
취약점 (또는 패치)을 확인하려면 적절한 템플릿과 함께 Nuclei를 사용하세요.
다음 명령을 실행하세요 (path-to-nuclei-templates를 실제 템플릿 디렉토리 경로로 대체):
# Apache 취약 테스트 (취약해야 함)
nuclei -t path-to-nuclei-templates/http/cves/2021/CVE-2021-23394.yaml -u http://localhost:8080
# Apache 패치됨 테스트 (취약하지 않아야 함)
nuclei -t path-to-nuclei-templates/http/cves/2021/CVE-2021-23394.yaml -u http://localhost:8081
# Nginx 취약 테스트 (취약해야 함)
nuclei -t path-to-nuclei-templates/http/cves/2021/CVE-2021-23394.yaml -u http://localhost:8082
# Nginx 패치됨 테스트 (취약하지 않아야 함)
nuclei -t path-to-nuclei-templates/http/cves/2021/CVE-2021-23394.yaml -u http://localhost:8083
또는 targets.txt 파일을 만들어 한 번에 모두 테스트할 수 있습니다:
echo -e "http://localhost:8080\nhttp://localhost:8081\nhttp://localhost:8082\nhttp://localhost:8083" > targets.txt
nuclei -t path-to-nuclei-templates/http/cves/2021/CVE-2021-23394.yaml -l targets.txt
예상 결과:
컨테이너를 중지하고 제거하려면 스크립트 내의 정리 명령을 실행하거나 수동으로 실행할 수 있습니다:
docker rm -f elfinder-apache-vuln elfinder-apache-patched elfinder-nginx-vuln elfinder-nginx-patched