Notify the load of a new module. @warning: This method is meant to be used internally by the debugger. @type event: L{LoadDLLEvent} @param event: Load DLL event. @rtype: bool @return: C{True} to call the user-defined handle, C{False} otherwise.
(self, event)
| 1337 | return event.get_process()._notify_create_thread(event) |
| 1338 | |
| 1339 | def _notify_load_dll(self, event): |
| 1340 | """ |
| 1341 | Notify the load of a new module. |
| 1342 | |
| 1343 | @warning: This method is meant to be used internally by the debugger. |
| 1344 | |
| 1345 | @type event: L{LoadDLLEvent} |
| 1346 | @param event: Load DLL event. |
| 1347 | |
| 1348 | @rtype: bool |
| 1349 | @return: C{True} to call the user-defined handle, C{False} otherwise. |
| 1350 | """ |
| 1351 | |
| 1352 | # Pass the event to the breakpoint container. |
| 1353 | bCallHandler = _BreakpointContainer._notify_load_dll(self, event) |
| 1354 | |
| 1355 | # Get the process where the DLL was loaded. |
| 1356 | aProcess = event.get_process() |
| 1357 | |
| 1358 | # Pass the event to the process. |
| 1359 | bCallHandler = aProcess._notify_load_dll(event) and bCallHandler |
| 1360 | |
| 1361 | # Anti-anti-debugging tricks on ntdll.dll. |
| 1362 | if self.__bHostileCode: |
| 1363 | aModule = event.get_module() |
| 1364 | if aModule.match_name("ntdll.dll"): |
| 1365 | # Since we've overwritten the PEB to hide |
| 1366 | # ourselves, we no longer have the system |
| 1367 | # breakpoint when attaching to the process. |
| 1368 | # Set a breakpoint at ntdll!DbgUiRemoteBreakin |
| 1369 | # instead (that's where the debug API spawns |
| 1370 | # it's auxiliary threads). This also defeats |
| 1371 | # a simple anti-debugging trick: the hostile |
| 1372 | # process could have overwritten the int3 |
| 1373 | # instruction at the system breakpoint. |
| 1374 | self.break_at(aProcess.get_pid(), aProcess.resolve_label("ntdll!DbgUiRemoteBreakin")) |
| 1375 | |
| 1376 | return bCallHandler |
| 1377 | |
| 1378 | def _notify_exit_process(self, event): |
| 1379 | """ |
nothing calls this directly
no test coverage detected