sandboxie-plus / Sandboxie

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

Microsoft Edge returns SbieDll.dll error when trying to start it #2011

Open ghost opened 2 years ago

ghost commented 2 years ago

Describe what you noticed and did

  1. Open Sandboxie Plus
  2. Right-click one boxes
  3. Start -> Programs -> Microsoft Edge

How often did you encounter it so far?

Everytime

Affected program

Microsoft Edge 103.0.1264.44

Download link

Not relevant

Where is the program located?

Not relevant to my request.

Expected behavior

Starting Edge

What is your Windows edition and version?

Windows 11 Pro Insider Preview 22H2 1000.25151.1000.0

In which Windows account you have this problem?

Not relevant to my request.

Please mention any installed security software

Malwarebytes

What version of Sandboxie are you running?

Sandboxie Plus 1.1.3

Is it a new installation of Sandboxie?

I just updated Sandboxie from the previous version.

Is it a regression?

Sandboxie Plus 1.1.3

In which sandbox type you have this problem?

Not relevant to my request.

Can you reproduce this problem on an empty sandbox?

I can confirm it also on an 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

Zerorigin commented 2 years ago

Me too. Since: Windows 11 22H2 Build 22621.1 & Sandboxie Plus v1.0.22/5.55.22

DavidXanatos commented 2 years ago

hmm... i cant reproduce this issue unfortunately...

ghost commented 2 years ago

I rerolled back to Windows 11 Pro 21H2 22000.856 (clean install) but still got the same problem.

Since I'm use W11 stable, you should to reproduce that I guess.

  1. Install Windows 11: https://go.microsoft.com/fwlink/?linkid=2171764
  2. Run all Windows Updates
  3. Install Sandboxie Plus Small Plus: Sandboxie-Plus-x64-v1.2.8b.exe
  4. Create new Box
  5. rightclick > Start > Start via Start menue > Programs > Microsoft Edge.Ink

Error.

isaak654 commented 2 years ago

@iTaskmanager I can't reproduce it.

  1. Please use this tool to produce the troubleshooting logs (FRST.txt + Addition.txt) and attach them here
  2. Please take a Trace Log with Sandboxie Plus and attach it here
  3. Please attach your Sandboxie.ini configuration file
  4. You may want to test this workaround (even if it only applies to Eset Internet Security)
  5. As last resort (optional): https://github.com/sandboxie-plus/Sandboxie/issues/2011#issuecomment-1216761643

Please perform at least the first four points without skipping anyone.

ghost commented 2 years ago

Here we go:

  1. https://paste.debian.net/hidden/686305f4/ + https://paste.debian.net/hidden/9a3714a5/
  2. Part 1: https://paste.debian.net/hidden/7b446615/ Part 2: https://paste.debian.net/hidden/5cf20263/
  3. https://paste.debian.net/hidden/f242bc14/
  4. no fix
isaak654 commented 2 years ago

Me too. Since: Windows 11 22H2 Build 22621.1 & Sandboxie Plus v1.0.22/5.55.22

@Zerorigin @any_SBIE_user_with_SbieDll_issue Please provide the same reports suggested here to @iTaskmanager, they could be very useful to find a common pattern between your systems.

@iTaskmanager

  1. (Part 1) If needed, you may want to create an image backup of your system (to be restored later) (Part 2) Please disable any third-party service / program / driver that runs automatically at Windows startup (possibly OneDrive too) (Part 3) Please disable any MS Edge extension (Sbie is not great in ensuring extension compatibility)

  2. (Part 1) Add OpenClsid={0DC1AB8B-A52D-4BA8-BD76-E2819386FB2F} OR ClosedClsid={0DC1AB8B-A52D-4BA8-BD76-E2819386FB2F} (Part 2) Add OpenWinClass=msedge.exe,Chrome_MessageWindow (Part 3) If nothing of these worked for you, please take 6 different Plus logs in the following way:
    • A first Sbie Plus log should be taken with CallTrace=*. Once you created the report, attach it here and remove the trace setting
    • A second Sbie Plus log should be taken with PipeTrace=*. Once you created the report, attach it here and remove the trace setting
    • A third Sbie Plus log should be taken with IpcTrace=*. Once you created the report, attach it here and remove the trace setting
    • A fourth Sbie Plus log should be taken with GuiTrace=*. Once you created the report, attach it here and remove the trace setting
    • A fifth Sbie Plus log should be taken with ClsidTrace=*. Once you created the report, attach it here and remove the trace setting
    • A sixth Sbie Plus log should be taken with NetFwTrace=*. Once you created the report, attach it here and remove the trace setting

  3. (Part 1) Try switching BlockNetworkFiles=y to BlockNetworkFiles=n, removing Template=BlockPorts and adding BlockNetParam=n in the interested sandbox. (Part 2) Try applying these lines one by one (first individually, and then together):
    Template=RpcPortBindings
    Template=NoUACProxy
    Template=RpcPortBindingsExt

    Then get rid of them and report the outcome here (Part 3) Apply the following lines together and see if you notice an improvement:

    OpenIpcPath=*\BaseNamedObjects*\__ComCatalogCache__
    OpenIpcPath=\RPC Control\OLE*
    OpenIpcPath=\RPC Control\LRPC*
    OpenIpcPath=\RPC Control\epmapper

    Then get rid of them and report the outcome here

