Skip to content
RCE Write-up Advanced

Unauthenticated File/Backup Download

The Lepide AD Self-Service web application allows an unauthenticated user to download an encrypted backup file, which is encrypted with a static key that can be extracted from the application code. After decryption, the attacker obtains administrative credentials and can then exploit a command injection vulnerability in the SMS gateway settings to execute commands as NT AUTHORITY\SYSTEM.

krbtgt.pw

Published on krbtgt.pw

This blog post discloses 2 individual bugs that are being chained in order to achieve unauthenticated remote command execution. This command execution is most likely going to happen directly on a Active Directory Domain Controller or on a server with a Technical AD account with privileged access.

The author, on krbtgt.pw

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.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the backup function lacks an authentication check, and the encryption keys are hard-coded in the application source code; additionally, the SMS test function fails to sanitise user input before using it in a command line.

Impact

An unauthenticated attacker could download and decrypt a backup to obtain administrative credentials, then exploit a command injection to execute arbitrary commands as NT AUTHORITY\SYSTEM, potentially compromising the Active Directory domain.

What the attacker needed

Network access to the LADSS web interface; No authentication required for backup download; Ability to extract and decrypt the backup file; Valid administrative credentials obtained from backup

The fix

The text does not state a fix; workarounds include blocking access to the backup endpoint via WAF and restricting access to the application behind a VPN.

How it was found

  1. Extract the ROOT.war file to access the application source code.
  2. Identify the Backup function in com.lepide.action.EnrollmentNotificationAction.class which lacks session validation.
  3. Send an HTTP request to the backup endpoint without any cookies to download the encrypted backup file.
  4. Decrypt the backup using the static DES key 'piechidelta' and AES key 'TheBestSecretKey' found in the code.
  5. Extract administrative credentials and domain controller IP from the decrypted database.
  6. Log in to the administrative interface using the extracted credentials.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This report describes two security holes in a web application. First, anyone can download a backup file without logging in, and because the file is encrypted with a hard-coded password that is easy to find in the code, an attacker can read sensitive data like admin usernames and passwords. Second, after logging in with those stolen credentials, an attacker can trick the application into running harmful commands on the server, giving them full control.

What is RCE?

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

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.