HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Sun Dec 07, 2008 2:29 pm Post subject: [Kernel Snippet] Process Bruteforcing [fixed] |
|
|
So far this will get all the processes ACTIVE. I fixed it so it will show only running processes.
| Code: | #include <ntddk.h>
#include <ntifs.h>
LPSTR NTAPI PsGetProcessImageFileName (PEPROCESS Process);
int pid = 0;
PEPROCESS cprocess;
void DriverUnload(PDRIVER_OBJECT pDriverObject)
{
DbgPrint("Driver unloading\n");
}
void LoopProcesses()
{
pid = 0x0;
while(pid <= 0x41DC)
{
if(PsLookupProcessByProcessId(pid, &cprocess) == STATUS_SUCCESS)
if(!cprocess->ExitTime.LowPart)
{
DbgPrint("%d: Process Name: %s \n",pid, PsGetProcessImageFileName(cprocess));
}
pid = pid+0x4;
}
}
NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
DriverObject->DriverUnload = DriverUnload;
DbgPrint("Driver Loaded\n");
LoopProcesses();
return STATUS_SUCCESS;
}
|
_________________
|
|