
Contêiner Docker para configurar uma versão vulnerável do elfinder em ambos os servidores nginx e apache. Pode ser usado para testar a vulnerabilidade POC.
Este repositório contém uma configuração de reprodução para CVE-2021-23394 (Execução Arbitrária de Arquivos no elFinder) usando Docker. Ele configura quatro ambientes para comparar versões vulneráveis e corrigidas no Apache e Nginx.
A configuração inclui:
8080): elFinder 2.1.57 no Apache8081): elFinder 2.1.66 no Apache8082): elFinder 2.1.57 no Nginx8083): elFinder 2.1.66 no NginxTorne o script de configuração executável (se ainda não estiver):
chmod +x setup_containers.sh
Execute o script de configuração:
./setup_containers.sh
Isso criará as imagens Docker e iniciará os contêineres.
Você pode acessar a interface do elFinder no seu navegador em:
Para verificar a vulnerabilidade (ou a correção), use Nuclei com o template apropriado.
Execute os seguintes comandos (substitua path-to-nuclei-templates pelo caminho real para o diretório de templates):
# Test Apache Vulnerable (should be vulnerable)
nuclei -t path-to-nuclei-templates/http/cves/2021/CVE-2021-23394.yaml -u http://localhost:8080
# Test Apache Patched (should NOT be vulnerable)
nuclei -t path-to-nuclei-templates/http/cves/2021/CVE-2021-23394.yaml -u http://localhost:8081
# Test Nginx Vulnerable (should be vulnerable)
nuclei -t path-to-nuclei-templates/http/cves/2021/CVE-2021-23394.yaml -u http://localhost:8082
# Test Nginx Patched (should NOT be vulnerable)
nuclei -t path-to-nuclei-templates/http/cves/2021/CVE-2021-23394.yaml -u http://localhost:8083
Alternativamente, teste todos de uma vez criando um arquivo 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
Resultados Esperados:
Para parar e remover os contêineres, você pode executar o comando de limpeza dentro do script ou manualmente:
docker rm -f elfinder-apache-vuln elfinder-apache-patched elfinder-nginx-vuln elfinder-nginx-patched