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. Protecting app against reverse engineering through static linking
Qt 6.11 is out! See what's new in the release blog

Protecting app against reverse engineering through static linking

Scheduled Pinned Locked Moved Solved General and Desktop
17 Posts 8 Posters 2.3k Views 4 Watching
  • 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #8

    The Qt Company does not provide static builds.

    Perhaps commercial customer can request them but to the best of my knowledge it's not part of the CI.

    Some of the reasons (educated guess) for not providing static builds beside the size, additional build targets, tests and thus load on the people and infrastructure is that there are constraints for the GPL and LGPL that makes the use of static builds less than practical.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    SPlattenS 1 Reply Last reply
    1
    • SGaistS SGaist

      The Qt Company does not provide static builds.

      Perhaps commercial customer can request them but to the best of my knowledge it's not part of the CI.

      Some of the reasons (educated guess) for not providing static builds beside the size, additional build targets, tests and thus load on the people and infrastructure is that there are constraints for the GPL and LGPL that makes the use of static builds less than practical.

      SPlattenS Offline
      SPlattenS Offline
      SPlatten
      wrote on last edited by
      #9

      @JonB , @SGaist , Where I have been at clients with commercial licenses I have used static builds and I'm pretty sure the libraries were already built, this was using 5.12

      Kind Regards,
      Sy

      jsulmJ J.HilkJ 2 Replies Last reply
      0
      • SPlattenS SPlatten

        @JonB , @SGaist , Where I have been at clients with commercial licenses I have used static builds and I'm pretty sure the libraries were already built, this was using 5.12

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #10

        @SPlatten said in Protecting app against reverse engineering through static linking:

        the libraries were already built

        But by whom? I don't think the Qt Online/offline installer provides static libs (not even for commercial users).

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • SPlattenS SPlatten

          @JonB , @SGaist , Where I have been at clients with commercial licenses I have used static builds and I'm pretty sure the libraries were already built, this was using 5.12

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #11

          @SPlatten said in Protecting app against reverse engineering through static linking:

          @JonB , @SGaist , Where I have been at clients with commercial licenses I have used static builds and I'm pretty sure the libraries were already built, this was using 5.12

          as a commercial user myself I can say, with certainty, the qt company does not provide out of the box static Qt builds. The only exception here is iOS where dynamic linking is nearly impossible and the QtC therefore doesn't provide dynamic linked libraries


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          SPlattenS 1 Reply Last reply
          1
          • J.HilkJ J.Hilk

            @SPlatten said in Protecting app against reverse engineering through static linking:

            @JonB , @SGaist , Where I have been at clients with commercial licenses I have used static builds and I'm pretty sure the libraries were already built, this was using 5.12

            as a commercial user myself I can say, with certainty, the qt company does not provide out of the box static Qt builds. The only exception here is iOS where dynamic linking is nearly impossible and the QtC therefore doesn't provide dynamic linked libraries

            SPlattenS Offline
            SPlattenS Offline
            SPlatten
            wrote on last edited by
            #12

            @J-Hilk , in which case someone at those premises must have built the static libraries from the source.

            Kind Regards,
            Sy

            SPlattenS 1 Reply Last reply
            0
            • SPlattenS SPlatten

              @J-Hilk , in which case someone at those premises must have built the static libraries from the source.

              SPlattenS Offline
              SPlattenS Offline
              SPlatten
              wrote on last edited by
              #13

              @SGaist , another reason I have previously gone for static builds is it makes deployment a lot easier without having to be concerned about including all the required shared libraries.

              Kind Regards,
              Sy

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SimonSchroeder
                wrote on last edited by
                #14

                We use static linking (Qt self compiled on Windows) because we had trouble with deployment using DLLs (people tend to screw it up).

                The only reason I see for using static builds for obfuscating your code is that you can strip symbols from your binaries. In static builds the computer does not have to know the function names. DLLs need them so you can look up functions by their names. Therefore, you cannot strip DLLs of their symbols. In this way your code could provide a lot of information to reverse engineers if you use meaningful function names and use short functions.

                I suppose that Qt itself is not a trade secret. So, I don't see a point in statically linking Qt. You want your own code disguised and not calls to third-party code. This means you only need to make sure that your own code is statically linked and does not include function names. Not sure how the latter is done on Windows, though.

                1 Reply Last reply
                0
                • W Offline
                  W Offline
                  Wowalive
                  wrote on last edited by
                  #15

                  Ok thanks for your replies. For me it seems that the efford-benefit ratio is not that high for using static linking as a protection against reverse engineering.
                  Especially our app runs on all platforms (Linux, MacOs, iOS, Windows, Android) and it seems that I have to build Qt from Sources for all platforms, right? Correct me when I'm wrong, but imho static linking isn't that easy to implement in my case and must be constantly maintained.

                  Furthermore I have read that there is no way to statically link when using WebEngine. Is this still a fact? We are using Qt 5.15 LTS and WebEngine is a main part of our application.

                  If my assumptions are correct, i tend to turn to other methods of obfuscation/protection.

                  JKSHJ 1 Reply Last reply
                  0
                  • W Wowalive

                    Ok thanks for your replies. For me it seems that the efford-benefit ratio is not that high for using static linking as a protection against reverse engineering.
                    Especially our app runs on all platforms (Linux, MacOs, iOS, Windows, Android) and it seems that I have to build Qt from Sources for all platforms, right? Correct me when I'm wrong, but imho static linking isn't that easy to implement in my case and must be constantly maintained.

                    Furthermore I have read that there is no way to statically link when using WebEngine. Is this still a fact? We are using Qt 5.15 LTS and WebEngine is a main part of our application.

                    If my assumptions are correct, i tend to turn to other methods of obfuscation/protection.

                    JKSHJ Offline
                    JKSHJ Offline
                    JKSH
                    Moderators
                    wrote on last edited by
                    #16

                    @Wowalive said in Protecting app against reverse engineering through static linking:

                    I have to build Qt from Sources for all platforms, right?

                    Right.

                    Furthermore I have read that there is no way to statically link when using WebEngine. Is this still a fact?

                    Yes: https://doc.qt.io/qt-6/qtwebengine-platform-notes.html#building-qt-webengine-from-source

                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                    W 1 Reply Last reply
                    3
                    • JKSHJ JKSH

                      @Wowalive said in Protecting app against reverse engineering through static linking:

                      I have to build Qt from Sources for all platforms, right?

                      Right.

                      Furthermore I have read that there is no way to statically link when using WebEngine. Is this still a fact?

                      Yes: https://doc.qt.io/qt-6/qtwebengine-platform-notes.html#building-qt-webengine-from-source

                      W Offline
                      W Offline
                      Wowalive
                      wrote on last edited by
                      #17

                      @JKSH Thank you. The fact that QtWebEngine does not support static builds speaks against implementing static linking for our app.

                      1 Reply Last reply
                      0

                      • Login

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