Skip to content
RCE Write-up Advanced

A 3D Printed Shell

The Repetier-Server software allowed an attacker to upload files with arbitrary content and use directory traversal to write an external command configuration file, which could then be executed by the server. Chaining these flaws enabled remote code execution with SYSTEM privileges on the Windows host.

securifera.com

Published on securifera.com

The original lives on securifera.com

We do not hold its text, 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 application failed to validate file paths and content in multiple upload and configuration features, allowing directory traversal and execution of attacker-supplied commands.

Impact

An attacker could remotely execute arbitrary commands with SYSTEM privileges on the Windows server, but exploitation required a service restart or system reboot, which the attacker had to wait for.

What the attacker needed

Network access to the web interface; ability to upload files; service restart or system reboot

The fix

The vendor patched the software and released an update.

How it was found

  1. Upload a file with arbitrary content to the watermark feature, bypassing the client-side extension check.
  2. Create a new printer with a name containing directory traversal to write a configuration file to the extcommands directory.
  3. Use the replace printer configuration feature to upload a crafted XML file that passes validation for both printer and external command configurations, adding an external command.
  4. Use the remote file system enumeration feature to confirm the file was written.
  5. Wait for the service or system to restart, then execute the external command to run arbitrary system commands via the watermark file.

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 is about a web application that manages 3D printers. The software let users upload files and create printer configurations, but it did not properly check where files were saved or what they contained. An attacker could abuse these features to place a malicious file that the server would later run as a command, giving full control of the computer.

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.