ghost commented 2 years ago

To add this one fixed the bug on Microsoft Edge only:

  1. OpenClsid={0DC1AB8B-A52D-4BA8-BD76-E2819386FB2F}
  2. OpenWinClass=msedge.exe,Chrome_MessageWindow

What now?

isaak654 commented 2 years ago

One question first, can you confirm that both lines are needed at the same time?

ghost commented 2 years ago

Unfortunately I can't. After restarting Windows, I got the same error again.

ghost commented 2 years ago

I removed OpenClsid={0DC1AB8B-A52D-4BA8-BD76-E2819386FB2F} now and will restart again to check. For now, error is gone again. But let me restarting Windows first.

ghost commented 2 years ago

Restarting SandBoxie (incl. purge box data etc.): Still works Restarting Windows (as I told above): .dll error

I removed OpenWinClass=msedge.exe,Chrome_MessageWindow, reloaded, added and starting Edge again = Error

After adding OpenClsid={0DC1AB8B-A52D-4BA8-BD76-E2819386FB2F} it works again.

After restarting Windows then: again .dll error

After removing OpenClsid={0DC1AB8B-A52D-4BA8-BD76-E2819386FB2F} works again.

But it seems like no effective fix here. Feels like a carousel.

isaak654 commented 2 years ago

Could you check whether the same happens for the following steps?

1) Use only OpenClsid={0DC1AB8B-A52D-4BA8-BD76-E2819386FB2F} without the OpenWinClass rule and report the outcome 2) Use only ClosedClsid={0DC1AB8B-A52D-4BA8-BD76-E2819386FB2F} without the OpenClsid/OpenWinClass rules and report the outcome 3) Use only OpenWinClass=Chrome_MessageWindow and test it with Chrome and Edge 4) Use step 2 + step 3 combined

I would also suggest to apply the remaining steps in https://github.com/sandboxie-plus/Sandboxie/issues/2011#issuecomment-1214959575 Especially those saying to disable any third-party service / program / driver that runs automatically at Windows startup (including OneDrive) and also disabling any browser extension within the sandbox and outside the sandbox.

ghost commented 2 years ago

Ok, lets go.

Preparation: "resetted" .ini, restarted Windows.

Test 1:

  1. OpenClsid={0DC1AB8B-A52D-4BA8-BD76-E2819386FB2F} added
  2. .dll error
  3. still error after restarting Windows
  4. OpenClsid={0DC1AB8B-A52D-4BA8-BD76-E2819386FB2F} removed
  5. restarted Windows

Test 2:

  1. ClosedClsid={0DC1AB8B-A52D-4BA8-BD76-E2819386FB2F} added
  2. .dll error
  3. still erroer after restarting Windows
  4. ClosedClsid={0DC1AB8B-A52D-4BA8-BD76-E2819386FB2F} removed
  5. restarted Windows

Test 3:

  1. OpenWinClass=Chrome_MessageWindow added
  2. .dll error (Chrome + Edge)
  3. still error after restarting Windows
  4. OpenWinClass=Chrome_MessageWindow removed
  5. restarted Windows

Test 4:

  1. ClosedClsid={0DC1AB8B-A52D-4BA8-BD76-E2819386FB2F} added
  2. OpenWinClass=Chrome_MessageWindow added
  3. .dll error (Chrome + Edge)
  4. ClosedClsid={0DC1AB8B-A52D-4BA8-BD76-E2819386FB2F} removed
  5. OpenWinClass=Chrome_MessageWindow removed
  6. restarted Windows

Especially those saying to disable any third-party service / program / driver that runs automatically at Windows startup (including OneDrive) and also disabling any browser extension within the sandbox and outside the sandbox.

Already done, yeah

isaak654 commented 2 years ago

If nothing works, my last suggestion is to consider the steps in https://github.com/sandboxie-plus/Sandboxie/issues/1620#issuecomment-1189913792 in presence of a very good internet connection, a good upload service and at least a day off.

ghost commented 2 years ago

In case of https://github.com/sandboxie-plus/Sandboxie/issues/2011#issuecomment-1216664329:

  1. OpenClsid={0DC1AB8B-A52D-4BA8-BD76-E2819386FB2F} added
  2. OpenWinClass=msedge.exe,Chrome_MessageWindow added
  3. Microsoft Edge started without .dll error
  4. Windows restartet
  5. .dll error

