Tag Archives: kerboros

Experimentations with LDAP/SASL on Ubuntu

SASL

I configured Kerberos on Ubuntu 24.04 WSL and was able to run the following command:

export KRB5_TRACE=/dev/stderr
ldapsearch -H ldap://myserver.my.local -Y GSSAPI

that produced the following output:

(more…)

Investigating how LDAP works with Seal and Sign flags

C# code:

public void bindWithMs(string ldapServer, int ldapPort, string ldapUser, string ldapPassword)
{
    var ldap = new System.DirectoryServices.Protocols.LdapDirectoryIdentifier(ldapServer, ldapPort);

    using (var connection = new System.DirectoryServices.Protocols.LdapConnection(ldap))
    {
        connection.AuthType = System.DirectoryServices.Protocols.AuthType.Negotiate;
        connection.Timeout = TimeSpan.FromSeconds(120);

        connection.SessionOptions.ProtocolVersion = 3;
        connection.SessionOptions.Signing = true;
        connection.SessionOptions.Sealing = true;

        connection.Credential = new System.Net.NetworkCredential(ldapUser, ldapPassword);
        connection.Bind();
    }
}
(more…)

Investigating Kerboros with kinit and Wireshark

On the domain controller:

nslookup -q=SRV _kerberos._tcp.other.local
Server:  localhost
Address:  127.0.0.1

_kerberos._tcp.other.local      SRV service location:
          priority       = 0
          weight         = 100
          port           = 88
          svr hostname   = 7-dev-de-dc16.other.local
7-dev-de-dc16.other.local       internet address = 10.15.7.16
(more…)