Debug Labs


Access Violation in External Code

This lab will demonstrate an Access Violation in External Code. In this scenarion, an AV in "kernel32.dll"

 

1- Lab Setup
	

Note: This lab assumes that you have already installed the necessary lab files to run it.

1- Verify the site is running in medium protection

2- Verify that the process "dllhost.exe" mapped to the out of process pooled application is running and note down its PID

To find the PID of the desired dllhost, do the follwing:

- Open Component Services

- Expand "Component Services" Node

- Expand "Computers" Node

- Expand "My Computer" Node

- Select "COM+ Applications"

- Click "Status View" icon and notice the PID column on the right hand pane

3- Attach windbg to the dllhost process with the PID found in step 2

a) Using the GUI:

- Click "File"

- Click "Attach to Process"

- Select "dllhost.exe" with the PID found in step 2 and click "OK"

b) Using the command prompt:

- Switch to thr folder where the debugging tools for windows is installed

- Type in "windbg -p <PID>" and hit Enter

 

4- In windbg command line, type in "g" with no quotation marks and press Enter

 

 

2- Run Scenario

1- Click the "Invoke Extension" button to load the ISAPI Extension in the dllhost process memory space. You should see the ISAPI extension "badExt.dll"among the list of modules loaded in dllhost.exe
2- Click the "AV Extension" button the first time to cause a 1st chance AV in dllhost.exe.
 Note that the debugger breaks and diplays 
	a- Comments about the exception
b- The value of the registers
c- The module where the AV happened
d- The assembly line that caused the AV

					

                                                                           

 

1- Debug Annotation

 

1) Without symbols

 

a) The faulting Stack

 

The stack backtrace of the thread that AV'd would look like:

0:019> kvn50 #

ChildEBP RetAddr Args to Child WARNING: Stack unwind information not available. Following frames may be wrong.

00 0624f700 0b3e1485 00000000 0624f728 0b3e12fe KERNEL32!GetSystemTime+0x34

01 0624f70c 0b3e12fe 01cb1eb0 00000001 01cb1f7c badext!HttpExtensionProc+0x200

02 0624f728 65d82b06 01cb1eb0 01cb1f7c 01cb1eb0 badext!HttpExtensionProc+0x79

03 0624f770 65d823a2 006173f8 01cb2025 01cb1eb0 wam!SE_TABLE::ReleaseExtension+0xbe8

04 0624f7b4 77d339c0 006194c8 00000000 000000cb wam!SE_TABLE::ReleaseExtension+0x484

05 0624f7dc 77d93570 65d8223f 0624f7f8 00000005 RPCRT4!NdrServerInitialize+0x288

06 0624fa54 77d949ac 022466e0 00220604 001ff730 RPCRT4!NdrStubCall2+0x570

07 0624fab8 77b29e7f 022466e0 001ff730 00220604 RPCRT4!CStdStubBuffer_Invoke+0x9e

08 0624fafc 77b29d6e 001ff730 02243214 002248a0 ole32!HDC_UserMarshal+0x78a

09 0624fb44 77aa7ae7 001ff730 02243078 022466e0 ole32!HDC_UserMarshal+0x679

0a 0624fba8 77aa7a33 00220604 00000000 022466e0 ole32!CoGetCallContext+0x401

0b 0624fbc4 77b29c89 001ff730 00000001 022466e0 ole32!CoGetCallContext+0x34d

0c 0624fbf4 77b29a89 001ff6e8 00220604 022466e0 ole32!HDC_UserMarshal+0x594

0d 0624fcb4 77b2a12c 00234050 00000000 022431f8 ole32!HDC_UserMarshal+0x394

0e 0624fcf4 77d33721 001ff6e8 022431f8 02248090 ole32!HDC_UserMarshal+0xa37

0f 0624fd2c 77d33667 77b29f7b 02248090 0624fe0c RPCRT4!I_RpcFree+0x1ff

10 0624fd84 77d33579 00000000 00000000 0624fe0c RPCRT4!I_RpcFree+0x145

11 0624fda4 77d48e81 02248090 00000000 0624fe0c RPCRT4!I_RpcFree+0x57

12 0624fdd4 77d34bc6 02248090 02248054 00000000 RPCRT4!RpcSsDestroyClientContext+0xa6

13 0624fe10 77d346c5 02247e28 001b6f68 80030001 RPCRT4!NdrCorrelationFree+0x1120

14 0624fe28 77d422ff 02247f98 0624fe50 02247e28 RPCRT4!NdrCorrelationFree+0xc1f

15 0624ff74 77d420d9 77d42528 001b6f68 00070000 RPCRT4!NdrConformantArrayMemorySize+0x4c5

16 0624ffa8 77d424da 00191c80 0624ffec 77e887dd RPCRT4!NdrConformantArrayMemorySize+0x29f

17 0624ffb4 77e887dd 00191cd8 00070000 01000002 RPCRT4!NdrConformantArrayMemorySize+0x6a0

18 0624ffec 00000000 77d424c2 00191cd8 00000000 KERNEL32!GetModuleFileNameA+0x1d1

 

 

In this stack backtrace, notice that the AV occured in "kernel32.dll". Does this mean that the culprit is "kernel32.dll" ? Actually No!

It is most likely because of some bad parameters passed to an API call in kernel32. to invistigate this further, we need to line up the symbols properly to see

what function AV'd in frame 00.

 

 

b) The regiters values

 

0:019> r

eax=00000000 ebx=00000003 ecx=000007d3 edx=00000027 esi=78002041 edi=00617550

eip=77e87b14 esp=0624f6e8 ebp=0624f700 iopl=0 nv up ei pl nz na pe nc

cs=001b ss=0023 ds=0023 es=0023 fs=0038 gs=0000 efl=00000202

KERNEL32!GetSystemTime+34:

77e87b14 668908 mov [eax],cx ds:0023:00000000=????

 

c) The disassmbly code

 

0:019> u eip

KERNEL32!GetSystemTime+34:

77e87b14 668908 mov [eax],cx

77e87b17 668b4dea mov cx,[ebp-0x16]

77e87b1b 66894802 mov [eax+0x2],cx

77e87b1f 668b4df6 mov cx,[ebp-0xa]

77e87b23 66894804 mov [eax+0x4],cx

77e87b27 668b4dec mov cx,[ebp-0x14]

77e87b2b 66894806 mov [eax+0x6],cx

77e87b2f 668b4dee mov cx,[ebp-0x12]

 

2) With symbols including public symbols of "badExt.dll"

 

 

First, we need to add the symbol path(company wide symbols) as well aspublic symbols of our dll

a) Using the GUI:

- Click "File"

- Click "Symbol File Path"

- Type in SRV*C:\LabSymbols*\\symbols\symbols;C:\IISDebugLabs\symbols\Pub and hit Enter

b) Using the ".sympath+" command:

.sympath+ SRV*C:\LabSymbols*\\symbols\symbols;C :\IISDebugLabs\symbols\Pub

 

 

Note: For more information on setting the symbol path for windbg, please refer to the debugger documentation for the .sympath command. This will describe

the "downstream store" feature that lets you download symbols to a symbol server of your own.

 

The stack backtrace of the thread that AV'd would look like:

 

0:019> .reload;kvn50

.........................................................................

# ChildEBP RetAddr Args to Child

00 0624f700 0b3e1485 00000000 0624f728 0b3e12fe KERNEL32!GetSystemTime+0x34 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\windows\base\client\datetime.c @ 177]

01 0624f70c 0b3e12fe 01cb1eb0 00000001 01cb1f7c badext!doAV2+0x11

02 0624f728 65d82b06 01cb1eb0 01cb1f7c 01cb1eb0 badext!HttpExtensionProc+0x79

03 0624f73c 65d82a97 01cb1eb0 01cb1f7c 01cb1eb0 wam!HSE_APPDLL::ExecuteRequest+0x93 (FPO: [1,0,3]) (CONV: thiscall) [D:\nt\private\inet\iis\svcs\wam\object\isplocal.cxx @ 450]

04 0624f770 65d823a2 006173f8 01cb2025 01cb1eb0 wam!WAM::InvokeExtension+0x35 (FPO: [Non-Fpo]) (CONV: thiscall) [D:\nt\private\inet\iis\svcs\wam\object\wamobj.cxx @ 913]

05 0624f7b4 77d339c0 006194c8 00000000 000000cb wam!WAM::ProcessRequest+0x240 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\inet\iis\svcs\wam\object\wamobj.cxx @ 643]

06 0624f7dc 77d93570 65d8223f 0624f7f8 00000005 RPCRT4!Invoke+0x30 [..\i386\stubless.asm @ 88]

07 0624fa54 77d949ac 022466e0 00220604 001ff730 RPCRT4!NdrStubCall2+0x63d (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\rpc\ndr20\srvcall.c @ 1724]

08 0624fab8 77b29e7f 022466e0 001ff730 00220604 RPCRT4!CStdStubBuffer_Invoke+0xec (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\rpc\ndr20\stub.c @ 1571]

09 0624fafc 77b29d6e 001ff730 02243214 002248a0 ole32!SyncStubInvoke+0x61 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\ole32\com\dcomrem\channelb.cxx @ 1136]

0a 0624fb44 77aa7ae7 001ff730 02243078 022466e0 ole32!StubInvoke+0xa8 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\ole32\com\dcomrem\channelb.cxx @ 1334]

0b 0624fba8 77aa7a33 00220604 00000000 022466e0 ole32!CCtxComChnl::ContextInvoke+0xbb (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\ole32\com\dcomrem\ctxchnl.cxx @ 1204]

0c 0624fbc4 77b29c89 001ff730 00000001 022466e0 ole32!MTAInvoke+0x18 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\ole32\com\dcomrem\callctrl.cxx @ 1952]

0d 0624fbf4 77b29a89 001ff6e8 00220604 022466e0 ole32!AppInvoke+0xb5 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\ole32\com\dcomrem\channelb.cxx @ 1013]

0e 0624fcb4 77b2a12c 00234050 00000000 022431f8 ole32!ComInvokeWithLockAndIPID+0x29e (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\ole32\com\dcomrem\channelb.cxx @ 1578]

0f 0624fcf4 77d33721 001ff6e8 022431f8 02248090 ole32!ThreadInvoke+0x1b7 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\ole32\com\dcomrem\channelb.cxx @ 3835]

10 0624fd2c 77d33667 77b29f7b 02248090 0624fe0c RPCRT4!DispatchToStubInC+0x84 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\rpc\runtime\mtrt\dispatch.c @ 82]

11 0624fd84 77d33579 00000000 00000000 0624fe0c RPCRT4!RPC_INTERFACE::DispatchToStubWorker+0x100 (FPO: [Non-Fpo]) (CONV: thiscall) [D:\nt\private\rpc\runtime\mtrt\hndlsvr.cxx @ 543]

12 0624fda4 77d48e81 02248090 00000000 0624fe0c RPCRT4!RPC_INTERFACE::DispatchToStub+0x5e (FPO: [Non-Fpo]) (CONV: thiscall) [D:\nt\private\rpc\runtime\mtrt\hndlsvr.cxx @ 407]

13 0624fdd4 77d34bc6 02248090 02248054 00000000 RPCRT4!RPC_INTERFACE::DispatchToStubWithObject+0xa9 (FPO: [Non-Fpo]) (CONV: thiscall) [D:\nt\private\rpc\runtime\mtrt\hndlsvr.cxx @ 795]

14 0624fe10 77d346c5 02247e28 001b6f68 80030001 RPCRT4!LRPC_SCALL::DealWithRequestMessage+0x1c6 (FPO: [Non-Fpo]) (CONV: thiscall) [D:\nt\private\rpc\runtime\mtrt\lpcsvr.cxx @ 2665]

15 0624fe28 77d422ff 02247f98 0624fe50 02247e28 RPCRT4!LRPC_ADDRESS::DealWithLRPCRequest+0x10c (FPO: [Non-Fpo]) (CONV: thiscall) [D:\nt\private\rpc\runtime\mtrt\lpcsvr.cxx @ 867]

16 0624ff74 77d420d9 77d42528 001b6f68 00070000 RPCRT4!LRPC_ADDRESS::ReceiveLotsaCalls+0x1eb (FPO: [Non-Fpo]) (CONV: thiscall) [D:\nt\private\rpc\runtime\mtrt\lpcsvr.cxx @ 1175]

17 0624ff78 77d42528 001b6f68 00070000 01000002 RPCRT4!RecvLotsaCallsWrapper+0x9 (FPO: [1,0,0]) (CONV: stdcall) [D:\nt\private\rpc\runtime\mtrt\lpcsvr.cxx @ 37]

18 0624ffa8 77d424da 00191c80 0624ffec 77e887dd RPCRT4!BaseCachedThreadRoutine+0x4f (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\rpc\runtime\mtrt\hndlsvr.cxx @ 3586]

19 0624ffb4 77e887dd 00191cd8 00070000 01000002 RPCRT4!ThreadStartRoutine+0x18 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\rpc\runtime\mtrt\threads.cxx @ 230]

1a 0624ffec 00000000 77d424c2 00191cd8 00000000 KERNEL32!BaseThreadStart+0x52 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\windows\base\client\support.c @ 460]

 

 

Now, with the public symbols lined up, we see that the last call that AV'd was to the function "GetSystemTime" in "kernel32.dll". this API was called from

the function "doAV2" in "badExt.dll" which in turn was called from the the ISAPI extension entry point "HttpExtensionProc".

 

Looking in MSDN for the API "GetSystemTime" shows:

 

GetSystemTime

The GetSystemTime function retrieves the current system date and time. The system time is expressed in Coordinated Universal Time (UTC).

 
void GetSystemTime(
  LPSYSTEMTIME lpSystemTime
);

 

So it looks like the GetSystemTime API takes as a parameter a pointer to a SYSTEMTIME structure to receive

the current system date and time which could not be NULL.

 

Advanced Technique

 

You may want to look closely at the "GetSystemTime" function.

The source code for this function is shown below:

VOID WINAPI GetSystemTime( LPSYSTEMTIME lpSystemTime)

..... .

....

.....

RtlTimeToTimeFields(&SystemTime,&TimeFields);

lpSystemTime->wYear = TimeFields.Year ;

lpSystemTime->wMonth = TimeFields.Month ;

lpSystemTime->wDayOfWeek = TimeFields.Weekday ;

lpSystemTime->wDay = TimeFields.Day ;

lpSystemTime->wHour = TimeFields.Hour ;

lpSystemTime->wMinute = TimeFields.Minute ;

lpSystemTime->wSecond = TimeFields.Second ;

lpSystemTime->wMilliseconds = TimeFields.Milliseconds; }

 

The first and only parameter to this function is a long pointer to the system time (LPSYSTEMTIME).

Back to the dump file, this first parameter is NULL as shown below:

00 0624f700 0b3e1485 00000000 0624f728 0b3e12fe KERNEL32!GetSystemTime+0x34 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\windows\base\client\datetime.c @ 177]

 

Since "lpSystemTime" is NULL, any attempt to access its members will result in an AV.

 

Based on this, we can say that the culprit is "badext.dll". So it is enough to tell the customer to contact the dll vendor to fix it. If it is an in-house component and the customer would like help

from Microsoft, they should open an advisory case to troubleshoot the issue further.

 

Notice also that the call to our extension was invoked by "wam.dll" (Web Application Manager). It is the component responsible for handing

over any request that needs to be processed by an ISAPI extension.

 

One way to see the http request passed to our extension is to dump the structure of "pWamExecInfo" as follows:

 

0:019> .frame4

04 0624f770 65d823a2 wam!WAM::InvokeExtension+0x35 [D:\nt\private\inet\iis\svcs\wam\object\wamobj.cxx @ 913]

 

0:019> dv

this = 7d3

psExt = 006173f8

szISADllPath = 01cb2025 "C:\Inetpub\wwwroot\Dev\badext.dll"

pWamExecInfo = 01cb1eb0

ret = 0x6194c8

0:019> dt pWamExecInfo -r

Local var @ 0x624f780 Type WAM_EXEC_INFO*

0x01cb1eb0

+0x000 ecb :

+0x000 cbSize : 0x90

+0x004 dwVersion : 0x40000

+0x008 ConnID : 0x01cb1eb0

+0x00c dwHttpStatusCode : 0xc8

+0x010 lpszLogData : [80] ""

+0x060 lpszMethod : 0x01cb2010 "GET"

+0x064 lpszQueryString : 0x01cb2047 "s=av2_v1"

+0x068 lpszPathInfo : 0x01cb1ffc ""

+0x06c lpszPathTranslated : 0x01cb1ffd "c:\inetpub\wwwroot"

+0x070 cbTotalBytes : 0

+0x074 cbAvailable : 0 +0x078 lpbData : (null) +0x07c lpszContentType : 0x01cb2014 ""

+0x080 GetServerVariable : 0x65d815df wam!GetServerVariable+0

+0x084 WriteClient : 0x65d88484 wam!WriteClient+0

+0x088 ReadClient : 0x65d8861f wam!ReadClient+0

+0x08c ServerSupportFunction : 0x65d81d61 wam!ServerSupportFunction+0

+0x090 m_pIWamReqIIS : 0x02224844

 

.....

.....

.....

 

To verify that the symbols are lined up properly for our extension, issue this command.

 

0:006> lmv mbadext

start end module name 06470000 06475000

badext (pdb symbols) C :\IISDebugLabs\symbols\Pub

Loaded symbol image file: C:\IISDebuglabs\www\App\badext.dll Image path: C:\IISDebuglabs\www\App\badext.dll

Timestamp: Wed Jan 29 18:07:14 2003 (3E385EA2)

Checksum: 0000EBCD

File version: 5.0.0.0

Product version: 5.0.0.0

File flags: 0 (Mask 3F)

File OS: 40004 NT Win32

File type: 2.0 Dll

File date: 00000000.00000000

CompanyName: Microsoft Corporation

ProductName: Internet Information Services

InternalName: badEXT.dll

OriginalFilename: badEXT.dll

ProductVersion: 5.00.0984

FileVersion: 5.00.0984

FileDescription: badEXT Test

LegalCopyright: Copyright (C) Microsoft Corp. 1981-1999

3) with Private Symbols "badExt.dll"

 

First, we need to add the symbol path(company wide symbols) as well as private symbols of our dll

a) Using the GUI:

- Click "File"

- Click "Symbol File Path"

- Type in SRV*C:\LabSymbols*\\symbols\symbols;C:\IISDebugLabs\symbols\Pri and hit Enter

b) Using the ".sympath+" command:

.sympath+ SRV*C:\LabSymbols*\\symbols\symbols;C :\IISDebugLabs\symbols\Pri

The stack backtrace of the thread that AV'd would look like:

 

0:019> kvn50

# ChildEBP RetAddr Args to Child

00 0624f700 0b3e1485 00000000 0624f728 0b3e12fe KERNEL32!GetSystemTime+0x34 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\windows\base\client\datetime.c @ 177]

01 0624f70c 0b3e12fe 01cb1eb0 00000001 01cb1f7c badext!doAV2+0x11 (CONV: stdcall) [H:\nT\PRIVATE\inet\iis\svcs\w3\gateways\extDBG\badext.cpp @ 161]

02 0624f728 65d82b06 01cb1eb0 01cb1f7c 01cb1eb0 badext!HttpExtensionProc+0x79 (CONV: stdcall) [H:\nT\PRIVATE\inet\iis\svcs\w3\gateways\extDBG\badext.cpp @ 86]

03 0624f73c 65d82a97 01cb1eb0 01cb1f7c 01cb1eb0 wam!HSE_APPDLL::ExecuteRequest+0x93 (FPO: [1,0,3]) (CONV: thiscall) [D:\nt\private\inet\iis\svcs\wam\object\isplocal.cxx @ 450]

04 0624f770 65d823a2 006173f8 01cb2025 01cb1eb0 wam!WAM::InvokeExtension+0x35 (FPO: [Non-Fpo]) (CONV: thiscall) [D:\nt\private\inet\iis\svcs\wam\object\wamobj.cxx @ 913]

05 0624f7b4 77d339c0 006194c8 00000000 000000cb wam!WAM::ProcessRequest+0x240 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\inet\iis\svcs\wam\object\wamobj.cxx @ 643]

06 0624f7dc 77d93570 65d8223f 0624f7f8 00000005 RPCRT4!Invoke+0x30 [..\i386\stubless.asm @ 88]

07 0624fa54 77d949ac 022466e0 00220604 001ff730 RPCRT4!NdrStubCall2+0x63d (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\rpc\ndr20\srvcall.c @ 1724]

08 0624fab8 77b29e7f 022466e0 001ff730 00220604 RPCRT4!CStdStubBuffer_Invoke+0xec (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\rpc\ndr20\stub.c @ 1571]

09 0624fafc 77b29d6e 001ff730 02243214 002248a0 ole32!SyncStubInvoke+0x61 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\ole32\com\dcomrem\channelb.cxx @ 1136]

0a 0624fb44 77aa7ae7 001ff730 02243078 022466e0 ole32!StubInvoke+0xa8 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\ole32\com\dcomrem\channelb.cxx @ 1334]

0b 0624fba8 77aa7a33 00220604 00000000 022466e0 ole32!CCtxComChnl::ContextInvoke+0xbb (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\ole32\com\dcomrem\ctxchnl.cxx @ 1204]

0c 0624fbc4 77b29c89 001ff730 00000001 022466e0 ole32!MTAInvoke+0x18 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\ole32\com\dcomrem\callctrl.cxx @ 1952]

