Re[4]: Убийственный MessageBox от Microsoft
От: Mazay Россия  
Дата: 22.12.06 15:48
Оценка:
Здравствуйте, mike_rs, Вы писали:

M>>Да кому этот сплоит нужен? Если только из под ограниченых прав тачку ребутнуть.

M>>Удивляет то, что столь долго и интенсивно испольуемый код содержит такие баги.

_>http://www.determina.com/security.research/vulnerabilities/csrss-harderror.html


_>This vulnerability allows a logged on user to execute arbitrary code in the CSRSS.EXE process and elevate their privileges to SYSTEM level. The vulnerable code is present in Windows 2000, XP, 2003 and Vista.


_>так что не просто ребутнуть. А для "мега-защищенной" висты это просто ппц.


А ещё там написано:

Technical Details:

If the MB_SERVICE_NOTIFICATION flag is specified when calling the MessageBox function from the Windows API, it will use the NtRaiseHardError syscall to send a HardError message to CSRSS. This message contains the caption and text of a message box to be displayed by CSRSS on behalf of the caller. This functionality is designed to allow non-interactive services to notify the user of critical errors.

The HardError message is handled by the UserHardError function in WINSRV.DLL. It calls GetHardErrorText to read the message parameters from the address space of the sender. The GetHardErrorText function returns pointers to the caption and text of the message box. If the caption or text parameters start with the \??\ prefix, the function inexplicably frees the buffer and returns a pointer to freed memory. After the message box is closed by the user, the same buffer is freed again in the FreePhi function, resulting in a double free vulnerability.


Не представляю, как это можно использовать для выполнения кода. ИМХО вероятность не больше чем получить шелл-код генератором случайных чисел. Если б в этот буфер кто-нибудь потом писал, а так — ну попытается какая-нибудь функция считать строку из мусорного указателя и чё?
Главное гармония ...