Date: Mon, 11 May 2015 18:27:35 +0300 From: Shinnok <admin@...nnok.com> To: john-dev@...ts.openwall.com Subject: Re: [core john] [Johnny] Windows event loop > On May 11, 2015, at 6:15 PM, Shinnok <admin@...nnok.com> wrote: > > >> On May 11, 2015, at 4:45 PM, Mathieu Laprise <mathlaprise@...il.com <mailto:mathlaprise@...il.com>> wrote: >> >> Shinnok said: >> Mathieu, I'm not sure you have been exhaustive enough in assertions regarding the exploitation of the CTRL_ events. >> >> What we know: >> >> 1. We can signal CTRL_ events to JtR on Windows with GenerateConsoleCtrlEvent. (#ifdef'ed of course) https://msdn.microsoft.com/en-us/library/windows/desktop/ms683155(v=vs.85).aspx <https://msdn.microsoft.com/en-us/library/windows/desktop/ms683155%28v=vs.85%29.aspx> >> 2. We can ignore CTRL_ events in Johnny by doing: >> " • Calling SetConsoleCtrlHandler with the NULL and TRUE arguments causes the calling process to ignore CTRL+C signals. This attribute is inherited by child processes, but it can be enabled or disabled by any process without affecting existing processes." https://msdn.microsoft.com/en-us/library/windows/desktop/ms686016(v=vs.85).aspx <https://msdn.microsoft.com/en-us/library/windows/desktop/ms686016%28v=vs.85%29.aspx> >> 3. We can re-enable CTRL_ events back in JtR. Simple patch to core. >> 4. Verify in signals.c that JtR does indeed kill itself upon doing that for Windows. >> 5. Hail that we don't have --fork there. >> >> Let's focus on CTRL_C_EVENT until we have reason to do otherwise. >> >> I tried this solution a few days ago which is based on KingDragon( http://stackoverflow.com/questions/813086/can-i-send-a-ctrl-c-sigint-to-an-application-on-windows <http://stackoverflow.com/questions/813086/can-i-send-a-ctrl-c-sigint-to-an-application-on-windows>) but as I stated at the end of this answer http://www.openwall.com/lists/john-dev/2015/05/08/16 <http://www.openwall.com/lists/john-dev/2015/05/08/16>. To stress this option a bit more, have you explicitly re-enabled CTRL events in JtR after disabling in Johnny? like this: SetConsoleCtrlHandler(NULL, FALSE) As per the doc: "If the HandlerRoutine parameter is NULL, a TRUE value causes the calling process to ignore CTRL+C input, and a FALSE value restores normal processing of CTRL+C input. This attribute of ignoring or processing CTRL+C is inherited by child processes." Shinnok Content of type "text/html" skipped
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.