Skip to content

Instantly share code, notes, and snippets.

@mattifestation
Created October 31, 2021 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattifestation/59123b6014efbca7ee2c98f24655a4ee to your computer and use it in GitHub Desktop.
Save mattifestation/59123b6014efbca7ee2c98f24655a4ee to your computer and use it in GitHub Desktop.
A hypothetical AppID Tagging Policy that ConvertFrom-CIPolicy will successfully convert into binary form. Note: at the time of committing this, I have no idea what the purpose of an "AppID Tagging Policy" is.
<?xml version="1.0" encoding="utf-8"?>
<SiPolicy xmlns="urn:schemas-microsoft-com:sipolicy" PolicyType="AppID Tagging Policy">
<VersionEx>1.0.0.0</VersionEx>
<PolicyID>{A244370E-44C9-4C06-B551-F6016E563076}</PolicyID>
<BasePolicyID>{A244370E-44C9-4C06-B551-F6016E563076}</BasePolicyID>
<PlatformID>{2E07F7E4-194C-4D20-B7C9-6F44A6C5A234}</PlatformID>
<Rules>
<Rule>
<Option>Enabled:Unsigned System Integrity Policy</Option>
</Rule>
</Rules>
<!--EKUS-->
<EKUs />
<!--File Rules-->
<FileRules />
<!--Signers-->
<Signers />
<!--Driver Signing Scenarios-->
<SigningScenarios>
<SigningScenario Value="12" ID="ID_SIGNINGSCENARIO_WINDOWS">
<ProductSigners />
<AppIDTags EnforceDLL="true">
<AppIDTag Key="foo" Value="bar"/>
<AppIDTag Key="one" Value="two"/>
</AppIDTags>
</SigningScenario>
</SigningScenarios>
<UpdatePolicySigners />
<CiSigners />
<Settings />
</SiPolicy>
@pl4nty
Copy link

pl4nty commented Nov 4, 2022

Releasing a post on this soon - msft are using it for binary-level tenant restrictions (via mpssvc.dll)

@mattifestation
Copy link
Author

Looking forward to it, @pl4nty! When the post is public, if you think of it, please post the link to it here. Thanks!

@pl4nty
Copy link

pl4nty commented Jan 31, 2023

@mattifestation wasn't exactly soon, and left out lots of the reverse engineering, but I hope you enjoy :)
The WinHTTP/WinINet options and firewall rule definitions look interesting for further research. But I'm going to focus on some Intune+WDAC writeups for now.
https://tplant.com.au/blog/tenant-restrictions-v2/part-2/

@mattifestation
Copy link
Author

Fantastic writeup, @pl4nty! Thank you for digging in to this and for following up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment