juniorjacob / readwrite-kernel-stable Goto Github PK
View Code? Open in Web Editor NEWa more stable & secure read/write virtual memory for kernel mode drivers
a more stable & secure read/write virtual memory for kernel mode drivers
E
WinDBG on MEMORYDUMP.TMP
shows the crash happens here
if (SelectedModule.Base != NULL && SelectedModule.Size != NULL) {
*sent->module.buffer = SelectedModule; //<------ Here
}
Maybe because I didn't allocate the buffer?
I use it like this
DWORD GetModulesInformation(MEMORY_REQUEST* moduleList)
{
if (hDriver == INVALID_HANDLE_VALUE)
return 0;
DWORD dwBytes;
if (DeviceIoControl(hDriver, IO_GET_MODULE_REQUEST, moduleList,
sizeof(MEMORY_REQUEST), moduleList, sizeof(MEMORY_REQUEST), &dwBytes, NULL))
return 1;
else
return 0;
}
MEMORY_REQUEST moduleRetieve;
moduleRetieve.ProcessId = ProcessId;
wcsncpy_s(moduleRetieve.module.moduleName, L"ntdll.dll", 1024);
Driver.GetModulesInformation(&moduleRetieve);
std::cout << "Module: " << moduleRetieve.module.buffer->Name << " Information Base: " << moduleRetieve.module.buffer->Base << " Size : " << moduleRetieve.module.buffer->Size << std::endl;
should I replace
MODULE_INFO* buffer;
with
MODULE_INFO buffer;
?
I think that may fix it.
or should I do something like this
*sent->module.buffer = &SelectedModule;
nevermind this gives a compile error..
I changed the pointer on
typedef struct _KERNEL_MODULE_REQUEST
{
MODULE_INFO buffer;
WCHAR moduleName[1024];
} KERNEL_MODULE_REQUEST, * PKERNEL_MODULE_REQUEST;
and the problem went away.
new testing code looks like this
MEMORY_REQUEST moduleRetieve;
moduleRetieve.ProcessId = ProcessId;
wcsncpy_s(moduleRetieve.module.moduleName, L"ntdll.dll", 1024);
Driver.GetModulesInformation(&moduleRetieve);
std::cout << "Module: " << moduleRetieve.module.buffer.Name << " Information Base: " << moduleRetieve.module.buffer.Base << " Size : " << moduleRetieve.module.buffer.Size << std::endl;
"these method's are slightly more secure compared to paracorded's methods (links in driver.c) and should be faster then MmCopyVirtualMemory"
did you benchmark? Why would it be faster? What's wrong with MmCopyVirtualMemory?
As you yourself write,
(..) this project is deprecated
and will not be updated anymore, (..)
I still wanted to say thanks for making it public! And also writing that it is indeed outdated/deprecated.
I got recommended this and I usually don't pay attention to those recommendations but, some times (like this time) I do find something interesting (this repo).
I just felt for writing this 'comment' which can be closed by the way as it is not a question nor a issue.
๐ฅ Have a great Day and Wishes from Sweden!
i think the code you write is standard.i can learn from it as i am novice .
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.