百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
W

wsb-detect

> 编程语言
开源

wsb- detect 使您能够检测是否运行在 Windows Sandbox ("WSB") 中

373 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

wsb- detect 使您能够检测是否运行在 Windows Sandbox ("WSB") 中

⏳ wsb-detect

wsb-detect enables you to detect if you are running in Windows Sandbox ("WSB"). The sandbox is used by Windows Defender for dynamic analysis, and commonly manually by security analysts and alike. At the tail end of 2019, Microsoft introduced a new feature named Windows Sandbox (WSB for short). The techniques used to fingerprint WSB are outlined below, in the techniques section. Feel free to submit a pull request if you have any fingerprinting ideas . I've been messing around with it now and then, I will have more on Windows Sandbox coming soon.

Windows Sandbox allows you to quickly, within 15s, create a disposable Hyper-V based Virtual Machine with all of the qualities a familiar VM would have such as clipboard sharing, mapping directories etc. The sandbox is also the underlay for Microsoft Defender Application Guard (WDAG), for dynamic analysis on Hyper-V enabled hosts and can be enabled on any Windows 10 Pro or Enterprise machine. It's not particularly interesting, but nonetheless could prove useful in implant development. Thank you to my friend Jonas L for guidance when I was exploring the sandbox internals (more to come on this).

Usage

The detect.h header exports all of the functions which can be combined to detect if

c
#include 
#include "detect.h"

int main(int argc, char** argv)
{
  // example vmsmb & username check
  if (wsb_detect_dev() || wsb_detect_username())
  {
    puts("We're in Windows Sandbox!");
    return 0;
  }
  
  return 1;
}

Techniques

wsb_detect_proc

Checks for CExecSvc.exe, which is the container execution service, handling a lot of the heavy lifting internally.

wsb_detect_time

The image for the sandbox seems to be built on Saturday, ‎December ‎7, ‎2019, ‏‎9:14:52 AM - this is around the time Windows Sandbox was released to the public. This check cross references the creation timestamp on the mountmgr driver.

wsb_detect_username

This method will check if the current username is WDAGUtilityUserAccount, the account used by default in the sandbox.

wsb_detect_suffix

This method will use GetAdaptersAddresses, walk over the list of adapters, and compare the DNS suffix to mshome.net - which is used by default in the sandbox.

wsb_detect_dev

Checks if the raw device \\.\GLOBALROOT\device\vmsmb can be opened, which is used for communication with the host over SMB.

wsb_detect_cmd

On startup, search under the RunOnce key in HKEY_LOCAL_MACHINE for a command which sets the password never to expire.

wsb_detect_genuine

A more generic method when it comes to sandbox detection, however from tests the Windows doesn't seem to be verified as legitimate in the VMs

Trivia

If you wish to contact me quicker, feel free to contact me on Twitter or e-mail. Also, it's possible on the host to detect if the sandbox is running, by checking if you can create a mutex named WindowsSandboxMutex. This limits the sandbox to one virtual-machine per host, however, you can release this mutex by simply duplicating the handle and calling ReleaseMutex - viola, you can have multiple instances.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言