Is it possible to get the name and path of a DLL that is loaded by the application using PyDBG and System_dll.py? I have a script and PyDBG handles loaded dlls with just: dbg.set_callback(LOAD_DLL_DEBUG_EVENT, handler_print_dll_loaded)

Is there a way to get the loaded DLL's using tools in pydbg to return somthing similar to Immunity Debuggers Log Data window:

67EE0000 Module C:\windows\SYSTEM32\OLEPRO32.DLL 69E20000 Module C:\windows\SYSTEM32\oledlg.dll 6F5E0000 Module C:\windows\SYSTEM32\WINMMBASE.dll 6F7F0000 Module C:\windows\SYSTEM32\WINMM.dll etc...

1 Answer 1



import sys
from pydbg import * 
for modules in pydbg().attach(int(sys.argv[1])).enumerate_modules():
    print modules


('calc.exe', 12517376L)
('ntdll.dll', 1999765504L)
('kernel32.dll', 1970733056L)
('KERNELBASE.dll', 1968111616L)
('oleacc.dll', 1836253184L)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.