Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Server Security > Re: Forcing Process to Run With Ordinary User Authority

Reply
Thread Tools Display Modes

Re: Forcing Process to Run With Ordinary User Authority

 
 
Al Dunbar
Guest
Posts: n/a

 
      06-07-2009

"W" <> wrote in message
news: ...
> Is there a way to force a program to run in a security context of an
> ordinary user when invoked from the command line of an administrator
> login?
> I don't want to have to supply any credentials. The use case is a
> Scheduled Task that runs as SYSTEM, but which invokes browser instances to
> the screen each day (to check on data on various web sites).
>
> Since the security shift is from administrator / SYSTEM level to an
> ordinary
> user context (i.e., a member of local Users group), I would really hope
> that
> it would not be necessary to expose a credential in the script of the
> batch
> file that runs as a Scheduled Task.


There are a few potential issues you should be aware of:

1. when two instances of IE are started under alternate credentials (using,
for example, runas), the second one detects a running instance, and
piggy-backs onto it, inheriting a security context different from what you
might expect. The best approach is generally to use runas only for
increasing the privilege level, rather than lowering it.

2. for security reasons, runas was designed to accept the alternate password
interactively. third-party tools are available that allow a non-interactive
process to simulate a runas by embedding the password somewhere, often with
various levels of encryption. IMHO, it can be very difficult to prove that
these methods are as secure as you would like, so best practice is to avoid
them.

One possibility would be to create a separate script to do what needs to be
done under non-privileged credentials and create a task for it based on
those credentials. The privileged SYSTEM task would then simply start the
other task. If it needed to pass it information, this could be done by
writing it into a file that the other task would read from.

/Al


 
Reply With Quote
 
 
 
 
Al Dunbar
Guest
Posts: n/a

 
      06-07-2009

"Al Dunbar" <> wrote in message
news:...
>
> "W" <> wrote in message
> news: ...
>> Is there a way to force a program to run in a security context of an
>> ordinary user when invoked from the command line of an administrator
>> login?
>> I don't want to have to supply any credentials. The use case is a
>> Scheduled Task that runs as SYSTEM, but which invokes browser instances
>> to
>> the screen each day (to check on data on various web sites).
>>
>> Since the security shift is from administrator / SYSTEM level to an
>> ordinary
>> user context (i.e., a member of local Users group), I would really hope
>> that
>> it would not be necessary to expose a credential in the script of the
>> batch
>> file that runs as a Scheduled Task.

>
> There are a few potential issues you should be aware of:
>
> 1. when two instances of IE are started under alternate credentials
> (using, for example, runas), the second one detects a running instance,
> and piggy-backs onto it, inheriting a security context different from what
> you might expect. The best approach is generally to use runas only for
> increasing the privilege level, rather than lowering it.


addendum: the reason for this is that it is very easy to detect when an
attempt to use a higher level of privilege has failed than an attempt to use
a lower level. If you try to run a privileged application (ADU&C, for
example) from a non-privileged account using runas, if the alternate account
lacks the required privilege level, you will be unable to use the
application for actions requiring privilege (create accounts, set password).
If you open a browser from a privileged account using runas, your success
would not prove that you were running at the least privilege required.

/Al

> 2. for security reasons, runas was designed to accept the alternate
> password interactively. third-party tools are available that allow a
> non-interactive process to simulate a runas by embedding the password
> somewhere, often with various levels of encryption. IMHO, it can be very
> difficult to prove that these methods are as secure as you would like, so
> best practice is to avoid them.
>
> One possibility would be to create a separate script to do what needs to
> be done under non-privileged credentials and create a task for it based on
> those credentials. The privileged SYSTEM task would then simply start the
> other task. If it needed to pass it information, this could be done by
> writing it into a file that the other task would read from.
>
> /Al
>
>




 
Reply With Quote
 
Al Dunbar
Guest
Posts: n/a

 
      06-09-2009

"W" <> wrote in message
news: ...
> I dislike using stored credentials for ordinary users is Scheduled Tasks
> since apparently the password gets stored in clear text somewhere in
> memory
> that other services can access. I read several scenarios for intrusion
> where an intruder gains access to a service and then is able to dump
> passwords of all users running in a Scheduled Task.


If the password is stored in clear text, then I would be at least as
concerned about using the credentials of privileged accounts to run
scheduled tasks. I rather suspect that a more secure method is used, but I
have no info on it.

Note that when I suggested creating a task running on "non-privileged
credentials", I was not suggesting using an actual user account. Just using
an account that is as limited as possible, but that can get the job done.


/Al

> --
> W
>
> "Al Dunbar" <> wrote in message
> news:...
>>
>> "W" <> wrote in message
>> news: ...
>> > Is there a way to force a program to run in a security context of an
>> > ordinary user when invoked from the command line of an administrator
>> > login?
>> > I don't want to have to supply any credentials. The use case is a
>> > Scheduled Task that runs as SYSTEM, but which invokes browser instances

> to
>> > the screen each day (to check on data on various web sites).
>> >
>> > Since the security shift is from administrator / SYSTEM level to an
>> > ordinary
>> > user context (i.e., a member of local Users group), I would really hope
>> > that
>> > it would not be necessary to expose a credential in the script of the
>> > batch
>> > file that runs as a Scheduled Task.

>>
>> There are a few potential issues you should be aware of:
>>
>> 1. when two instances of IE are started under alternate credentials

> (using,
>> for example, runas), the second one detects a running instance, and
>> piggy-backs onto it, inheriting a security context different from what
>> you
>> might expect. The best approach is generally to use runas only for
>> increasing the privilege level, rather than lowering it.
>>
>> 2. for security reasons, runas was designed to accept the alternate

> password
>> interactively. third-party tools are available that allow a

> non-interactive
>> process to simulate a runas by embedding the password somewhere, often

> with
>> various levels of encryption. IMHO, it can be very difficult to prove
>> that
>> these methods are as secure as you would like, so best practice is to

> avoid
>> them.
>>
>> One possibility would be to create a separate script to do what needs to

> be
>> done under non-privileged credentials and create a task for it based on
>> those credentials. The privileged SYSTEM task would then simply start the
>> other task. If it needed to pass it information, this could be done by
>> writing it into a file that the other task would read from.
>>
>> /Al
>>
>>

>
>




 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Forcing Process to Run With Ordinary User Authority Marcin Server Security 1 06-07-2009 08:23 PM
Forcing programs to run with standard user privileges ainkami Windows Vista Security 5 02-16-2008 06:30 PM
Re: IE7 Forcing User Logout Don Varnau Internet Explorer 0 05-26-2007 12:59 PM
Re: Cannot login as ordinary user to console session on Windows Server 2003 Standard SP1 Pegasus \(MVP\) Windows Server 1 11-06-2005 11:54 PM
Forcing a user.dmp Sabo, Eric Windows Server 0 01-27-2005 05:52 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59