I wonder if there is a way to guess or brute force file names inside a directory that we don't have permission to list what inside it.
I'll explain. we all know that the execution permission of a directory means that (group or other) can traverse this directory to read files inside this directory (the files should have read permission) if he knows the file names.
for exemple :
ls -ld dir1
drwx--x--x 2 root root 4.0K Aug 26 21:18 dir1
sudo ls -lA cs/
-rw-r--r--. 1 root root 0 Aug 26 21:17 f0
-rw-r--r--. 1 root root 0 Aug 26 21:17 f1
-rw-r--r--. 1 root root 0 Aug 26 21:17 f2
note that I used sudo to list files.
I tried to do :
stat dir1/{a..z}{0..9} 1>1.txt 2>/dev/null
cat 1.txt
inside 1.txt I found only stat of exist files, but what about 8, 9 10 characters names ?
any ideas ?
thanks in advance.
Be the First to Respond
Share Your Thoughts