Government Security
Network Security Resources

Jump to content

Photo

C# & Winapi

- - - - - c#
  • Please log in to reply
2 replies to this topic

#1 ikex

ikex

    Private

  • Members
  • 2 posts

Posted 20 February 2008 - 03:34 PM

Heya!, i was just wondering if anyone had any idea how i'd go about hiding my process from the task manager
so far ive been able to blank out the process list in the task manager, and remove certain columns (using LVM_DELETECOLUMN)
but i have no idea after ive got the hwnd(SysListview32) of the processes how to loop through them and delete my process from the list

#2 ikex

ikex

    Private

  • Members
  • 2 posts

Posted 02 March 2008 - 06:12 PM

So i figured out, Syslistview can't send its information to the outside (via hooking) so i gave up on that. i looked into remotethreads (to try injecting) but it requires def alot more knowledge then i have to work with :P.

#3 foro

foro

    Private

  • Members
  • 12 posts

Posted 07 July 2008 - 04:32 AM

Maybe this will help you

#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <commctrl.h>
#include <winuser.h>

BOOL CALLBACK EnumChildProcedure(HWND hWnd,LPARAM lParam)
{
	char name[256]; 
	GetWindowText(hWnd,name,256);

	char ClassName[256];
	GetClassName(hWnd,ClassName,256);

	if((strcmp(ClassName,"SysListView32")==0)&&(strcmp(name,"Processes")==0))
	{
		SendMessage(hWnd,LVM_DELETECOLUMN,(WPARAM)0,0);
	}
	
	//if((strcmp(ClassName,"SysListView32")==0)&&(strcmp(name,"Tasks")==0))
	//{
	//	::SendMessage(hWnd,LVM_DELETECOLUMN,(WPARAM)0,0);
	//}

	if(name==NULL)
		return FALSE;
	return TRUE;
}


int main(int argc, char *argv[])
{
  HWND hWnd = NULL;
  char name[256]; 
  char ClassName[256];
  char m_status [255];


  hWnd = FindWindow(NULL,"Windows Task Manager");
  EnumChildWindows(hWnd,EnumChildProcedure,NULL);
  EnumChildWindows(hWnd,EnumChildProcedure,NULL);
  EnumChildWindows(hWnd,EnumChildProcedure,NULL);
  EnumChildWindows(hWnd,EnumChildProcedure,NULL);
  system("PAUSE");	
  return 0;
}






Also tagged with one or more of these keywords: c#