Investigating Credential Providers on Windows

I registered a sample Credential Provider with the following .reg file:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{5fd3d285-0dd9-4362-8855-e0abaacd4af6}]
@="SampleV2CredentialProvider"

[HKEY_CLASSES_ROOT\CLSID\{5fd3d285-0dd9-4362-8855-e0abaacd4af6}]
@="SampleV2CredentialProvider"

[HKEY_CLASSES_ROOT\CLSID\{5fd3d285-0dd9-4362-8855-e0abaacd4af6}\InprocServer32]
@="SampleV2CredentialProvider.dll"
"ThreadingModel"="Apartment"
(more…)

Generating Events 8004 and 8005 in Windows Logs

On DC with IP address 192.168.0.123:

wevtutil sl Microsoft-Windows-NTLM/Operational /e:true
wevtutil qe Microsoft-Windows-NTLM/Operational /q:"*[System[(EventID=8004 or EventID=8005)]]" /f:text
net share
Share name   Resource                        Remark

-------------------------------------------------------------------------------
C$           C:\                             Default share
IPC$                                         Remote IPC
ADMIN$       C:\Windows                      Remote Admin
NETLOGON     C:\Windows\SYSVOL\sysvol\my.local\SCRIPTS
                                             Logon server share
SYSVOL       C:\Windows\SYSVOL\sysvol        Logon server share
The command completed successfully.
(more…)

Enabling Debug Visualizers in MS Visual Studio

Tools->Options:

(more…)

Installing LDAPS certificate on Windows 10

I realized that my LDAPS certificate is not trusted with the following command in PowerShell:

certutil -verify ldap.crt
(more…)

Why do we pass parameters to coroutines by value in C++?

C++ coroutines and const reference parameters

A coroutine func accepts a parameter by const reference in the code below:

#include <boost/asio.hpp>

#include <iostream>

namespace asio = boost::asio;
using asio::awaitable;
using asio::use_awaitable;

class Param
{
public:

    Param(int val) : m_val(val)
    {
        std::cout << "Param constructor " << m_val << std::endl;
    }
(more…)

Using BOOST 1.89 with BOOST_ASIO_HAS_IO_URING on Linux

Added the following to the common section of CMake:

add_definitions("-DBOOST_ASIO_HAS_IO_URING")

and the following to the project section:

find_library(URING_LIB uring)
target_link_libraries(${TEST_TARGET} PRIVATE ${URING_LIB})
(more…)

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…)

Fixed ERR_PROXY_CONNECTION_FAILED in Google Chrome

By disabling this proxy:

(more…)

Increasing image size in WordPress

I updated my Ubuntu 24.04 and my WordPress stopped loading images of size 1.3MB and higher.

I fixed this by adding the following:

client_max_body_size 32M;

to Nginx configuration.

(more…)