|
[分享]内核下获取SSDT信息
原来可以编辑呀... |
|
[分享]内核下获取SSDT信息
KeServiceDescriptorTable.ServiceTableBase - PSYSTEM_MODULE_INFORMATION->Module[0].Base = NEWSSDT.ServiceTableBase - pBuff(ntoskrnl.exe读入该内存) 原始地址 = *(NEWSSDT.ServiceTableBase + i*4) - pBuff.PIMAGE_NT_HEADERS.ImageBase + PSYSTEM_MODULE_INFORMATION->Module[0].Base; 是这样的关系吗? 虚拟机XpX86试了一下,就第一个函数地址相同,其他都不同,虚拟机没有被HOOK的,这是什么情况? ----------------------------------------------------- 特么写错了... |
|
与驱动通讯 Buffer 太小要如何返回给应用层实际大小?
case IOCTL_GET_READSIZE: { DbgPrint("IOCTL_GET_READSIZE\r\n"); pIrp->IoStatus.Status = STATUS_SUCCESS; pIrp->IoStatus.Information = (wcslen(L"Read Something...") + 1) * sizeof(WCHAR); ntStatus = STATUS_SUCCESS; } break; case IOCTL_READ_CONTENT: { ULONG uMin = 0; DbgPrint("IOCTL_READ_CONTENT\r\n"); //KdBreakPoint(); pBuffRead = pIrp->AssociatedIrp.SystemBuffer; pStack = IoGetCurrentIrpStackLocation(pIrp); uLenRead = pStack->Parameters.Read.Length; uMin = (wcslen(L"Read Something...") + 1) * sizeof(WCHAR); uMin = (uMin>uLenRead) ? uLenRead : uMin; RtlCopyMemory(pBuffRead, L"Read Something...", uMin); pIrp->IoStatus.Status = STATUS_SUCCESS; pIrp->IoStatus.Information = uMin; ntStatus = STATUS_SUCCESS; } break; DWORD dwSize = 0, dwRed = 0; if (::DeviceIoControl(systool.GetDevice(), IOCTL_GET_READSIZE, NULL, 0, NULL, 0, &dwRed, NULL)) { printf("%d\r\n", dwRed); memset(szCurrent, 0, MAX_PATH); if (::DeviceIoControl(systool.GetDevice(), IOCTL_READ_CONTENT, NULL, 0, szCurrent, dwRed, &dwRed, NULL)) { printf("%S\r\n", szCurrent); } } 我试了下,可以分次取长度和内容呀,你再检查一下?代码看看? 36 Read Something... 一个ctrlcode, if (!pBuffRead) { //get size pIrp->IoStatus.Status = STATUS_SUCCESS; pIrp->IoStatus.Information = (wcslen(L"Read Something...") + 1) * sizeof(WCHAR); } else { //get content uMin = (wcslen(L"Read Something...") + 1) * sizeof(WCHAR); uMin = (uMin>uLenRead) ? uLenRead : uMin; RtlCopyMemory(pBuffRead, L"Read Something...", uMin); pIrp->IoStatus.Status = STATUS_SUCCESS; pIrp->IoStatus.Information = uMin; } |
|
与驱动通讯 Buffer 太小要如何返回给应用层实际大小?
DO_BUFFERED_IO,读写时,如何传递参数指针NULL,则对应DispatchRead/DispatchWrite不会有任何处理,你可以通过打印信息测试一下;其他方式没有试过。 |
|
[求助]进程通信,共享段,显式调用不能写共享缓冲区
//share dll write HMODULE hMod = LoadLibrary("../Debug/ShareDll.dll"); if (hMod) { ... // FreeLibrary(hMod); // hMod = NULL; } 原来逻辑有问题,提供共享的进程也给free了.... |
|
[求助]EasySys+VS2008,如何设置编译Release?
BuildDrv.bat 如果要生成 Release 版的驱动,请把下面一行改成 set release=true :: set release=false 没细看,脸红脸红... 结帖结帖...自言自语了,反正不人留意... |
|
|
|
|
|
[求助]LoadPE预留空间要减去0x1000
例子中,PE头内存大小的确是0x1000,我是不理解为什么要减去这个, 这个预留空间不是应该是文件内存大小吗?或者说是大于等于文件内存大小且是内存对齐的整数倍? |
|
[求助]LoadPE预留空间要减去0x1000
管理呀,我能删帖不? |
|
动态加载方式加载的DLL,是否存在于导入表中?
正解!求加其10Kx! |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值