Development Environment: WinXP Pro. IFS Kit 3790.1830
Demo Environment: WinXP Pro. NTFS only for the demo.
I’m trying to get the read buffer data from notepad and winword via a legacy filter based off of either sfilter or filespy.
I’m currently looking at the PostFsFilterPassThrough() function in sfilter to see if I can capture the read buffer stream in some fashion via file system data streams.
I’ve read http://www.osronline.com/article.cfm?article=457 and I know things of interest are the FsContext member and the SectionObjectPointer.
From what I can tell either or both or neither can possibly contain the $DATA portion of the file stream thingy.
In the post passthrough, I"m currently doing this:
bStreams = FsRtlSupportsPerStreamContexts(Data->FileObject);
if (bStreams)
{
fHeader = FsRtlGetPerStreamContextPointer (Data->FileObject);
//fStreamContext = FsRtlLookupPerStreamContext(fHeader, NULL, NULL);
if (Data->FileObject->SectionObjectPointer != NULL)
{
if (Data->FileObject->FsContext != NULL)
RRF_LOG_PRINT(RRDEBUG_POST_ACQUIRE_FLUSH, (“FsContext is 0x%08X\n”, Data->FileObject->FsContext));
RRF_LOG_PRINT(RRDEBUG_POST_ACQUIRE_FLUSH, (“Section Object Pointer:\n”));
if (Data->FileObject->SectionObjectPointer->DataSectionObject != NULL)
RRF_LOG_PRINT(RRDEBUG_POST_ACQUIRE_FLUSH, (“Section Object Pointe Data Section Object is: 0x%08X:\n”, Data->FileObject->SectionObjectPointer->DataSectionObject));
if (Data->FileObject->SectionObjectPointer->SharedCacheMap != NULL)
RRF_LOG_PRINT(RRDEBUG_POST_ACQUIRE_FLUSH, (“Section Object Pointer SharedCacheMap is: 0x%08X\n”, Data->FileObject->SectionObjectPointer->SharedCacheMap));
if (Data->FileObject->SectionObjectPointer->ImageSectionObject != 0)
RRF_LOG_PRINT(RRDEBUG_POST_ACQUIRE_FLUSH, (“Section Object Pointer ImageSectionObject is: 0x%08X\n”, Data->FileObject->SectionObjectPointer->ImageSectionObject ));
}
}
Likewise, in the debugger, I’ve done this:
bp rrfilter!RRPostFsFilterPassThrough+0x13b “dc poi(poi(poi(poi(esp+1c)+c)+14)+8);g”
which is the breakpoint for the ImageSectionObject and dumpsout the memory at what the value Data->FileObject->SectionObjectPointer->ImageSectionObject points to.
When opening a notepad .txt file, I got nothing of any value.
Rather than continue to thrash aboukt hoping against hope I’ll find my buffer, I thought I’d ask again for additional guidance. Anyone able to help me out here in achieving my goal of looking at the memory managed buffers?
Thanks.