On this page

IIS 6 - run with an application user

Ads

Navigation

Search

Categories

Clouds

Sql Server (5) .Net (16) .Net 2.0 (2) C# (3) @ff Topic (5) Architectural solutions (9) ASP (1) BDD (5) Blog related (8) database (2) Development process (8) Facebook (1) job interviews (1) Lessons (5) Life (12) Microsoft (5) IIS 6 (2) SPS (sharepoint server) (3) Drivers (1) Internet Explorer (2) Windows 2003 server (1) NightDuck (2) Performance (5) Security (9) Sql Server 2000 (4) Study (2) TDD (1) Threading (3) Under the hood (1) Web (1) Web services (1) XSS (6)

Archive

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 63
This Year: 0
This Month: 0
This Week: 0
Comments: 33

Sign In
Pick a theme:

 Tuesday, August 29, 2006
Tuesday, August 29, 2006 10:55:46 PM (GMT Standard Time, UTC+00:00) ( Microsoft | IIS 6 | Security )

One of the most important rules about running an application (specially web application) is giving to the application only the needed permissions to run, and no more ! (running a web application with an administrator user is bad....).
Sure, it's very comfortable to give the application all the permissions that the system has, and not trying to solve permission related problems directly,
But this kind of an approach is a security-breach prone approach.
suppose, you wrote an application that has a minor security hole in it, and it allows the user to execute some unwanted script.
If it will run in a full permissions context, than it would be very easy to hijack the entire system, or even just do a system-wide damage.
But, if it will run only with the needed permission, then the attacker would have a hard time doing it.

So, what is the solution ?

First, create a new application pool that will run the wanted web application ( if you don't know how to do this , please refer to this article about application pool management ).

once, you have created the app pool, lets create the user :

  • enter to the computer management, click on the users folder and add a new user :
    AddUser.JPG
  • Set the user name and the password, and don't forget to check the "password never expires" option ( we don't want the application will stop working after some XX days...)

    CreateUser.JPG

  • confirm the pass
    ConfirmPass.JPG

  • now, this is a very important step, without this the application won't run.
    right click on the fresh added user -> properties -> click on the "Member of" tab -> Add the user to the IIS_WPG group, so it can run iis applications

    SetToIISGroup.JPG

  • Set the new user to run the application pool that we created before.

    AppPoolIdentity.JPG

  • Do iisreset.( or just restart the application pool)

thats it.
you did it, now your application runs under a limited user.
the iis process will run now with the given user and not the admin.

UserProccess.JPG

you just made another step to a more secured application.