Ctrl+Inject

This technique uses a callback function for Control signal handlers to inject the malicious code. Each time a control signal, such as Ctrl+C, is received by a process the system creates a new thread to execute the function. The thread is created by legitimate process “csrss.exe” in the system, rendering the detection more difficult.

By using this technique, it is possible to inject a code each time a console process receives a control signal. To do that, the technique needs to bypass some Windows protections such as Pointer Encoding and Control Flow Guard. Pointer encoding is used to encode a pointer and avoid pointer corruption. The technique reproduces the encoding to appear legitimate. Control Flow Guard is a security mechanism to prevent memory corruption such as buffer overflow. The technique will simply use the API SetProcessValidCallTargets to validate the call target. Thus, by triggering Ctrl+C the injected code is executed.

U1213

Additional Resources

Subscribe to our Newsletter


The information entered into this form is mandatory. It will be subjected to computer processing. It is processed by computer in order to support our users and readers. The recipients of the data will be : contact@unprotect.it.

According to the Data Protection Act of January 6th, 1978, you have at any time, a right of access to and rectification of all of your personal data. If you wish to exercise this right and gain access to your personal data, please write to Thomas Roccia at contact@unprotect.it.

You may also oppose, for legitimate reasons, the processing of your personal data.