WawaSeb wrote:Here is another paper about "bypassing UAC" : http://www.greyhathacker.net/?p=796
Out of date and incompetent copy-paste "article" of yet another "security expert".
Main idea comes from
http://download.pureftpd.org/pub/misc/UAC.cpp copyrighted copy-paste work made by well known <color>hat (currently) Peter Kleissner. His main addition to the original Leo Davidson work was adding ridiculous comments in the code, for example this
This was reported to Microsoft multiple times (months ago) and they are too lame to fix injection to explorer.exe.
I've followed the responsible disclosure guidelines, no need to get angry on me. TDL4 is using the bypass for 64-bit already.
(Wow, wow take it easy, explorer injection wow, reported to Microsoft, wow, they are too lame lol, no need to get angry on me <- OK Also I like this part when he looks for explorer.exe)
Code: Select all // Step 1: find explorer.exe process we can inject to (to-do: maybe using some other process?)
DWORD Processes[1024], BytesReturned;
if (!EnumProcesses(Processes, sizeof(Processes), &BytesReturned))
return 0;
HANDLE TargetProcess = NULL;
for (unsigned i = 0; i < BytesReturned / 4; i++)
{
if (Processes[i] != 0)
{
TargetProcess = OpenProcess(/*PROCESS_QUERY_INFORMATION | PROCESS_VM_READ*/PROCESS_ALL_ACCESS, FALSE, Processes[i]);
// Get the process name.
if (TargetProcess)
{
HMODULE hMod;
DWORD cbNeeded;
if (EnumProcessModules(TargetProcess, &hMod, sizeof(hMod), &cbNeeded) )
{
wchar_t ProcessName[MAX_PATH];
GetModuleBaseName(TargetProcess, hMod, ProcessName, sizeof(ProcessName)/sizeof(TCHAR) );
if (_wcsicmp(ProcessName, L"explorer.exe") == 0)
break;
}
CloseHandle(TargetProcess);
TargetProcess = NULL;
}
}
}
(Quite incompetent BTW. What else you expect from him well, he did the same with his own private TDL4 copy-paste clone he was trying to sell few years ago)
+ he optimized shellcode data write stage, doing it in single VirtualAllocEx/WriteProcessMemory.
Well, lets get back to the story. The same sysprep/cryptbase code next was copied into Carberp (you can find it as Carberp is open-source since last year).
What left in this article? A lot of stupid conclusions, incomplete and simple broken list of autoelevated apps (what so fucking hard to do strings search <autoElevate>true</autoElevate> over Windows directory?).
Another reinventing the wheel for sysprep trick which is so popular, so it used not only by malware, but as I heard some legitimate software too.