AMNESIA33£º¿ªÔ´TCP/IPЭÒéջϵÁÐÎó²îÆÊÎöÓëÑéÖ¤

Ðû²¼Ê±¼ä 2020-12-14

Ç°ÑÔ


½üÆÚ £¬ÍâÑóÇå¾²Ñо¿Ö°Ô±ÔÚ¶à¸ö±»ÆÕ±éʹÓõĿªÔ´TCP/IPЭÒéÕ»·¢Ã÷Á˶à¸öÎó²î £¬ÕâһϵÁÐÎó²îͳ³ÆΪAMNESIA33¡£ÕâЩÎó²îÆձ鱣´æÓÚǶÈëʽºÍÎïÁªÍø×°±¸ÖÐ £¬Ó°ÏìÁ˶à¸öÐÐÒµÁìÓò£¨°üÀ¨Ò½ÁÆ¡¢ÔËÊä¡¢ÄÜÔ´¡¢µçÐÅ¡¢¹¤Òµ¿ØÖÆ¡¢ÁãÊÛºÍÉÌÒµµÈ£© £¬ÏÖÔÚÒÑÖª¹æÄ£ÄÚÉæ¼°Á˳¬150¼Ò¹©Ó¦ÉÌÒÔ¼°ÊýÒÔ°ÙÍò¼ÆµÄ×°±¸¡£ÓëURGEN11ºÍRipple20²î±ðµÄÊÇ £¬AMNESIA33Ó°ÏìµÄÊǶà¸ö¿ªÔ´TCP/IPЭÒéÕ» £¬Òò´ËÕâЩÎó²î¿ÉÒÔÇÄÎÞÉùÏ¢µØÓ°Ïìµ½ÎÞÊý¸ö´úÂë¿â¡¢¿ª·¢ÍŶÓÓë¸÷¸ö¹«Ë¾µÄ²úÆ·¡£ÏÖÔÚÒÑÖªµÄÎó²îÉæ¼°µ½ÁËÖÇÄܼҾӡ¢¹¤³§PLC¡¢SCADA×°±¸Ó빤¿Ø½»Á÷»ú £¬µçÁ¦¼à¿ØµÈ×°±¸¡£


ÕâЩÎó²î±£´æÓÚuIP¡¢FNET¡¢picoTCPºÍNut/NetµÈ¿ªÔ´Ð­ÒéÕ»ÉÏ £¬Ó°ÏìTCP/IPЭÒéÕ»µÄ¶à¸ö×é¼þ £¬°üÀ¨DNS¡¢IPv6¡¢IPv4¡¢TCP¡¢ICMP¡¢LLMNRºÍmDNSµÈ¡£ÆäÖаüÀ¨¶à¸öÑÏÖØÎó²î £¬ËüÃǵÄCVE±àºÅ»®·ÖΪCVE-2020-17437¡¢CVE-2020-17443¡¢CVE-2020-24338¡¢CVE-2020-24336¡¢CVE-2020-25111¡£


CVE-2020-17437£¨CVSSÆÀ·Ö8.2£©¡¢CVE-2020-17443£¨CVSSÆÀ·Ö8.2£©¿Éµ¼ÖÂ×°±¸¾Ü¾ø·þÎñ¡£CVE-2020-24338¡¢CVE-2020-24336¡¢CVE-2020-25111£¨ÕâÈý¸öCVSSÆÀ·Ö¾ùΪ9.8£©¶¼¿Éµ¼ÖÂÔ¶³Ì´úÂëÖ´ÐÐ(RCE)¡£ÆäËü28¸öÎó²îµÄÑÏÖØˮƽ¸÷Òì £¬CVSSÆÀ·Ö»®·Ö´Ó4µ½8.2¡£


ÓÉÓÚIoT¡¢OT¡¢IT×°±¸¹©Ó¦Á´µÄÌØÕ÷ £¬Îó²îÓ°ÏìµÄ×°±¸ÖÚ¶à £¬Ó°Ïì¹æÄ£¹ãÇÒÒ»Á¬Ê±¼ä³¤ £¬Îó²îÐÞ¸´µÄʵÑé½ÏÄÑÌ⡣ͬʱ £¬ÓÉÓÚuIP¡¢picoTCP¿ªÔ´Ð­ÒéÕ»ÒѾ­²»ÔÙά»¤ £¬ÒÔÊDz¿·ÖÎó²îûÓв¹¶¡ £¬Ðí¶à²úÆ·Ö»ÄÜÑ°ÕÒÌæ»»ÊÖÒռƻ®»òÕßÊÇÔöÌíÌá·À²½·¥¡£


