

What are these SIDs of the form S-1-15-2-xxx?
source link: https://devblogs.microsoft.com/oldnewthing/20220502-00/?p=106550
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

What are these SIDs of the form S-1-15-2-xxx?
Raymond C
May 2nd, 20221
If you are the curious sort of person who looks at security descriptors, you may find SIDs of the form S-1-15-2-xxx. What are these things?
SIDs of the form S-1-15-2-xxx are app container SIDs. These SIDs are present in the token of apps running in an app container, and they encode the app container identity.
According to the rules for Mandatory Integrity Control, objects default to allowing write access only to medium integrity level (IL) or higher. App containers run at low IL, so they by default don’t have write access to such objects.
An object can add access control entries (ACEs) to its access control list (ACL) to grant access to low IL. There are a few security identifiers (SIDs) you may see when an object extends access to low IL.
S-1-15-2-1: All Application Packages (SDDL abbreviation: “AC”)
Packaged apps, also known as Universal Windows apps. This covers all classic Windows Store apps.
I’ve seen some web pages where people speculate that “All Application Packages” is some sort of malware. It’s not. It’s just a security group.
S-1-15-2-2: All Restricted Application Packages
I’m not sure what this means or how it differs from All Application Packages.
S-1-15-2-x1-x2-x3-x4-x5-x6-x7: Specific app
This is a SID for one specific app. The seven numbers that come after the S-1-15-2 are 32-bit decimal numbers that collectively represent the first 28 bytes of the SHA256 hash of the app package family name.
You can ask the system to calculate this SID for you by calling DeriveAppContainerSidFromAppContainerName
:
PSID sid; if (SUCCEEDED(DeriveAppContainerSidFromAppContainerName( L"Contoso.Deluxe_yda3mdg2t4ngp", &sid))) { // you have the sid in "sid" }
You use this SID to grant access to a resource for one specific app. Of course, if you want to allow multiple apps, you can add multiple ACEs, one for each SID you want to allow.
Since the value comes from a cryptographic hash, there is no known way to reverse the SID back to the original package family name.¹ If you find one of these and are curious which app it applies to, you could enumerate all the apps that are installed on the system and feed each one into DeriveAppContainerSidFromAppContainerName
looking for a match. But even then, you may not find it, because the SID may refer to an app that isn’t currently installed: It may have been applied in anticipation of installing an app, or it may have been applied at a time when the app was present, but you have since uninstalled it.
There’s another family of SIDs related to app containers that you may also run across. We’ll look at them next time.
¹ If you find a way to do that, you’ll probably use your new discovery to do much more lucrative things than reversing package family names.
Recommend
-
95
好多套可编辑的PPT模板,都经过审核,多为扁平化风格~ 很漂酿,分享给大家~ 喜欢的话请给5星好评呦~~(づ ̄ 3 ̄)づ
-
26
kube-controller-manager 基本流程: 1、构造 2、配置 3、初始化 4、执行
-
23
DevWikiPermissions 0777 for xxx are too open在使用wsl 提交代码的时候, 控制台提示这个错误:$ git push --set-upstream origi...扫描右侧二维码阅读全文232020/05
-
23
前言 今天纯文字,阅读时间10分钟左右 最近在看一本书《大型网站技术架构:核心原理与案例分析》,可以说是非常枯燥的一本书,在开头几章讲解了网站的发展,介绍了一些架构中的常用名词。虽然有点枯燥,但这本书很适合想...
-
12
XXX团队邮件工作制与日常工作原则V1.0 2018-5-2 kimmking 1. 邮件工作制: 1.1 用好抄送 重要的事儿,写邮件,发给邮件的接收人,抄送直接leader和隔级领导,涉及到的其他部门人员,如果需要其他部门人员的领导介入,也需...
-
7
Conversation Closes #6979 fixing a small regression introduced in #6782 that u...
-
13
What are these SIDs of the form S-1-15-3-xxx? Raymond C May 3rd, 2022
-
11
Cujo's Curated SIDs Curated SID music from 1982 to 2022. Sound emulation with Jürgen Wothke's
-
6
Converting Active Directory SIDs to names using LDAP + Rust
-
5
SIDs are really just another a fancy way of creating unique IDs in a decentralized way
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK