Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 09-25-2013, 02:31
te$ter te$ter is offline
Friend
 
Join Date: Feb 2013
Posts: 63
Rept. Given: 23
Rept. Rcvd 6 Times in 5 Posts
Thanks Given: 20
Thanks Rcvd at 25 Times in 12 Posts
te$ter Reputation: 6
DLLs loading sequence

Is it possible to get sequence how application loads its DLLs?
Reply With Quote
  #2  
Old 09-25-2013, 04:14
gigaman gigaman is offline
Friend
 
Join Date: Jun 2002
Posts: 87
Rept. Given: 0
Rept. Rcvd 3 Times in 2 Posts
Thanks Given: 0
Thanks Rcvd at 14 Times in 11 Posts
gigaman Reputation: 4
Here is a discussion on the subject, with some useful external links.
Reply With Quote
  #3  
Old 09-25-2013, 10:11
wilson bibe wilson bibe is offline
VIP
 
Join Date: Nov 2012
Posts: 492
Rept. Given: 489
Rept. Rcvd 439 Times in 180 Posts
Thanks Given: 859
Thanks Rcvd at 176 Times in 112 Posts
wilson bibe Reputation: 400-499 wilson bibe Reputation: 400-499 wilson bibe Reputation: 400-499 wilson bibe Reputation: 400-499 wilson bibe Reputation: 400-499
If I understood your question, Open your target if it was developed in 32 bits OS, with Hdasm, and you will see what you want when you analyze the imports table and the address of each call.
Reply With Quote
  #4  
Old 09-26-2013, 21:17
deroko's Avatar
deroko deroko is offline
cr4zyserb
 
Join Date: Nov 2005
Posts: 217
Rept. Given: 13
Rept. Rcvd 30 Times in 14 Posts
Thanks Given: 7
Thanks Rcvd at 33 Times in 16 Posts
deroko Reputation: 30
It's possible, you need to hook NtMapViewOfSection. For more details you may look how it's done in this code : http://deroko.phearless.org/itracer.zip (look for NtMapViewOfSection hooking code)
__________________
http://accessroot.com
Reply With Quote
  #5  
Old 10-30-2013, 16:55
arlequim's Avatar
arlequim arlequim is offline
IBMSecuritySystemsXForce
 
Join Date: Feb 2009
Location: Punta Entinas-Sabinar, ALMERIMAR
Posts: 292
Rept. Given: 51
Rept. Rcvd 317 Times in 104 Posts
Thanks Given: 44
Thanks Rcvd at 186 Times in 61 Posts
arlequim Reputation: 300-399 arlequim Reputation: 300-399 arlequim Reputation: 300-399 arlequim Reputation: 300-399
Did you already try putting BPX on LoadLibraryA?

Here is a little asm code just to recall how dll files are loaded:

Code:
    push offset lib
    call LoadLibrary ; will load the dll
    mov hLib, eax
    push offset function
    push hLib
    call GetProcAddress ; will get the procedure to execute
    mov hProc, eax
    call hProc ; will call your function in your DLL
    push hLib
    call FreeLibrary ; free the resource
__________________
<<< The L10n won't give up >>>
Reply With Quote
  #6  
Old 10-30-2013, 18:14
nulli nulli is offline
VIP
 
Join Date: Nov 2003
Posts: 172
Rept. Given: 41
Rept. Rcvd 22 Times in 12 Posts
Thanks Given: 53
Thanks Rcvd at 73 Times in 53 Posts
nulli Reputation: 22
To see how DLLs are loaded for an application I would set the global flag for showing loader snaps (http://msdn.microsoft.com/en-us/library/windows/hardware/ff556886(v=vs.85).aspx) and watch the debug output.

The Windows Internals book has an experiment showing how you can do this. Use google and search for "watching the image loader". Here is a direct link to this page: http://bit.ly/1doJuzI
Reply With Quote
  #7  
Old 10-30-2013, 18:52
arlequim's Avatar
arlequim arlequim is offline
IBMSecuritySystemsXForce
 
Join Date: Feb 2009
Location: Punta Entinas-Sabinar, ALMERIMAR
Posts: 292
Rept. Given: 51
Rept. Rcvd 317 Times in 104 Posts
Thanks Given: 44
Thanks Rcvd at 186 Times in 61 Posts
arlequim Reputation: 300-399 arlequim Reputation: 300-399 arlequim Reputation: 300-399 arlequim Reputation: 300-399
Using WinDBG, first you have to enable your debugger, so type:

!gflag +ksl

Break when your file (.exe or .dll) is loaded:

sxe ld mydll.dll

That's all
__________________
<<< The L10n won't give up >>>
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Plugin loading problem of using ollydbg suddenLy General Discussion 0 03-25-2014 21:17
Why the site is loading so slowly? giv General Discussion 10 05-17-2011 07:18
Ollydbg loading problem hobferret General Discussion 5 07-07-2008 20:40
Loading BIOS from dos debug - possible ? petar General Discussion 9 03-14-2005 00:26


All times are GMT +8. The time now is 23:05.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2024 )