0d 0624fbf4 77b29a89 001ff6e8 00220604 022466e0 ole32!AppInvoke+0xb5 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\ole32\com\dcomrem\channelb.cxx @ 1013]

0e 0624fcb4 77b2a12c 00234050 00000000 022431f8 ole32!ComInvokeWithLockAndIPID+0x29e (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\ole32\com\dcomrem\channelb.cxx @ 1578]

0f 0624fcf4 77d33721 001ff6e8 022431f8 02248090 ole32!ThreadInvoke+0x1b7 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\ole32\com\dcomrem\channelb.cxx @ 3835]

10 0624fd2c 77d33667 77b29f7b 02248090 0624fe0c RPCRT4!DispatchToStubInC+0x84 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\rpc\runtime\mtrt\dispatch.c @ 82]

11 0624fd84 77d33579 00000000 00000000 0624fe0c RPCRT4!RPC_INTERFACE::DispatchToStubWorker+0x100 (FPO: [Non-Fpo]) (CONV: thiscall) [D:\nt\private\rpc\runtime\mtrt\hndlsvr.cxx @ 543]

12 0624fda4 77d48e81 02248090 00000000 0624fe0c RPCRT4!RPC_INTERFACE::DispatchToStub+0x5e (FPO: [Non-Fpo]) (CONV: thiscall) [D:\nt\private\rpc\runtime\mtrt\hndlsvr.cxx @ 407]

13 0624fdd4 77d34bc6 02248090 02248054 00000000 RPCRT4!RPC_INTERFACE::DispatchToStubWithObject+0xa9 (FPO: [Non-Fpo]) (CONV: thiscall) [D:\nt\private\rpc\runtime\mtrt\hndlsvr.cxx @ 795]

14 0624fe10 77d346c5 02247e28 001b6f68 80030001 RPCRT4!LRPC_SCALL::DealWithRequestMessage+0x1c6 (FPO: [Non-Fpo]) (CONV: thiscall) [D:\nt\private\rpc\runtime\mtrt\lpcsvr.cxx @ 2665]

15 0624fe28 77d422ff 02247f98 0624fe50 02247e28 RPCRT4!LRPC_ADDRESS::DealWithLRPCRequest+0x10c (FPO: [Non-Fpo]) (CONV: thiscall) [D:\nt\private\rpc\runtime\mtrt\lpcsvr.cxx @ 867]

16 0624ff74 77d420d9 77d42528 001b6f68 00070000 RPCRT4!LRPC_ADDRESS::ReceiveLotsaCalls+0x1eb (FPO: [Non-Fpo]) (CONV: thiscall) [D:\nt\private\rpc\runtime\mtrt\lpcsvr.cxx @ 1175]

17 0624ff78 77d42528 001b6f68 00070000 01000002 RPCRT4!RecvLotsaCallsWrapper+0x9 (FPO: [1,0,0]) (CONV: stdcall) [D:\nt\private\rpc\runtime\mtrt\lpcsvr.cxx @ 37]

18 0624ffa8 77d424da 00191c80 0624ffec 77e887dd RPCRT4!BaseCachedThreadRoutine+0x4f (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\rpc\runtime\mtrt\hndlsvr.cxx @ 3586]

19 0624ffb4 77e887dd 00191cd8 00070000 01000002 RPCRT4!ThreadStartRoutine+0x18 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\rpc\runtime\mtrt\threads.cxx @ 230]

1a 0624ffec 00000000 77d424c2 00191cd8 00000000 KERNEL32!BaseThreadStart+0x52 (FPO: [Non-Fpo]) (CONV: stdcall) [D:\nt\private\windows\base\client\support.c @ 460]

 

 

 

Notice in frame O1 and 02 the line of the code as well as the name and location of the source code. Going back to the source code in badext.cpp:

 

Line 86 looks like:

 

DWORD WINAPI HttpExtensionProc(EXTENSION_CONTROL_BLOCK *lpEcb)

{

.....

.....

if (!strncmp(szS, "av2", 3))

{

return doAV2(lpEcb, 1); //Line 86

}

.....

.....

}

 

Line 161 looks like:

 

DWORD doAV2(EXTENSION_CONTROL_BLOCK *lpEcb, int Variation)

{

if (1 == Variation)

{

SYSTEMTIME* pSysTime = NULL;

GetSystemTime( pSysTime ); // Line 161 would av in GetSystemTime

}

return HSE_STATUS_SUCCESS;

}

 

 

 


- Microsoft Confidential -