I’d have to check the man page, but I know for a fact that find can do that for you. I’ve done it for that very reason. That and to find world writable files.
-
-
Replying to @DrScriptt
Find as root cannot test for world readable/writable files. It can test the mode bits of the *files*, but cannot take into account parent *directories*. Mode 644 stuff inside a 750 directory is a common pattern. Easiest way to test is to just su to nobody and run plain find.
1 reply 0 retweets 0 likes -
Replying to @DrScriptt @marcan42
Yes creating a hard link to an inode may be tricky, but it’s not impossible.
1 reply 0 retweets 0 likes -
Replying to @DrScriptt
Uh, no, that's impossible (without using root-only debug facilities). Doing so would be a massive security hole.
1 reply 0 retweets 0 likes -
Replying to @marcan42
I’m fairly certain that it is possible to create a hard link to an inode even if you can’t access the directory that the other file linked to the inode is in.
@ssrjazz what do you think? o+w on the inode in question and +w on the directory I’m creating the new link in.1 reply 0 retweets 0 likes -
Replying to @DrScriptt @ssrjazz
Write the code, file the CVE, and get the sweet PoC karma then ;-)
1 reply 0 retweets 0 likes -
Nope. I don’t know how to do it myself. Besides I believe that I’ve read about it multiple times in the past. So nothing new.
1 reply 0 retweets 0 likes -
-
Quick search undeleting open files returns debugfs to create new links to an inode. You just need the inode number and a place to create the link.
2 replies 0 retweets 0 likes
And root access, because debugfs directly modifies the filesystem metadata in the block device.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.