scapy.modules.ldaphero

LDAP Hero: a LDAP browser based on the Scapy LDAP client

class scapy.modules.ldaphero.AutoHideScrollbar(*args, **kwargs)[source]

Bases: Scrollbar

set(first, last)[source]
class scapy.modules.ldaphero.BasePopup(parent)[source]

Bases: object

A tkinter wrapper used to have a popup window with basic controls

cancel() None[source]

Cancel the popup

dismiss(*_) None[source]

Close the popup

run() False[source]

Show the popup. Returns True if cancelled, False otherwise.

class scapy.modules.ldaphero.LDAPHero(ssp: SSP = None, mech: LDAP_BIND_MECHS = LDAP_BIND_MECHS.SASL_GSS_SPNEGO, sign: bool = True, encrypt: bool = False, host: str = None, port: int = None, ssl: bool = False, UPN: str = None, password: str = None, kerberos_required: bool = False, HashNt: bytes = None, HashAes256Sha96: bytes = None, HashAes128Sha96: bytes = None, use_krb5ccname: bool = False, use_winssp: bool = False)[source]

Bases: object

LDAP Hero - LDAP GUI browser over Scapy’s LDAP_Client

Parameters:
  • ssp – if provided, use this SSP for auth.

  • mech – the LDAP_BIND_MECHS to use when binding.

  • sign – request signature by default

  • encrypt – request encryption by default

  • host – auto-connect to a specific host

  • port – the port to connect to (default: 389/636) (This is only in use when using ‘host’)

  • ssl – whether to use SSL to connect or not (This is only in use when using ‘host’)

Authentication parameters:

Parameters:
  • UPN – the upn to use (DOMAIN/USER, DOMAINUSER, USER@DOMAIN or USER)

  • kerberos_required – require kerberos

  • password – if provided, used for auth

  • HashNt – if provided, used for auth (NTLM)

  • HashAes256Sha96 – if provided, used for auth (Kerberos)

  • HashAes128Sha96 – if provided, used for auth (Kerberos)

  • use_krb5ccname – (bool) if true, the KRB5CCNAME environment variable will be used if available.

  • use_winssp – (bool) (only works on Windows). Use implicit authentication through WinSSP.

addchild(*args)[source]
bind(*args)[source]

Bind command.

connect()[source]

Connect command.

disconnect()[source]

Disconnect command.

duplicate(*args)[source]
edit(*args)[source]

Edit popup

editmemberof(*_)[source]

Edit popup for “Member Of”

load_guids()[source]

Load the various guids: - schemaIDguid - propset

This cache is used to resolve the GUIDs of objects in ACEs.

main()[source]

Main loop: start the GUI.

modifydn(*args)[source]

Modify the DN of an item

new(mode)[source]

New popup. Called by both ‘Add child’ and ‘Duplicate’ popups

resolvesids(sids)[source]

Queue a list of SIDs for resolution. They are then added to self.sids if successful.

search(*args)[source]

Search popup

tprint(x, tags=[], flush=False)[source]

Print to text pane

tree(*args)[source]

Tree command.

treedoubleclick(_)[source]

Action done on tree double-click.

viewsec(*args)[source]

View security descriptor