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: 59
Rept. Given: 23
Rept. Rcvd 6 Times in 5 Posts
Thanks Given: 19
Thanks Rcvd at 19 Times in 10 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: 86
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: 442
Rept. Given: 476
Rept. Rcvd 439 Times in 180 Posts
Thanks Given: 380
Thanks Rcvd at 156 Times in 97 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 31 Times in 15 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: 274
Rept. Given: 48
Rept. Rcvd 307 Times in 99 Posts
Thanks Given: 25
Thanks Rcvd at 101 Times in 47 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 Li0n won't give up >>>
Reply With Quote
  #6  
Old 10-30-2013, 18:14
nulli nulli is offline
VIP
 
Join Date: Nov 2003
Posts: 146
Rept. Given: 39
Rept. Rcvd 19 Times in 9 Posts
Thanks Given: 34
Thanks Rcvd at 50 Times in 38 Posts
nulli Reputation: 19
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: 274
Rept. Given: 48
Rept. Rcvd 307 Times in 99 Posts
Thanks Given: 25
Thanks Rcvd at 101 Times in 47 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 Li0n 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 14:08.


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