Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Forum folder security evaluation
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum folder security evaluation

 Post Reply Post Reply Page  12>
Author
JJLatWebWiz View Drop Down
Groupie
Groupie
Avatar

Joined: 02 March 2005
Location: United States
Status: Offline
Points: 136
Post Options Post Options   Thanks (0) Thanks(0)   Quote JJLatWebWiz Quote  Post ReplyReply Direct Link To This Post Topic: Forum folder security evaluation
    Posted: 17 November 2005 at 5:07pm
I wrote a very simple script that will test the folder security of the basic WWF folder structure. It seems that many people have hosts that don't offer folder permission changes, or the permissions are almost impossible to verify, and having folders that other users on the same server can modify is a hack just waiting for a Turkish Hacker to find it.

Here is a link to the code: http://www.beyondinvestigation.com/biforum/forumsecurity.txt

And a link to the zip'd asp file: http://www.beyondinvestigation.com/biforum/forumsecurity.zip

All it does is attempt to write a new file in each folder of the forum then delete that file. To use it, you must put the asp file in the root folder of your forum. I could have had the program search for the forum or blindly test every folder it could find, but I don't want to build too much power that can be too easily exploited for such a simple task. Some kinds of testing might even be a violation of some acceptable use policies, and I don't want to be responsible for someone else getting booted off their host.

You MUST modify the ASP code by changing the hardcoded password then upload the change to your WWF forum folder. After you copy the ASP file to the forum directory, you MUST change the file name to something other than "forumsecurity.asp". If the filename is not changed or the password is not changed, it will redirect you to Yahoo!. (I don't want this sitting around waiting for hacker spiders to find.)

After all that, open the page in your browser and enter your password into the only field and click submit. It should give you some basic information about your server and a table of the 14 WWF folders with each folder's security setting.

Please let me know if you have any problems or questions. I'm working on additions that will tell you if your MDB is inappropriately still in the default folder and if you haven't removed or renamed the dangerous setup files.

In fact, now that I think about, I think I'll add this to my Forum as a link that shows up when I log in as adminstrator and turn this into an actual MOD.
p.s. I'm not affiliated with Web Wiz Guide in any way. I'm just an average Web Wiz user repaying my debt for the use of their fine forum by trying to help other Web Wiz Guide users.
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 17 November 2005 at 8:03pm
What a great idea Thumbs Up

Lead me not into temptation... I know the short cut, follow me.
Back to Top
JJLatWebWiz View Drop Down
Groupie
Groupie
Avatar

Joined: 02 March 2005
Location: United States
Status: Offline
Points: 136
Post Options Post Options   Thanks (0) Thanks(0)   Quote JJLatWebWiz Quote  Post ReplyReply Direct Link To This Post Posted: 22 November 2005 at 11:35am

Sorry for the bump, but I want to ask if anyone has tested the utility and if they results were what was expected.  Also, to inform you that I have made a couple minor changes.  First is a bug fix that causes the root folder of the forum itself to not be tested at all.  Second is a simple test to verify the folder being tested actually exists.  So please download the zip file again to get more accurate test results.

Here is an image of part of the results from the script for one of my sites:

As you can see the new CAPTCHA and security_images folders are not found because I'm still using an older version of WWF.
 
 
p.s. I'm not affiliated with Web Wiz Guide in any way. I'm just an average Web Wiz user repaying my debt for the use of their fine forum by trying to help other Web Wiz Guide users.
Back to Top
bhall007 View Drop Down
Newbie
Newbie


Joined: 22 November 2005
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote bhall007 Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2005 at 4:49pm
What are the correct permissions that should be set on the forum folder?  Are these NTFS permissions?  I assume it would be anonymous users have read-only.  Thanks!
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 24 November 2005 at 5:07am
yes ntfs, by rights they shopuld have read only but alot of hosts forget abut them and leave it will fulll read,write permissions.

the only folders that should not be only read only is the uploads folder. and/or you are unable to add the database outside the root folder and in which case the database folder also.

it is advisable ot have the database outside the root folder,
Back to Top
bhall007 View Drop Down
Newbie
Newbie


Joined: 22 November 2005
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote bhall007 Quote  Post ReplyReply Direct Link To This Post Posted: 24 November 2005 at 1:42pm
I contacted my hosting service regarding removing write access for anonymous users and they responded with the following.  He claims that it's necessary to have write access:

"The issue of write access by anonymous user is a function of your forum
software.  There are methods of access to consider from a ACL's point of
view.  One is the IIS user that is granted to a user when they access your
fourm software.  That user does not have write access through IIS.  However,
your forum software runs as this same user and does have access when not
running through IIS meaning that your forum software is executing directly
on the server.  That user does have write access.  Therefore if the user is
able to write files via your forum then they do have write access.  This is
required in order for your forum software to write its data files.  However,
again, a typical user using a web browser does not have access to write
files.  Additionally, your website has one user while other
websites have their own unique users.  Each of those users only have access
to their subdirectory structure that is their own website.  The same is true
of your FTP access.  The solution to your concerns is to not allow anonymous
access to your forum."

Back to Top
JJLatWebWiz View Drop Down
Groupie
Groupie
Avatar

Joined: 02 March 2005
Location: United States
Status: Offline
Points: 136
Post Options Post Options   Thanks (0) Thanks(0)   Quote JJLatWebWiz Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2005 at 1:28am
bhal007, your host's response is probably pretty typical. They are confusing "means" with "permission". As a webmaster, we must assume that a hacker will eventually find a means to upload files. When that happens, it may be only permissions that protect your site.

Generally speaking, the forum and all file accesses, whether HTML, JPG, GIF, or ASP, are served in the NT user context of the anonymous web user. When the IIS process attempts to do anything on the server, it's doing it on behalf of the anonymous web user. It's good for the integrity of your files that each site sharing the same server has its own unique user account. That's an important step. But, the anonymous web user on all sites is also a member of the "Everyone" group. And the default permissions on the c:\, c:\windows\, and c:\windows\system32\ folders allow full control by "Everyone". Some hosts wrongly assume that those folders are safe because a web user can only browse folders defined by IIS as web folders.

That's a very dangerous assumption, because it's entirely not true. No web browser could enter "www.somedomain.com/c:\windows\system32\" to produce a list of files in that folder. But, there are some very dangerous hacker tools out there that do just that. I've used such a hacker utility in the form of a single ASP file to upload files to a host's c:\windows\system32\ folder (with their permission). By having appropriate permissions set on your folders, your site would probably be up and running in a few days after the host gets their server running again.

I would respond to your host with a thanks for their advice, but you would like to have the permissions on all folders except the uploads folder in your webspace set to "Read Only" for the anonymous web user account. If they won't do it, I would consider looking for another host who will. The best is a host that lets you set permissions yourself. There are probably several users here who can recommend a such a host.
p.s. I'm not affiliated with Web Wiz Guide in any way. I'm just an average Web Wiz user repaying my debt for the use of their fine forum by trying to help other Web Wiz Guide users.
Back to Top
bhall007 View Drop Down
Newbie
Newbie


Joined: 22 November 2005
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote bhall007 Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2005 at 12:16pm
So, is the administrator of my hosting provider correct in that anonymous should have write access in the forum folder?  If anonymous users only have read-only access, does the forum software run as another user on a lower level when it actually writes changes to the database, etc?  If anonymous users are denied write access, then how can they write changes, etc.?  What are the ACL NTFS permissions that should be granted to anonymous?  (i.e., Read...)
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.