Skip to content
File upload Write-up Intermediate

[Relevant] — Windows Server 2016 Exploitation via IIS Enumeration, Credential Disclosure, and Privilege Escalation

An SMB share allowed unauthenticated access and contained a file with Base64-encoded credentials. After decoding them, the attacker logged in as a valid user, uploaded an ASPX web shell to the same share, and executed it through IIS to gain a reverse shell, then escalated to SYSTEM.

Bash Overflow Follow

Published on infosecwriteups.com

Windows Server 2016 is a Microsoft server operating system built on the Windows NT 10.0 kernel, commonly deployed to provide directory services, file sharing, web hosting, and application backends in enterprise environments.

Bash Overflow, on infosecwriteups.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 an SMB share was misconfigured to allow anonymous read access and also permitted authenticated write access, while the same directory was served by IIS with ASPX execution enabled.

Impact

An attacker could read credentials from an open share, upload and execute code through IIS, and escalate to full administrative (SYSTEM) control of the server.

What the attacker needed

Network access to SMB and IIS; no credentials needed for the share

How it was found

  1. Scan the target with Nmap to find IIS and SMB services.
  2. Fuzz IIS directories on the default port and on port 49663, finding no useful content.
  3. List SMB shares and find the nt4wrksv share accessible without authentication.
  4. Download passwords.txt from the share and decode the Base64 credentials.
  5. Log in to the share as Bob, upload a test ASPX file, and confirm it executes via the browser.
  6. Upload an ASPX reverse shell, trigger it through the browser, and run getsystem to reach SYSTEM.

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 file share on the server was open to anyone, and it held a file with scrambled passwords. The attacker unscrambled them, logged in as a normal user, and placed a malicious web page on the share. Because the web server also served that share, visiting the page ran the attacker's code and gave them control of 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 Bash Overflow

View all

35 more disclosed reports, 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.