๐ Secure Bits ๐ก
๐๐ผ๐ถ๐ป๐ถ๐ป๐ด ๐ฑ๐ฒ๐๐ถ๐ฐ๐ฒ๐ ๐๐ผ ๐๐ผ๐๐ฟ ๐๐ ๐ฑ๐ผ๐บ๐ฎ๐ถ๐ป? ๐ง๐ต๐ฒ๐ฟ๐ฒโ๐ ๐บ๐ผ๐ฟ๐ฒ ๐๐ผ ๐ถ๐.
(Updated version โ thanks to the great feedback from Adonis Moreira & Andreas Vikerup ๐)
A few weeks ago I posted a Secure Bits on creating a ๐ต๐ฎ๐ฟ๐ฑ๐ฒ๐ป๐ฒ๐ฑ ๐๐ฒ๐ฟ๐๐ถ๐ฐ๐ฒ ๐ฎ๐ฐ๐ฐ๐ผ๐๐ป๐ for domain joins. Since then, Iโve ๐๐ฝ๐ฑ๐ฎ๐๐ฒ๐ฑ ๐ฏ๐ผ๐๐ต my guide and tools โ and made a short video walkthrough. Hereโs whatโs new and what to watch out for:
๐๐ฎ๐ฟ๐ฑ๐ฒ๐ป๐ถ๐ป๐ด ๐ผ๐ณ ๐๐ผ๐๐ฟ ๐ฑ๐ผ๐บ๐ฎ๐ถ๐ป ๐ท๐ผ๐ถ๐ป ๐ฝ๐ฟ๐ผ๐ฐ๐ฒ๐๐:
โ
Create a dedicated service account (complex password, no extra rights).
โ
Delegate the required permissions on the Computers OU.
โ
Set โAdd workstations to domainโ GPO privilege โ your service account + Domain Admins.
โ
Set ms-DS-MachineAccountQuota to 0 โ block default behavior allowing any authenticated user to join 10 devices.
Devices can be joined either via the โAdd workstations to domainโ user right (limited by ms-DS-MachineAccountQuota โ default 10 per Authenticated User) or via delegated Create Computer Objects on the target OU (no quota/user-right needed). Set the attribute to 0 to block the default Authenticated Users path, and keep the GPO scoped only to your joiners/DA group so intent stays explicit.
๐ ๐๐ผ๐ปโ๐ ๐ณ๐ผ๐ฟ๐ด๐ฒ๐:ย after joining, always move devices out of the default Computers container to avoid inherited permissions (you also want to apply some GPOs, right?)
๐ฅ ๐๐๐ ๐ต๐ฒ๐ฟ๐ฒโ๐ ๐๐ต๐ฎ๐ ๐ ๐บ๐ถ๐๐๐ฒ๐ฑ ๐น๐ฎ๐๐ ๐๐ถ๐บ๐ฒย โ
When you join a device using a service account, that account becomes ๐ผ๐๐ป๐ฒ๐ฟ of the new computer object and may have dangerous Access Control Entries (๐๐๐๐).
๐ง๐ต๐ถ๐ ๐ฐ๐ฟ๐ฒ๐ฎ๐๐ฒ๐ ๐ฎ ๐ต๐ถ๐ฑ๐ฑ๐ฒ๐ป ๐ฟ๐ถ๐๐ธ:
๐ If the join account is compromised, it can abuse permissions on existing joined computers.
๐ก๐ฒ๐ ๐ฅ๐ฒ๐๐ผ๐๐ฟ๐ฐ๐ฒ๐ ๐๐ผ ๐๐ถ๐
๐ง๐ต๐ถ๐:
๐น ๐๐๐ฃ๐ฟ๐ผ๐ฏ๐ฒ ๐๐ฝ๐ฑ๐ฎ๐๐ฒ:
โ Now detects foreign object ownership after domain join.
๐นย ๐๐ผ๐บ๐ฎ๐ถ๐ป ๐๐ผ๐ถ๐ป ๐๐๐ถ๐ฑ๐ฒ ๐๐ฝ๐ฑ๐ฎ๐๐ฒ:
โ Now includes a PowerShell cleanup script to:
โข Change object ownership to Domain Admins
โข Remove join account ACEs from computer objects
๐น Links for products and write-up from Andreas are in comments.
โธป
๐ฌ How do you manage secure domain joins?
Do you clean up ACEs and ownership after provisioning?