Skip to content

Commit df79bad

Browse files
Sleepw4lkervirot
andauthored
Release 1.7.1609.1089 (#76)
* Simplify .NET detection * Migrate Integration Tests to AutomatedLab * Implement inverted behavior for DS mapping * Update yubikey-piv-attestation.md (#70) (#74) Fix case Co-authored-by: Oscar Virot <[email protected]> * Update User Guide * Update Lab setup script * Update Lab setup script * Delete unnecessary file * Update gitignore file * Fix DS mapping Deny Action and add Tests for this * Re-add certificate export script * Slight refactoring of Yubikey logic, and update of documentation * Fix possible memory leak in SearchResultCollection * Add Integration Tests for YubiKey attestation * Add hint on required permissions for DS mapping * Release 1.7.1609.1089 * Update Github action * Update remaining Github actions --------- Co-authored-by: Oscar Virot <[email protected]>
1 parent f9e8521 commit df79bad

File tree

111 files changed

+917
-591
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+917
-591
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
3030

3131
- name: Build Debug
32-
run: msbuild TameMyCerts\TameMyCerts.csproj -property:Configuration=debug
32+
run: msbuild TameMyCerts\TameMyCerts.csproj -property:Configuration=debug /restore /t:Rebuild
3333

3434
- name: Build ETW Manifest
35-
run: msbuild Support.GenerateETWManifest\Support.GenerateETWManifest.csproj -property:Configuration=debug
35+
run: msbuild Support.GenerateETWManifest\Support.GenerateETWManifest.csproj -property:Configuration=debug /restore /t:Rebuild
3636

3737
- name: Save Build TameMyCerts
3838
uses: actions/upload-artifact@v4

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ jobs:
3333
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
3434

3535
- name: Build Debug
36-
run: msbuild TameMyCerts\TameMyCerts.csproj -property:Configuration=release
36+
run: msbuild TameMyCerts\TameMyCerts.csproj -property:Configuration=release /restore /t:Rebuild
3737

3838
- name: Build ETW Manifest
39-
run: msbuild Support.GenerateETWManifest\Support.GenerateETWManifest.csproj -property:Configuration=release
39+
run: msbuild Support.GenerateETWManifest\Support.GenerateETWManifest.csproj -property:Configuration=release /restore /t:Rebuild
4040

4141
- name: Create ZIP file
4242
run: |

.github/workflows/xunit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
3030

3131
- name: Build Debug
32-
run: msbuild TameMyCerts\TameMyCerts.csproj -property:Configuration=debug
32+
run: msbuild TameMyCerts\TameMyCerts.csproj -property:Configuration=debug /restore /t:Rebuild
3333

3434
- name: Build TameMyCerts.Tests
35-
run: msbuild TameMyCerts.Tests\TameMyCerts.Tests.csproj -property:Configuration=debug
35+
run: msbuild TameMyCerts.Tests\TameMyCerts.Tests.csproj -property:Configuration=debug /restore /t:Rebuild
3636

3737
- name: Run xunit tests
3838
run: dotnet test --no-build --verbosity minimal

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,4 +340,7 @@ ASALocalRun/
340340
.localhistory/
341341

342342
# BeatPulse healthcheck temp database
343-
healthchecksdb
343+
healthchecksdb
344+
345+
# AutomatedLab Test results file
346+
testResults.xml

CHANGELOG.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
> TameMyCerts has evolved into a reliable, secure and stable enterprise product. Many organizations around the world are relying on it to improve their security and their PKI workflows. Professional development, testing and documentation consumes a considerable amount of time and resources. Whilst still being fully committed on keeping source code available for the community, _digitally signed binaries_, a _print-optimized documentation_ and _priority support_ are benefits **only available for customers with an active maintenance contract**.
44
5-
### Version 1.7.x.y
5+
### Version 1.7.1609.1089
66

7-
_This version has not yet been released._
7+
_This version was released on May 29, 2025._
88

9-
- The code base has been upgraded from .NET Framework 4.7.2 to .NET Core 8.0. Files are no longer installed into the System32 folder but under the Program Files directory. Also, the [.NET 8.0 Desktop Runtime](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) must be installed.
9+
- The code base has been upgraded from .NET Framework 4.7.2 to .NET 8.0. Files are no longer installed into the System32 folder but under the Program Files directory. Also, the [.NET 8.0 Desktop Runtime](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) must be installed.
1010
- Policy configuration files are now strictly processed, means that there will be errors raised when they contain invalid nodes. This may especially affect the following:
1111
- If policy configuration files still contain `KeyAlgorithm` nodes (which were removed with version 1.6), these must be removed from the configuration files.
1212
- The `Action` directives as well as the `TreatAs` directives for `Pattern` directives as processed case-sensitive, means that they must be specified exactly as documentated.
@@ -19,13 +19,15 @@ _This version has not yet been released._
1919
- Currently, the detection of the `san` request attribute will get logged regardless if the dangerous `EDITF_ATTRIBUTESUBJECTALTNAME2` flag is enabled or not.
2020
- This new behavior allows to silently [detect attack attempts](https://github.com/srlabs/Certiception) on the certification authority without raising suspicion.
2121
- Introducing a `SupplementUnqualifiedNames` switch to use in combination with supplementing of DNS names (both `SupplementDnsNames` and `SupplementServicePrincipalNames`). To keep compatibility with the previous behavior, this setting defaults to `true`. If set to `false`, supplementation logic will not include DNS names that are not fully qualified.
22+
- Directory Services mapping can now be configured to deny a certificate request in the case a matching object was found in the directory.
2223
- Introducing global settings for TameMyCerts which allows to define behavior that applies globally, regardless of the defined certificate templates (the default behavior stays as before):
2324
- Allow to set the default behavior to globally deny a certificate request when no policy configuration file is found for the requested certificate template.
2425
- Allow to certificate requests containing insecure request attribute and certification authority flag combinations to get issued (**Only for testing purposes. Use at your own risk!**).
2526
- Disable the resolving of nested Group Memberships.
2627
- Introducing support for adding custom certificate extensions with static values to issued certificates (e.g. OCSP Must-staple or Microsoft Hyper-V/SCVMM Virtual Machine Connection).
2728
- Fix the module denying certificate requests with error 0x80131500 when the certificate request contains a Subject Alternative Name extension with empty content (#20).
2829
- Fix the installer script not removing the event source on uninstall (#22).
30+
- Since Windows Server 2012 R2 is now out of support by Microsoft, support by TameMyCerts has been dropped as well.
2931
- Improved documentation, especially description of event logs and use cases.
3032

3133
### Version 1.6.1045.1129

TameMyCerts.IntegrationTests/Lab-Setup/Export-CertificateTemplates.ps1 renamed to TameMyCerts.IntegrationTests/Export-CertificateTemplates.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<#
1+
<#
22
.SYNOPSIS
33
Exports all certificate templates in an Active Directory Forest to LDIF files.
44
Needs ldifde.exe, thus run it on a Domain Controller.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
function Get-OnlineCertificate {
2+
3+
[cmdletbinding()]
4+
param(
5+
[Parameter(Mandatory=$true,ValueFromPipeline=$true)]
6+
[ValidateNotNullOrEmpty()]
7+
[string]
8+
$CertificateTemplate,
9+
10+
[Parameter(Mandatory=$true)]
11+
[ValidateNotNullOrEmpty()]
12+
[string]
13+
$ConfigString,
14+
15+
[switch]
16+
$MachineContext
17+
)
18+
19+
begin {
20+
$BASE64 = 0x1
21+
$CR_IN_MACHINE = 0x100000
22+
$CR_DISP_ISSUED = 3
23+
}
24+
25+
process {
26+
27+
Write-Verbose -Message "Enrolling for $CertificateTemplate from $ConfigString"
28+
29+
$CertEnroll = New-Object -ComObject X509Enrollment.CX509Enrollment
30+
$CertEnroll.InitializeFromTemplateName([bool]($MachineContext.IsPresent)+1, $CertificateTemplate)
31+
$CertificateRequest = $CertEnroll.CreateRequest($BASE64)
32+
33+
$CertRequest = New-Object -ComObject CertificateAuthority.Request
34+
35+
$Flags = $BASE64
36+
37+
if ($MachineContext.IsPresent) {
38+
$Flags = $Flags -bor $CR_IN_MACHINE
39+
}
40+
41+
$Status = $CertRequest.Submit($Flags, $CertificateRequest, [string]::Empty, $ConfigString)
42+
43+
if ($Status -eq $CR_DISP_ISSUED) {
44+
45+
$CertEnroll.InstallResponse(0, $CertRequest.GetCertificate($BASE64), $BASE64, [String]::Empty)
46+
47+
$Certificate = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
48+
$Certificate.Import([Convert]::FromBase64String($CertRequest.GetCertificate($BASE64)))
49+
$Certificate
50+
}
51+
else {
52+
53+
Write-Error -Message (New-Object System.ComponentModel.Win32Exception($CertRequest.GetLastStatus())).Message
54+
}
55+
56+
[System.Runtime.Interopservices.Marshal]::ReleaseComObject($CertEnroll) | Out-Null
57+
[System.Runtime.Interopservices.Marshal]::ReleaseComObject($CertRequest) | Out-Null
58+
}
59+
}

0 commit comments

Comments
 (0)