Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can the sandboxed exe create file in c:? #3160

Open
tohghua opened this issue Aug 4, 2023 · 10 comments
Open

How can the sandboxed exe create file in c:? #3160

tohghua opened this issue Aug 4, 2023 · 10 comments
Labels
Confirmation pending Further confirmation is requested Workaround Temporary or alternative solution

Comments

@tohghua
Copy link

tohghua commented Aug 4, 2023

Describe what you noticed and did

  1. Download test.exe from https://cowtransfer.com/s/98e76eb3f5294a
  2. Run it to install in a sandbox, the installer will automatically run the program. See https://cowtransfer.com/s/360bb2f7b83348
  3. Input anything such as “a” and press Ok button, it will create c:\CarpaBrowserCache

The problem is why the program can break through the sandbox to create folder directly in disk.

How often did you encounter it so far?

No response

Affected program

test.exe

Download link

https://cowtransfer.com/s/98e76eb3f5294a

Where is the program located?

The program is installed only inside a sandbox (NOT in the real system anyway).

Expected behavior

It should unable to create file/folder in c:

What is your Windows edition and version?

win10

In which Windows account you have this problem?

A local account (Administrator).

Please mention any installed security software

none

What version of Sandboxie are you running?

Sandboxie Plus 1.9.8

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?

In a standard isolation sandbox (yellow sandbox icon).

Can you reproduce this problem on a new empty sandbox?

I can confirm it also on a new empty sandbox.

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

@tohghua tohghua added the Confirmation pending Further confirmation is requested label Aug 4, 2023
@DavidXanatos
Copy link
Member

I cant reproduce this anyone else being able to reproduce this issue?

@coltsfootrock
Copy link

Not really too sure what I did to reproduce it as the exe was not in English my native language. Just downloaded it and ran in in yellow Sbie+ box and clicked on the highlighted boxes during the install.
Used a yellow box
Screenshot 2023-08-04 180330

@bastik-1001

This comment was marked as outdated.

@offhub
Copy link
Collaborator

offhub commented Aug 4, 2023

sbiecbtest.mp4

@offhub
Copy link
Collaborator

offhub commented Aug 5, 2023

ClosedClsid={00021401-0000-0000-C000-000000000046}

@bastik-1001
Copy link
Collaborator

It appears as if messing with the HKCU does not require a process to be elevated, whereas it needs to be for messing with HKLM?

Does this affect the boxes where the processes are not allowed to be started elevated? And what about security hardened boxes?

@DavidXanatos DavidXanatos added the Workaround Temporary or alternative solution label Aug 6, 2023
@DavidXanatos
Copy link
Member

the registry changes should be contained within the box, did you observed otherwise?
in case of this specific browser bug it seams it arises when allowing to communicate with a unsandboxed windows component
try removing Template=OpenWinInetCache from [DefaultTemplates] in the templates.ini

@bastik-1001
Copy link
Collaborator

did you observed otherwise?

No, I did not. My comment was based on the ClosedClsid={00021401-0000-0000-C000-000000000046} being suggested as a possible workaround.

@offhub
Copy link
Collaborator

offhub commented Aug 6, 2023

This can also be used as a workaround.

NormalIpcPath=\RPC Control\webcache_*

@isaak654
Copy link
Collaborator

isaak654 commented Aug 7, 2023

Considering the OpenWinInetCache template:

#
# Sbie builds after 5.27-1 opens this (it breaks IE's source view and cache though)
#
[Template_OpenWinInetCache]
OpenClsid={0358B920-0AC7-461F-98F4-58E32CD89148}
OpenIpcPath=\RPC Control\webcache_*
OpenIpcPath=*\BaseNamedObjects\windows_webcache_counters_*

  • 1 - Is there a way to configure it so that it is only applied under certain conditions (such as the presence or absence of specific registry keys/files/folders)?

  • 2.1 - What about replacing line 468 with OpenIpcPath=!executable.exe,\RPC Control\webcache_* ?

  • 2.2 - What about using a similar approach for line 645 below to keep some consistency (or even removing the duplicate line if needed)?

    [Template_IExplore_Cookies_DirectAccess]
    Tmpl.Title=#4328,Internet Explorer
    Tmpl.Class=WebBrowser
    OpenFilePath=iexplore.exe,%Cookies%
    # Internet Explorer 10 cookies
    OpenClsid={0358b920-0ac7-461f-98f4-58e32cd89148}
    OpenIpcPath=\RPC Control\webcache_*
    OpenIpcPath=*\BaseNamedObjects*\windows_webcache_*
    OpenFilePath=%Local AppData%\Microsoft\Internet Explorer\DOMStore\*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Confirmation pending Further confirmation is requested Workaround Temporary or alternative solution
Projects
None yet
Development

No branches or pull requests

6 participants