3 ms·
For what it's worth, I get the error: ln: failed to create hard link `/tmp/exploit/target' => `/bin/ping': Invalid cross-device link Are there any other wa
by DisposaBoy 16y ago
For what it's worth, I get the error:
ln: failed to create hard link `/tmp/exploit/target' => `/bin/ping': Invalid cross-device link
Are there any other way to do this without ln?
I have no binaries on non-root-writable filesystems. tmp is on tmpfs, / and /home are on their own filesystems so I'd need to be root to create the files on a partition that this could work from.
- mhansen 16y agoDoesn't sound like it. Sounds like you need a setuid binary on a filesystem you can link to. You can use find to see if you have a setuid binary anywhere in your filesystem: find / -perm -4000 2>/dev/null
- lincolnq 16y agoNo. You have one of the workarounds the author suggests, which is only allowing users to write to nosuid mounts.
- swalberg 16y agoYour /tmp is on a separate file system than /bin. _Hard_ links point to the same inode, therefore both parts of your link must be on the same file system (as opposed to a soft link, which is a separate inode saying "hey buddy, go over there"). It might work in something like /var/tmp, assuming that's not a soft link to /tmp like some systems do, or a separate file system.