Skip to content
File upload Write-up Advanced

How I Escalated a Dorm Payment Portal into a Full DMZ Compromise Part 2

A student housing portal accepted uploaded files with only a weak MIME check, so the author uploaded a server-side handler disguised as an image and gained command execution on the web server. From there they tunnelled traffic over HTTP to reach internal hosts in the DMZ.

kkonann Follow

Published on kkonann.medium.com

The Escalation: Building on the Infra Table Goldmine If you caught Part 1, you know we snagged that juicy infra table via SQLi on the student portal. It was packed with internal server creds, IPs, and configs — basically a roadmap to the university’s underbelly.

KonaN, on kkonann.medium.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 upload form trusted the client-supplied MIME type and did not validate file contents or block executable handler extensions.

Impact

The author gained command execution on the DMZ web server and could tunnel HTTP to reach internal hosts, though a network appliance blocked some commands and only web ports were reachable externally.

What the attacker needed

Access to the housing portal upload form; ability to reach the uploaded file

How it was found

  1. Upload a file disguised as an image or PDF to pass the MIME check.
  2. After server-side shells were deleted, upload a handler file with a less-monitored extension instead.
  3. Request the uploaded handler to run operating system commands on the server.
  4. Upload and run a web-based terminal tool to get an interactive session.
  5. Upload a custom tunnel handler and run a local proxy to relay traffic over HTTP.

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.

A web server can be told to run certain uploaded files as programs rather than just store them. Here the upload form only glanced at the file's declared type, so a program was smuggled in looking like a picture, and the server then ran it on request. That gave the attacker a command prompt on the machine.

What is File upload?

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.

More by kkonann

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.