Skip to content

Conversation

@mpgn
Copy link
Collaborator

@mpgn mpgn commented Apr 26, 2025

Description

This PR allow a user to dump using bloodhound-ce or bloodhound, it's a bit manuel but no choice.
This is a bit related to #616 and #663 , ippsec and 0xdf are both using bloodhound-ce package directly since the one on nxc doesn't supporte the community edtion :'(

Maybe bloodhound-ce should be the default pacakage now ... 🤔


This pull request introduces enhancements for managing BloodHound configurations and handling compatibility between the standard and Community Edition (CE) versions. The changes include adding a new configuration section, implementing a utility function to detect BloodHound versions, and improving error handling for mismatched configurations.

BloodHound Configuration Enhancements:

  • New Configuration Section for BloodHound-CE: Added a [BloodHound-CE] section in the nxc.conf file to enable or disable the Community Edition. (nxc/data/nxc.conf)

  • Utility Function to Detect Installed BloodHound Version: Introduced get_bloodhound_info to determine the installed BloodHound package (bloodhound or bloodhound-ce), its version, and whether it is the CE version. (nxc/protocols/ldap.py)

  • Configuration Validation and Error Handling: Added logic to validate the configuration against the installed BloodHound version, providing detailed error messages and remediation steps if there is a mismatch. (nxc/protocols/ldap.py)

Code Quality Improvements:

  • Improved Return Consistency: Updated the bloodhound method to return None instead of an implicit None when no collection methods are resolved. (nxc/protocols/ldap.py)

Type of change

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Against vintage box

Screenshots (if appropriate):

image

image

image

Checklist:

  • I have ran Ruff against my changes (via poetry: poetry run python -m ruff check . --preview, use --fix to automatically fix what it can)
  • I have added or updated the tests/e2e_commands.txt file if necessary
  • New and existing e2e tests pass locally with my changes
  • My code follows the style guidelines of this project (should be covered by Ruff above)
  • If reliant on third party dependencies, such as Impacket, dploot, lsassy, etc, I have linked the relevant PRs in those projects
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (PR here: https://github.com/Pennyw0rth/NetExec-Wiki)

@mpgn
Copy link
Collaborator Author

mpgn commented Apr 26, 2025

Or another solution is to embrace bloodhound-ce and just use it and drop legacy bloodhound (i prefer this solution but the pr offer both choice in case)

@NeffIsBack
Copy link
Member

Or another solution is to embrace bloodhound-ce and just use it and drop legacy bloodhound (i prefer this solution but the pr offer both choice in case)

Honestly, i would switch to bloodhound-ce as well. What about we give the user the choice to switch back to the old bloodhound version with this tutorial/fix, but use bloodhound-ce as default? Thoughts?

@NeffIsBack NeffIsBack added the enhancement New feature or request label Apr 26, 2025
@mpgn mpgn mentioned this pull request Apr 28, 2025
9 tasks
@NuclearFizzler
Copy link

Or another solution is to embrace bloodhound-ce and just use it and drop legacy bloodhound (i prefer this solution but the pr offer both choice in case)

Honestly, i would switch to bloodhound-ce as well. What about we give the user the choice to switch back to the old bloodhound version with this tutorial/fix, but use bloodhound-ce as default? Thoughts?

A bit of a late response, but I agree with this solution. I don't think NetExec should break backwards compatibility, but considering that Bloodhound CE is now the default version included with the latest version of Kali, I think using the CE collector by default is the right move.

@mpgn
Copy link
Collaborator Author

mpgn commented May 25, 2025

Bloodhound-ce is now the default package

NeffIsBack
NeffIsBack previously approved these changes May 25, 2025
Copy link
Member

@NeffIsBack NeffIsBack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fyi, the config was crashing before because the section was missing. Also added a check that would add missing config sections.

LGTM:
image

Signed-off-by: mpgn <5891788+mpgn@users.noreply.github.com>
@mpgn mpgn merged commit b1f0368 into main May 25, 2025
6 checks passed
@mpgn mpgn deleted the be branch May 25, 2025 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants