473,785 Members | 2,553 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Passwords in web.config... is this secure?

In my web.config, I have a section that has a name and
password:

<credentials passwordFormat= "Clear">
<user name="aaa" password="bbb" />
</credentials>

Is this secure? What is to stop someone from opening up
this file (it's a simple text file), getting the
sensitive info, and then breaking into my site?

If this is NOT secure, what is there I can do to make it
secure?

Thanks!
John
Nov 18 '05 #1
3 16551
When the .NET framework is installed, it modifies IIS to explicitly deny
public access to .config files. However, it's still not very secure... You
can encrypt the passwords using MD5 or SHA1, which will add a little more
security.

Eg.

<credentials passwordFormat= "MD5">
<user name="username" password="hashe dpasswordhere"/>
</credentials>

You can hash passwords using this online utility -
http://support.tigress-uk.com/technical/HashPwd.aspx, or it's quite easy to
create your own, if you prefer.

Hope this helps,

Mun


"John Buchmann" <or****@informa tik.com> wrote in message
news:07******** *************** *****@phx.gbl.. .
In my web.config, I have a section that has a name and
password:

<credentials passwordFormat= "Clear">
<user name="aaa" password="bbb" />
</credentials>

Is this secure? What is to stop someone from opening up
this file (it's a simple text file), getting the
sensitive info, and then breaking into my site?

If this is NOT secure, what is there I can do to make it
secure?

Thanks!
John

Nov 18 '05 #2
Mun,

Thanks for your reply and advice.

My problem is that if someone can log into the server via
an FTP program (I use WS_FTP), then the web.config is
easily viewable with no restrictions.

The encryption schemes you mentioned are to deny people
access via a web browser? I will look into hashed
passwords, but if someone gets into my site via an FTP
program, does this encryption do anything?

Thanks!
John

-----Original Message-----
When the .NET framework is installed, it modifies IIS to explicitly denypublic access to .config files. However, it's still not very secure... Youcan encrypt the passwords using MD5 or SHA1, which will add a little moresecurity.

Eg.

<credentials passwordFormat= "MD5">
<user name="username" password="hashe dpasswordhere"/>
</credentials>

You can hash passwords using this online utility -
http://support.tigress-uk.com/technical/HashPwd.aspx, or it's quite easy tocreate your own, if you prefer.

Hope this helps,

Mun


"John Buchmann" <or****@informa tik.com> wrote in message
news:07******* *************** ******@phx.gbl. ..
In my web.config, I have a section that has a name and
password:

<credentials passwordFormat= "Clear">
<user name="aaa" password="bbb" />
</credentials>

Is this secure? What is to stop someone from opening up this file (it's a simple text file), getting the
sensitive info, and then breaking into my site?

If this is NOT secure, what is there I can do to make it secure?

Thanks!
John

.

Nov 18 '05 #3
John,

What you could possibly do is only grant the ASPNET account access the
web.config, and explicitly deny all other accounts, so that no other user
accounts can access it other than the ASPNET account. Assuming you're using
the standard FTP Server as part of IIS, users will have to login using a
Windows account. The account they login with will not have access to
web.config, and therefore they will not be able to read the file and see the
user security details.

You might want to consider moving user details into a database. In this
case, the web.config file wont contain any user credentials. However, this
can turn into a catch-22, as the web.config file will then (probably)
contain the database connection string, which in turn, will give the
hacker-to-be access to the database, and user credentials table. You could
hard-code the database string into the login class (code-behind file), but
this will make maintenance more awkward. Another option would be to encrypt
the database string, but this situation would no different from encrypting
the user passwords directly...

The encryption schemes mentioned are to authenticate people who try and
access web content which is being secured using the built-in Forms
Authentication in ASP.NET. As far as I know, It won't have any affect on
users who access your site using FTP. The only way to regulate FTP users
would be through the FTP Server software itself.

Hope this helps,

Mun

"John Buchmann" <or****@informa tik.com> wrote in message
news:06******** *************** *****@phx.gbl.. .
Mun,

Thanks for your reply and advice.

My problem is that if someone can log into the server via
an FTP program (I use WS_FTP), then the web.config is
easily viewable with no restrictions.

The encryption schemes you mentioned are to deny people
access via a web browser? I will look into hashed
passwords, but if someone gets into my site via an FTP
program, does this encryption do anything?

Thanks!
John

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3321
by: Max | last post by:
I have a collection of system admin scripts (on Win 2k) that I would like to automate the execution of. However, some of them require the use of logins with admin rights, and would therefore prefer not to store the IDs in the clear text of the source. If memory serves correctly, the "compiled" .pyc files do not provide much security in this area. Are there are recommended methods for supplying scripts with login information in a secure...
6
4841
by: Billy Jacobs | last post by:
I have a website which has both secure and non-secure pages. I want to uses forms authentication. How do I accomplish this? Originally I had my web.config file in the root with Forms Authentication set up and it worked just fine. Then I realized that I needed to have some pages unsecure. I then created 2 directories. One named Secure and the other named Public. I placed my web.config file in my
2
12577
by: Peter Rilling | last post by:
How does Windows store passwords that it uses? For instance, when you install a service, you can provide it the username and password. This information is stored somehow so that at a later date the service can start without interaction from the user. Also for COM+ components. This is what I want to be able to do. I want the ability to store passwords in a protected manor so that my .NET application can start a secure process at a...
5
5094
by: Macca | last post by:
Hi, My application uses passwords to limit access to certain parts of the app. I was considering storing these in my database but have heard that there can be problems with this. I have heard using the Global Assembly Cache (GAC) would be a good place. Does anyone have any opinions on this and how would I implement the GAC scenario?
20
1475
by: Gef.Mongoose | last post by:
I MD5 encrypt passwords in a user table of my database. I have a global application object (initiated in global.aspx) which contains a few static members (for counting users online etc). because the MD5 encrypt algorithm is used on creation of a new user, and on login of a user, I considered putting it in a shared place. Would there be any security risk if I put it as a public static method in the global object? Or is this a bad idea? ...
1
4156
by: David Williams | last post by:
Has the Schema of the Web.Config changed in Web App Projects? After converting my 2005 Web Site project to a 2005 WAP, and switching to IIS Web Server, I am getting a number of errors at run time in my web.config files starting with: Unrecognized attribute 'type'. This error occurs when parsing the web.config file where first highlighted below. I do not see the referenced type in the GAC (System.Configuration.ApplicationSettingsGroup),...
3
3811
by: michael sorens | last post by:
In the interests of increasing security, I came upon the DPAPI security library available from the GotDotNet user samples repository. What I want to do is create an applications that accesses a database with one single password embedded in the program, so it may be run by any user on any machine. I observe that one may specify a UserStore or a MachineStore for constraining the encryption. That seems to imply that my application would only...
0
904
by: nom84 | last post by:
Hi there So far they way we have been using web.config on all our servers is like mostly how everyone does it. But now we need environment based web.config. At the moment we have one web.config with different values for the same keys on different servers. For example, we can have one connection string Key for the local webconfig which is pointing to the local database. When it goes to the server we have to change the connection string to point...
4
1431
by: anon538 | last post by:
I am making a simple password script. I have a login page that asks the user for a login and a password. It sends the two values to the following application via post (instead of get). Here is the application: <?php $login = $_POST; $pass = $_POST; $tlogin = "Xavier"; $tpass = "Anon537"; $authorize=false; if($login==$tlogin&&$pass==$tpass) {
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9949
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.