Òò´Ë £¬ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍøADLab¶ÔÏà¹ØÎó²î¾ÙÐÐÁËÆÊÎö £¬²¢Àֳɸ´ÏÖÁ˶à¸öÎó²î £¬¿ª·¢ÁËAMNESIA33Ïà¹ØÎó²î¼ì²âÊÖÒÕ £¬²¢ÌáÈ¡ÁËÁ÷Á¿¼à¿ØÌØÕ÷ £¬ÕâЩÊÖÒÕÕýÔÚÓ¦Óõ½ÎÒÃǵÄÇå¾²²úÆ·ÖС£ÎªÁË»º½âÎó²îµÄÓ°Ïì £¬ÎÒÃÇÌá³öÏÂÁÐÌá·À½¨Òé¡£

Ìá·À½¨Òé 


¹ØÓÚÕâЩÎó²îµÄÌá·À»º½â²½·¥ £¬ÎÒÃǽ¨Òé½ÓÄÉÈçϼ¸¸ö²½·¥£º 


¡ñ ÉèÖÃÄÚÍø×°±¸µÄDNS·þÎñÆ÷ΪÄÚÍøDNS·þÎñÆ÷¡£

¡ñ Èç²»ÐëÒª £¬Çë¹Ø±ÕIPv6ÉèÖá£

¡ñ Ê¹Óéɨ²úƷʶ±ð³ö½ÓÄÉÎÊÌâЭÒéÕ»µÄ×°±¸×ʲú £¬¶Ô×éÖ¯ÄÚ¿ÉÄܱ£´æÎÊÌâµÄIoT¡¢OTºÍIT×°±¸¾ÙÐÐΣº¦ÆÀ¹À¡£

¡ñ ·À»ðǽ¼°IPS²úÆ·¼ÓÈëAMNESIA33Îó²î¹¥»÷ʶ±ðÌØÕ÷ £¬¼à¿Ø¶ñÒâÁ÷Á¿¡£

¡ñ Èç²»ÐëÒª £¬×°±¸²»ÒªÌ»Â¶ÔÚ¹«Íø¡£

¡ñ ¾¡¿ÉÄܸüÐÂÏà¹ØÊÜÓ°ÏìЭÒéÕ»µ½×îа汾¡£


ϱíÊDz¿·ÖÒѾ­ÐÞ¸´µÄЭÒéÕ»¼°°æ±¾£º


TCP/IPЭÒéÕ»

ÐÞ¸´°æ±¾

FNET

4.70¼°ÒÔÉÏ

uIP-Contiki-NG

4.6.0¼°ÒÔÉÏ

Nut/Net

5.1¼°ÒÔÉÏ



CISAͬÃË·ÖÏíÁË13¸öÉæ¼°µ½AMNESIA33Îó²îµÄ¹«Ë¾µÄ²úÆ·ÐÞ¸´½¨Òé £¬°üÀ¨ÁËMicrochip¡¢SiemensµÈ¹«Ë¾µÄ²úÆ· £¬Ïê¼û²Î¿¼Á´½Ó[5]¡£


Ïà¹Ø¿´·¨ÏÈÈÝ 


1¡¢DNSЭÒéÆÊÎö


DNSµÄÇëÇóºÍÏìÓ¦µÄ»ù±¾µ¥Î»ÊÇDNS±¨ÎÄ£¨Message£©¡£ÇëÇóºÍÏìÓ¦µÄDNS±¨ÎĽṹÊÇÍêÈ«ÏàͬµÄ £¬Ã¿¸ö±¨ÎĶ¼ÓÉÒÔÏÂÎå¶Î£¨Section£©×é³É£º


ͼƬ


DNS HeaderÊÇÿ¸öDNS±¨ÎĶ¼±ØÐèÓµÓеÄÒ»²¿·Ö £¬ËüµÄ³¤¶ÈÀο¿Îª12¸ö×Ö½Ú¡£Question²¿·Ö´æ·ÅµÄÊÇÏò·þÎñÆ÷ÅÌÎʵÄÓòÃûÊý¾Ý £¬Ò»Ñùƽ³£ÇéÐÎÏÂËüÖ»ÓÐÒ»ÌõEntry¡£Ã¿¸öEntryµÄÃûÌÃÊÇÏàͬµÄ £¬ÈçÏÂËùʾ£º


ͼƬ


QNAMEÊÇÓÉlabelsÐòÁÐ×é³ÉµÄÓòÃû¡£QNAMEµÄÃûÌÃʹÓÃDNS±ê×¼Ãû³ÆÌåÏÖ·¨¡£Õâ¸ö×Ö¶ÎÊDZ䳤µÄ £¬Òò´ËÓпÉÄÜ·ºÆðÆæÊý¸ö×Ö½Ú £¬µ«²»¾ÙÐв¹Æë¡£DNSʹÓÃÒ»ÖÖ±ê×¼ÃûÌöÔÓòÃû¾ÙÐбàÂë¡£ËüÓÉһϵÁеÄlabel£¨ºÍÓòÃûÖÐÓÃ.Ö§½âµÄlabel²î±ð£©×é³É¡£Ã¿¸ölabelÊ××ֽڵĸßÁ½Î»ÓÃÓÚÌåÏÖlabelµÄÀàÐÍ¡£RFC1035ÖзÖÅÉÁËËĸöÄÚÀïµÄÁ½¸ö £¬»®·ÖÊÇ£º00ÌåÏÖµÄͨË×label £¬11£¨0xC0£©ÌåÏÖµÄѹËõlabel¡£


Answer¡¢AuthorityºÍAdditionalÈý¸ö¶ÎµÄÃûÌÃÊÇÍêÈ«ÏàͬµÄ £¬¶¼ÊÇÓÉÁãÖÁ¶àÌõResource Record£¨×ÊÔ´¼Í¼£©×é³É¡£ÕâЩ×ÊÔ´¼Í¼ÓÉÓÚ²î±ðµÄÓÃ;¶ø±»ÍÑÀë´æ·Å¡£Answer¶ÔÓ¦ÅÌÎÊÇëÇóÖеÄQuestion £¬QuestionÖеÄÇëÇóÅÌÎÊЧ¹û»áÔÚAnswerÖиø³ö £¬ÈôÊÇÒ»¸öÏìÓ¦±¨ÎĵÄAnswerΪ¿Õ £¬ËµÃ÷Õâ´ÎÅÌÎÊûÓÐÖ±½Ó»ñµÃЧ¹û¡£


RR(Resource Record)×ÊÔ´¼Í¼ÊÇDNSϵͳÖкÜÊÇÖ÷ÒªµÄÒ»²¿·Ö £¬ËüÓµÓÐÒ»¸ö±ä³¤µÄ½á¹¹ £¬ÏêϸÃûÌÃÈçÏ£º


ͼƬ


¡ñ NAME£ºËüÖ¸¶¨¸ÃÌõ¼Í¼¶ÔÓ¦µÄÊÇÄĸöÓòÃû £¬ÃûÌÃʹÓÃDNS±ê×¼Ãû³ÆÌåÏÖ·¨

¡ñ TYPE£º×ÊÔ´¼Í¼µÄÀàÐÍ¡£

¡ñ CLASS£º¶ÔÓ¦QuestionµÄQCLASS £¬Ö¸¶¨ÇëÇóµÄÀàÐÍ £¬³£ÓÃֵΪIN £¬ÖµÎª0x001¡£

¡ñ TTL(Time To Live)×ÊÔ´µÄÓÐÓÃÆÚ£ºÌåÏÖÄã¿ÉÒÔ½«¸ÃÌõRR»º´æTLLÃë £¬TTLΪ0ÌåÏÖ¸ÃRR²»¿É±»»º´æ¡£TTLÊÇÒ»¸ö4×Ö½ÚÓзûºÅÊý £¬¿ÉÊÇֻʹÓÃËü´óÓÚ¼´ÊÇ0µÄ²¿·Ö¡£

¡ñ RDLENGTH£ºÒ»¸öÁ½×ֽڷǸºÕûÊý £¬ÓÃÓÚÖ¸¶¨RDATA²¿·ÖµÄ³¤¶È£¨×Ö½ÚÊý£©¡£

¡ñ RDATA£ºÌåÏÖÒ»¸ö³¤¶ÈºÍ½á¹¹¶¼¿É±äµÄ×ֶΠ£¬ËüµÄÏêϸ½á¹¹È¡¾öÓÚTYPE×Ö¶ÎÖ¸¶¨µÄ×ÊÔ´ÀàÐÍ¡£

DNSÏìÓ¦°üÈçÏÂͼËùʾ£º


ͼƬ


´ÓÉÏͼÖпÉÖª £¬¸ÃAnswersÇø¶ÎÖб£´æ9¸ö×ÊÔ´¼Í¼ £¬ºì¿òÖÐÌåÏÖµÄÊÇÖ÷»úµØµã£¨AÀàÐÍ£©×ÊÔ´¼Í¼¡£


Óò±êÇ©labelÔÚDNSÊý¾Ý°üÀï±»±àÂë £¬Ã¿¸öͨË×±êÇ©µÄµÚÒ»¸ö×Ö½Ú´ú±íÕâ¸ö±êÇ©µÄ³¤¶È £¬Ê£ÏµÄ×ÖĸÊý×Ö×Ö·ûΪ±êÇ©×Ô¼º(һЩÌØÊâ×Ö·ûÒ²ÊÇ¿ÉÒÔµÄ) £¬¿ÉÊÇ×îÖÕ×îºóµÄ×Ö·ûÒ»¶¨ÊÇÒÔ¿Õ×Ö½Ú×îºó(¼´0x00) £¬ÓÃÀ´ÌåÏÖÓòÃûµÄ¿¢Ê¡£¾Ù¸öÀý×Ó £¬ÈçÏÂͼËùʾ £¬Óò±êÇ©µÚÒ»¸ö×Ö·ûÊÇ0x03 £¬Õâ´ú±íµÚÒ»¸ö±êÇ©³¤¶ÈΪ3(¼´0x77 0x77 0x77 == ¡°www¡±) £¬Í¬Àí £¬0x62 0x61 0x690x64 0x75 == ¡°baidu¡± £¬×îºó¿ÉÒÔ¿´µ½ÒÔ0x00×îºó¡£


ͼƬ


2¡¢TCP½ôÆÈģʽ


ΪÁË·¢ËÍÖ÷ҪЭÒéÊý¾Ý,TCPÌṩÁËÒ»ÖÖ³ÆΪ½ôÆÈģʽ(urgentmode)µÄ»úÖÆ £¬TCPЭÒéÔÚÊý¾Ý¶ÎÖÐÉèÖÃURGλ,ÌåÏÖ½øÈë½ôÆÈģʽ¡£Í¨¹ýÉèÖýôÆÈģʽ £¬·¢ËÍ·½¿ÉÒÔÔÚ·¢ËÍÐÐÁÐÖÐÓÅÏÈ·¢ËÍÕⲿ·ÖµÄÊý¾Ý £¬²¢ÇÒ²»±ØÔÚ·¢ËÍÐÐÁÐÖÐÅŶÓ £¬¶øÎüÊÕ·½¿ÉÒÔ¶Ô½ôÆÈģʽ½ÓÄÉÌØÊâµÄ´¦Öóͷ£¡£ÕâÖÖ·½·¨Êý¾Ý½ûÖ¹Ò×½ÓÊܱ»ÛÕ±Õ,·þÎñÆ÷¶Ë³ÌÐò»áÓÅÏȽÓÊÜÕâЩ½ôÆȵÄÊý¾Ý £¬¶ø²»±Ø¾ÙÐÐÅŶӴ¦Öóͷ£¡£ÔÚTCP±¨ÎÄÖнç˵ÁËÁ½¸ö×Ö¶ÎÀ´±êʾ½ôÆÈģʽ £¬Ò»¸öURG±ê¼Ç £¬¸Ã±ê¼ÇÌåÏÖ±¨ÎÄÖÐÓнôÆÈÊý¾Ý £¬ÁíÒ»¸ö±ê¼ÇÊǽôÆÈÖ¸Õë £¬Ëü±êʾ½ôÆÈÊý¾ÝÔÚ´«ÊäÊý¾ÝÖÐÆ«ÒÆλÖá£ÈçÏÂͼËùʾ£º


ͼƬ


Îó²îÆÊÎö 


ÏÂÃæÎÒÃǶԼ¸¸öCVSSÆÀ·Ö½Ï¸ßµÄÎó²î¾ÙÐÐÆÊÎö£º


1¡¢CVE-2020-17437


CVE-2020-17437±£´æÓÚuIPЭÒéÕ»µÄuip.cÎļþµÄuip_processº¯ÊýÖÐ £¬¸Ãº¯ÊýÖ÷ÒªÊÇ´¦Öóͷ£ip/tcp±¨ÎÄ £¬ÏÂͼÊÇuIPЭÒéÕ»¶ÔTCP±¨ÎÄÖдøÓÐTCP_URG½ôÆÈÖ¸Õë±êʶʱµÄ´¦Öóͷ£´úÂë £¬ÈôÊDZàÒëʱÉèÖÃÁËUIP_URGDATA £¬Ôò³ÌÐò»á×ßµ½ÏÂÃæµÄif·ÖÖ§ £¬¶Ô½ôÆÈÖ¸ÕëÊý¾Ý¾ÙÐÐרÃÅ´¦Öóͷ£¡£


¿ÉÊÇÔÚĬÈÏÇéÐÎÏ £¬UIP_URGDATA²¢Ã»ÓÐÉèÖᣴúÂë»á½øÈëµ½else·ÖÖ§ £¬³ÌÐò»áÌø¹ý´¦Öóͷ£½ôÆÈÖ¸ÕëÊý¾Ý £¬²¢ÐÞ¸Äuip_lenµÄÊýÖµ¡£³ÌÐòÔÚÐÞ¸Äuip_lenµÄʱ¼ä²¢Ã»ÓÐÅжϽôÆÈÖ¸ÕëµÄÖµ £¬µ±uip_lenµÄÖµÌØÊâС £¬¶ø½ôÆÈÖ¸ÕëµÄÖµurgpÌØÊâ´óʱ £¬¾Í»áÒýÆðÕûÊýÒç³ö £¬µ¼ÖÂ×°±¸ÖØÆô»òÕßÊÇÔ½½ç¶Áд¡£


ͼƬ


2¡¢CVE-2020-24338


¸ÃÎó²î·ºÆðÔÚpicoTCP/IPЭÒéÕ»ÖÐÆÊÎöÓòÃûlabelµÄpico_dns_decompress_name()º¯ÊýÖÐ £¬¸Ãº¯ÊýÏêϸʵÏÖÈçÏ´úÂëËùʾ£º


ͼƬ


µÚ95¡¢96Ðгõʼ»¯iterator £¬nameÖ¸Ïò´ý½âѹËõµÄlabels £¬dest_iteratorÖ¸Ïò´æ·Å½âѹ³öÀ´µÄlabelsµÄ»º³åÇø £¬¾ÞϸΪ256×Ö½Ú¡£µÚ97ÐÐ×îÏÈΪwhileÑ­»· £¬¶ÁÈ¡µ½×Ö·û´®×îºó¿Õ×Ö½ÚÍ˳ö¡£µÚ98ÐÐ £¬Í¨¹ýiterator&0xC0ÅжÏlabelÀàÐÍ £¬ÈôÊÇΪѹËõlabel £¬Ôòͨ¹ýpacket¶¨Î»µ½Í¨Ë×labelËùÔÚµÄλÖà £¬ÈôÊÇΪͨË×labelÖ±½Ó½øÈëelse´úÂë¿éÖÐ £¬µÚ107ÐÐ £¬Å²ÓÃmemcpy½«Í¨Ë×label¿½±´µ½dest_iteratorÖС£ÎÒÃÇÖªµÀdest_iterator»º³åÇø¾ÞϸֻÓÐ256×Ö½Ú £¬¶øwhileÑ­»·Í˳öÌõ¼þΪ¶Áµ½×Ö·û´®×îºó¿Õ×Ö½Ú £¬Òò´Ëµ±name³¤¶ÈÁè¼Ý256×Ö½Úʱ £¬µ¼ÖÂdest_iterator»º³åÇøÒç³ö¡£


3¡¢CVE-2020-24336


¸ÃÎó²î·ºÆðÔÚcontikiЭÒéÕ»ÖеÄip64_dns64_4to6()ÖÐ £¬¸Ãº¯Êý¹¦Ð§Êǽ«ipv4ÀàÐ͵ÄDNSÊý¾Ý°üת»»³Éipv6ÀàÐ͵ÄDNSÊý¾Ý°ü £¬Òªº¦´úÂëÈçÏ£º


ͼƬ


