Skip to content

byt3bl33d3r/msldap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

msldap

LDAP library for MS AD

Installation

Via GIT
python3 setup.py install
OR
pip msldap install

Prerequisites

  • ldap3 module. It's pure python so you dont have to compile anything.
  • winsspi module. For windows only. This supports SSPI based authentication.
  • asn1crypto module. Some LDAP queries incorporate ASN1 strucutres to be sent on top of the ASN1 transport XD
  • socks5line module. To support socks5 proxying.
  • aiocmd For the interactive client
  • asciitree For plotting nice trees in the interactive client

Usage

Please note that this is a library, and was not intended to be used as a command line program.
Whit this noted, the projects packs a fully functional LDAP interactive client. When installing the msldap module with setup.py install a new binary will appear called msldap (shocking naming conventions)

LDAP connection URL

The major change was needed in version 0.2.0 to unify different connection options as one single string, without the need for additional command line switches.
The new connection string is composed in the following manner:
<protocol>+<auth_method>:https://<domain>\<username>:<password>@<ip>:<port>/?<param>=<value>&<param>=<value>&...
Detailed explanation with examples:

<protocol>: "ldap" or "ldaps"
<auth_method> (opt): "ntlm" or "sspi" default is ntlm

<param> (opt): <proxtype> <proxyauth> <proxyhost> <proxyport> <proxyuser> <proxpass>

Examples:
   ldap:https://10.10.10.2
   ldap:https://TEST\\victim:[email protected]
   ldap+ntlm:https://TEST\\victim:[email protected]
   ldap+ntlm:https://TEST\\victim:<NT_hash>@10.10.10.2
   ldap+sspi:https://10.10.10.2
   ldap:https://TEST\\victim:[email protected]/?proxytype=socks5&proxyhost=127.0.0.1&proxyport=1080

IMPORTANT! Based on your shell, the backslash operator (separating the user and domain) can be destorying the url. Be careful

About

LDAP library for auditing MS AD

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.8%
  • Makefile 0.2%