Conversation
|
Nice one! Thanks for the work! |
NeffIsBack
left a comment
There was a problem hiding this comment.
@termanix can you switch to impackets ldap connection for modification and remove ldap3? Also maybe we should change the module name to modify_groups because we do a lot more than just adding things. Thoughts everyone?
|
Yea sure, I will remove ldap3 but need time. Probably in 2-3 weeks. Changing name it's okay for me btw. |
Great👍no worries, won't have time until march anyway |
|
@NeffIsBack It's ready to review |
NeffIsBack
left a comment
There was a problem hiding this comment.
The logic can probably be stripped down a lot. Please do:
- Implement the "TODO OU modification". If you don't have time now that's totally fine, but we should not merge something with open "TODOs" in the code/options.
- Actually use the
ldap.add()/ldap.modify()functions that were added - See review comments
I will push an update to the impacket code because currently the installation is too old and does not include the added ldap functions.
nxc/modules/add-group.py
Outdated
| """ | ||
| Required (at least one of): | ||
| GROUP Name of the group to add/remove the user to/from | ||
| OU TO DO --> Distinguished name of the OU to move the user to |
There was a problem hiding this comment.
Looks like this is not ready for a review 😅
nxc/modules/add-group.py
Outdated
| """ | ||
| To do | ||
| if not self.group and not self.ou: | ||
| context.log.fail("Either GROUP or OU parameter is required!") | ||
| sys.exit(1)""" |
There was a problem hiding this comment.
Please don't leave these artifacts
Signed-off-by: termanix <50464194+termanix@users.noreply.github.com>
Signed-off-by: termanix <50464194+termanix@users.noreply.github.com>
Signed-off-by: termanix <50464194+termanix@users.noreply.github.com>
Description
This new module provides add/remove users to groups. It works for SMB and LDAP, also supports Bloodhound, AddSelf, AddGroupMember etc.
LDAP part works with LDAP3
Type of change
How Has This Been Tested?
Tested on local lab and HTB, not yet GOAD.
Screenshots (if appropriate):
Checklist:
poetry run python -m ruff check . --preview, use--fixto automatically fix what it can)