±éÀúAnswerÇø¶Î²¢¸üе½ipv6ÀàÐ͵ÄAnswerÇø¶ÎÖС£´ÓµÚ209ÐÐ×îÏÈת»»×ÊÔ´¼Í¼ £¬ÏêϸʵÏÖ´úÂëÈçÏÂËùʾ£º


ͼƬ


Ê×ÏÈÅжÏTYPEÊÇ·ñÊÇDNS_TYPE_A £¬DNS_TYPE_AÌåÏÖ¸Ã×ÊÔ´¼Í¼Ϊipv4Ö÷»úµØµã £¬È»ºó½«¶ÔÓ¦Çø¶Î¿½±´µ½acopyÖС£µÚ220ÐÐ £¬´Ó×ÊÔ´¼Í¼ÖÐÖ±½ÓÈ¡RDLENGTH £¬Ç°ÎÄÒÑÏÈÈÝ £¬¸ÃÇø¶Î±íÕ÷RDATAµÄ³¤¶È¡£µÚ227ÐÐ £¬ÅжÏlen³¤¶ÈÊÇ·ñ¼´ÊÇ4 £¬ÕâÀïÕý³£ÇéÐÎ £¬lenÓ¦¸ÃΪ4 £¬ÓÉÓÚipv4µØµã³¤¶ÈΪ4¸ö×Ö½Ú¡£ÈôÊÇlen²»¼´ÊÇ4 £¬Ôò½øÈëelseÓï¾äÖÐ £¬Ö±½ÓŲÓÃmemcpy¾ÙÐÐRDATAÊý¾Ý¿½±´¡£ÕâÀïÊDZ£´æÎÊÌâµÄ £¬Ipv4Ö÷»úµØµã³¤¶È²»¼´ÊÇ4 £¬²¢Ã»ÓÐÑéÖ¤Ö÷»úµØµãµÄºÏÀíÐÔ²¢ÇÒlen×î´óΪ0xFFFF £¬Ö±½Ó¿½±´¿ÉÄܵ¼Ö»º³åÇøÒç³ö¡£


4¡¢CVE-2020-25111


ÔÚʹÓÃNut/NetЭÒéÕ»µÄ×°±¸ÖÐ £¬NutDnsGetResourceAll()ÊÇ´¦Öóͷ£DNSÇëÇóµÄº¯Êý £¬ÆäÖд¦Öóͷ£DNS»Ø¸´µÄº¯ÊýÊÇDecodeDnsQuestion() £¬´¦Öóͷ£Óò±êÇ©µÄº¯ÊýÊÇScanName() £¬Îó²î¾Í·ºÆðÔÚScanName()º¯ÊýÖС£ÈçÏÂͼËùʾ £¬cpΪָÏòÓòÃûµÚÒ»¸ö×Ö½ÚµÄÖ¸Õë(¼´µÚÒ»¸öÓò±êÇ©µÄ³¤¶È×Ö½Ú) £¬*nppΪ¼´½«±»ÆÊÎöµÄÓòÃûbuffer £¬Í¨¹ýstrlen()½«Õû¸öÓòÃû³¤¶È¸³Öµ¸ørc,È»ºó»ùÓÚrc·ÖÅÉ*npp buffer £¬Ö®ºóͨ¹ýÒ»¸öwhile £¬Ñ­»·´¦Öóͷ£Ã¿Ò»¸ölabel¡£ÎÊÌâÏÔ¶øÒ×¼û £¬cpÊǹ¥»÷Õ߿ɿصÄ £¬ÓÉ´Ë¿ÉÒÔ¿ØÖÆ*nppµÄ¾Þϸ¡£¶ø¹ØÓÚ±êÇ©µÄ³¤¶È £¬¼´len±äÁ¿ £¬Ö±½Ó´ÓÊý¾Ý°üÖлñµÃ £¬²¢Ã»ÓÐ×öÈκνçÏß¼ì²é £¬È»ºóͨ¹ýwhileÑ­»·´¦Öóͷ£¡£Òò´Ë¿ÉÒÔ¶ÔlenÉèÖÃí§ÒâµÄÖµ £¬¼´¹¥»÷Õ߶Ô*npp buffer¿É¿ØµÄ³¤¶È¡£ÓÉ´Ë¿ÉÒÔÔÚ¶ÑÖÐÔì³ÉÔ½½çд £¬Õâ¿Éµ¼ÖÂÔ¶³Ì´úÂëÖ´ÐÐ(RCE)¡£


ͼƬ


5¡¢CVE-2020-17443


CVE-2020-17443±£´æÓÚPicoTCPЭÒéÕ»pico_icmp6.cÎļþÖС£ÎÊÌâ´úÂëλÓÚpico_icmp6_send_echoreply£¨£©º¯ÊýÖÐ £¬¸Ãº¯ÊýµÄÖ÷Òª¹¦Ð§Êǻظ´ICMPv6Ó¦´ðÊý¾Ý°üÒÔÏìÓ¦¶Ô¶ËµÄICMPv6Echo(ping)ÇëÇó¡£


ͼƬ


ÎÒÃÇ¿ÉÒÔ¿´µ½ £¬µÚ68ÐÐ £¬replay½á¹¹µÄ»º³å¾Þϸ»ùÓÚechoµÄ±¨ÎÄÖÐtransport_len±äÁ¿¡£ÔÚµÚ84ÐÐ £¬³ÌÐò´Óecho->payloadÏòreply->payloadµØµã¸´ÖÆÁ˳¤¶ÈΪecho->transport_len- 8¾ÞϸµÄÊý¾Ý¡£


×¢ÖØ £¬ÈôÊÇecho->transport_lenСÓÚ 8 £¬echo->transport_len - 8»áµ¼ÖÂÕûÊýÒç³ö £¬memcpy²Ù×÷»áµ¼Ö»º³åÇøÒç³ö¡£


ÔÚPicoTCPЭÒéÕ»¹¥»÷Õßͨ¹ý½á¹¹¶ñÒâµÄICMPv6Êý¾Ý°ü £¬Õâ¸ö¶ñÒâµÄÊý¾Ý°üICMP±¨Í·Ð¡ÓÚ8 £¬»áµ¼ÖÂ×°±¸ÖØÆô»ò¾Ü¾ø·þÎñ¡£


Îó²îÑéÖ¤


Îó²îÑéÖ¤ÊÓƵÇëÉó²éADLab¹«ÖÚºÅ


²Î¿¼Á´½Ó£º


[1] https://www.forescout.com/research-labs/amnesia33/[2]https://www.securityweek.com/amnesia33-vulnerabilities-tcpip-stacks-expose-millions-devices-attacks

[3] https://www.zdnet.com/article/amnesia33-vulnerabilities-impact-millions-of-smart-and-industrial-devices/

[4] https://tools.ietf.org/html/rfc1035

[5] https://us-cert.cisa.gov/ics/advisories/icsa-20-343-01


ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍøÆð¾¢·ÀÓùʵÑéÊÒ£¨ADLab£©


ADLab½¨ÉèÓÚ1999Äê £¬ÊÇÖйúÇå¾²ÐÐÒµ×îÔ罨ÉèµÄ¹¥·ÀÊÖÒÕÑо¿ÊµÑéÊÒÖ®Ò» £¬Î¢ÈíMAPPÍýÏë½¹µã³ÉÔ± £¬¡°ºÚȸ¹¥»÷¡±¿´·¨Ê×ÍÆÕß¡£×èÖ¹ÏÖÔÚ £¬ADLabÒÑͨ¹ýCVEÀÛ¼ÆÐû²¼Çå¾²Îó²î½ü1100¸ö £¬Í¨¹ý CNVD/CNNVDÀÛ¼ÆÐû²¼Çå¾²Îó²î900Óà¸ö £¬Ò»Á¬¼á³Ö¹ú¼ÊÍøÂçÇå¾²ÁìÓòÒ»Á÷Ë®×¼¡£ÊµÑéÊÒÑо¿Æ«Ïòº­¸Ç²Ù×÷ϵͳÓëÓ¦ÓÃϵͳÇå¾²Ñо¿¡¢Òƶ¯ÖÇÄÜÖÕ¶ËÇå¾²Ñо¿¡¢ÎïÁªÍøÖÇÄÜ×°±¸Çå¾²Ñо¿¡¢WebÇå¾²Ñо¿¡¢¹¤¿ØϵͳÇå¾²Ñо¿¡¢ÔÆÇå¾²Ñо¿¡£Ñо¿Ð§¹ûÓ¦ÓÃÓÚ²úÆ·½¹µãÊÖÒÕÑо¿¡¢¹ú¼ÒÖصã¿Æ¼¼ÏîÄ¿¹¥¹Ø¡¢×¨ÒµÇå¾²·þÎñµÈ¡£


adlab.jpg