dz̸C/C++ÄÚ´æй©¼°Æä¼ì²â¹¤¾ß
BoundsChecker²ÉÓÃÒ»ÖÖ±»³ÆΪ Code InjectionµÄ¼¼Êõ£¬À´½Ø»ñ¶Ô·ÖÅäÄÚ´æºÍÊÍ·ÅÄÚ´æµÄº¯ÊýµÄµ÷Ó᣼òµ¥µØ˵£¬µ±ÄãµÄ³ÌÐò¿ªÊ¼ÔËÐÐʱ£¬BoundsCheckerµÄDLL±»×Ô¶¯ÔØÈë½ø³ÌµÄµØÖ·¿Õ¼ä£¨Õâ¿ÉÒÔͨ¹ýsystem-levelµÄHookʵÏÖ£©£¬È»ºóËü»áÐ޸Ľø³ÌÖжÔÄÚ´æ·ÖÅäºÍÊͷŵĺ¯Êýµ÷Óã¬ÈÃÕâЩµ÷ÓÃÊ×ÏÈתÈëËüµÄ´úÂ룬ȻºóÔÙÖ´ÐÐÔÀ´µÄ´úÂë¡£BoundsCheckerÔÚ×öÕâЩ¶¯×÷µÄʱ£¬ÎÞÐëÐ޸ı»µ÷ÊÔ³ÌÐòµÄÔ´´úÂë»ò¹¤³ÌÅäÖÃÎļþ£¬ÕâʹµÃʹÓÃËü·Ç³£µÄ¼ò±ã¡¢Ö±½Ó¡£
¡¡¡¡ÕâÀïÎÒÃÇÒÔmallocº¯ÊýΪÀý£¬½Ø»ñÆäËûµÄº¯Êý·½·¨Óë´ËÀàËÆ¡£
¡¡¡¡ÐèÒª±»½Ø»ñµÄº¯Êý¿ÉÄÜÔÚDLLÖУ¬Ò²¿ÉÄÜÔÚ³ÌÐòµÄ´úÂëÀï¡£±ÈÈ磬Èç¹û¾²Ì¬Á¬½áC-Runtime Library£¬ÄÇômallocº¯ÊýµÄ´úÂë»á±»Á¬½áµ½³ÌÐòÀΪÁ˽ػñס¶ÔÕâÀຯÊýµÄµ÷Óã¬BoundsChecker»á¶¯Ì¬ÐÞ¸ÄÕâЩº¯ÊýµÄÖ¸Áî¡£
¡¡¡¡ÒÔÏÂÁ½¶Î»ã±à´úÂ룬һ¶ÎûÓÐBoundsChecker½éÈ룬ÁíÒ»¶ÎÔòÓÐBoundsCheckerµÄ½éÈ룺
126: _CRTIMP void * __cdecl malloc (
127: size_t nSize
128: )
129: {
00403C10 push ebp
00403C11 mov ebp,esp
130: return _nh_malloc_dbg(nSize, _newmode, _NORMAL_BLOCK, NULL, 0);
00403C13 push 0
00403C15 push 0
00403C17 push 1
00403C19 mov eax,[__newmode (0042376c)]
00403C1E push eax
00403C1F mov ecx,dword ptr [nSize]
00403C22 push ecx
00403C23 call _nh_malloc_dbg (00403c80)
00403C28 add esp,14h
131: }
¡¡¡¡ÒÔÏÂÕâÒ»¶Î´úÂëÓÐBoundsChecker½éÈ룺
126: _CRTIMP void * __cdecl malloc (
127: size_t nSize
128: )
129: {
00403C10 jmp 01F41EC8
00403C15 push 0
00403C17 push 1
00403C19 mov eax,[__newmode (0042376c)]
00403C1E push eax
00403C1F mov ecx,dword ptr [nSize]
00403C22 push ecx
00403C23 call _nh_malloc_dbg (00403c80)
00403C28 add esp,14h
131: }
¡¡¡¡µ±BoundsChecker½éÈëºó£¬º¯ÊýmallocµÄÇ°ÈýÌõ»ã±àÖ¸Áî±»Ìæ»»³ÉÒ»ÌõjmpÖ¸ÁÔÀ´µÄÈýÌõÖ¸Áî±»°áµ½µØÖ·01F41EC8´¦ÁË¡£µ±³ÌÐò½øÈëmallocºóÏÈjmpµ½01F41EC8£¬Ö´ÐÐÔÀ´µÄÈýÌõÖ¸ÁȻºó¾ÍÊÇBoundsCheckerµÄÌìÏÂÁË¡£´óÖÂÉÏËü»áÏȼǼº¯ÊýµÄ·µ»ØµØÖ·£¨º¯ÊýµÄ·µ»ØµØÖ·ÔÚstackÉÏ£¬ËùÒÔºÜÈÝÒ×Ð޸ģ©£¬È»ºó°Ñ·µ»ØµØÖ·Ö¸ÏòÊôÓÚBoundsCheckerµÄ´úÂ룬½Ó×ÅÌøµ½mallocº¯ÊýÔÀ´µÄÖ¸ÁҲ¾ÍÊÇÔÚ00403c15µÄµØ·½¡£µ±mallocº¯Êý½áÊøµÄʱºò£¬ÓÉÓÚ·µ»ØµØÖ·±»Ð޸ģ¬Ëü»á·µ»Øµ½BoundsCheckerµÄ´úÂëÖУ¬´ËʱBoundsChecker»á¼Ç¼ÓÉmalloc
Ïà¹ØÎĵµ£º
1,³ÌÐò¿ØÖÆÖеĿØÖÆÁ÷Óï¾äÓÃÓÚ¿ØÖƸ÷¼ÆËã»ú²Ù×÷Ö´ÐеĴÎÐò¡£
ʲôÊÇ¿ØÖÆÁ÷Óï¾äÏëÁË°ëÌ죬ÔÀ´²»¹ýÊÇÕâЩ£¬if-elseÓï¾ä£¬else-ifÓï¾ä£¬switchÓï¾ä£¬whileÑ»·£¬forÑ»·£¬do-whileÑ»·µÈ¡£
2,»¨À¨ºÅ{}£¬ÆäÖеÄÓÒ»¨À¨ºÅÓÃÓÚ½áÊø³ÌÐò¿é£¬Æäºó²»ÐèÒª·ÖºÅ¡£
µ±³õÒ»¿´µ½“Æäºó²»ÐèÒª·ÖºÅµÄ”ʱºòÏëÁË°ëÌ ......
1.·Ö²ãÉè¼Æ£¬¸ôÀëƽ̨Ïà¹ØµÄ´úÂë¡£¾ÍÏñ¿É²âÊÔÐÔÒ»Ñù£¬¿ÉÒÆÖ²ÐÔÒ²Òª´ÓÉè¼Æ×¥Æð¡£Ò»°ãÀ´Ëµ£¬×îÉϲãºÍ×îϲ㶼²»¾ßÓÐÁ¼ºÃµÄ¿ÉÒÆÖ²ÐÔ¡£×îÉϲãÊÇ
GUI£¬´ó¶àÊýGUI¶¼²»ÊÇ¿çƽ̨µÄ£¬ÈçWin32 SDKºÍMFC¡£×îϲãÊDzÙ×÷ϵͳAPI£¬´ó¶à²¿·Ö²Ù×÷ϵͳAPI¶¼ÊÇרÓõġ£
¡¡¡¡
Èç¹ûÕâÁ½²ãµÄ´úÂëÉ¢²¼ÔÚÕû¸öÈí¼ ......
ʹÓÃObjective-C½âÎöHTML»òÕßXML£¬ÏµÍ³×Ô´øÓÐÁ½ÖÖ·½Ê½Ò»¸öÊÇͨ¹ýlibxml£¬Ò»¸öÊÇͨ¹ýNSXMLParser¡£²»¹ýÕâÁ½ÖÖ·½Ê½¶¼ÐèÒª×Ô¼ºÐ´ºÜ¶à±àÂëÀ´´¦ÀíץȡÏÂÀ´µÄÄÚÈÝ£¬¶øÇÒ²»ÊǺÜÖ±¹Û¡£
ÓÐÒ»¸ö±È½ÏºÃµÄÀà¿âhpple£¬ËüÊÇÒ»¸öÇáÁ¿¼¶µÄ°ü×°¿ò¼Ü£¬¿ÉÒԺܺõĽâ¾öÕâ¸öÎÊÌâ¡£ËüÊÇÓÃXPathÀ´¶¨Î»ºÍ½âÎöHTML»òÕßXML¡£
°²×°²½Ö裺
-¼ÓÈë libx ......
Eclipse³ýÁË¿ÉÒÔ開發JavaÖ®Í⣬還Ö§Ô®ÁË許¶à語ÑÔ£¬現ÔÚÏȽé紹
C¡¢C++µÄ開發環¾³設¶¨£¬ÒÔááÓÐ機會ÔÙ½é紹ÆäËüµÄ¡£Enjoy it£¡
OS£ºWindows XP Professional SP1
ʹÓð汾£ºEclipse 2.1.2
Ò».Ê×ÏÈÒªÏÂ載CDT£¬Eclipse 2.1.2 ......
ºÍÔÚIDEÖбàÒëÏà±È£¬ÃüÁîÐÐģʽ±àÒëËٶȸü¿ì£¬²¢¿ÉÒÔ±ÜÃâ±»IDE²úÉúµÄһЩ¸½¼ÓÐÅÏ¢Ëù¸ÉÈÅ¡£±¾ÎĽ«½éÉÜ΢ÈíC/C++±àÒëÆ÷ÃüÁîÐÐģʽÉ趨ºÍÓ÷¨¡£ 1¡¢ÉèÖû·¾³±äÁ¿£º PATH=C:\Program Files\Microsoft Visual Studio 8\VC\bin INCLUDE=C:\Program Files\Microsoft Visual Studio 8\VC\include LIB=C:\Program Files\Microsof ......