473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Using Password in Application

I have an application that will call some external applications during the
course of execution. Since the application will be running on its own
without user intervention I will have to store a username and password inside
the code of the application to run processes etc. What is the best way to do
this considering security? What is the best way to prevent someone from
reverse engineering the application and getting to the password? Thanks in
advance for any help.
Jul 16 '06 #1
6 1524
Primera wrote:
I have an application that will call some external applications during the
course of execution. Since the application will be running on its own
without user intervention I will have to store a username and password
inside
the code of the application to run processes etc. What is the best way to
do
this considering security? What is the best way to prevent someone from
reverse engineering the application and getting to the password? Thanks
in advance for any help.
Hi Primera,

Could you just clarify /why/ you need to store a password in your
application? Is it because you need to impersonate a user, in order to
execute a process in the context of that user?

--
Hope this helps,
Tom Spink

Google first, ask later.
Jul 16 '06 #2
In the normal case people store user inform in web.config for ASP.NET and
app.config for Windows app. Do take a look here and see whether you can find
what you want.
http://msdn.microsoft.com/security/

chanmm

"Primera" <Pr*****@discussions.microsoft.comwrote in message
news:9D**********************************@microsof t.com...
>I have an application that will call some external applications during the
course of execution. Since the application will be running on its own
without user intervention I will have to store a username and password
inside
the code of the application to run processes etc. What is the best way to
do
this considering security? What is the best way to prevent someone from
reverse engineering the application and getting to the password? Thanks
in
advance for any help.

Jul 16 '06 #3
Yes, I need to run an external executable as a specific user that has local
admin rights.
"Tom Spink" wrote:
Primera wrote:
I have an application that will call some external applications during the
course of execution. Since the application will be running on its own
without user intervention I will have to store a username and password
inside
the code of the application to run processes etc. What is the best way to
do
this considering security? What is the best way to prevent someone from
reverse engineering the application and getting to the password? Thanks
in advance for any help.

Hi Primera,

Could you just clarify /why/ you need to store a password in your
application? Is it because you need to impersonate a user, in order to
execute a process in the context of that user?

--
Hope this helps,
Tom Spink

Google first, ask later.
Jul 16 '06 #4
On Sun, 16 Jul 2006 00:37:01 -0700, Primera
<Pr*****@discussions.microsoft.comwrote:
>I have an application that will call some external applications during the
course of execution. Since the application will be running on its own
without user intervention I will have to store a username and password inside
the code of the application to run processes etc. What is the best way to do
this considering security? What is the best way to prevent someone from
reverse engineering the application and getting to the password? Thanks in
advance for any help.
Assuming the user actually interacts with your application, the
best way to do it is to require the user to supply a password when your
app starts. Then encrypt/decrypt the passwords for the other systems
with the password the user just provided.
One example of this technique is Firefox's "master password"
feature.
Jul 17 '06 #5
Unfortunately there will be no user interaction. Thanks for the post anyway.
"Greg Miller" wrote:
On Sun, 16 Jul 2006 00:37:01 -0700, Primera
<Pr*****@discussions.microsoft.comwrote:
I have an application that will call some external applications during the
course of execution. Since the application will be running on its own
without user intervention I will have to store a username and password inside
the code of the application to run processes etc. What is the best way to do
this considering security? What is the best way to prevent someone from
reverse engineering the application and getting to the password? Thanks in
advance for any help.

Assuming the user actually interacts with your application, the
best way to do it is to require the user to supply a password when your
app starts. Then encrypt/decrypt the passwords for the other systems
with the password the user just provided.
One example of this technique is Firefox's "master password"
feature.
Jul 17 '06 #6
On Sun, 16 Jul 2006 00:37:01 -0700, Primera
<Pr*****@discussions.microsoft.comwrote:
>I have an application that will call some external applications during the
course of execution. Since the application will be running on its own
without user intervention I will have to store a username and password inside
the code of the application to run processes etc. What is the best way to do
this considering security? What is the best way to prevent someone from
reverse engineering the application and getting to the password? Thanks in
advance for any help.
You probably should not keep the password and username inside your
application, they should be in separate files. Keep them on disk, in
the registry, on a floppy (remember them?), removable USB memory stick
or on a different machine on the network so if the application is
compromised then the password is not necessarily compromised. The
floppy/USB options let you remove the password files completely and
lock them in a safe when they are not needed. Keeping them outside
the application allows the password to be changed more easily when the
external application changes its password - no need to recompile.

How secure do you want the password to be? It could be as simple as a
Caesar cypher, "password" becomes "rcuuyqtf" (shift each letter by
two). For something more secure store a random array of bytes of
sufficient length and also store password XOR random_bytes in a
different location. When you need the password just do another XOR
with the random bytes. Pick a new set of random bytes every so often,
or after so many uses, and re-encrypt the username and password files.
If you have a cryptographically secure random number generator
available then you should use that in preference to any standard PRNG.
Google "Yarrow" or "Fortuna" for two CSPRNGs.

For advice from real experts try asking on sci.crypt

rossum

Jul 17 '06 #7

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

Similar topics

4
by: chris.dunigan | last post by:
I'm looking for an example of how to execute an existing DTS­ package from an ASP (VB)script and would appreciate any and all response. ­I don't even know if it's possible Thanks - Chuck...
10
by: Fabrizio | last post by:
(Sorry for the crosspost, but I really don't know which is the right newsgroup!) Hi all, I try to change the password to a user that as to change the password at first logon: try {
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
2
by: Adrian Burka | last post by:
HELP! I have written a web service, and a program in C# using Microsoft Visual C#.NET to interact with the web service. Exception handling isn't working in my application, though. One function...
3
by: =?Utf-8?B?RGFuZGFuIFpoYW5n?= | last post by:
Now I have a web application, a web service and a SQL Server database. The Web application will invoke the web service, the web service invokes the SQL Server stored procedure. I let the web...
1
by: xcelmind | last post by:
Hello Dev. Guru, I want to at this time introduce myself. I am Stanley Ojadovwa by name. I’m a freelance and a newbie in web application development. I’m currently using ASP as my application...
5
by: kk035 | last post by:
Hello! I'm migrating an IIS/SQL-Server application from Windows NT4.0 and SQL- Server 2000 to Windows 2003 Server and SQL-Server 2005. My problem is that it is not possible to connect local (IIS...
3
by: melon | last post by:
I need to store some password on a text file. I was trying to use some kind of encryption to encrypt the password from plain text. I found the code below off the web, which works great. But...
2
by: acw | last post by:
On a SQL Server 2000 db I would like to setup a stored procedure that accesses couple tables and runs the extended stored procedure xp..cmdshell. The goal is to grant users with limited privileges...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.