PRB: Cannot debug applications that use Digital Rights Management (306107)



The information in this article applies to:

  • Microsoft Windows Media Rights Manager 7.0

This article was previously published under Q306107

SYMPTOMS

Applications that use the Digital Rights Management (DRM) client DLLs fail when they are run under a debugger, such as Msdev.exe or Windbg.exe. However, the application runs correctly outside of a debugger.

CAUSE

Debugging applications that support DRM result in int 3 debug breakpoints. The int 3 debug breakpoints are included as anti-debugging code in the Format SDK DRM DLLs. It is a policy that the Windows Media Produce Group does not allow debugging when making DRM calls. This is to prevent reverse engineering of the encryption code.

WORKAROUND

Customers must use logging techniques to debug their applications.

STATUS

This behavior is by design.

MORE INFORMATION

The following stack is an example of what occurs with anti-debugging code:

ModLoad: 41b00000 41b41000   C:\WINNT\System32\DRMClien.DLL
Break instruction exception - code 80000003 (first chance)
eax=0012ff64 ebx=41b39688 ecx=41b39688 edx=44ec0c83 esi=00ca6418 edi=00c98b2c
eip=41b16da5 esp=0012ceac ebp=0012cedc iopl=0         nv up ei pl zr na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=0038  gs=0000             efl=00200246
DRMClien!SCP3_0__Int3Check+36:
41b16da5 cc               int     3
0:000> kb
ChildEBP RetAddr  Args to Child
0012cedc 41b0fc2c 00c98b2c 00ca6418 41b39688 DRMClien!SCP3_0__Int3Check+0x36
0012d104 41b05dab 0012f5a0 fffffdff 00000000 DRMClien!DrmGetMachineID+0x248
0012f8cc 41b05936 00000000 00cb72e8 00ca9fc4 DRMClien!CDRMLiteCrypto__Init+0x102
0012f8f0 4f5685d5 00cb72e8 0012f9a0 77fcba9e DRMClien!CDRMLiteCrypto__CDRMLiteCrypto+0x192
0012f95c 4f568c10 00ca9fc4 00ca9120 00ca9fc0 WMVCore!CDRMLite__Init+0x2d
0012fa1c 4f526b17 0012fa50 00ca9fb4 0012fa4c WMVCore!CDRMLite__GenerateNewLicense+0x5d
0012fa44 4f520bf0 ffffffff 96000000 00000096 WMVCore!CWMMultiplexerV1__EnableDRM+0xcc
0012fa94 00404dd8 00000000 0040240b 002f58c0 WMVCore!CWMWriterManager__BeginWriting+0x334
0012fa9c 0040240b 002f58c0 0012ff64 0012fdb4 image00400000!CWMDRMWriterStub__CExternalStub__BeginWriting+0xd
0012fdac 004043c5 002d2818 00000000 7ffdf000 image00400000!CAviToWMV__Start+0xa8b
0012ff70 0040496f 00000008 002f2508 002f4fb0 image00400000!wmain+0x7e5
0012ffc0 77e97d08 002d2818 00000000 7ffdf000 image00400000!wmainCRTStartup+0xff
0012fff0 00000000 00404870 00000000 000000c8 KERNEL32!BaseProcessStart+0x3d
					


Modification Type:MinorLast Reviewed:6/9/2006
Keywords:kbprb KB306107