πŸšͺCitrix Breakout

🎯 Overview

Citrix Breakout involves escaping restricted virtualization environments such as Terminal Services, Citrix, AWS AppStream, CyberArk PSM, and Kiosk environments. These platforms implement lock-down measures to minimize security impact, but breakout techniques can bypass these restrictions to gain command execution and privilege escalation.

πŸ”“ Basic Breakout Methodology

Three-Step Process

1. Gain access to a Dialog Box
2. Exploit the Dialog Box to achieve command execution  
3. Escalate privileges to gain higher levels of access

Environment Characteristics

# Highly restrictive environments typically have:
- No cmd.exe/powershell.exe in Start Menu
- Blocked access to C:\Windows\system32 via File Explorer
- Group policy restrictions on directory browsing
- File Explorer access restrictions to sensitive paths

πŸ“‚ Bypassing Path Restrictions

Dialog Box Methodology

MS Paint Dialog Box Example

UNC Path Technique

🌐 SMB Share Access from Restricted Environment

Setting up SMB Server

Accessing SMB Share via Dialog Box

Custom Breakout Binary

πŸ› οΈ Alternate File System Tools

Explorer++ Bypass

Alternative File Managers

πŸ—οΈ Alternate Registry Editors

Registry Editor Bypass

Registry Editor Features

πŸ”— Modifying Existing Shortcuts

Shortcut Hijacking Process

Creating New Shortcuts

πŸ“ Script Execution Bypass

Batch File Method

Script Extension Exploitation

πŸ”Ί Privilege Escalation in Citrix

AlwaysInstallElevated Discovery

PowerUp MSI Exploitation

User Creation via MSI

Runas for New User Context

πŸ›‘οΈ UAC Bypass

UAC Bypass Necessity

Bypass-UAC Script Usage

Verification of Bypass

🎯 HTB Academy Lab Solutions

Lab Environment

Lab 1: User Flag (pmorgan Downloads)

Lab 2: Administrator Flag

πŸ”„ Complete Attack Chain

Comprehensive Breakout Process

πŸ› οΈ Required Tools

Essential Breakout Tools

⚠️ Detection & Defense

Detection Indicators

Defensive Measures

πŸ’‘ Key Takeaways

  1. Dialog boxes provide powerful bypass mechanisms for restricted environments

  2. UNC paths can circumvent File Explorer restrictions

  3. Alternative tools (Explorer++, registry editors) bypass group policy

  4. SMB shares enable tool transfer and execution in restricted environments

  5. MSI exploitation with AlwaysInstallElevated provides reliable privilege escalation

  6. UAC bypass is often necessary even with admin users

  7. Script execution (.bat, .vbs, .ps1) can provide multiple breakout vectors


Citrix breakout techniques exploit the inherent trust in application dialog boxes and file interaction features to escape restricted virtualization environments and achieve privilege escalation.

Last updated