Directory traversal

Directory traversal

If we don’t set Directory traversal of then we can see any folder on website. Say for example – http://localhost/demo/mydir/

And it looks like –

vul5_image1

So all the 3 folder are visible to public. Switching off the directory traversal we can hide this folder structure.

Navigate to your root directory or public html folder. IF you don’t have any “.htaccess” file then create it or if it already exists then add the following line –

Options All –Indexes

Now check it again –

vul5_image2

So the user is now unable to traverse our folder structure.

Related posts:

Leave a Reply

Your email address will not be published. Required fields are marked *