首页
社区
课程
招聘
[旧帖] 求批 win32asm 代码 ZwOpenSection相关问题 0.00雪花
发表于: 2010-8-12 21:09 4886

[旧帖] 求批 win32asm 代码 ZwOpenSection相关问题 0.00雪花

2010-8-12 21:09
4886
问题:
ZwOpenSection  没能返回正常 总是返回 C000003A
#define STATUS_OBJECT_PATH_NOT_FOUND  ((NTSTATUS)0xC000003A)
不知道如何解决

环境:
win xp sp2
masm

代码:

.386
.model flat, stdcall
option casemap:none

include ..\Macro\strings.mac

include  w2k\Ntdll.inc
include  w2k\Ntdef.inc

includelib  E:\RadASM\Masm\Lib\w2k\ntdll.lib
;======================================

.data?
	hSection dd ?	
	objName 		UNICODE_STRING <?>
	objAttributes  	OBJECT_ATTRIBUTES   <?>

	
.code
start:
	
	invoke  RtlInitUnicodeString, addr  objName, $CTW0("\\Devices\\PhysicalMemory")
	
	mov objAttributes._Length, sizeof OBJECT_ATTRIBUTES
	mov objAttributes.RootDirectory, NULL
	mov objAttributes.ObjectName,  offset objName
	mov objAttributes.Attributes, 00000200h			;OBJ_CASE_INSENSITIVE or OBJ_KERNEL_HANDLE
	mov objAttributes.SecurityDescriptor, NULL
	mov objAttributes.SecurityQualityOfService, NULL
	
	invoke  ZwOpenSection, addr hSection, 6, addr objAttributes
	mov ecx,eax
	
end start


[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

收藏
免费 0
支持
分享
最新回复 (4)
雪    币: 452
活跃值: (72)
能力值: ( LV9,RANK:330 )
在线值:
发帖
回帖
粉丝
2
try this:
$CTW0("\\??\\Devices\\PhysicalMemory")
2010-8-12 21:38
0
雪    币: 16
活跃值: (11)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
the same
eax = C000003A

invoke  RtlInitUnicodeString, addr  objName, $CTW0("\\??\\Devices\\PhysicalMemory")
2010-8-12 21:46
0
雪    币: 16
活跃值: (11)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
不好意思  
invoke  RtlInitUnicodeString, addr  objName, $CTW0("\\Device\\PhysicalMemory")
Device 写成了 Devices 。。。。

现在的错误码是  C0000022
#define STATUS_ACCESS_DENIED          ((NTSTATUS)0xC0000022)

继续解决中 ....
2010-8-12 22:11
0
雪    币: 452
活跃值: (72)
能力值: ( LV9,RANK:330 )
在线值:
发帖
回帖
粉丝
5
you didn't get handle of section?
try CreateFile() to get a handle of that section before open it
2010-8-12 23:20
0
游客
登录 | 注册 方可回帖
返回
//