Context
During an engagement, we achieved remote code execution (RCE) on an IIS web server through an unrestricted file upload vulnerability. We initially uploaded a web shell and then sent ourselves a reverse shell to further enumerate the system in an attempt to escalate privileges. We tried to use PowerShell to transfer PowerUp.ps1 (a PowerShell script for enumerating privilege escalation vectors), but PowerShell is blocked by the Application Control Policy. We performed our local enumeration manually and discovered that we had SeImpersonatePrivilege. We needed to transfer a binary to our target machine to escalate privileges using the PrintSpoofer tool. Next, we tried to use Certutil to download the file we had compiled ourselves directly from our own GitHub, but the organization had strict web content filtering in place. We could not access websites such as GitHub, Dropbox, Google Drive, etc., which can be used to transfer files. We then set up an FTP server and tried to use the Windows FTP client to transfer files, but the network firewall blocked outbound traffic on port 21 (TCP). We tried using the Impacket smbserver tool to create a share and found that outbound traffic to TCP port 445 (SMB) was allowed. We used this file transfer method to successfully copy the binary to our target machine and achieve our goal of escalating privileges to an administrative-level user.
In This Module