Skip to content
Misconfiguration Write-up Beginner

Accessing PowerShell in Restricted VDI Environment — VDI Pentesting

In a locked-down virtual desktop environment where command prompt and PowerShell were blocked, the author found that the PowerShell executable could still be launched indirectly through Notepad's file-open dialog. This let a user run PowerShell commands despite the intended restrictions.

medium.com

Published on medium.com

This is my first blog and today I am going to share one of my ways by which I was able to access PowerShell in an restricted VDI environment. Before proceeding let’s understand what a Virtual Desktop Infrastructure (VDI) environment is.

Nilay Sheth, on 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 restriction blocked PowerShell and CMD by name or shortcut but did not prevent the PowerShell executable from being launched through another application's file-open dialog.

Impact

A user in a restricted VDI could run PowerShell commands that the environment was meant to block, though the text does not show what further access this gave.

What the attacker needed

Access to a restricted VDI desktop; Notepad available in the VDI

How it was found

  1. Open Notepad and use File > Open to get the browse window.
  2. Type the PowerShell installation folder path into the File name field and press Enter.
  3. Switch the view to show all files in that folder.
  4. Right-click the PowerShell ISE executable and choose open.
  5. Use the script pane in PowerShell ISE to write and run PowerShell code.

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 virtual desktop is a remote computer image that an organisation controls tightly, often blocking programs like PowerShell (a scripting tool) so users cannot run arbitrary commands. Here the block only covered the obvious ways of starting PowerShell, not every way. By opening Notepad and using its file browser to reach the PowerShell folder, the author could start the tool anyway.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.