Skip to content
RCE Write-up Intermediate

Vulnerabilities in ManageEngine ADSelfService Plus 6.1 build 6117

Two vulnerabilities were found in ManageEngine ADSelfService Plus: a command injection in the admin panel that allowed an authenticated admin to execute commands on the server, and a broken access-control flaw that let an attacker simulate a client uninstallation to trigger NTLM relay attacks. An attacker with admin access could run arbitrary commands, while a local admin or network attacker could intercept NTLMv2 hashes.

Antoine Cervoise Follow

Published on synacktiv.com

Vulnerabilities description ManageEngine ADSelfService Plus ManageEngine ADSelfService Plus is an integrated self-service password management and single sign-on solution for Active Directory and cloud apps.1

Antoine Cervoise (@acervoise), Wilfried Bécard (@tiyeuse), on synacktiv.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 7 min read.

Context

ManageEngine ADSelfService Plus is an integrated self-service password management and single sign-on solution for Active Directory and cloud apps. Synacktiv audited version 6.1 build 6117 and found two issues: code execution from the web interface with admin privileges, and broken access control in the Web API.

The first issue lives in the domain configuration feature of the admin panel. ADSS stores a domain account that it uses to manage domain accounts, and an administrator can change that account and its password from the web interface. The second issue lives in the agent status endpoint used by managed computers to report the outcome of thick client operations.

Setup

The prerequisites differ per vulnerability.

For the command injection:

  • A valid domain account.
  • Admin access on the ADSS web interface.

For the broken access control, any one of the following:

  • A local admin account (or a domain account with local admin privileges) on a managed computer.
  • A man-in-the-middle position on the network between a managed computer and the manager.
  • Physical access to a computer managed by the ADSS manager.

Affected versions: 6.1 build 6117 was proven affected, and the vulnerabilities were also tested on 6.1 build 6105 and 6.1 build 6114. The code execution was fixed in 6.1 build 6123 and the broken access control in 6.1 build 6213.

The timeline was as follows:

Date Action
2022-01-07 Advisory sent to [redacted]
2022-04-13 Publication of version 6.1 build 6123
2022-09-26 Patch sent to Synacktiv
2022-09-30 Acknowledgment of the patch by Synacktiv
2022-12-15 Publication of version 6.1 build 6213
2023-01-16 Public release

Finding it

The command injection sits in the admin panel where the account used by ADSS to manage domain accounts is configured. The password entered there is not sanitised, and a password containing shell metacharacters is interpreted by the command interpreter rather than treated as data when ADSS runs the remote installation command.

The access control issue sits in the agent status endpoint: a request that reports a thick client uninstallation is accepted without any proof that it really comes from the managed computer. If ADSS is configured for automatic thick client installation, the manager will try to reinstall the client.

Exploitation

Step 1: Inject into the domain account password

An administrator changes the password of the controlled domain account and puts the following payload in the password field:

Text
& whoami > C:\rce.txt &

The command is executed on the server with the identity of the account used by the ADSS service. The interface used for the domain configuration is shown below.

Illustration 1: Interface for domain configuration.

The same action is available through the API. The following request carries the injection:

HTTP
POST /ServletAPI/domain/DomainSettings/updateDomainDetails HTTP/1.1
Host: [redacted]:9251
Cookie: JSESSIONIDADSSP=[redacted]

OPERATION=update&DOMAIN_PROPS=%7B%22DOMAIN_NAME%22%3A%[redacted].tld%22%2C
%22IS_AUTHENTICATION_REQUIRED%22%3A%22true%22%2C%22USER_DISTINGUISHED_NAME%22%3A%22toto
%22%2C%22PASSWORD%22%3A%22%26+whoami+%3E+C%3A%5C%5Crce.txt+%26%22%2C
%22DOMAIN_CONTROLLERS_NAME%22%3A%5B%22ZOHO-ADS.[redacted].tld%22%5D
%7D&adscsrf=fbfed74e-3348-4315-9086-e54afb83af3b

The DOMAIN_PROPS parameter is a URL-encoded JSON object holding the domain name, the authentication flag, the distinguished user name, the password and the domain controller name. The PASSWORD value decodes to the & whoami > C:\rce.txt & payload, and the request also carries an adscsrf token.

Step 2: Force a thick client reinstallation

After the ADSS configuration has been modified, the attacker must force a re-installation of the thick client on a remote computer. The interface for thick client installation is shown below.

Illustration 2: Interface for thick client installation.

During a classic re-installation, the following command is executed:

Text
RemCom.exe \\POSTE-TEST /user:[redacted].tld\DomainAccountAdmin /pwd:Motdepasse123! "msiexec /x {E451B224-C4E6-452E-BB61-2EFD4DC79A9C} /norestart REBOOT=ReallySuppress /qn "

With the command injection, the command line becomes:

Text
RemCom.exe \\POSTE-TEST /user:[redacted].tld\DomainAccountAdmin /pwd:& whoami > C:\
rce.txt & "msiexec /x {E451B224-C4E6-452E-BB61-2EFD4DC79A9C} /norestart REBOOT=ReallySuppress /qn "

The command executed successfully, as shown below.

Illustration 3: Command executed successfully.

To keep the previous web administrator's password and remain undetected, an attacker is able to first perform a database backup and restore it later.

Step 3: Alternative trigger through the password synchronisation script

ADSS can also be configured to run a custom script in order to synchronise passwords and account lockout status with other providers. A malicious user with admin access to the web interface could force a malicious command into this feature. The configuration of a malicious Post Action is shown below.

Illustration 4: Configuration of malicious Post Action.

If the attackers have access to a valid domain account, they could reset the password in order to trigger the code execution. Otherwise, they must wait for a user to reset their password or unlock their account.

Step 4: Fake an agent uninstallation

An attacker could simulate a client uninstallation on a machine by sending the following request:

HTTP
https://[redacted]:9251/AgentStatusUpdate.cc?status=adssp_admin_gina_uninstall_success&machineName=COMPUTERNAME&domainName=[redacted].tld

The status parameter claims a successful GINA uninstallation, and machineName and domainName identify the computer. If ADSS is configured for automatic thick client installation, the ADSS server manager will try to reinstall the client on the computer.

Step 5: Capture and relay the authentication

By intercepting the traffic between the manager and the computer, the attacker could intercept an NTLMv2 authentication. By impersonating the computer they could try to perform NTLM relay attacks on the network. For instance, with a network capture, it is possible to extract the NTLMv2 hash using NTLMRawUnHide:

Bash
$ python3 NTLMRawUnHide.py -q -i installation.pcapng
Searching installation.pcapng for NTLMv2 hashes...
[redacted].tld\DomainAccountAdmin::ZOHO-ADS:d296a208c6175187:d7[...]d0:01[...]00

Furthermore, a local admin user could extract the password or the hash of the domain account from lsass process memory:

Text
PS C:\> mimikatz.exe "sekurlsa::logonpasswords full" exit
[...]
msv :
	[00000003] Primary
	* Username : DomainAccountAdmin
	* Domain : DOMAIN
	* NTLM     : 4ba5321[...]d1aac85
	* SHA1     : fbe8b120[...]79b7c27
	* DPAPI    : a29d2cd9[...]654f63bf5

Root cause

The command injection exists because the password field is not sanitised before being embedded in a command line. The recommendation states that the password field should be sanitised and that the usage of Runtime.getRuntime().exec() prevents command injections. The password synchronisation feature should only be accessible for an action on the local server.

The broken access control exists because the uninstallation of the thick client is not validated on the solution manager: any party able to reach the endpoint can claim that a client was uninstalled, and if automatic installation is configured the manager reacts by reinstalling the client, which produces authentication traffic an attacker can capture.

Impact

With admin access to the web interface, an attacker can execute commands on the server with the identity of the account used by the ADSS service, either through the domain account password or through the password synchronisation script. The second path requires either a valid domain account to reset a password, or waiting for a user to reset their password or unlock their account. An attacker can also back up and restore the database to keep the previous web administrator's password and remain undetected.

With a local admin account on a managed computer, a man-in-the-middle position, or physical access to a managed computer, an attacker can trigger a reinstallation and intercept an NTLMv2 authentication, then attempt NTLM relay attacks on the network. A local admin can also extract the password or hash of the domain account from lsass process memory.

Fix

The code execution was fixed in version 6.1 build 6123 and the broken access control in version 6.1 build 6213. The advisory recommends sanitising the password field, avoiding Runtime.getRuntime().exec() for this purpose, and restricting the password synchronisation feature to an action on the local server. For the access control issue, it recommends validating the uninstallation of the thick client on the solution manager via a shared secret, protected on the client machine and accessible only by administrators.

Variants to test

  1. Other admin fields that end up in command lines (domain controller names, distinguished names, script paths): submit a value containing &, | or > and check whether a file appears or a command runs on the server.
  2. The password synchronisation Post Action on other builds: configure a command and trigger a password reset, then check whether the command runs with the service account's identity.
  3. The agent status endpoint on other deployments: send a fake uninstallation with a machineName you control and see whether the manager initiates a reinstallation and authentication towards it.
  4. NTLM relay from the captured authentication: relay the intercepted NTLMv2 authentication to another service and check whether it is accepted.
  5. Database backup and restore around the injection: check whether an attacker can back up the database before the change and restore it afterwards to keep the previous web administrator's password.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 18 min read.

What happened, in plain words

ManageEngine ADSelfService Plus (often shortened to ADSS) is a product that lets employees of a company reset their own passwords and sign in to many applications with one login. It talks to Active Directory, which is Microsoft's system for storing user accounts and passwords inside a company network. Synacktiv, a security company, looked at version 6.1 build 6117 of ADSS and found two problems.

The first problem is that someone who is already an administrator of the ADSS web interface can slip extra commands into a password field, and those commands then run on the server. This is called code execution or remote command execution (RCE): an attacker gets the server to run programs of their choosing. The commands run with the rights of the account the ADSS service itself uses.

The second problem is that a small web address used by managed computers to report back to the ADSS server accepts a message claiming a client was uninstalled without proof that it really comes from a managed computer. This is called broken access control: the server does not check who is allowed to do what. If ADSS is configured for automatic thick client installation, an attacker can abuse it to make the server try to reinstall a small program on a computer, and then capture the login information that the server sends during that reinstallation.

Neither problem is a magic trick that works from the open internet with no starting point. The first needs an admin login to the ADSS web interface. The second needs one of: a local administrator account on a managed computer, the ability to sit in the middle of the network traffic (a man-in-the-middle position), or physical access to a managed computer.

The product and the two features involved

ADSS has an admin panel, a web interface where administrators configure the product. One of the things they configure is the domain account: the username and password that ADSS itself uses when it needs to manage accounts in Active Directory. Because ADSS has to log in to Active Directory to do its job, it stores these credentials and uses them behind the scenes.

ADSS also has a thick client, a small program installed on each employee's computer (the "agent") that talks to the ADSS server (the "manager"). The thick client handles things like the password reset screen shown before the normal Windows login. When the manager wants to install or reinstall this client on a computer, it connects to that computer remotely and runs an installation command.

The two vulnerabilities live in these two places: the domain account configuration (first issue) and the endpoint the agent uses to report its status (second issue).

What you need before you start

The requirements are different for each issue.

For the command injection:

  1. A valid domain account (a normal account in Active Directory that you control).
  2. Admin access on the ADSS web interface.

For the broken access control, any one of these is enough:

  1. A local admin account on a managed computer, or a domain account that has local admin rights on that computer.
  2. A man-in-the-middle position on the network between a managed computer and the manager. In plain terms, you can see and modify the traffic going between them, for example because you control a router or a Wi-Fi access point they use.
  3. Physical access to a computer managed by the ADSS manager.

Which versions are affected

Version 6.1 build 6117 was proven to be affected. The researchers also tested 6.1 build 6105 and 6.1 build 6114. The code execution was fixed in 6.1 build 6123, and the broken access control was fixed in 6.1 build 6213.

A build is a specific compiled release of a product, identified by a number. Two builds of the same version can differ by a few fixes.

Timeline

Date Action
2022-01-07 Advisory sent to [redacted]
2022-04-13 Publication of version 6.1 build 6123
2022-09-26 Patch sent to Synacktiv
2022-09-30 Acknowledgment of the patch by Synacktiv
2022-12-15 Publication of version 6.1 build 6213
2023-01-16 Public release

An advisory is a formal notice describing a security problem, usually sent privately to the vendor first so they can fix it before the details become public. A patch is a small update that fixes a specific problem.

Finding the first issue: the password field

The first issue is in the admin panel, in the screen where the account ADSS uses to manage domain accounts is configured. The password typed there is not cleaned up (not sanitised), and special characters in it are interpreted when ADSS runs the remote installation command. A command line is a text instruction that the operating system's command interpreter reads and executes. If a password contains special characters that the interpreter treats as instructions, those characters are obeyed instead of being treated as part of the password.

Finding the second issue: the agent status endpoint

The second issue is in a web address (an endpoint) that managed computers use to report the result of thick client operations. An endpoint is simply a URL that a program can send a request to, like a page on a website, except that it returns data rather than a page for a human to read. The endpoint accepts a message saying "the thick client was uninstalled" without checking that the message really came from the managed computer. Anyone who can reach the endpoint can claim a client was uninstalled, and if automatic installation is configured the manager will react by reinstalling the client.

Exploitation, step by step

Step 1: Put a command into the domain account password

An administrator opens the domain configuration screen and changes the password of the controlled domain account. Instead of a normal password, they type this:

Text
& whoami > C:\rce.txt &

Line by line, in plain words:

  • & tells the Windows command interpreter to run the next command after this one finishes. It is a separator, not part of a password.
  • whoami is a built-in Windows command that prints the name of the user the current process is running as. It is a harmless way to prove that code runs and to see which account it runs under.
  • > redirects the output of the previous command into a file instead of the screen. So the output of whoami goes into a file called rce.txt on the C: drive.
  • The final & closes the sequence so that whatever comes after in the original command line still runs.

The command is executed on the server with the identity of the account used by the ADSS service. In other words, the server runs whoami as the ADSS service account, not as the attacker.

The same action is available through the API. An API is a way for programs to talk to each other over the web, using URLs and structured data, without a human clicking buttons. The following request carries the injection:

HTTP
POST /ServletAPI/domain/DomainSettings/updateDomainDetails HTTP/1.1
Host: [redacted]:9251
Cookie: JSESSIONIDADSSP=[redacted]

OPERATION=update&DOMAIN_PROPS=%7B%22DOMAIN_NAME%22%3A%[redacted].tld%22%2C
%22IS_AUTHENTICATION_REQUIRED%22%3A%22true%22%2C%22USER_DISTINGUISHED_NAME%22%3A%22toto
%22%2C%22PASSWORD%22%3A%22%26+whoami+%3E+C%3A%5C%5Crce.txt+%26%22%2C
%22DOMAIN_CONTROLLERS_NAME%22%3A%5B%22ZOHO-ADS.[redacted].tld%22%5D
%7D&adscsrf=fbfed74e-3348-4315-9086-e54afb83af3b

Line by line, in plain words:

  • POST /ServletAPI/domain/DomainSettings/updateDomainDetails HTTP/1.1 is the request line. POST means "I am sending data to the server". The path is the endpoint that updates domain settings. HTTP/1.1 is the version of the web protocol being used.
  • Host: [redacted]:9251 says which server and port the request is addressed to. Port 9251 is the port ADSS listens on in this setup.
  • Cookie: JSESSIONIDADSSP=[redacted] is a cookie. A cookie is a small piece of text that the browser stores and sends back with each request so the server can recognise the session. Here it holds the session identifier, which proves the request comes from a logged-in administrator. It is redacted because it is a secret: anyone holding it could act as that administrator.
  • The blank line separates the headers from the body.
  • OPERATION=update tells the server which action to perform.
  • DOMAIN_PROPS=... is a URL-encoded JSON object. JSON is a text format for structured data, with names and values. URL encoding replaces characters that are not allowed in a URL with % codes, for example %22 for a double quote and %7B for {. The object holds the domain name, the authentication flag, the distinguished user name, the password and the domain controller name.
  • %22PASSWORD%22%3A%22%26+whoami+%3E+C%3A%5C%5Crce.txt+%26%22 is the password field. Decoded, %26 is &, + is a space, %3E is >, %3A is :, %5C is a backslash. So the value is the & whoami > C:\rce.txt & payload.
  • adscsrf=fbfed74e-3348-4315-9086-e54afb83af3b is a CSRF token. CSRF stands for Cross-Site Request Forgery, an attack where a malicious website makes your browser send a request to another site while you are logged in. A CSRF token is a random value the server gives to the page and expects back, so a request coming from elsewhere will not have it. Here it is a UUID-style string.

Step 2: Force a thick client reinstallation

After the ADSS configuration has been modified, the attacker must force a reinstallation of the thick client on a remote computer. Why? Because the injected password is only used when ADSS actually runs the remote installation command. Until then, the malicious password just sits in the configuration.

During a classic reinstallation, the following command is executed:

Text
RemCom.exe \\POSTE-TEST /user:[redacted].tld\DomainAccountAdmin /pwd:Motdepasse123! "msiexec /x {E451B224-C4E6-452E-BB61-2EFD4DC79A9C} /norestart REBOOT=ReallySuppress /qn "

Line by line, in plain words:

  • RemCom.exe is a small tool that runs a command on a remote Windows computer.
  • \\POSTE-TEST is the name of the target computer. The double backslash is how Windows names a remote machine.
  • /user:[redacted].tld\DomainAccountAdmin is the account RemCom uses to log in to the target computer. The part before the backslash is the domain, the part after is the username.
  • /pwd:Motdepasse123! is the password for that account. This is the value that comes from the ADSS configuration, and therefore the value an attacker can control.
  • "msiexec /x {E451B224-C4E6-452E-BB61-2EFD4DC79A9C} /norestart REBOOT=ReallySuppress /qn " is the command to run on the remote computer. msiexec is the Windows installer. /x means uninstall. The long code in braces is the identifier of the installed program. /norestart and REBOOT=ReallySuppress stop Windows from rebooting. /qn means quiet, with no dialog boxes.

With the command injection, the command line becomes:

Text
RemCom.exe \\POSTE-TEST /user:[redacted].tld\DomainAccountAdmin /pwd:& whoami > C:\
rce.txt & "msiexec /x {E451B224-C4E6-452E-BB61-2EFD4DC79A9C} /norestart REBOOT=ReallySuppress /qn "

Line by line, in plain words:

  • The start is the same: RemCom.exe runs against \\POSTE-TEST with the same user.
  • /pwd: is followed immediately by &. The command interpreter sees the & and treats it as "end of this command, start a new one". So the password argument is effectively cut short.
  • whoami > C:\rce.txt is the injected command. It runs on the server, not on the remote computer.
  • The second & ends the injected command.
  • The original "msiexec ..." part still runs, so the reinstallation looks normal to anyone watching the remote computer.

The injected password breaks out of the /pwd: argument: the & characters terminate and restart the command, so whoami > C:\rce.txt runs alongside the intended RemCom.exe invocation. The command executed successfully.

To keep the previous web administrator's password and remain undetected, an attacker is able to first perform a database backup and restore it later. In plain words: the attacker saves a copy of the ADSS database before changing the domain account password, then restores that copy afterwards, so the configuration looks as it did before and the administrator's own password still works.

Step 3: An alternative trigger through the password synchronisation script

ADSS can also be configured to run a custom script in order to synchronise passwords and account lockout status with other providers. A script is a small program, usually a text file with commands in it, that the server runs when a certain event happens. Here the event is a password change or an account unlock. A malicious user with admin access to the web interface could force a malicious command into this feature.

If the attackers have access to a valid domain account, they could reset the password in order to trigger the code execution. Otherwise, they must wait for a user to reset their password or unlock their account. In plain words: the script only runs when something happens, so the attacker either causes that something (by resetting a password they control) or waits for a real user to do it.

Step 4: Fake an agent uninstallation

An attacker could simulate a client uninstallation on a machine by sending the following request:

HTTP
https://[redacted]:9251/AgentStatusUpdate.cc?status=adssp_admin_gina_uninstall_success&machineName=COMPUTERNAME&domainName=[redacted].tld

Line by line, in plain words:

  • https://[redacted]:9251/AgentStatusUpdate.cc is the endpoint. It is a URL, like a page address, but it is meant to be called by the agent program, not opened by a person.
  • ? starts the query string, the part of a URL that carries parameters.
  • status=adssp_admin_gina_uninstall_success claims that a GINA uninstallation succeeded. GINA is the old Windows component that shows the login screen; ADSS uses a custom GINA to show its own password reset screen before login. So this parameter says "the custom login screen was removed from this computer".
  • & separates parameters.
  • machineName=COMPUTERNAME identifies the computer. COMPUTERNAME is a placeholder for the real name.
  • domainName=[redacted].tld identifies the domain the computer belongs to.

If ADSS is configured for automatic thick client installation, the ADSS server manager will try to reinstall the client on the computer.

Step 5: Capture and relay the authentication

By intercepting the traffic between the manager and the computer, the attacker could intercept an NTLMv2 authentication. NTLMv2 is a Microsoft login protocol. Instead of sending the password, the client proves it knows the password by sending a value derived from it, called a hash. The server checks the hash. The hash is not the password, but it can be used in some attacks without knowing the password.

By impersonating the computer they could try to perform NTLM relay attacks on the network. A relay attack is like a messenger who takes a sealed letter from one person and delivers it to a different recipient, pretending to be the original sender. The attacker does not open the letter (does not crack the hash); they just forward the authentication to another service that accepts it.

For instance, with a network capture, it is possible to extract the NTLMv2 hash using NTLMRawUnHide:

Bash
$ python3 NTLMRawUnHide.py -q -i installation.pcapng
Searching installation.pcapng for NTLMv2 hashes...
[redacted].tld\DomainAccountAdmin::ZOHO-ADS:d296a208c6175187:d7[...]d0:01[...]00

Line by line, in plain words:

  • $ is the shell prompt; it just shows that a command follows.
  • python3 NTLMRawUnHide.py -q -i installation.pcapng runs a Python script called NTLMRawUnHide.py. -q means quiet, with less output. -i installation.pcapng tells it to read a capture file called installation.pcapng. A pcapng file is a recording of network traffic, like a tape recording of a conversation.
  • Searching installation.pcapng for NTLMv2 hashes... is the tool's progress message.
  • [redacted].tld\DomainAccountAdmin::ZOHO-ADS:d296a208c6175187:d7[...]d0:01[...]00 is the extracted hash. The parts are: the domain and username, then the target server name (ZOHO-ADS), then several hexadecimal values that make up the NTLMv2 response. The [...] marks where the report shortened the value.

Furthermore, a local admin user could extract the password or the hash of the domain account from lsass process memory. lsass is the Windows process that handles logins; it keeps credentials in memory while users are logged in. A local administrator can read that memory.

Text
PS C:\> mimikatz.exe "sekurlsa::logonpasswords full" exit
[...]
msv :
	[00000003] Primary
	* Username : DomainAccountAdmin
	* Domain : DOMAIN
	* NTLM     : 4ba5321[...]d1aac85
	* SHA1     : fbe8b120[...]79b7c27
	* DPAPI    : a29d2cd9[...]654f63bf5

Line by line, in plain words:

  • PS C:\> is the PowerShell prompt, showing that the command is run from PowerShell on the C: drive.
  • mimikatz.exe is a well-known tool that reads credentials from Windows memory.
  • "sekurlsa::logonpasswords full" is the mimikatz command that lists logon credentials. sekurlsa is the module that reads lsass memory; logonpasswords is the action; full asks for all available details.
  • exit closes mimikatz after the command.
  • [...] marks omitted output.
  • msv : is the section for Microsoft authentication data.
  • [00000003] Primary labels the primary credential set.
  • * Username : DomainAccountAdmin and * Domain : DOMAIN identify the account.
  • * NTLM : 4ba5321[...]d1aac85 is the NTLM hash of the password.
  • * SHA1 : fbe8b120[...]79b7c27 is a SHA1 hash of the password.
  • * DPAPI : a29d2cd9[...]654f63bf5 is a DPAPI key, used by Windows to protect stored secrets.

Why the problems exist

The command injection exists because the password field is not sanitised before being embedded in a command line. Sanitising means removing or escaping characters that have a special meaning, so that user input is always treated as data and never as instructions. The recommendation states that the password field should be sanitised and that the usage of Runtime.getRuntime().exec() prevents command injections. Runtime.getRuntime().exec() is a Java method for running external programs; the point is that when a program is run this way, the arguments should be passed as a list rather than as one long string, so the operating system does not re-interpret special characters. The password synchronisation feature should only be accessible for an action on the local server, meaning it should not be reachable from the web interface at all.

The broken access control exists because the uninstallation of the thick client is not validated on the solution manager: any party able to reach the endpoint can claim that a client was uninstalled, and the manager reacts by reinstalling the client, which produces authentication traffic an attacker can capture.

What an attacker can do with these issues

With admin access to the web interface, an attacker can execute commands on the server with the identity of the account used by the ADSS service, either through the domain account password or through the password synchronisation script. The second path requires either a valid domain account to reset a password, or waiting for a user to reset their password or unlock their account. An attacker can also back up and restore the database to keep the previous web administrator's password and remain undetected.

With a local admin account on a managed computer, a man-in-the-middle position, or physical access to a managed computer, an attacker can trigger a reinstallation and intercept an NTLMv2 authentication, then attempt NTLM relay attacks on the network. A local admin can also extract the password or hash of the domain account from lsass process memory.

How it was fixed

The code execution was fixed in version 6.1 build 6123 and the broken access control in version 6.1 build 6213. The advisory recommends sanitising the password field, avoiding Runtime.getRuntime().exec() for this purpose, and restricting the password synchronisation feature to an action on the local server. For the access control issue, it recommends validating the uninstallation of the thick client on the solution manager via a shared secret. A shared secret is a value that both sides know and nobody else does, like a password agreed in advance; it proves the message really came from the managed computer. It must be protected on the client machine and accessible only by administrators.

Things worth testing on other setups

  1. Other admin fields that end up in command lines (domain controller names, distinguished names, script paths): submit a value containing &, | or > and check whether a file appears or a command runs on the server.
  2. The password synchronisation Post Action on other builds: configure a command and trigger a password reset, then check whether the command runs with the service account's identity.
  3. The agent status endpoint on other deployments: send a fake uninstallation with a machineName you control and see whether the manager initiates a reinstallation and authentication towards it.
  4. NTLM relay from the captured authentication: relay the intercepted NTLMv2 authentication to another service and check whether it is accepted.
  5. Database backup and restore around the injection: check whether an attacker can back up the database before the change and restore it afterwards to keep the previous web administrator's password.

Glossary

  • ADSS: ManageEngine ADSelfService Plus, a self-service password management and single sign-on product for Active Directory and cloud apps.
  • Active Directory: Microsoft's directory service that stores user accounts, passwords and permissions inside a company network.
  • Admin panel: the web interface where administrators configure a product.
  • Advisory: a formal notice describing a security problem, usually sent to the vendor before public release.
  • API: a way for programs to talk to each other over the web using URLs and structured data, without a human clicking buttons.
  • Broken access control: a flaw where the server does not check who is allowed to perform an action, so anyone who can reach the endpoint can do it.
  • Build: a specific compiled release of a product, identified by a number.
  • Code execution / RCE: a flaw that lets an attacker make a server run programs of their choosing.
  • Command line: a text instruction that the operating system's command interpreter reads and executes.
  • Cookie: a small piece of text a browser stores and sends back with each request so the server can recognise the session.
  • CSRF token: a random value the server gives to a page and expects back, so a request coming from another site will not have it.
  • DPAPI: a Windows mechanism for protecting stored secrets.
  • Endpoint: a URL that a program can send a request to, returning data rather than a page for a human.
  • GINA: the old Windows component that shows the login screen; ADSS uses a custom one to show its password reset screen before login.
  • Hash: a value derived from a password that proves knowledge of it without sending the password itself.
  • JSON: a text format for structured data, with names and values.
  • lsass: the Windows process that handles logins and keeps credentials in memory while users are logged in.
  • Man-in-the-middle: a position on the network where an attacker can see and modify traffic between two parties.
  • msiexec: the Windows installer program.
  • NTLMv2: a Microsoft login protocol where the client proves it knows the password by sending a hash.
  • NTLM relay: an attack where the attacker forwards an authentication to another service, without cracking the hash.
  • Patch: a small update that fixes a specific problem.
  • pcapng: a file format for recordings of network traffic.
  • Query string: the part of a URL after ? that carries parameters.
  • RemCom: a small tool that runs a command on a remote Windows computer.
  • Sanitising: removing or escaping characters that have a special meaning, so user input is always treated as data.
  • Script: a small program, usually a text file with commands, that the server runs when an event happens.
  • Shared secret: a value both sides know and nobody else does, used to prove a message really came from the expected sender.
  • Thick client: a small program installed on each employee's computer that talks to a central server.
  • URL encoding: replacing characters that are not allowed in a URL with % codes, for example %22 for a double quote.

More from Zoho (ManageEngine)

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.