MantisBT - Cheat Engine
View Issue Details
0000400Cheat Engine(No Category)public2015-08-11 20:212015-08-12 10:52
Reporterpausebreak7 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Summary0000400: writes Ignore WriteProtection bug or option?
Descriptionnew release version
implement dbk_getPhysicalAddress and dbk_writesIgnoreWriteProtection

driver kernel memory fix computer BSOD

Cheat Engine WP Control OPTION & BUG?

I solved the problem but new release code bsod

success code last comment

http://cheatengine.org/mantis/view.php?id=386
Steps To ReproduceBOOL disabledWP = FALSE;
target=Address;
source=Buffer;
if (loadedbydbvm) //add a extra security around it as the PF will not be handled
if ((loadedbydbvm) || (KernelWritesIgnoreWP)) //add a extra security around it as the PF will not be handled
{
disableInterrupts();
vmx_disable_dataPageFaults();
}
if (loadedbydbvm)
vmx_disable_dataPageFaults();
for (i=0; i<Size; i++)
{
target[i]=source[i];
if (KernelWritesIgnoreWP)
{
DbgPrint("Disabling CR0.WP");
setCR0(getCR0() & (~(1 << 16))); //disable the WP bit
disabledWP = TRUE;
}
}
RtlCopyMemory(target, source, Size);
ntStatus = STATUS_SUCCESS;
if (loadedbydbvm)
if ((loadedbydbvm) || (disabledWP))
{
UINT_PTR lastError;
lastError=vmx_getLastSkippedPageFault();
vmx_enable_dataPageFaults();
UINT_PTR lastError=0;
if (disabledWP)
{
setCR0(getCR0() | (1 << 16));
DbgPrint("Enabled CR0.WP");
}
if (loadedbydbvm)
{
lastError = vmx_getLastSkippedPageFault();
vmx_enable_dataPageFaults();
}
enableInterrupts();
TagsNo tags attached.
Attached Filespng error3.png (165,181) 2015-08-11 20:21
http://cheatengine.org/mantis/file_download.php?file_id=148&type=bug
png

Notes
(0000831)
Dark Byte   
2015-08-12 02:44   
your modifications didn't get properly merged with the new code. You need to get a clean copy or do not get the latest version of that function and use your own
(0000834)
pausebreak7   
2015-08-12 09:32   
Incomplete code

latest source version updates wait?
(0000835)
Dark Byte   
2015-08-12 10:44   
(Last edited: 2015-08-12 10:52)
The code is fine, but your previous modifications are conflicting with the new code

e.g:
if (loadedbydbvm) //add a extra security around it as the PF will not be handled
if ((loadedbydbvm) || (KernelWritesIgnoreWP)) //add a extra security around it as the PF will not be handled
{

That first if statement shouldn't be there, it will negate the OR statement of the next IF line

and:
for (i=0; i<Size; i++)
{
target[i]=source[i];
if (KernelWritesIgnoreWP)
{

that for loop got replaced and there's certainly no need to do that if check inside the loop

this is how it should look: https://github.com/cheat-engine/cheat-engine/blob/master/DBKKernel/memscan.c#L188

Anyhow, this patch is most likely not compatible with your requirement, so you can ignore it if you want and just keep your own code.

e.g you added a check for kernelmode memory only so it doesn't affect all processes, but I made this option specifically so it can affect all processes at the same time.

( Default it's off. But you enable/disable the feature with the lua command dbk_writesIgnoreWriteProtection(true) and dbk_writesIgnoreWriteProtection(false) )

(0000836)
pausebreak7   
2015-08-12 10:52   
thankyou darkbyte

Issue History
2015-08-11 20:21pausebreak7New Issue
2015-08-11 20:21pausebreak7File Added: error3.png
2015-08-12 02:44Dark ByteNote Added: 0000831
2015-08-12 09:32pausebreak7Note Added: 0000834
2015-08-12 10:44Dark ByteNote Added: 0000835
2015-08-12 10:48Dark ByteNote Edited: 0000835bug_revision_view_page.php?bugnote_id=835#r83
2015-08-12 10:48Dark ByteNote Edited: 0000835bug_revision_view_page.php?bugnote_id=835#r84
2015-08-12 10:50Dark ByteNote Edited: 0000835bug_revision_view_page.php?bugnote_id=835#r85
2015-08-12 10:51Dark ByteNote Edited: 0000835bug_revision_view_page.php?bugnote_id=835#r86
2015-08-12 10:51Dark ByteNote Edited: 0000835bug_revision_view_page.php?bugnote_id=835#r87
2015-08-12 10:52pausebreak7Note Added: 0000836
2015-08-12 10:52Dark ByteNote Edited: 0000835bug_revision_view_page.php?bugnote_id=835#r88
2016-02-29 11:30Carter GreatshowIssue cloned: 0000449