BloodHoundAD / BloodHound

Six Degrees of Domain Admin
GNU General Public License v3.0
9.62k stars 1.7k forks source link

Contribution of the DumpSMSAPassword edge with its documentation #626

Closed simondotsh closed 1 year ago

simondotsh commented 1 year ago

https://github.com/BloodHoundAD/BloodHound/issues/624

When properties are read on computer objects, the attribute msds-hostserviceaccount is collected, then the contained distinguished names are resolved in order to retrieve object identifiers. On computer dump files, a new key named SMSA contains an array of IDs representing the sMSA installed on computers. When a dump file is imported, the UI looks for entries in SMSA, then adds relationships from the computers to the sMSA.

This pull request depends on https://github.com/BloodHoundAD/SharpHoundCommon/pull/46 and https://github.com/BloodHoundAD/SharpHound/pull/36.

As usual, feel free to alter any of this code.

simondotsh commented 1 year ago

I just realized that the function buildComputerJsonNew expects the key SMSA to be there and if it's not, it crashes. This would make computer dump files collected prior this new version incompatible.

Should we perhaps set smsa to an empty array if computer.SMSA turns out to be undefined? Sounds like an easy fix with the potential of avoiding a headache to a few souls.