好友
阅读权限10
听众
最后登录1970-1-1
|
NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
DriverObject->DriverUnload = DriverUnLoad;
PEPROCESS pProcess = EnumProcess("chrome.exe");
ChangeProcessName(pProcess);
return STATUS_SUCCESS;
}
void ChangeProcessName(PEPROCESS pProcess)
{
KIRQL irql = WPOFFx64();
//ImageFileName
//PUCHAR pName1 = (PUCHAR)((ULONG64)pProcess + 0x2e0);
//UCHAR* str1 = "csrss.exe";
//RtlCopyMemory(pName1, str1, 14);
//SE_AUDIT_PROCESS_CREATION_INFO
//改了之后这个ExpGetProcessInformation函数会出现问题导致蓝屏
UNICODE_STRING Name = { 0 };
Name.Length = 0x7e;
Name.MaximumLength = 0x80;
Name.Buffer = L"\\Device\\HarddiskVolume1\\Windows\\System32\\Application\\csrss.exe";
//WCHAR* p = L"\\Device\\HarddiskVolume1\\Windows\\System32\\Application\\csrss.exe";
//SE_AUDIT_PROCESS_CREATION_INFO info1;
//OBJECT_NAME_INFORMATION info2;
//(&info2)->Name = Name;
//info1.ImageFileName = &info2;
PULONG64 pName2 = (PULONG64)((ULONG64)pProcess + 0x390);
*pName2 = &Name;
//PEB-->ProcessParameters-->ImagePathName
//PEB-->ProcessParameters-->CommandLine
//PEB->ProcessParameters-->WindowTitle
/*
PPEB pPeb = (PPEB)((ULONG64)pProcess + PebOffset);
PRTL_USER_PROCESS_PARAMETERS pProcessParameters = (PRTL_USER_PROCESS_PARAMETERS)((ULONG64)pPeb + 0x20);
UNICODE_STRING ImagePathName;
UNICODE_STRING CommandLine;
UNICODE_STRING WindowTitle;
RtlInitUnicodeString(&ImagePathName, L"csrss.exe");
RtlInitUnicodeString(&CommandLine, L"csrss.exe");
RtlInitUnicodeString(&WindowTitle, L"csrss.exe");
pProcessParameters->CommandLine = CommandLine;
pProcessParameters->ImagePathName = ImagePathName;
pProcessParameters->WindowTitle = WindowTitle;
//PEB-->LDR-->InLoadOrderModuleList->第一个结构->FullDllName
//PEB-->LDR-->InLoadOrderModuleList->第一个结构->BaseDllName
//PEB-->LDR-->InMemoryOrderModuleList->第一个结构->FullDllName
PPEB_LDR_DATA pLdr = (PPEB_LDR_DATA)((ULONG64)pPeb + 0x18);
*/
WPONx64(irql);
}
函数的参数是一个进程的PPROCESS结构。
目的是把目标进程改名为csrss.exe
红色标注的是崩溃的地方,大致是内核中_eproecess结构中SE_AUDIT_PROCESS_CREATION_INFO 获取进程名,并修改。任务管理器是靠这个获取的,所以可以看进程管理器,但是修改后每次都乱码,然后1分钟左右崩溃。反汇编后大概是ExpGetProcessInformation出了问题,百度谷歌都没的资料。说的可能不太清楚,需要一点内核经验。 |
|
发帖前要善用【论坛搜索】功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。 |
|
|
|
|