-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Huge refactoring: poetry
support, crawl the trusted domains, handle -no-pass
beautifuly and so on.
#177
base: master
Are you sure you want to change the base?
Conversation
I just enhanced the logging output that allow to directly see the trusts and that built a zip file with the targeted domain name: INFO: Found AD domain: dev.com
INFO: Attempting to get Kerberos TGT for user administrator
INFO: Successfully retrieved initial TGT for user domain: home.com.
INFO: Detected inter-realm trust scenario.
INFO: Retrieved initial referral TGS to access dev.com domain services.
INFO: Successfully obtained final TGS, enabling access to the target domain's services.
INFO: Completed TGT acquisition process.
INFO: Connecting to LDAP server: rdc02.dev.com
INFO: Found 1 domains
INFO: Found 2 domains in the forest: ops.dev.com, dev.com
INFO: Found 1 computers
INFO: Connecting to LDAP server: rdc02.dev.com
INFO: Found 5 users
INFO: Found 52 groups
INFO: Found 2 gpos
INFO: Found 4 ous
INFO: Found 19 containers
INFO: Found 2 trusts: home.com, ops.dev.com
INFO: Starting computer enumeration with 10 workers
INFO: Querying computer: rdc02.dev.com
INFO: Done in 00M 14S
INFO: Successfully created and filled dev.com_2024-05-01T14-08-55_bloodhound_data.zip Date format is now in ISO 8601 style. |
poetry
support, crawl the trusted domains, handle -no-pass
beautifuly and so on.
And finally, it is now possible to add |
@dirkjanm, any news? |
I'll try to find some time to review this next week |
I hope you find it good enough. Don't hesitate to ask me to correct it here if necessary. |
hey, I've taken a look at the code, first of all I'd like to say that i appreciate you spending time on adding these features and improvements. I would like to merge the features and improvements into the main branch, but there seem to be way more changes than what you indicated. 90% of the lines that were rewritten were done so with no functional changes but only stylistic preferences. Clean code is of course nice, but reviewing all those changes and ensuring the intended functionality is still the same is going to take me hours. Furthermore, all that rewriting would make it really hard to track down bugs in the future because of all the moving around and changing lines. Would you be open to re-submit this with only the functional improvements and fixes rather than with the whole refactoring of the code? |
I completely understand your concerns! However, I need some clarification on what you mean by "improvements and fixes." My main goal was to integrate For instance, I created a Upon reviewing my changes, I noticed that many of the alterations were minor corrections, such as changing single quotes to double quotes, which do not affect the tool's functionality. I assure you that I haven’t made any major changes to your already excellent tool. 🥂 My focus was on |
Hello @dirkjanm 👋
Overview of Changes:
Kerberos Authentication:
-no-pass
parameter to ensure correct behavior when Kerberos authentication is used without a password.Poetry Integration:
bloodhound.py
file and restructured project directories as needed to fit with poetry conventions.Details
Like this issue mentioned it already, it is currently not respecting the
-no-pass
parameter. So I took the time to make the necessary corrections. It will close #168 tho'.The
args.no_pass
option is intended to skip password prompting (useful when using Kerberos authentication without a password), but there is indeed an issue with how it's handled in the logic for authentication setup. The problem arises in the condition checks where the authentication object (ADAuthentication) is created.In fact, all these checks are unnecessary. We can let the
ADAuthentication
class handle the parameters as it already does when initialized.I've also enabled the script to run even if the user doesn't provide a username. Because it can easily retrieve the TGT username.
Now it works well:
I also added a better resolution for computers too.
Before it was:
Now it is:
I hope you find it all to your liking. For my part, it allows me to continue using your wonderful tool!
Btw, I also adapt the project in order to make-it compatible with
poetry
, which is the modern way to work inside apython3
project. I deleted thebloodhound.py
file as requested by modern projects: