-qing-

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;
}

 

分类:

技术点:

相关文章:

  • 2021-09-26
  • 2021-09-10
  • 2021-10-09
  • 2021-09-10
  • 2021-11-22
  • 2021-12-28
  • 2021-09-10
猜你喜欢
  • 2022-12-23
  • 2021-09-10
  • 2021-09-10
  • 2021-09-10
  • 2022-01-14
  • 2021-12-24
  • 2022-01-30
相关资源
相似解决方案