Had the same issue. Ubuntu 22.04 upgraded OpenSSL to version 3.0.2, which is more strict in its security policies.
I’ve tried to edit /etc/ssl/openssl.cnf, but ended up using a dedicated docker for impacket which worked well for me.
Try running the strace to identify the right configuration file:
mssqlclient.py “$USER:$PASS@$TARGET_IP” -port 1433 -windows-auth 2>&1 | grep -E “/etc|.cnf|.conf|.config”
In Fedora:
/etc/pki/tls/openssl.cnf (includes opensslcnf.config)
/etc/crypto-policies/back-ends/opensslcnf.config
/etc/crypto-policies/back-ends/openssl.config
There is probably better way, but taking the CipherString from @SECLEVEL=2 to @SECLEVEL=1 makes the mssqlclient work again.
Now while using the mssqlclient command, pre-pend the following command: OPENSSL_CONF=./name of file.cnf
Also don’t forget to append -windows-auth at the end
My full version of the command is as follows: OPENSSL_CONF=./openssl.cnf
mssqlclient.py ARCHETYPE/:@ -windows-auth