From 1af0b079502ae35646a690493199abcdbe263169 Mon Sep 17 00:00:00 2001 From: Geiseric <73939366+GeisericII@users.noreply.github.com> Date: Wed, 14 Feb 2024 17:06:41 +0100 Subject: [PATCH] Update ldap_shell.py --- impacket/examples/ldap_shell.py | 80 ++++++++++++++++++++++++++++++++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/impacket/examples/ldap_shell.py b/impacket/examples/ldap_shell.py index d9c492203b..8f420436fb 100755 --- a/impacket/examples/ldap_shell.py +++ b/impacket/examples/ldap_shell.py @@ -17,15 +17,52 @@ import sys import cmd import random +import binascii import ldap3 from ldap3.core.results import RESULT_UNWILLING_TO_PERFORM from ldap3.utils.conv import escape_filter_chars from six import PY2 import shlex from impacket import LOG +from Cryptodome.Hash import MD4 from ldap3.protocol.microsoft import security_descriptor_control from impacket.ldap.ldaptypes import ACCESS_ALLOWED_OBJECT_ACE, ACCESS_MASK, ACCESS_ALLOWED_ACE, ACE, OBJECTTYPE_GUID_MAP from impacket.ldap import ldaptypes +from impacket.structure import Structure, hexdump + +class MSDS_MANAGEDPASSWORD_BLOB(Structure): + structure = ( + ('Version','