Posted: Thu Nov 24, 2016 12:51 pm Post subject: Enumerating target process Threads and Modules
Modules :
I am enumerating target Process modules by :
EnumProcessModulesEx
GetModuleFileNameEx
GetModuleInformation
I am wondering if Createtoolhelp32snapshot with TH32CS_SNAPMODULE parameter and targetprocess ID will always give the same results or is one method more reliable than the other ?
Threads :
I enumerate them by calling Createtoolhelp32snapshot with TH32CS_SNAPTHREAD and then I match results with target PID.
I reckon there is a hidden thread option in ollydbg and I am wondering if some threads could be hidden from my enumerating function ?
Joined: 25 Jan 2006 Posts: 8518 Location: 127.0.0.1
Posted: Thu Nov 24, 2016 4:09 pm Post subject:
Ultimately they should yield the same information as they both land up calling NtQuerySystemInformation. But the middle-man calls between the root API and getting there could be hooked or altered to fake the results etc.
As for the thread question, threads can be hidden from enumerations via 'NtSetInformationThread' using the 'ThreadHideFromDebugger' value (aka 0x17). This will hide the thread from being visible to debuggers directly. _________________
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum