|
[求助]PVOID指向的内存内容用十六进制输出到文件中
想了一下 上面的方案不正确。 应该是这样 PVOID转成PCHAR, 每次+1, 赋给unsigned char,再赋给unsigned int,再除以16,分别取商和余数,再用case语句,分别初始化商和余数的unicode_string写入文件。 |
|
|
|
|
|
|
|
[求助] [SSDT HOOK] 调用NtXXX函数问题
我在MyNtCreateFile中 ,最后也是返回Nt*原函数OriNtCreateFile ,好像没有设置mode,也调用成功了 这个又是为什么啊? |
|
[求助] [SSDT HOOK] 调用NtXXX函数问题
写的是驱动 直接调用Nt* 也要设置premode吗? |
|
[求助] [SSDT HOOK] 调用NtXXX函数问题
写的是驱动。。。本身就是在内核中的 直接调用内核函数Nt*必须先设置PreMode? |
|
[求助] [SSDT HOOK] 调用NtXXX函数问题
附上调用代码: UNICODE_STRING mystr;//定义字符串结构用来存放字符串 UNICODE_STRING temp;//定义字符串结构来存放文件名 OBJECT_ATTRIBUTES myoa;//定义一个操作对象 HANDLE hfile=NULL;//定义一个句柄用于接收返回的文件句柄 IO_STATUS_BLOCK iostatus;//定义结构用来接收打开文件的返回值 NTSTATUS ntStatus = 0; RtlInitUnicodeString(&mystr,L"test!");//初始化字符串 mypath.Buffer=(PWCHAR)ExAllocatePoolWithTag(NonPagedPool,256,'My'); RtlInitUnicodeString(&temp,L"\\??\\D:\\info\\");//初始化路径字符串 RtlCopyUnicodeString(&mypath,&temp); RtlInitUnicodeString(&temp,L"myfile.txt"); RtlAppendUnicodeStringToString(&mypath,&temp); DbgPrint("[info] 完整路径 path = %wZ", &mypath); InitializeObjectAttributes(//初始化操作对象 &myoa,//操作对象 &mypath,//路径 OBJ_KERNEL_HANDLE|OBJ_CASE_INSENSITIVE,//属性 NULL, NULL ); // DbgPrint("[Info] RootDirectory = %S\n", myoa.RootDirectory); // DbgPrint("[Info] ObjectName = %wZ\n", myoa.ObjectName); ntStatus = OriNtCreateFile(//创建文件 &hfile,//返回的句柄 FILE_APPEND_DATA|SYNCHRONIZE,//打开文件时候的权限 &myoa,//文件对象 &iostatus,//返回值 NULL, FILE_ATTRIBUTE_NORMAL, FILE_SHARE_READ,//共享权限 FILE_OPEN_IF,//打开文件的方式 FILE_NON_DIRECTORY_FILE|FILE_RANDOM_ACCESS|FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0); if (!NT_SUCCESS(ntStatus)) { DbgPrint("[Info]OriNtCreateFile failed with error:%08x\r\n", ntStatus); } ntStatus = OriNtWriteFile( hfile,//文件句柄 NULL, NULL, NULL, &iostatus,//返回值 mystr.Buffer,//字符串缓冲区 mystr.Length,//字符串长度 NULL, NULL ); if (!NT_SUCCESS(ntStatus)) { DbgPrint("[Info]OriNtWriteFile failed with error:%08x\r\n", ntStatus); } DbgPrint("[info] WriteTest OK\n"); ExFreePool(mypath.Buffer); ZwClose(hfile); |
|
[求助]HOOK NtSetInformationFile
大大们 在哪里 |
|
[求助]关于 SSDT Hook
谢谢回答~好像明白了~ |
|
[求助]关于 SSDT Hook
我看了好久nt和zw函数的区别 包括内核态和用户态调用他们的时候的区别 但是还是不知道这里为什么写zw行写nt不行 求大大点拨一下下 谢谢 |
|
[求助]关于 SSDT Hook
大大们在哪里... |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值