Locate a suitable window within VirusScan (an edit box is perfect), and obtain a window handle to it. Buscamos una ventana con que corra en el contexto de LocalSystem (digamos que root local). Equivalente a buscar un binario setuid.
Remove any length restrictions that may be present on that edit box, so that I can type in an arbitrary quantity of data.. Quitamos la restriccion de longitud asociada a los controles Edit de Windows. (realmente este era ya un viejo truco cuando se hacían cracks: buscabas el control y ponias breakpoints en los mensajes de acceso al texto de las claves).
Paste in some binary executable code.. Esto es equivalente a injectar el shell code.
Force VirusScan to execute my code (as LocalSystem).. Esto lo hace con ayuda del mensaje WM_TIMER. Uno de los parámetros de dicho mensaje es la función que llamará cuando se ejecuta. Si tu ciegamente crees que ese WM_TIMER viene de tu aplicación sin comprobarlo, entonces es el equivalente a no comprobar una cadena de entrada
De algunos mensajes en Bugtraq:
WM_TIMER messages are posted to the message queue and can be filtered by the application, as stated in the documentation for this message. The application can have a list over timers and check this for validity. (Moral of the story: Don't trust window message parameters any more than user input).
De la documentación de MSDN:
The WM_TIMER message is a low-priority message. The GetMessage and PeekMessage functions post this message only when no other higher-priority messages are in the thread's message queue
Y como dicen los post de Bugtraq: Es una malísima idea que los servicios inteactuen con el escritorio.
Mira el código
(Puntos:3, Informativo)( http://icewinddale.blogspot.com/ | Última bitácora: Jueves, 30 Enero de 2014, 23:34h )
De algunos mensajes en Bugtraq:
WM_TIMER messages are posted to the message queue and can be filtered by the application, as stated in the documentation for this message. The application can have a list over timers and check this for validity. (Moral of the story: Don't trust window message parameters any more than user input).
De la documentación de MSDN:
The WM_TIMER message is a low-priority message. The GetMessage and PeekMessage functions post this message only when no other higher-priority messages are in the thread's message queue
Y como dicen los post de Bugtraq: Es una malísima idea que los servicios inteactuen con el escritorio.
-- icewinddale.blogspot.com [blogspot.com]