Closed 0xArt3mis closed 2 years ago
Hello,
If smb port is accessible go for :
proxychains crackmapexec ldap HOSTNAME.DOMAIN.COM -u username -p password
if not accessible:
proxychains crackmapexec ldap HOSTNAME.DOMAIN.COM -u username -p password -kdcHost DOMAIN.COM
Okay, so if I connect with
proxychains crackmapexec ldap HOSTNAME.DOMAIN.COM -u username -p password -kdcHost DOMAIN.COM
it works. but if I connect with the following:
proxychains crackmapexec ldap HOSTNAME.DOMAIN.COM -u username -p password -kdcHost DC-IP
it does not work. I remember this was working already, was this changed?
Also if I execute
proxychains crackmapexec ldap HOSTNAME.DOMAIN.COM -u username -p password -kdcHost DOMAIN.COM -M ldap-signing
there is also an error raised.
File "/root/.cache/pypoetry/virtualenvs/crackmapexec-p1eIvB8p-py3.9/lib/python3.9/site-packages/cme/protocols/ldap.py", line 236, in plaintext_login
self.check_if_admin()
File "/root/.cache/pypoetry/virtualenvs/crackmapexec-p1eIvB8p-py3.9/lib/python3.9/site-packages/cme/protocols/ldap.py", line 435, in check_if_admin
for attribute in resp[0][1]:
TypeError: 'bool' object is not subscriptable
Why does it even connect to SMB when I want LDAP? Is this because of the local admin check? can this be disabled?
It looks like the SMB connection is not closed before LDAP tries to connect. On the target I get the following
wsarecv: An existing connection was forcibly closed by the remote host.
Could it be that it sends the LDAP query over SMB?
SMB hostname.domain.com 445 HOSTNAME [-] Error in searchRequest -> referral: 0000202B: RefErr: DSID-0310082F, data 0, 1 access points
ref 1: 'KDC-IP-Address'
I was using revsocks for testing.
Hello,
if this command is working
proxychains crackmapexec ldap HOSTNAME.DOMAIN.COM -u username -p password -kdcHost DOMAIN.COM
there is not particular reason for proxychains crackmapexec ldap HOSTNAME.DOMAIN.COM -u username -p password -kdcHost DOMAIN.COM -M ldap-signing
to fail.
But indeed I said a mistake with smb, I need to update the code so it is not used if you add option no-smb
which is important when using a sock proxy.
Steps to reproduce
When I try to connect to the LDAP service using CME version 5.2.3 I get the following error.
This was not a problem with 5.1.7dev, since LDAP bind is working fine with version 5.1.7dev.
Command string used
proxychains crackmapexec ldap HOSTNAME.DOMAIN.COM -u username -d domain -p password --kdcHost IP
CME verbose output (using the --verbose flag)
CME Version (cme --version)
Version : 5.2.3 Codename: The Dark Knight
OS
Linux kali 5.14.0-kali2-amd64 #1 SMP Debian 5.14.9-2kali1 (2021-10-04) x86_64 GNU/Linux
Target OS
Windows 6.3 Build 9600 x64