In case of https://github.com/sandboxie-plus/Sandboxie/issues/2011#issuecomment-1214959575 section 3:

  1. BlockNetworkFiles=y to BlockNetworkFiles=n

  2. Template=BlockPorts removed

  3. BlockNetParam=n added

  4. .dll error

  5. Template=RpcPortBindings added / removed

  6. .dll error

  7. Template=NoUACProxy added / removed

  8. .dll error

  9. Template=RpcPortBindingsExt added / removed

  10. .dll error

  11. Template=RpcPortBindings added

  12. Template=NoUACProxy added

  13. Template=RpcPortBindingsExt added

  14. .dll error

  15. Template=RpcPortBindings removed

  16. Template=NoUACProxy removed

  17. Template=RpcPortBindingsExt removed

  18. OpenIpcPath=*\BaseNamedObjects*\__ComCatalogCache__ added

  19. OpenIpcPath=\RPC Control\OLE* added

  20. OpenIpcPath=\RPC Control\LRPC* added

  21. OpenIpcPath=\RPC Control\epmapper added

  22. .dll error

  23. resetted .ini to default

Can you explain, what exaclty I need to do with xTrace=*? Just add CallTrace=* in .ini, after then? How I can catch the report of them?

isaak654 commented 2 years ago

Can you explain, what exaclty I need to do with xTrace=*? Just add CallTrace=* in .ini, after then? How I can catch the report of them?

Apply one line at a time in your [sandbox] section of Sandboxie.ini and then take the Trace Log with Sbie Plus as you usually do. Basically, it's the same as checking one checkbox at the time in the Plus UI: Trace_log_checkboxes

If you want to know more about the last checkbox, logapi can be found in https://github.com/sandboxie-plus/LogApiDll See also https://forum.xanasoft.com/threads/how-to-get-malawre-trace-in-sandboxie.143/ to get some explanation about its use.

ghost commented 2 years ago

Here we go: CallTrace.zip (29 MB) PipeTrace.log IpcTrace.log IpcTrace.log GuiTrace.log ClsidTrace.log NetFwTrace.log

Zerorigin commented 2 years ago

@Zerorigin @any_SBIE_user_with_SbieDll_issue Please provide the same reports suggested here to @iTaskmanager, they could be very useful to find a common pattern between your systems.

@isaak654 If necessary, I can provide remote access to the Windows system for debug tests and trace this issue by using RustDesk.

isaak654 commented 2 years ago

@Zerorigin On a personal basis, I am not available for any form of remote access without an agreed donation, otherwise you can still send those reports privately to me or David.

Zerorigin commented 2 years ago

@Zerorigin On a personal basis, I am not available for any form of remote access without an agreed donation, otherwise you can still send those reports privately to me or David.

Firstly, it is difficult for personal to use foreign payment channels in China because of policy reasons. Therefore, I am unable to provide any donation. Secondly, I am not good at English, so I have no intention of provide any traceability reports. Basically, I rarely use the browser in a sandbox. So it doesn't matter to me whether this issue is fixed or not. The last thing I want to say is that I'm here to help, not ask for help. If it isn't necessary to provide a remote tracking environment, just end the conversation.

XJY00 commented 1 year ago

Problem Summary 问题概述: 沙盒运行默认浏览器提示SbieDII.dll初始化失败 Microsoft Edge returns SbieDII.dll error when trying to start it

你们好,我同样遇到了这个问题。 但是在我重新安装的时候关闭了一些设置选项,成功地避免了这个问题的发生。 请参考以下内容:

  1. 请不要选择 使用 Windows 筛选平台(WFP)限制网络访问
  2. 请不要应用提示的 软件兼容/软件兼容性配置优化

Hello, I have the same problem. But I managed to avoid this problem by turning off some of the Settings when I reinstalled. Please refer to the following:

  1. Do not choose to use the Windows Screening Platform (WFP) to restrict network access
  2. Do not apply the software compatibility or software compatibility configuration optimization prompts
LIU-Yinyi commented 1 year ago

Recently I also encountered this problem. Finally I solved it by following #2563 mentioned by @isaak654 .

Hope it helps :D

isaak654 commented 1 year ago

I'm going to keep the https://github.com/sandboxie-plus/Sandboxie/labels/help%20wanted label in case someone wants to share a pull request with a fix.

DavidXanatos commented 1 year ago

We should use the trouble shooting wizard to fix this, although there is not yet any API to manipulate DACL's but may be wen can run a cmd script to fix it from the wizard...

cyc3693 commented 1 year ago

Recently I also encountered this problem. Finally I solved it by following #2563 mentioned by @isaak654 .

  • Problem Statement in brief: It seems that the error is caused by the access right. Installation by shell will add an unknown short SID to Windows ACL of the parent's directory, leading to the failure when browsers such as Edge and Chrome try to load.
  • Workaround: Right click the SbieDll.dll -> click Property -> click tab Security -> click button Advanced. Find the unknown user with shorter SID -> click Disable Inheritance -> click Delete. Restart your sandboxie and now it should be able to run the browser without error.

Hope it helps :D

I also encounter this error when opening software developed with Electron on my computer.This method can solve the problem.