Skip to content
Access control Write-up Intermediate

Serv-U FTP: Privilege Escalation to Remote Code Execution

A lower-privileged domain administrator could bypass restrictions by importing a crafted CSV file that defined an event to execute commands, leading to remote code execution as SYSTEM. An attacker with domain administrator access could upload an executable and trigger a reverse shell, compromising the server.

initblog.com

Published on initblog.com

I found an interesting way to achieve remote code execution on a recent test. I ended up submitting a detailed description of manual exploitation to the vendor, and I thought it might be interesting to share here.

initstring, on initblog.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.

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 CSV import function did not validate that the importing user had permission to define events that execute commands, allowing privilege escalation.

Impact

An authenticated domain administrator could execute arbitrary commands as SYSTEM, leading to complete compromise of the server.

What the attacker needed

Authenticated as domain administrator; access to web interface; ability to upload files

The fix

The vulnerability was fixed in Serv-U 15.1.6 Hotfix 2.

How it was found

  1. Log in to the web interface as a domain administrator.
  2. Upload an executable to the home directory.
  3. Export the user list to a CSV file.
  4. Edit the CSV to add a new user with an event that executes a command.
  5. Import the modified CSV back into the application.
  6. Trigger the event by testing it or logging in as the new user.

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.

In Serv-U FTP, some administrators are not allowed to run programs on the server. The report shows that by exporting a list of users, editing it to include a hidden command, and importing it back, a lower-level admin could make the server run their program. This gave them full control of the machine.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.