-
-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
Description
When the process exits while CreateRemoteThread is called, the return type is None, but pymem is not checking that below:
Lines 168 to 183 in 0ca7f66
| params = params or 0 | |
| NULL_SECURITY_ATTRIBUTES = ctypes.cast(0, pymem.ressources.structure.LPSECURITY_ATTRIBUTES) | |
| thread_h = pymem.ressources.kernel32.CreateRemoteThread( | |
| self.process_handle, | |
| NULL_SECURITY_ATTRIBUTES, | |
| 0, | |
| address, | |
| params, | |
| 0, | |
| ctypes.byref(ctypes.c_ulong(0)) | |
| ) | |
| last_error = ctypes.windll.kernel32.GetLastError() | |
| if last_error: | |
| pymem.logger.warning('Got an error in start thread, code: %s' % last_error) | |
| pymem.ressources.kernel32.WaitForSingleObject(thread_h, -1) | |
| pymem.logger.debug('New thread_id: 0x%08x' % thread_h) |
GetLastError() returned code 5 and I got logging error TypeError: %x format: an integer is required, not NoneType at line 183.
Reactions are currently unavailable