Check DLL Dependencies of Windows Executable on Linux

Check DLL Dependencies of Windows Executable on Linux

When exploring a Windows executable from a Linux environment, it can be useful to determine which Dynamic Link Libraries (DLLs) the program expects to load. This information can help during reverse engineering, compatibility testing, troubleshooting, or binary analysis. This tutorial shows how to check DLL dependencies of Windows executable on Linux.

A widely used utility for examining Windows Portable Executable (PE) files on Linux is objdump, which is included in the Binutils package. Its -p option displays information from the PE headers, including the DLLs listed in the import table.

For testing purpose download Windows executable:

curl -sSLo 7z.exe https://github.com/ip7z/7zip/releases/download/26.00/7z2600-x64.exe

The imported DLL names can be extracted using the following command:

objdump -p 7z.exe | grep -i 'DLL Name'

A typical result looks like this:

DLL Name: ole32.dll
DLL Name: USER32.dll
DLL Name: ADVAPI32.dll
DLL Name: SHELL32.dll
DLL Name: msvcrt.dll
DLL Name: KERNEL32.dll

The output lists the Windows libraries referenced by the executable.

Leave a Comment

Cancel reply

Your email address will not be published.