[File] [PATCH] Support Windows AD GPO Registry Policy files (Registry.pol)

Christos Zoulas christos at zoulas.com
Sat Jun 24 16:24:10 UTC 2023


Applied, thanks!

christos

> On Jun 24, 2023, at 12:13 AM, Yuuta Liang <yuuta at yuuta.moe> wrote:
> 
> Signed PGP part
> Hello,
> 
> The attached patch adds basic support for Registry.pol files (Windows Active Directory Group Policy Registry Policy). Thanks!
> 
> Registry.pol files store GPO-configured registry values, and they are located in the AD sysvol, such as \\<Domain FQDN>\\sysvol\\<Domain FQDN>\\policies\<GUID>\Machine\Registry.pol.
> 
> 
> Docs on the file format: https://learn.microsoft.com/en-us/previous-versions/windows/desktop/policy/registry-policy-file-format.
> 
> Best regards,
> 
> Yuuta Liang
> 
> 
> ---
>  magic/Magdir/windows        |   6 ++++++
>  tests/registry-pol.result   |   1 +
>  tests/registry-pol.testfile | Bin 0 -> 7094 bytes
>  3 files changed, 7 insertions(+)
>  create mode 100644 tests/registry-pol.result
>  create mode 100644 tests/registry-pol.testfile
> 
> diff --git a/magic/Magdir/windows b/magic/Magdir/windows
> index 12976c88..d6e254b8 100644
> --- a/magic/Magdir/windows
> +++ b/magic/Magdir/windows
> @@ -1814,3 +1814,9 @@
>  0    string MetaView\x20Service\x20Assurance\x20Export\x20File    MetaView SAS export
>  >39     string  Version\x20
>  >>47    byte x                                                       \b, version %c
> +
> +# Active Directory Group Policy Registry Policy File Format
> +# From: Yuuta Liang <yuuta at yuuta.moe>
> +# URL: https://learn.microsoft.com/en-us/previous-versions/windows/desktop/policy/registry-policy-file-format
> +0    string    PReg
> +>4    lelong    x        Group Policy Registry Policy, Version=%d
> diff --git a/tests/registry-pol.result b/tests/registry-pol.result
> new file mode 100644
> index 00000000..7ca512f0
> --- /dev/null
> +++ b/tests/registry-pol.result
> @@ -0,0 +1 @@
> +Group Policy Registry Policy, Version=1
> diff --git a/tests/registry-pol.testfile b/tests/registry-pol.testfile
> new file mode 100644
> index 0000000000000000000000000000000000000000..643e4a6dffd7f9302ed408723622dc5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-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <https://mailman.astron.com/pipermail/file/attachments/20230624/8a0ae281/attachment.asc>


More information about the File mailing list