With PAGE_EXECUTE_READWRITE VirtualAllocEx distribution properties of space, in which the deposit two parts ASM code,
A is registered to the StartServiceCtrlDispatcher code, a code is registered to the RegisterServiceCtrlHandler,
Service starts, registered to the StartServiceCtrlDispatcher ASM is executed to properly, and I want to jump function;
But not registered to RegisterServiceCtrlHandler AMS is executed to, and perform "sc stop" service to shut down,
The debug information see:
(sechost. DLL) (Service. Exe) in the first opportunity of abnormality: 0 xc0000005: while reading position 0 x0000000000000038 access conflict,
Made a try, my written in C, can be executed correctly registered to RegisterServiceCtrlHandler function, direct copy to VirtualAllocEx allocated space, also can appear the problems above,
Excuse me, are there any restrictions on here? Still need to pay attention to? You give me some advice, thank you ~
CodePudding user response:
Search "Session0 through"