sandboxie-plus / Sandboxie

Sandboxie Plus & Classic
https://Sandboxie-Plus.com
GNU General Public License v3.0
13.78k stars 1.53k forks source link

[1.0.22] BreakoutProcess option does not work when executed directly from an unsandboxed explorer or cmd #1883

Open SiNONiMiTY opened 2 years ago

SiNONiMiTY commented 2 years ago

What happened?

BreakoutProcess option only works when a program already running in a sandbox spawns the indicated program.

But it doesn't work when executed from explorer.

I will be using 3 boxes althroughout the scenarios, indicating the important config sections from each box: . . .

DefaultBox (Hardened)

ForceFolder=D:\Downloads
BreakoutProcess=firefox.exe

MozillaFirefox (Hardened)

Template=Firefox_Force
OpenFilePath=firefox.exe,%APPDATA%\Mozilla\Firefox
OpenFilePath=firefox.exe,%LOCALAPPDATA%\Mozilla\Firefox
OpenFilePath=firefox.exe,D:\Downloads

EpicGames (Standard)

BreakoutProcess=firefox.exe

. . .

Scenario 1 Epic Games is already running under "EpicGames" sandbox and I clicked a link from the Epic Games Launcher that will open the default browser, in my case it is Firefox. Since firefox.exe is set as a BreakoutProcess, it should open on the MozillaFirefox sandbox. This is working properly. . . . Scenario 2 In my Downloads folder, I have a PDF document, associated to open with Firefox. When I double-click on it, I am expecting for it to open on the MozillaFirefox sandbox, but, it opens on the DefaultBox. This is not working properly.

Open the PDF file in Explorer image

This will open a firefox.exe process on the DefaultBox image

And, a lot of child processes on MozillaFirefox image

This will also cause a major system slowdown until you terminate all the processes in DefaultBox and MozillaFirefox . . . Scenario 3 Same goal as Scenario 2, but I won't be executing from Explorer, this time, I executed the PDF document on cmd by opening a cmd window on the downloads folder. The document will be opened on firefox that is running under the MozillaFirefox sandbox. Notice the yellow border, this indicates that this cmd window is already running inside the default box before it spawned firefox.exe This is working properly. image . . . Scenario 4 Same goal as Scenario 3, but this time, the cmd window is unsandboxed. This fails like with the Scenario 2. image

Download link

N/A

To Reproduce

No response

Expected behavior

N/A

What is your Windows edition and version?

Windows 10 Pro Education 21H2 x64 (19044.1706)

In which Windows account you have this problem?

A local or Microsoft account without special changes.

Please mention any installed security software

Windows Defender

What version of Sandboxie are you running?

1.0.22

Is it a regression?

No response

List of affected browsers

No response

In which sandbox type you have this problem?

Not relevant to my request.

Where is the program located?

Not relevant to my request.

Can you reproduce this problem on an empty sandbox?

Not relevant to my request.

Did you previously enable some security policy settings outside Sandboxie?

No response

Crash dump

No response

Trace log

No response

Sandboxie.ini configuration

No response

Related issue

1268

soleera commented 1 year ago

Can confirm this issue still exists, specifically when opening files directly in explorer using default programs, or when using context menu entries (e.g. "Open with Code"), however selecting "Open with..." and choosing the program manually works as expected.

github-actions[bot] commented 11 months ago

As it has been 3 months since the last activity, we are automatically closing this issue in 14 days. If it is still present, please respond to help us investigate on newer Sandboxie versions. Thank you for your contribution!