Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Hiding Processes
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Thu Sep 04, 2008 7:59 pm    Post subject: Hiding Processes Reply with quote

I was trying to learn how to hide processes and all I could find was this piece of code...it was seriously everywhere Shocked

Code:

typedef DWORD (WINAPI *TRegisterServiceProcess)(DWORD,DWORD);
bool registered=false;

//-----------------------------------------------------------------------
void __fastcall reg(bool which) //true=register, false=unregister
{
  HMODULE hmod;
  TRegisterServiceProcess pReg;
  hmod = LoadLibrary("kernel32.dll");

  if (!hmod) return;
  (FARPROC)pReg = (FARPROC)::GetProcAddress(hmod,"RegisterServiceProcess");
  if (!pReg) {FreeLibrary(hmod); return;}
  else
  {
    if (which)
      pReg(0,1); //unregister our process 
    else
      pReg(0,0);
  }
  registered = true;
  FreeLibrary(hmod);
}


The only thing is that Visual Studio complains that "the operator left of '=' cannot be typecasted." Something like that. If this doesn't work do I need to create a driver to hide my process or could I do it from a normal executable program? And can't I just make it so that my program's Flink's Blink's is my programs Blink and my programs Blink's Flink is my program Flink?

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Thu Sep 04, 2008 8:03 pm    Post subject: Reply with quote

Unlink EPROCESS.
_________________
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Thu Sep 04, 2008 8:28 pm    Post subject: Reply with quote

How exactly may I do that? I tried looking it up but all I got was programs that DETECT processes like those.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Tue Sep 09, 2008 6:13 pm    Post subject: Reply with quote

Code:

EPROCESS *myProc;

//get it... don't remember quite how

myProc->Blink->Flink = myProc->Flink;
myProc->Flink->Blink = myProc->Blink;

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Tue Sep 09, 2008 6:16 pm    Post subject: Reply with quote

So is this source correct (I made it myself)?

Code:

#include "ntddk.h"

NTSTATUS DriverEntry(PDRIVER_OBJECT pDriverObject, PUNICODE_STRING pRegistryPath) {
   PEPROCESS pEprocess = PsGetCurrentProcess();
   LIST_ENTRY process_list_entry = pEprocess->ActiveProcessLinks;
   process_list_entry.Flink->Blink = process_list_entry.Blink;
   process_list_entry.Blink->Flink = process_list_entry.Flink;
   pDriverObject->DriverUnload;
   return STATUS_SUCCESS;
}

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Renkokuken
GO Moderator
Reputation: 4

Joined: 22 Oct 2006
Posts: 3249

PostPosted: Tue Sep 09, 2008 6:26 pm    Post subject: Reply with quote

Code:
 (FARPROC)pReg = (FARPROC)::GetProcAddress(hmod,"RegisterServiceProcess");

About the first code, you're applying typecasting to left-hand value. Not allowed. Invalid anyway, if you have the function prototype, you're supposed to cast it with that.

Code:
pReg = (TRegisterServiceProcess)GetProcAddress( hmod, "RegisterServiceProcess" );
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Tue Sep 09, 2008 6:33 pm    Post subject: Reply with quote

Thanks Renko. But is there any chance that won't work. Because I heard that that code only worked for 98/2000/NT.

EDIT:

Just tested it doesn't work for XP Confused

Btw, what designates the current process in PsGetCurrentProcess? Is it the program that loaded the driver?

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
UnLmtD
Grandmaster Cheater
Reputation: 0

Joined: 13 Mar 2007
Posts: 894
Location: Canada

PostPosted: Tue Sep 09, 2008 6:45 pm    Post subject: Reply with quote

Your code is flawed (the attempt to use DKOM), take a look at FU/FUTo source codes. Also you may want to read about how this stuff works, it will help, a lot.
_________________
Back to top
View user's profile Send private message
Renkokuken
GO Moderator
Reputation: 4

Joined: 22 Oct 2006
Posts: 3249

PostPosted: Tue Sep 09, 2008 6:47 pm    Post subject: Reply with quote

UnLmtD wrote:
Your code is flawed (the attempt to use DKOM), take a look at FU/FUTo source codes. Also you may want to read about how this stuff works, it will help, a lot.
Didn't you make an example of this method? I believe it was called GroundZero. oib could look for that, it should be on the forums somewhere. :P
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Tue Sep 09, 2008 6:53 pm    Post subject: Reply with quote

That would be helpful. If you still have the link it would be appreciated.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Renkokuken
GO Moderator
Reputation: 4

Joined: 22 Oct 2006
Posts: 3249

PostPosted: Tue Sep 09, 2008 6:56 pm    Post subject: Reply with quote

oib111 wrote:
That would be helpful. If you still have the link it would be appreciated.
Found it: http://forum.cheatengine.org/viewtopic.php?t=104535&highlight=
Back to top
View user's profile Send private message
UnLmtD
Grandmaster Cheater
Reputation: 0

Joined: 13 Mar 2007
Posts: 894
Location: Canada

PostPosted: Tue Sep 09, 2008 7:02 pm    Post subject: Reply with quote

Oh wow! damn, it's still here. Well, at the time I was just starting out, so don't flame me for the bad coded code. I would suggest you to look into FU/FUTo source codes.

omg I used WriteFile Sad

BTW, hiding an object with DKOM is easily detected without modifying/hooking any other stuff.

_________________
Back to top
View user's profile Send private message
Renkokuken
GO Moderator
Reputation: 4

Joined: 22 Oct 2006
Posts: 3249

PostPosted: Tue Sep 09, 2008 7:14 pm    Post subject: Reply with quote

UnLmtD wrote:
Oh wow! damn, it's still here. Well, at the time I was just starting out, so don't flame me for the bad coded code. I would suggest you to look into FU/FUTo source codes.

omg I used WriteFile Sad

BTW, hiding an object with DKOM is easily detected without modifying/hooking any other stuff.
:P I know how it feels, I could find some of my old work and be surprised on what the hell I used to do as well, haha.
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Tue Sep 09, 2008 7:19 pm    Post subject: Reply with quote

I tried searching google but I couldn't find the source for FUTo. Btw, I don't get what you're doing (or the point of it) before you call PsLookupProcessByProcessID(). So this code:

Code:

pIoStackIrp = IoGetCurrentIrpStackLocation(Irp);//provides us with our IO_STACK_LOCATION
   
   if(pIoStackIrp && Irp->MdlAddress)
   {
      target = (var *)MmGetSystemAddressForMdlSafe(Irp->MdlAddress, NormalPagePriority);
      if(target)
      {
         if(pIoStackIrp->Parameters.Write.Length == sizeof(var))
         {

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing


Last edited by oib111 on Tue Sep 09, 2008 7:32 pm; edited 1 time in total
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
UnLmtD
Grandmaster Cheater
Reputation: 0

Joined: 13 Mar 2007
Posts: 894
Location: Canada

PostPosted: Tue Sep 09, 2008 7:32 pm    Post subject: Reply with quote

http://www.rootkit.com/board_project_fused.php?did=proj31
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites