Solved

Full access to resources without uac

Posted on 2013-06-28
13
211 Views
Last Modified: 2013-08-31
Hi I wonder if only way is write app as service not to make UAC privileges prompt for elevation.

Are there other tricks ? ( there are some with scheduler but not sounds professional)
0
Comment
Question by:johnnyex
  • 7
  • 4
  • 2
13 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 39285045
A service is indeed the simplest way. However, you need admin privileges to install it. What resources exactly do you need to access?
0
 

Author Comment

by:johnnyex
ID: 39285078
I need to have full control over services, this need max admin privileges.

Admin privileges is not a problem for installation time, later I don't need to get UAC prompts
0
 
LVL 86

Expert Comment

by:jkr
ID: 39285141
Well, then a service is indeed the way to go. Look e.g. here http://www.codeproject.com/Articles/499465/Simple-Windows-Service-in-Cplusplus ("Simple Windows Service in C++") for sample code that you can build your srevice upon. You'll find a more thorough article at http://www.codeproject.com/Articles/1697/Beginner-s-introductory-guide-to-writing-installin ("Beginner's introductory guide to writing, installing, starting, stopping NT services")
0
 

Author Comment

by:johnnyex
ID: 39285166
what about write service which will start exe program and inherit admin privileges from mother service ? ; ) not sure if it's possible?
0
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 39285242
That's indeed possible. Any application launched from a service will inherit the privileges. The only limitation is that your program won't run on a visible desktop so GUI apps are out of question.
0
 

Author Comment

by:johnnyex
ID: 39285769
too bad that that will inherit also limitations other not only showing GUI

I found some trick
Has anyone tested it?
http://abramovi.blogspot.co.il/2012/12/how-can-windows-service-execute-gui.html
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 86

Expert Comment

by:jkr
ID: 39285792
That will work, however the process that is launched will have only the privileges that are represented by the impersonation token,.not the ones the service has.
0
 
LVL 79

Expert Comment

by:David Johnson, CD, MVP
ID: 39286158
What you want cannot really be done.. What you are trying to do is get around the UAC.. It is difficult for a reason.. If it was trivial then every malware manufacturer would be using it, which in turn would force Microsoft to close the few loop-holes that we have
0
 
LVL 86

Expert Comment

by:jkr
ID: 39286168
>> What you want cannot really be done..

Weird - why can I do that then programmatically, given that I am privileged enough to install a service?  I mean, takin gthat one step further and writing a kernel mode driver, I could even call user mode code back from a kernel context (OK, that's not clean and a different issue with signed drivers on x64, but...)
0
 
LVL 79

Expert Comment

by:David Johnson, CD, MVP
ID: 39286175
you'd still need UAC to install the service.. and any gui element would run in the context of the limited user.  Running the service as SYSTEM does give you almost unlimited control of the computer.  Usually any communication from a service brings up the secure desktop after notifying the user that the service is trying to communicate with the user.. and you are stuck with console mode pretty much.

Work within the system and things will be better.. don't try and defeat the built in security features.
 
If you want split your program into 2 executables.. the visual element and the service and then have the service do the things that the visual element can't.
0
 
LVL 86

Expert Comment

by:jkr
ID: 39286180
>>you'd still need UAC to install the service.

No, you'd need to be admin, so where's the point?
0
 

Author Comment

by:johnnyex
ID: 39319119
it can be done just install service which running target exe guys
0
 
LVL 86

Expert Comment

by:jkr
ID: 39319234
?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Before You Read The Article Please make sure you understand these two concepts: Variable Scope (http://www.php.net/manual/en/language.variables.scope.php) and Property Visibility (http://www.php.net/manual/en/language.oop5.visibility.php).  And to …
Software development teams often use in-memory caches to improve performance. They want to speed up access to, or reduce load on, a backing store (database, file system, etc.) by keeping some or all of the data in memory.   You should implement a …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now