Flag: Tornado! Hurricane!

Blogs >> rfreeman's Blog

Created: Tuesday, November 8 2005 13:20.56 CST Modified: Tuesday, November 8 2005 13:24.07 CST
Direct Link, View / Make / Edit Comments
Julius 0.2a vs MS05-053 (win32k.sys)
Author: rfreeman # Views: 2660

Hi, following up on my previous blog on gdi32.dll, here are several possibly interesting subfunctions to look at. I apologize that there are so many and that I haven't verified that these are actually correct matches. In fact, there were so many changed subfunctions that I stopped pasting them after a while. Not all of them seem to pertain to (the) GDI. As mentioned in my previous blog, I'm about to head for the airport, so don't expect any updates before at least tomorrow night.

A selection of subfunctions that seemed interesting:

p: [ bf822ae9 ] == u: [ bf9291ad ][ SfnINLPDELETEITEMSTRUCT ] ,d = 0.0344, t = 4
[L10] -- Patched function copies memory and features more comparisons, and altered suspicious looping, and changed data constants.

p: [ bf829757 ] == u: [ bf830994 ][ GreCreateDIBitmapReal ] ,d = 0.0035, t = 4
[L10] -- Patched function copies memory and features changed data constants.
[L7-] -- Original function loops but the patched version features changed data constants.

p: [ bf83bfc6 ] == u: [ bf843be8 ][ xxxInterSendMsgEx ] ,d = 0.0024, t = 4
[L10] -- Patched function copies memory and features changed data constants.
[L7-] -- Original function loops but the patched version features changed data constants.

p: [ bf83e64e ] == u: [ bf846270 ][ NtGdiDoPalette ] ,d = 0.0148, t = 4
[L10] -- Patched function copies memory and features changed data constants.
[L7-] -- Original function loops but the patched version features changed data constants.

p: [ bf844cf1 ] == u: [ bf849d28 ][ NtGdiPolyPolyDraw ] ,d = 0.0086, t = 4
[L10] -- Patched function copies memory and features changed data constants.
[L7-] -- Original function loops but the patched version features changed data constants.

p: [ bf84e353 ] == u: [ bf8533bf ][ NtGdiGradientFill ] ,d = 0.0111, t = 4
[L10] -- Patched function copies memory and features changed data constants.
[L7-] -- Original function loops but the patched version features changed data constants.

p: [ bf8521c0 ] == u: [ bf8567b7 ][ AsyncWindowPos ] ,d = 0.0394, t = 4
[L10] -- Patched function copies memory and features more comparisons, and altered suspicious looping, and changed data constants.
[L8 ] -- Functions are quite similar, but there are less signed comparisons.
[L7-] -- Original function loops but the patched version features more comparisons and changed data constants.
[L8 ] -- Patched function features a switch-case block with different data constants and number of Win32 API calls.

p: [ bf861af9 ] == u: [ bf8afde9 ][ scl_InitializeScaling ] ,d = 0.0094, t = 4
[L10] -- Patched function copies memory and features changed data constants, and altered suspicious looping.
[L8 ] -- Functions are quite similar, but there are less signed comparisons.
[L7-] -- Original function loops but the patched version features changed data constants.

p: [ bf869784 ] == u: [ bf84770f ][ GreGetDIBitsInternal ] ,d = 0.0205, t = 8
[L10] -- Patched function copies memory and features changed data constants, and altered suspicious looping.
[L7-] -- Original function loops but the patched version features changed data constants.

p: [ bf86978e ] == u: [ bf84770f ][ GreGetDIBitsInternal ] ,d = 0.0022, t = 4
[L10] -- Patched function copies memory and features changed data constants.
[L7-] -- Original function loops but the patched version features changed data constants.

p: [ bf86c1e4 ] == u: [ bf85fe5e ][ GreStretchDIBitsInternal ] ,d = 0.0045, t = 4
[L10] -- Patched function copies memory and features changed data constants.
[L7-] -- Original function loops but the patched version features changed data constants.

p: [ bf86e22e ] == u: [ bf861ea0 ][ NtGdiCreatePaletteInternal ] ,d = 0.0202, t = 4
[L7-] -- Original function loops but the patched version features changed data constants.

