Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Error Message working as SYSTEM

Seems to still be a problem when run inside explorer.exe
  • Loading branch information...
commit 7e55f746321136aa1d1d890240f55ff84a897523 1 parent ddfaea3
@dmaloney-r7 dmaloney-r7 authored
View
BIN  data/meterpreter/ext_server_stdapi.dll
Binary file not shown
View
10 external/source/meterpreter/source/extensions/stdapi/server/railgun/railgun.c
@@ -82,13 +82,13 @@ DWORD railgun_call( RAILGUN_INPUT * pInput, RAILGUN_OUTPUT * pOutput )
DWORD dwStackSizeInElements = 0;
DWORD dwIndex = 0;
+ DWORD dwErr;
//Set up vars for FormateMessage call
DWORD dwNumChars = 0;
//Set flags to look in the system error tabl if not found in the module table
- DWORD dwMsgFlags = (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE);
+ DWORD dwMsgFlags = (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE | FORMAT_MESSAGE_IGNORE_INSERTS);
//Set the Language ID for the Message to US English
- DWORD dwLangId = 5;
- const DWORD dwBufSize = 100+1;
+ DWORD dwLangId = 0;
LPTSTR buffer;
@@ -268,8 +268,8 @@ DWORD railgun_call( RAILGUN_INPUT * pInput, RAILGUN_OUTPUT * pOutput )
}
pOutput->dwLastError = GetLastError();
- //dwNumChars = FormatMessage(dwMsgFlags,hDll,pOutput->dwLastError,dwLangId,buffer,dwBufSize,NULL);
- //pOutput->pErrMsg = buffer;
+ dwNumChars = FormatMessage(dwMsgFlags,hDll,pOutput->dwLastError,dwLangId,(LPTSTR)&buffer,0,NULL);
+ pOutput->pErrMsg = buffer;
#ifdef _WIN64
Please sign in to comment.
Something went wrong with that request. Please try again.