SID History Attribute

๐Ÿ”’ Secure Bits ๐Ÿ’ก
๐—ฆ๐—œ๐—— ๐—›๐—ถ๐˜€๐˜๐—ผ๐—ฟ๐˜† ๐—ฐ๐—ฎ๐—ป ๐—ฏ๐—ฒ ๐—ฎ ๐—ฑ๐—ฎ๐—ป๐—ด๐—ฒ๐—ฟ๐—ผ๐˜‚๐˜€ ๐—ฎ๐˜๐˜๐—ฟ๐—ถ๐—ฏ๐˜‚๐˜๐—ฒ.

Do you use it in your environment?
Originally, SID History was used during Active Directory migrationsโ€”to let migrated users access old resources by injecting old SIDs into the SIDHistory attribute.

But hereโ€™s the risk ๐Ÿ‘‰ ๐˜„๐—ต๐—ฎ๐˜๐—ฒ๐˜ƒ๐—ฒ๐—ฟ ๐—ฆ๐—œ๐—— ๐˜†๐—ผ๐˜‚ ๐—ถ๐—ป๐—ท๐—ฒ๐—ฐ๐˜ ๐—ฏ๐—ฒ๐—ต๐—ฎ๐˜ƒ๐—ฒ๐˜€ ๐—น๐—ถ๐—ธ๐—ฒ ๐—ฎ ๐—ฟ๐—ฒ๐—ฎ๐—น ๐—บ๐—ฒ๐—บ๐—ฏ๐—ฒ๐—ฟ๐˜€๐—ต๐—ถ๐—ฝ.

For example:
If you inject the Enterprise Admins group SID (S-1-5-21-*-519) into a userโ€™s SIDHistory, that user gets Enterprise Admin privileges without actually being in the group.

Attackers love this trickโ€”๐—ถ๐˜โ€™๐˜€ ๐˜€๐˜๐—ฒ๐—ฎ๐—น๐˜๐—ต๐˜† ๐—ฎ๐—ป๐—ฑ ๐—ฝ๐—ผ๐˜„๐—ฒ๐—ฟ๐—ณ๐˜‚๐—น.

Itโ€™s also been abused in multi-domain environments to escalate from a child domain to the parent (๐˜€๐—ผ๐—บ๐—ฒ๐˜๐—ต๐—ถ๐—ป๐—ด ๐˜†๐—ผ๐˜‚ ๐˜€๐—ต๐—ผ๐˜‚๐—น๐—ฑ ๐—ป๐—ฒ๐˜ƒ๐—ฒ๐—ฟ ๐—ฟ๐—ฒ๐—น๐˜† ๐—ผ๐—ป).

โš  Even if you think you donโ€™t use SIDHistory, regularly scan your environment for misconfigurations like this. (โœ… You can use my tool, ADProbe, to help ๐Ÿ‘‰ https://academy.horizon-secured.com/p/adprobe

If you discover SIDHistory in your environment, it may be old migration residue or a sign of compromise.
Either way โ†’ ๐—ถ๐—ป๐˜ƒ๐—ฒ๐˜€๐˜๐—ถ๐—ด๐—ฎ๐˜๐—ฒ ๐—ฎ๐—ป๐—ฑ ๐—ฐ๐—น๐—ฒ๐—ฎ๐—ป ๐—ถ๐˜ ๐˜‚๐—ฝ.

๐Ÿ‘‰ Have you checked your SIDHistory lately?