impacket icon indicating copy to clipboard operation
impacket copied to clipboard

ldap_shell cd,ls,cat,search,modify

Open s0i37 opened this issue 3 years ago • 5 comments

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

s0i37 avatar Dec 01 '22 07:12 s0i37

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.

0xdeaddood avatar Jan 20 '23 05:01 0xdeaddood

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

s0i37 avatar Jan 20 '23 07:01 s0i37

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?

0xdeaddood avatar Jan 21 '23 00:01 0xdeaddood

I mean raw ldap search filter.

s0i37 avatar Jan 23 '23 06:01 s0i37

ping

s0i37 avatar Oct 08 '24 11:10 s0i37