-
Notifications
You must be signed in to change notification settings - Fork 117
Closed
Description
Hello,
Sorry if this package is not intended for ARM64, but I had to use it on that architecture and unfortunately I got some errors.
When trying to get the PEB for a process, I get the following error:
File "C:\Python311\Lib\site-packages\windows\utils\pythonutils.py", line 18, in prop
return getattr(self, cache_name)
AttributeError: 'WinProcess' object has no attribute '_bitness'. Did you mean: 'bitness'?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python311\Lib\site-packages\windows\utils\pythonutils.py", line 18, in prop
return getattr(self, cache_name)
AttributeError: 'WinProcess' object has no attribute '_is_wow_64'. Did you mean: 'is_wow_64'?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python311\Lib\site-packages\windows\utils\pythonutils.py", line 18, in prop
return getattr(self, cache_name)
AttributeError: 'CurrentProcess' object has no attribute '_peb'. Did you mean: 'peb'?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
peb = windows.WinProcess(5148).peb
File "C:\Python311\Lib\site-packages\windows\winobject\process.py", line 1155, in peb
if windows.current_process.bitness == 64 and self.bitness == 32:
File "C:\Python311\Lib\site-packages\windows\utils\pythonutils.py", line 20, in prop
setattr(self, cache_name, f(self))
File "C:\Python311\Lib\site-packages\windows\winobject\process.py", line 84, in bitness
if self.is_wow_64:
File "C:\Python311\Lib\site-packages\windows\utils\pythonutils.py", line 20, in prop
setattr(self, cache_name, f(self))
File "C:\Python311\Lib\site-packages\windows\winobject\process.py", line 74, in is_wow_64
return utils.is_wow_64(self.limited_handle)
File "C:\Python311\Lib\site-packages\windows\utils\winutils.py", line 41, in is_wow_64
fnIsWow64Process = get_func_addr("kernel32.dll", "IsWow64Process")
File "C:\Python311\Lib\site-packages\windows\utils\winutils.py", line 24, in get_func_addr
modules = windows.current_process.peb.modules
File "C:\Python311\Lib\site-packages\windows\utils\pythonutils.py", line 20, in prop
setattr(self, cache_name, f(self))
File "C:\Python311\Lib\site-packages\windows\winobject\process.py", line 649, in peb
return PEB.from_address(self.get_peb_builtin()())
OSError: [WinError -1073741795] Windows Error 0xc000001d
From what I can see, the PEB is retrieved from FS:[0x30] on Win32 and from GS:[0x60] on x64. However, for ARM64, a __getReg(18) on 0x60 would be needed.
https://gist.github.com/ReneNyffenegger/74d1416242750e002ba4bb8fb1f4681e
Could you please add this code for getting the PEB on ARM64?
Thank you!
Metadata
Metadata
Assignees
Labels
No labels