.. / powershell-modify-acl
Star

In Windows, file and folder permissions are managed through Access Control Lists (ACLs). Using PowerShell, attackers with the necessary privileges can retrieve the current ACL of a file, create a new access rule, and grant full control to a chosen user or group.

Command Reference:

Target File: C:\Users\Administrator\Desktop\flag.txt

Granted To: Everyone

Permission: FullControl / Modify / ReadAndExecute / Read / Write 
Command: Copy Extra code: Copy References:

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/get-acl?view=powershell-7.5

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-acl?view=powershell-7.5