# Kiosk Breakout

* <http://www.ikat.kronicd.net/>

## Windows

* <https://www.pentestpartners.com/security-blog/breaking-out-of-citrix-and-other-restricted-desktop-environments/>
* <https://www.trustedsec.com/blog/kioskpos-breakout-keys-in-windows/>
* <https://habr.com/ru/company/dsec/blog/505600/>

Navigating with environment variables and `shell` directive:

| ENV                            | Location                                                       |
| ------------------------------ | -------------------------------------------------------------- |
| `%HOMEDRIVE%`, `%SystemDrive%` | "C:\\"                                                         |
| `%WINDIR%`, `%SystemRoot%`     | "C:\Windows"                                                   |
| `%PROGRAMFILES%`               | "C:\Program Files"                                             |
| `%COMSPEC%`                    | "C:\Windows\System32\cmd.exe"                                  |
| `%COMMONPROGRAMFILES%`         | "C:\Program Files\Common Files"                                |
| `%HOMEPATH%`, `%USERPROFILE%`  | "C:\Documents and Settings\Username"                           |
| `%ALLUSERSPROFILE%`            | "C:\Documents and Settings\All Users"                          |
| `%PROGRAMFILES(X86)%`          | "C:\Program Files (x86)" (only in 64-bit version)              |
| `%APPDATA%`                    | "C:\Documents and Settings\Username\Application Data"          |
| `%TEMP%`, `%TMP%`              | "C:\Documents and Settings\Username\Local Settings\Temp"       |
| `%COMMONPROGRAMFILES(x86)%`    | "C:\Program Files (x86)\Common Files" (only in 64-bit version) |

| Command                | Location                          |
| ---------------------- | --------------------------------- |
| shell:System           | "C:\Windows\System32"             |
| shell:Downloads        | Current user's "Downloads" folder |
| shell:MyComputerFolder | "This PC" window                  |

## Linux

### gtkdialog

HTLM-based pseudo terminal emulator (useful when there's no other terminal apps available):

{% code title="shell.html" %}

```html
<window>
	<vbox>
		<vbox scrollable="true" width="500" height="400">
			<edit>
				<variable>CMDOUTPUT</variable>
				<input file>/tmp/termout.txt</input>
			</edit>
	</vbox>
	<hbox>
		<text><label>Command:</label></text>
		<entry><variable>CMDTORUN</variable></entry>
		<button>
				<label>Run</label>
				<action>$CMDTORUN > /tmp/termout.txt 2>&1</action>
				<action>refresh:CMDOUTPUT</action>
			</button>
	</hbox>
	</vbox>
</window>
```

{% endcode %}

The shell can be invoked with `/usr/bin/gtkdialog -f shell.html`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ppn.snovvcra.sh/pentest/infrastructure/kiosk-breakout.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
