fortra / impacket

Impacket is a collection of Python classes for working with network protocols.
https://www.coresecurity.com
Other
13.53k stars 3.58k forks source link

ldap_shell cd,ls,cat,search,modify #1446

Open s0i37 opened 1 year ago

s0i37 commented 1 year ago

Hello. Ldap_shell need a vital functions like a: cd, ls, cat, grep, modify. Currently exists only search command, but it doesn't work.

0xdeaddood commented 1 year ago

Hi @s0i37! The LDAP shell is an interactive mode to perform LDAP operations (please check https://github.com/fortra/impacket/pull/747). I think you are misunderstanding its purpose.

s0i37 commented 1 year ago

I think that search, printing of all attributes of object and obtain of list of object it is the main basic LDAP operations.

0xdeaddood commented 1 year ago

The search command works fine. You can search users and groups by name, distinguishedName and sAMAccountName, and print the attributes you want. For instance, once the shell is launched, if I want to know the company, department, and job title of user Lionel, I have to run:

# search lionel company department title
CN=lionel,CN=Users,DC=spaceland,DC=com
name: lionel
distinguishedName: CN=lionel,CN=Users,DC=spaceland,DC=com
sAMAccountName: lionel
objectSid: S-1-5-21-228070373-792498579-752203405-2110
company: SuperCompany
department: IT
title: Administrator

How are you running the command?

s0i37 commented 1 year ago

I mean raw ldap search filter.

s0i37 commented 1 month ago

ping