Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Another vulnerability using SendMessage!

Another vulnerability using SendMessage!

Scheduled Pinned Locked Moved The Lounge
comdata-structuresquestion
12 Posts 6 Posters 0 Views 1 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.
  • A Offline
    A Offline
    Andreas Saurwein
    wrote on last edited by
    #1

    Anyone using TTM_GETTEXT? If so, review your code. Any malicious application could modify a tooltips text and thus cause buffer overflows, stack corruptions and code injection. happy reviewing ;)

    int x=1, y=5;
    x^=y^=x^=y; // whats the content of x and y now?
    ClickHereForHelp();

    T J 2 Replies Last reply
    0
    • A Andreas Saurwein

      Anyone using TTM_GETTEXT? If so, review your code. Any malicious application could modify a tooltips text and thus cause buffer overflows, stack corruptions and code injection. happy reviewing ;)

      int x=1, y=5;
      x^=y^=x^=y; // whats the content of x and y now?
      ClickHereForHelp();

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      Andreas Saurwein wrote: Any malicious application could modify a tooltips text and thus cause buffer overflows, stack corruptions and code injection. Any malicious app can format your harddrive much easier than cause buffer overflow with TTM_GETTEXT :) Tomasz Sowinski -- http://www.shooltz.com

      ** Putt knot yore thrust inn spel chequers. **

      A S V 3 Replies Last reply
      0
      • T Tomasz Sowinski

        Andreas Saurwein wrote: Any malicious application could modify a tooltips text and thus cause buffer overflows, stack corruptions and code injection. Any malicious app can format your harddrive much easier than cause buffer overflow with TTM_GETTEXT :) Tomasz Sowinski -- http://www.shooltz.com

        ** Putt knot yore thrust inn spel chequers. **

        A Offline
        A Offline
        Andreas Saurwein
        wrote on last edited by
        #3

        Tomasz Sowinski wrote: Any malicious app can format your harddrive much easier than cause buffer overflow Wrong. The app might have no privileges at all, but still can modify your applications tooltip to inject code and so gain the privileges of your application.

        int x=1, y=5;
        x^=y^=x^=y; // whats the content of x and y now?
        ClickHereForHelp();

        T 1 Reply Last reply
        0
        • T Tomasz Sowinski

          Andreas Saurwein wrote: Any malicious application could modify a tooltips text and thus cause buffer overflows, stack corruptions and code injection. Any malicious app can format your harddrive much easier than cause buffer overflow with TTM_GETTEXT :) Tomasz Sowinski -- http://www.shooltz.com

          ** Putt knot yore thrust inn spel chequers. **

          S Offline
          S Offline
          Senkwe Chanda
          wrote on last edited by
          #4

          Tomasz Sowinski wrote: Any malicious app can format your harddrive much easier than cause buffer overflow with TTM_GETTEXT hackers love a challenge :-) ASP.NET can never fail as working with it is like fitting bras to supermodels - it's one pleasure after the next - David Wulff

          1 Reply Last reply
          0
          • A Andreas Saurwein

            Tomasz Sowinski wrote: Any malicious app can format your harddrive much easier than cause buffer overflow Wrong. The app might have no privileges at all, but still can modify your applications tooltip to inject code and so gain the privileges of your application.

            int x=1, y=5;
            x^=y^=x^=y; // whats the content of x and y now?
            ClickHereForHelp();

            T Offline
            T Offline
            Tomasz Sowinski
            wrote on last edited by
            #5

            You're basically describing the shatter-style attack, discussed to death recently. Tomasz Sowinski -- http://www.shooltz.com

            ** Putt knot yore thrust inn spel chequers. **

            A 1 Reply Last reply
            0
            • T Tomasz Sowinski

              You're basically describing the shatter-style attack, discussed to death recently. Tomasz Sowinski -- http://www.shooltz.com

              ** Putt knot yore thrust inn spel chequers. **

              A Offline
              A Offline
              Andreas Saurwein
              wrote on last edited by
              #6

              True. Its just another door which isnt locked.

              int x=1, y=5;
              x^=y^=x^=y; // whats the content of x and y now?
              ClickHereForHelp();

              T 1 Reply Last reply
              0
              • T Tomasz Sowinski

                Andreas Saurwein wrote: Any malicious application could modify a tooltips text and thus cause buffer overflows, stack corruptions and code injection. Any malicious app can format your harddrive much easier than cause buffer overflow with TTM_GETTEXT :) Tomasz Sowinski -- http://www.shooltz.com

                ** Putt knot yore thrust inn spel chequers. **

                V Offline
                V Offline
                Vuemme
                wrote on last edited by
                #7

                Tomasz Sowinski wrote: Any malicious app can format your harddrive much easier than cause buffer overflow with TTM_GETTEXT That's true only if the OS has no concept of user right (like win 9X). On a multi-user OS the only way to gain access rights that your process didn't deserve is to exploit a bug in another application and run your code using the "host" application access rights. To format a harddrive from a process running logged as "regular" user on windows 200o you've to cause a buffer overflow in an NT service or in a program running logged as Asministrator or use other exploiting tecniques before you can invoke the dangerous API call. For example, many personal firewalls accept or deny connection request based on the process name. In this way iexplore.exe can estabilish a connection on port 80 and myvirus.exe can't (checking only the process name is not very reliable because a malicios process could hook some API and change its process name). Obviously this buffer overflow is not dangerous as a bug in IIS or in a mail/news client because it can't be exploited remotely (via a direct connection or through a malformed e-mail, for example), but it's still dangerous because can be used by a malicious application to increase its access rights. -- Looking for a new screen-saver? Try FOYD: http://digilander.iol.it/FOYD

                1 Reply Last reply
                0
                • A Andreas Saurwein

                  True. Its just another door which isnt locked.

                  int x=1, y=5;
                  x^=y^=x^=y; // whats the content of x and y now?
                  ClickHereForHelp();

                  T Offline
                  T Offline
                  Tomasz Sowinski
                  wrote on last edited by
                  #8

                  BTW: I was playing with LoadLibraryEx - and it's indeed having problems with dialogs and LOAD_LIBRARY_AS_DATAFILE. However, DONT_RESOLVE_DLL_REFERENCES works. Tomasz Sowinski -- http://www.shooltz.com

                  ** Putt knot yore thrust inn spel chequers. **

                  A 1 Reply Last reply
                  0
                  • T Tomasz Sowinski

                    BTW: I was playing with LoadLibraryEx - and it's indeed having problems with dialogs and LOAD_LIBRARY_AS_DATAFILE. However, DONT_RESOLVE_DLL_REFERENCES works. Tomasz Sowinski -- http://www.shooltz.com

                    ** Putt knot yore thrust inn spel chequers. **

                    A Offline
                    A Offline
                    Andreas Saurwein
                    wrote on last edited by
                    #9

                    Tomasz Sowinski wrote: DONT_RESOLVE_DLL_REFERENCES works Now thats weird. I`ll take a look at this. Thanks.

                    int x=1, y=5;
                    x^=y^=x^=y; // whats the content of x and y now?
                    ClickHereForHelp();

                    1 Reply Last reply
                    0
                    • A Andreas Saurwein

                      Anyone using TTM_GETTEXT? If so, review your code. Any malicious application could modify a tooltips text and thus cause buffer overflows, stack corruptions and code injection. happy reviewing ;)

                      int x=1, y=5;
                      x^=y^=x^=y; // whats the content of x and y now?
                      ClickHereForHelp();

                      J Offline
                      J Offline
                      John Burton
                      wrote on last edited by
                      #10

                      And it would be *much* easier for the malicious application just to run the code itself. Unless you are expecting some other application to have enhanced privilages which you hope to get at this way...? In that case that's a huge bug in that application rather a vulnerability of sendmessage. There is an article somewhere by microsoft saying that code that creates windows should not be privilaged, and privilaged code should not create windows.

                      A 1 Reply Last reply
                      0
                      • J John Burton

                        And it would be *much* easier for the malicious application just to run the code itself. Unless you are expecting some other application to have enhanced privilages which you hope to get at this way...? In that case that's a huge bug in that application rather a vulnerability of sendmessage. There is an article somewhere by microsoft saying that code that creates windows should not be privilaged, and privilaged code should not create windows.

                        A Offline
                        A Offline
                        Andreas Saurwein
                        wrote on last edited by
                        #11

                        As long as there are UI applications with elevated privileges, API's designed this way are a problem. Its like saying 'a gun is a security problem because anyone who gets hold of it could use it' but programmers are commonly not (yet) aware of security related problems.

                        int x=1, y=5;
                        x^=y^=x^=y; // whats the content of x and y now?
                        ClickHereForHelp();

                        E 1 Reply Last reply
                        0
                        • A Andreas Saurwein

                          As long as there are UI applications with elevated privileges, API's designed this way are a problem. Its like saying 'a gun is a security problem because anyone who gets hold of it could use it' but programmers are commonly not (yet) aware of security related problems.

                          int x=1, y=5;
                          x^=y^=x^=y; // whats the content of x and y now?
                          ClickHereForHelp();

                          E Offline
                          E Offline
                          Erik Funkenbusch
                          wrote on last edited by
                          #12

                          And what about applications that open up a socket and accept connections from anyone without authentication? Just because windows allows an app to do something dangerous doesn't mean it';s a flaw in the OS. -- Where are we going? And why am I in this handbasket?

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups