Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to handle Qt application automatically scanning for dlls in application install directory

How to handle Qt application automatically scanning for dlls in application install directory

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 152 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Callam
    wrote on last edited by
    #1

    A bare-bones Qt application will search for system libraries such as WINMM.dll in the application install directory. This is fairly easy to reproduce with a bare-bones Qt creator project and process monitor (https://learn.microsoft.com/en-us/sysinternals/downloads/procmon). How can we protect a Qt application against dll hijacking techniques? Is there a way to tell an application to only look for particular DLLs in secure system directories, while still looking for the dynamically linked Qt libraries (e.g. Qt6Core.dll) in the application directory?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bonnie
      wrote on last edited by
      #2

      What is "dll hijacking techniques"? It searches for WINMM.dll because Qt6Core links winmm.lib.

      1 Reply Last reply
      4
      • C Offline
        C Offline
        Callam
        wrote on last edited by
        #3

        An "attacker" of some kind could place a dummy WINMM.dll in the application directory, which would cause the application to link against the dummy library before even searching the system directories

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          And what has Qt to do with this? This is a normal windows behavior: https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          4

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved