Skip to content

Commit

Permalink
fix #12
Browse files Browse the repository at this point in the history
  • Loading branch information
Tw1sm committed Oct 25, 2024
1 parent c837f2a commit 6860e91
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
## [0.4.2] - 10/24/2024
### Fixed
- Addressed [#12](https://github.com/coffeegist/bofhound/issues/12), an issue with duplicate trusted domain objects

## [0.4.1] - 10/22/2024
### Fixed
- Addressed [#10](https://github.com/coffeegist/bofhound/issues/10), an issue with the `ContainedBy` attribute in output JSON
Expand Down
13 changes: 12 additions & 1 deletion bofhound/ad/adds.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,18 @@ def import_objects(self, objects):
# grab domain trusts
elif 'trustedDomain' in object_class:
bhObject = BloodHoundDomainTrust(object)
bhObject.set_temporary_sid(len(self.trusts))

# try to find if this domain is new or not
needs_temp_sid = True
for trust in self.trusts:
if trust.TrustProperties['TargetDomainName'].upper() == bhObject.TrustProperties['TargetDomainName'].upper():
bhObject.TrustProperties['TargetDomainSid'] = trust.TrustProperties['TargetDomainSid']
needs_temp_sid = False

# set a temporary sid if new trusted domain
if needs_temp_sid:
bhObject.set_temporary_sid(len(self.trusts))

target_list = self.trusts
# grab OUs
elif 'top, organizationalUnit' in object_class:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "bofhound"
version = "0.4.1"
version = "0.4.2"
description = "Parse output from common sources and transform it into BloodHound-ingestible data"
authors = [
"Adam Brown",
Expand Down

0 comments on commit 6860e91

Please sign in to comment.