您现在的位置: 湖南软件学院CRP网站群 >> 学院动态 >> 网络技术 >> 新闻正文
来源:未知 点击: 添加时间:2007-12-10 8:04:31
在W2K中提升权限的几个攻击实例之成败心得



<==========================radixvictim.cpp===============================>

// radixvictim.cpp : Defines the entry point for the application.
//

#define _WIN32_WINNT 0x0500
#define UNICODE

#include
#include
#include
#include

int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow = SW_SHOW)
{
// TODO: Place code here.

LPCWSTR lpUsername = L"Administrator"; // user's name
LPCWSTR lpDomain = L"dallas"; // user's domain
LPCWSTR lpPassword = L"moda"; // user's password
DWORD dwLogonFlags = LOGON_NETCREDENTIALS_ONLY; // logon option
LPCWSTR lpApplicationName = L"D:\\Winnt\\NotePad.exe";
LPWSTR lpCommandLine = L"NotePad.exe"; // command-line string
DWORD dwCreationFlags = CREATE_NEW_CONSOLE; // creation flags
LPVOID lpEnvironment = NULL; // new environment block
LPCWSTR lpCurrentDirectory = NULL; // current directory name
STARTUPINFO StartupInfo; // startup information
PROCESS_INFORMATION ProcessInfo; // process information

BOOL ret;

ZeroMemory(&StartupInfo, sizeof(StartupInfo));
StartupInfo.cb = sizeof(StartupInfo);
ZeroMemory(&ProcessInfo, sizeof(ProcessInfo));

ret = CreateProcessWithLogonW(
lpUsername,
lpDomain,
lpPassword,
dwLogonFlags,
lpApplicationName,
lpCommandLine,
dwCreationFlags,
lpEnvironment,
lpCurrentDirectory,
&StartupInfo,
&ProcessInfo
);


if (! ret )
ExitProcess (GetLastError()) ;

return 0;
}

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 下一页


新闻录入:ics_htj 责任编辑:信息化中心

湖南软件职业学院信息化中心 Ver.2007© 美工:刘国鹂 程序:杨小刚
学院地址:长沙市天心区新开铺路1186号  电话:0731-6938121(传真) 6938122