BanMe Master Cheater
Reputation: 0
Joined: 29 Nov 2005 Posts: 375 Location: Farmington NH, USA
|
Posted: Sat Aug 08, 2009 7:22 pm Post subject: Creating File Stream using 'host' process.. |
|
|
| Code: |
__asm
{
xor eax,eax
add eax,0x30
mov eax,fs:[eax]
mov eax,[eax+0x10]
add eax,0x38
mov eax,[eax][UNICODE_STRING.Buffer]
push eax
pop wString
}
wcscpy((wchar_t*)&NativePath,L"\\??\\");
wcscat((wchar_t*)&NativePath,wString);
wcscat((wchar_t*)&NativePath,L":DEBUG_STREAM");
RtlInitUnicodeString(&Unicode,(PCWSTR)&NativePath);
InitializeObjectAttributes(&oa,&Unicode,OBJ_OPENIF|OBJ_KERNEL_HANDLE,0,0);
li.u.LowPart = 0x4096;
Status = NtCreateFile(&Reusable,GENERIC_WRITE,&oa,&IOSB,&li,FILE_ATTRIBUTE_NORMAL,FILE_SHARE_WRITE,FILE_OVERWRITE_IF,0,0,0);
//Reusable = CreateFileW((LPCWSTR)&NativePath,GENERIC_WRITE,FILE_SHARE_WRITE,NULL,OPEN_ALWAYS,0,NULL );
//Recycler = WriteFile(Reusable,"This is Sin32:DEBUG_STREAM\r\n",29,&dwRet,0);
Status = NtWriteFile(Reusable,0,0,0,&IOSB,"This is Sin32:DEBUG_STREAM\r\n",29,&li,0);
Recycler = FlushFileBuffers(Reusable);
CloseHandle(Reusable);
}
|
please refer here, if your interested in this simple use of FileStreams..
http://www.woodmann.com/forum/showthread.php?p=82321#post82321
BanMe
_________________
don't +rep me..i do not wish to have "status" or "recognition" from you or anyone.. thank you. |
|