Allele Security Alert
AD DC S4U2Self/S4U2Proxy unkeyed checksum
The Samba Project
All Samba versions since Samba 4.0
All releases of Heimdal from 0.8 including 7.5.0 and any products that ship a KDC derived from one of those Heimdal releases.
Samba 4.8.12, 4.9.8 and 4.10.3
Proof of concept
S4U2Self is an extension to Kerberos used in Active Directory to allow a service to request a kerberos ticket to itself from the Kerberos Key Distribution Center (KDC) for a non-Kerberos authenticated user (principal in Kerberos parlance). This is useful to allow internal code paths to be standardized around Kerberos.
S4U2Proxy (constrained-delegation) is an extension of this mechanism allowing this impersonation to a second service over the network. It allows a privileged server that obtained a S4U2Self ticket to itself to then assert the identity of that principal to a second service and present itself as that principal to get services from the second service.
There is a flaw in Samba’s AD DC in the Heimdal KDC. When the Heimdal KDC checks the checksum that is placed on the S4U2Self packet by the server to protect the requested principal against modification, it does not confirm that the checksum algorithm that protects the user name (principal) in the request is keyed. This allows a man-in-the-middle attacker who can intercept the request to the KDC to modify the packet by replacing the user name (principal) in the request with any desired user name (principal) that exists in the KDC and replace the checksum protecting that name with a CRC32 checksum (which requires no prior knowledge to compute).
This would allow a S4U2Self ticket requested on behalf of user name (principal) user@EXAMPLE.COM to any service to be changed to a S4U2Self ticket with a user name (principal) of Administrator@EXAMPLE.COM. This ticket would then contain the PAC of the modified user name (principal).
Isaac Boukris and Andrew Bartlett
Samba AD DC S4U2Self/S4U2Proxy unkeyed checksum
Release Notes for Samba 4.10.3
Release Notes for Samba 4.9.8
Release Notes for Samba 4.8.12
If there is any error in this alert or you wish a comprehensive analysis, let us know.
Last modified: May 14, 2019