
Un honeypot per la vulnerabilità Log4Shell (CVE-2021-44228).
Un honeypot per la vulnerabilità Log4Shell (CVE-2021-44228).
Licenza: GPLv3.0
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 -git clone https://github.com/thomaspatzke/Log4Pot.gitcd Log4Potapt install libcurl4-openssl-dev libssl-dev python3-dev build-essentialpoetry installpoetry run python log4pot.py --help per una panoramica.poetry run python log4pot.py @log4pot.confIn alternativa, è possibile eseguire log4pot anche senza dipendenze esterne:
$ python log4pot.py @log4pot.conf
Questo eseguirà log4pot senza il supporto per la registrazione su Azure Blob Storage.
Per reindirizzare il traffico verso le porte 80 e 443 a Log4Pot, usare i seguenti comandi iptables:
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8443
Lo script log4pot-loganalyzer.py estrae tutti i payload, li decodifica con il decoder corrente e costruisce una timeline da entrambi. L'utilizzo è il seguente:
python log4pot-loganalyzer.py -o <output directory> <input log files>
Elenca i payload dai tentativi di exploit:
select(.type == "exploit") | .payload
Decodifica tutti i payload codificati in base64 dall'exploit JNDI:
select(.type == "exploit" and (.payload | contains("Base64"))) | .payload | sub(".*/Base64/"; "") | sub ("}$"; "") | @base64d
Estrai tutti gli hash SHA256 dai file scaricati dagli URL:
[ .[] | select(.type == "payload") | .urls | select((. | length) > 0) | to_entries | .[].value | select((. | length) == 64) ] | unique | .[]