Sandboxie could cause a sandboxed app fail to reset its registry settings

Please post your problem description here

Moderator: Barb@Invincea

Post Reply
sbf
Posts: 11
Joined: Tue Mar 06, 2018 1:38 pm

Sandboxie could cause a sandboxed app fail to reset its registry settings

Post by sbf » Tue Mar 06, 2018 3:06 pm

Win 7 32-bit.
Sandboxie v5.22 32-bit.
EmEditor (Latest version).
Tested on a "naked" OS.

For example, EmEditor has a command: Reset All Settings, which removes all its registry data (along with the files for settings) and restarts the app.

However, in a Sandboxie sandbox, EmEditor can never reset its registry settings. When restarted, it uses the old window size and position, for example.

I guess the procedure is:
The sandboxed EmEditor did remove its sandboxed registry data. But as it restarts, Sandboxie fetches the old registry data from outside.

FYI,
Comodo sandbox does not have such a problem. It seems Comodo sandbox adds a mark for the removed registry data:
Type: 0x39c0
Data: (zero-length binary value)
Last edited by sbf on Tue Mar 06, 2018 4:00 pm, edited 1 time in total.

Barb@Invincea
Sandboxie Support
Sandboxie Support
Posts: 2821
Joined: Mon Nov 07, 2016 3:10 pm

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Post by Barb@Invincea » Tue Mar 06, 2018 3:20 pm

Hello sbf ,

Please provide the required information:
viewtopic.php?f=11&t=19746

According to the devs, if you delete a key in Sbie, it will be deleted --> not read from host.
If you clear the sandbox, it will be read from host instead. Are you clearing the contents of your Sandbox?

Regards,
Barb.-

Curt@invincea
Sandboxie Lead Developer
Sandboxie Lead Developer
Posts: 1661
Joined: Fri Jan 17, 2014 5:21 pm
Contact:

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Post by Curt@invincea » Tue Mar 06, 2018 3:54 pm

sbf wrote:
Tue Mar 06, 2018 3:06 pm
FYI,
Comodo sandbox does not have such a problem. It seems Comodo sandbox adds a mark for the removed registry data:
Sandboxie does the same thing.

sbf
Posts: 11
Joined: Tue Mar 06, 2018 1:38 pm

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Post by sbf » Tue Mar 06, 2018 4:04 pm

Barb@Invincea wrote:
Tue Mar 06, 2018 3:20 pm
Are you clearing the contents of your Sandbox?
No.
EmEditor resets and restarts at once.
Hope you give it a test on EmEditor.

Barb@Invincea
Sandboxie Support
Sandboxie Support
Posts: 2821
Joined: Mon Nov 07, 2016 3:10 pm

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Post by Barb@Invincea » Tue Mar 06, 2018 4:25 pm

Hello sbf ,

In order to test this behavior I need to know what are you doing, exactly.
Please provide repro steps, include any workspaces you may be using, changes you are looking at, and how are you resetting the application.

Regards,
Barb.-

sbf
Posts: 11
Joined: Tue Mar 06, 2018 1:38 pm

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Post by sbf » Tue Mar 06, 2018 5:27 pm

OK. Thank you.

Install EmEditor (Installer version, which will use the registry).
Run EmEditor outside (with default settings). Change its window size/position.
(Restart EmEditor. It should use the changed size/position.)

Run EmEditor in a sandbox.
Use the menu: Tools > All Commands.
Then in the (All Commands) popup menu: Tools > Reset All Settings.
Follow the prompts.

After restarted, EmEditor should use the default window size/position (if you don't have my issue).

Barb@Invincea
Sandboxie Support
Sandboxie Support
Posts: 2821
Joined: Mon Nov 07, 2016 3:10 pm

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Post by Barb@Invincea » Wed Mar 07, 2018 1:43 pm

Hello sbf,

I see the behavior. The window size is still remembered, even after using "Reset all settings".
I have made the devs aware.

As a workaround you can add the following entry under the desired Sandbox:
Open Sandboxie Control
Configure --- > Edit configuration
Find the Sandbox you wish to modify and add this at the end:
WriteKeyPath=HKEY_CURRENT_USER\Software\EmSoft

Save the changes.
Configure--> Reload configuration
Re-try launching your program Sandboxed and resetting all settings.

Here's more info regarding the WriteKeyPath setting:
https://www.sandboxie.com/WriteKeyPath
https://www.sandboxie.com/ResourceAccessSettings#key

Regards,
Barb.-

sbf
Posts: 11
Joined: Tue Mar 06, 2018 1:38 pm

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Post by sbf » Thu Mar 08, 2018 6:45 am

Thanks for the info. I see.

I'm curious about the reason of the issue. Could you please explain it a little?

sbf
Posts: 11
Joined: Tue Mar 06, 2018 1:38 pm

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Post by sbf » Mon May 21, 2018 8:57 am

Hi again,

Is this a "global" issue that affects any app?

For example,
My default browser is not IE.
I tried setting IE as default in a sandbox via "Internet Options" dialog:
Image

Click "Make default" and the button is disabled.
But close and open the dialog again. The button is enabled again.

And, if the "Tell me if ..." option is turned on, IE will prompt every time it starts, though it Is the default browser already in the sandbox.

Guest10
Posts: 5135
Joined: Sun Apr 27, 2008 5:24 pm
Location: Ohio, USA

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Post by Guest10 » Mon May 21, 2018 10:12 am

sbf wrote:
Tue Mar 06, 2018 3:06 pm
However, in a Sandboxie sandbox, EmEditor can never reset its registry settings. When restarted, it uses the old window size and position, for example.
This is the expected behaviour. Sandboxie not only keeps copies of changed files inside of the sandbox, unless an exclusion setting allows them out, but it also keeps registry changes confined to the sandbox - unless an exclusion is set at:
Sandbox Settings > Resource Access > Registry Access
I would use "Direct Access" (OpenKeyPath).
Look at templates.ini in Sandboxie's Program Files folder, and you will see plenty of OpenKeyPath settings used in the pre-defined templates.

Registry changes for the sandboxed program are kept in the Reghive files, inside of the sandbox. So any Registry changes that are made by the sandboxed program stays in those files, and is deleted when the sandbox contents are deleted.
The Reghive is mounted to the "real" Registry whenever the sandbox is in use, and dismounted when the sandbox is not in use.

You can examine the Registry changes by using the Registry Editor (regedit.exe) while the sandbox is in use, at:
HKEY_USERS\Sandbox_...
Paul
Win 10 Home 64-bit (w/admin rights) - Zone Alarm Pro Firewall, MalwareBytes Premium A/V, Firefox, Thunderbird
Sandboxie user since March 2007

sbf
Posts: 11
Joined: Tue Mar 06, 2018 1:38 pm

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Post by sbf » Tue May 22, 2018 1:27 am

@Guest10
Thank you for the reply but please read through the whole thread to get what we are talking about exactly.
And please compare it with Comodo sandbox if available.

Barb@Invincea
Sandboxie Support
Sandboxie Support
Posts: 2821
Joined: Mon Nov 07, 2016 3:10 pm

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Post by Barb@Invincea » Thu May 24, 2018 12:39 pm

Hello sbf ,

We cannot repro the IE behavior. After setting it to Default and re-launching it inside Sbie, the button is grayed out.
Be sure that your sandbox is not set to delete contents when you close an app , and then re-try (if possible, please test in a new sandbox with default settings).
Please let us know the outcome.

Regarding the other comment, both Guest10 and I have provided you with options to achieve what you requested. Here's a full list of registry access options for Sandboxie: https://www.sandboxie.com/ResourceAccessSettings#key

Regards,
Barb.-

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 18 guests