Vulnerability Development mailing list archives

Re: WMF SETABORTPROC exploit


From: Alexander Sotirov <asotirov () determina com>
Date: Tue, 03 Jan 2006 16:37:43 -0800

SanjayR wrote:
Hi Moore et al (and All):
I was trying to understand the wmf setabortproc exploit code. I got
confused over one point. In the code, under the point
"StandardMetaRecord - Escape()", you have given the value of WORD
function as 0x0026 and other possible values can be (according to the
code) 0x0626, 0xff26 etc. And the value of the parameter is 9, which is
call to SETABORTPROC. But, instead of finding these definitions in
WINDOWS.H, as stated in the code, I found them in wingdi.h. Now my
question is, from where I can get the other values of escape functions
(like those stated by you)? In wingdi.h, i got only 0x0626. Please any
clue from anybody will be appreciated.

The function number is made of two bytes. The low byte (0x26) specifies
the function, and the high byte specifies the number of parameters. The
code that processes the Escape function doesn't care about the number
of the parameters, so you can put pretty much anything in the high byte.
That's why 0x626 and 0xff26 both work.

See http://www.skynet.ie/~caolan/publink/libwmf/libwmf/doc/ora-wmf.html
for more details.

Alex


Current thread: