LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-21-2018, 03:03 AM   #1
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Rep: Reputation: 11
Post How to block Dir harvest?


Hello.
I just installed Apache on CentOS 7 x86_64 and with a tools like "DirBuster", I can find all directories and files. How can I block it? For example, I created a directory with the name "a" and "DirBuster" found it very fast. Is it because of directory permission?
Code:
$ ll
total 4
drwxr-xr-x. 2 root root    6 Nov  5 05:17 cgi-bin
drwxr-xr-x. 9 root root 4096 Dec 21 12:20 html
And:
Code:
$ ll
total 228
drwxr-xr-x.  2 root   root       6 Dec 21 12:20 a
-rw-r--r--.  1 root   root    1646 Dec 11 16:22 ca_bundle.crt
-rw-r--r--.  1 root   root    1910 Dec 11 16:22 certificate.crt
-rw-r--r--.  1 apache apache   418 Dec  9 13:00 index.php
-rw-r--r--.  1 apache apache 19935 Dec  9 15:41 license.txt
-rw-r--r--.  1 root   root    1703 Dec 11 16:22 private.key
-rw-r--r--.  1 apache apache  7415 Dec  9 15:41 readme.html
drwxr-xr-x.  2 root   root      66 Dec 11 15:48 sslforfree
-rw-r--r--.  1 root   root    5587 Dec 11 15:01 sslforfree.zip
-rw-r--r--.  1 apache apache   166 Dec  9 13:00 web.config
-rw-r--r--.  1 apache apache   166 Dec  9 13:00 web.config.181209093052.orig
-rw-r--r--.  1 apache apache  5458 Dec  9 13:00 wp-activate.php
drwxr-xr-x.  9 apache apache  4096 Dec  9 15:41 wp-admin
-rw-r--r--.  1 apache apache   364 Dec  9 13:00 wp-blog-header.php
-rw-r--r--.  1 apache apache  1889 Dec  9 13:00 wp-comments-post.php
-rw-r--r--.  1 apache apache  3675 Dec 17 14:26 wp-config.php
-rw-r--r--.  1 apache apache  2853 Dec  9 13:00 wp-config-sample.php
drwxr-xr-x.  8 apache apache  4096 Dec 18 11:29 wp-content
-rw-r--r--.  1 apache apache  3669 Dec  9 13:00 wp-cron.php
drwxr-xr-x. 19 apache apache  8192 Dec  9 15:41 wp-includes
-rw-r--r--.  1 apache apache  2422 Dec  9 13:00 wp-links-opml.php
-rw-r--r--.  1 apache apache  3306 Dec  9 13:00 wp-load.php
-rw-r--r--.  1 apache apache 37286 Dec  9 15:41 wp-login.php
-rw-r--r--.  1 apache apache  8048 Dec  9 13:00 wp-mail.php
-rw-r--r--.  1 apache apache 17421 Dec  9 15:41 wp-settings.php
-rw-r--r--.  1 apache apache 30091 Dec  9 13:00 wp-signup.php
drwxr-xr-x.  2 apache apache    22 Dec  9 13:04 wp-snapshots
-rw-r--r--.  1 apache apache  4620 Dec  9 13:00 wp-trackback.php
-rw-r--r--.  1 apache apache  3065 Dec  9 13:00 xmlrpc.php
I can browse all files and directories by "www.domain.com/a". How can I solve it?

Thank you.
 
Old 12-21-2018, 03:07 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
So you installed Apache. Do you know what is this? Do you know how does it work? Did you configure it properly? Did you configure it at all? Uninstall it and that will solve your issue.
 
1 members found this post helpful.
Old 12-21-2018, 03:47 AM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I had not known about Dirbuster, thanks for teaching me something new.

One thing puzzles me, though: How did you find out about it? If you used the internet, why did you not use the internet to find answers to your question?

Search for block dirbuster and be rewarded with pages like this one. And many others.

So, I suggest you use this great resource named “internet” and, if you still have questions, ask them here.
 
1 members found this post helpful.
Old 12-21-2018, 03:58 AM   #4
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
I found something https://serverfault.com/questions/17...-file-w/377330 but is for a file or directory.
 
Old 12-21-2018, 09:48 AM   #5
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by hack3rcon View Post
I found something https://serverfault.com/questions/17...-file-w/377330 but is for a file or directory.
There you go. That's the answer. Please use the thread tools to mark the thread SOLVED

Seriously, search the Apache documentation for Directory Options. See how to use the Indexes option.

Last edited by scasey; 12-21-2018 at 10:14 AM.
 
1 members found this post helpful.
Old 12-21-2018, 10:36 AM   #6
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
I use dirbuster every day at work (pen tester). You can't stop dirbuster from finding directories the server is meant to serve. What you CAN stop is the directories from being browsable. Keep in mind that blacklisting tools is useless because many of these can emulate different tools, rending blacklists moot. Can't remember if dirbuster does this, I never have had to make it appear as something else.
 
Old 12-22-2018, 05:16 AM   #7
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by berndbausch View Post
I had not known about Dirbuster, thanks for teaching me something new.

One thing puzzles me, though: How did you find out about it? If you used the internet, why did you not use the internet to find answers to your question?

Search for block dirbuster and be rewarded with pages like this one. And many others.

So, I suggest you use this great resource named “internet” and, if you still have questions, ask them here.
It is useless.
 
Old 12-22-2018, 05:33 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
no, it is not useless. But as usual you need to learn to use it.
As you need to learn how redirection works, how cron works, how apache works, how apt works, how search engines work and a lot of other things. We can't do that for you, I can't give you my experiences.
Believe me, you will [can] progress much faster if you learn. But you know. Your last post itself is completely useless, will not help to solve your issues and even does not give us any information to be able to help you.

https://www.linuxquestions.org/quest...4/#post5938205
 
4 members found this post helpful.
Old 12-22-2018, 08:18 PM   #9
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by hack3rcon View Post
It is useless.
Most of the questions you ask waste your time (and other people's time, but it's their choice to read them and reply to them). Your questions are so generic that LQ users can only give generic answers, the same answers you would easily find on the internet.

However, the internet also has specific answers, and you are in the unique position to know which specific answer fits your specific problem. I can't know that, because you don't explain your specific problem.

Your comment "it is useless" is such an example. If you say that a given web page is useless, I can't help you. If you say which part of the web page doesn't work for you, I may help. If you say what you tried to do, what was the outcome, and what is the outcome that you desire, I may help.
 
1 members found this post helpful.
Old 12-23-2018, 03:37 AM   #10
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by pan64 View Post
no, it is not useless. But as usual you need to learn to use it.
As you need to learn how redirection works, how cron works, how apache works, how apt works, how search engines work and a lot of other things. We can't do that for you, I can't give you my experiences.
Believe me, you will [can] progress much faster if you learn. But you know. Your last post itself is completely useless, will not help to solve your issues and even does not give us any information to be able to help you.

https://www.linuxquestions.org/quest...4/#post5938205
As you see, that thread posted in "Linux - Newbie". I know that those lines must be added to .htaccess file.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
copying files from home dir to another dir from another dir in a lower dir chomito44 Linux - General 5 10-19-2013 06:18 PM
exclude parameter of rsync- 'dir' vs "dir" vs dir rng Linux - General 5 06-13-2012 01:47 AM
family guy - blue harvest schneidz General 0 04-07-2008 01:44 PM
Command to display /dir, /dir/sub, /dir/sub/files knockout_artist Linux - Newbie 9 10-25-2007 02:57 PM
Harvest info from XP? jollyjoice General 8 01-14-2006 06:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration