You can do it in IDA by calling VirtualProtect in the process' context with Appcall. From
Practical Appcall examples:
In the following example we will change the PE header page protection
to execute/read/write (normally it is read-only):
virtprot = Appcall.proto("kernel32_VirtualProtect",
"BOOL __stdcall VirtualProtect(LPVOID addr, DWORD sz,...
This technique can occur in two ways, the first is through usermode, for example an application or an application module checks a snapshot of all processes in search of a blacklisted process or by debugger window patterns, in this first case you can rename the window and check if it will continue, the second way is to go to the folder of your program "...