Skip to content

Instantly share code, notes, and snippets.

View SouhailHammou's full-sized avatar

Souhail Hammou SouhailHammou

View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#define SUMS_SZ 0x10000 * sizeof(int16_t)
#define VM_SZ sizeof(initial_state)
typedef int16_t WORD;
pid = /*Locate the service's pid with the help of NtQuerySystemInformation*/;
for( Page = 0x1000; Page < 0x7fffffff; Page += 0x1000 )
{
Page_cp = Page;
OldProtection = CommunicateServiceVirtualProtect(
pid, //We give the service its own pid
Page, //Address of the page in the service's process
PAGE_EXECUTE_READWRITE, //Change to the most permissible protection to avoid crashes
0x1000
);
#include <Windows.h>
#define NTHREADS 5
DWORD WINAPI Thread(LPVOID Parameter)
{
while (1)
CloseHandle(FindFirstChangeNotificationA("C:\\", FALSE, FILE_NOTIFY_CHANGE_FILE_NAME));
}
void main()
{
HANDLE hLastThread;