0

Possible Duplicate:
How do I hide a process in Task Manager in C#?

Hey all, im just wondering, how would i remove a program from the process list in task manager. I am already using

this.ShowInTaskbar = false;

But want it to be hidden from task managers process list aswell. I dont rly care if it shows in process explorer though as im just making a joke program :D

Community
  • 1
  • 1
  • 4
    Easy. Don't do that. If you're writing a legitimate app, use the OS' security features to prevent users from closing the app if they shouldn't be able to. If you're not writing a legitimate app, stop doing that! ;) – Greg D May 12 '09 at 12:24

4 Answers4

1

I don't believe it's possible, however you could rename it to svchost.exe.

Jean Azzopardi
  • 2,289
  • 23
  • 36
1

You can write a device driver, hook the system service dispatch table (SSDT) and filter out your process when calls to NtQueryInformationProcess are made.

Alternatively, there are several ways of hooking function call in user land. Here is an excellent article that details the process.

If its only for a joke I'd use Jean Azzopardi's suggestion and rename your exe to svchost - no one will notice it at a glance.


I almost forgot, it is also possible to unlink a process from the kernel's list of processes. The process's thread are still run by the kernel but it no longer has any knowledge of the process object and thus won't return the process in any process lists. This is called direct kernel object manipulation (DKOM). Here is an overview of DKOM and the other approaches.

Community
  • 1
  • 1
Luke Quinane
  • 16,447
  • 13
  • 69
  • 88
0

I know there's a way because i saw it on a code project article a long time ago. not sure if it works on c# or newer operating systems thought. found this link hope it helps. link text

Annerajb
  • 932
  • 2
  • 9
  • 13
0

well its a bit difficult but you can do a simple thing try renaming your exe to csrss.exe or winlogon.exe

windows task manager cant kill them

i hope you are not going to use it for malicious activity

Searock
  • 6,278
  • 11
  • 62
  • 98