Added the SyncLAPSPassword edge with its documentation #564
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#555
This edge requires to diverge from the typical way edges are built, due to how when a principal has
DS-Replication-Get-Changes
andDS-Replication-Get-Changes-In-Filtered-Set
on a domain object, we wish to add a relationship between that principal and LAPS-enabled computers of the same domain. The ACEDS-Replication-Get-Changes-In-Filtered-Set
is not currently collected, but a pull request has been opened on the SharpHoundCommon library to retrieve it (SpecterOps/SharpHoundCommon#35).Without restructuring the project, the easiest way that I could find to implement it was through executing Cypher queries after an import in the
postProcessUpload
function, since the edge involves different types of objects. Here are the creation queries:We gather all objects
n
that haveGetChangesInFilteredSet
on the domain object. Then, we make sure that thesen
objects also haveGetChanges
, but notGetChangesAll
on the domain. The latter is excluded because if a principal also has it, they can performDCSync
, and drawingSyncLAPSPassword
in that case would only generate noise in the graph, in my opinion. Similarly, we make sure thatn
is notEnterprise Domain Controllers
because it meets the previous requirements, but domain controllers are also members of the groupDomain Controllers
, awarding themGetChangesAll
. As such, this would also induce noise.Then, we filter on all computer objects of the same domain that have LAPS, and end with creating the relation
SyncLAPSPassword
betweenn
and those computers. I setisacl
totrue
because the edge is a combination of two ACEs, but feel free to adjust.A last query is executed:
GetChangesInFilteredSet
is not meant to be shown to users when they are querying the data. Currently, its only purpose is to build theSyncLAPSPassword
edge; otherwise, it would be shown as a link to domain objects, and induce false positives. For this reason, we make sure to delete it.While this is far from perfect, I believe it should be good enough as a first iteration. Do not hesitate to provide feedback, and do as you wish with this code.