IIS Server Security - Securing Web Database

This is Interesting: Free IT Magazines  
Home > Archive > IIS Server Security > November 2005 > Securing Web Database





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Securing Web Database
Prabhat

2005-11-01, 6:08 pm

Hi All,

I have a website setup which has MS-Access DB. The web pages are in ASP and
uses ADO to connect to DB. The DB is located in the Folder "/Database". I
have the Connection string setup in the Global.asa file.

As my virtual Directory is "/" and all files and folders including the
"Database" folder are with in the folder so any one who knows the Database
folder name and database name can directly download the database from the
website.

The physical Directory for the virtual directory is: -

d:\mywebsite
d:\mywebsite\database
d:\mywebsite\DLLs
d:\mywebsite\images
d:\mywebsite\include
d:\mywebsite\stylesheet
d:\mywebsite\template

How Can I restrict the database to be access directly from web? Please
suggest all alternatives that I can opt for.

Thanks
Prabhat


David Morgan

2005-11-01, 6:08 pm

Put the database above d:\mywebsite.

Something like:

d:\databases\mywebsite.mdb


"Prabhat" <not_a_email@hotmail.com> wrote in message
news:O3Xvaqv3FHA.700@TK2MSFTNGP15.phx.gbl...
> Hi All,
>
> I have a website setup which has MS-Access DB. The web pages are in ASP

and
> uses ADO to connect to DB. The DB is located in the Folder "/Database". I
> have the Connection string setup in the Global.asa file.
>
> As my virtual Directory is "/" and all files and folders including the
> "Database" folder are with in the folder so any one who knows the Database
> folder name and database name can directly download the database from the
> website.
>
> The physical Directory for the virtual directory is: -
>
> d:\mywebsite
> d:\mywebsite\database
> d:\mywebsite\DLLs
> d:\mywebsite\images
> d:\mywebsite\include
> d:\mywebsite\stylesheet
> d:\mywebsite\template
>
> How Can I restrict the database to be access directly from web? Please
> suggest all alternatives that I can opt for.
>
> Thanks
> Prabhat
>
>



Bob Barrows [MVP]

2005-11-01, 6:08 pm

Prabhat wrote:
>
> How Can I restrict the database to be access directly from web? Please
> suggest all alternatives that I can opt for.
>

The most common, and most effective, solution is to put the database outside
of the wwwroot folder. There is no need to have it in the web folder where
it can be browsed to.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


Prabhat

2005-11-01, 6:08 pm


"David Morgan" <microsoft_newsgroups.nospam@davidmorgan.me.uk> wrote in
message news:%23ncmutv3FHA.3592@TK2MSFTNGP12.phx.gbl...
> Put the database above d:\mywebsite.
>
> Something like:
>
> d:\databases\mywebsite.mdb
>
>

Hi David,

Does that require any security settings in Windows / for windows users? Or
will that work with out any settings?

Thanks
Prabhat


Prabhat

2005-11-01, 6:08 pm

"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:OeZPHvv3FHA.1596@tk2msftngp13.phx.gbl...
> Prabhat wrote:
> The most common, and most effective, solution is to put the database
> outside
> of the wwwroot folder. There is no need to have it in the web folder where
> it can be browsed to.
>


OK Thanks for that. But keeping the DB outside the web share folder will
require any user privilage settings?

Thanks
Prabhat


David Morgan

2005-11-01, 6:08 pm

It is most likely that any folder created off the root will have Everyone
Full Access. (This is quite handy when working with Access DBs.)

It should work without any settings. You'll soon know if it works and
security is well documented on http://www.aspfaq.com/

Regards

David


"Prabhat" <not_a_email@hotmail.com> wrote in message
news:%23T5X92v3FHA.2676@TK2MSFTNGP15.phx.gbl...
>
> "David Morgan" <microsoft_newsgroups.nospam@davidmorgan.me.uk> wrote in
> message news:%23ncmutv3FHA.3592@TK2MSFTNGP12.phx.gbl...
> Hi David,
>
> Does that require any security settings in Windows / for windows users? Or
> will that work with out any settings?
>
> Thanks
> Prabhat
>
>



Prabhat

2005-11-01, 6:08 pm


"David Morgan" <microsoft_newsgroups.nospam@davidmorgan.me.uk> wrote in
message news:erjlG5v3FHA.3636@TK2MSFTNGP09.phx.gbl...
> It is most likely that any folder created off the root will have Everyone
> Full Access. (This is quite handy when working with Access DBs.)
>
> It should work without any settings. You'll soon know if it works and
> security is well documented on http://www.aspfaq.com/
>
> Regards
>
> David
>


I will do that. Thanks for that info.

Prabhat


Bob Barrows [MVP]

2005-11-01, 6:08 pm

Prabhat wrote:
> "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
> news:OeZPHvv3FHA.1596@tk2msftngp13.phx.gbl...
>
> OK Thanks for that. But keeping the DB outside the web share folder
> will require any user privilage settings?
>

If using Anonymous, then the IUSR and IWAM accounts will require modify
access to the folder containing the database. otherwise, all users will
require that level of permission.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


Phillip Windell

2005-11-01, 6:08 pm

I recommend the same as the others, but if you can't do it that way then you
could rename the file something obscure and give it an HTM extension (like
"fh496jfu6.htm"). The browser would (assuming they ever figured the name
out) always try to render it rather than download it and it would of course
fail to display. Your connection string would have to be altered to match
the name and I don't think it will care what the file extension is,..I don't
think it has to be MDB extension to work.

Obviously I don't think that is the best solution, but it might work if that
is all you are able to do. I'll admit that I haven't tested it,...it is
just a brainstorm,...I guess I got bored.

--
Phillip Windell [MCP, MVP, CCNA]
www.wandtv.com
-----------------------------------------------------
Understanding the ISA 2004 Access Rule Processing
http://www.isaserver.org/articles/I...ccessRules.html

Microsoft Internet Security & Acceleration Server: Guidance
http://www.microsoft.com/isaserver/...idance/2004.asp
http://www.microsoft.com/isaserver/...idance/2000.asp

Microsoft Internet Security & Acceleration Server: Partners
http://www.microsoft.com/isaserver/partners/default.asp
-----------------------------------------------------



"Prabhat" <not_a_email@hotmail.com> wrote in message
news:%235XE44v3FHA.3900@TK2MSFTNGP12.phx.gbl...
> "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
> news:OeZPHvv3FHA.1596@tk2msftngp13.phx.gbl...
where[vbcol=seagreen]
>
> OK Thanks for that. But keeping the DB outside the web share folder will
> require any user privilage settings?
>
> Thanks
> Prabhat
>
>



Prabhat

2005-11-02, 2:48 am


"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:usY35Zw3FHA.2640@TK2MSFTNGP09.phx.gbl...

> If using Anonymous, then the IUSR and IWAM accounts will require modify
> access to the folder containing the database. otherwise, all users will
> require that level of permission.


Thanks for that info. My website using Anonymous access so I think I have to
give permissin for both IUSR and IWAM user.

Prabhat


Prabhat

2005-11-02, 2:48 am


"Phillip Windell" <@.> wrote in message
news:u2l1Xnz3FHA.636@TK2MSFTNGP10.phx.gbl...
> I recommend the same as the others, but if you can't do it that way then

you
> could rename the file something obscure and give it an HTM extension (like
> "fh496jfu6.htm"). The browser would (assuming they ever figured the name
> out) always try to render it rather than download it and it would of

course
> fail to display. Your connection string would have to be altered to match
> the name and I don't think it will care what the file extension is,..I

don't
> think it has to be MDB extension to work.
>
> Obviously I don't think that is the best solution, but it might work if

that
> is all you are able to do. I'll admit that I haven't tested it,...it is
> just a brainstorm,...I guess I got bored.


Good solution, But I have to see if the other extension will work or not.
But as you told this is not the best solution, and as other suggested to
move to other folder avove wwwroot so I will go for that, But still will try
to see if the extension change will work or not.

Thanks
Prabhat


Mark Schupp

2005-11-02, 5:52 pm

Do you have a directory on your site that is set to not allow IIS to read
from it (cgi-bin directories are usually like this)? If so, put the DB in
there. If not, can you create such a directory (or have your ISP create it)?

--
--Mark Schupp


"Prabhat" <not_a_mail@hotmail.com> wrote in message
news:OaI9Vt33FHA.3588@TK2MSFTNGP15.phx.gbl...
>
> "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
> news:usY35Zw3FHA.2640@TK2MSFTNGP09.phx.gbl...
>
>
> Thanks for that info. My website using Anonymous access so I think I have
> to
> give permissin for both IUSR and IWAM user.
>
> Prabhat
>
>



PJones

2005-11-27, 2:49 am

http://support.cjwsoft.com/code/cod...wnload+database


"Prabhat" <not_a_email@hotmail.com> wrote in message
news:O3Xvaqv3FHA.700@TK2MSFTNGP15.phx.gbl...
> Hi All,
>
> I have a website setup which has MS-Access DB. The web pages are in ASP
> and uses ADO to connect to DB. The DB is located in the Folder
> "/Database". I have the Connection string setup in the Global.asa file.
>
> As my virtual Directory is "/" and all files and folders including the
> "Database" folder are with in the folder so any one who knows the Database
> folder name and database name can directly download the database from the
> website.
>
> The physical Directory for the virtual directory is: -
>
> d:\mywebsite
> d:\mywebsite\database
> d:\mywebsite\DLLs
> d:\mywebsite\images
> d:\mywebsite\include
> d:\mywebsite\stylesheet
> d:\mywebsite\template
>
> How Can I restrict the database to be access directly from web? Please
> suggest all alternatives that I can opt for.
>
> Thanks
> Prabhat
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com