Quote:
引用第9楼yinx于2007-12-22 12:04发表的 :
本来是不可以的,
但它调用了SetPhyscialMemorySectionCanBeWrited这个函数之后就可以了
我错了~~
status = ntdll.CallFunc( "ZwOpenSection",
&m_hSection,
SECTION_MAP_READ|SECTION_MAP_WRITE,
&objectAttributes );
if(status == STATUS_ACCESS_DENIED)
{
status = ntdll.CallFunc( "ZwOpenSection",
&m_hSection,
READ_CONTROL|WRITE_DAC,
&objectAttributes );
if( status == STATUS_SUCCESS )
{
SetPhyscialMemorySectionCanBeWrited(m_hSection);
ntdll.CallFunc( "ZwClose", m_hSection );
status = ntdll.CallFunc( "ZwOpenSection",
&m_hSection,
SECTION_MAP_WRITE|SECTION_MAP_WRITE,
&objectAttributes );
}
}
他是先调用ZwOpenSection,如果返回STATUS_ACCESS_DENIED再调用SetPhyscialMemorySectionCanBeWrited的。
我调试的时候调用ZwOpenSection就已经成功的了,程序没有再去调用SetPhyscialMemorySectionCanBeWrited