invisible service

  • Thread starter Thread starter Marcel Serour
  • Start date Start date
M

Marcel Serour

hello

I would like to create a service that stays hidden from the user (the
idea is to stop the user from killing the service, so the client
specified to hide it)
I thought to create my service as a thread, passing
SERVICE_WIN32_SHARE_PROCESS instead of own process
but it is still creating it's own proccess.. anybody knows why that happens?

I'm installing the service using the win32 api (DLL imports..)

thanks
marcel
 
Marcel Serour said:
hello

I would like to create a service that stays hidden from the user (the idea
is to stop the user from killing the service, so the client specified to
hide it)
I thought to create my service as a thread, passing
SERVICE_WIN32_SHARE_PROCESS instead of own process
but it is still creating it's own proccess.. anybody knows why that
happens?

I'm installing the service using the win32 api (DLL imports..)

thanks
marcel

Are you:

1) trying to make the process indistinguishable from any other process so
the user won;t notice it's there?

2) trying to make the process unkillable by the user?

3) trying to make the service unstoppable by the user via the MMC?

4) something else?

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
 
"Richard Blewett [DevelopMentor]" <richard at nospam dotnetconsult dot co
dot uk> wrote in message news:u3%[email protected]...
Are you:

1) trying to make the process indistinguishable from any other process so
the user won;t notice it's there?

2) trying to make the process unkillable by the user?

3) trying to make the service unstoppable by the user via the MMC?

4) something else?

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

You forgot the fifth question Richard:

Are you:
5) Working for Sony-BMG?

=)

- Michael S
 
Richard said:
Are you:

1) trying to make the process indistinguishable from any other process so
the user won;t notice it's there?

2) trying to make the process unkillable by the user?

3) trying to make the service unstoppable by the user via the MMC?

4) something else?

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

I think the answer would be 2, but the client specified to do it by
doing 1 so my answer is 1
 
Marcel Serour said:
I think the answer would be 2, but the client specified to do it by doing
1 so my answer is 1

The only way to do 2 is to make sure the user doesn't have permissions to do
this buy making sure they don;t run as admin and run the service under a
different account.

For 1 you could use svchost.exe to host your service, then the user will
only see another copy of svchost.exe in their process list. I assume we are
talking about normal users here and not skilled developers, etc who could
quite easily download process explorer from sysinternals and find out the
command line that started the service.

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
 
Richard said:
The only way to do 2 is to make sure the user doesn't have permissions to do
this buy making sure they don;t run as admin and run the service under a
different account.

For 1 you could use svchost.exe to host your service, then the user will
only see another copy of svchost.exe in their process list. I assume we are
talking about normal users here and not skilled developers, etc who could
quite easily download process explorer from sysinternals and find out the
command line that started the service.

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
yes, I'm talking about normal users, not skiled developers..

so, how could I use svhost.exe to host it?

marcel
 
You can't use the Framework classes to build "svchost" hosted services. The
Framework provides it's own host (it creates an executable) to host multiple
services, however, no-one stops you from calling your service .exe
svchost.exe.
If you want to build services that must be hosted in svchosts.exe, you'll
have to build DLL's and use the native Win32 Service API. Please refer to
the Platform SDK for more info.

Willy.



Marcel Serour said:
Richard said:
Richard Blewett [DevelopMentor] wrote:



hello

I would like to create a service that stays hidden from the user (the
idea is to stop the user from killing the service, so the client
specified to hide it)
I thought to create my service as a thread, passing
SERVICE_WIN32_SHARE_PROCESS instead of own process
but it is still creating it's own proccess.. anybody knows why that
happens?

I'm installing the service using the win32 api (DLL imports..)

thanks
marcel


Are you:

1) trying to make the process indistinguishable from any other process
so the user won;t notice it's there?

2) trying to make the process unkillable by the user?

3) trying to make the service unstoppable by the user via the MMC?

4) something else?

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

I think the answer would be 2, but the client specified to do it by doing
1 so my answer is 1


The only way to do 2 is to make sure the user doesn't have permissions to
do this buy making sure they don;t run as admin and run the service under
a different account.

For 1 you could use svchost.exe to host your service, then the user will
only see another copy of svchost.exe in their process list. I assume we
are talking about normal users here and not skilled developers, etc who
could quite easily download process explorer from sysinternals and find
out the command line that started the service.

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
yes, I'm talking about normal users, not skiled developers..

so, how could I use svhost.exe to host it?

marcel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top