Skip to content

Commit 0276590

Browse files
committed
PingCastle 3.1.0.1
1 parent de404d6 commit 0276590

File tree

5 files changed

+18
-14
lines changed

5 files changed

+18
-14
lines changed

Exports/ExportComputers.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public override void Export(string filename)
100100
data.Add(string.Empty);
101101
data.Add(string.Empty);
102102
}
103-
if (lapsAnalyzer.LegacyLAPSIntId > 0 && x.ReplPropertyMetaData != null && x.ReplPropertyMetaData.ContainsKey(lapsAnalyzer.LegacyLAPSIntId))
103+
if (lapsAnalyzer.LegacyLAPSIntId != 0 && x.ReplPropertyMetaData != null && x.ReplPropertyMetaData.ContainsKey(lapsAnalyzer.LegacyLAPSIntId))
104104
{
105105
var dd = x.ReplPropertyMetaData[lapsAnalyzer.LegacyLAPSIntId];
106106
data.Add(dd.LastOriginatingChange.ToString("u"));
@@ -109,7 +109,7 @@ public override void Export(string filename)
109109
{
110110
data.Add(string.Empty);
111111
}
112-
if (lapsAnalyzer.MsLAPSIntId > 0 && x.ReplPropertyMetaData != null && x.ReplPropertyMetaData.ContainsKey(lapsAnalyzer.MsLAPSIntId))
112+
if (lapsAnalyzer.MsLAPSIntId != 0 && x.ReplPropertyMetaData != null && x.ReplPropertyMetaData.ContainsKey(lapsAnalyzer.MsLAPSIntId))
113113
{
114114
var dd = x.ReplPropertyMetaData[lapsAnalyzer.MsLAPSIntId];
115115
data.Add(dd.LastOriginatingChange.ToString("u"));

Healthcheck/HealthcheckAnalyzer.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ private void GenerateComputerData(ADDomainInfo domainInfo, ADWebService adws)
925925
}
926926
}
927927
}
928-
if (x.ReplPropertyMetaData != null && LAPSAnalyzer.LegacyLAPSIntId > 0 && x.ReplPropertyMetaData.ContainsKey(LAPSAnalyzer.LegacyLAPSIntId))
928+
if (x.ReplPropertyMetaData != null && LAPSAnalyzer.LegacyLAPSIntId != 0 && x.ReplPropertyMetaData.ContainsKey(LAPSAnalyzer.LegacyLAPSIntId))
929929
{
930930
proxy.AddWithoutDetail("LAPS");
931931
var d = x.ReplPropertyMetaData[LAPSAnalyzer.LegacyLAPSIntId];
@@ -938,7 +938,7 @@ private void GenerateComputerData(ADDomainInfo domainInfo, ADWebService adws)
938938
lapsDistribution[i] = 1;
939939
}
940940
}
941-
if (x.ReplPropertyMetaData != null && LAPSAnalyzer.MsLAPSIntId > 0 && x.ReplPropertyMetaData.ContainsKey(LAPSAnalyzer.MsLAPSIntId))
941+
if (x.ReplPropertyMetaData != null && LAPSAnalyzer.MsLAPSIntId != 0 && x.ReplPropertyMetaData.ContainsKey(LAPSAnalyzer.MsLAPSIntId))
942942
{
943943
proxy.AddWithoutDetail("LAPSNew");
944944
var d = x.ReplPropertyMetaData[LAPSAnalyzer.MsLAPSIntId];
@@ -2607,7 +2607,7 @@ void ThreadGPOAnalysis(int ThreadId, ADWebService adws, string directoryFullName
26072607
if (adws.FileConnection.FileExists(path))
26082608
{
26092609
step = "extract GPP local group assignment";
2610-
ExtractLocalGroupAssignment(adws, path, GPO, "Unknown [" + shortName + "]");
2610+
ExtractLocalGroupAssignment(adws, path, GPO);
26112611
}
26122612
path = directoryFullName + @"\Machine\Microsoft\Windows nt\SecEdit\GptTmpl.inf";
26132613
if (adws.FileConnection.FileExists(path))
@@ -2680,14 +2680,14 @@ void ThreadGPOAnalysis(int ThreadId, ADWebService adws, string directoryFullName
26802680
}
26812681
}
26822682

2683-
private void ExtractLocalGroupAssignment(ADWebService adws, string path, GPO GPO, string p)
2683+
private void ExtractLocalGroupAssignment(ADWebService adws, string path, GPO GPO)
26842684
{
26852685
XmlDocument doc = new XmlDocument();
26862686
doc.Load(path);
26872687
XmlNodeList nodeList = doc.SelectNodes(@"//Group");
26882688
foreach (XmlNode node in nodeList)
26892689
{
2690-
XmlNode actionNode = node.SelectSingleNode(@"//Properties/@action");
2690+
XmlNode actionNode = node.SelectSingleNode(@"Properties/@action");
26912691
if (actionNode != null)
26922692
{
26932693
switch (actionNode.Value.ToUpperInvariant())
@@ -2703,7 +2703,7 @@ private void ExtractLocalGroupAssignment(ADWebService adws, string path, GPO GPO
27032703
var groupNameNode = node.SelectSingleNode("@name");
27042704
if (groupNameNode == null)
27052705
continue;
2706-
foreach (XmlNode userNameNode in node.SelectNodes(@"//Member[@action=""ADD""]"))
2706+
foreach (XmlNode userNameNode in node.SelectNodes(@"Properties/Members/Member[@action=""ADD""]"))
27072707
{
27082708
var sidnode = userNameNode.SelectSingleNode("@sid");
27092709
if (sidnode == null)
@@ -4552,9 +4552,9 @@ private LAPSAnalyzer CheckLAPSInstalled(ADDomainInfo domainInfo, ADWebService ad
45524552
var f = false;
45534553
// check if there is a LAPS attribute (looked into metadata because hidden if the current user has not right to read it)
45544554
if (
4555-
(lapsAnalyzer.LegacyLAPSIntId > 0 && x.ReplPropertyMetaData.ContainsKey(lapsAnalyzer.LegacyLAPSIntId))
4555+
(lapsAnalyzer.LegacyLAPSIntId != 0 && x.ReplPropertyMetaData.ContainsKey(lapsAnalyzer.LegacyLAPSIntId))
45564556
||
4557-
(lapsAnalyzer.MsLAPSIntId > 0 && x.ReplPropertyMetaData.ContainsKey(lapsAnalyzer.MsLAPSIntId))
4557+
(lapsAnalyzer.MsLAPSIntId != 0 && x.ReplPropertyMetaData.ContainsKey(lapsAnalyzer.MsLAPSIntId))
45584558
)
45594559
{
45604560
if (x.NTSecurityDescriptor != null)

Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@
2828
// Numéro de build
2929
// Révision
3030
//
31-
[assembly: AssemblyVersion("3.1.0.0")]
32-
[assembly: AssemblyFileVersion("3.1.0.0")]
31+
[assembly: AssemblyVersion("3.1.0.1")]
32+
[assembly: AssemblyFileVersion("3.1.0.1")]

Scanners/LAPSBitLocker.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ public void Export(string filename)
6565
LastLogonTimestamp = x.LastLogonTimestamp,
6666
OperatingSystem = x.OperatingSystem,
6767
};
68-
if (lapsAnalyzer.LegacyLAPSIntId > 0 && x.ReplPropertyMetaData.ContainsKey(lapsAnalyzer.LegacyLAPSIntId))
68+
if (lapsAnalyzer.LegacyLAPSIntId != 0 && x.ReplPropertyMetaData.ContainsKey(lapsAnalyzer.LegacyLAPSIntId))
6969
{
7070
computer.HasLegacyLAPS = true;
7171
computer.LegacyLAPSLastChange = x.ReplPropertyMetaData[lapsAnalyzer.LegacyLAPSIntId].LastOriginatingChange;
7272
}
73-
if (lapsAnalyzer.MsLAPSIntId > 0 && x.ReplPropertyMetaData.ContainsKey(lapsAnalyzer.MsLAPSIntId))
73+
if (lapsAnalyzer.MsLAPSIntId != 0 && x.ReplPropertyMetaData.ContainsKey(lapsAnalyzer.MsLAPSIntId))
7474
{
7575
computer.HasMsLAPS = true;
7676
computer.MsLAPSLastChange = x.ReplPropertyMetaData[lapsAnalyzer.MsLAPSIntId].LastOriginatingChange;

changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
3.1.0.1
2+
* fix local membership if many settings are defined
3+
* fix LAPS collection (signed / unsigned bug)
4+
15
3.1.0.0
26
* fix a bug for machineaccountquote when GPO has been rewritten to remove all users
37
* fix a regression introduced in previous version in P-TrustedCredManAccessPrivilege

0 commit comments

Comments
 (0)