p: [ bf872b5f ] == u: [ bf8667d1 ][ NtGdiEnumFontOpen ] ,d = 0.0231, t = 4
[L10] -- Patched function copies memory and features changed data constants.
[L7-] -- Original function loops but the patched version features changed data constants.

p: [ bf89b5a8 ] == u: [ bf88f23f ][ WatchdogDrvGetDirectDrawInfo ] ,d = 0.0127, t = 4
[L10] -- Patched function copies memory and features changed data constants.
[L7-] -- Original function loops but the patched version features changed data constants.

p: [ bf89ee02 ] == u: [ bf892a73 ][ DrvProbeAndCaptureDevmode ] ,d = 0.0029, t = 4
[L10] -- Patched function copies memory and features changed data constants.
[L7-] -- Original function loops but the patched version features changed data constants.

p: [ bf8bd4f1 ] == u: [ bf8cb3ed ][ bEngFastFillEnum ] ,d = 0.0568, t = 8
[L10] -- Patched function copies memory and features changed data constants, and altered suspicious looping.
[L7-] -- Original function loops but the patched version features changed data constants.

p: [ bf8c099f ] == u: [ bf83bc98 ][ GreGetTextFaceW ] ,d = 0.1450, t = 4
[L10] -- Patched function copies memory and features changed data constants, and altered suspicious looping.
[L7-] -- Original function loops but the patched version features changed data constants.

p: [ bf8c51ab ] == u: [ bf8282f3 ][ SfnINOUTLPWINDOWPOS ] ,d = 0.0100, t = 2
[L10] -- Patched function copies memory and features changed data constants.
[L7-] -- Original function loops but the patched version features changed data constants.
[L3 ] -- Functions are identical except for data constants.

p: [ bf8dc774 ] == u: [ bf883039 ][ LoadCPUserPreferences ] ,d = 0.0557, t = 8
[L10] -- Patched function copies memory and features changed data constants, and altered suspicious looping.
[L7-] -- Original function loops but the patched version features changed data constants.

p: [ bf8e9d79 ] == u: [ bf8e702b ][ NtGdiGetCharWidthW ] ,d = 0.0179, t = 4
[L10] -- Patched function copies memory and features changed data constants.
[L7-] -- Original function loops but the patched version features changed data constants.

p: [ bf8ea561 ] == u: [ bf8b33ef ][ vQuantizeXform ] ,d = 0.0465, t = 8
[L7-] -- Original function loops but the patched version features more comparisons and changed data constants.
[L6+] -- Patched function is very similar and features more boolean logic.

... TOO MANY TO LIST, SORRY ...


Created: Tuesday, November 8 2005 13:17.46 CST Modified: Tuesday, November 8 2005 13:17.46 CST
Direct Link, View / Make / Edit Comments
Julius 0.2a vs MS05-053 (gdi32.dll)
Author: rfreeman # Views: 2635

Despite significant changes, Julius' version number has incremented only slightly since my last entry almost a month ago. It is now much more capable with respect to non-patches, though significant changes to program structure due to optimization differences is an ongoing battle.

I need to leave for the airport in a bit and will not have a chance to start a more rigorous analysis of MS05-053 until tomorrow night, but I wanted to post some interesting results for interested parties.

There are several changed subfunctions; however, I have selected the most salacious results for publication here in my blog. It is possible that I have excluded something that I shouldn't have, or didn't correctly match with Julius.


p: [ 77f11788 ] == u: [ 77f2c860 ][ PlayMetaFileRecord ] ,d = 0.0769, t = 4
[L10] -- Patched function copies memory and features more comparisons, and altered suspicious looping, and changed data constants.
[L7-] -- Original function loops but the patched version features more comparisons and changed data constants.

p: [ 77f3a7a0 ] == u: [ 77f3a300 ][ RecordObject ] ,d = 0.0028, t = 4
[L10] -- Patched function copies memory and features changed data constants.
[L7-] -- Original function loops but the patched version features changed data constants.
[L6+] -- Patched function is very similar and features more boolean logic.

p: [ 77f3baa5 ] == u: [ 77f3b605 ][ SetWinMetaFileBits ] ,d = 0.4371, t = 4
[L10] -- Patched function copies memory and features changed data constants, and altered suspicious looping.
[L8 ] -- Functions are quite similar, but there are less signed comparisons.
[L7-] -- Original function loops but the patched version features changed data constants.

p: [ 77f49492 ] == u: [ 77f49062 ][ GetEnhMetaFilePaletteEntries ] ,d = 0.0306, t = 4
[L10] -- Patched function copies memory and features more comparisons, and changed data constants.

p: [ 77f4b253 ] == u: [ 77f4ada4 ][ MF_AnyDIBits ] ,d = 0.0355, t = 4
[L10] -- Patched function copies memory and features more comparisons, and changed data constants.
[L6+] -- Patched function is very similar and features more boolean logic.

Created: Wednesday, October 12 2005 00:15.27 CDT Modified: Wednesday, October 12 2005 17:29.12 CDT
Direct Link, View / Make / Edit Comments
Julius 0.1a vs. KB900725 (winsrv.dll)
Author: rfreeman # Views: 2468

Over the past two or so months, I've been working in my spare time to write a stand-alone patch analysis tool. Feedback is appreciated...

After taking today's security patch updates for my WinXP (SP2) box, I selected the KB900725 update for analysis as the link to more information (at the time) was broken and may have been trying to "fly under the radar". Four DLL's are included in this update: linkinfo.dll, shell32.dll, shlwapi.dll, and winsrv.dll. While I have produced results for all four libraries, I specifically looked at the results for winsrv.dll. Previously, I have used msgsvc.dll and schannel.dll as my primary QA tests during development.

The first interesting match, was highly suspect with a high deviation and lack of a named address. After quickly eyeballing both addresses in a disassembler, it was clear that the function boundary heuristics were to blame (thus a false positive). So this was quickly dismissed. Next I noticed 0x75b8afef, which supposedly was 0x75b8f2c1 (CheckEudcRangeInString). Since the address of the match seemed out of order, I checked and found that a true match for CheckEudcRangeInString existed later in the log file. Upon eyeballing, it became clear that 0x75b8afef was a new function that had been inappropriately matched. Curiously cross references for this function were found in GetLinkProperties. GetLinkProperties has the strongest list of security warnings, which I probably should have looked at first, but I don't think the order of investigation was inefficient in this example. Upon a look at GetLinkProperties, it became clear that 0x75b8afef was being used as a replacement for lstrcpyW(). Since there is an extra parameter and 0x75b8afef copies memory, I think it


Archived Entries for rfreeman
Subject # Views Created On
No archived blog entries found.

There are 31,314 total registered users.


Recently Created Topics
[help] Unpacking VMP...
Mar/12
Reverse Engineering ...
Jul/06
hi!
Jul/01
let 'IDAPython' impo...
Sep/24
set 'IDAPython' as t...
Sep/24
GuessType return une...
Sep/20
About retrieving the...
Sep/07
How to find specific...
Aug/15
How to get data depe...
Jul/07
Identify RVA data in...
May/06


Recent Forum Posts
Finding the procedur...
rolEYder
Question about debbu...
rolEYder
Identify RVA data in...
sohlow
let 'IDAPython' impo...
sohlow
How to find specific...
hackgreti
Problem with ollydbg
sh3dow
How can I write olly...
sh3dow
New LoadMAP plugin v...
mefisto...
Intel pin in loaded ...
djnemo
OOP_RE tool available?
Bl4ckm4n


Recent Blog Entries
halsten
Mar/14
Breaking IonCUBE VM

oleavr
Oct/24
Anatomy of a code tracer

hasherezade
Sep/24
IAT Patcher - new tool for ...

oleavr
Aug/27
CryptoShark: code tracer ba...

oleavr
Jun/25
Build a debugger in 5 minutes

More ...


Recent Blog Comments
nieo on:
Mar/22
IAT Patcher - new tool for ...

djnemo on:
Nov/17
Kernel debugger vs user mod...

acel on:
Nov/14
Kernel debugger vs user mod...

pedram on:
Dec/21
frida.github.io: scriptable...

capadleman on:
Jun/19
Using NtCreateThreadEx for ...

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit