repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
escape-breakout.mdMarkdown189 lines7.6 KiBsource raw download

title: "Kiosk Escape and Jail Breakout" section: "Cheatsheets" sectionSlug: "cheatsheets" sourcePath: "docs/cheatsheets/escape-breakout.md" sourceUrl: "https://github.com/swisskyrepo/InternalAllTheThings/blob/203bb0c0b290/docs/cheatsheets/escape-breakout.md" sha: "203bb0c0b290" isIndex: false#

Kiosk Escape and Jail Breakout#

Summary#

Tools#

Methodology#

Gaining a command shell#

Sticky Keys#

Dialog Boxes#

Creating new files#

Open a new Windows Explorer instance#

Exploring Context Menus#

Save as#

Input Boxes#

Many input boxes accept file paths; try all inputs with UNC paths such as //attacker–pc/ or //127.0.0.1/c$ or C:\

Bypass file restrictions#

Enter . or *.exe or similar in File name box

Internet Explorer#

Download and Run/Open#

Accessing filesystem#

Enter these paths in the address bar:

Unassociated Protocols#

It is possible to escape a browser based kiosk with other protocols than usual http or https. If you have access to the address bar, you can use any known protocol (irc, ftp, telnet, mailto, etc.) to trigger the open with prompt and select a program installed on the host. The program will than be launched with the uri as a parameter, you need to select a program that will not crash when recieving it. It is possible to send multiple parameters to the program by adding spaces in your uri.

Note: This technique required that the protocol used is not already associated with a program.

Example - Launching Firefox with a custom profile:

This is a nice trick since Firefox launched with the custom profile may not be as much hardened as the default profile.

  1. Firefox need to be installed.
  2. Enter the following uri in the address bar: irc://127.0.0.1 -P "Test"
  3. Press enter to navigate to the uri.
  4. Select the firefox program.
  5. Firefox will be launched with the profile Test.

In this example, it's the equivalent of running the following command:

firefox irc://127.0.0.1 -P "Test"

Shell URI Handlers#

A URI (Uniform Resource Identifier) handler is a software component that enables a web browser or operating system to pass a URI to an appropriate application for further handling.

For example, when you click on a "mailto:" link in a webpage, your device knows to open your default email application. This is because the "mailto:" URI scheme is registered to be handled by an email application. Similarly, "http:" and "https:" URIs are typically handled by a web browser.

In essence, URI handlers provide a bridge between web content and desktop applications, allowing for a seamless user experience when navigating between different types of resources.

The following URI handlers might trigger application on the machine:

References#