使用 int2e 關機(感覺很牛逼,分享一下)

原文地址:http://download.csdn.net/download/bing1564/980029


#include"windows.h"



extern "C" __declspec(dllexport) void ShutdownWindow(void)
{
 const int SE_SHUTDOWN_PRIVILEGE=0x13;
 typedef int (*RtlAdjustPrivilege)(int,bool, bool,int*);
 int en = 0;
 HMODULE module = LoadLibrary("ntdll.dll");
 RtlAdjustPrivilege rtl = (RtlAdjustPrivilege)GetProcAddress(module, "RtlAdjustPrivilege");
    int nRet=rtl(SE_SHUTDOWN_PRIVILEGE,TRUE,TRUE,&en);
    if(nRet==0x0C000007C)
        nRet = rtl(SE_SHUTDOWN_PRIVILEGE,TRUE,FALSE,&en);
}


void main()
{
ShutdownWindow();// 取得權限
_asm //XP系統
{
push 2
mov eax,0xf9
mov edx,esp
int 0x2e
add esp,4
}


_asm //2000系統
{
push 2
mov eax,0xd9
mov edx,esp
int 0x2e
add esp,4
}
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章