
Testare la protezione WAF contro CVE-2021-44228 Log4Shell
Semplice script bash per testare il tuo WAF o altri dispositivi contro le stringhe di attacco Log4Shell e vari bypass
Trucchi di bypass da: https://github.com/Puliczek/CVE-2021-44228-PoC-log4j-bypass-words
Per eseguire:
./cve-2021-44228.sh -t <URL del target> -c <Codice di Stato HTTP atteso>
Oppure per usare i valori predefiniti di https://127.0.0.1 e 403:
./cve-2021-44228.sh
Per ogni stringa di test, questa verrà passata in una richiesta al target utilizzando vari vettori come:
User-AgentEsempio di output:
Test String: ${jndi:}
-------------------------------------------------------------
HEADERS: curl -ksg -w "%{http_code}" https://127.0.0.1 -A '${jndi:}'
403
URI: curl -ksg -w "%{http_code}" 'https://127.0.0.1/${jndi:}'
403
Cookies: curl -ksg -w "%{http_code}" https://127.0.0.1 -b 'session=${jndi:}'
403
Query String: curl -ksg -w "%{http_code}" 'https://127.0.0.1/something?session=${jndi:}'
403
POST Data: curl -X POST -ksg -w "%{http_code}" https://127.0.0.1 -d '${jndi:}'
403