Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Enumerating target process Threads and Modules

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
ulysse31
Master Cheater
Reputation: 2

Joined: 19 Mar 2015
Posts: 324
Location: Paris

PostPosted: Thu Nov 24, 2016 12:51 pm    Post subject: Enumerating target process Threads and Modules Reply with quote

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 ?
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 199

Joined: 25 Jan 2006
Posts: 8518
Location: 127.0.0.1

PostPosted: Thu Nov 24, 2016 4:09 pm    Post subject: This post has 1 review(s) Reply with quote

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.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
ulysse31
Master Cheater
Reputation: 2

Joined: 19 Mar 2015
Posts: 324
Location: Paris

PostPosted: Fri Nov 25, 2016 5:31 am    Post subject: Reply with quote

Thank you very much
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites