sandboxie-plus / Sandboxie

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

Three Things - How to make Sandboxie not modify any file metadata (Like Last Accessed Dates) when indexing my PC, Why does running as administrator not open the file in Sandboxie, and why is a zip file taking forever to extract in Sandboxie #2424

Open trewqaGG opened 1 year ago

trewqaGG commented 1 year ago

Describe what you noticed and did

I just installed Sandboxie today, so I am a newbie to the software, but in my first hour of using it I have three problems with the software.

  1. When I used file explorer in sandboxie mode and browsed through a few folders, I saw with my real file explorer that those files' last accessed dates had changed. I don't want sandboxie to modify a single thing in my computer when using it, not even the last accessed date.
  2. I created a batch file that creates a text file in a folder in my PC, and I cut and pasted it into the Default Sandbox, and when I run it, it creates a text file inside of that sandbox instead of the real folder as expected, but when I run as administrator, it creates a text file in the real folder. I have downloaded a game from the interwebs that needs you to open it as administrator to run it (I'm not sure why), so I need to be able to run it inside the sandbox to see if it's a virus or not.
  3. About said game—it comes in a few hundred megabyte zip file, so I need to extract it inside of the sandbox using a sandboxed file explorer, so I did just that, but it's been extracting for more than an hour so I pressed cancel just now. How do I deal with this? Extracting it within my actual computer should only take a few minutes. Is there anything I don't know that doesn't allow me to extract the file within the sandbox? After cancelling said extraction, the folder which the zip extracted in to still remained inside the sandbox, although I'm not sure if everything was transferred, so I just ran the game (the .exe) but it closed immediately. I'm not sure if this is because I didn't extract it fully (it looked like it did or close to it) or because I didn't run as administrator (I'm still scared to do so since it might run in my actual computer.)

Also, as a sidenote, I installed sandboxie just to play that game, and when I'm done I plan to completely uninstall it. I read online that sandboxie doesn't clear everything, like registry keys and such. Is that true? When I uninstall it, I want it gone from my computer as if it never existed in the first place.

How often did you encounter it so far?

No response

Affected program

File Explorer, Age of Civilisations 2 Pirated Version (https://steamunlocked.net/1-age-of-civilizations-2-free-direct-download/)

Download link

https://download161.uploadhaven.com/1/application/zip/NUHUWGz0nn2MLDp56K8kX5PbhaOE9qdbnxYkFk9v.zip?key=uI5FB0wscy5cnR5PElT0_g&expire=1667364927&filename=Age.of.Civilizations.II.v1.01415.zip

Where is the program located?

I tried to install it only inside a sandbox, but I wasn't able to achieve it.

Expected behavior

What I expected to do after I installed Sandboxie was:

  1. Move the zip file (of the game) to the default sandbox
  2. Use sandboxied file explorer to extract the zip file
  3. Open the file as administrator (as instructed on the download website) inside the sandbox, instead of sandboxie treating it like I opened it in my actual PC
  4. Play the game for a while (if it actually works) within the sandbox, and all the libraries it accessed (like Java and all that in different parts of my PC) should have nothing changed about it in my actual PC, like last accessed date
  5. Clear the sandbox, and uninstall sandboxie, leaving absolutely nothing behind

What is your Windows edition and version?

Windows 10 Home

In which Windows account you have this problem?

Not relevant to my request.

Please mention any installed security software

Windows Defender

What version of Sandboxie are you running?

Sandboxie-Classic-x64-v5.60.1.exe

Is it a new installation of Sandboxie?

I recently did a new clean installation.

Is it a regression?

No response

In which sandbox type you have this problem?

I only reproduced it with Sandboxie Classic.

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

I didn't change any settings
DavidXanatos commented 1 year ago
  1. last access times are set by the windows when file is read and if we need to read it then we need to read it, although there seam to be a way to bypass this: https://devblogs.microsoft.com/oldnewthing/20111010-00/?p=9433 You could though disable last access date globally on your windows installation

  2. It should never write outside the sandbox to un open path no mater if runnign something as admin or not. There are also no reports of this happening, perhaps a user error? If not then please provide that batch file to reproduce teh problem.

  3. unzip should not be slower in sandbox, what unzip tool did you use or did you use windows explorer?

  4. When uninstalling sandboxie-plus you are prompted if you want to keep the C:\Sandbox fodler and the C:\Windows\Sandboxie.ini if you remove booth nothing will be left on your system

trewqaGG commented 1 year ago
  1. Could you elaborate further? It'd be better if the last accessed date stopped changing for any of the files in my PC forever (ie. It remains frozen). Is there some option hidden somewhere in Windows 10 that just lets you do that or is there anything close to it? I have made several superuser posts trying to do this. Superuser: How to copy files in File Explorer while preserving all Metadata attributes: Including Last Accessed Date, Modified Date, etc Superuser: How to permanently disable any Windows 10 automatic updates that aren't directly crucial to the integrity of my operating system Superuser: How to stop Microsoft Edge from updating in Windows 10? Superuser: How to block everything on Windows 10's firewall and slowly allow the things that I only need? As you can see I am quite keen on preserving the state of parts of my computer that I don't regularly use.

  2. I simply copied some code from stack overflow for the batch file. I don't even know how to code in batch personally.

    @echo off
    break>"d:\testing\dblank.txt"
  3. I used windows explorer, I have no other unzip tool on my computer. Could it have something to do with the zip's size? I mentioned in my post that it had hundreds of megabytes (Although no more than 500 MB)

  4. https://github.com/sandboxie-plus/Sandboxie/issues/1036#issuecomment-886146068 This is the specific comment that got me worried that uninstalling Sandboxie would still leave traces behind. I uninstalled Sandboxie a few hours ago (with Apps and Features in Settings), and everything is looking clean so far, the Sandboxie context menu option in File Explorer is gone, but I still don't know if it left behind a few registry keys or anything else of the sort. I am right now reinstalling Sandboxie to get back on fixing my problems.

DavidXanatos commented 1 year ago
  1. look here: https://winaero.com/disable-ntfs-last-access-time-updates-in-windows-10/

  2. i could reproduce the issue wil look into what ther in gets so slow

isaak654 commented 1 year ago
  1. We're not aware of further traces left in the recent builds, so this aspect should be fine. However, if I recall correctly, only the Sandboxie Plus installer (not the Classic one) allows to delete all sandboxes at once as third option:
Plus_installer
trewqaGGG commented 11 months ago
  1. look here: https://winaero.com/disable-ntfs-last-access-time-updates-in-windows-10/
  2. i could reproduce the issue wil look into what ther in gets so slow

So.. it has been 1 whole year, and I lost my old account, so here I am commenting on a new one.. Have you looked into why the batch file was able to change files out of the sandbox when run in administrator mode, and also the unzip problem?

DavidXanatos commented 11 months ago

As sandboxed explorer is now working well in general and also MSFT is changing a lot about it all the time we did not peruse the slowness issue, unpacking with sandboxed 7zip or other 3rd party tool works just fine. I could not reproduce the sandbox escape, as said in the first comment also there are no other reports of this happening. If you can reproducibly reproduce the batch file issue then please post a step yb step instruction and y copy of the used sandboxie ini

trewqaGGG commented 10 months ago

I could not reproduce the sandbox escape, as said in the first comment also there are no other reports of this happening. If you can reproducibly reproduce the batch file issue then please post a step yb step instruction and y copy of the used sandboxie ini

It seems I cannot do so either. I believe the last time I did it, I ran the file in the sandbox as administrator with a normal file explorer. This time I did it with a sandboxed file explorer in administrator mode and it thankfully created a new text file in the sandbox. I think the batch file from a year ago went something along the lines of simply:

@echo off
  echo>"d:\blank.txt"

On another note, can elevated programs under the supervision of sandboxie break through the no internet access restriction and access the internet? If so, how do I disallow that?