I recently discovered the CACLS
command, that allows someone to edit the ACL of a file. I saw it in a CTF write-up (hacking challenge) to get the root flag supposedly restricted to the Administrator:
CACLS filepath_to_root.txt /G User:R
This command seems overkill and security mechanisms probably exist to prevent any user to use that command to edit directories/files permissions. What are they? And how can I detect if the vulnerability is present? Without the write-up I would never have thought about that.
(E.g. in Linux, the being in the sudo group would allow me to have full power. I can check that with the groups
command.)