byt3bl33d3r / CrackMapExec

A swiss army knife for pentesting networks
BSD 2-Clause "Simplified" License
8.29k stars 1.64k forks source link

[LDAP] Query for user groups or group members #803

Closed RomanRII closed 10 months ago

RomanRII commented 11 months ago

Description

Examples

image

image

In Reference To

Feature Request: https://github.com/Porchetta-Industries/CrackMapExec/issues/793

RomanRII commented 11 months ago

if this would be better placed in a module, let me know and i can port that over

Cyb3rC3lt commented 10 months ago

I think this is catered for in certain modules. Try these:

cme ldap 10.110.228.50 -u test -p 'pass' -d test.info -M groupmembership -o USER=testuser

cme ldap 10.136.81.20 -u testuser -p 'testpass!' -M GROUP-MEM -o GROUP='Domain Admins'

RomanRII commented 10 months ago

giphy

Just tried it, yep that's exactly what i was looking for. Thank you!

Cyb3rC3lt commented 10 months ago

I realise that's very annoying after your hard work so apologies for being a spoil sport. There are a lot of features not documented unfortunately so it's hard to know what cme does sometimes. I only found the groupmembership module by reading the code. Thanks again for your effort and hopefully you have other ideas.

RomanRII commented 10 months ago

Ain't no worries at all. I'm glad I ended up on the same path as someone else who had an idea here. Hopefully the next one is an original :D

Cheers